2014-01-05 20:05:08 +00:00
|
|
|
variable f {A : Type} (a b : A) : A.
|
|
|
|
check f 10 true
|
2013-09-04 20:21:57 +00:00
|
|
|
|
2014-01-05 20:05:08 +00:00
|
|
|
variable g {A B : Type} (a : A) : A.
|
|
|
|
check g 10
|
2013-09-04 20:21:57 +00:00
|
|
|
|
2014-01-08 08:38:39 +00:00
|
|
|
variable h : forall (A : Type), A -> A.
|
2013-09-04 20:21:57 +00:00
|
|
|
|
2014-01-05 20:05:08 +00:00
|
|
|
check fun x, fun A : Type, h A x
|
2013-09-04 20:21:57 +00:00
|
|
|
|
2014-01-08 08:38:39 +00:00
|
|
|
variable my_eq : forall A : Type, A -> A -> Bool.
|
2013-09-04 20:21:57 +00:00
|
|
|
|
2014-01-05 20:05:08 +00:00
|
|
|
check fun (A B : Type) (a : _) (b : _) (C : Type), my_eq C a b.
|
2013-09-04 20:21:57 +00:00
|
|
|
|
2014-01-05 20:05:08 +00:00
|
|
|
variable a : Bool
|
|
|
|
variable b : Bool
|
|
|
|
variable H : a /\ b
|
2014-01-09 16:33:52 +00:00
|
|
|
theorem t1 : b := (fun H1, and_intro H1 (and_eliml H)).
|
2013-09-04 20:21:57 +00:00
|
|
|
|
2014-01-06 03:10:21 +00:00
|
|
|
theorem t2 : a = b := trans (refl a) (refl b).
|
2013-09-04 20:21:57 +00:00
|
|
|
|
2014-01-05 20:05:08 +00:00
|
|
|
check f Bool Bool.
|
2013-09-04 20:21:57 +00:00
|
|
|
|
2014-01-08 08:38:39 +00:00
|
|
|
theorem pierce (a b : Bool) : ((a -> b) -> a) -> a :=
|
2014-01-09 16:33:52 +00:00
|
|
|
λ H, or_elim (EM a)
|
2014-01-08 08:38:39 +00:00
|
|
|
(λ H_a, H)
|
|
|
|
(λ H_na, NotImp1 (MT H H_na))
|