Skip to content

Instantly share code, notes, and snippets.

@ncfavier
Created August 13, 2023 14:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ncfavier/734da132a601dbf47a9f0b8626aea95c to your computer and use it in GitHub Desktop.
Save ncfavier/734da132a601dbf47a9f0b8626aea95c to your computer and use it in GitHub Desktop.
canonical-elements⇒type-like : is-set Carrier → canonical-elements → type-like c
canonical-elements⇒type-like set
record { canon = canon
; canon-≈ = canon-≈
; canon-≡ = canon-≡ }
=
record { type-like-to = Σ _ λ a → canon a ≡ a
; type-like-≅ = record { iso = record { _⟨$⟩_ = λ a → canon a , canon-≡ _ _ (canon-≈ a)
; cong = λ s → Σ-≡ (canon-≡ _ _ s) set }
; inv = record { _⟨$⟩_ = fst
; cong = λ s → Setoid.reflexive A (≡-cong fst s) }
; iso-inv = λ y → Σ-≡ (snd y) set
; inv-iso = canon-≈ } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment