Skip to content

Instantly share code, notes, and snippets.

@ncfavier
Created February 16, 2023 16:54
Show Gist options
  • Save ncfavier/e79f4a505b528b6ea5935a41f204a10c to your computer and use it in GitHub Desktop.
Save ncfavier/e79f4a505b528b6ea5935a41f204a10c to your computer and use it in GitHub Desktop.
{-# OPTIONS --without-K #-}
open import Agda.Primitive
private variable
ℓ ℓ' : Level
A B : Set ℓ
data _≡_ {A : Set ℓ} : A → A → Set ℓ where
refl : {a : A} → a ≡ a
data _≡[_]_ {A : Set ℓ} {B : A → Set ℓ'} : {x y : A} → B x → (p : x ≡ y) → B y → Set (ℓ ⊔ ℓ') where
reflrefl : {a : A} {b : B a} → b ≡[ refl ] b
apd : {B : A → Set ℓ} {x y : A} → (f : (a : A) → B a) → (p : x ≡ y) → f x ≡[ p ] f y
apd f refl = reflrefl
transpose : {x : A} {p : x ≡ x} (pp : _≡[_]_ {B = λ y → y ≡ x} refl p refl) → p ≡ refl
transpose reflrefl = refl
data ⊤ : Set where
⋆ : ⊤
⊤contractible : (t : ⊤) → t ≡ ⋆
⊤contractible ⋆ = refl
⊤set : (p : ⋆ ≡ ⋆) → p ≡ refl
⊤set p = transpose (apd ⊤contractible p)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment