Skip to main content
Stack Overflow
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Draft saved
Draft discarded
Cancel
7
  • They're not "essentially the same" because in your use of J, you don't use the type information you learn from the dependent pattern match. A better challenge would be to try to prove test : {l : Level} {A : Set l} -> (x : A) -> (p : x ≡ x) -> p ≡ refl using J. It's obviously easy if you allow pattern matching with K. Note that this challenge requires you to use the fact that p must be reflexivity, something you learn from the pattern match on p. Commented Oct 24, 2025 at 12:31
  • To put what @DominiqueDevriese said in another way: your use of J could be replaced with an equivalent use of subst, and the version of subst in which x and y are judgementally equal is obviously derivable without K (you just ignore the path x ≡ x and return the identity function P x → P x). Commented Oct 24, 2025 at 12:39
  • @DominiqueDevriese I had tried to do exactly that (knowing that it requires K) before asking this question. The reason I asked this question was to know why we have to reject pattern matching on x=x to make our system such that it doesn't use K. I may be wrong, but what I'm picking up is that J allows us to prove propositions on x=y, but when we pattern match on x=x, we are proving a proposition on x=x using J, which looks something like J (λ y path -> P path) [...], where P : x=x -> Type. But this is a type error as P cannot be applied to path as it is of type x=y, not x=x. Commented Oct 24, 2025 at 12:50
  • Not matching x=x with refl avoids this Commented Oct 24, 2025 at 12:51
  • Is the reasoning in my first comment correct? Commented Oct 24, 2025 at 12:53

AltStyle によって変換されたページ (->オリジナル) /