2014-12-01 05:16:01 +00:00
|
|
|
prelude definition bool : Type.{1} := Type.{0}
|
2014-09-17 21:39:05 +00:00
|
|
|
definition and (p q : bool) : bool := ∀ c : bool, (p → q → c) → c
|
2015-09-30 23:52:56 +00:00
|
|
|
infixl ` ∧ `:25 := and
|
2014-06-16 21:09:12 +00:00
|
|
|
|
2014-10-02 23:20:52 +00:00
|
|
|
constant a : bool
|
2014-06-16 21:09:12 +00:00
|
|
|
|
|
|
|
-- Error
|
2015-03-13 21:47:21 +00:00
|
|
|
theorem and_intro1 (p q : bool) (H1 : p) (H2 : q) : a
|
2014-06-16 21:09:12 +00:00
|
|
|
:= fun (c : bool) (H : p -> q -> c), H H1 H2
|
|
|
|
|
|
|
|
-- Error
|
2015-03-13 21:47:21 +00:00
|
|
|
theorem and_intro2 (p q : bool) (H1 : p) (H2 : q) : p ∧ p
|
2014-06-16 21:09:12 +00:00
|
|
|
:= fun (c : bool) (H : p -> q -> c), H H1 H2
|
|
|
|
|
|
|
|
-- Error
|
2015-03-13 21:47:21 +00:00
|
|
|
theorem and_intro3 (p q : bool) (H1 : p) (H2 : q) : q ∧ p
|
2014-06-16 21:09:12 +00:00
|
|
|
:= fun (c : bool) (H : p -> q -> c), H H1 H2
|
|
|
|
|
|
|
|
-- Correct
|
2015-03-13 21:47:21 +00:00
|
|
|
theorem and_intro4 (p q : bool) (H1 : p) (H2 : q) : p ∧ q
|
2014-06-16 21:09:12 +00:00
|
|
|
:= fun (c : bool) (H : p -> q -> c), H H1 H2
|
|
|
|
|
2015-03-13 21:47:21 +00:00
|
|
|
check and_intro4
|