lean2/tests/lean/run/simple.lean
Leonardo de Moura 34dfacc10e refactor(frontends/lean): Bool does not need to be a reserved keyword
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-16 10:52:12 -07:00

24 lines
No EOL
564 B
Text

abbreviation Bool : Type.{1} := Type.{0}
section
parameter A : Type
definition eq (a b : A) : Bool
:= ∀P : A → Bool, P a → P b
theorem subst (P : A → Bool) (a b : A) (H1 : eq a b) (H2 : P a) : P b
:= H1 P H2
theorem refl (a : A) : eq a a
:= λ (P : A → Bool) (H : P a), H
theorem symm (a b : A) (H : eq a b) : eq b a
:= subst (λ x : A, eq x a) a b H (refl a)
theorem trans (a b c : A) (H1 : eq a b) (H2 : eq b c) : eq a c
:= subst (λ x : A, eq a x) b c H2 H1
end
check subst.{1}
check refl.{1}
check symm.{1}
check trans.{1}