--- a/src/HOL/UNITY/Channel.ML Wed Aug 05 10:56:58 1998 +0200
+++ b/src/HOL/UNITY/Channel.ML Wed Aug 05 10:57:25 1998 +0200
@@ -26,8 +26,7 @@
by (Blast_tac 1);
qed_spec_mp "minSet_nonempty";
-Goal
- "leadsTo Acts (minSet -`` {Some x}) (minSet -`` (Some``greaterThan x))";
+Goal "leadsTo acts (minSet -`` {Some x}) (minSet -`` (Some``greaterThan x))";
by (rtac leadsTo_weaken 1);
by (rtac ([UC2, UC1] MRS PSP) 1);
by (ALLGOALS Asm_simp_tac);
@@ -39,7 +38,7 @@
(*The induction*)
-Goal "leadsTo Acts (UNIV-{{}}) (minSet -`` (Some``atLeast y))";
+Goal "leadsTo acts (UNIV-{{}}) (minSet -`` (Some``atLeast y))";
by (rtac leadsTo_weaken_R 1);
by (res_inst_tac [("l", "y"), ("f", "the o minSet"), ("B", "{}")]
greaterThan_bounded_induct 1);
@@ -55,7 +54,7 @@
val lemma = result();
-Goal "!!y::nat. leadsTo Acts (UNIV-{{}}) {s. y ~: s}";
+Goal "!!y::nat. leadsTo acts (UNIV-{{}}) {s. y ~: s}";
by (rtac (lemma RS leadsTo_weaken_R) 1);
by (Clarify_tac 1);
by (forward_tac [minSet_nonempty] 1);
--- a/src/HOL/UNITY/Channel.thy Wed Aug 05 10:56:58 1998 +0200
+++ b/src/HOL/UNITY/Channel.thy Wed Aug 05 10:57:25 1998 +0200
@@ -18,12 +18,12 @@
rules
- skip "id: Acts"
+ skip "id: acts"
- UC1 "constrains Acts (minSet -`` {Some x}) (minSet -`` (Some``atLeast x))"
+ UC1 "constrains acts (minSet -`` {Some x}) (minSet -`` (Some``atLeast x))"
- (* UC1 "constrains Acts {s. minSet s = x} {s. x <= minSet s}" *)
+ (* UC1 "constrains acts {s. minSet s = x} {s. x <= minSet s}" *)
- UC2 "leadsTo Acts (minSet -`` {Some x}) {s. x ~: s}"
+ UC2 "leadsTo acts (minSet -`` {Some x}) {s. x ~: s}"
end
--- a/src/HOL/UNITY/Common.ML Wed Aug 05 10:56:58 1998 +0200
+++ b/src/HOL/UNITY/Common.ML Wed Aug 05 10:57:25 1998 +0200
@@ -10,12 +10,9 @@
From Misra, "A Logic for Concurrent Programming" (1994), sections 5.1 and 13.1.
*)
-
-open Common;
-
(*Misra's property CMT4: t exceeds no common meeting time*)
-Goal "[| ALL m. constrains Acts {m} (maxfg m); n: common |] \
-\ ==> stable Acts (atMost n)";
+Goal "[| ALL m. constrains acts {m} (maxfg m); n: common |] \
+\ ==> stable acts (atMost n)";
by (dres_inst_tac [("P", "%t. t<=n")] elimination_sing 1);
by (asm_full_simp_tac
(simpset() addsimps [atMost_def, stable_def, common_def, maxfg_def,
@@ -27,8 +24,8 @@
addIs [order_eq_refl, fmono, gmono, le_trans]) 1);
qed "common_stable";
-Goal "[| ALL m. constrains Acts {m} (maxfg m); n: common |] \
-\ ==> invariant ({0},Acts) (atMost n)";
+Goal "[| ALL m. constrains acts {m} (maxfg m); n: common |] \
+\ ==> invariant (|Init={0}, Acts=acts|) (atMost n)";
by (rtac invariantI 1);
by (asm_simp_tac (simpset() addsimps [common_stable]) 2);
by (simp_tac (simpset() addsimps [atMost_def]) 1);
@@ -75,10 +72,10 @@
Addsimps [atMost_Int_atLeast];
Goal
- "[| ALL m. constrains Acts {m} (maxfg m); \
-\ ALL m: lessThan n. leadsTo Acts {m} (greaterThan m); \
-\ n: common; id: Acts |] \
-\ ==> leadsTo Acts (atMost n) common";
+ "[| ALL m. constrains acts {m} (maxfg m); \
+\ ALL m: lessThan n. leadsTo acts {m} (greaterThan m); \
+\ n: common; id: acts |] \
+\ ==> leadsTo acts (atMost n) common";
by (rtac leadsTo_weaken_R 1);
by (res_inst_tac [("f","%x. x"), ("l", "n")] greaterThan_bounded_induct 1);
by (ALLGOALS Asm_simp_tac);
@@ -89,10 +86,10 @@
(*The "ALL m: Compl common" form echoes CMT6.*)
Goal
- "[| ALL m. constrains Acts {m} (maxfg m); \
-\ ALL m: Compl common. leadsTo Acts {m} (greaterThan m); \
-\ n: common; id: Acts |] \
-\ ==> leadsTo Acts (atMost (LEAST n. n: common)) common";
+ "[| ALL m. constrains acts {m} (maxfg m); \
+\ ALL m: Compl common. leadsTo acts {m} (greaterThan m); \
+\ n: common; id: acts |] \
+\ ==> leadsTo acts (atMost (LEAST n. n: common)) common";
by (rtac lemma 1);
by (ALLGOALS Asm_simp_tac);
by (etac LeastI 2);
--- a/src/HOL/UNITY/Mutex.ML Wed Aug 05 10:56:58 1998 +0200
+++ b/src/HOL/UNITY/Mutex.ML Wed Aug 05 10:57:25 1998 +0200
@@ -9,14 +9,14 @@
(*split_all_tac causes a big blow-up*)
claset_ref() := claset() delSWrapper "split_all_tac";
-val cmd_defs = [mutex_def,
+val cmd_defs = [Mprg_def,
cmd0U_def, cmd1U_def, cmd2U_def, cmd3U_def, cmd4U_def,
cmd0V_def, cmd1V_def, cmd2V_def, cmd3V_def, cmd4V_def];
-Goalw [mutex_def] "id : mutex";
+Goalw [Mprg_def] "id : Acts Mprg";
by (Simp_tac 1);
-qed "id_in_mutex";
-AddIffs [id_in_mutex];
+qed "id_in_Acts";
+AddIffs [id_in_Acts];
(*Simplification for records*)
@@ -30,30 +30,30 @@
Addsimps [invariantU_def, invariantV_def];
-Goalw [MInit_def] "invariant (MInit,mutex) invariantU";
+Goalw [Mprg_def] "invariant Mprg invariantU";
by (rtac invariantI 1);
by (constrains_tac cmd_defs 2);
by Auto_tac;
qed "invariantU";
-Goalw [MInit_def] "invariant (MInit,mutex) invariantV";
+Goalw [Mprg_def] "invariant Mprg invariantV";
by (rtac invariantI 1);
by (constrains_tac cmd_defs 2);
by Auto_tac;
qed "invariantV";
-val mutex_invariant = invariant_Int_rule [invariantU, invariantV];
+val invariantUV = invariant_Int_rule [invariantU, invariantV];
(*The safety property: mutual exclusion*)
-Goal "disjoint (reachable (MInit,mutex)) {s. MM s = 3 & NN s = 3}";
-by (cut_facts_tac [mutex_invariant RS invariant_includes_reachable] 1);
+Goal "(reachable Mprg) Int {s. MM s = 3 & NN s = 3} = {}";
+by (cut_facts_tac [invariantUV RS invariant_includes_reachable] 1);
by Auto_tac;
qed "mutual_exclusion";
(*The bad invariant FAILS in cmd1V*)
-Goalw [bad_invariantU_def] "stable mutex bad_invariantU";
+Goalw [bad_invariantU_def] "stable (Acts Mprg) bad_invariantU";
by (constrains_tac cmd_defs 1);
by (REPEAT (trans_tac 1));
by (safe_tac (claset() addSEs [le_SucE]));
@@ -67,49 +67,48 @@
(*** Progress for U ***)
-Goalw [unless_def] "unless mutex {s. MM s=2} {s. MM s=3}";
+Goalw [unless_def] "unless (Acts Mprg) {s. MM s=2} {s. MM s=3}";
by (constrains_tac cmd_defs 1);
qed "U_F0";
-Goal "LeadsTo(MInit,mutex) {s. MM s=1} {s. PP s = VV s & MM s = 2}";
+Goal "LeadsTo Mprg {s. MM s=1} {s. PP s = VV s & MM s = 2}";
by (ensures_tac cmd_defs "cmd1U" 1);
qed "U_F1";
-Goal "LeadsTo(MInit,mutex) {s. ~ PP s & MM s = 2} {s. MM s = 3}";
-by (cut_facts_tac [mutex_invariant] 1);
+Goal "LeadsTo Mprg {s. ~ PP s & MM s = 2} {s. MM s = 3}";
+by (cut_facts_tac [invariantUV] 1);
+bw Mprg_def;
by (ensures_tac cmd_defs "cmd2U" 1);
qed "U_F2";
-Goalw [mutex_def] "LeadsTo(MInit,mutex) {s. MM s = 3} {s. PP s}";
+Goal "LeadsTo Mprg {s. MM s = 3} {s. PP s}";
by (rtac leadsTo_imp_LeadsTo 1);
by (res_inst_tac [("B", "{s. MM s = 4}")] leadsTo_Trans 1);
by (ensures_tac cmd_defs "cmd4U" 2);
by (ensures_tac cmd_defs "cmd3U" 1);
qed "U_F3";
-Goal "LeadsTo(MInit,mutex) {s. MM s = 2} {s. PP s}";
+Goal "LeadsTo Mprg {s. MM s = 2} {s. PP s}";
by (rtac ([LeadsTo_weaken_L, subset_refl RS subset_imp_LeadsTo]
MRS LeadsTo_Diff) 1);
by (rtac ([U_F2, U_F3] MRS LeadsTo_Trans) 1);
by (auto_tac (claset() addSEs [less_SucE], simpset()));
val U_lemma2 = result();
-Goal "LeadsTo(MInit,mutex) {s. MM s = 1} {s. PP s}";
+Goal "LeadsTo Mprg {s. MM s = 1} {s. PP s}";
by (rtac ([U_F1 RS LeadsTo_weaken_R, U_lemma2] MRS LeadsTo_Trans) 1);
by (Blast_tac 1);
val U_lemma1 = result();
-
-Goal "LeadsTo(MInit,mutex) {s. 1 <= MM s & MM s <= 3} {s. PP s}";
+Goal "LeadsTo Mprg {s. 1 <= MM s & MM s <= 3} {s. PP s}";
by (simp_tac (simpset() addsimps [le_Suc_eq, conj_disj_distribL]
addcongs [rev_conj_cong]) 1);
by (simp_tac (simpset() addsimps [Collect_disj_eq, LeadsTo_Un_distrib,
U_lemma1, U_lemma2, U_F3] ) 1);
val U_lemma123 = result();
-
(*Misra's F4*)
-Goal "LeadsTo(MInit,mutex) {s. UU s} {s. PP s}";
+Goal "LeadsTo Mprg {s. UU s} {s. PP s}";
by (rtac ([invariantU, U_lemma123] MRS invariant_LeadsTo_weaken) 1);
by Auto_tac;
qed "u_leadsto_p";
@@ -118,39 +117,39 @@
(*** Progress for V ***)
-Goalw [unless_def] "unless mutex {s. NN s=2} {s. NN s=3}";
+Goalw [unless_def] "unless (Acts Mprg) {s. NN s=2} {s. NN s=3}";
by (constrains_tac cmd_defs 1);
qed "V_F0";
-Goal "LeadsTo(MInit,mutex) {s. NN s=1} {s. PP s = (~ UU s) & NN s = 2}";
+Goal "LeadsTo Mprg {s. NN s=1} {s. PP s = (~ UU s) & NN s = 2}";
by (ensures_tac cmd_defs "cmd1V" 1);
qed "V_F1";
-Goal "LeadsTo(MInit,mutex) {s. PP s & NN s = 2} {s. NN s = 3}";
-by (cut_facts_tac [mutex_invariant] 1);
+Goal "LeadsTo Mprg {s. PP s & NN s = 2} {s. NN s = 3}";
+by (cut_facts_tac [invariantUV] 1);
by (ensures_tac cmd_defs "cmd2V" 1);
qed "V_F2";
-Goalw [mutex_def] "LeadsTo(MInit,mutex) {s. NN s = 3} {s. ~ PP s}";
+Goal "LeadsTo Mprg {s. NN s = 3} {s. ~ PP s}";
by (rtac leadsTo_imp_LeadsTo 1);
by (res_inst_tac [("B", "{s. NN s = 4}")] leadsTo_Trans 1);
by (ensures_tac cmd_defs "cmd4V" 2);
by (ensures_tac cmd_defs "cmd3V" 1);
qed "V_F3";
-Goal "LeadsTo(MInit,mutex) {s. NN s = 2} {s. ~ PP s}";
+Goal "LeadsTo Mprg {s. NN s = 2} {s. ~ PP s}";
by (rtac ([LeadsTo_weaken_L, subset_refl RS subset_imp_LeadsTo]
MRS LeadsTo_Diff) 1);
by (rtac ([V_F2, V_F3] MRS LeadsTo_Trans) 1);
by (auto_tac (claset() addSEs [less_SucE], simpset()));
val V_lemma2 = result();
-Goal "LeadsTo(MInit,mutex) {s. NN s = 1} {s. ~ PP s}";
+Goal "LeadsTo Mprg {s. NN s = 1} {s. ~ PP s}";
by (rtac ([V_F1 RS LeadsTo_weaken_R, V_lemma2] MRS LeadsTo_Trans) 1);
by (Blast_tac 1);
val V_lemma1 = result();
-Goal "LeadsTo(MInit,mutex) {s. 1 <= NN s & NN s <= 3} {s. ~ PP s}";
+Goal "LeadsTo Mprg {s. 1 <= NN s & NN s <= 3} {s. ~ PP s}";
by (simp_tac (simpset() addsimps [le_Suc_eq, conj_disj_distribL]
addcongs [rev_conj_cong]) 1);
by (simp_tac (simpset() addsimps [Collect_disj_eq, LeadsTo_Un_distrib,
@@ -159,7 +158,7 @@
(*Misra's F4*)
-Goal "LeadsTo(MInit,mutex) {s. VV s} {s. ~ PP s}";
+Goal "LeadsTo Mprg {s. VV s} {s. ~ PP s}";
by (rtac ([invariantV, V_lemma123] MRS invariant_LeadsTo_weaken) 1);
by Auto_tac;
qed "v_leadsto_not_p";
@@ -168,7 +167,7 @@
(** Absence of starvation **)
(*Misra's F6*)
-Goal "LeadsTo(MInit,mutex) {s. MM s = 1} {s. MM s = 3}";
+Goal "LeadsTo Mprg {s. MM s = 1} {s. MM s = 3}";
by (rtac LeadsTo_Un_duplicate 1);
by (rtac LeadsTo_cancel2 1);
by (rtac U_F2 2);
@@ -182,7 +181,7 @@
(*The same for V*)
-Goal "LeadsTo(MInit,mutex) {s. NN s = 1} {s. NN s = 3}";
+Goal "LeadsTo Mprg {s. NN s = 1} {s. NN s = 3}";
by (rtac LeadsTo_Un_duplicate 1);
by (rtac LeadsTo_cancel2 1);
by (rtac V_F2 2);
--- a/src/HOL/UNITY/Mutex.thy Wed Aug 05 10:56:58 1998 +0200
+++ b/src/HOL/UNITY/Mutex.thy Wed Aug 05 10:57:25 1998 +0200
@@ -26,6 +26,9 @@
VV :: bool
constdefs
+
+ (** The program for process U **)
+
cmd0U :: "(state*state) set"
"cmd0U == {(s,s'). s' = s (|UU:=True, MM:=1|) & MM s = 0}"
@@ -41,6 +44,8 @@
cmd4U :: "(state*state) set"
"cmd4U == {(s,s'). s' = s (|PP:=True, MM:=0|) & MM s = 4}"
+ (** The program for process V **)
+
cmd0V :: "(state*state) set"
"cmd0V == {(s,s'). s' = s (|VV:=True, NN:=1|) & NN s = 0}"
@@ -56,10 +61,12 @@
cmd4V :: "(state*state) set"
"cmd4V == {(s,s'). s' = s (|PP:=False, NN:=0|) & NN s = 4}"
- mutex :: "(state*state) set set"
- "mutex == {id,
- cmd0U, cmd1U, cmd2U, cmd3U, cmd4U,
- cmd0V, cmd1V, cmd2V, cmd3V, cmd4V}"
+ Mprg :: state program
+ "Mprg == (|Init = {s. ~ UU s & ~ VV s & MM s = 0 & NN s = 0},
+ Acts = {id,
+ cmd0U, cmd1U, cmd2U, cmd3U, cmd4U,
+ cmd0V, cmd1V, cmd2V, cmd3V, cmd4V}|)"
+
(** The correct invariants **)
@@ -77,7 +84,4 @@
"bad_invariantU == {s. (UU s = (1 <= MM s & MM s <= 3)) &
(3 <= MM s & MM s <= 4 --> ~ PP s)}"
- MInit :: "state set"
- "MInit == {s. ~ UU s & ~ VV s & MM s = 0 & NN s = 0}"
-
end
--- a/src/HOL/UNITY/ROOT.ML Wed Aug 05 10:56:58 1998 +0200
+++ b/src/HOL/UNITY/ROOT.ML Wed Aug 05 10:57:25 1998 +0200
@@ -19,3 +19,4 @@
time_use_thy "Mutex";
time_use_thy "FP";
time_use_thy "Reach";
+time_use_thy "Handshake";
--- a/src/HOL/UNITY/Reach.ML Wed Aug 05 10:56:58 1998 +0200
+++ b/src/HOL/UNITY/Reach.ML Wed Aug 05 10:57:25 1998 +0200
@@ -19,22 +19,22 @@
AddSEs [ifE];
-val cmd_defs = [racts_def, asgt_def, fun_upd_def];
+val cmd_defs = [Rprg_def, asgt_def, fun_upd_def];
-Goalw [racts_def] "id : racts";
+Goalw [Rprg_def] "id : (Acts Rprg)";
by (Simp_tac 1);
-qed "id_in_racts";
-AddIffs [id_in_racts];
+qed "id_in_Acts";
+AddIffs [id_in_Acts];
(*All vertex sets are finite*)
AddIffs [[subset_UNIV, finite_graph] MRS finite_subset];
Addsimps [reach_invariant_def];
-Goalw [rinit_def] "invariant (rinit,racts) reach_invariant";
+Goalw [Rprg_def] "invariant Rprg reach_invariant";
by (rtac invariantI 1);
by Auto_tac; (*for the initial state; proof of stability remains*)
-by (constrains_tac [racts_def, asgt_def] 1);
+by (constrains_tac [Rprg_def, asgt_def] 1);
by (blast_tac (claset() addIs [r_into_rtrancl,rtrancl_trans]) 1);
qed "reach_invariant";
@@ -52,7 +52,7 @@
qed "fixedpoint_invariant_correct";
Goalw (cmd_defs @ [FP_def, fixedpoint_def, stable_def, constrains_def])
- "FP racts <= fixedpoint";
+ "FP (Acts Rprg) <= fixedpoint";
by Auto_tac;
by (dtac bspec 1);
by (Blast_tac 1);
@@ -62,11 +62,11 @@
val lemma1 = result();
Goalw (cmd_defs @ [FP_def, fixedpoint_def, stable_def, constrains_def])
- "fixedpoint <= FP racts";
+ "fixedpoint <= FP (Acts Rprg)";
by (auto_tac (claset() addIs [ext], simpset()));
val lemma2 = result();
-Goal "FP racts = fixedpoint";
+Goal "FP (Acts Rprg) = fixedpoint";
by (rtac ([lemma1,lemma2] MRS equalityI) 1);
qed "FP_fixedpoint";
@@ -80,7 +80,7 @@
Goal "Compl fixedpoint = (UN (u,v): edges. {s. s u & ~ s v})";
by (simp_tac (simpset() addsimps
([Compl_FP, UN_UN_flatten, FP_fixedpoint RS sym,
- racts_def, asgt_def])) 1);
+ Rprg_def, asgt_def])) 1);
by Safe_tac;
by (rtac fun_upd_idem 1);
by (Blast_tac 1);
@@ -118,34 +118,34 @@
qed "metric_le";
Goal "(u,v): edges ==> \
-\ ensures racts ((metric-``{m}) Int {s. s u & ~ s v}) \
+\ ensures (Acts Rprg) ((metric-``{m}) Int {s. s u & ~ s v}) \
\ (metric-``(lessThan m))";
-by (ensures_tac [racts_def, asgt_def] "asgt u v" 1);
+by (ensures_tac [Rprg_def, asgt_def] "asgt u v" 1);
by (cut_facts_tac [metric_le] 1);
by (fast_tac (claset() addSDs [le_imp_less_or_eq]) 1);
qed "edges_ensures";
-Goal "leadsTo racts ((metric-``{m}) - fixedpoint) (metric-``(lessThan m))";
+Goal "leadsTo (Acts Rprg) ((metric-``{m}) - fixedpoint) (metric-``(lessThan m))";
by (simp_tac (simpset() addsimps [Diff_fixedpoint]) 1);
by (rtac leadsTo_UN 1);
by (split_all_tac 1);
by (asm_simp_tac (simpset() addsimps [edges_ensures RS leadsTo_Basis]) 1);
qed "leadsTo_Diff_fixedpoint";
-Goal "leadsTo racts (metric-``{m}) (metric-``(lessThan m) Un fixedpoint)";
+Goal "leadsTo (Acts Rprg) (metric-``{m}) (metric-``(lessThan m) Un fixedpoint)";
by (rtac (leadsTo_Diff_fixedpoint RS leadsTo_weaken_R RS leadsTo_Diff) 1);
by (ALLGOALS (blast_tac (claset() addIs [subset_imp_leadsTo])));
qed "leadsTo_Un_fixedpoint";
(*Execution in any state leads to a fixedpoint (i.e. can terminate)*)
-Goal "leadsTo racts UNIV fixedpoint";
+Goal "leadsTo (Acts Rprg) UNIV fixedpoint";
by (rtac lessThan_induct 1);
by Auto_tac;
by (rtac leadsTo_Un_fixedpoint 1);
qed "leadsTo_fixedpoint";
-Goal "LeadsTo(rinit,racts) UNIV { %v. (init, v) : edges^* }";
+Goal "LeadsTo Rprg UNIV { %v. (init, v) : edges^* }";
by (stac (fixedpoint_invariant_correct RS sym) 1);
by (rtac ([reach_invariant,
leadsTo_fixedpoint RS leadsTo_imp_LeadsTo]
--- a/src/HOL/UNITY/Reach.thy Wed Aug 05 10:56:58 1998 +0200
+++ b/src/HOL/UNITY/Reach.thy Wed Aug 05 10:57:25 1998 +0200
@@ -23,11 +23,9 @@
asgt :: "[vertex,vertex] => (state*state) set"
"asgt u v == {(s,s'). s' = s(v:= s u | s v)}"
- racts :: "(state*state) set set"
- "racts == insert id (UN (u,v): edges. {asgt u v})"
-
- rinit :: "state set"
- "rinit == {%v. v=init}"
+ Rprg :: state program
+ "Rprg == (|Init = {%v. v=init},
+ Acts = insert id (UN (u,v): edges. {asgt u v})|)"
reach_invariant :: state set
"reach_invariant == {s. (ALL v. s v --> (init, v) : edges^*) & s init}"
--- a/src/HOL/UNITY/SubstAx.ML Wed Aug 05 10:56:58 1998 +0200
+++ b/src/HOL/UNITY/SubstAx.ML Wed Aug 05 10:57:25 1998 +0200
@@ -16,31 +16,27 @@
(*** Introduction rules: Basis, Trans, Union ***)
-Goal "leadsTo Acts A B ==> LeadsTo(Init,Acts) A B";
+Goal "leadsTo (Acts prg) A B ==> LeadsTo prg A B";
by (simp_tac (simpset() addsimps [LeadsTo_def]) 1);
by (blast_tac (claset() addIs [PSP_stable2, stable_reachable]) 1);
qed "leadsTo_imp_LeadsTo";
-Goal "[| constrains Acts (reachable(Init,Acts) Int (A - A')) \
-\ (A Un A'); \
-\ transient Acts (reachable(Init,Acts) Int (A-A')) |] \
-\ ==> LeadsTo(Init,Acts) A A'";
-by (simp_tac (simpset() addsimps [LeadsTo_def]) 1);
+Goal "ensures (Acts prg) (reachable prg Int A) (reachable prg Int A') \
+\ ==> LeadsTo prg A A'";
+by (full_simp_tac (simpset() addsimps [ensures_def, LeadsTo_def]) 1);
by (rtac (stable_reachable RS stable_ensures_Int RS leadsTo_Basis) 1);
-by (assume_tac 2);
-by (asm_simp_tac
- (simpset() addsimps [Int_Un_distrib RS sym, Diff_Int_distrib RS sym,
- stable_constrains_Int]) 1);
+by (ALLGOALS (asm_full_simp_tac (simpset() addsimps [Diff_Int_distrib])));
+by (blast_tac (claset() addIs [constrains_weaken]) 1);
qed "LeadsTo_Basis";
-Goal "[| LeadsTo(Init,Acts) A B; LeadsTo(Init,Acts) B C |] \
-\ ==> LeadsTo(Init,Acts) A C";
+Goal "[| LeadsTo prg A B; LeadsTo prg B C |] \
+\ ==> LeadsTo prg A C";
by (full_simp_tac (simpset() addsimps [LeadsTo_def]) 1);
by (blast_tac (claset() addIs [leadsTo_Trans]) 1);
qed "LeadsTo_Trans";
val [prem] = goalw thy [LeadsTo_def]
- "(!!A. A : S ==> LeadsTo(Init,Acts) A B) ==> LeadsTo(Init,Acts) (Union S) B";
+ "(!!A. A : S ==> LeadsTo prg A B) ==> LeadsTo prg (Union S) B";
by (Simp_tac 1);
by (stac Int_Union 1);
by (blast_tac (claset() addIs [leadsTo_UN,
@@ -50,42 +46,42 @@
(*** Derived rules ***)
-Goal "id: Acts ==> LeadsTo(Init,Acts) A UNIV";
+Goal "id: (Acts prg) ==> LeadsTo prg A UNIV";
by (asm_simp_tac (simpset() addsimps [LeadsTo_def,
Int_lower1 RS subset_imp_leadsTo]) 1);
qed "LeadsTo_UNIV";
Addsimps [LeadsTo_UNIV];
(*Useful with cancellation, disjunction*)
-Goal "LeadsTo(Init,Acts) A (A' Un A') ==> LeadsTo(Init,Acts) A A'";
+Goal "LeadsTo prg A (A' Un A') ==> LeadsTo prg A A'";
by (asm_full_simp_tac (simpset() addsimps Un_ac) 1);
qed "LeadsTo_Un_duplicate";
-Goal "LeadsTo(Init,Acts) A (A' Un C Un C) ==> LeadsTo(Init,Acts) A (A' Un C)";
+Goal "LeadsTo prg A (A' Un C Un C) ==> LeadsTo prg A (A' Un C)";
by (asm_full_simp_tac (simpset() addsimps Un_ac) 1);
qed "LeadsTo_Un_duplicate2";
val prems = goal thy
- "(!!i. i : I ==> LeadsTo(Init,Acts) (A i) B) \
-\ ==> LeadsTo(Init,Acts) (UN i:I. A i) B";
+ "(!!i. i : I ==> LeadsTo prg (A i) B) \
+\ ==> LeadsTo prg (UN i:I. A i) B";
by (simp_tac (simpset() addsimps [Union_image_eq RS sym]) 1);
by (blast_tac (claset() addIs (LeadsTo_Union::prems)) 1);
qed "LeadsTo_UN";
(*Binary union introduction rule*)
-Goal "[| LeadsTo(Init,Acts) A C; LeadsTo(Init,Acts) B C |] ==> LeadsTo(Init,Acts) (A Un B) C";
+Goal "[| LeadsTo prg A C; LeadsTo prg B C |] ==> LeadsTo prg (A Un B) C";
by (stac Un_eq_Union 1);
by (blast_tac (claset() addIs [LeadsTo_Union]) 1);
qed "LeadsTo_Un";
-Goal "[| reachable(Init,Acts) Int A <= B; id: Acts |] \
-\ ==> LeadsTo(Init,Acts) A B";
+Goal "[| reachable prg Int A <= B; id: (Acts prg) |] \
+\ ==> LeadsTo prg A B";
by (simp_tac (simpset() addsimps [LeadsTo_def]) 1);
by (blast_tac (claset() addIs [subset_imp_leadsTo]) 1);
qed "Int_subset_imp_LeadsTo";
-Goal "[| A <= B; id: Acts |] ==> LeadsTo(Init,Acts) A B";
+Goal "[| A <= B; id: (Acts prg) |] ==> LeadsTo prg A B";
by (simp_tac (simpset() addsimps [LeadsTo_def]) 1);
by (blast_tac (claset() addIs [subset_imp_leadsTo]) 1);
qed "subset_imp_LeadsTo";
@@ -93,61 +89,62 @@
bind_thm ("empty_LeadsTo", empty_subsetI RS subset_imp_LeadsTo);
Addsimps [empty_LeadsTo];
-Goal "[| reachable(Init,Acts) Int A = {}; id: Acts |] \
-\ ==> LeadsTo(Init,Acts) A B";
+Goal "[| reachable prg Int A = {}; id: (Acts prg) |] \
+\ ==> LeadsTo prg A B";
by (asm_simp_tac (simpset() addsimps [Int_subset_imp_LeadsTo]) 1);
qed "Int_empty_LeadsTo";
-Goal "[| LeadsTo(Init,Acts) A A'; \
-\ reachable(Init,Acts) Int A' <= B' |] \
-\ ==> LeadsTo(Init,Acts) A B'";
+Goal "[| LeadsTo prg A A'; \
+\ reachable prg Int A' <= B' |] \
+\ ==> LeadsTo prg A B'";
by (full_simp_tac (simpset() addsimps [LeadsTo_def]) 1);
by (blast_tac (claset() addIs [leadsTo_weaken_R]) 1);
qed_spec_mp "LeadsTo_weaken_R";
-Goal "[| LeadsTo(Init,Acts) A A'; \
-\ reachable(Init,Acts) Int B <= A; id: Acts |] \
-\ ==> LeadsTo(Init,Acts) B A'";
+Goal "[| LeadsTo prg A A'; \
+\ reachable prg Int B <= A; id: (Acts prg) |] \
+\ ==> LeadsTo prg B A'";
by (full_simp_tac (simpset() addsimps [LeadsTo_def]) 1);
by (blast_tac (claset() addIs [leadsTo_weaken_L]) 1);
qed_spec_mp "LeadsTo_weaken_L";
(*Distributes over binary unions*)
-Goal "id: Acts ==> \
-\ LeadsTo(Init,Acts) (A Un B) C = \
-\ (LeadsTo(Init,Acts) A C & LeadsTo(Init,Acts) B C)";
+Goal "id: (Acts prg) ==> \
+\ LeadsTo prg (A Un B) C = \
+\ (LeadsTo prg A C & LeadsTo prg B C)";
by (blast_tac (claset() addIs [LeadsTo_Un, LeadsTo_weaken_L]) 1);
qed "LeadsTo_Un_distrib";
-Goal "id: Acts ==> \
-\ LeadsTo(Init,Acts) (UN i:I. A i) B = \
-\ (ALL i : I. LeadsTo(Init,Acts) (A i) B)";
+Goal "id: (Acts prg) ==> \
+\ LeadsTo prg (UN i:I. A i) B = \
+\ (ALL i : I. LeadsTo prg (A i) B)";
by (blast_tac (claset() addIs [LeadsTo_UN, LeadsTo_weaken_L]) 1);
qed "LeadsTo_UN_distrib";
-Goal "id: Acts ==> \
-\ LeadsTo(Init,Acts) (Union S) B = \
-\ (ALL A : S. LeadsTo(Init,Acts) A B)";
+Goal "id: (Acts prg) ==> \
+\ LeadsTo prg (Union S) B = \
+\ (ALL A : S. LeadsTo prg A B)";
by (blast_tac (claset() addIs [LeadsTo_Union, LeadsTo_weaken_L]) 1);
qed "LeadsTo_Union_distrib";
-Goal "[| LeadsTo(Init,Acts) A A'; id: Acts; \
-\ reachable(Init,Acts) Int B <= A; \
-\ reachable(Init,Acts) Int A' <= B' |] \
-\ ==> LeadsTo(Init,Acts) B B'";
+Goal "[| LeadsTo prg A A'; id: (Acts prg); \
+\ reachable prg Int B <= A; \
+\ reachable prg Int A' <= B' |] \
+\ ==> LeadsTo prg B B'";
(*PROOF FAILED: why?*)
by (blast_tac (claset() addIs [LeadsTo_Trans, LeadsTo_weaken_R,
LeadsTo_weaken_L]) 1);
qed "LeadsTo_weaken";
-(*Set difference: maybe combine with leadsTo_weaken_L??*)
-Goal "[| LeadsTo(Init,Acts) (A-B) C; LeadsTo(Init,Acts) B C; id: Acts |] \
-\ ==> LeadsTo(Init,Acts) A C";
+(*Set difference: maybe combine with leadsTo_weaken_L??
+ This is the most useful form of the "disjunction" rule*)
+Goal "[| LeadsTo prg (A-B) C; LeadsTo prg B C; id: (Acts prg) |] \
+\ ==> LeadsTo prg A C";
by (blast_tac (claset() addIs [LeadsTo_Un, LeadsTo_weaken]) 1);
qed "LeadsTo_Diff";
@@ -156,8 +153,8 @@
see ball_constrains_UN in UNITY.ML***)
val prems = goal thy
- "(!! i. i:I ==> LeadsTo(Init,Acts) (A i) (A' i)) \
-\ ==> LeadsTo(Init,Acts) (UN i:I. A i) (UN i:I. A' i)";
+ "(!! i. i:I ==> LeadsTo prg (A i) (A' i)) \
+\ ==> LeadsTo prg (UN i:I. A i) (UN i:I. A' i)";
by (simp_tac (simpset() addsimps [Union_image_eq RS sym]) 1);
by (blast_tac (claset() addIs [LeadsTo_Union, LeadsTo_weaken_R]
addIs prems) 1);
@@ -166,22 +163,22 @@
(*Version with no index set*)
val prems = goal thy
- "(!! i. LeadsTo(Init,Acts) (A i) (A' i)) \
-\ ==> LeadsTo(Init,Acts) (UN i. A i) (UN i. A' i)";
+ "(!! i. LeadsTo prg (A i) (A' i)) \
+\ ==> LeadsTo prg (UN i. A i) (UN i. A' i)";
by (blast_tac (claset() addIs [LeadsTo_UN_UN]
addIs prems) 1);
qed "LeadsTo_UN_UN_noindex";
(*Version with no index set*)
-Goal "ALL i. LeadsTo(Init,Acts) (A i) (A' i) \
-\ ==> LeadsTo(Init,Acts) (UN i. A i) (UN i. A' i)";
+Goal "ALL i. LeadsTo prg (A i) (A' i) \
+\ ==> LeadsTo prg (UN i. A i) (UN i. A' i)";
by (blast_tac (claset() addIs [LeadsTo_UN_UN]) 1);
qed "all_LeadsTo_UN_UN";
(*Binary union version*)
-Goal "[| LeadsTo(Init,Acts) A A'; LeadsTo(Init,Acts) B B' |] \
-\ ==> LeadsTo(Init,Acts) (A Un B) (A' Un B')";
+Goal "[| LeadsTo prg A A'; LeadsTo prg B B' |] \
+\ ==> LeadsTo prg (A Un B) (A' Un B')";
by (blast_tac (claset() addIs [LeadsTo_Un,
LeadsTo_weaken_R]) 1);
qed "LeadsTo_Un_Un";
@@ -189,28 +186,28 @@
(** The cancellation law **)
-Goal "[| LeadsTo(Init,Acts) A (A' Un B); LeadsTo(Init,Acts) B B'; \
-\ id: Acts |] \
-\ ==> LeadsTo(Init,Acts) A (A' Un B')";
+Goal "[| LeadsTo prg A (A' Un B); LeadsTo prg B B'; \
+\ id: (Acts prg) |] \
+\ ==> LeadsTo prg A (A' Un B')";
by (blast_tac (claset() addIs [LeadsTo_Un_Un,
subset_imp_LeadsTo, LeadsTo_Trans]) 1);
qed "LeadsTo_cancel2";
-Goal "[| LeadsTo(Init,Acts) A (A' Un B); LeadsTo(Init,Acts) (B-A') B'; id: Acts |] \
-\ ==> LeadsTo(Init,Acts) A (A' Un B')";
+Goal "[| LeadsTo prg A (A' Un B); LeadsTo prg (B-A') B'; id: (Acts prg) |] \
+\ ==> LeadsTo prg A (A' Un B')";
by (rtac LeadsTo_cancel2 1);
by (assume_tac 2);
by (ALLGOALS Asm_simp_tac);
qed "LeadsTo_cancel_Diff2";
-Goal "[| LeadsTo(Init,Acts) A (B Un A'); LeadsTo(Init,Acts) B B'; id: Acts |] \
-\ ==> LeadsTo(Init,Acts) A (B' Un A')";
+Goal "[| LeadsTo prg A (B Un A'); LeadsTo prg B B'; id: (Acts prg) |] \
+\ ==> LeadsTo prg A (B' Un A')";
by (asm_full_simp_tac (simpset() addsimps [Un_commute]) 1);
by (blast_tac (claset() addSIs [LeadsTo_cancel2]) 1);
qed "LeadsTo_cancel1";
-Goal "[| LeadsTo(Init,Acts) A (B Un A'); LeadsTo(Init,Acts) (B-A') B'; id: Acts |] \
-\ ==> LeadsTo(Init,Acts) A (B' Un A')";
+Goal "[| LeadsTo prg A (B Un A'); LeadsTo prg (B-A') B'; id: (Acts prg) |] \
+\ ==> LeadsTo prg A (B' Un A')";
by (rtac LeadsTo_cancel1 1);
by (assume_tac 2);
by (ALLGOALS Asm_simp_tac);
@@ -220,7 +217,7 @@
(** The impossibility law **)
-Goal "LeadsTo(Init,Acts) A {} ==> reachable(Init,Acts) Int A = {}";
+Goal "LeadsTo prg A {} ==> reachable prg Int A = {}";
by (full_simp_tac (simpset() addsimps [LeadsTo_def]) 1);
by (etac leadsTo_empty 1);
qed "LeadsTo_empty";
@@ -229,20 +226,20 @@
(** PSP: Progress-Safety-Progress **)
(*Special case of PSP: Misra's "stable conjunction". Doesn't need id:Acts. *)
-Goal "[| LeadsTo(Init,Acts) A A'; stable Acts B |] \
-\ ==> LeadsTo(Init,Acts) (A Int B) (A' Int B)";
+Goal "[| LeadsTo prg A A'; stable (Acts prg) B |] \
+\ ==> LeadsTo prg (A Int B) (A' Int B)";
by (asm_full_simp_tac (simpset() addsimps [LeadsTo_def, Int_assoc RS sym,
PSP_stable]) 1);
qed "R_PSP_stable";
-Goal "[| LeadsTo(Init,Acts) A A'; stable Acts B |] \
-\ ==> LeadsTo(Init,Acts) (B Int A) (B Int A')";
+Goal "[| LeadsTo prg A A'; stable (Acts prg) B |] \
+\ ==> LeadsTo prg (B Int A) (B Int A')";
by (asm_simp_tac (simpset() addsimps (R_PSP_stable::Int_ac)) 1);
qed "R_PSP_stable2";
-Goal "[| LeadsTo(Init,Acts) A A'; constrains Acts B B'; id: Acts |] \
-\ ==> LeadsTo(Init,Acts) (A Int B) ((A' Int B) Un (B' - B))";
+Goal "[| LeadsTo prg A A'; constrains (Acts prg) B B'; id: (Acts prg) |] \
+\ ==> LeadsTo prg (A Int B) ((A' Int B) Un (B' - B))";
by (full_simp_tac (simpset() addsimps [LeadsTo_def]) 1);
by (dtac PSP 1);
by (etac constrains_reachable 1);
@@ -250,14 +247,14 @@
by (ALLGOALS Blast_tac);
qed "R_PSP";
-Goal "[| LeadsTo(Init,Acts) A A'; constrains Acts B B'; id: Acts |] \
-\ ==> LeadsTo(Init,Acts) (B Int A) ((B Int A') Un (B' - B))";
+Goal "[| LeadsTo prg A A'; constrains (Acts prg) B B'; id: (Acts prg) |] \
+\ ==> LeadsTo prg (B Int A) ((B Int A') Un (B' - B))";
by (asm_simp_tac (simpset() addsimps (R_PSP::Int_ac)) 1);
qed "R_PSP2";
Goalw [unless_def]
- "[| LeadsTo(Init,Acts) A A'; unless Acts B B'; id: Acts |] \
-\ ==> LeadsTo(Init,Acts) (A Int B) ((A' Int B) Un B')";
+ "[| LeadsTo prg A A'; unless (Acts prg) B B'; id: (Acts prg) |] \
+\ ==> LeadsTo prg (A Int B) ((A' Int B) Un B')";
by (dtac R_PSP 1);
by (assume_tac 1);
by (asm_full_simp_tac (simpset() addsimps [Un_Diff_Diff, Int_Diff_Un]) 2);
@@ -272,10 +269,10 @@
(** Meta or object quantifier ????? **)
Goal "[| wf r; \
-\ ALL m. LeadsTo(Init,Acts) (A Int f-``{m}) \
+\ ALL m. LeadsTo prg (A Int f-``{m}) \
\ ((A Int f-``(r^-1 ^^ {m})) Un B); \
-\ id: Acts |] \
-\ ==> LeadsTo(Init,Acts) A B";
+\ id: (Acts prg) |] \
+\ ==> LeadsTo prg A B";
by (full_simp_tac (simpset() addsimps [LeadsTo_def]) 1);
by (etac leadsTo_wf_induct 1);
by (assume_tac 2);
@@ -284,10 +281,10 @@
Goal "[| wf r; \
-\ ALL m:I. LeadsTo(Init,Acts) (A Int f-``{m}) \
+\ ALL m:I. LeadsTo prg (A Int f-``{m}) \
\ ((A Int f-``(r^-1 ^^ {m})) Un B); \
-\ id: Acts |] \
-\ ==> LeadsTo(Init,Acts) A ((A - (f-``I)) Un B)";
+\ id: (Acts prg) |] \
+\ ==> LeadsTo prg A ((A - (f-``I)) Un B)";
by (etac LeadsTo_wf_induct 1);
by Safe_tac;
by (case_tac "m:I" 1);
@@ -296,29 +293,29 @@
qed "R_bounded_induct";
-Goal "[| ALL m. LeadsTo(Init,Acts) (A Int f-``{m}) \
-\ ((A Int f-``(lessThan m)) Un B); \
-\ id: Acts |] \
-\ ==> LeadsTo(Init,Acts) A B";
+Goal "[| ALL m. LeadsTo prg (A Int f-``{m}) \
+\ ((A Int f-``(lessThan m)) Un B); \
+\ id: (Acts prg) |] \
+\ ==> LeadsTo prg A B";
by (rtac (wf_less_than RS LeadsTo_wf_induct) 1);
by (assume_tac 2);
by (Asm_simp_tac 1);
qed "R_lessThan_induct";
-Goal "[| ALL m:(greaterThan l). LeadsTo(Init,Acts) (A Int f-``{m}) \
+Goal "[| ALL m:(greaterThan l). LeadsTo prg (A Int f-``{m}) \
\ ((A Int f-``(lessThan m)) Un B); \
-\ id: Acts |] \
-\ ==> LeadsTo(Init,Acts) A ((A Int (f-``(atMost l))) Un B)";
+\ id: (Acts prg) |] \
+\ ==> LeadsTo prg A ((A Int (f-``(atMost l))) Un B)";
by (simp_tac (HOL_ss addsimps [Diff_eq RS sym, vimage_Compl, Compl_greaterThan RS sym]) 1);
by (rtac (wf_less_than RS R_bounded_induct) 1);
by (assume_tac 2);
by (Asm_simp_tac 1);
qed "R_lessThan_bounded_induct";
-Goal "[| ALL m:(lessThan l). LeadsTo(Init,Acts) (A Int f-``{m}) \
+Goal "[| ALL m:(lessThan l). LeadsTo prg (A Int f-``{m}) \
\ ((A Int f-``(greaterThan m)) Un B); \
-\ id: Acts |] \
-\ ==> LeadsTo(Init,Acts) A ((A Int (f-``(atLeast l))) Un B)";
+\ id: (Acts prg) |] \
+\ ==> LeadsTo prg A ((A Int (f-``(atLeast l))) Un B)";
by (res_inst_tac [("f","f"),("f1", "%k. l - k")]
(wf_less_than RS wf_inv_image RS LeadsTo_wf_induct) 1);
by (assume_tac 2);
@@ -333,19 +330,19 @@
(*** Completion: Binary and General Finite versions ***)
-Goal "[| LeadsTo(Init,Acts) A A'; stable Acts A'; \
-\ LeadsTo(Init,Acts) B B'; stable Acts B'; id: Acts |] \
-\ ==> LeadsTo(Init,Acts) (A Int B) (A' Int B')";
+Goal "[| LeadsTo prg A A'; stable (Acts prg) A'; \
+\ LeadsTo prg B B'; stable (Acts prg) B'; id: (Acts prg) |] \
+\ ==> LeadsTo prg (A Int B) (A' Int B')";
by (full_simp_tac (simpset() addsimps [LeadsTo_def]) 1);
by (blast_tac (claset() addIs [stable_completion RS leadsTo_weaken]
addSIs [stable_Int, stable_reachable]) 1);
qed "R_stable_completion";
-Goal "[| finite I; id: Acts |] \
-\ ==> (ALL i:I. LeadsTo(Init,Acts) (A i) (A' i)) --> \
-\ (ALL i:I. stable Acts (A' i)) --> \
-\ LeadsTo(Init,Acts) (INT i:I. A i) (INT i:I. A' i)";
+Goal "[| finite I; id: (Acts prg) |] \
+\ ==> (ALL i:I. LeadsTo prg (A i) (A' i)) --> \
+\ (ALL i:I. stable (Acts prg) (A' i)) --> \
+\ LeadsTo prg (INT i:I. A i) (INT i:I. A' i)";
by (etac finite_induct 1);
by (Asm_simp_tac 1);
by (asm_simp_tac
@@ -354,10 +351,10 @@
qed_spec_mp "R_finite_stable_completion";
-Goal "[| LeadsTo(Init,Acts) A (A' Un C); constrains Acts A' (A' Un C); \
-\ LeadsTo(Init,Acts) B (B' Un C); constrains Acts B' (B' Un C); \
-\ id: Acts |] \
-\ ==> LeadsTo(Init,Acts) (A Int B) ((A' Int B') Un C)";
+Goal "[| LeadsTo prg A (A' Un C); constrains (Acts prg) A' (A' Un C); \
+\ LeadsTo prg B (B' Un C); constrains (Acts prg) B' (B' Un C); \
+\ id: (Acts prg) |] \
+\ ==> LeadsTo prg (A Int B) ((A' Int B') Un C)";
by (full_simp_tac (simpset() addsimps [LeadsTo_def, Int_Un_distrib]) 1);
by (dtac completion 1);
by (assume_tac 2);
@@ -368,10 +365,10 @@
qed "R_completion";
-Goal "[| finite I; id: Acts |] \
-\ ==> (ALL i:I. LeadsTo(Init,Acts) (A i) (A' i Un C)) --> \
-\ (ALL i:I. constrains Acts (A' i) (A' i Un C)) --> \
-\ LeadsTo(Init,Acts) (INT i:I. A i) ((INT i:I. A' i) Un C)";
+Goal "[| finite I; id: (Acts prg) |] \
+\ ==> (ALL i:I. LeadsTo prg (A i) (A' i Un C)) --> \
+\ (ALL i:I. constrains (Acts prg) (A' i) (A' i Un C)) --> \
+\ LeadsTo prg (INT i:I. A i) ((INT i:I. A' i) Un C)";
by (etac finite_induct 1);
by (ALLGOALS Asm_simp_tac);
by (Clarify_tac 1);
@@ -384,32 +381,37 @@
(*** Specialized laws for handling invariants ***)
Goalw [transient_def]
- "[| reachable(Init,Acts) <= INV; transient Acts (INV Int A) |] \
-\ ==> transient Acts (reachable(Init,Acts) Int A)";
+ "[| reachable prg <= INV; transient (Acts prg) (INV Int A) |] \
+\ ==> transient (Acts prg) (reachable prg Int A)";
by (Clarify_tac 1);
by (rtac bexI 1);
by (assume_tac 2);
by (Blast_tac 1);
qed "reachable_transient";
-(*Uses the premise "invariant (Init,Acts)". Raw theorem-proving on this
+(*Uses the premise "invariant prg". Raw theorem-proving on this
inclusion is slow: the term contains a copy of the program.*)
-Goal "[| invariant (Init,Acts) INV; \
-\ constrains Acts (INV Int (A - A')) (A Un A'); \
-\ transient Acts (INV Int (A-A')) |] \
-\ ==> LeadsTo(Init,Acts) A A'";
+Goal "[| invariant prg INV; \
+\ constrains (Acts prg) (INV Int (A-A')) (A Un A'); \
+\ transient (Acts prg) (INV Int (A-A')) |] \
+\ ==> ensures (Acts prg) (reachable prg Int A) (reachable prg Int A')";
bd invariant_includes_reachable 1;
-by (rtac LeadsTo_Basis 1);
+by (rtac ensuresI 1);
+by (ALLGOALS
+ (full_simp_tac (simpset() addsimps [Int_Un_distrib RS sym,
+ Diff_Int_distrib RS sym])));
by (blast_tac (claset() addSIs [reachable_transient]) 2);
-by (rewtac constrains_def);
-by (Blast_tac 1);
-qed "invariant_LeadsTo_Basis";
+br (stable_reachable RS stable_constrains_Int) 1;
+by (blast_tac (claset() addIs [constrains_weaken]) 1);
+qed "invariant_ensuresI";
+
+bind_thm ("invariant_LeadsTo_Basis", invariant_ensuresI RS LeadsTo_Basis);
-Goal "[| invariant (Init,Acts) INV; \
-\ LeadsTo(Init,Acts) A A'; id: Acts; \
+Goal "[| invariant prg INV; \
+\ LeadsTo prg A A'; id: (Acts prg); \
\ INV Int B <= A; INV Int A' <= B' |] \
-\ ==> LeadsTo(Init,Acts) B B'";
+\ ==> LeadsTo prg B B'";
by (blast_tac (claset() addDs [invariant_includes_reachable]
addIs [LeadsTo_weaken]) 1);
qed "invariant_LeadsTo_weaken";
@@ -425,8 +427,8 @@
SELECT_GOAL
(EVERY [TRY (rtac stableI 1),
rtac constrainsI 1,
- rewtac main_def,
- REPEAT_FIRST (eresolve_tac [insertE, emptyE]),
+ full_simp_tac (simpset() addsimps [main_def]) 1,
+ REPEAT_FIRST (eresolve_tac [disjE]),
rewrite_goals_tac cmd_defs,
ALLGOALS (SELECT_GOAL Auto_tac)]);
--- a/src/HOL/UNITY/SubstAx.thy Wed Aug 05 10:56:58 1998 +0200
+++ b/src/HOL/UNITY/SubstAx.thy Wed Aug 05 10:57:25 1998 +0200
@@ -10,10 +10,9 @@
constdefs
- LeadsTo :: "['a set * ('a * 'a)set set, 'a set, 'a set] => bool"
- "LeadsTo == %(Init,Acts) A B.
- leadsTo Acts (reachable (Init,Acts) Int A)
- (reachable (Init,Acts) Int B)"
-
-
+ LeadsTo :: "['a program, 'a set, 'a set] => bool"
+ "LeadsTo prg A B ==
+ leadsTo (Acts prg)
+ (reachable prg Int A)
+ (reachable prg Int B)"
end
--- a/src/HOL/UNITY/Token.ML Wed Aug 05 10:56:58 1998 +0200
+++ b/src/HOL/UNITY/Token.ML Wed Aug 05 10:57:25 1998 +0200
@@ -23,7 +23,7 @@
qed "not_E_eq";
(*This proof is in the "massaging" style and is much faster! *)
-Goalw [stable_def] "stable Acts (Compl(E i) Un (HasTok i))";
+Goalw [stable_def] "stable acts (Compl(E i) Un (HasTok i))";
by (rtac constrains_weaken 1);
by (rtac ([[TR2, TR4] MRS constrains_Un, TR5] MRS constrains_Un) 1);
by (auto_tac (claset(), simpset() addsimps [not_E_eq]));
@@ -77,7 +77,7 @@
(*From "A Logic for Concurrent Programming", but not used in Chapter 4.
Note the use of case_tac. Reasoning about leadsTo takes practice!*)
Goal "[| i<N; j<N |] ==> \
-\ leadsTo Acts (HasTok i) ({s. (token s, i) : nodeOrder j} Un HasTok j)";
+\ leadsTo acts (HasTok i) ({s. (token s, i) : nodeOrder j} Un HasTok j)";
by (case_tac "i=j" 1);
by (blast_tac (claset() addIs [subset_imp_leadsTo]) 1);
by (rtac (TR7 RS leadsTo_weaken_R) 1);
@@ -88,7 +88,7 @@
(*Chapter 4 variant, the one actually used below.*)
Goal "[| i<N; j<N; i~=j |] \
-\ ==> leadsTo Acts (HasTok i) {s. (token s, i) : nodeOrder j}";
+\ ==> leadsTo acts (HasTok i) {s. (token s, i) : nodeOrder j}";
by (rtac (TR7 RS leadsTo_weaken_R) 1);
by (Clarify_tac 1);
by (asm_full_simp_tac (simpset() addsimps [HasTok_def, nodeOrder_eq]) 1);
@@ -101,7 +101,7 @@
(*Misra's TR9: the token reaches an arbitrary node*)
-Goal "j<N ==> leadsTo Acts {s. token s < N} (HasTok j)";
+Goal "j<N ==> leadsTo acts {s. token s < N} (HasTok j)";
by (rtac leadsTo_weaken_R 1);
by (res_inst_tac [("I", "Compl{j}"), ("f", "token"), ("B", "{}")]
(wf_nodeOrder RS bounded_induct) 1);
@@ -115,7 +115,7 @@
qed "leadsTo_j";
(*Misra's TR8: a hungry process eventually eats*)
-Goal "j<N ==> leadsTo Acts ({s. token s < N} Int H j) (E j)";
+Goal "j<N ==> leadsTo acts ({s. token s < N} Int H j) (E j)";
by (rtac (leadsTo_cancel1 RS leadsTo_Un_duplicate) 1);
by (rtac TR6 2);
by (rtac leadsTo_weaken_R 1);
--- a/src/HOL/UNITY/Token.thy Wed Aug 05 10:56:58 1998 +0200
+++ b/src/HOL/UNITY/Token.thy Wed Aug 05 10:57:25 1998 +0200
@@ -44,18 +44,18 @@
rules
N_positive "0<N"
- skip "id: Acts"
+ skip "id: acts"
- TR2 "constrains Acts (T i) (T i Un H i)"
+ TR2 "constrains acts (T i) (T i Un H i)"
- TR3 "constrains Acts (H i) (H i Un E i)"
+ TR3 "constrains acts (H i) (H i Un E i)"
- TR4 "constrains Acts (H i - HasTok i) (H i)"
+ TR4 "constrains acts (H i - HasTok i) (H i)"
- TR5 "constrains Acts (HasTok i) (HasTok i Un Compl(E i))"
+ TR5 "constrains acts (HasTok i) (HasTok i Un Compl(E i))"
- TR6 "leadsTo Acts (H i Int HasTok i) (E i)"
+ TR6 "leadsTo acts (H i Int HasTok i) (E i)"
- TR7 "leadsTo Acts (HasTok i) (HasTok (next i))"
+ TR7 "leadsTo acts (HasTok i) (HasTok (next i))"
end
--- a/src/HOL/UNITY/Traces.ML Wed Aug 05 10:56:58 1998 +0200
+++ b/src/HOL/UNITY/Traces.ML Wed Aug 05 10:57:25 1998 +0200
@@ -9,74 +9,25 @@
*)
-(****
-Now simulate the inductive definition (illegal due to paired arguments)
-
-inductive "reachable(Init,Acts)"
- intrs
- Init "s: Init ==> s : reachable(Init,Acts)"
-
- Acts "[| act: Acts; s : reachable(Init,Acts); (s,s'): act |]
- ==> s' : reachable(Init,Acts)"
-
-This amounts to an equivalence proof for the definition actually used,
-****)
-
-
-(** reachable: Deriving the Introduction rules **)
-
-Goal "s: Init ==> s : reachable(Init,Acts)";
-by (simp_tac (simpset() addsimps [reachable_def]) 1);
-by (blast_tac (claset() addIs traces.intrs) 1);
-qed "reachable_Init";
-
+Goal "reachable prg = {s. EX evs. (s,evs): traces (Init prg) (Acts prg)}";
+by Safe_tac;
+by (etac traces.induct 2);
+be reachable.induct 1;
+by (ALLGOALS (blast_tac (claset() addIs (reachable.intrs @ traces.intrs))));
+qed "reachable_equiv_traces";
-Goal "[| act: Acts; s : reachable(Init,Acts) |] \
-\ ==> (s,s'): act --> s' : reachable(Init,Acts)";
-by (asm_full_simp_tac (simpset() addsimps [reachable_def]) 1);
-by (etac exE 1);
-by (etac traces.induct 1);
-by (ALLGOALS Asm_simp_tac);
-by (ALLGOALS (blast_tac (claset() addIs traces.intrs)));
-qed_spec_mp "reachable_Acts";
-
-
-val major::prems =
-Goalw [reachable_def]
- "[| za : reachable(Init,Acts); \
-\ !!s. s : Init ==> P s; \
-\ !!act s s'. \
-\ [| act : Acts; s : reachable(Init,Acts); P s; (s, s') : act |] \
-\ ==> P s' |] \
-\ ==> P za";
-by (cut_facts_tac [major] 1);
-by Auto_tac;
-by (etac traces.induct 1);
-by (ALLGOALS (blast_tac (claset() addIs prems)));
-qed "reachable_induct";
-
-structure reachable =
- struct
- val Init = reachable_Init
- val Acts = reachable_Acts
- val intrs = [reachable_Init, reachable_Acts]
- val induct = reachable_induct
- end;
-
-
-
-Goal "stable Acts (reachable(Init,Acts))";
+Goal "stable (Acts prg) (reachable prg)";
by (blast_tac (claset() addIs ([stableI, constrainsI] @ reachable.intrs)) 1);
qed "stable_reachable";
(*The set of all reachable states is an invariant...*)
-Goal "invariant (Init,Acts) (reachable(Init,Acts))";
+Goal "invariant prg (reachable prg)";
by (simp_tac (simpset() addsimps [invariant_def]) 1);
by (blast_tac (claset() addIs (stable_reachable::reachable.intrs)) 1);
qed "invariant_reachable";
(*...in fact the strongest invariant!*)
-Goal "invariant (Init,Acts) A ==> reachable(Init,Acts) <= A";
+Goal "invariant prg A ==> reachable prg <= A";
by (full_simp_tac
(simpset() addsimps [stable_def, constrains_def, invariant_def]) 1);
by (rtac subsetI 1);
@@ -86,15 +37,15 @@
(*If "A" includes the initial states and is stable then "A" is invariant.
Result is trivial from the definition, but it is handy.*)
-Goal "[| Init<=A; stable Acts A |] ==> invariant (Init,Acts) A";
+Goal "[| (Init prg)<=A; stable (Acts prg) A |] ==> invariant prg A";
by (asm_simp_tac (simpset() addsimps [invariant_def]) 1);
qed "invariantI";
(** Conjoining invariants **)
-Goal "[| invariant (Init,Acts) A; invariant (Init,Acts) B |] \
-\ ==> invariant (Init,Acts) (A Int B)";
+Goal "[| invariant prg A; invariant prg B |] \
+\ ==> invariant prg (A Int B)";
by (asm_full_simp_tac (simpset() addsimps [invariant_def, stable_Int]) 1);
by Auto_tac;
qed "invariant_Int";
--- a/src/HOL/UNITY/Traces.thy Wed Aug 05 10:56:58 1998 +0200
+++ b/src/HOL/UNITY/Traces.thy Wed Aug 05 10:57:25 1998 +0200
@@ -24,11 +24,22 @@
==> (s', s#evs) : traces Init Acts"
+record 'a program =
+ Init :: 'a set
+ Acts :: "('a * 'a)set set"
+
+
+consts reachable :: "'a program => 'a set"
+
+inductive "reachable prg"
+ intrs
+ Init "s: Init prg ==> s : reachable prg"
+
+ Acts "[| act: Acts prg; s : reachable prg; (s,s'): act |]
+ ==> s' : reachable prg"
+
constdefs
- reachable :: "'a set * ('a * 'a)set set => 'a set"
- "reachable == %(Init,Acts). {s. EX evs. (s,evs): traces Init Acts}"
-
- invariant :: "['a set * ('a * 'a)set set, 'a set] => bool"
- "invariant == %(Init,Acts) A. Init <= A & stable Acts A"
+ invariant :: "['a program, 'a set] => bool"
+ "invariant prg A == (Init prg) <= A & stable (Acts prg) A"
end
--- a/src/HOL/UNITY/UNITY.ML Wed Aug 05 10:56:58 1998 +0200
+++ b/src/HOL/UNITY/UNITY.ML Wed Aug 05 10:57:25 1998 +0200
@@ -15,97 +15,97 @@
(*** constrains ***)
val prems = goalw thy [constrains_def]
- "(!!act s s'. [| act: Acts; (s,s') : act; s: A |] ==> s': A') \
-\ ==> constrains Acts A A'";
+ "(!!act s s'. [| act: acts; (s,s') : act; s: A |] ==> s': A') \
+\ ==> constrains acts A A'";
by (blast_tac (claset() addIs prems) 1);
qed "constrainsI";
Goalw [constrains_def]
- "[| constrains Acts A A'; act: Acts; (s,s'): act; s: A |] \
+ "[| constrains acts A A'; act: acts; (s,s'): act; s: A |] \
\ ==> s': A'";
by (Blast_tac 1);
qed "constrainsD";
-Goalw [constrains_def] "constrains Acts {} B";
+Goalw [constrains_def] "constrains acts {} B";
by (Blast_tac 1);
qed "constrains_empty";
-Goalw [constrains_def] "constrains Acts A UNIV";
+Goalw [constrains_def] "constrains acts A UNIV";
by (Blast_tac 1);
qed "constrains_UNIV";
AddIffs [constrains_empty, constrains_UNIV];
Goalw [constrains_def]
- "[| constrains Acts A A'; A'<=B' |] ==> constrains Acts A B'";
+ "[| constrains acts A A'; A'<=B' |] ==> constrains acts A B'";
by (Blast_tac 1);
qed "constrains_weaken_R";
Goalw [constrains_def]
- "[| constrains Acts A A'; B<=A |] ==> constrains Acts B A'";
+ "[| constrains acts A A'; B<=A |] ==> constrains acts B A'";
by (Blast_tac 1);
qed "constrains_weaken_L";
Goalw [constrains_def]
- "[| constrains Acts A A'; B<=A; A'<=B' |] ==> constrains Acts B B'";
+ "[| constrains acts A A'; B<=A; A'<=B' |] ==> constrains acts B B'";
by (Blast_tac 1);
qed "constrains_weaken";
(*Set difference: UNUSED*)
Goalw [constrains_def]
- "[| constrains Acts (A-B) C; constrains Acts B C |] \
-\ ==> constrains Acts A C";
+ "[| constrains acts (A-B) C; constrains acts B C |] \
+\ ==> constrains acts A C";
by (Blast_tac 1);
qed "constrains_Diff";
(** Union **)
Goalw [constrains_def]
- "[| constrains Acts A A'; constrains Acts B B' |] \
-\ ==> constrains Acts (A Un B) (A' Un B')";
+ "[| constrains acts A A'; constrains acts B B' |] \
+\ ==> constrains acts (A Un B) (A' Un B')";
by (Blast_tac 1);
qed "constrains_Un";
Goalw [constrains_def]
- "ALL i:I. constrains Acts (A i) (A' i) \
-\ ==> constrains Acts (UN i:I. A i) (UN i:I. A' i)";
+ "ALL i:I. constrains acts (A i) (A' i) \
+\ ==> constrains acts (UN i:I. A i) (UN i:I. A' i)";
by (Blast_tac 1);
qed "ball_constrains_UN";
Goalw [constrains_def]
- "[| ALL i. constrains Acts (A i) (A' i) |] \
-\ ==> constrains Acts (UN i. A i) (UN i. A' i)";
+ "[| ALL i. constrains acts (A i) (A' i) |] \
+\ ==> constrains acts (UN i. A i) (UN i. A' i)";
by (Blast_tac 1);
qed "all_constrains_UN";
(** Intersection **)
Goalw [constrains_def]
- "[| constrains Acts A A'; constrains Acts B B' |] \
-\ ==> constrains Acts (A Int B) (A' Int B')";
+ "[| constrains acts A A'; constrains acts B B' |] \
+\ ==> constrains acts (A Int B) (A' Int B')";
by (Blast_tac 1);
qed "constrains_Int";
Goalw [constrains_def]
- "ALL i:I. constrains Acts (A i) (A' i) \
-\ ==> constrains Acts (INT i:I. A i) (INT i:I. A' i)";
+ "ALL i:I. constrains acts (A i) (A' i) \
+\ ==> constrains acts (INT i:I. A i) (INT i:I. A' i)";
by (Blast_tac 1);
qed "ball_constrains_INT";
Goalw [constrains_def]
- "[| ALL i. constrains Acts (A i) (A' i) |] \
-\ ==> constrains Acts (INT i. A i) (INT i. A' i)";
+ "[| ALL i. constrains acts (A i) (A' i) |] \
+\ ==> constrains acts (INT i. A i) (INT i. A' i)";
by (Blast_tac 1);
qed "all_constrains_INT";
Goalw [stable_def, constrains_def]
- "[| stable Acts C; constrains Acts A (C Un A') |] \
-\ ==> constrains Acts (C Un A) (C Un A')";
+ "[| stable acts C; constrains acts A (C Un A') |] \
+\ ==> constrains acts (C Un A) (C Un A')";
by (Blast_tac 1);
qed "stable_constrains_Un";
Goalw [stable_def, constrains_def]
- "[| stable Acts C; constrains Acts (C Int A) A' |] \
-\ ==> constrains Acts (C Int A) (C Int A')";
+ "[| stable acts C; constrains acts (C Int A) A' |] \
+\ ==> constrains acts (C Int A) (C Int A')";
by (Blast_tac 1);
qed "stable_constrains_Int";
@@ -113,36 +113,36 @@
(*** stable ***)
Goalw [stable_def]
- "constrains Acts A A ==> stable Acts A";
+ "constrains acts A A ==> stable acts A";
by (assume_tac 1);
qed "stableI";
Goalw [stable_def]
- "stable Acts A ==> constrains Acts A A";
+ "stable acts A ==> constrains acts A A";
by (assume_tac 1);
qed "stableD";
Goalw [stable_def]
- "[| stable Acts A; stable Acts A' |] \
-\ ==> stable Acts (A Un A')";
+ "[| stable acts A; stable acts A' |] \
+\ ==> stable acts (A Un A')";
by (blast_tac (claset() addIs [constrains_Un]) 1);
qed "stable_Un";
Goalw [stable_def]
- "[| stable Acts A; stable Acts A' |] \
-\ ==> stable Acts (A Int A')";
+ "[| stable acts A; stable acts A' |] \
+\ ==> stable acts (A Int A')";
by (blast_tac (claset() addIs [constrains_Int]) 1);
qed "stable_Int";
Goalw [constrains_def]
- "[| constrains Acts A A'; id: Acts |] ==> A<=A'";
+ "[| constrains acts A A'; id: acts |] ==> A<=A'";
by (Blast_tac 1);
qed "constrains_imp_subset";
Goalw [constrains_def]
- "[| id: Acts; constrains Acts A B; constrains Acts B C |] \
-\ ==> constrains Acts A C";
+ "[| id: acts; constrains acts A B; constrains acts B C |] \
+\ ==> constrains acts A C";
by (Blast_tac 1);
qed "constrains_trans";
@@ -151,23 +151,23 @@
Should the premise be !!m instead of ALL m ? Would make it harder to use
in forward proof.*)
Goalw [constrains_def]
- "[| ALL m. constrains Acts {s. s x = m} (B m) |] \
-\ ==> constrains Acts {s. P(s x)} (UN m. {s. P(m)} Int B m)";
+ "[| ALL m. constrains acts {s. s x = m} (B m) |] \
+\ ==> constrains acts {s. P(s x)} (UN m. {s. P(m)} Int B m)";
by (Blast_tac 1);
qed "elimination";
(*As above, but for the trivial case of a one-variable state, in which the
state is identified with its one variable.*)
Goalw [constrains_def]
- "[| ALL m. constrains Acts {m} (B m) |] \
-\ ==> constrains Acts {s. P s} (UN m. {s. P(m)} Int B m)";
+ "[| ALL m. constrains acts {m} (B m) |] \
+\ ==> constrains acts {s. P s} (UN m. {s. P(m)} Int B m)";
by (Blast_tac 1);
qed "elimination_sing";
Goalw [constrains_def]
- "[| constrains Acts A (A' Un B); constrains Acts B B'; id: Acts |] \
-\ ==> constrains Acts A (A' Un B')";
+ "[| constrains acts A (A' Un B); constrains acts B B'; id: acts |] \
+\ ==> constrains acts A (A' Un B')";
by (Blast_tac 1);
qed "constrains_cancel";
@@ -176,11 +176,11 @@
(*** Theoretical Results from Section 6 ***)
Goalw [constrains_def, strongest_rhs_def]
- "constrains Acts A (strongest_rhs Acts A )";
+ "constrains acts A (strongest_rhs acts A )";
by (Blast_tac 1);
qed "constrains_strongest_rhs";
Goalw [constrains_def, strongest_rhs_def]
- "constrains Acts A B ==> strongest_rhs Acts A <= B";
+ "constrains acts A B ==> strongest_rhs acts A <= B";
by (Blast_tac 1);
qed "strongest_rhs_is_strongest";
--- a/src/HOL/UNITY/UNITY.thy Wed Aug 05 10:56:58 1998 +0200
+++ b/src/HOL/UNITY/UNITY.thy Wed Aug 05 10:57:25 1998 +0200
@@ -13,15 +13,15 @@
constdefs
constrains :: "[('a * 'a)set set, 'a set, 'a set] => bool"
- "constrains Acts A B == ALL act:Acts. act^^A <= B"
+ "constrains acts A B == ALL act:acts. act^^A <= B"
stable :: "('a * 'a)set set => 'a set => bool"
- "stable Acts A == constrains Acts A A"
+ "stable acts A == constrains acts A A"
strongest_rhs :: "[('a * 'a)set set, 'a set] => 'a set"
- "strongest_rhs Acts A == Inter {B. constrains Acts A B}"
+ "strongest_rhs acts A == Inter {B. constrains acts A B}"
unless :: "[('a * 'a)set set, 'a set, 'a set] => bool"
- "unless Acts A B == constrains Acts (A-B) (A Un B)"
+ "unless acts A B == constrains acts (A-B) (A Un B)"
end
--- a/src/HOL/UNITY/WFair.ML Wed Aug 05 10:56:58 1998 +0200
+++ b/src/HOL/UNITY/WFair.ML Wed Aug 05 10:57:25 1998 +0200
@@ -12,20 +12,20 @@
(*** transient ***)
Goalw [stable_def, constrains_def, transient_def]
- "[| stable Acts A; transient Acts A |] ==> A = {}";
+ "[| stable acts A; transient acts A |] ==> A = {}";
by (Blast_tac 1);
qed "stable_transient_empty";
Goalw [transient_def]
- "[| transient Acts A; B<=A |] ==> transient Acts B";
+ "[| transient acts A; B<=A |] ==> transient acts B";
by (Clarify_tac 1);
by (rtac bexI 1 THEN assume_tac 2);
by (Blast_tac 1);
qed "transient_strengthen";
Goalw [transient_def]
- "[| act:Acts; A <= Domain act; act^^A <= Compl A |] \
-\ ==> transient Acts A";
+ "[| act:acts; A <= Domain act; act^^A <= Compl A |] \
+\ ==> transient acts A";
by (Blast_tac 1);
qed "transient_mem";
@@ -33,34 +33,34 @@
(*** ensures ***)
Goalw [ensures_def]
- "[| constrains Acts (A-B) (A Un B); transient Acts (A-B) |] \
-\ ==> ensures Acts A B";
+ "[| constrains acts (A-B) (A Un B); transient acts (A-B) |] \
+\ ==> ensures acts A B";
by (Blast_tac 1);
qed "ensuresI";
Goalw [ensures_def]
- "ensures Acts A B \
-\ ==> constrains Acts (A-B) (A Un B) & transient Acts (A-B)";
+ "ensures acts A B \
+\ ==> constrains acts (A-B) (A Un B) & transient acts (A-B)";
by (Blast_tac 1);
qed "ensuresD";
(*The L-version (precondition strengthening) doesn't hold for ENSURES*)
Goalw [ensures_def]
- "[| ensures Acts A A'; A'<=B' |] ==> ensures Acts A B'";
+ "[| ensures acts A A'; A'<=B' |] ==> ensures acts A B'";
by (blast_tac (claset() addIs [constrains_weaken, transient_strengthen]) 1);
qed "ensures_weaken_R";
Goalw [ensures_def, constrains_def, transient_def]
- "Acts ~= {} ==> ensures Acts A UNIV";
+ "acts ~= {} ==> ensures acts A UNIV";
by (Asm_simp_tac 1); (*omitting this causes PROOF FAILED, even with Safe_tac*)
by (Blast_tac 1);
qed "ensures_UNIV";
Goalw [ensures_def]
- "[| stable Acts C; \
-\ constrains Acts (C Int (A - A')) (A Un A'); \
-\ transient Acts (C Int (A-A')) |] \
-\ ==> ensures Acts (C Int A) (C Int A')";
+ "[| stable acts C; \
+\ constrains acts (C Int (A - A')) (A Un A'); \
+\ transient acts (C Int (A-A')) |] \
+\ ==> ensures acts (C Int A) (C Int A')";
by (asm_simp_tac (simpset() addsimps [Int_Un_distrib RS sym,
Diff_Int_distrib RS sym,
stable_constrains_Int]) 1);
@@ -73,34 +73,34 @@
bind_thm ("leadsTo_Basis", leadsto.Basis);
bind_thm ("leadsTo_Trans", leadsto.Trans);
-Goal "act: Acts ==> leadsTo Acts A UNIV";
+Goal "act: acts ==> leadsTo acts A UNIV";
by (blast_tac (claset() addIs [ensures_UNIV RS leadsTo_Basis]) 1);
qed "leadsTo_UNIV";
Addsimps [leadsTo_UNIV];
(*Useful with cancellation, disjunction*)
-Goal "leadsTo Acts A (A' Un A') ==> leadsTo Acts A A'";
+Goal "leadsTo acts A (A' Un A') ==> leadsTo acts A A'";
by (asm_full_simp_tac (simpset() addsimps Un_ac) 1);
qed "leadsTo_Un_duplicate";
-Goal "leadsTo Acts A (A' Un C Un C) ==> leadsTo Acts A (A' Un C)";
+Goal "leadsTo acts A (A' Un C Un C) ==> leadsTo acts A (A' Un C)";
by (asm_full_simp_tac (simpset() addsimps Un_ac) 1);
qed "leadsTo_Un_duplicate2";
(*The Union introduction rule as we should have liked to state it*)
val prems = goal thy
- "(!!A. A : S ==> leadsTo Acts A B) ==> leadsTo Acts (Union S) B";
+ "(!!A. A : S ==> leadsTo acts A B) ==> leadsTo acts (Union S) B";
by (blast_tac (claset() addIs (leadsto.Union::prems)) 1);
qed "leadsTo_Union";
val prems = goal thy
- "(!!i. i : I ==> leadsTo Acts (A i) B) ==> leadsTo Acts (UN i:I. A i) B";
+ "(!!i. i : I ==> leadsTo acts (A i) B) ==> leadsTo acts (UN i:I. A i) B";
by (simp_tac (simpset() addsimps [Union_image_eq RS sym]) 1);
by (blast_tac (claset() addIs (leadsto.Union::prems)) 1);
qed "leadsTo_UN";
(*Binary union introduction rule*)
-Goal "[| leadsTo Acts A C; leadsTo Acts B C |] ==> leadsTo Acts (A Un B) C";
+Goal "[| leadsTo acts A C; leadsTo acts B C |] ==> leadsTo acts (A Un B) C";
by (stac Un_eq_Union 1);
by (blast_tac (claset() addIs [leadsTo_Union]) 1);
qed "leadsTo_Un";
@@ -108,18 +108,18 @@
(*The INDUCTION rule as we should have liked to state it*)
val major::prems = goal thy
- "[| leadsTo Acts za zb; \
-\ !!A B. ensures Acts A B ==> P A B; \
-\ !!A B C. [| leadsTo Acts A B; P A B; leadsTo Acts B C; P B C |] \
+ "[| leadsTo acts za zb; \
+\ !!A B. ensures acts A B ==> P A B; \
+\ !!A B C. [| leadsTo acts A B; P A B; leadsTo acts B C; P B C |] \
\ ==> P A C; \
-\ !!B S. ALL A:S. leadsTo Acts A B & P A B ==> P (Union S) B \
+\ !!B S. ALL A:S. leadsTo acts A B & P A B ==> P (Union S) B \
\ |] ==> P za zb";
by (rtac (major RS leadsto.induct) 1);
by (REPEAT (blast_tac (claset() addIs prems) 1));
qed "leadsTo_induct";
-Goal "[| A<=B; id: Acts |] ==> leadsTo Acts A B";
+Goal "[| A<=B; id: acts |] ==> leadsTo acts A B";
by (rtac leadsTo_Basis 1);
by (rewrite_goals_tac [ensures_def, constrains_def, transient_def]);
by (Blast_tac 1);
@@ -130,8 +130,8 @@
(*There's a direct proof by leadsTo_Trans and subset_imp_leadsTo, but it
- needs the extra premise id:Acts*)
-Goal "leadsTo Acts A A' ==> A'<=B' --> leadsTo Acts A B'";
+ needs the extra premise id:acts*)
+Goal "leadsTo acts A A' ==> A'<=B' --> leadsTo acts A B'";
by (etac leadsTo_induct 1);
by (Clarify_tac 3);
by (blast_tac (claset() addIs [leadsTo_Union]) 3);
@@ -140,31 +140,31 @@
qed_spec_mp "leadsTo_weaken_R";
-Goal "[| leadsTo Acts A A'; B<=A; id: Acts |] ==> \
-\ leadsTo Acts B A'";
+Goal "[| leadsTo acts A A'; B<=A; id: acts |] ==> \
+\ leadsTo acts B A'";
by (blast_tac (claset() addIs [leadsTo_Basis, leadsTo_Trans,
subset_imp_leadsTo]) 1);
qed_spec_mp "leadsTo_weaken_L";
(*Distributes over binary unions*)
-Goal "id: Acts ==> \
-\ leadsTo Acts (A Un B) C = (leadsTo Acts A C & leadsTo Acts B C)";
+Goal "id: acts ==> \
+\ leadsTo acts (A Un B) C = (leadsTo acts A C & leadsTo acts B C)";
by (blast_tac (claset() addIs [leadsTo_Un, leadsTo_weaken_L]) 1);
qed "leadsTo_Un_distrib";
-Goal "id: Acts ==> \
-\ leadsTo Acts (UN i:I. A i) B = (ALL i : I. leadsTo Acts (A i) B)";
+Goal "id: acts ==> \
+\ leadsTo acts (UN i:I. A i) B = (ALL i : I. leadsTo acts (A i) B)";
by (blast_tac (claset() addIs [leadsTo_UN, leadsTo_weaken_L]) 1);
qed "leadsTo_UN_distrib";
-Goal "id: Acts ==> \
-\ leadsTo Acts (Union S) B = (ALL A : S. leadsTo Acts A B)";
+Goal "id: acts ==> \
+\ leadsTo acts (Union S) B = (ALL A : S. leadsTo acts A B)";
by (blast_tac (claset() addIs [leadsTo_Union, leadsTo_weaken_L]) 1);
qed "leadsTo_Union_distrib";
-Goal "[| leadsTo Acts A A'; id: Acts; B<=A; A'<=B' |] \
-\ ==> leadsTo Acts B B'";
+Goal "[| leadsTo acts A A'; id: acts; B<=A; A'<=B' |] \
+\ ==> leadsTo acts B B'";
(*PROOF FAILED: why?*)
by (blast_tac (claset() addIs [leadsTo_Trans, leadsTo_weaken_R,
leadsTo_weaken_L]) 1);
@@ -172,8 +172,8 @@
(*Set difference: maybe combine with leadsTo_weaken_L??*)
-Goal "[| leadsTo Acts (A-B) C; leadsTo Acts B C; id: Acts |] \
-\ ==> leadsTo Acts A C";
+Goal "[| leadsTo acts (A-B) C; leadsTo acts B C; id: acts |] \
+\ ==> leadsTo acts A C";
by (blast_tac (claset() addIs [leadsTo_Un, leadsTo_weaken]) 1);
qed "leadsTo_Diff";
@@ -182,8 +182,8 @@
see ball_constrains_UN in UNITY.ML***)
val prems = goal thy
- "(!! i. i:I ==> leadsTo Acts (A i) (A' i)) \
-\ ==> leadsTo Acts (UN i:I. A i) (UN i:I. A' i)";
+ "(!! i. i:I ==> leadsTo acts (A i) (A' i)) \
+\ ==> leadsTo acts (UN i:I. A i) (UN i:I. A' i)";
by (simp_tac (simpset() addsimps [Union_image_eq RS sym]) 1);
by (blast_tac (claset() addIs [leadsTo_Union, leadsTo_weaken_R]
addIs prems) 1);
@@ -192,22 +192,22 @@
(*Version with no index set*)
val prems = goal thy
- "(!! i. leadsTo Acts (A i) (A' i)) \
-\ ==> leadsTo Acts (UN i. A i) (UN i. A' i)";
+ "(!! i. leadsTo acts (A i) (A' i)) \
+\ ==> leadsTo acts (UN i. A i) (UN i. A' i)";
by (blast_tac (claset() addIs [leadsTo_UN_UN]
addIs prems) 1);
qed "leadsTo_UN_UN_noindex";
(*Version with no index set*)
-Goal "ALL i. leadsTo Acts (A i) (A' i) \
-\ ==> leadsTo Acts (UN i. A i) (UN i. A' i)";
+Goal "ALL i. leadsTo acts (A i) (A' i) \
+\ ==> leadsTo acts (UN i. A i) (UN i. A' i)";
by (blast_tac (claset() addIs [leadsTo_UN_UN]) 1);
qed "all_leadsTo_UN_UN";
(*Binary union version*)
-Goal "[| leadsTo Acts A A'; leadsTo Acts B B' |] \
-\ ==> leadsTo Acts (A Un B) (A' Un B')";
+Goal "[| leadsTo acts A A'; leadsTo acts B B' |] \
+\ ==> leadsTo acts (A Un B) (A' Un B')";
by (blast_tac (claset() addIs [leadsTo_Un,
leadsTo_weaken_R]) 1);
qed "leadsTo_Un_Un";
@@ -215,27 +215,27 @@
(** The cancellation law **)
-Goal "[| leadsTo Acts A (A' Un B); leadsTo Acts B B'; id: Acts |] \
-\ ==> leadsTo Acts A (A' Un B')";
+Goal "[| leadsTo acts A (A' Un B); leadsTo acts B B'; id: acts |] \
+\ ==> leadsTo acts A (A' Un B')";
by (blast_tac (claset() addIs [leadsTo_Un_Un,
subset_imp_leadsTo, leadsTo_Trans]) 1);
qed "leadsTo_cancel2";
-Goal "[| leadsTo Acts A (A' Un B); leadsTo Acts (B-A') B'; id: Acts |] \
-\ ==> leadsTo Acts A (A' Un B')";
+Goal "[| leadsTo acts A (A' Un B); leadsTo acts (B-A') B'; id: acts |] \
+\ ==> leadsTo acts A (A' Un B')";
by (rtac leadsTo_cancel2 1);
by (assume_tac 2);
by (ALLGOALS Asm_simp_tac);
qed "leadsTo_cancel_Diff2";
-Goal "[| leadsTo Acts A (B Un A'); leadsTo Acts B B'; id: Acts |] \
-\ ==> leadsTo Acts A (B' Un A')";
+Goal "[| leadsTo acts A (B Un A'); leadsTo acts B B'; id: acts |] \
+\ ==> leadsTo acts A (B' Un A')";
by (asm_full_simp_tac (simpset() addsimps [Un_commute]) 1);
by (blast_tac (claset() addSIs [leadsTo_cancel2]) 1);
qed "leadsTo_cancel1";
-Goal "[| leadsTo Acts A (B Un A'); leadsTo Acts (B-A') B'; id: Acts |] \
-\ ==> leadsTo Acts A (B' Un A')";
+Goal "[| leadsTo acts A (B Un A'); leadsTo acts (B-A') B'; id: acts |] \
+\ ==> leadsTo acts A (B' Un A')";
by (rtac leadsTo_cancel1 1);
by (assume_tac 2);
by (ALLGOALS Asm_simp_tac);
@@ -245,24 +245,24 @@
(** The impossibility law **)
-Goal "leadsTo Acts A B ==> B={} --> A={}";
+Goal "leadsTo acts A B ==> B={} --> A={}";
by (etac leadsTo_induct 1);
by (ALLGOALS Asm_simp_tac);
by (rewrite_goals_tac [ensures_def, constrains_def, transient_def]);
by (Blast_tac 1);
val lemma = result() RS mp;
-Goal "leadsTo Acts A {} ==> A={}";
+Goal "leadsTo acts A {} ==> A={}";
by (blast_tac (claset() addSIs [lemma]) 1);
qed "leadsTo_empty";
(** PSP: Progress-Safety-Progress **)
-(*Special case of PSP: Misra's "stable conjunction". Doesn't need id:Acts. *)
+(*Special case of PSP: Misra's "stable conjunction". Doesn't need id:acts. *)
Goalw [stable_def]
- "[| leadsTo Acts A A'; stable Acts B |] \
-\ ==> leadsTo Acts (A Int B) (A' Int B)";
+ "[| leadsTo acts A A'; stable acts B |] \
+\ ==> leadsTo acts (A Int B) (A' Int B)";
by (etac leadsTo_induct 1);
by (simp_tac (simpset() addsimps [Int_Union_Union]) 3);
by (blast_tac (claset() addIs [leadsTo_Union]) 3);
@@ -274,15 +274,15 @@
by (blast_tac (claset() addIs [transient_strengthen, constrains_Int]) 1);
qed "PSP_stable";
-Goal "[| leadsTo Acts A A'; stable Acts B |] \
-\ ==> leadsTo Acts (B Int A) (B Int A')";
+Goal "[| leadsTo acts A A'; stable acts B |] \
+\ ==> leadsTo acts (B Int A) (B Int A')";
by (asm_simp_tac (simpset() addsimps (PSP_stable::Int_ac)) 1);
qed "PSP_stable2";
Goalw [ensures_def]
- "[| ensures Acts A A'; constrains Acts B B' |] \
-\ ==> ensures Acts (A Int B) ((A' Int B) Un (B' - B))";
+ "[| ensures acts A A'; constrains acts B B' |] \
+\ ==> ensures acts (A Int B) ((A' Int B) Un (B' - B))";
by Safe_tac;
by (blast_tac (claset() addIs [constrainsI] addDs [constrainsD]) 1);
by (etac transient_strengthen 1);
@@ -290,8 +290,8 @@
qed "PSP_ensures";
-Goal "[| leadsTo Acts A A'; constrains Acts B B'; id: Acts |] \
-\ ==> leadsTo Acts (A Int B) ((A' Int B) Un (B' - B))";
+Goal "[| leadsTo acts A A'; constrains acts B B'; id: acts |] \
+\ ==> leadsTo acts (A Int B) ((A' Int B) Un (B' - B))";
by (etac leadsTo_induct 1);
by (simp_tac (simpset() addsimps [Int_Union_Union]) 3);
by (blast_tac (claset() addIs [leadsTo_Union]) 3);
@@ -304,15 +304,15 @@
by (blast_tac (claset() addIs [leadsTo_Basis, PSP_ensures]) 1);
qed "PSP";
-Goal "[| leadsTo Acts A A'; constrains Acts B B'; id: Acts |] \
-\ ==> leadsTo Acts (B Int A) ((B Int A') Un (B' - B))";
+Goal "[| leadsTo acts A A'; constrains acts B B'; id: acts |] \
+\ ==> leadsTo acts (B Int A) ((B Int A') Un (B' - B))";
by (asm_simp_tac (simpset() addsimps (PSP::Int_ac)) 1);
qed "PSP2";
Goalw [unless_def]
- "[| leadsTo Acts A A'; unless Acts B B'; id: Acts |] \
-\ ==> leadsTo Acts (A Int B) ((A' Int B) Un B')";
+ "[| leadsTo acts A A'; unless acts B B'; id: acts |] \
+\ ==> leadsTo acts (A Int B) ((A' Int B) Un B')";
by (dtac PSP 1);
by (assume_tac 1);
by (asm_full_simp_tac (simpset() addsimps [Un_Diff_Diff, Int_Diff_Un]) 2);
@@ -326,12 +326,12 @@
(*** Proving the induction rules ***)
Goal "[| wf r; \
-\ ALL m. leadsTo Acts (A Int f-``{m}) \
+\ ALL m. leadsTo acts (A Int f-``{m}) \
\ ((A Int f-``(r^-1 ^^ {m})) Un B); \
-\ id: Acts |] \
-\ ==> leadsTo Acts (A Int f-``{m}) B";
+\ id: acts |] \
+\ ==> leadsTo acts (A Int f-``{m}) B";
by (eres_inst_tac [("a","m")] wf_induct 1);
-by (subgoal_tac "leadsTo Acts (A Int (f -`` (r^-1 ^^ {x}))) B" 1);
+by (subgoal_tac "leadsTo acts (A Int (f -`` (r^-1 ^^ {x}))) B" 1);
by (stac vimage_eq_UN 2);
by (asm_simp_tac (HOL_ss addsimps (UN_simps RL [sym])) 2);
by (blast_tac (claset() addIs [leadsTo_UN]) 2);
@@ -341,10 +341,10 @@
(** Meta or object quantifier ????? **)
Goal "[| wf r; \
-\ ALL m. leadsTo Acts (A Int f-``{m}) \
+\ ALL m. leadsTo acts (A Int f-``{m}) \
\ ((A Int f-``(r^-1 ^^ {m})) Un B); \
-\ id: Acts |] \
-\ ==> leadsTo Acts A B";
+\ id: acts |] \
+\ ==> leadsTo acts A B";
by (res_inst_tac [("t", "A")] subst 1);
by (rtac leadsTo_UN 2);
by (etac lemma 2);
@@ -354,10 +354,10 @@
Goal "[| wf r; \
-\ ALL m:I. leadsTo Acts (A Int f-``{m}) \
+\ ALL m:I. leadsTo acts (A Int f-``{m}) \
\ ((A Int f-``(r^-1 ^^ {m})) Un B); \
-\ id: Acts |] \
-\ ==> leadsTo Acts A ((A - (f-``I)) Un B)";
+\ id: acts |] \
+\ ==> leadsTo acts A ((A - (f-``I)) Un B)";
by (etac leadsTo_wf_induct 1);
by Safe_tac;
by (case_tac "m:I" 1);
@@ -366,30 +366,30 @@
qed "bounded_induct";
-(*Alternative proof is via the lemma leadsTo Acts (A Int f-``(lessThan m)) B*)
-Goal "[| ALL m. leadsTo Acts (A Int f-``{m}) \
+(*Alternative proof is via the lemma leadsTo acts (A Int f-``(lessThan m)) B*)
+Goal "[| ALL m. leadsTo acts (A Int f-``{m}) \
\ ((A Int f-``(lessThan m)) Un B); \
-\ id: Acts |] \
-\ ==> leadsTo Acts A B";
+\ id: acts |] \
+\ ==> leadsTo acts A B";
by (rtac (wf_less_than RS leadsTo_wf_induct) 1);
by (assume_tac 2);
by (Asm_simp_tac 1);
qed "lessThan_induct";
-Goal "[| ALL m:(greaterThan l). leadsTo Acts (A Int f-``{m}) \
+Goal "[| ALL m:(greaterThan l). leadsTo acts (A Int f-``{m}) \
\ ((A Int f-``(lessThan m)) Un B); \
-\ id: Acts |] \
-\ ==> leadsTo Acts A ((A Int (f-``(atMost l))) Un B)";
+\ id: acts |] \
+\ ==> leadsTo acts A ((A Int (f-``(atMost l))) Un B)";
by (simp_tac (HOL_ss addsimps [Diff_eq RS sym, vimage_Compl, Compl_greaterThan RS sym]) 1);
by (rtac (wf_less_than RS bounded_induct) 1);
by (assume_tac 2);
by (Asm_simp_tac 1);
qed "lessThan_bounded_induct";
-Goal "[| ALL m:(lessThan l). leadsTo Acts (A Int f-``{m}) \
+Goal "[| ALL m:(lessThan l). leadsTo acts (A Int f-``{m}) \
\ ((A Int f-``(greaterThan m)) Un B); \
-\ id: Acts |] \
-\ ==> leadsTo Acts A ((A Int (f-``(atLeast l))) Un B)";
+\ id: acts |] \
+\ ==> leadsTo acts A ((A Int (f-``(atLeast l))) Un B)";
by (res_inst_tac [("f","f"),("f1", "%k. l - k")]
(wf_less_than RS wf_inv_image RS leadsTo_wf_induct) 1);
by (assume_tac 2);
@@ -405,22 +405,22 @@
(*** wlt ****)
(*Misra's property W3*)
-Goalw [wlt_def] "leadsTo Acts (wlt Acts B) B";
+Goalw [wlt_def] "leadsTo acts (wlt acts B) B";
by (blast_tac (claset() addSIs [leadsTo_Union]) 1);
qed "wlt_leadsTo";
-Goalw [wlt_def] "leadsTo Acts A B ==> A <= wlt Acts B";
+Goalw [wlt_def] "leadsTo acts A B ==> A <= wlt acts B";
by (blast_tac (claset() addSIs [leadsTo_Union]) 1);
qed "leadsTo_subset";
(*Misra's property W2*)
-Goal "id: Acts ==> leadsTo Acts A B = (A <= wlt Acts B)";
+Goal "id: acts ==> leadsTo acts A B = (A <= wlt acts B)";
by (blast_tac (claset() addSIs [leadsTo_subset,
wlt_leadsTo RS leadsTo_weaken_L]) 1);
qed "leadsTo_eq_subset_wlt";
(*Misra's property W4*)
-Goal "id: Acts ==> B <= wlt Acts B";
+Goal "id: acts ==> B <= wlt acts B";
by (asm_simp_tac (simpset() addsimps [leadsTo_eq_subset_wlt RS sym,
subset_imp_leadsTo]) 1);
qed "wlt_increasing";
@@ -429,17 +429,17 @@
(*Used in the Trans case below*)
Goalw [constrains_def]
"[| B <= A2; \
-\ constrains Acts (A1 - B) (A1 Un B); \
-\ constrains Acts (A2 - C) (A2 Un C) |] \
-\ ==> constrains Acts (A1 Un A2 - C) (A1 Un A2 Un C)";
+\ constrains acts (A1 - B) (A1 Un B); \
+\ constrains acts (A2 - C) (A2 Un C) |] \
+\ ==> constrains acts (A1 Un A2 - C) (A1 Un A2 Un C)";
by (Clarify_tac 1);
by (blast_tac (claset() addSDs [bspec]) 1);
val lemma1 = result();
(*Lemma (1,2,3) of Misra's draft book, Chapter 4, "Progress"*)
-Goal "[| leadsTo Acts A A'; id: Acts |] ==> \
-\ EX B. A<=B & leadsTo Acts B A' & constrains Acts (B-A') (B Un A')";
+Goal "[| leadsTo acts A A'; id: acts |] ==> \
+\ EX B. A<=B & leadsTo acts B A' & constrains acts (B-A') (B Un A')";
by (etac leadsTo_induct 1);
(*Basis*)
by (blast_tac (claset() addIs [leadsTo_Basis]
@@ -458,10 +458,10 @@
(*Misra's property W5*)
-Goal "id: Acts ==> constrains Acts (wlt Acts B - B) (wlt Acts B)";
+Goal "id: acts ==> constrains acts (wlt acts B - B) (wlt acts B)";
by (forward_tac [wlt_leadsTo RS leadsTo_123] 1);
by (Clarify_tac 1);
-by (subgoal_tac "Ba = wlt Acts B" 1);
+by (subgoal_tac "Ba = wlt acts B" 1);
by (blast_tac (claset() addDs [leadsTo_eq_subset_wlt]) 2);
by (Clarify_tac 1);
by (asm_full_simp_tac (simpset() addsimps [wlt_increasing, Un_absorb2]) 1);
@@ -470,20 +470,20 @@
(*** Completion: Binary and General Finite versions ***)
-Goal "[| leadsTo Acts A A'; stable Acts A'; \
-\ leadsTo Acts B B'; stable Acts B'; id: Acts |] \
-\ ==> leadsTo Acts (A Int B) (A' Int B')";
-by (subgoal_tac "stable Acts (wlt Acts B')" 1);
+Goal "[| leadsTo acts A A'; stable acts A'; \
+\ leadsTo acts B B'; stable acts B'; id: acts |] \
+\ ==> leadsTo acts (A Int B) (A' Int B')";
+by (subgoal_tac "stable acts (wlt acts B')" 1);
by (asm_full_simp_tac (simpset() addsimps [stable_def]) 2);
by (EVERY [etac (constrains_Un RS constrains_weaken) 2,
etac wlt_constrains_wlt 2,
fast_tac (claset() addEs [wlt_increasing RSN (2,rev_subsetD)]) 3,
Blast_tac 2]);
-by (subgoal_tac "leadsTo Acts (A Int wlt Acts B') (A' Int wlt Acts B')" 1);
+by (subgoal_tac "leadsTo acts (A Int wlt acts B') (A' Int wlt acts B')" 1);
by (blast_tac (claset() addIs [PSP_stable]) 2);
-by (subgoal_tac "leadsTo Acts (A' Int wlt Acts B') (A' Int B')" 1);
+by (subgoal_tac "leadsTo acts (A' Int wlt acts B') (A' Int B')" 1);
by (blast_tac (claset() addIs [wlt_leadsTo, PSP_stable2]) 2);
-by (subgoal_tac "leadsTo Acts (A Int B) (A Int wlt Acts B')" 1);
+by (subgoal_tac "leadsTo acts (A Int B) (A Int wlt acts B')" 1);
by (blast_tac (claset() addIs [leadsTo_subset RS subsetD,
subset_imp_leadsTo]) 2);
(*Blast_tac gives PROOF FAILED*)
@@ -491,10 +491,10 @@
qed "stable_completion";
-Goal "[| finite I; id: Acts |] \
-\ ==> (ALL i:I. leadsTo Acts (A i) (A' i)) --> \
-\ (ALL i:I. stable Acts (A' i)) --> \
-\ leadsTo Acts (INT i:I. A i) (INT i:I. A' i)";
+Goal "[| finite I; id: acts |] \
+\ ==> (ALL i:I. leadsTo acts (A i) (A' i)) --> \
+\ (ALL i:I. stable acts (A' i)) --> \
+\ leadsTo acts (INT i:I. A i) (INT i:I. A' i)";
by (etac finite_induct 1);
by (Asm_simp_tac 1);
by (asm_simp_tac
@@ -503,21 +503,21 @@
qed_spec_mp "finite_stable_completion";
-Goal "[| W = wlt Acts (B' Un C); \
-\ leadsTo Acts A (A' Un C); constrains Acts A' (A' Un C); \
-\ leadsTo Acts B (B' Un C); constrains Acts B' (B' Un C); \
-\ id: Acts |] \
-\ ==> leadsTo Acts (A Int B) ((A' Int B') Un C)";
-by (subgoal_tac "constrains Acts (W-C) (W Un B' Un C)" 1);
+Goal "[| W = wlt acts (B' Un C); \
+\ leadsTo acts A (A' Un C); constrains acts A' (A' Un C); \
+\ leadsTo acts B (B' Un C); constrains acts B' (B' Un C); \
+\ id: acts |] \
+\ ==> leadsTo acts (A Int B) ((A' Int B') Un C)";
+by (subgoal_tac "constrains acts (W-C) (W Un B' Un C)" 1);
by (blast_tac (claset() addIs [[asm_rl, wlt_constrains_wlt]
MRS constrains_Un RS constrains_weaken]) 2);
-by (subgoal_tac "constrains Acts (W-C) W" 1);
+by (subgoal_tac "constrains acts (W-C) W" 1);
by (asm_full_simp_tac
(simpset() addsimps [wlt_increasing, Un_assoc, Un_absorb2]) 2);
-by (subgoal_tac "leadsTo Acts (A Int W - C) (A' Int W Un C)" 1);
+by (subgoal_tac "leadsTo acts (A Int W - C) (A' Int W Un C)" 1);
by (simp_tac (simpset() addsimps [Int_Diff]) 2);
by (blast_tac (claset() addIs [wlt_leadsTo, PSP RS leadsTo_weaken_R]) 2);
-by (subgoal_tac "leadsTo Acts (A' Int W Un C) (A' Int B' Un C)" 1);
+by (subgoal_tac "leadsTo acts (A' Int W Un C) (A' Int B' Un C)" 1);
by (blast_tac (claset() addIs [wlt_leadsTo, leadsTo_Un_Un,
PSP2 RS leadsTo_weaken_R,
subset_refl RS subset_imp_leadsTo,
@@ -532,10 +532,10 @@
bind_thm("completion", refl RS result());
-Goal "[| finite I; id: Acts |] \
-\ ==> (ALL i:I. leadsTo Acts (A i) (A' i Un C)) --> \
-\ (ALL i:I. constrains Acts (A' i) (A' i Un C)) --> \
-\ leadsTo Acts (INT i:I. A i) ((INT i:I. A' i) Un C)";
+Goal "[| finite I; id: acts |] \
+\ ==> (ALL i:I. leadsTo acts (A i) (A' i Un C)) --> \
+\ (ALL i:I. constrains acts (A' i) (A' i Un C)) --> \
+\ leadsTo acts (INT i:I. A i) ((INT i:I. A' i) Un C)";
by (etac finite_induct 1);
by (ALLGOALS Asm_simp_tac);
by (Clarify_tac 1);
--- a/src/HOL/UNITY/WFair.thy Wed Aug 05 10:56:58 1998 +0200
+++ b/src/HOL/UNITY/WFair.thy Wed Aug 05 10:57:25 1998 +0200
@@ -15,37 +15,37 @@
(*This definition specifies weak fairness. The rest of the theory
is generic to all forms of fairness.*)
transient :: "[('a * 'a)set set, 'a set] => bool"
- "transient Acts A == EX act:Acts. A <= Domain act & act^^A <= Compl A"
+ "transient acts A == EX act:acts. A <= Domain act & act^^A <= Compl A"
ensures :: "[('a * 'a)set set, 'a set, 'a set] => bool"
- "ensures Acts A B == constrains Acts (A-B) (A Un B) & transient Acts (A-B)"
- (*(unless Acts A B) would be equivalent*)
+ "ensures acts A B == constrains acts (A-B) (A Un B) & transient acts (A-B)"
+ (*(unless acts A B) would be equivalent*)
consts leadsTo :: "[('a * 'a)set set, 'a set, 'a set] => bool"
leadsto :: "[('a * 'a)set set] => ('a set * 'a set) set"
translations
- "leadsTo Acts A B" == "(A,B) : leadsto Acts"
+ "leadsTo acts A B" == "(A,B) : leadsto acts"
-inductive "leadsto Acts"
+inductive "leadsto acts"
intrs
- Basis "ensures Acts A B ==> leadsTo Acts A B"
+ Basis "ensures acts A B ==> leadsTo acts A B"
- Trans "[| leadsTo Acts A B; leadsTo Acts B C |]
- ==> leadsTo Acts A C"
+ Trans "[| leadsTo acts A B; leadsTo acts B C |]
+ ==> leadsTo acts A C"
(*Encoding using powerset of the desired axiom
- (!!A. A : S ==> leadsTo Acts A B) ==> leadsTo Acts (Union S) B
+ (!!A. A : S ==> leadsTo acts A B) ==> leadsTo acts (Union S) B
*)
- Union "(UN A:S. {(A,B)}) : Pow (leadsto Acts)
- ==> leadsTo Acts (Union S) B"
+ Union "(UN A:S. {(A,B)}) : Pow (leadsto acts)
+ ==> leadsTo acts (Union S) B"
monos "[Pow_mono]"
-(*wlt Acts B is the largest set that leads to B*)
+(*wlt acts B is the largest set that leads to B*)
constdefs wlt :: "[('a * 'a)set set, 'a set] => 'a set"
- "wlt Acts B == Union {A. leadsTo Acts A B}"
+ "wlt acts B == Union {A. leadsTo acts A B}"
end