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-05 20:05:08 +00:00
|
|
|
variable h : Pi (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-05 20:05:08 +00:00
|
|
|
variable my_eq : Pi 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-06 03:10:21 +00:00
|
|
|
theorem t1 : b := discharge (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-05 20:05:08 +00:00
|
|
|
theorem pierce (a b : Bool) : ((a ⇒ b) ⇒ a) ⇒ a :=
|
2014-01-06 03:10:21 +00:00
|
|
|
discharge (λ H, or::elim (EM a)
|
2013-09-04 20:21:57 +00:00
|
|
|
(λ H_a, H)
|
|
|
|
(λ H_na, NotImp1 (MT H H_na)))
|