2014-09-17 21:39:05 +00:00
|
|
|
definition bool : Type.{1} := Type.{0}
|
|
|
|
definition and (p q : bool) : bool := ∀ c : bool, (p → q → c) → c
|
2014-07-01 23:55:41 +00:00
|
|
|
infixl `∧`:25 := and
|
2014-06-16 21:09:12 +00:00
|
|
|
|
|
|
|
variable a : bool
|
|
|
|
|
|
|
|
-- Error
|
|
|
|
theorem and_intro (p q : bool) (H1 : p) (H2 : q) : a
|
|
|
|
:= fun (c : bool) (H : p -> q -> c), H H1 H2
|
|
|
|
|
|
|
|
-- Error
|
|
|
|
theorem and_intro (p q : bool) (H1 : p) (H2 : q) : p ∧ p
|
|
|
|
:= fun (c : bool) (H : p -> q -> c), H H1 H2
|
|
|
|
|
|
|
|
-- Error
|
|
|
|
theorem and_intro (p q : bool) (H1 : p) (H2 : q) : q ∧ p
|
|
|
|
:= fun (c : bool) (H : p -> q -> c), H H1 H2
|
|
|
|
|
|
|
|
-- Correct
|
|
|
|
theorem and_intro (p q : bool) (H1 : p) (H2 : q) : p ∧ q
|
|
|
|
:= fun (c : bool) (H : p -> q -> c), H H1 H2
|
|
|
|
|
|
|
|
check and_intro
|