\begin{code}
Type : Set₁
Type = Set
\end{code}
\begin{code}
infixr 5 _,_
data Σ {A : Type} (P : A → Type) : Type where
_,_ : (a : A) → P a → Σ \(x : A) → P x
pr₁ : {A : Type} {P : A → Type}
→ (Σ \(x : A) → P x) → A
pr₁ (a , p) = a
pr₂ : {A : Type} {P : A → Type}
→ (w : Σ \(x : A) → P x) → P (pr₁ w)
pr₂ (a , p) = p
\end{code}
\begin{code}
infixr 10 _×_
_×_ : Type → Type → Type
A × B = Σ \(_ : A) → B
\end{code}
\begin{code}
data _+_ (A B : Type) : Type where
inl : A → A + B
inr : B → A + B
case : {A B C : Type} → (A → C) → (B → C) → A + B → C
case f g (inl a) = f a
case f g (inr b) = g b
\end{code}
\begin{code}
data 𝟘 : Type where
𝟘-elim : {A : Type} → 𝟘 → A
𝟘-elim ()
data 𝟙 : Type where
⋆ : 𝟙
\end{code}
\begin{code}
Prop : Set₁
Prop = Type
⊥ : Prop
⊥ = 𝟘
⊤ : Prop
⊤ = 𝟙
infixr 10 _∧_
infixr 5 _∨_
_∧_ : Prop → Prop → Prop
A ∧ B = A × B
_∨_ : Prop → Prop → Prop
A ∨ B = A + B
∃ : {A : Type} → (A → Prop) → Prop
∃ = Σ
\end{code}
\begin{code}
Axiom₀ : {A : Prop}
→ ⊥ → A
Axiom₀ ()
\end{code}
\begin{code}
Axiom₁ : {A : Prop}
→ A → A ∧ A
Axiom₁ a = (a , a)
\end{code}
\begin{code}
Axiom₂ : {A : Prop}
→ A ∨ A → A
Axiom₂ (inl a) = a
Axiom₂ (inr a) = a
\end{code}
\begin{code}
Axiom₃ : {A B : Prop}
→ A ∧ B → B ∧ A
Axiom₃ (a , b) = (b , a)
\end{code}
\begin{code}
Axiom₄ : {A B : Prop}
→ A ∨ B → B ∨ A
Axiom₄ (inl a) = inr a
Axiom₄ (inr b) = inl b
\end{code}
\begin{code}
Axiom₅ : {A B C : Prop}
→ (A → B) → (B → C) → A → C
Axiom₅ f g a = g (f a)
\end{code}
\begin{code}
Axiom₆ : {A B : Prop}
→ A → (A → B) → B
Axiom₆ a f = f a
\end{code}
\begin{code}
Axiom₇ : {A : Type} {P : A → Prop}
→ (a : A) → (∀ x → P x) → P a
Axiom₇ a f = f a
\end{code}
\begin{code}
Axiom₈ : {A B C : Prop}
→ (A ∧ B → C) → A → B → C
Axiom₈ f a b = f (a , b)
Axiom₉ : {A B C : Prop}
→ (A → B) → C ∨ A → C ∨ B
Axiom₉ f (inl c) = inl c
Axiom₉ f (inr a) = inr (f a)
Axiom₁₀ : {A : Type} {P : A → Prop} {Q : Prop}
→ (∀ x → Q → P x) → Q → ∀ x → P x
Axiom₁₀ f q x = f x q
Axiom₁₁ : {A : Type} {P : A → Prop}
→ (a : A) → P a → ∃ \x → P x
Axiom₁₁ a p = (a , p)
Axiom₁₂ : {A : Type} {P : A → Prop} {Q : Prop}
→ (∀ x → P x → Q) → (∃ \x → P x) → Q
Axiom₁₂ f (a , p) = f a p
\end{code}
\begin{code}
data _≡_ {A : Type} (a : A) : A → Type where
refl : a ≡ a
sym : {A : Type} {x y : A}
→ x ≡ y → y ≡ x
sym refl = refl
trans : {A : Type} {x y z : A}
→ x ≡ y → y ≡ z → x ≡ z
trans refl e = e
ap : {A B : Type} {x y : A}
→ (f : A → B) → x ≡ y → f x ≡ f y
ap f refl = refl
transport : {A : Type} (P : A → Type) {x y : A}
→ x ≡ y → P x → P y
transport P refl p = p
\end{code}