2014-01-05 18:32:47 +00:00
|
|
|
(* import("tactic.lua") *)
|
2014-01-08 08:38:39 +00:00
|
|
|
theorem T1 (A B : Bool) : A /\ B → B /\ A :=
|
|
|
|
fun H : A /\ B,
|
|
|
|
let main : B /\ A :=
|
|
|
|
(let H1 : B := _,
|
|
|
|
H2 : A := _
|
|
|
|
in _)
|
|
|
|
in main.
|
2013-12-26 23:54:53 +00:00
|
|
|
conj_hyp.
|
|
|
|
exact.
|
2013-12-06 13:13:29 +00:00
|
|
|
done.
|
2013-12-26 23:54:53 +00:00
|
|
|
conj_hyp.
|
|
|
|
exact.
|
2013-12-06 13:13:29 +00:00
|
|
|
done.
|
2014-01-09 16:33:52 +00:00
|
|
|
apply and_intro.
|
2013-12-26 23:54:53 +00:00
|
|
|
exact.
|
2013-12-06 13:13:29 +00:00
|
|
|
done.
|
|
|
|
|
2014-01-05 18:32:47 +00:00
|
|
|
(*
|
2013-12-26 23:54:53 +00:00
|
|
|
simple_tac = Repeat(OrElse(conj_hyp_tac(), conj_tac(), assumption_tac()))
|
2014-01-05 18:32:47 +00:00
|
|
|
*)
|
2013-12-06 13:13:29 +00:00
|
|
|
|
2014-01-08 08:38:39 +00:00
|
|
|
theorem T2 (A B : Bool) : A /\ B → B /\ A :=
|
|
|
|
fun H : A /\ B,
|
|
|
|
let H1 : A := _,
|
|
|
|
H2 : B := _,
|
|
|
|
main : B /\ A := _
|
|
|
|
in main.
|
2013-12-26 23:54:53 +00:00
|
|
|
simple_tac. done.
|
|
|
|
simple_tac. done.
|
|
|
|
simple_tac. done.
|