New record type of programs
authorpaulson
Wed Aug 05 10:57:25 1998 +0200 (1998-08-05)
changeset 525382a5ca6290aa
parent 5252 1b0f14d11142
child 5254 a275d0a3dc08
New record type of programs
src/HOL/UNITY/Channel.ML
src/HOL/UNITY/Channel.thy
src/HOL/UNITY/Common.ML
src/HOL/UNITY/Mutex.ML
src/HOL/UNITY/Mutex.thy
src/HOL/UNITY/ROOT.ML
src/HOL/UNITY/Reach.ML
src/HOL/UNITY/Reach.thy
src/HOL/UNITY/SubstAx.ML
src/HOL/UNITY/SubstAx.thy
src/HOL/UNITY/Token.ML
src/HOL/UNITY/Token.thy
src/HOL/UNITY/Traces.ML
src/HOL/UNITY/Traces.thy
src/HOL/UNITY/UNITY.ML
src/HOL/UNITY/UNITY.thy
src/HOL/UNITY/WFair.ML
src/HOL/UNITY/WFair.thy
     1.1 --- a/src/HOL/UNITY/Channel.ML	Wed Aug 05 10:56:58 1998 +0200
     1.2 +++ b/src/HOL/UNITY/Channel.ML	Wed Aug 05 10:57:25 1998 +0200
     1.3 @@ -26,8 +26,7 @@
     1.4  by (Blast_tac 1);
     1.5  qed_spec_mp "minSet_nonempty";
     1.6  
     1.7 -Goal
     1.8 -    "leadsTo Acts (minSet -`` {Some x}) (minSet -`` (Some``greaterThan x))";
     1.9 +Goal "leadsTo acts (minSet -`` {Some x}) (minSet -`` (Some``greaterThan x))";
    1.10  by (rtac leadsTo_weaken 1);
    1.11  by (rtac ([UC2, UC1] MRS PSP) 1);
    1.12  by (ALLGOALS Asm_simp_tac);
    1.13 @@ -39,7 +38,7 @@
    1.14  
    1.15  
    1.16  (*The induction*)
    1.17 -Goal "leadsTo Acts (UNIV-{{}}) (minSet -`` (Some``atLeast y))";
    1.18 +Goal "leadsTo acts (UNIV-{{}}) (minSet -`` (Some``atLeast y))";
    1.19  by (rtac leadsTo_weaken_R 1);
    1.20  by (res_inst_tac  [("l", "y"), ("f", "the o minSet"), ("B", "{}")]
    1.21       greaterThan_bounded_induct 1);
    1.22 @@ -55,7 +54,7 @@
    1.23  val lemma = result();
    1.24  
    1.25  
    1.26 -Goal "!!y::nat. leadsTo Acts (UNIV-{{}}) {s. y ~: s}";
    1.27 +Goal "!!y::nat. leadsTo acts (UNIV-{{}}) {s. y ~: s}";
    1.28  by (rtac (lemma RS leadsTo_weaken_R) 1);
    1.29  by (Clarify_tac 1);
    1.30  by (forward_tac [minSet_nonempty] 1);
     2.1 --- a/src/HOL/UNITY/Channel.thy	Wed Aug 05 10:56:58 1998 +0200
     2.2 +++ b/src/HOL/UNITY/Channel.thy	Wed Aug 05 10:57:25 1998 +0200
     2.3 @@ -18,12 +18,12 @@
     2.4  
     2.5  rules
     2.6  
     2.7 -  skip "id: Acts"
     2.8 +  skip "id: acts"
     2.9  
    2.10 -  UC1  "constrains Acts (minSet -`` {Some x}) (minSet -`` (Some``atLeast x))"
    2.11 +  UC1  "constrains acts (minSet -`` {Some x}) (minSet -`` (Some``atLeast x))"
    2.12  
    2.13 -  (*  UC1  "constrains Acts {s. minSet s = x} {s. x <= minSet s}"  *)
    2.14 +  (*  UC1  "constrains acts {s. minSet s = x} {s. x <= minSet s}"  *)
    2.15  
    2.16 -  UC2  "leadsTo Acts (minSet -`` {Some x}) {s. x ~: s}"
    2.17 +  UC2  "leadsTo acts (minSet -`` {Some x}) {s. x ~: s}"
    2.18  
    2.19  end
     3.1 --- a/src/HOL/UNITY/Common.ML	Wed Aug 05 10:56:58 1998 +0200
     3.2 +++ b/src/HOL/UNITY/Common.ML	Wed Aug 05 10:57:25 1998 +0200
     3.3 @@ -10,12 +10,9 @@
     3.4  From Misra, "A Logic for Concurrent Programming" (1994), sections 5.1 and 13.1.
     3.5  *)
     3.6  
     3.7 -
     3.8 -open Common;
     3.9 -
    3.10  (*Misra's property CMT4: t exceeds no common meeting time*)
    3.11 -Goal "[| ALL m. constrains Acts {m} (maxfg m); n: common |] \
    3.12 -\     ==> stable Acts (atMost n)";
    3.13 +Goal "[| ALL m. constrains acts {m} (maxfg m); n: common |] \
    3.14 +\     ==> stable acts (atMost n)";
    3.15  by (dres_inst_tac [("P", "%t. t<=n")] elimination_sing 1);
    3.16  by (asm_full_simp_tac
    3.17      (simpset() addsimps [atMost_def, stable_def, common_def, maxfg_def,
    3.18 @@ -27,8 +24,8 @@
    3.19  			addIs [order_eq_refl, fmono, gmono, le_trans]) 1);
    3.20  qed "common_stable";
    3.21  
    3.22 -Goal "[| ALL m. constrains Acts {m} (maxfg m); n: common |] \
    3.23 -\     ==> invariant ({0},Acts) (atMost n)";
    3.24 +Goal "[| ALL m. constrains acts {m} (maxfg m); n: common |] \
    3.25 +\     ==> invariant (|Init={0}, Acts=acts|) (atMost n)";
    3.26  by (rtac invariantI 1);
    3.27  by (asm_simp_tac (simpset() addsimps [common_stable]) 2);
    3.28  by (simp_tac (simpset() addsimps [atMost_def]) 1);
    3.29 @@ -75,10 +72,10 @@
    3.30  Addsimps [atMost_Int_atLeast];
    3.31  
    3.32  Goal
    3.33 -    "[| ALL m. constrains Acts {m} (maxfg m); \
    3.34 -\               ALL m: lessThan n. leadsTo Acts {m} (greaterThan m); \
    3.35 -\               n: common;  id: Acts |]  \
    3.36 -\            ==> leadsTo Acts (atMost n) common";
    3.37 +    "[| ALL m. constrains acts {m} (maxfg m); \
    3.38 +\               ALL m: lessThan n. leadsTo acts {m} (greaterThan m); \
    3.39 +\               n: common;  id: acts |]  \
    3.40 +\            ==> leadsTo acts (atMost n) common";
    3.41  by (rtac leadsTo_weaken_R 1);
    3.42  by (res_inst_tac [("f","%x. x"), ("l", "n")] greaterThan_bounded_induct 1);
    3.43  by (ALLGOALS Asm_simp_tac);
    3.44 @@ -89,10 +86,10 @@
    3.45  
    3.46  (*The "ALL m: Compl common" form echoes CMT6.*)
    3.47  Goal
    3.48 -    "[| ALL m. constrains Acts {m} (maxfg m); \
    3.49 -\               ALL m: Compl common. leadsTo Acts {m} (greaterThan m); \
    3.50 -\               n: common;  id: Acts |]  \
    3.51 -\            ==> leadsTo Acts (atMost (LEAST n. n: common)) common";
    3.52 +    "[| ALL m. constrains acts {m} (maxfg m); \
    3.53 +\               ALL m: Compl common. leadsTo acts {m} (greaterThan m); \
    3.54 +\               n: common;  id: acts |]  \
    3.55 +\            ==> leadsTo acts (atMost (LEAST n. n: common)) common";
    3.56  by (rtac lemma 1);
    3.57  by (ALLGOALS Asm_simp_tac);
    3.58  by (etac LeastI 2);
     4.1 --- a/src/HOL/UNITY/Mutex.ML	Wed Aug 05 10:56:58 1998 +0200
     4.2 +++ b/src/HOL/UNITY/Mutex.ML	Wed Aug 05 10:57:25 1998 +0200
     4.3 @@ -9,14 +9,14 @@
     4.4  (*split_all_tac causes a big blow-up*)
     4.5  claset_ref() := claset() delSWrapper "split_all_tac";
     4.6  
     4.7 -val cmd_defs = [mutex_def, 
     4.8 +val cmd_defs = [Mprg_def, 
     4.9  		cmd0U_def, cmd1U_def, cmd2U_def, cmd3U_def, cmd4U_def, 
    4.10  		cmd0V_def, cmd1V_def, cmd2V_def, cmd3V_def, cmd4V_def];
    4.11  
    4.12 -Goalw [mutex_def] "id : mutex";
    4.13 +Goalw [Mprg_def] "id : Acts Mprg";
    4.14  by (Simp_tac 1);
    4.15 -qed "id_in_mutex";
    4.16 -AddIffs [id_in_mutex];
    4.17 +qed "id_in_Acts";
    4.18 +AddIffs [id_in_Acts];
    4.19  
    4.20  
    4.21  (*Simplification for records*)
    4.22 @@ -30,30 +30,30 @@
    4.23  Addsimps [invariantU_def, invariantV_def];
    4.24  
    4.25  
    4.26 -Goalw [MInit_def] "invariant (MInit,mutex) invariantU";
    4.27 +Goalw [Mprg_def] "invariant Mprg invariantU";
    4.28  by (rtac invariantI 1);
    4.29  by (constrains_tac cmd_defs 2);
    4.30  by Auto_tac;
    4.31  qed "invariantU";
    4.32  
    4.33 -Goalw [MInit_def] "invariant (MInit,mutex) invariantV";
    4.34 +Goalw [Mprg_def] "invariant Mprg invariantV";
    4.35  by (rtac invariantI 1);
    4.36  by (constrains_tac cmd_defs 2);
    4.37  by Auto_tac;
    4.38  qed "invariantV";
    4.39  
    4.40 -val mutex_invariant = invariant_Int_rule [invariantU, invariantV];
    4.41 +val invariantUV = invariant_Int_rule [invariantU, invariantV];
    4.42  
    4.43  
    4.44  (*The safety property: mutual exclusion*)
    4.45 -Goal "disjoint (reachable (MInit,mutex)) {s. MM s = 3 & NN s = 3}";
    4.46 -by (cut_facts_tac [mutex_invariant RS invariant_includes_reachable] 1);
    4.47 +Goal "(reachable Mprg) Int {s. MM s = 3 & NN s = 3} = {}";
    4.48 +by (cut_facts_tac [invariantUV RS invariant_includes_reachable] 1);
    4.49  by Auto_tac;
    4.50  qed "mutual_exclusion";
    4.51  
    4.52  
    4.53  (*The bad invariant FAILS in cmd1V*)
    4.54 -Goalw [bad_invariantU_def] "stable mutex bad_invariantU";
    4.55 +Goalw [bad_invariantU_def] "stable (Acts Mprg) bad_invariantU";
    4.56  by (constrains_tac cmd_defs 1);
    4.57  by (REPEAT (trans_tac 1));
    4.58  by (safe_tac (claset() addSEs [le_SucE]));
    4.59 @@ -67,49 +67,48 @@
    4.60  
    4.61  (*** Progress for U ***)
    4.62  
    4.63 -Goalw [unless_def] "unless mutex {s. MM s=2} {s. MM s=3}";
    4.64 +Goalw [unless_def] "unless (Acts Mprg) {s. MM s=2} {s. MM s=3}";
    4.65  by (constrains_tac cmd_defs 1);
    4.66  qed "U_F0";
    4.67  
    4.68 -Goal "LeadsTo(MInit,mutex) {s. MM s=1} {s. PP s = VV s & MM s = 2}";
    4.69 +Goal "LeadsTo Mprg {s. MM s=1} {s. PP s = VV s & MM s = 2}";
    4.70  by (ensures_tac cmd_defs "cmd1U" 1);
    4.71  qed "U_F1";
    4.72  
    4.73 -Goal "LeadsTo(MInit,mutex) {s. ~ PP s & MM s = 2} {s. MM s = 3}";
    4.74 -by (cut_facts_tac [mutex_invariant] 1);
    4.75 +Goal "LeadsTo Mprg {s. ~ PP s & MM s = 2} {s. MM s = 3}";
    4.76 +by (cut_facts_tac [invariantUV] 1);
    4.77 +bw Mprg_def;
    4.78  by (ensures_tac cmd_defs "cmd2U" 1);
    4.79  qed "U_F2";
    4.80  
    4.81 -Goalw [mutex_def] "LeadsTo(MInit,mutex) {s. MM s = 3} {s. PP s}";
    4.82 +Goal "LeadsTo Mprg {s. MM s = 3} {s. PP s}";
    4.83  by (rtac leadsTo_imp_LeadsTo 1); 
    4.84  by (res_inst_tac [("B", "{s. MM s = 4}")] leadsTo_Trans 1);
    4.85  by (ensures_tac cmd_defs "cmd4U" 2);
    4.86  by (ensures_tac cmd_defs "cmd3U" 1);
    4.87  qed "U_F3";
    4.88  
    4.89 -Goal "LeadsTo(MInit,mutex) {s. MM s = 2} {s. PP s}";
    4.90 +Goal "LeadsTo Mprg {s. MM s = 2} {s. PP s}";
    4.91  by (rtac ([LeadsTo_weaken_L, subset_refl RS subset_imp_LeadsTo] 
    4.92  	  MRS LeadsTo_Diff) 1);
    4.93  by (rtac ([U_F2, U_F3] MRS LeadsTo_Trans) 1);
    4.94  by (auto_tac (claset() addSEs [less_SucE], simpset()));
    4.95  val U_lemma2 = result();
    4.96  
    4.97 -Goal "LeadsTo(MInit,mutex) {s. MM s = 1} {s. PP s}";
    4.98 +Goal "LeadsTo Mprg {s. MM s = 1} {s. PP s}";
    4.99  by (rtac ([U_F1 RS LeadsTo_weaken_R, U_lemma2] MRS LeadsTo_Trans) 1);
   4.100  by (Blast_tac 1);
   4.101  val U_lemma1 = result();
   4.102  
   4.103 -
   4.104 -Goal "LeadsTo(MInit,mutex) {s. 1 <= MM s & MM s <= 3} {s. PP s}";
   4.105 +Goal "LeadsTo Mprg {s. 1 <= MM s & MM s <= 3} {s. PP s}";
   4.106  by (simp_tac (simpset() addsimps [le_Suc_eq, conj_disj_distribL] 
   4.107  	                addcongs [rev_conj_cong]) 1);
   4.108  by (simp_tac (simpset() addsimps [Collect_disj_eq, LeadsTo_Un_distrib,
   4.109  				  U_lemma1, U_lemma2, U_F3] ) 1);
   4.110  val U_lemma123 = result();
   4.111  
   4.112 -
   4.113  (*Misra's F4*)
   4.114 -Goal "LeadsTo(MInit,mutex) {s. UU s} {s. PP s}";
   4.115 +Goal "LeadsTo Mprg {s. UU s} {s. PP s}";
   4.116  by (rtac ([invariantU, U_lemma123] MRS invariant_LeadsTo_weaken) 1);
   4.117  by Auto_tac;
   4.118  qed "u_leadsto_p";
   4.119 @@ -118,39 +117,39 @@
   4.120  (*** Progress for V ***)
   4.121  
   4.122  
   4.123 -Goalw [unless_def] "unless mutex {s. NN s=2} {s. NN s=3}";
   4.124 +Goalw [unless_def] "unless (Acts Mprg) {s. NN s=2} {s. NN s=3}";
   4.125  by (constrains_tac cmd_defs 1);
   4.126  qed "V_F0";
   4.127  
   4.128 -Goal "LeadsTo(MInit,mutex) {s. NN s=1} {s. PP s = (~ UU s) & NN s = 2}";
   4.129 +Goal "LeadsTo Mprg {s. NN s=1} {s. PP s = (~ UU s) & NN s = 2}";
   4.130  by (ensures_tac cmd_defs "cmd1V" 1);
   4.131  qed "V_F1";
   4.132  
   4.133 -Goal "LeadsTo(MInit,mutex) {s. PP s & NN s = 2} {s. NN s = 3}";
   4.134 -by (cut_facts_tac [mutex_invariant] 1);
   4.135 +Goal "LeadsTo Mprg {s. PP s & NN s = 2} {s. NN s = 3}";
   4.136 +by (cut_facts_tac [invariantUV] 1);
   4.137  by (ensures_tac cmd_defs "cmd2V" 1);
   4.138  qed "V_F2";
   4.139  
   4.140 -Goalw [mutex_def] "LeadsTo(MInit,mutex) {s. NN s = 3} {s. ~ PP s}";
   4.141 +Goal "LeadsTo Mprg {s. NN s = 3} {s. ~ PP s}";
   4.142  by (rtac leadsTo_imp_LeadsTo 1); 
   4.143  by (res_inst_tac [("B", "{s. NN s = 4}")] leadsTo_Trans 1);
   4.144  by (ensures_tac cmd_defs "cmd4V" 2);
   4.145  by (ensures_tac cmd_defs "cmd3V" 1);
   4.146  qed "V_F3";
   4.147  
   4.148 -Goal "LeadsTo(MInit,mutex) {s. NN s = 2} {s. ~ PP s}";
   4.149 +Goal "LeadsTo Mprg {s. NN s = 2} {s. ~ PP s}";
   4.150  by (rtac ([LeadsTo_weaken_L, subset_refl RS subset_imp_LeadsTo] 
   4.151  	  MRS LeadsTo_Diff) 1);
   4.152  by (rtac ([V_F2, V_F3] MRS LeadsTo_Trans) 1);
   4.153  by (auto_tac (claset() addSEs [less_SucE], simpset()));
   4.154  val V_lemma2 = result();
   4.155  
   4.156 -Goal "LeadsTo(MInit,mutex) {s. NN s = 1} {s. ~ PP s}";
   4.157 +Goal "LeadsTo Mprg {s. NN s = 1} {s. ~ PP s}";
   4.158  by (rtac ([V_F1 RS LeadsTo_weaken_R, V_lemma2] MRS LeadsTo_Trans) 1);
   4.159  by (Blast_tac 1);
   4.160  val V_lemma1 = result();
   4.161  
   4.162 -Goal "LeadsTo(MInit,mutex) {s. 1 <= NN s & NN s <= 3} {s. ~ PP s}";
   4.163 +Goal "LeadsTo Mprg {s. 1 <= NN s & NN s <= 3} {s. ~ PP s}";
   4.164  by (simp_tac (simpset() addsimps [le_Suc_eq, conj_disj_distribL] 
   4.165  	                addcongs [rev_conj_cong]) 1);
   4.166  by (simp_tac (simpset() addsimps [Collect_disj_eq, LeadsTo_Un_distrib,
   4.167 @@ -159,7 +158,7 @@
   4.168  
   4.169  
   4.170  (*Misra's F4*)
   4.171 -Goal "LeadsTo(MInit,mutex) {s. VV s} {s. ~ PP s}";
   4.172 +Goal "LeadsTo Mprg {s. VV s} {s. ~ PP s}";
   4.173  by (rtac ([invariantV, V_lemma123] MRS invariant_LeadsTo_weaken) 1);
   4.174  by Auto_tac;
   4.175  qed "v_leadsto_not_p";
   4.176 @@ -168,7 +167,7 @@
   4.177  (** Absence of starvation **)
   4.178  
   4.179  (*Misra's F6*)
   4.180 -Goal "LeadsTo(MInit,mutex) {s. MM s = 1} {s. MM s = 3}";
   4.181 +Goal "LeadsTo Mprg {s. MM s = 1} {s. MM s = 3}";
   4.182  by (rtac LeadsTo_Un_duplicate 1);
   4.183  by (rtac LeadsTo_cancel2 1);
   4.184  by (rtac U_F2 2);
   4.185 @@ -182,7 +181,7 @@
   4.186  
   4.187  
   4.188  (*The same for V*)
   4.189 -Goal "LeadsTo(MInit,mutex) {s. NN s = 1} {s. NN s = 3}";
   4.190 +Goal "LeadsTo Mprg {s. NN s = 1} {s. NN s = 3}";
   4.191  by (rtac LeadsTo_Un_duplicate 1);
   4.192  by (rtac LeadsTo_cancel2 1);
   4.193  by (rtac V_F2 2);
     5.1 --- a/src/HOL/UNITY/Mutex.thy	Wed Aug 05 10:56:58 1998 +0200
     5.2 +++ b/src/HOL/UNITY/Mutex.thy	Wed Aug 05 10:57:25 1998 +0200
     5.3 @@ -26,6 +26,9 @@
     5.4    VV :: bool
     5.5  
     5.6  constdefs
     5.7 +  
     5.8 +  (** The program for process U **)
     5.9 +  
    5.10    cmd0U :: "(state*state) set"
    5.11      "cmd0U == {(s,s'). s' = s (|UU:=True, MM:=1|) & MM s = 0}"
    5.12  
    5.13 @@ -41,6 +44,8 @@
    5.14    cmd4U :: "(state*state) set"
    5.15      "cmd4U == {(s,s'). s' = s (|PP:=True, MM:=0|) & MM s = 4}"
    5.16  
    5.17 +  (** The program for process V **)
    5.18 +  
    5.19    cmd0V :: "(state*state) set"
    5.20      "cmd0V == {(s,s'). s' = s (|VV:=True, NN:=1|) & NN s = 0}"
    5.21  
    5.22 @@ -56,10 +61,12 @@
    5.23    cmd4V :: "(state*state) set"
    5.24      "cmd4V == {(s,s'). s' = s (|PP:=False, NN:=0|) & NN s = 4}"
    5.25  
    5.26 -  mutex :: "(state*state) set set"
    5.27 -    "mutex == {id,
    5.28 -	       cmd0U, cmd1U, cmd2U, cmd3U, cmd4U, 
    5.29 -	       cmd0V, cmd1V, cmd2V, cmd3V, cmd4V}"
    5.30 +  Mprg :: state program
    5.31 +    "Mprg == (|Init = {s. ~ UU s & ~ VV s & MM s = 0 & NN s = 0},
    5.32 +	       Acts = {id,
    5.33 +	               cmd0U, cmd1U, cmd2U, cmd3U, cmd4U, 
    5.34 +	               cmd0V, cmd1V, cmd2V, cmd3V, cmd4V}|)"
    5.35 +
    5.36  
    5.37    (** The correct invariants **)
    5.38  
    5.39 @@ -77,7 +84,4 @@
    5.40      "bad_invariantU == {s. (UU s = (1 <= MM s & MM s <= 3)) &
    5.41  		           (3 <= MM s & MM s <= 4 --> ~ PP s)}"
    5.42  
    5.43 -  MInit :: "state set"
    5.44 -    "MInit == {s. ~ UU s & ~ VV s & MM s = 0 & NN s = 0}"
    5.45 -
    5.46  end
     6.1 --- a/src/HOL/UNITY/ROOT.ML	Wed Aug 05 10:56:58 1998 +0200
     6.2 +++ b/src/HOL/UNITY/ROOT.ML	Wed Aug 05 10:57:25 1998 +0200
     6.3 @@ -19,3 +19,4 @@
     6.4  time_use_thy "Mutex";
     6.5  time_use_thy "FP";
     6.6  time_use_thy "Reach";
     6.7 +time_use_thy "Handshake";
     7.1 --- a/src/HOL/UNITY/Reach.ML	Wed Aug 05 10:56:58 1998 +0200
     7.2 +++ b/src/HOL/UNITY/Reach.ML	Wed Aug 05 10:57:25 1998 +0200
     7.3 @@ -19,22 +19,22 @@
     7.4  AddSEs [ifE];
     7.5  
     7.6  
     7.7 -val cmd_defs = [racts_def, asgt_def, fun_upd_def];
     7.8 +val cmd_defs = [Rprg_def, asgt_def, fun_upd_def];
     7.9  
    7.10 -Goalw [racts_def] "id : racts";
    7.11 +Goalw [Rprg_def] "id : (Acts Rprg)";
    7.12  by (Simp_tac 1);
    7.13 -qed "id_in_racts";
    7.14 -AddIffs [id_in_racts];
    7.15 +qed "id_in_Acts";
    7.16 +AddIffs [id_in_Acts];
    7.17  
    7.18  (*All vertex sets are finite*)
    7.19  AddIffs [[subset_UNIV, finite_graph] MRS finite_subset];
    7.20  
    7.21  Addsimps [reach_invariant_def];
    7.22  
    7.23 -Goalw [rinit_def] "invariant (rinit,racts) reach_invariant";
    7.24 +Goalw [Rprg_def] "invariant Rprg reach_invariant";
    7.25  by (rtac invariantI 1);
    7.26  by Auto_tac;  (*for the initial state; proof of stability remains*)
    7.27 -by (constrains_tac [racts_def, asgt_def] 1);
    7.28 +by (constrains_tac [Rprg_def, asgt_def] 1);
    7.29  by (blast_tac (claset() addIs [r_into_rtrancl,rtrancl_trans]) 1);
    7.30  qed "reach_invariant";
    7.31  
    7.32 @@ -52,7 +52,7 @@
    7.33  qed "fixedpoint_invariant_correct";
    7.34  
    7.35  Goalw (cmd_defs @ [FP_def, fixedpoint_def, stable_def, constrains_def])
    7.36 -    "FP racts <= fixedpoint";
    7.37 +    "FP (Acts Rprg) <= fixedpoint";
    7.38  by Auto_tac;
    7.39  by (dtac bspec 1); 
    7.40  by (Blast_tac 1);
    7.41 @@ -62,11 +62,11 @@
    7.42  val lemma1 = result();
    7.43  
    7.44  Goalw (cmd_defs @ [FP_def, fixedpoint_def, stable_def, constrains_def])
    7.45 -    "fixedpoint <= FP racts";
    7.46 +    "fixedpoint <= FP (Acts Rprg)";
    7.47  by (auto_tac (claset() addIs [ext], simpset()));
    7.48  val lemma2 = result();
    7.49  
    7.50 -Goal "FP racts = fixedpoint";
    7.51 +Goal "FP (Acts Rprg) = fixedpoint";
    7.52  by (rtac ([lemma1,lemma2] MRS equalityI) 1);
    7.53  qed "FP_fixedpoint";
    7.54  
    7.55 @@ -80,7 +80,7 @@
    7.56  Goal "Compl fixedpoint = (UN (u,v): edges. {s. s u & ~ s v})";
    7.57  by (simp_tac (simpset() addsimps
    7.58  	      ([Compl_FP, UN_UN_flatten, FP_fixedpoint RS sym, 
    7.59 -		racts_def, asgt_def])) 1);
    7.60 +		Rprg_def, asgt_def])) 1);
    7.61  by Safe_tac;
    7.62  by (rtac fun_upd_idem 1);
    7.63  by (Blast_tac 1);
    7.64 @@ -118,34 +118,34 @@
    7.65  qed "metric_le";
    7.66  
    7.67  Goal "(u,v): edges ==> \
    7.68 -\              ensures racts ((metric-``{m}) Int {s. s u & ~ s v})  \
    7.69 +\              ensures (Acts Rprg) ((metric-``{m}) Int {s. s u & ~ s v})  \
    7.70  \                            (metric-``(lessThan m))";
    7.71 -by (ensures_tac [racts_def, asgt_def] "asgt u v" 1);
    7.72 +by (ensures_tac [Rprg_def, asgt_def] "asgt u v" 1);
    7.73  by (cut_facts_tac [metric_le] 1);
    7.74  by (fast_tac (claset() addSDs [le_imp_less_or_eq]) 1);
    7.75  qed "edges_ensures";
    7.76  
    7.77 -Goal "leadsTo racts ((metric-``{m}) - fixedpoint) (metric-``(lessThan m))";
    7.78 +Goal "leadsTo (Acts Rprg) ((metric-``{m}) - fixedpoint) (metric-``(lessThan m))";
    7.79  by (simp_tac (simpset() addsimps [Diff_fixedpoint]) 1);
    7.80  by (rtac leadsTo_UN 1);
    7.81  by (split_all_tac 1);
    7.82  by (asm_simp_tac (simpset() addsimps [edges_ensures RS leadsTo_Basis]) 1);
    7.83  qed "leadsTo_Diff_fixedpoint";
    7.84  
    7.85 -Goal "leadsTo racts (metric-``{m}) (metric-``(lessThan m) Un fixedpoint)";
    7.86 +Goal "leadsTo (Acts Rprg) (metric-``{m}) (metric-``(lessThan m) Un fixedpoint)";
    7.87  by (rtac (leadsTo_Diff_fixedpoint RS leadsTo_weaken_R RS leadsTo_Diff) 1);
    7.88  by (ALLGOALS (blast_tac (claset() addIs [subset_imp_leadsTo])));
    7.89  qed "leadsTo_Un_fixedpoint";
    7.90  
    7.91  
    7.92  (*Execution in any state leads to a fixedpoint (i.e. can terminate)*)
    7.93 -Goal "leadsTo racts UNIV fixedpoint";
    7.94 +Goal "leadsTo (Acts Rprg) UNIV fixedpoint";
    7.95  by (rtac lessThan_induct 1);
    7.96  by Auto_tac;
    7.97  by (rtac leadsTo_Un_fixedpoint 1);
    7.98  qed "leadsTo_fixedpoint";
    7.99  
   7.100 -Goal "LeadsTo(rinit,racts) UNIV { %v. (init, v) : edges^* }";
   7.101 +Goal "LeadsTo Rprg UNIV { %v. (init, v) : edges^* }";
   7.102  by (stac (fixedpoint_invariant_correct RS sym) 1);
   7.103  by (rtac ([reach_invariant,
   7.104  	   leadsTo_fixedpoint RS leadsTo_imp_LeadsTo] 
     8.1 --- a/src/HOL/UNITY/Reach.thy	Wed Aug 05 10:56:58 1998 +0200
     8.2 +++ b/src/HOL/UNITY/Reach.thy	Wed Aug 05 10:57:25 1998 +0200
     8.3 @@ -23,11 +23,9 @@
     8.4    asgt  :: "[vertex,vertex] => (state*state) set"
     8.5      "asgt u v == {(s,s'). s' = s(v:= s u | s v)}"
     8.6  
     8.7 -  racts :: "(state*state) set set"
     8.8 -    "racts == insert id (UN (u,v): edges. {asgt u v})"
     8.9 -
    8.10 -  rinit :: "state set"
    8.11 -    "rinit == {%v. v=init}"
    8.12 +  Rprg :: state program
    8.13 +    "Rprg == (|Init = {%v. v=init},
    8.14 +	       Acts = insert id (UN (u,v): edges. {asgt u v})|)"
    8.15  
    8.16    reach_invariant :: state set
    8.17      "reach_invariant == {s. (ALL v. s v --> (init, v) : edges^*) & s init}"
     9.1 --- a/src/HOL/UNITY/SubstAx.ML	Wed Aug 05 10:56:58 1998 +0200
     9.2 +++ b/src/HOL/UNITY/SubstAx.ML	Wed Aug 05 10:57:25 1998 +0200
     9.3 @@ -16,31 +16,27 @@
     9.4  
     9.5  (*** Introduction rules: Basis, Trans, Union ***)
     9.6  
     9.7 -Goal "leadsTo Acts A B ==> LeadsTo(Init,Acts) A B";
     9.8 +Goal "leadsTo (Acts prg) A B ==> LeadsTo prg A B";
     9.9  by (simp_tac (simpset() addsimps [LeadsTo_def]) 1);
    9.10  by (blast_tac (claset() addIs [PSP_stable2, stable_reachable]) 1);
    9.11  qed "leadsTo_imp_LeadsTo";
    9.12  
    9.13 -Goal "[| constrains Acts (reachable(Init,Acts) Int (A - A'))   \
    9.14 -\                         (A Un A'); \
    9.15 -\         transient  Acts (reachable(Init,Acts) Int (A-A')) |]   \
    9.16 -\     ==> LeadsTo(Init,Acts) A A'";
    9.17 -by (simp_tac (simpset() addsimps [LeadsTo_def]) 1);
    9.18 +Goal "ensures (Acts prg) (reachable prg Int A) (reachable prg Int A') \
    9.19 +\     ==> LeadsTo prg A A'";
    9.20 +by (full_simp_tac (simpset() addsimps [ensures_def, LeadsTo_def]) 1);
    9.21  by (rtac (stable_reachable RS stable_ensures_Int RS leadsTo_Basis) 1);
    9.22 -by (assume_tac 2);
    9.23 -by (asm_simp_tac 
    9.24 -    (simpset() addsimps [Int_Un_distrib RS sym, Diff_Int_distrib RS sym,
    9.25 -			 stable_constrains_Int]) 1);
    9.26 +by (ALLGOALS (asm_full_simp_tac (simpset() addsimps [Diff_Int_distrib])));
    9.27 +by (blast_tac (claset() addIs [constrains_weaken]) 1);
    9.28  qed "LeadsTo_Basis";
    9.29  
    9.30 -Goal "[| LeadsTo(Init,Acts) A B;  LeadsTo(Init,Acts) B C |] \
    9.31 -\      ==> LeadsTo(Init,Acts) A C";
    9.32 +Goal "[| LeadsTo prg A B;  LeadsTo prg B C |] \
    9.33 +\      ==> LeadsTo prg A C";
    9.34  by (full_simp_tac (simpset() addsimps [LeadsTo_def]) 1);
    9.35  by (blast_tac (claset() addIs [leadsTo_Trans]) 1);
    9.36  qed "LeadsTo_Trans";
    9.37  
    9.38  val [prem] = goalw thy [LeadsTo_def]
    9.39 - "(!!A. A : S ==> LeadsTo(Init,Acts) A B) ==> LeadsTo(Init,Acts) (Union S) B";
    9.40 + "(!!A. A : S ==> LeadsTo prg A B) ==> LeadsTo prg (Union S) B";
    9.41  by (Simp_tac 1);
    9.42  by (stac Int_Union 1);
    9.43  by (blast_tac (claset() addIs [leadsTo_UN,
    9.44 @@ -50,42 +46,42 @@
    9.45  
    9.46  (*** Derived rules ***)
    9.47  
    9.48 -Goal "id: Acts ==> LeadsTo(Init,Acts) A UNIV";
    9.49 +Goal "id: (Acts prg) ==> LeadsTo prg A UNIV";
    9.50  by (asm_simp_tac (simpset() addsimps [LeadsTo_def, 
    9.51  				      Int_lower1 RS subset_imp_leadsTo]) 1);
    9.52  qed "LeadsTo_UNIV";
    9.53  Addsimps [LeadsTo_UNIV];
    9.54  
    9.55  (*Useful with cancellation, disjunction*)
    9.56 -Goal "LeadsTo(Init,Acts) A (A' Un A') ==> LeadsTo(Init,Acts) A A'";
    9.57 +Goal "LeadsTo prg A (A' Un A') ==> LeadsTo prg A A'";
    9.58  by (asm_full_simp_tac (simpset() addsimps Un_ac) 1);
    9.59  qed "LeadsTo_Un_duplicate";
    9.60  
    9.61 -Goal "LeadsTo(Init,Acts) A (A' Un C Un C) ==> LeadsTo(Init,Acts) A (A' Un C)";
    9.62 +Goal "LeadsTo prg A (A' Un C Un C) ==> LeadsTo prg A (A' Un C)";
    9.63  by (asm_full_simp_tac (simpset() addsimps Un_ac) 1);
    9.64  qed "LeadsTo_Un_duplicate2";
    9.65  
    9.66  val prems = goal thy
    9.67 -   "(!!i. i : I ==> LeadsTo(Init,Acts) (A i) B) \
    9.68 -\   ==> LeadsTo(Init,Acts) (UN i:I. A i) B";
    9.69 +   "(!!i. i : I ==> LeadsTo prg (A i) B) \
    9.70 +\   ==> LeadsTo prg (UN i:I. A i) B";
    9.71  by (simp_tac (simpset() addsimps [Union_image_eq RS sym]) 1);
    9.72  by (blast_tac (claset() addIs (LeadsTo_Union::prems)) 1);
    9.73  qed "LeadsTo_UN";
    9.74  
    9.75  (*Binary union introduction rule*)
    9.76 -Goal "[| LeadsTo(Init,Acts) A C; LeadsTo(Init,Acts) B C |] ==> LeadsTo(Init,Acts) (A Un B) C";
    9.77 +Goal "[| LeadsTo prg A C; LeadsTo prg B C |] ==> LeadsTo prg (A Un B) C";
    9.78  by (stac Un_eq_Union 1);
    9.79  by (blast_tac (claset() addIs [LeadsTo_Union]) 1);
    9.80  qed "LeadsTo_Un";
    9.81  
    9.82  
    9.83 -Goal "[| reachable(Init,Acts) Int A <= B;  id: Acts |] \
    9.84 -\     ==> LeadsTo(Init,Acts) A B";
    9.85 +Goal "[| reachable prg Int A <= B;  id: (Acts prg) |] \
    9.86 +\     ==> LeadsTo prg A B";
    9.87  by (simp_tac (simpset() addsimps [LeadsTo_def]) 1);
    9.88  by (blast_tac (claset() addIs [subset_imp_leadsTo]) 1);
    9.89  qed "Int_subset_imp_LeadsTo";
    9.90  
    9.91 -Goal "[| A <= B;  id: Acts |] ==> LeadsTo(Init,Acts) A B";
    9.92 +Goal "[| A <= B;  id: (Acts prg) |] ==> LeadsTo prg A B";
    9.93  by (simp_tac (simpset() addsimps [LeadsTo_def]) 1);
    9.94  by (blast_tac (claset() addIs [subset_imp_leadsTo]) 1);
    9.95  qed "subset_imp_LeadsTo";
    9.96 @@ -93,61 +89,62 @@
    9.97  bind_thm ("empty_LeadsTo", empty_subsetI RS subset_imp_LeadsTo);
    9.98  Addsimps [empty_LeadsTo];
    9.99  
   9.100 -Goal "[| reachable(Init,Acts) Int A = {};  id: Acts |] \
   9.101 -\     ==> LeadsTo(Init,Acts) A B";
   9.102 +Goal "[| reachable prg Int A = {};  id: (Acts prg) |] \
   9.103 +\     ==> LeadsTo prg A B";
   9.104  by (asm_simp_tac (simpset() addsimps [Int_subset_imp_LeadsTo]) 1);
   9.105  qed "Int_empty_LeadsTo";
   9.106  
   9.107  
   9.108 -Goal "[| LeadsTo(Init,Acts) A A';   \
   9.109 -\        reachable(Init,Acts) Int A' <= B' |] \
   9.110 -\     ==> LeadsTo(Init,Acts) A B'";
   9.111 +Goal "[| LeadsTo prg A A';   \
   9.112 +\        reachable prg Int A' <= B' |] \
   9.113 +\     ==> LeadsTo prg A B'";
   9.114  by (full_simp_tac (simpset() addsimps [LeadsTo_def]) 1);
   9.115  by (blast_tac (claset() addIs [leadsTo_weaken_R]) 1);
   9.116  qed_spec_mp "LeadsTo_weaken_R";
   9.117  
   9.118  
   9.119 -Goal "[| LeadsTo(Init,Acts) A A'; \
   9.120 -\        reachable(Init,Acts) Int B <= A; id: Acts |]  \
   9.121 -\     ==> LeadsTo(Init,Acts) B A'";
   9.122 +Goal "[| LeadsTo prg A A'; \
   9.123 +\        reachable prg Int B <= A; id: (Acts prg) |]  \
   9.124 +\     ==> LeadsTo prg B A'";
   9.125  by (full_simp_tac (simpset() addsimps [LeadsTo_def]) 1);
   9.126  by (blast_tac (claset() addIs [leadsTo_weaken_L]) 1);
   9.127  qed_spec_mp "LeadsTo_weaken_L";
   9.128  
   9.129  
   9.130  (*Distributes over binary unions*)
   9.131 -Goal "id: Acts ==> \
   9.132 -\       LeadsTo(Init,Acts) (A Un B) C  =  \
   9.133 -\       (LeadsTo(Init,Acts) A C & LeadsTo(Init,Acts) B C)";
   9.134 +Goal "id: (Acts prg) ==> \
   9.135 +\       LeadsTo prg (A Un B) C  =  \
   9.136 +\       (LeadsTo prg A C & LeadsTo prg B C)";
   9.137  by (blast_tac (claset() addIs [LeadsTo_Un, LeadsTo_weaken_L]) 1);
   9.138  qed "LeadsTo_Un_distrib";
   9.139  
   9.140 -Goal "id: Acts ==> \
   9.141 -\       LeadsTo(Init,Acts) (UN i:I. A i) B  =  \
   9.142 -\       (ALL i : I. LeadsTo(Init,Acts) (A i) B)";
   9.143 +Goal "id: (Acts prg) ==> \
   9.144 +\       LeadsTo prg (UN i:I. A i) B  =  \
   9.145 +\       (ALL i : I. LeadsTo prg (A i) B)";
   9.146  by (blast_tac (claset() addIs [LeadsTo_UN, LeadsTo_weaken_L]) 1);
   9.147  qed "LeadsTo_UN_distrib";
   9.148  
   9.149 -Goal "id: Acts ==> \
   9.150 -\       LeadsTo(Init,Acts) (Union S) B  =  \
   9.151 -\       (ALL A : S. LeadsTo(Init,Acts) A B)";
   9.152 +Goal "id: (Acts prg) ==> \
   9.153 +\       LeadsTo prg (Union S) B  =  \
   9.154 +\       (ALL A : S. LeadsTo prg A B)";
   9.155  by (blast_tac (claset() addIs [LeadsTo_Union, LeadsTo_weaken_L]) 1);
   9.156  qed "LeadsTo_Union_distrib";
   9.157  
   9.158  
   9.159 -Goal "[| LeadsTo(Init,Acts) A A'; id: Acts;   \
   9.160 -\        reachable(Init,Acts) Int B  <= A;     \
   9.161 -\        reachable(Init,Acts) Int A' <= B' |] \
   9.162 -\     ==> LeadsTo(Init,Acts) B B'";
   9.163 +Goal "[| LeadsTo prg A A'; id: (Acts prg);   \
   9.164 +\        reachable prg Int B  <= A;     \
   9.165 +\        reachable prg Int A' <= B' |] \
   9.166 +\     ==> LeadsTo prg B B'";
   9.167  (*PROOF FAILED: why?*)
   9.168  by (blast_tac (claset() addIs [LeadsTo_Trans, LeadsTo_weaken_R,
   9.169  			       LeadsTo_weaken_L]) 1);
   9.170  qed "LeadsTo_weaken";
   9.171  
   9.172  
   9.173 -(*Set difference: maybe combine with leadsTo_weaken_L??*)
   9.174 -Goal "[| LeadsTo(Init,Acts) (A-B) C; LeadsTo(Init,Acts) B C; id: Acts |] \
   9.175 -\       ==> LeadsTo(Init,Acts) A C";
   9.176 +(*Set difference: maybe combine with leadsTo_weaken_L??
   9.177 +  This is the most useful form of the "disjunction" rule*)
   9.178 +Goal "[| LeadsTo prg (A-B) C; LeadsTo prg B C; id: (Acts prg) |] \
   9.179 +\       ==> LeadsTo prg A C";
   9.180  by (blast_tac (claset() addIs [LeadsTo_Un, LeadsTo_weaken]) 1);
   9.181  qed "LeadsTo_Diff";
   9.182  
   9.183 @@ -156,8 +153,8 @@
   9.184      see ball_constrains_UN in UNITY.ML***)
   9.185  
   9.186  val prems = goal thy
   9.187 -   "(!! i. i:I ==> LeadsTo(Init,Acts) (A i) (A' i)) \
   9.188 -\   ==> LeadsTo(Init,Acts) (UN i:I. A i) (UN i:I. A' i)";
   9.189 +   "(!! i. i:I ==> LeadsTo prg (A i) (A' i)) \
   9.190 +\   ==> LeadsTo prg (UN i:I. A i) (UN i:I. A' i)";
   9.191  by (simp_tac (simpset() addsimps [Union_image_eq RS sym]) 1);
   9.192  by (blast_tac (claset() addIs [LeadsTo_Union, LeadsTo_weaken_R] 
   9.193                          addIs prems) 1);
   9.194 @@ -166,22 +163,22 @@
   9.195  
   9.196  (*Version with no index set*)
   9.197  val prems = goal thy
   9.198 -   "(!! i. LeadsTo(Init,Acts) (A i) (A' i)) \
   9.199 -\   ==> LeadsTo(Init,Acts) (UN i. A i) (UN i. A' i)";
   9.200 +   "(!! i. LeadsTo prg (A i) (A' i)) \
   9.201 +\   ==> LeadsTo prg (UN i. A i) (UN i. A' i)";
   9.202  by (blast_tac (claset() addIs [LeadsTo_UN_UN] 
   9.203                          addIs prems) 1);
   9.204  qed "LeadsTo_UN_UN_noindex";
   9.205  
   9.206  (*Version with no index set*)
   9.207 -Goal "ALL i. LeadsTo(Init,Acts) (A i) (A' i) \
   9.208 -\           ==> LeadsTo(Init,Acts) (UN i. A i) (UN i. A' i)";
   9.209 +Goal "ALL i. LeadsTo prg (A i) (A' i) \
   9.210 +\           ==> LeadsTo prg (UN i. A i) (UN i. A' i)";
   9.211  by (blast_tac (claset() addIs [LeadsTo_UN_UN]) 1);
   9.212  qed "all_LeadsTo_UN_UN";
   9.213  
   9.214  
   9.215  (*Binary union version*)
   9.216 -Goal "[| LeadsTo(Init,Acts) A A'; LeadsTo(Init,Acts) B B' |] \
   9.217 -\                 ==> LeadsTo(Init,Acts) (A Un B) (A' Un B')";
   9.218 +Goal "[| LeadsTo prg A A'; LeadsTo prg B B' |] \
   9.219 +\                 ==> LeadsTo prg (A Un B) (A' Un B')";
   9.220  by (blast_tac (claset() addIs [LeadsTo_Un, 
   9.221  			       LeadsTo_weaken_R]) 1);
   9.222  qed "LeadsTo_Un_Un";
   9.223 @@ -189,28 +186,28 @@
   9.224  
   9.225  (** The cancellation law **)
   9.226  
   9.227 -Goal "[| LeadsTo(Init,Acts) A (A' Un B); LeadsTo(Init,Acts) B B'; \
   9.228 -\              id: Acts |]    \
   9.229 -\           ==> LeadsTo(Init,Acts) A (A' Un B')";
   9.230 +Goal "[| LeadsTo prg A (A' Un B); LeadsTo prg B B'; \
   9.231 +\              id: (Acts prg) |]    \
   9.232 +\           ==> LeadsTo prg A (A' Un B')";
   9.233  by (blast_tac (claset() addIs [LeadsTo_Un_Un, 
   9.234  			       subset_imp_LeadsTo, LeadsTo_Trans]) 1);
   9.235  qed "LeadsTo_cancel2";
   9.236  
   9.237 -Goal "[| LeadsTo(Init,Acts) A (A' Un B); LeadsTo(Init,Acts) (B-A') B'; id: Acts |] \
   9.238 -\           ==> LeadsTo(Init,Acts) A (A' Un B')";
   9.239 +Goal "[| LeadsTo prg A (A' Un B); LeadsTo prg (B-A') B'; id: (Acts prg) |] \
   9.240 +\           ==> LeadsTo prg A (A' Un B')";
   9.241  by (rtac LeadsTo_cancel2 1);
   9.242  by (assume_tac 2);
   9.243  by (ALLGOALS Asm_simp_tac);
   9.244  qed "LeadsTo_cancel_Diff2";
   9.245  
   9.246 -Goal "[| LeadsTo(Init,Acts) A (B Un A'); LeadsTo(Init,Acts) B B'; id: Acts |] \
   9.247 -\           ==> LeadsTo(Init,Acts) A (B' Un A')";
   9.248 +Goal "[| LeadsTo prg A (B Un A'); LeadsTo prg B B'; id: (Acts prg) |] \
   9.249 +\           ==> LeadsTo prg A (B' Un A')";
   9.250  by (asm_full_simp_tac (simpset() addsimps [Un_commute]) 1);
   9.251  by (blast_tac (claset() addSIs [LeadsTo_cancel2]) 1);
   9.252  qed "LeadsTo_cancel1";
   9.253  
   9.254 -Goal "[| LeadsTo(Init,Acts) A (B Un A'); LeadsTo(Init,Acts) (B-A') B'; id: Acts |] \
   9.255 -\           ==> LeadsTo(Init,Acts) A (B' Un A')";
   9.256 +Goal "[| LeadsTo prg A (B Un A'); LeadsTo prg (B-A') B'; id: (Acts prg) |] \
   9.257 +\           ==> LeadsTo prg A (B' Un A')";
   9.258  by (rtac LeadsTo_cancel1 1);
   9.259  by (assume_tac 2);
   9.260  by (ALLGOALS Asm_simp_tac);
   9.261 @@ -220,7 +217,7 @@
   9.262  
   9.263  (** The impossibility law **)
   9.264  
   9.265 -Goal "LeadsTo(Init,Acts) A {} ==> reachable(Init,Acts) Int A  = {}";
   9.266 +Goal "LeadsTo prg A {} ==> reachable prg Int A  = {}";
   9.267  by (full_simp_tac (simpset() addsimps [LeadsTo_def]) 1);
   9.268  by (etac leadsTo_empty 1);
   9.269  qed "LeadsTo_empty";
   9.270 @@ -229,20 +226,20 @@
   9.271  (** PSP: Progress-Safety-Progress **)
   9.272  
   9.273  (*Special case of PSP: Misra's "stable conjunction".  Doesn't need id:Acts. *)
   9.274 -Goal "[| LeadsTo(Init,Acts) A A'; stable Acts B |] \
   9.275 -\           ==> LeadsTo(Init,Acts) (A Int B) (A' Int B)";
   9.276 +Goal "[| LeadsTo prg A A'; stable (Acts prg) B |] \
   9.277 +\           ==> LeadsTo prg (A Int B) (A' Int B)";
   9.278  by (asm_full_simp_tac (simpset() addsimps [LeadsTo_def, Int_assoc RS sym, 
   9.279  					   PSP_stable]) 1);
   9.280  qed "R_PSP_stable";
   9.281  
   9.282 -Goal "[| LeadsTo(Init,Acts) A A'; stable Acts B |] \
   9.283 -\             ==> LeadsTo(Init,Acts) (B Int A) (B Int A')";
   9.284 +Goal "[| LeadsTo prg A A'; stable (Acts prg) B |] \
   9.285 +\             ==> LeadsTo prg (B Int A) (B Int A')";
   9.286  by (asm_simp_tac (simpset() addsimps (R_PSP_stable::Int_ac)) 1);
   9.287  qed "R_PSP_stable2";
   9.288  
   9.289  
   9.290 -Goal "[| LeadsTo(Init,Acts) A A'; constrains Acts B B'; id: Acts |] \
   9.291 -\           ==> LeadsTo(Init,Acts) (A Int B) ((A' Int B) Un (B' - B))";
   9.292 +Goal "[| LeadsTo prg A A'; constrains (Acts prg) B B'; id: (Acts prg) |] \
   9.293 +\           ==> LeadsTo prg (A Int B) ((A' Int B) Un (B' - B))";
   9.294  by (full_simp_tac (simpset() addsimps [LeadsTo_def]) 1);
   9.295  by (dtac PSP 1);
   9.296  by (etac constrains_reachable 1);
   9.297 @@ -250,14 +247,14 @@
   9.298  by (ALLGOALS Blast_tac);
   9.299  qed "R_PSP";
   9.300  
   9.301 -Goal "[| LeadsTo(Init,Acts) A A'; constrains Acts B B'; id: Acts |] \
   9.302 -\           ==> LeadsTo(Init,Acts) (B Int A) ((B Int A') Un (B' - B))";
   9.303 +Goal "[| LeadsTo prg A A'; constrains (Acts prg) B B'; id: (Acts prg) |] \
   9.304 +\           ==> LeadsTo prg (B Int A) ((B Int A') Un (B' - B))";
   9.305  by (asm_simp_tac (simpset() addsimps (R_PSP::Int_ac)) 1);
   9.306  qed "R_PSP2";
   9.307  
   9.308  Goalw [unless_def]
   9.309 -   "[| LeadsTo(Init,Acts) A A'; unless Acts B B'; id: Acts |] \
   9.310 -\           ==> LeadsTo(Init,Acts) (A Int B) ((A' Int B) Un B')";
   9.311 +   "[| LeadsTo prg A A'; unless (Acts prg) B B'; id: (Acts prg) |] \
   9.312 +\           ==> LeadsTo prg (A Int B) ((A' Int B) Un B')";
   9.313  by (dtac R_PSP 1);
   9.314  by (assume_tac 1);
   9.315  by (asm_full_simp_tac (simpset() addsimps [Un_Diff_Diff, Int_Diff_Un]) 2);
   9.316 @@ -272,10 +269,10 @@
   9.317  
   9.318  (** Meta or object quantifier ????? **)
   9.319  Goal "[| wf r;     \
   9.320 -\              ALL m. LeadsTo(Init,Acts) (A Int f-``{m})                     \
   9.321 +\              ALL m. LeadsTo prg (A Int f-``{m})                     \
   9.322  \                                       ((A Int f-``(r^-1 ^^ {m})) Un B);   \
   9.323 -\              id: Acts |] \
   9.324 -\           ==> LeadsTo(Init,Acts) A B";
   9.325 +\              id: (Acts prg) |] \
   9.326 +\           ==> LeadsTo prg A B";
   9.327  by (full_simp_tac (simpset() addsimps [LeadsTo_def]) 1);
   9.328  by (etac leadsTo_wf_induct 1);
   9.329  by (assume_tac 2);
   9.330 @@ -284,10 +281,10 @@
   9.331  
   9.332  
   9.333  Goal "[| wf r;     \
   9.334 -\        ALL m:I. LeadsTo(Init,Acts) (A Int f-``{m})                   \
   9.335 +\        ALL m:I. LeadsTo prg (A Int f-``{m})                   \
   9.336  \                                    ((A Int f-``(r^-1 ^^ {m})) Un B);   \
   9.337 -\        id: Acts |] \
   9.338 -\     ==> LeadsTo(Init,Acts) A ((A - (f-``I)) Un B)";
   9.339 +\        id: (Acts prg) |] \
   9.340 +\     ==> LeadsTo prg A ((A - (f-``I)) Un B)";
   9.341  by (etac LeadsTo_wf_induct 1);
   9.342  by Safe_tac;
   9.343  by (case_tac "m:I" 1);
   9.344 @@ -296,29 +293,29 @@
   9.345  qed "R_bounded_induct";
   9.346  
   9.347  
   9.348 -Goal "[| ALL m. LeadsTo(Init,Acts) (A Int f-``{m})                     \
   9.349 -\                                  ((A Int f-``(lessThan m)) Un B);   \
   9.350 -\        id: Acts |] \
   9.351 -\     ==> LeadsTo(Init,Acts) A B";
   9.352 +Goal "[| ALL m. LeadsTo prg (A Int f-``{m})                     \
   9.353 +\                           ((A Int f-``(lessThan m)) Un B);   \
   9.354 +\        id: (Acts prg) |] \
   9.355 +\     ==> LeadsTo prg A B";
   9.356  by (rtac (wf_less_than RS LeadsTo_wf_induct) 1);
   9.357  by (assume_tac 2);
   9.358  by (Asm_simp_tac 1);
   9.359  qed "R_lessThan_induct";
   9.360  
   9.361 -Goal "[| ALL m:(greaterThan l). LeadsTo(Init,Acts) (A Int f-``{m})   \
   9.362 +Goal "[| ALL m:(greaterThan l). LeadsTo prg (A Int f-``{m})   \
   9.363  \                                        ((A Int f-``(lessThan m)) Un B);   \
   9.364 -\              id: Acts |] \
   9.365 -\           ==> LeadsTo(Init,Acts) A ((A Int (f-``(atMost l))) Un B)";
   9.366 +\              id: (Acts prg) |] \
   9.367 +\           ==> LeadsTo prg A ((A Int (f-``(atMost l))) Un B)";
   9.368  by (simp_tac (HOL_ss addsimps [Diff_eq RS sym, vimage_Compl, Compl_greaterThan RS sym]) 1);
   9.369  by (rtac (wf_less_than RS R_bounded_induct) 1);
   9.370  by (assume_tac 2);
   9.371  by (Asm_simp_tac 1);
   9.372  qed "R_lessThan_bounded_induct";
   9.373  
   9.374 -Goal "[| ALL m:(lessThan l). LeadsTo(Init,Acts) (A Int f-``{m})   \
   9.375 +Goal "[| ALL m:(lessThan l). LeadsTo prg (A Int f-``{m})   \
   9.376  \                              ((A Int f-``(greaterThan m)) Un B);   \
   9.377 -\        id: Acts |] \
   9.378 -\     ==> LeadsTo(Init,Acts) A ((A Int (f-``(atLeast l))) Un B)";
   9.379 +\        id: (Acts prg) |] \
   9.380 +\     ==> LeadsTo prg A ((A Int (f-``(atLeast l))) Un B)";
   9.381  by (res_inst_tac [("f","f"),("f1", "%k. l - k")]
   9.382      (wf_less_than RS wf_inv_image RS LeadsTo_wf_induct) 1);
   9.383  by (assume_tac 2);
   9.384 @@ -333,19 +330,19 @@
   9.385  
   9.386  (*** Completion: Binary and General Finite versions ***)
   9.387  
   9.388 -Goal "[| LeadsTo(Init,Acts) A A';  stable Acts A';   \
   9.389 -\        LeadsTo(Init,Acts) B B';  stable Acts B';  id: Acts |] \
   9.390 -\     ==> LeadsTo(Init,Acts) (A Int B) (A' Int B')";
   9.391 +Goal "[| LeadsTo prg A A';  stable (Acts prg) A';   \
   9.392 +\        LeadsTo prg B B';  stable (Acts prg) B';  id: (Acts prg) |] \
   9.393 +\     ==> LeadsTo prg (A Int B) (A' Int B')";
   9.394  by (full_simp_tac (simpset() addsimps [LeadsTo_def]) 1);
   9.395  by (blast_tac (claset() addIs [stable_completion RS leadsTo_weaken] 
   9.396                          addSIs [stable_Int, stable_reachable]) 1);
   9.397  qed "R_stable_completion";
   9.398  
   9.399  
   9.400 -Goal "[| finite I;  id: Acts |]                     \
   9.401 -\     ==> (ALL i:I. LeadsTo(Init,Acts) (A i) (A' i)) -->  \
   9.402 -\         (ALL i:I. stable Acts (A' i)) -->         \
   9.403 -\         LeadsTo(Init,Acts) (INT i:I. A i) (INT i:I. A' i)";
   9.404 +Goal "[| finite I;  id: (Acts prg) |]                     \
   9.405 +\     ==> (ALL i:I. LeadsTo prg (A i) (A' i)) -->  \
   9.406 +\         (ALL i:I. stable (Acts prg) (A' i)) -->         \
   9.407 +\         LeadsTo prg (INT i:I. A i) (INT i:I. A' i)";
   9.408  by (etac finite_induct 1);
   9.409  by (Asm_simp_tac 1);
   9.410  by (asm_simp_tac 
   9.411 @@ -354,10 +351,10 @@
   9.412  qed_spec_mp "R_finite_stable_completion";
   9.413  
   9.414  
   9.415 -Goal "[| LeadsTo(Init,Acts) A (A' Un C);  constrains Acts A' (A' Un C); \
   9.416 -\        LeadsTo(Init,Acts) B (B' Un C);  constrains Acts B' (B' Un C); \
   9.417 -\        id: Acts |] \
   9.418 -\     ==> LeadsTo(Init,Acts) (A Int B) ((A' Int B') Un C)";
   9.419 +Goal "[| LeadsTo prg A (A' Un C);  constrains (Acts prg) A' (A' Un C); \
   9.420 +\        LeadsTo prg B (B' Un C);  constrains (Acts prg) B' (B' Un C); \
   9.421 +\        id: (Acts prg) |] \
   9.422 +\     ==> LeadsTo prg (A Int B) ((A' Int B') Un C)";
   9.423  by (full_simp_tac (simpset() addsimps [LeadsTo_def, Int_Un_distrib]) 1);
   9.424  by (dtac completion 1);
   9.425  by (assume_tac 2);
   9.426 @@ -368,10 +365,10 @@
   9.427  qed "R_completion";
   9.428  
   9.429  
   9.430 -Goal "[| finite I;  id: Acts |] \
   9.431 -\     ==> (ALL i:I. LeadsTo(Init,Acts) (A i) (A' i Un C)) -->  \
   9.432 -\         (ALL i:I. constrains Acts (A' i) (A' i Un C)) --> \
   9.433 -\         LeadsTo(Init,Acts) (INT i:I. A i) ((INT i:I. A' i) Un C)";
   9.434 +Goal "[| finite I;  id: (Acts prg) |] \
   9.435 +\     ==> (ALL i:I. LeadsTo prg (A i) (A' i Un C)) -->  \
   9.436 +\         (ALL i:I. constrains (Acts prg) (A' i) (A' i Un C)) --> \
   9.437 +\         LeadsTo prg (INT i:I. A i) ((INT i:I. A' i) Un C)";
   9.438  by (etac finite_induct 1);
   9.439  by (ALLGOALS Asm_simp_tac);
   9.440  by (Clarify_tac 1);
   9.441 @@ -384,32 +381,37 @@
   9.442  (*** Specialized laws for handling invariants ***)
   9.443  
   9.444  Goalw [transient_def]
   9.445 -    "[| reachable(Init,Acts) <= INV;  transient Acts (INV Int A) |]  \
   9.446 -\    ==> transient Acts (reachable(Init,Acts) Int A)";
   9.447 +    "[| reachable prg <= INV;  transient (Acts prg) (INV Int A) |]  \
   9.448 +\    ==> transient (Acts prg) (reachable prg Int A)";
   9.449  by (Clarify_tac 1);
   9.450  by (rtac bexI 1); 
   9.451  by (assume_tac 2);
   9.452  by (Blast_tac 1);
   9.453  qed "reachable_transient";
   9.454  
   9.455 -(*Uses the premise "invariant (Init,Acts)".  Raw theorem-proving on this
   9.456 +(*Uses the premise "invariant prg".  Raw theorem-proving on this
   9.457    inclusion is slow: the term contains a copy of the program.*)
   9.458 -Goal "[| invariant (Init,Acts) INV;      \
   9.459 -\        constrains Acts (INV Int (A - A')) (A Un A'); \
   9.460 -\        transient  Acts (INV Int (A-A')) |]   \
   9.461 -\     ==> LeadsTo(Init,Acts) A A'";
   9.462 +Goal "[| invariant prg INV;      \
   9.463 +\        constrains (Acts prg) (INV Int (A-A')) (A Un A'); \
   9.464 +\        transient  (Acts prg) (INV Int (A-A')) |]   \
   9.465 +\ ==> ensures (Acts prg) (reachable prg Int A) (reachable prg Int A')";
   9.466  bd invariant_includes_reachable 1;
   9.467 -by (rtac LeadsTo_Basis 1);
   9.468 +by (rtac ensuresI 1);
   9.469 +by (ALLGOALS 
   9.470 +    (full_simp_tac (simpset() addsimps [Int_Un_distrib RS sym, 
   9.471 +					Diff_Int_distrib RS sym])));
   9.472  by (blast_tac (claset() addSIs [reachable_transient]) 2);
   9.473 -by (rewtac constrains_def);
   9.474 -by (Blast_tac 1);
   9.475 -qed "invariant_LeadsTo_Basis";
   9.476 +br (stable_reachable RS stable_constrains_Int) 1;
   9.477 +by (blast_tac (claset() addIs [constrains_weaken]) 1);
   9.478 +qed "invariant_ensuresI";
   9.479 +
   9.480 +bind_thm ("invariant_LeadsTo_Basis", invariant_ensuresI RS LeadsTo_Basis);
   9.481  
   9.482  
   9.483 -Goal "[| invariant (Init,Acts) INV;      \
   9.484 -\        LeadsTo(Init,Acts) A A'; id: Acts;   \
   9.485 +Goal "[| invariant prg INV;      \
   9.486 +\        LeadsTo prg A A'; id: (Acts prg);   \
   9.487  \        INV Int B  <= A;  INV Int A' <= B' |] \
   9.488 -\     ==> LeadsTo(Init,Acts) B B'";
   9.489 +\     ==> LeadsTo prg B B'";
   9.490  by (blast_tac (claset() addDs [invariant_includes_reachable]
   9.491  			addIs [LeadsTo_weaken]) 1);
   9.492  qed "invariant_LeadsTo_weaken";
   9.493 @@ -425,8 +427,8 @@
   9.494     SELECT_GOAL
   9.495        (EVERY [TRY (rtac stableI 1),
   9.496  	      rtac constrainsI 1,
   9.497 -	      rewtac main_def,
   9.498 -	      REPEAT_FIRST (eresolve_tac [insertE, emptyE]),
   9.499 +	      full_simp_tac (simpset() addsimps [main_def]) 1,
   9.500 +	      REPEAT_FIRST (eresolve_tac [disjE]),
   9.501  	      rewrite_goals_tac cmd_defs,
   9.502  	      ALLGOALS (SELECT_GOAL Auto_tac)]);
   9.503  
    10.1 --- a/src/HOL/UNITY/SubstAx.thy	Wed Aug 05 10:56:58 1998 +0200
    10.2 +++ b/src/HOL/UNITY/SubstAx.thy	Wed Aug 05 10:57:25 1998 +0200
    10.3 @@ -10,10 +10,9 @@
    10.4  
    10.5  constdefs
    10.6  
    10.7 -   LeadsTo :: "['a set * ('a * 'a)set set, 'a set, 'a set] => bool"
    10.8 -    "LeadsTo == %(Init,Acts) A B.
    10.9 -		 leadsTo Acts (reachable (Init,Acts) Int A)
   10.10 -			      (reachable (Init,Acts) Int B)"
   10.11 -
   10.12 -
   10.13 +   LeadsTo :: "['a program, 'a set, 'a set] => bool"
   10.14 +    "LeadsTo prg A B ==
   10.15 +		 leadsTo (Acts prg)
   10.16 +                         (reachable prg  Int  A)
   10.17 +  		         (reachable prg  Int  B)"
   10.18  end
    11.1 --- a/src/HOL/UNITY/Token.ML	Wed Aug 05 10:56:58 1998 +0200
    11.2 +++ b/src/HOL/UNITY/Token.ML	Wed Aug 05 10:57:25 1998 +0200
    11.3 @@ -23,7 +23,7 @@
    11.4  qed "not_E_eq";
    11.5  
    11.6  (*This proof is in the "massaging" style and is much faster! *)
    11.7 -Goalw [stable_def] "stable Acts (Compl(E i) Un (HasTok i))";
    11.8 +Goalw [stable_def] "stable acts (Compl(E i) Un (HasTok i))";
    11.9  by (rtac constrains_weaken 1);
   11.10  by (rtac ([[TR2, TR4] MRS constrains_Un, TR5] MRS constrains_Un) 1);
   11.11  by (auto_tac (claset(), simpset() addsimps [not_E_eq]));
   11.12 @@ -77,7 +77,7 @@
   11.13  (*From "A Logic for Concurrent Programming", but not used in Chapter 4.
   11.14    Note the use of case_tac.  Reasoning about leadsTo takes practice!*)
   11.15  Goal "[| i<N; j<N |] ==>   \
   11.16 -\     leadsTo Acts (HasTok i) ({s. (token s, i) : nodeOrder j} Un HasTok j)";
   11.17 +\     leadsTo acts (HasTok i) ({s. (token s, i) : nodeOrder j} Un HasTok j)";
   11.18  by (case_tac "i=j" 1);
   11.19  by (blast_tac (claset() addIs [subset_imp_leadsTo]) 1);
   11.20  by (rtac (TR7 RS leadsTo_weaken_R) 1);
   11.21 @@ -88,7 +88,7 @@
   11.22  
   11.23  (*Chapter 4 variant, the one actually used below.*)
   11.24  Goal "[| i<N; j<N; i~=j |]    \
   11.25 -\     ==> leadsTo Acts (HasTok i) {s. (token s, i) : nodeOrder j}";
   11.26 +\     ==> leadsTo acts (HasTok i) {s. (token s, i) : nodeOrder j}";
   11.27  by (rtac (TR7 RS leadsTo_weaken_R) 1);
   11.28  by (Clarify_tac 1);
   11.29  by (asm_full_simp_tac (simpset() addsimps [HasTok_def, nodeOrder_eq]) 1);
   11.30 @@ -101,7 +101,7 @@
   11.31  
   11.32  
   11.33  (*Misra's TR9: the token reaches an arbitrary node*)
   11.34 -Goal "j<N ==> leadsTo Acts {s. token s < N} (HasTok j)";
   11.35 +Goal "j<N ==> leadsTo acts {s. token s < N} (HasTok j)";
   11.36  by (rtac leadsTo_weaken_R 1);
   11.37  by (res_inst_tac [("I", "Compl{j}"), ("f", "token"), ("B", "{}")]
   11.38       (wf_nodeOrder RS bounded_induct) 1);
   11.39 @@ -115,7 +115,7 @@
   11.40  qed "leadsTo_j";
   11.41  
   11.42  (*Misra's TR8: a hungry process eventually eats*)
   11.43 -Goal "j<N ==> leadsTo Acts ({s. token s < N} Int H j) (E j)";
   11.44 +Goal "j<N ==> leadsTo acts ({s. token s < N} Int H j) (E j)";
   11.45  by (rtac (leadsTo_cancel1 RS leadsTo_Un_duplicate) 1);
   11.46  by (rtac TR6 2);
   11.47  by (rtac leadsTo_weaken_R 1);
    12.1 --- a/src/HOL/UNITY/Token.thy	Wed Aug 05 10:56:58 1998 +0200
    12.2 +++ b/src/HOL/UNITY/Token.thy	Wed Aug 05 10:57:25 1998 +0200
    12.3 @@ -44,18 +44,18 @@
    12.4  rules
    12.5    N_positive "0<N"
    12.6  
    12.7 -  skip "id: Acts"
    12.8 +  skip "id: acts"
    12.9  
   12.10 -  TR2  "constrains Acts (T i) (T i Un H i)"
   12.11 +  TR2  "constrains acts (T i) (T i Un H i)"
   12.12  
   12.13 -  TR3  "constrains Acts (H i) (H i Un E i)"
   12.14 +  TR3  "constrains acts (H i) (H i Un E i)"
   12.15  
   12.16 -  TR4  "constrains Acts (H i - HasTok i) (H i)"
   12.17 +  TR4  "constrains acts (H i - HasTok i) (H i)"
   12.18  
   12.19 -  TR5  "constrains Acts (HasTok i) (HasTok i Un Compl(E i))"
   12.20 +  TR5  "constrains acts (HasTok i) (HasTok i Un Compl(E i))"
   12.21  
   12.22 -  TR6  "leadsTo Acts (H i Int HasTok i) (E i)"
   12.23 +  TR6  "leadsTo acts (H i Int HasTok i) (E i)"
   12.24  
   12.25 -  TR7  "leadsTo Acts (HasTok i) (HasTok (next i))"
   12.26 +  TR7  "leadsTo acts (HasTok i) (HasTok (next i))"
   12.27  
   12.28  end
    13.1 --- a/src/HOL/UNITY/Traces.ML	Wed Aug 05 10:56:58 1998 +0200
    13.2 +++ b/src/HOL/UNITY/Traces.ML	Wed Aug 05 10:57:25 1998 +0200
    13.3 @@ -9,74 +9,25 @@
    13.4  
    13.5  *)
    13.6  
    13.7 -(****
    13.8 -Now simulate the inductive definition (illegal due to paired arguments)
    13.9 -
   13.10 -inductive "reachable(Init,Acts)"
   13.11 -  intrs 
   13.12 -    Init  "s: Init ==> s : reachable(Init,Acts)"
   13.13 -
   13.14 -    Acts  "[| act: Acts;  s : reachable(Init,Acts);  (s,s'): act |]
   13.15 -	   ==> s' : reachable(Init,Acts)"
   13.16 -
   13.17 -This amounts to an equivalence proof for the definition actually used, 
   13.18 -****)
   13.19 -
   13.20 -
   13.21 -(** reachable: Deriving the Introduction rules **)
   13.22 -
   13.23 -Goal "s: Init ==> s : reachable(Init,Acts)";
   13.24 -by (simp_tac (simpset() addsimps [reachable_def]) 1);
   13.25 -by (blast_tac (claset() addIs traces.intrs) 1);
   13.26 -qed "reachable_Init";
   13.27 -
   13.28 +Goal "reachable prg = {s. EX evs. (s,evs): traces (Init prg) (Acts prg)}";
   13.29 +by Safe_tac;
   13.30 +by (etac traces.induct 2);
   13.31 +be reachable.induct 1;
   13.32 +by (ALLGOALS (blast_tac (claset() addIs (reachable.intrs @ traces.intrs))));
   13.33 +qed "reachable_equiv_traces";
   13.34  
   13.35 -Goal "[| act: Acts;  s : reachable(Init,Acts) |] \
   13.36 -\     ==> (s,s'): act --> s' : reachable(Init,Acts)";
   13.37 -by (asm_full_simp_tac (simpset() addsimps [reachable_def]) 1);
   13.38 -by (etac exE 1);
   13.39 -by (etac traces.induct 1);
   13.40 -by (ALLGOALS Asm_simp_tac);
   13.41 -by (ALLGOALS (blast_tac (claset() addIs traces.intrs)));
   13.42 -qed_spec_mp "reachable_Acts";
   13.43 -
   13.44 -
   13.45 -val major::prems = 
   13.46 -Goalw [reachable_def] 
   13.47 -  "[| za : reachable(Init,Acts);  \
   13.48 -\     !!s. s : Init ==> P s;      \
   13.49 -\     !!act s s'.  \
   13.50 -\        [| act : Acts; s : reachable(Init,Acts); P s; (s, s') : act |]  \
   13.51 -\        ==> P s' |] \
   13.52 -\  ==> P za";
   13.53 -by (cut_facts_tac [major] 1);
   13.54 -by Auto_tac;
   13.55 -by (etac traces.induct 1);
   13.56 -by (ALLGOALS (blast_tac (claset() addIs prems)));
   13.57 -qed "reachable_induct";
   13.58 -
   13.59 -structure reachable = 
   13.60 -  struct 
   13.61 -  val Init = reachable_Init
   13.62 -  val Acts = reachable_Acts
   13.63 -  val intrs = [reachable_Init, reachable_Acts]
   13.64 -  val induct = reachable_induct
   13.65 -  end;
   13.66 -
   13.67 -
   13.68 -
   13.69 -Goal "stable Acts (reachable(Init,Acts))";
   13.70 +Goal "stable (Acts prg) (reachable prg)";
   13.71  by (blast_tac (claset() addIs ([stableI, constrainsI] @ reachable.intrs)) 1);
   13.72  qed "stable_reachable";
   13.73  
   13.74  (*The set of all reachable states is an invariant...*)
   13.75 -Goal "invariant (Init,Acts) (reachable(Init,Acts))";
   13.76 +Goal "invariant prg (reachable prg)";
   13.77  by (simp_tac (simpset() addsimps [invariant_def]) 1);
   13.78  by (blast_tac (claset() addIs (stable_reachable::reachable.intrs)) 1);
   13.79  qed "invariant_reachable";
   13.80  
   13.81  (*...in fact the strongest invariant!*)
   13.82 -Goal "invariant (Init,Acts) A ==> reachable(Init,Acts) <= A";
   13.83 +Goal "invariant prg A ==> reachable prg <= A";
   13.84  by (full_simp_tac 
   13.85      (simpset() addsimps [stable_def, constrains_def, invariant_def]) 1);
   13.86  by (rtac subsetI 1);
   13.87 @@ -86,15 +37,15 @@
   13.88  
   13.89  (*If "A" includes the initial states and is stable then "A" is invariant.
   13.90    Result is trivial from the definition, but it is handy.*)
   13.91 -Goal "[| Init<=A;  stable Acts A |] ==> invariant (Init,Acts) A";
   13.92 +Goal "[| (Init prg)<=A;  stable (Acts prg) A |] ==> invariant prg A";
   13.93  by (asm_simp_tac (simpset() addsimps [invariant_def]) 1);
   13.94  qed "invariantI";
   13.95  
   13.96  
   13.97  (** Conjoining invariants **)
   13.98  
   13.99 -Goal "[| invariant (Init,Acts) A;  invariant (Init,Acts) B |] \
  13.100 -\     ==> invariant (Init,Acts) (A Int B)";
  13.101 +Goal "[| invariant prg A;  invariant prg B |] \
  13.102 +\     ==> invariant prg (A Int B)";
  13.103  by (asm_full_simp_tac (simpset() addsimps [invariant_def, stable_Int]) 1);
  13.104  by Auto_tac;
  13.105  qed "invariant_Int";
    14.1 --- a/src/HOL/UNITY/Traces.thy	Wed Aug 05 10:56:58 1998 +0200
    14.2 +++ b/src/HOL/UNITY/Traces.thy	Wed Aug 05 10:57:25 1998 +0200
    14.3 @@ -24,11 +24,22 @@
    14.4  	   ==> (s', s#evs) : traces Init Acts"
    14.5  
    14.6  
    14.7 +record 'a program =
    14.8 +  Init :: 'a set
    14.9 +  Acts :: "('a * 'a)set set"
   14.10 +
   14.11 +
   14.12 +consts reachable :: "'a program => 'a set"
   14.13 +
   14.14 +inductive "reachable prg"
   14.15 +  intrs 
   14.16 +    Init  "s: Init prg ==> s : reachable prg"
   14.17 +
   14.18 +    Acts  "[| act: Acts prg;  s : reachable prg;  (s,s'): act |]
   14.19 +	   ==> s' : reachable prg"
   14.20 +
   14.21  constdefs
   14.22 -  reachable :: "'a set * ('a * 'a)set set => 'a set"
   14.23 -  "reachable == %(Init,Acts). {s. EX evs. (s,evs): traces Init Acts}"
   14.24 -
   14.25 -  invariant :: "['a set * ('a * 'a)set set, 'a set] => bool"
   14.26 -  "invariant == %(Init,Acts) A. Init <= A & stable Acts A"
   14.27 +  invariant :: "['a program, 'a set] => bool"
   14.28 +  "invariant prg A == (Init prg) <= A & stable (Acts prg) A"
   14.29  
   14.30  end
    15.1 --- a/src/HOL/UNITY/UNITY.ML	Wed Aug 05 10:56:58 1998 +0200
    15.2 +++ b/src/HOL/UNITY/UNITY.ML	Wed Aug 05 10:57:25 1998 +0200
    15.3 @@ -15,97 +15,97 @@
    15.4  (*** constrains ***)
    15.5  
    15.6  val prems = goalw thy [constrains_def]
    15.7 -    "(!!act s s'. [| act: Acts;  (s,s') : act;  s: A |] ==> s': A') \
    15.8 -\    ==> constrains Acts A A'";
    15.9 +    "(!!act s s'. [| act: acts;  (s,s') : act;  s: A |] ==> s': A') \
   15.10 +\    ==> constrains acts A A'";
   15.11  by (blast_tac (claset() addIs prems) 1);
   15.12  qed "constrainsI";
   15.13  
   15.14  Goalw [constrains_def]
   15.15 -    "[| constrains Acts A A'; act: Acts;  (s,s'): act;  s: A |] \
   15.16 +    "[| constrains acts A A'; act: acts;  (s,s'): act;  s: A |] \
   15.17  \            ==> s': A'";
   15.18  by (Blast_tac 1);
   15.19  qed "constrainsD";
   15.20  
   15.21 -Goalw [constrains_def] "constrains Acts {} B";
   15.22 +Goalw [constrains_def] "constrains acts {} B";
   15.23  by (Blast_tac 1);
   15.24  qed "constrains_empty";
   15.25  
   15.26 -Goalw [constrains_def] "constrains Acts A UNIV";
   15.27 +Goalw [constrains_def] "constrains acts A UNIV";
   15.28  by (Blast_tac 1);
   15.29  qed "constrains_UNIV";
   15.30  AddIffs [constrains_empty, constrains_UNIV];
   15.31  
   15.32  Goalw [constrains_def]
   15.33 -    "[| constrains Acts A A'; A'<=B' |] ==> constrains Acts A B'";
   15.34 +    "[| constrains acts A A'; A'<=B' |] ==> constrains acts A B'";
   15.35  by (Blast_tac 1);
   15.36  qed "constrains_weaken_R";
   15.37  
   15.38  Goalw [constrains_def]
   15.39 -    "[| constrains Acts A A'; B<=A |] ==> constrains Acts B A'";
   15.40 +    "[| constrains acts A A'; B<=A |] ==> constrains acts B A'";
   15.41  by (Blast_tac 1);
   15.42  qed "constrains_weaken_L";
   15.43  
   15.44  Goalw [constrains_def]
   15.45 -   "[| constrains Acts A A'; B<=A; A'<=B' |] ==> constrains Acts B B'";
   15.46 +   "[| constrains acts A A'; B<=A; A'<=B' |] ==> constrains acts B B'";
   15.47  by (Blast_tac 1);
   15.48  qed "constrains_weaken";
   15.49  
   15.50  (*Set difference: UNUSED*)
   15.51  Goalw [constrains_def]
   15.52 -  "[| constrains Acts (A-B) C; constrains Acts B C |] \
   15.53 -\       ==> constrains Acts A C";
   15.54 +  "[| constrains acts (A-B) C; constrains acts B C |] \
   15.55 +\       ==> constrains acts A C";
   15.56  by (Blast_tac 1);
   15.57  qed "constrains_Diff";
   15.58  
   15.59  (** Union **)
   15.60  
   15.61  Goalw [constrains_def]
   15.62 -    "[| constrains Acts A A'; constrains Acts B B' |]   \
   15.63 -\           ==> constrains Acts (A Un B) (A' Un B')";
   15.64 +    "[| constrains acts A A'; constrains acts B B' |]   \
   15.65 +\           ==> constrains acts (A Un B) (A' Un B')";
   15.66  by (Blast_tac 1);
   15.67  qed "constrains_Un";
   15.68  
   15.69  Goalw [constrains_def]
   15.70 -    "ALL i:I. constrains Acts (A i) (A' i) \
   15.71 -\    ==> constrains Acts (UN i:I. A i) (UN i:I. A' i)";
   15.72 +    "ALL i:I. constrains acts (A i) (A' i) \
   15.73 +\    ==> constrains acts (UN i:I. A i) (UN i:I. A' i)";
   15.74  by (Blast_tac 1);
   15.75  qed "ball_constrains_UN";
   15.76  
   15.77  Goalw [constrains_def]
   15.78 -    "[| ALL i. constrains Acts (A i) (A' i) |] \
   15.79 -\           ==> constrains Acts (UN i. A i) (UN i. A' i)";
   15.80 +    "[| ALL i. constrains acts (A i) (A' i) |] \
   15.81 +\           ==> constrains acts (UN i. A i) (UN i. A' i)";
   15.82  by (Blast_tac 1);
   15.83  qed "all_constrains_UN";
   15.84  
   15.85  (** Intersection **)
   15.86  
   15.87  Goalw [constrains_def]
   15.88 -    "[| constrains Acts A A'; constrains Acts B B' |]   \
   15.89 -\           ==> constrains Acts (A Int B) (A' Int B')";
   15.90 +    "[| constrains acts A A'; constrains acts B B' |]   \
   15.91 +\           ==> constrains acts (A Int B) (A' Int B')";
   15.92  by (Blast_tac 1);
   15.93  qed "constrains_Int";
   15.94  
   15.95  Goalw [constrains_def]
   15.96 -    "ALL i:I. constrains Acts (A i) (A' i) \
   15.97 -\    ==> constrains Acts (INT i:I. A i) (INT i:I. A' i)";
   15.98 +    "ALL i:I. constrains acts (A i) (A' i) \
   15.99 +\    ==> constrains acts (INT i:I. A i) (INT i:I. A' i)";
  15.100  by (Blast_tac 1);
  15.101  qed "ball_constrains_INT";
  15.102  
  15.103  Goalw [constrains_def]
  15.104 -    "[| ALL i. constrains Acts (A i) (A' i) |] \
  15.105 -\           ==> constrains Acts (INT i. A i) (INT i. A' i)";
  15.106 +    "[| ALL i. constrains acts (A i) (A' i) |] \
  15.107 +\           ==> constrains acts (INT i. A i) (INT i. A' i)";
  15.108  by (Blast_tac 1);
  15.109  qed "all_constrains_INT";
  15.110  
  15.111  Goalw [stable_def, constrains_def]
  15.112 -    "[| stable Acts C; constrains Acts A (C Un A') |]   \
  15.113 -\           ==> constrains Acts (C Un A) (C Un A')";
  15.114 +    "[| stable acts C; constrains acts A (C Un A') |]   \
  15.115 +\           ==> constrains acts (C Un A) (C Un A')";
  15.116  by (Blast_tac 1);
  15.117  qed "stable_constrains_Un";
  15.118  
  15.119  Goalw [stable_def, constrains_def]
  15.120 -    "[| stable Acts C; constrains Acts (C Int A) A' |]   \
  15.121 -\           ==> constrains Acts (C Int A) (C Int A')";
  15.122 +    "[| stable acts C; constrains acts (C Int A) A' |]   \
  15.123 +\           ==> constrains acts (C Int A) (C Int A')";
  15.124  by (Blast_tac 1);
  15.125  qed "stable_constrains_Int";
  15.126  
  15.127 @@ -113,36 +113,36 @@
  15.128  (*** stable ***)
  15.129  
  15.130  Goalw [stable_def]
  15.131 -    "constrains Acts A A ==> stable Acts A";
  15.132 +    "constrains acts A A ==> stable acts A";
  15.133  by (assume_tac 1);
  15.134  qed "stableI";
  15.135  
  15.136  Goalw [stable_def]
  15.137 -    "stable Acts A ==> constrains Acts A A";
  15.138 +    "stable acts A ==> constrains acts A A";
  15.139  by (assume_tac 1);
  15.140  qed "stableD";
  15.141  
  15.142  Goalw [stable_def]
  15.143 -    "[| stable Acts A; stable Acts A' |]   \
  15.144 -\           ==> stable Acts (A Un A')";
  15.145 +    "[| stable acts A; stable acts A' |]   \
  15.146 +\           ==> stable acts (A Un A')";
  15.147  by (blast_tac (claset() addIs [constrains_Un]) 1);
  15.148  qed "stable_Un";
  15.149  
  15.150  Goalw [stable_def]
  15.151 -    "[| stable Acts A; stable Acts A' |]   \
  15.152 -\           ==> stable Acts (A Int A')";
  15.153 +    "[| stable acts A; stable acts A' |]   \
  15.154 +\           ==> stable acts (A Int A')";
  15.155  by (blast_tac (claset() addIs [constrains_Int]) 1);
  15.156  qed "stable_Int";
  15.157  
  15.158  Goalw [constrains_def]
  15.159 -    "[| constrains Acts A A'; id: Acts |] ==> A<=A'";
  15.160 +    "[| constrains acts A A'; id: acts |] ==> A<=A'";
  15.161  by (Blast_tac 1);
  15.162  qed "constrains_imp_subset";
  15.163  
  15.164  
  15.165  Goalw [constrains_def]
  15.166 -    "[| id: Acts; constrains Acts A B; constrains Acts B C |]   \
  15.167 -\           ==> constrains Acts A C";
  15.168 +    "[| id: acts; constrains acts A B; constrains acts B C |]   \
  15.169 +\           ==> constrains acts A C";
  15.170  by (Blast_tac 1);
  15.171  qed "constrains_trans";
  15.172  
  15.173 @@ -151,23 +151,23 @@
  15.174    Should the premise be !!m instead of ALL m ?  Would make it harder to use
  15.175    in forward proof.*)
  15.176  Goalw [constrains_def]
  15.177 -    "[| ALL m. constrains Acts {s. s x = m} (B m) |] \
  15.178 -\           ==> constrains Acts {s. P(s x)} (UN m. {s. P(m)} Int B m)";
  15.179 +    "[| ALL m. constrains acts {s. s x = m} (B m) |] \
  15.180 +\           ==> constrains acts {s. P(s x)} (UN m. {s. P(m)} Int B m)";
  15.181  by (Blast_tac 1);
  15.182  qed "elimination";
  15.183  
  15.184  (*As above, but for the trivial case of a one-variable state, in which the
  15.185    state is identified with its one variable.*)
  15.186  Goalw [constrains_def]
  15.187 -    "[| ALL m. constrains Acts {m} (B m) |] \
  15.188 -\           ==> constrains Acts {s. P s} (UN m. {s. P(m)} Int B m)";
  15.189 +    "[| ALL m. constrains acts {m} (B m) |] \
  15.190 +\           ==> constrains acts {s. P s} (UN m. {s. P(m)} Int B m)";
  15.191  by (Blast_tac 1);
  15.192  qed "elimination_sing";
  15.193  
  15.194  
  15.195  Goalw [constrains_def]
  15.196 -   "[| constrains Acts A (A' Un B); constrains Acts B B'; id: Acts |] \
  15.197 -\           ==> constrains Acts A (A' Un B')";
  15.198 +   "[| constrains acts A (A' Un B); constrains acts B B'; id: acts |] \
  15.199 +\           ==> constrains acts A (A' Un B')";
  15.200  by (Blast_tac 1);
  15.201  qed "constrains_cancel";
  15.202  
  15.203 @@ -176,11 +176,11 @@
  15.204  (*** Theoretical Results from Section 6 ***)
  15.205  
  15.206  Goalw [constrains_def, strongest_rhs_def]
  15.207 -    "constrains Acts A (strongest_rhs Acts A )";
  15.208 +    "constrains acts A (strongest_rhs acts A )";
  15.209  by (Blast_tac 1);
  15.210  qed "constrains_strongest_rhs";
  15.211  
  15.212  Goalw [constrains_def, strongest_rhs_def]
  15.213 -    "constrains Acts A B ==> strongest_rhs Acts A <= B";
  15.214 +    "constrains acts A B ==> strongest_rhs acts A <= B";
  15.215  by (Blast_tac 1);
  15.216  qed "strongest_rhs_is_strongest";
    16.1 --- a/src/HOL/UNITY/UNITY.thy	Wed Aug 05 10:56:58 1998 +0200
    16.2 +++ b/src/HOL/UNITY/UNITY.thy	Wed Aug 05 10:57:25 1998 +0200
    16.3 @@ -13,15 +13,15 @@
    16.4  constdefs
    16.5  
    16.6    constrains :: "[('a * 'a)set set, 'a set, 'a set] => bool"
    16.7 -    "constrains Acts A B == ALL act:Acts. act^^A <= B"
    16.8 +    "constrains acts A B == ALL act:acts. act^^A <= B"
    16.9  
   16.10    stable     :: "('a * 'a)set set => 'a set => bool"
   16.11 -    "stable Acts A == constrains Acts A A"
   16.12 +    "stable acts A == constrains acts A A"
   16.13  
   16.14    strongest_rhs :: "[('a * 'a)set set, 'a set] => 'a set"
   16.15 -    "strongest_rhs Acts A == Inter {B. constrains Acts A B}"
   16.16 +    "strongest_rhs acts A == Inter {B. constrains acts A B}"
   16.17  
   16.18    unless :: "[('a * 'a)set set, 'a set, 'a set] => bool"
   16.19 -    "unless Acts A B == constrains Acts (A-B) (A Un B)"
   16.20 +    "unless acts A B == constrains acts (A-B) (A Un B)"
   16.21  
   16.22  end
    17.1 --- a/src/HOL/UNITY/WFair.ML	Wed Aug 05 10:56:58 1998 +0200
    17.2 +++ b/src/HOL/UNITY/WFair.ML	Wed Aug 05 10:57:25 1998 +0200
    17.3 @@ -12,20 +12,20 @@
    17.4  (*** transient ***)
    17.5  
    17.6  Goalw [stable_def, constrains_def, transient_def]
    17.7 -    "[| stable Acts A; transient Acts A |] ==> A = {}";
    17.8 +    "[| stable acts A; transient acts A |] ==> A = {}";
    17.9  by (Blast_tac 1);
   17.10  qed "stable_transient_empty";
   17.11  
   17.12  Goalw [transient_def]
   17.13 -    "[| transient Acts A; B<=A |] ==> transient Acts B";
   17.14 +    "[| transient acts A; B<=A |] ==> transient acts B";
   17.15  by (Clarify_tac 1);
   17.16  by (rtac bexI 1 THEN assume_tac 2);
   17.17  by (Blast_tac 1);
   17.18  qed "transient_strengthen";
   17.19  
   17.20  Goalw [transient_def]
   17.21 -    "[| act:Acts;  A <= Domain act;  act^^A <= Compl A |] \
   17.22 -\         ==> transient Acts A";
   17.23 +    "[| act:acts;  A <= Domain act;  act^^A <= Compl A |] \
   17.24 +\         ==> transient acts A";
   17.25  by (Blast_tac 1);
   17.26  qed "transient_mem";
   17.27  
   17.28 @@ -33,34 +33,34 @@
   17.29  (*** ensures ***)
   17.30  
   17.31  Goalw [ensures_def]
   17.32 -    "[| constrains Acts (A-B) (A Un B); transient Acts (A-B) |] \
   17.33 -\    ==> ensures Acts A B";
   17.34 +    "[| constrains acts (A-B) (A Un B); transient acts (A-B) |] \
   17.35 +\    ==> ensures acts A B";
   17.36  by (Blast_tac 1);
   17.37  qed "ensuresI";
   17.38  
   17.39  Goalw [ensures_def]
   17.40 -    "ensures Acts A B  \
   17.41 -\    ==> constrains Acts (A-B) (A Un B) & transient Acts (A-B)";
   17.42 +    "ensures acts A B  \
   17.43 +\    ==> constrains acts (A-B) (A Un B) & transient acts (A-B)";
   17.44  by (Blast_tac 1);
   17.45  qed "ensuresD";
   17.46  
   17.47  (*The L-version (precondition strengthening) doesn't hold for ENSURES*)
   17.48  Goalw [ensures_def]
   17.49 -    "[| ensures Acts A A'; A'<=B' |] ==> ensures Acts A B'";
   17.50 +    "[| ensures acts A A'; A'<=B' |] ==> ensures acts A B'";
   17.51  by (blast_tac (claset() addIs [constrains_weaken, transient_strengthen]) 1);
   17.52  qed "ensures_weaken_R";
   17.53  
   17.54  Goalw [ensures_def, constrains_def, transient_def]
   17.55 -    "Acts ~= {} ==> ensures Acts A UNIV";
   17.56 +    "acts ~= {} ==> ensures acts A UNIV";
   17.57  by (Asm_simp_tac 1);  (*omitting this causes PROOF FAILED, even with Safe_tac*)
   17.58  by (Blast_tac 1);
   17.59  qed "ensures_UNIV";
   17.60  
   17.61  Goalw [ensures_def]
   17.62 -    "[| stable Acts C; \
   17.63 -\       constrains Acts (C Int (A - A')) (A Un A'); \
   17.64 -\       transient  Acts (C Int (A-A')) |]   \
   17.65 -\   ==> ensures Acts (C Int A) (C Int A')";
   17.66 +    "[| stable acts C; \
   17.67 +\       constrains acts (C Int (A - A')) (A Un A'); \
   17.68 +\       transient  acts (C Int (A-A')) |]   \
   17.69 +\   ==> ensures acts (C Int A) (C Int A')";
   17.70  by (asm_simp_tac (simpset() addsimps [Int_Un_distrib RS sym,
   17.71  				      Diff_Int_distrib RS sym,
   17.72  				      stable_constrains_Int]) 1);
   17.73 @@ -73,34 +73,34 @@
   17.74  bind_thm ("leadsTo_Basis", leadsto.Basis);
   17.75  bind_thm ("leadsTo_Trans", leadsto.Trans);
   17.76  
   17.77 -Goal "act: Acts ==> leadsTo Acts A UNIV";
   17.78 +Goal "act: acts ==> leadsTo acts A UNIV";
   17.79  by (blast_tac (claset() addIs [ensures_UNIV RS leadsTo_Basis]) 1);
   17.80  qed "leadsTo_UNIV";
   17.81  Addsimps [leadsTo_UNIV];
   17.82  
   17.83  (*Useful with cancellation, disjunction*)
   17.84 -Goal "leadsTo Acts A (A' Un A') ==> leadsTo Acts A A'";
   17.85 +Goal "leadsTo acts A (A' Un A') ==> leadsTo acts A A'";
   17.86  by (asm_full_simp_tac (simpset() addsimps Un_ac) 1);
   17.87  qed "leadsTo_Un_duplicate";
   17.88  
   17.89 -Goal "leadsTo Acts A (A' Un C Un C) ==> leadsTo Acts A (A' Un C)";
   17.90 +Goal "leadsTo acts A (A' Un C Un C) ==> leadsTo acts A (A' Un C)";
   17.91  by (asm_full_simp_tac (simpset() addsimps Un_ac) 1);
   17.92  qed "leadsTo_Un_duplicate2";
   17.93  
   17.94  (*The Union introduction rule as we should have liked to state it*)
   17.95  val prems = goal thy
   17.96 -    "(!!A. A : S ==> leadsTo Acts A B) ==> leadsTo Acts (Union S) B";
   17.97 +    "(!!A. A : S ==> leadsTo acts A B) ==> leadsTo acts (Union S) B";
   17.98  by (blast_tac (claset() addIs (leadsto.Union::prems)) 1);
   17.99  qed "leadsTo_Union";
  17.100  
  17.101  val prems = goal thy
  17.102 -    "(!!i. i : I ==> leadsTo Acts (A i) B) ==> leadsTo Acts (UN i:I. A i) B";
  17.103 +    "(!!i. i : I ==> leadsTo acts (A i) B) ==> leadsTo acts (UN i:I. A i) B";
  17.104  by (simp_tac (simpset() addsimps [Union_image_eq RS sym]) 1);
  17.105  by (blast_tac (claset() addIs (leadsto.Union::prems)) 1);
  17.106  qed "leadsTo_UN";
  17.107  
  17.108  (*Binary union introduction rule*)
  17.109 -Goal "[| leadsTo Acts A C; leadsTo Acts B C |] ==> leadsTo Acts (A Un B) C";
  17.110 +Goal "[| leadsTo acts A C; leadsTo acts B C |] ==> leadsTo acts (A Un B) C";
  17.111  by (stac Un_eq_Union 1);
  17.112  by (blast_tac (claset() addIs [leadsTo_Union]) 1);
  17.113  qed "leadsTo_Un";
  17.114 @@ -108,18 +108,18 @@
  17.115  
  17.116  (*The INDUCTION rule as we should have liked to state it*)
  17.117  val major::prems = goal thy
  17.118 -  "[| leadsTo Acts za zb;  \
  17.119 -\     !!A B. ensures Acts A B ==> P A B; \
  17.120 -\     !!A B C. [| leadsTo Acts A B; P A B; leadsTo Acts B C; P B C |] \
  17.121 +  "[| leadsTo acts za zb;  \
  17.122 +\     !!A B. ensures acts A B ==> P A B; \
  17.123 +\     !!A B C. [| leadsTo acts A B; P A B; leadsTo acts B C; P B C |] \
  17.124  \              ==> P A C; \
  17.125 -\     !!B S. ALL A:S. leadsTo Acts A B & P A B ==> P (Union S) B \
  17.126 +\     !!B S. ALL A:S. leadsTo acts A B & P A B ==> P (Union S) B \
  17.127  \  |] ==> P za zb";
  17.128  by (rtac (major RS leadsto.induct) 1);
  17.129  by (REPEAT (blast_tac (claset() addIs prems) 1));
  17.130  qed "leadsTo_induct";
  17.131  
  17.132  
  17.133 -Goal "[| A<=B;  id: Acts |] ==> leadsTo Acts A B";
  17.134 +Goal "[| A<=B;  id: acts |] ==> leadsTo acts A B";
  17.135  by (rtac leadsTo_Basis 1);
  17.136  by (rewrite_goals_tac [ensures_def, constrains_def, transient_def]);
  17.137  by (Blast_tac 1);
  17.138 @@ -130,8 +130,8 @@
  17.139  
  17.140  
  17.141  (*There's a direct proof by leadsTo_Trans and subset_imp_leadsTo, but it
  17.142 -  needs the extra premise id:Acts*)
  17.143 -Goal "leadsTo Acts A A' ==> A'<=B' --> leadsTo Acts A B'";
  17.144 +  needs the extra premise id:acts*)
  17.145 +Goal "leadsTo acts A A' ==> A'<=B' --> leadsTo acts A B'";
  17.146  by (etac leadsTo_induct 1);
  17.147  by (Clarify_tac 3);
  17.148  by (blast_tac (claset() addIs [leadsTo_Union]) 3);
  17.149 @@ -140,31 +140,31 @@
  17.150  qed_spec_mp "leadsTo_weaken_R";
  17.151  
  17.152  
  17.153 -Goal "[| leadsTo Acts A A'; B<=A; id: Acts |] ==>  \
  17.154 -\         leadsTo Acts B A'";
  17.155 +Goal "[| leadsTo acts A A'; B<=A; id: acts |] ==>  \
  17.156 +\         leadsTo acts B A'";
  17.157  by (blast_tac (claset() addIs [leadsTo_Basis, leadsTo_Trans, 
  17.158  			       subset_imp_leadsTo]) 1);
  17.159  qed_spec_mp "leadsTo_weaken_L";
  17.160  
  17.161  (*Distributes over binary unions*)
  17.162 -Goal "id: Acts ==> \
  17.163 -\       leadsTo Acts (A Un B) C  =  (leadsTo Acts A C & leadsTo Acts B C)";
  17.164 +Goal "id: acts ==> \
  17.165 +\       leadsTo acts (A Un B) C  =  (leadsTo acts A C & leadsTo acts B C)";
  17.166  by (blast_tac (claset() addIs [leadsTo_Un, leadsTo_weaken_L]) 1);
  17.167  qed "leadsTo_Un_distrib";
  17.168  
  17.169 -Goal "id: Acts ==> \
  17.170 -\       leadsTo Acts (UN i:I. A i) B  =  (ALL i : I. leadsTo Acts (A i) B)";
  17.171 +Goal "id: acts ==> \
  17.172 +\       leadsTo acts (UN i:I. A i) B  =  (ALL i : I. leadsTo acts (A i) B)";
  17.173  by (blast_tac (claset() addIs [leadsTo_UN, leadsTo_weaken_L]) 1);
  17.174  qed "leadsTo_UN_distrib";
  17.175  
  17.176 -Goal "id: Acts ==> \
  17.177 -\       leadsTo Acts (Union S) B  =  (ALL A : S. leadsTo Acts A B)";
  17.178 +Goal "id: acts ==> \
  17.179 +\       leadsTo acts (Union S) B  =  (ALL A : S. leadsTo acts A B)";
  17.180  by (blast_tac (claset() addIs [leadsTo_Union, leadsTo_weaken_L]) 1);
  17.181  qed "leadsTo_Union_distrib";
  17.182  
  17.183  
  17.184 -Goal "[| leadsTo Acts A A'; id: Acts; B<=A; A'<=B' |] \
  17.185 -\   ==> leadsTo Acts B B'";
  17.186 +Goal "[| leadsTo acts A A'; id: acts; B<=A; A'<=B' |] \
  17.187 +\   ==> leadsTo acts B B'";
  17.188  (*PROOF FAILED: why?*)
  17.189  by (blast_tac (claset() addIs [leadsTo_Trans, leadsTo_weaken_R,
  17.190  			       leadsTo_weaken_L]) 1);
  17.191 @@ -172,8 +172,8 @@
  17.192  
  17.193  
  17.194  (*Set difference: maybe combine with leadsTo_weaken_L??*)
  17.195 -Goal "[| leadsTo Acts (A-B) C; leadsTo Acts B C; id: Acts |] \
  17.196 -\       ==> leadsTo Acts A C";
  17.197 +Goal "[| leadsTo acts (A-B) C; leadsTo acts B C; id: acts |] \
  17.198 +\       ==> leadsTo acts A C";
  17.199  by (blast_tac (claset() addIs [leadsTo_Un, leadsTo_weaken]) 1);
  17.200  qed "leadsTo_Diff";
  17.201  
  17.202 @@ -182,8 +182,8 @@
  17.203      see ball_constrains_UN in UNITY.ML***)
  17.204  
  17.205  val prems = goal thy
  17.206 -   "(!! i. i:I ==> leadsTo Acts (A i) (A' i)) \
  17.207 -\   ==> leadsTo Acts (UN i:I. A i) (UN i:I. A' i)";
  17.208 +   "(!! i. i:I ==> leadsTo acts (A i) (A' i)) \
  17.209 +\   ==> leadsTo acts (UN i:I. A i) (UN i:I. A' i)";
  17.210  by (simp_tac (simpset() addsimps [Union_image_eq RS sym]) 1);
  17.211  by (blast_tac (claset() addIs [leadsTo_Union, leadsTo_weaken_R] 
  17.212                          addIs prems) 1);
  17.213 @@ -192,22 +192,22 @@
  17.214  
  17.215  (*Version with no index set*)
  17.216  val prems = goal thy
  17.217 -   "(!! i. leadsTo Acts (A i) (A' i)) \
  17.218 -\   ==> leadsTo Acts (UN i. A i) (UN i. A' i)";
  17.219 +   "(!! i. leadsTo acts (A i) (A' i)) \
  17.220 +\   ==> leadsTo acts (UN i. A i) (UN i. A' i)";
  17.221  by (blast_tac (claset() addIs [leadsTo_UN_UN] 
  17.222                          addIs prems) 1);
  17.223  qed "leadsTo_UN_UN_noindex";
  17.224  
  17.225  (*Version with no index set*)
  17.226 -Goal "ALL i. leadsTo Acts (A i) (A' i) \
  17.227 -\   ==> leadsTo Acts (UN i. A i) (UN i. A' i)";
  17.228 +Goal "ALL i. leadsTo acts (A i) (A' i) \
  17.229 +\   ==> leadsTo acts (UN i. A i) (UN i. A' i)";
  17.230  by (blast_tac (claset() addIs [leadsTo_UN_UN]) 1);
  17.231  qed "all_leadsTo_UN_UN";
  17.232  
  17.233  
  17.234  (*Binary union version*)
  17.235 -Goal "[| leadsTo Acts A A'; leadsTo Acts B B' |] \
  17.236 -\         ==> leadsTo Acts (A Un B) (A' Un B')";
  17.237 +Goal "[| leadsTo acts A A'; leadsTo acts B B' |] \
  17.238 +\         ==> leadsTo acts (A Un B) (A' Un B')";
  17.239  by (blast_tac (claset() addIs [leadsTo_Un, 
  17.240  			       leadsTo_weaken_R]) 1);
  17.241  qed "leadsTo_Un_Un";
  17.242 @@ -215,27 +215,27 @@
  17.243  
  17.244  (** The cancellation law **)
  17.245  
  17.246 -Goal "[| leadsTo Acts A (A' Un B); leadsTo Acts B B'; id: Acts |] \
  17.247 -\   ==> leadsTo Acts A (A' Un B')";
  17.248 +Goal "[| leadsTo acts A (A' Un B); leadsTo acts B B'; id: acts |] \
  17.249 +\   ==> leadsTo acts A (A' Un B')";
  17.250  by (blast_tac (claset() addIs [leadsTo_Un_Un, 
  17.251  			       subset_imp_leadsTo, leadsTo_Trans]) 1);
  17.252  qed "leadsTo_cancel2";
  17.253  
  17.254 -Goal "[| leadsTo Acts A (A' Un B); leadsTo Acts (B-A') B'; id: Acts |] \
  17.255 -\   ==> leadsTo Acts A (A' Un B')";
  17.256 +Goal "[| leadsTo acts A (A' Un B); leadsTo acts (B-A') B'; id: acts |] \
  17.257 +\   ==> leadsTo acts A (A' Un B')";
  17.258  by (rtac leadsTo_cancel2 1);
  17.259  by (assume_tac 2);
  17.260  by (ALLGOALS Asm_simp_tac);
  17.261  qed "leadsTo_cancel_Diff2";
  17.262  
  17.263 -Goal "[| leadsTo Acts A (B Un A'); leadsTo Acts B B'; id: Acts |] \
  17.264 -\   ==> leadsTo Acts A (B' Un A')";
  17.265 +Goal "[| leadsTo acts A (B Un A'); leadsTo acts B B'; id: acts |] \
  17.266 +\   ==> leadsTo acts A (B' Un A')";
  17.267  by (asm_full_simp_tac (simpset() addsimps [Un_commute]) 1);
  17.268  by (blast_tac (claset() addSIs [leadsTo_cancel2]) 1);
  17.269  qed "leadsTo_cancel1";
  17.270  
  17.271 -Goal "[| leadsTo Acts A (B Un A'); leadsTo Acts (B-A') B'; id: Acts |] \
  17.272 -\   ==> leadsTo Acts A (B' Un A')";
  17.273 +Goal "[| leadsTo acts A (B Un A'); leadsTo acts (B-A') B'; id: acts |] \
  17.274 +\   ==> leadsTo acts A (B' Un A')";
  17.275  by (rtac leadsTo_cancel1 1);
  17.276  by (assume_tac 2);
  17.277  by (ALLGOALS Asm_simp_tac);
  17.278 @@ -245,24 +245,24 @@
  17.279  
  17.280  (** The impossibility law **)
  17.281  
  17.282 -Goal "leadsTo Acts A B ==> B={} --> A={}";
  17.283 +Goal "leadsTo acts A B ==> B={} --> A={}";
  17.284  by (etac leadsTo_induct 1);
  17.285  by (ALLGOALS Asm_simp_tac);
  17.286  by (rewrite_goals_tac [ensures_def, constrains_def, transient_def]);
  17.287  by (Blast_tac 1);
  17.288  val lemma = result() RS mp;
  17.289  
  17.290 -Goal "leadsTo Acts A {} ==> A={}";
  17.291 +Goal "leadsTo acts A {} ==> A={}";
  17.292  by (blast_tac (claset() addSIs [lemma]) 1);
  17.293  qed "leadsTo_empty";
  17.294  
  17.295  
  17.296  (** PSP: Progress-Safety-Progress **)
  17.297  
  17.298 -(*Special case of PSP: Misra's "stable conjunction".  Doesn't need id:Acts. *)
  17.299 +(*Special case of PSP: Misra's "stable conjunction".  Doesn't need id:acts. *)
  17.300  Goalw [stable_def]
  17.301 -   "[| leadsTo Acts A A'; stable Acts B |] \
  17.302 -\   ==> leadsTo Acts (A Int B) (A' Int B)";
  17.303 +   "[| leadsTo acts A A'; stable acts B |] \
  17.304 +\   ==> leadsTo acts (A Int B) (A' Int B)";
  17.305  by (etac leadsTo_induct 1);
  17.306  by (simp_tac (simpset() addsimps [Int_Union_Union]) 3);
  17.307  by (blast_tac (claset() addIs [leadsTo_Union]) 3);
  17.308 @@ -274,15 +274,15 @@
  17.309  by (blast_tac (claset() addIs [transient_strengthen, constrains_Int]) 1);
  17.310  qed "PSP_stable";
  17.311  
  17.312 -Goal "[| leadsTo Acts A A'; stable Acts B |] \
  17.313 -\   ==> leadsTo Acts (B Int A) (B Int A')";
  17.314 +Goal "[| leadsTo acts A A'; stable acts B |] \
  17.315 +\   ==> leadsTo acts (B Int A) (B Int A')";
  17.316  by (asm_simp_tac (simpset() addsimps (PSP_stable::Int_ac)) 1);
  17.317  qed "PSP_stable2";
  17.318  
  17.319  
  17.320  Goalw [ensures_def]
  17.321 -   "[| ensures Acts A A'; constrains Acts B B' |] \
  17.322 -\   ==> ensures Acts (A Int B) ((A' Int B) Un (B' - B))";
  17.323 +   "[| ensures acts A A'; constrains acts B B' |] \
  17.324 +\   ==> ensures acts (A Int B) ((A' Int B) Un (B' - B))";
  17.325  by Safe_tac;
  17.326  by (blast_tac (claset() addIs [constrainsI] addDs [constrainsD]) 1);
  17.327  by (etac transient_strengthen 1);
  17.328 @@ -290,8 +290,8 @@
  17.329  qed "PSP_ensures";
  17.330  
  17.331  
  17.332 -Goal "[| leadsTo Acts A A'; constrains Acts B B'; id: Acts |] \
  17.333 -\           ==> leadsTo Acts (A Int B) ((A' Int B) Un (B' - B))";
  17.334 +Goal "[| leadsTo acts A A'; constrains acts B B'; id: acts |] \
  17.335 +\           ==> leadsTo acts (A Int B) ((A' Int B) Un (B' - B))";
  17.336  by (etac leadsTo_induct 1);
  17.337  by (simp_tac (simpset() addsimps [Int_Union_Union]) 3);
  17.338  by (blast_tac (claset() addIs [leadsTo_Union]) 3);
  17.339 @@ -304,15 +304,15 @@
  17.340  by (blast_tac (claset() addIs [leadsTo_Basis, PSP_ensures]) 1);
  17.341  qed "PSP";
  17.342  
  17.343 -Goal "[| leadsTo Acts A A'; constrains Acts B B'; id: Acts |] \
  17.344 -\   ==> leadsTo Acts (B Int A) ((B Int A') Un (B' - B))";
  17.345 +Goal "[| leadsTo acts A A'; constrains acts B B'; id: acts |] \
  17.346 +\   ==> leadsTo acts (B Int A) ((B Int A') Un (B' - B))";
  17.347  by (asm_simp_tac (simpset() addsimps (PSP::Int_ac)) 1);
  17.348  qed "PSP2";
  17.349  
  17.350  
  17.351  Goalw [unless_def]
  17.352 -   "[| leadsTo Acts A A'; unless Acts B B'; id: Acts |] \
  17.353 -\   ==> leadsTo Acts (A Int B) ((A' Int B) Un B')";
  17.354 +   "[| leadsTo acts A A'; unless acts B B'; id: acts |] \
  17.355 +\   ==> leadsTo acts (A Int B) ((A' Int B) Un B')";
  17.356  by (dtac PSP 1);
  17.357  by (assume_tac 1);
  17.358  by (asm_full_simp_tac (simpset() addsimps [Un_Diff_Diff, Int_Diff_Un]) 2);
  17.359 @@ -326,12 +326,12 @@
  17.360  (*** Proving the induction rules ***)
  17.361  
  17.362  Goal "[| wf r;     \
  17.363 -\        ALL m. leadsTo Acts (A Int f-``{m})                     \
  17.364 +\        ALL m. leadsTo acts (A Int f-``{m})                     \
  17.365  \                            ((A Int f-``(r^-1 ^^ {m})) Un B);   \
  17.366 -\        id: Acts |] \
  17.367 -\     ==> leadsTo Acts (A Int f-``{m}) B";
  17.368 +\        id: acts |] \
  17.369 +\     ==> leadsTo acts (A Int f-``{m}) B";
  17.370  by (eres_inst_tac [("a","m")] wf_induct 1);
  17.371 -by (subgoal_tac "leadsTo Acts (A Int (f -`` (r^-1 ^^ {x}))) B" 1);
  17.372 +by (subgoal_tac "leadsTo acts (A Int (f -`` (r^-1 ^^ {x}))) B" 1);
  17.373  by (stac vimage_eq_UN 2);
  17.374  by (asm_simp_tac (HOL_ss addsimps (UN_simps RL [sym])) 2);
  17.375  by (blast_tac (claset() addIs [leadsTo_UN]) 2);
  17.376 @@ -341,10 +341,10 @@
  17.377  
  17.378  (** Meta or object quantifier ????? **)
  17.379  Goal "[| wf r;     \
  17.380 -\        ALL m. leadsTo Acts (A Int f-``{m})                     \
  17.381 +\        ALL m. leadsTo acts (A Int f-``{m})                     \
  17.382  \                            ((A Int f-``(r^-1 ^^ {m})) Un B);   \
  17.383 -\        id: Acts |] \
  17.384 -\     ==> leadsTo Acts A B";
  17.385 +\        id: acts |] \
  17.386 +\     ==> leadsTo acts A B";
  17.387  by (res_inst_tac [("t", "A")] subst 1);
  17.388  by (rtac leadsTo_UN 2);
  17.389  by (etac lemma 2);
  17.390 @@ -354,10 +354,10 @@
  17.391  
  17.392  
  17.393  Goal "[| wf r;     \
  17.394 -\        ALL m:I. leadsTo Acts (A Int f-``{m})                   \
  17.395 +\        ALL m:I. leadsTo acts (A Int f-``{m})                   \
  17.396  \                            ((A Int f-``(r^-1 ^^ {m})) Un B);   \
  17.397 -\        id: Acts |] \
  17.398 -\     ==> leadsTo Acts A ((A - (f-``I)) Un B)";
  17.399 +\        id: acts |] \
  17.400 +\     ==> leadsTo acts A ((A - (f-``I)) Un B)";
  17.401  by (etac leadsTo_wf_induct 1);
  17.402  by Safe_tac;
  17.403  by (case_tac "m:I" 1);
  17.404 @@ -366,30 +366,30 @@
  17.405  qed "bounded_induct";
  17.406  
  17.407  
  17.408 -(*Alternative proof is via the lemma leadsTo Acts (A Int f-``(lessThan m)) B*)
  17.409 -Goal "[| ALL m. leadsTo Acts (A Int f-``{m})                     \
  17.410 +(*Alternative proof is via the lemma leadsTo acts (A Int f-``(lessThan m)) B*)
  17.411 +Goal "[| ALL m. leadsTo acts (A Int f-``{m})                     \
  17.412  \                            ((A Int f-``(lessThan m)) Un B);   \
  17.413 -\        id: Acts |] \
  17.414 -\     ==> leadsTo Acts A B";
  17.415 +\        id: acts |] \
  17.416 +\     ==> leadsTo acts A B";
  17.417  by (rtac (wf_less_than RS leadsTo_wf_induct) 1);
  17.418  by (assume_tac 2);
  17.419  by (Asm_simp_tac 1);
  17.420  qed "lessThan_induct";
  17.421  
  17.422 -Goal "[| ALL m:(greaterThan l). leadsTo Acts (A Int f-``{m})   \
  17.423 +Goal "[| ALL m:(greaterThan l). leadsTo acts (A Int f-``{m})   \
  17.424  \                                  ((A Int f-``(lessThan m)) Un B);   \
  17.425 -\        id: Acts |] \
  17.426 -\     ==> leadsTo Acts A ((A Int (f-``(atMost l))) Un B)";
  17.427 +\        id: acts |] \
  17.428 +\     ==> leadsTo acts A ((A Int (f-``(atMost l))) Un B)";
  17.429  by (simp_tac (HOL_ss addsimps [Diff_eq RS sym, vimage_Compl, Compl_greaterThan RS sym]) 1);
  17.430  by (rtac (wf_less_than RS bounded_induct) 1);
  17.431  by (assume_tac 2);
  17.432  by (Asm_simp_tac 1);
  17.433  qed "lessThan_bounded_induct";
  17.434  
  17.435 -Goal "[| ALL m:(lessThan l). leadsTo Acts (A Int f-``{m})   \
  17.436 +Goal "[| ALL m:(lessThan l). leadsTo acts (A Int f-``{m})   \
  17.437  \                              ((A Int f-``(greaterThan m)) Un B);   \
  17.438 -\        id: Acts |] \
  17.439 -\     ==> leadsTo Acts A ((A Int (f-``(atLeast l))) Un B)";
  17.440 +\        id: acts |] \
  17.441 +\     ==> leadsTo acts A ((A Int (f-``(atLeast l))) Un B)";
  17.442  by (res_inst_tac [("f","f"),("f1", "%k. l - k")]
  17.443      (wf_less_than RS wf_inv_image RS leadsTo_wf_induct) 1);
  17.444  by (assume_tac 2);
  17.445 @@ -405,22 +405,22 @@
  17.446  (*** wlt ****)
  17.447  
  17.448  (*Misra's property W3*)
  17.449 -Goalw [wlt_def] "leadsTo Acts (wlt Acts B) B";
  17.450 +Goalw [wlt_def] "leadsTo acts (wlt acts B) B";
  17.451  by (blast_tac (claset() addSIs [leadsTo_Union]) 1);
  17.452  qed "wlt_leadsTo";
  17.453  
  17.454 -Goalw [wlt_def] "leadsTo Acts A B ==> A <= wlt Acts B";
  17.455 +Goalw [wlt_def] "leadsTo acts A B ==> A <= wlt acts B";
  17.456  by (blast_tac (claset() addSIs [leadsTo_Union]) 1);
  17.457  qed "leadsTo_subset";
  17.458  
  17.459  (*Misra's property W2*)
  17.460 -Goal "id: Acts ==> leadsTo Acts A B = (A <= wlt Acts B)";
  17.461 +Goal "id: acts ==> leadsTo acts A B = (A <= wlt acts B)";
  17.462  by (blast_tac (claset() addSIs [leadsTo_subset, 
  17.463  				wlt_leadsTo RS leadsTo_weaken_L]) 1);
  17.464  qed "leadsTo_eq_subset_wlt";
  17.465  
  17.466  (*Misra's property W4*)
  17.467 -Goal "id: Acts ==> B <= wlt Acts B";
  17.468 +Goal "id: acts ==> B <= wlt acts B";
  17.469  by (asm_simp_tac (simpset() addsimps [leadsTo_eq_subset_wlt RS sym,
  17.470  				      subset_imp_leadsTo]) 1);
  17.471  qed "wlt_increasing";
  17.472 @@ -429,17 +429,17 @@
  17.473  (*Used in the Trans case below*)
  17.474  Goalw [constrains_def]
  17.475     "[| B <= A2;  \
  17.476 -\      constrains Acts (A1 - B) (A1 Un B); \
  17.477 -\      constrains Acts (A2 - C) (A2 Un C) |] \
  17.478 -\   ==> constrains Acts (A1 Un A2 - C) (A1 Un A2 Un C)";
  17.479 +\      constrains acts (A1 - B) (A1 Un B); \
  17.480 +\      constrains acts (A2 - C) (A2 Un C) |] \
  17.481 +\   ==> constrains acts (A1 Un A2 - C) (A1 Un A2 Un C)";
  17.482  by (Clarify_tac 1);
  17.483  by (blast_tac (claset() addSDs [bspec]) 1);
  17.484  val lemma1 = result();
  17.485  
  17.486  
  17.487  (*Lemma (1,2,3) of Misra's draft book, Chapter 4, "Progress"*)
  17.488 -Goal "[| leadsTo Acts A A';  id: Acts |] ==> \
  17.489 -\      EX B. A<=B & leadsTo Acts B A' & constrains Acts (B-A') (B Un A')";
  17.490 +Goal "[| leadsTo acts A A';  id: acts |] ==> \
  17.491 +\      EX B. A<=B & leadsTo acts B A' & constrains acts (B-A') (B Un A')";
  17.492  by (etac leadsTo_induct 1);
  17.493  (*Basis*)
  17.494  by (blast_tac (claset() addIs [leadsTo_Basis]
  17.495 @@ -458,10 +458,10 @@
  17.496  
  17.497  
  17.498  (*Misra's property W5*)
  17.499 -Goal "id: Acts ==> constrains Acts (wlt Acts B - B) (wlt Acts B)";
  17.500 +Goal "id: acts ==> constrains acts (wlt acts B - B) (wlt acts B)";
  17.501  by (forward_tac [wlt_leadsTo RS leadsTo_123] 1);
  17.502  by (Clarify_tac 1);
  17.503 -by (subgoal_tac "Ba = wlt Acts B" 1);
  17.504 +by (subgoal_tac "Ba = wlt acts B" 1);
  17.505  by (blast_tac (claset() addDs [leadsTo_eq_subset_wlt]) 2);
  17.506  by (Clarify_tac 1);
  17.507  by (asm_full_simp_tac (simpset() addsimps [wlt_increasing, Un_absorb2]) 1);
  17.508 @@ -470,20 +470,20 @@
  17.509  
  17.510  (*** Completion: Binary and General Finite versions ***)
  17.511  
  17.512 -Goal "[| leadsTo Acts A A';  stable Acts A';   \
  17.513 -\      leadsTo Acts B B';  stable Acts B';  id: Acts |] \
  17.514 -\   ==> leadsTo Acts (A Int B) (A' Int B')";
  17.515 -by (subgoal_tac "stable Acts (wlt Acts B')" 1);
  17.516 +Goal "[| leadsTo acts A A';  stable acts A';   \
  17.517 +\      leadsTo acts B B';  stable acts B';  id: acts |] \
  17.518 +\   ==> leadsTo acts (A Int B) (A' Int B')";
  17.519 +by (subgoal_tac "stable acts (wlt acts B')" 1);
  17.520  by (asm_full_simp_tac (simpset() addsimps [stable_def]) 2);
  17.521  by (EVERY [etac (constrains_Un RS constrains_weaken) 2,
  17.522  	   etac wlt_constrains_wlt 2,
  17.523  	   fast_tac (claset() addEs [wlt_increasing RSN (2,rev_subsetD)]) 3,
  17.524  	   Blast_tac 2]);
  17.525 -by (subgoal_tac "leadsTo Acts (A Int wlt Acts B') (A' Int wlt Acts B')" 1);
  17.526 +by (subgoal_tac "leadsTo acts (A Int wlt acts B') (A' Int wlt acts B')" 1);
  17.527  by (blast_tac (claset() addIs [PSP_stable]) 2);
  17.528 -by (subgoal_tac "leadsTo Acts (A' Int wlt Acts B') (A' Int B')" 1);
  17.529 +by (subgoal_tac "leadsTo acts (A' Int wlt acts B') (A' Int B')" 1);
  17.530  by (blast_tac (claset() addIs [wlt_leadsTo, PSP_stable2]) 2);
  17.531 -by (subgoal_tac "leadsTo Acts (A Int B) (A Int wlt Acts B')" 1);
  17.532 +by (subgoal_tac "leadsTo acts (A Int B) (A Int wlt acts B')" 1);
  17.533  by (blast_tac (claset() addIs [leadsTo_subset RS subsetD, 
  17.534  			       subset_imp_leadsTo]) 2);
  17.535  (*Blast_tac gives PROOF FAILED*)
  17.536 @@ -491,10 +491,10 @@
  17.537  qed "stable_completion";
  17.538  
  17.539  
  17.540 -Goal "[| finite I;  id: Acts |]                     \
  17.541 -\   ==> (ALL i:I. leadsTo Acts (A i) (A' i)) -->  \
  17.542 -\       (ALL i:I. stable Acts (A' i)) -->         \
  17.543 -\       leadsTo Acts (INT i:I. A i) (INT i:I. A' i)";
  17.544 +Goal "[| finite I;  id: acts |]                     \
  17.545 +\   ==> (ALL i:I. leadsTo acts (A i) (A' i)) -->  \
  17.546 +\       (ALL i:I. stable acts (A' i)) -->         \
  17.547 +\       leadsTo acts (INT i:I. A i) (INT i:I. A' i)";
  17.548  by (etac finite_induct 1);
  17.549  by (Asm_simp_tac 1);
  17.550  by (asm_simp_tac 
  17.551 @@ -503,21 +503,21 @@
  17.552  qed_spec_mp "finite_stable_completion";
  17.553  
  17.554  
  17.555 -Goal "[| W = wlt Acts (B' Un C);     \
  17.556 -\      leadsTo Acts A (A' Un C);  constrains Acts A' (A' Un C);   \
  17.557 -\      leadsTo Acts B (B' Un C);  constrains Acts B' (B' Un C);   \
  17.558 -\      id: Acts |] \
  17.559 -\   ==> leadsTo Acts (A Int B) ((A' Int B') Un C)";
  17.560 -by (subgoal_tac "constrains Acts (W-C) (W Un B' Un C)" 1);
  17.561 +Goal "[| W = wlt acts (B' Un C);     \
  17.562 +\      leadsTo acts A (A' Un C);  constrains acts A' (A' Un C);   \
  17.563 +\      leadsTo acts B (B' Un C);  constrains acts B' (B' Un C);   \
  17.564 +\      id: acts |] \
  17.565 +\   ==> leadsTo acts (A Int B) ((A' Int B') Un C)";
  17.566 +by (subgoal_tac "constrains acts (W-C) (W Un B' Un C)" 1);
  17.567  by (blast_tac (claset() addIs [[asm_rl, wlt_constrains_wlt] 
  17.568  			       MRS constrains_Un RS constrains_weaken]) 2);
  17.569 -by (subgoal_tac "constrains Acts (W-C) W" 1);
  17.570 +by (subgoal_tac "constrains acts (W-C) W" 1);
  17.571  by (asm_full_simp_tac 
  17.572      (simpset() addsimps [wlt_increasing, Un_assoc, Un_absorb2]) 2);
  17.573 -by (subgoal_tac "leadsTo Acts (A Int W - C) (A' Int W Un C)" 1);
  17.574 +by (subgoal_tac "leadsTo acts (A Int W - C) (A' Int W Un C)" 1);
  17.575  by (simp_tac (simpset() addsimps [Int_Diff]) 2);
  17.576  by (blast_tac (claset() addIs [wlt_leadsTo, PSP RS leadsTo_weaken_R]) 2);
  17.577 -by (subgoal_tac "leadsTo Acts (A' Int W Un C) (A' Int B' Un C)" 1);
  17.578 +by (subgoal_tac "leadsTo acts (A' Int W Un C) (A' Int B' Un C)" 1);
  17.579  by (blast_tac (claset() addIs [wlt_leadsTo, leadsTo_Un_Un, 
  17.580                                 PSP2 RS leadsTo_weaken_R, 
  17.581  			       subset_refl RS subset_imp_leadsTo, 
  17.582 @@ -532,10 +532,10 @@
  17.583  bind_thm("completion", refl RS result());
  17.584  
  17.585  
  17.586 -Goal "[| finite I;  id: Acts |] \
  17.587 -\   ==> (ALL i:I. leadsTo Acts (A i) (A' i Un C)) -->  \
  17.588 -\       (ALL i:I. constrains Acts (A' i) (A' i Un C)) --> \
  17.589 -\       leadsTo Acts (INT i:I. A i) ((INT i:I. A' i) Un C)";
  17.590 +Goal "[| finite I;  id: acts |] \
  17.591 +\   ==> (ALL i:I. leadsTo acts (A i) (A' i Un C)) -->  \
  17.592 +\       (ALL i:I. constrains acts (A' i) (A' i Un C)) --> \
  17.593 +\       leadsTo acts (INT i:I. A i) ((INT i:I. A' i) Un C)";
  17.594  by (etac finite_induct 1);
  17.595  by (ALLGOALS Asm_simp_tac);
  17.596  by (Clarify_tac 1);
    18.1 --- a/src/HOL/UNITY/WFair.thy	Wed Aug 05 10:56:58 1998 +0200
    18.2 +++ b/src/HOL/UNITY/WFair.thy	Wed Aug 05 10:57:25 1998 +0200
    18.3 @@ -15,37 +15,37 @@
    18.4    (*This definition specifies weak fairness.  The rest of the theory
    18.5      is generic to all forms of fairness.*)
    18.6    transient :: "[('a * 'a)set set, 'a set] => bool"
    18.7 -    "transient Acts A == EX act:Acts. A <= Domain act & act^^A <= Compl A"
    18.8 +    "transient acts A == EX act:acts. A <= Domain act & act^^A <= Compl A"
    18.9  
   18.10    ensures :: "[('a * 'a)set set, 'a set, 'a set] => bool"
   18.11 -    "ensures Acts A B == constrains Acts (A-B) (A Un B) & transient Acts (A-B)"
   18.12 -			(*(unless Acts A B) would be equivalent*)
   18.13 +    "ensures acts A B == constrains acts (A-B) (A Un B) & transient acts (A-B)"
   18.14 +			(*(unless acts A B) would be equivalent*)
   18.15  
   18.16  consts leadsTo :: "[('a * 'a)set set, 'a set, 'a set] => bool"
   18.17         leadsto :: "[('a * 'a)set set] => ('a set * 'a set) set"
   18.18    
   18.19  translations
   18.20 -  "leadsTo Acts A B" == "(A,B) : leadsto Acts"
   18.21 +  "leadsTo acts A B" == "(A,B) : leadsto acts"
   18.22  
   18.23 -inductive "leadsto Acts"
   18.24 +inductive "leadsto acts"
   18.25    intrs 
   18.26  
   18.27 -    Basis  "ensures Acts A B ==> leadsTo Acts A B"
   18.28 +    Basis  "ensures acts A B ==> leadsTo acts A B"
   18.29  
   18.30 -    Trans  "[| leadsTo Acts A B;  leadsTo Acts B C |]
   18.31 -	   ==> leadsTo Acts A C"
   18.32 +    Trans  "[| leadsTo acts A B;  leadsTo acts B C |]
   18.33 +	   ==> leadsTo acts A C"
   18.34  
   18.35      (*Encoding using powerset of the desired axiom
   18.36 -       (!!A. A : S ==> leadsTo Acts A B) ==> leadsTo Acts (Union S) B
   18.37 +       (!!A. A : S ==> leadsTo acts A B) ==> leadsTo acts (Union S) B
   18.38      *)
   18.39 -    Union  "(UN A:S. {(A,B)}) : Pow (leadsto Acts)
   18.40 -	   ==> leadsTo Acts (Union S) B"
   18.41 +    Union  "(UN A:S. {(A,B)}) : Pow (leadsto acts)
   18.42 +	   ==> leadsTo acts (Union S) B"
   18.43  
   18.44    monos "[Pow_mono]"
   18.45  
   18.46  
   18.47 -(*wlt Acts B is the largest set that leads to B*)
   18.48 +(*wlt acts B is the largest set that leads to B*)
   18.49  constdefs wlt :: "[('a * 'a)set set, 'a set] => 'a set"
   18.50 -  "wlt Acts B == Union {A. leadsTo Acts A B}"
   18.51 +  "wlt acts B == Union {A. leadsTo acts A B}"
   18.52  
   18.53  end