Library HoTT.Foundations.MLTT.Logic
This file is part of https://github.com/mjub/hott.
Elimination principles for the empty type.
Definition ind_empty (C : β β π) x : C x :=
match x with
end.
Definition rec_empty {C : π} (x : β ) : C :=
match x with
end.
Elimination principles for the unit type.
Definition ind_unit (C : π β π) (cβ : C β) x :=
match x with
| β β cβ
end.
Definition rec_unit {C : π} (cβ : C) x :=
match x with
| β β cβ
end.
Product types
Elimination principles for product types.
Section Prod.
Context {A B : π}.
Definition ind_prod (C : A Γ B β π) (f : β (x : A) (y : B), C (x, y)) p :=
match p with
| (x, y) β f x y
end.
Definition rec_prod {C : π} (f : A β B β C) (p : A Γ B) :=
match p with
| (x, y) β f x y
end.
End Prod.
Inductive Coprod (A B : π) : π := inl : A β _ | inr : B β _.
Arguments inl {_ _}.
Arguments inr {_ _}.
Notation "A + B" := (Coprod A B)
(at level 50, right associativity).
Elimination principles for coproduct types.
Section Coprod.
Context {A B : π}.
Definition ind_coprod (C : A + B β π) (f : β x, C (inl x)) (g : β y, C (inr y)) p :=
match p with
| inl x β f x
| inr y β g y
end.
Definition rec_coprod {C : π} (f : A β C) (g : B β C) p :=
match p with
| inl x β f x
| inr y β g y
end.
End Coprod.
The type of booleans
Elimination principles for the type of booleans.