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
|
|
|
|
)).
|
|
|
|
apply assumption_tactic (* solve first metavar *)
|
|
|
|
done
|
|
|
|
apply assumption_tactic (* solve second metavar *)
|
|
|
|
done
|
|
|
|
|
|
|
|
(**
|
|
|
|
simple_tac = REPEAT(imp_tactic() ^ conj_tactic() ^ assumption_tactic())
|
|
|
|
**)
|
|
|
|
|
|
|
|
Theorem T2 : p => q => p /\ q /\ p := _.
|
|
|
|
apply simple_tac
|
|
|
|
done
|
|
|
|
|
|
|
|
Show Environment 1
|
|
|
|
|
|
|
|
Theorem T3 : p => p /\ q => r => q /\ r /\ p := _.
|
2013-11-29 18:21:17 +00:00
|
|
|
apply (** REPEAT(ORELSE(imp_tactic, conj_tactic, conj_hyp_tactic, assumption_tactic)) **)
|
2013-11-29 05:48:30 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
(* Display proof term generated by previous tactic *)
|
|
|
|
Show Environment 1
|