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-06 04:00:20 +00:00
|
|
|
assumption (* solve first metavar *)
|
2013-11-29 05:48:30 +00:00
|
|
|
done
|
2013-12-06 04:00:20 +00:00
|
|
|
apply assumption_tac (* solve second metavar *)
|
2013-11-29 05:48:30 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
(**
|
2013-12-06 04:00:20 +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 := _.
|
|
|
|
apply simple_tac
|
|
|
|
done
|
|
|
|
|
|
|
|
Show Environment 1
|
|
|
|
|
|
|
|
Theorem T3 : p => p /\ q => r => q /\ r /\ p := _.
|
2013-12-06 04:00:20 +00:00
|
|
|
apply (** REPEAT(ORELSE(imp_tac, conj_tac, conj_hyp_tac, assumption_tac)) **)
|
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
|