34 lines
1.2 KiB
Text
34 lines
1.2 KiB
Text
def0 True : ★ = {true}
|
||
|
||
def0 False : ★ = {}
|
||
def0 Not : ★ → ★ = λ A ⇒ ω.A → False
|
||
|
||
def void : 0.(A : ★) → 0.False → A =
|
||
λ A v ⇒ case0 v return A of { }
|
||
|
||
def0 All : (A : ★) → (0.A → ★) → ★¹ =
|
||
λ A P ⇒ (x : A) → P x
|
||
|
||
def cong :
|
||
0.(A : ★) → 0.(P : 0.A → ★) → (p : All A P) →
|
||
0.(x y : A) → (xy : x ≡ y : A) → Eq (𝑖 ⇒ P (xy @𝑖)) (p x) (p y) =
|
||
λ A P p x y xy ⇒ δ 𝑖 ⇒ p (xy @𝑖)
|
||
|
||
def0 eq-f :
|
||
0.(A : ★) → 0.(P : 0.A → ★) →
|
||
0.(p : All A P) → 0.(q : All A P) →
|
||
0.A → ★ =
|
||
λ A P p q x ⇒ p x ≡ q x : P x
|
||
|
||
def funext :
|
||
0.(A : ★) → 0.(P : 0.A → ★) → 0.(p q : All A P) →
|
||
(All A (eq-f A P p q)) → p ≡ q : All A P =
|
||
λ A P p q eq ⇒ δ 𝑖 ⇒ λ x ⇒ eq x @𝑖
|
||
|
||
def sym : 0.(A : ★) → 0.(x y : A) → (x ≡ y : A) → y ≡ x : A =
|
||
λ A x y eq ⇒ δ 𝑖 ⇒ comp A (eq @0) @𝑖 { 0 𝑗 ⇒ eq @𝑗; 1 _ ⇒ eq @0 }
|
||
|
||
def trans : 0.(A : ★) → 0.(x y z : A) →
|
||
ω.(x ≡ y : A) → ω.(y ≡ z : A) → x ≡ z : A =
|
||
λ A x y z eq1 eq2 ⇒ δ 𝑖 ⇒
|
||
comp A (eq1 @𝑖) @𝑖 { 0 _ ⇒ eq1 @0; 1 𝑗 ⇒ eq2 @𝑗 }
|