lean2/tests/lean/tactic2.lean
Leonardo de Moura 048151487e feat(kernel): use Pi as forall/implication
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-08 00:38:39 -08:00

37 lines
No EOL
799 B
Text

(* import("tactic.lua") *)
variables p q r : Bool
theorem T1 : p → q → p /\ q :=
(fun H1 H2,
let H1 : p := _,
H2 : q := _
in and::intro H1 H2
).
exact -- solve first metavar
done
exact -- solve second metavar
done
(*
simple_tac = Repeat(conj_tac() ^ assumption_tac())
*)
theorem T2 : p → q → p /\ q /\ p := _.
simple_tac
done
print environment 1
theorem T3 : p → p /\ q → r → q /\ r /\ p := _.
(* Repeat(OrElse(conj_tac(), conj_hyp_tac(), assumption_tac())) *)
done
-- Display proof term generated by previous tac
print environment 1
theorem T4 : p → p /\ q → r → q /\ r /\ p := _.
Repeat (OrElse (apply and::intro) conj_hyp exact)
done
-- Display proof term generated by previous tac --
print environment 1