2014-01-05 18:32:47 +00:00
|
|
|
(* import("tactic.lua") *)
|
2014-01-05 20:05:08 +00:00
|
|
|
theorem T1 (A B : Bool) : A /\ B => B /\ A :=
|
2014-01-06 03:10:21 +00:00
|
|
|
discharge (fun H : A /\ B,
|
2013-12-06 13:13:29 +00:00
|
|
|
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-06 03:10:21 +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-05 20:05:08 +00:00
|
|
|
theorem T2 (A B : Bool) : A /\ B => B /\ A :=
|
2014-01-06 03:10:21 +00:00
|
|
|
discharge (fun H : A /\ B,
|
2013-12-06 13:13:29 +00:00
|
|
|
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.
|