Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try out Homotopy Type Theory #78

Merged
merged 1 commit into from
Feb 3, 2024
Merged

Try out Homotopy Type Theory #78

merged 1 commit into from
Feb 3, 2024

Conversation

awalterschulze
Copy link
Member

No description provided.

@awalterschulze awalterschulze merged commit 4150dbf into main Feb 3, 2024
2 checks passed
@awalterschulze
Copy link
Member Author

-- UIP => unique identity => (a = b) = (a = b)
example {α : Type u} {a b : α} (p q : a = b) : p = q := by
  cases p
  cases q
  reflexivity

-- HoTT => !UIP => don't have unique identity => (a = b) = (a = b) ⋃ (a = b) != (a = b)
-- !UIP !=> HoTT
-- !large elimination in Lean => !UIP
-- hott example {α : Type u} {a b : α} (p q : a = b) : p = q := by
--   cases p
--   cases q
--   reflexivity

-- Agda K rule => allows pattern matching on refl => UIP
-- K : {A : Set} {x : A} (P : x ≡ x → Set) →
--     P refl → (x≡x : x ≡ x) → P x≡x
-- K P p refl = p

-- K rule is only used by Agda
-- without K => !UIP
-- without K => can use J rule
-- J rule is used by Coq, Lean, etc.
-- Coq has proof relevance
-- Lean has proof irrelevance and large elimination
-- !large elimination => proof relevance

-- "If you do need specifically proof-relevant equality, I would switch to Coq or Agda. Lean actively works against you in that case." - Jannis Limperg

-- K rule is better at infering types than the J rule, especially for False proofs, in our experience

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant