lean2/tests/lean/apply_tac1.lean
Leonardo de Moura 9f08156a73 feat(frontends/lean/parser): combine Echo and Show commands into the 'print' command
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-05 11:03:35 -08:00

25 lines
No EOL
607 B
Text

Import tactic.
Import Int.
Variable f : Int -> Int -> Bool
Variable P : Int -> Int -> Bool
Axiom Ax1 (x y : Int) (H : P x y) : (f x y)
Theorem T1 (a : Int) : (P a a) => (f a a).
apply Discharge.
apply Ax1.
exact.
done.
Variable b : Int
Axiom Ax2 (x : Int) : (f x b)
(*
simple_tac = Repeat(OrElse(imp_tac(), assumption_tac(), apply_tac("Ax2"), apply_tac("Ax1")))
*)
Theorem T2 (a : Int) : (P a a) => (f a a).
simple_tac.
done.
Theorem T3 (a : Int) : (P a a) => (f a a).
Repeat (OrElse (apply Discharge) exact (apply Ax2) (apply Ax1)).
done.
print Environment 2.