2014-12-01 05:16:01 +00:00
|
|
|
prelude -- Correct version
|
2014-08-22 01:24:22 +00:00
|
|
|
check let bool := Type.{0},
|
|
|
|
and (p q : bool) := ∀ c : bool, (p → q → c) → c,
|
2014-07-01 23:55:41 +00:00
|
|
|
infixl `∧`:25 := and,
|
2014-06-16 21:11:26 +00:00
|
|
|
and_intro (p q : bool) (H1 : p) (H2 : q) : p ∧ q
|
|
|
|
:= λ (c : bool) (H : p → q → c), H H1 H2,
|
|
|
|
and_elim_left (p q : bool) (H : p ∧ q) : p
|
|
|
|
:= H p (λ (H1 : p) (H2 : q), H1),
|
|
|
|
and_elim_right (p q : bool) (H : p ∧ q) : q
|
|
|
|
:= H q (λ (H1 : p) (H2 : q), H2)
|
|
|
|
in and_intro
|
|
|
|
|
2014-08-22 01:24:22 +00:00
|
|
|
-- TODO(Leo): fix expected output as soon as elaborator starts checking let-expression type again
|
|
|
|
|
|
|
|
check let bool := Type.{0},
|
|
|
|
and (p q : bool) := ∀ c : bool, (p → q → c) → c,
|
2014-09-08 14:47:42 +00:00
|
|
|
infixl `∧`:25 := and,
|
|
|
|
and_intro [visible] (p q : bool) (H1 : p) (H2 : q) : q ∧ p
|
2014-06-16 21:11:26 +00:00
|
|
|
:= λ (c : bool) (H : p → q → c), H H1 H2,
|
|
|
|
and_elim_left (p q : bool) (H : p ∧ q) : p
|
|
|
|
:= H p (λ (H1 : p) (H2 : q), H1),
|
|
|
|
and_elim_right (p q : bool) (H : p ∧ q) : q
|
|
|
|
:= H q (λ (H1 : p) (H2 : q), H2)
|
|
|
|
in and_intro
|