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