2013-12-26 23:54:53 +00:00
|
|
|
(** import("tactic.lua") **)
|
2013-11-29 05:48:30 +00:00
|
|
|
Variables p q r : Bool
|
|
|
|
|
|
|
|
Theorem T1 : p => q => p /\ q :=
|
|
|
|
Discharge (fun H1,
|
|
|
|
Discharge (fun H2,
|
|
|
|
let H1 : p := _,
|
|
|
|
H2 : q := _
|
|
|
|
in Conj H1 H2
|
|
|
|
)).
|
2013-12-26 23:54:53 +00:00
|
|
|
exact (* solve first metavar *)
|
2013-11-29 05:48:30 +00:00
|
|
|
done
|
2013-12-26 23:54:53 +00:00
|
|
|
exact (* solve second metavar *)
|
2013-11-29 05:48:30 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
(**
|
2013-12-26 23:54:53 +00:00
|
|
|
simple_tac = Repeat(imp_tac() ^ conj_tac() ^ assumption_tac())
|
2013-11-29 05:48:30 +00:00
|
|
|
**)
|
|
|
|
|
|
|
|
Theorem T2 : p => q => p /\ q /\ p := _.
|
2013-12-26 23:54:53 +00:00
|
|
|
simple_tac
|
2013-11-29 05:48:30 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
Show Environment 1
|
|
|
|
|
|
|
|
Theorem T3 : p => p /\ q => r => q /\ r /\ p := _.
|
2013-12-26 23:54:53 +00:00
|
|
|
(** Repeat(OrElse(imp_tac(), conj_tac(), conj_hyp_tac(), assumption_tac())) **)
|
|
|
|
done
|
|
|
|
|
|
|
|
(* Display proof term generated by previous tac *)
|
|
|
|
Show Environment 1
|
|
|
|
|
|
|
|
Theorem T4 : p => p /\ q => r => q /\ r /\ p := _.
|
|
|
|
Repeat (OrElse (apply Discharge) (apply Conj) conj_hyp exact)
|
2013-11-29 05:48:30 +00:00
|
|
|
done
|
|
|
|
|
2013-12-06 04:00:20 +00:00
|
|
|
(* Display proof term generated by previous tac *)
|
2013-11-29 05:48:30 +00:00
|
|
|
Show Environment 1
|