author | paulson |
Tue, 30 Nov 1999 17:53:34 +0100 | |
changeset 8042 | ecdedff41e67 |
parent 8041 | e3237d8c18d6 |
child 8055 | bb15396278fb |
permissions | -rw-r--r-- |
5252 | 1 |
(* Title: HOL/UNITY/Union.ML |
2 |
ID: $Id$ |
|
3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
|
4 |
Copyright 1998 University of Cambridge |
|
5 |
||
6 |
Unions of programs |
|
7 |
||
8 |
From Misra's Chapter 5: Asynchronous Compositions of Programs |
|
9 |
*) |
|
10 |
||
6012
1894bfc4aee9
Addition of the States component; parts of Comp not working
paulson
parents:
5970
diff
changeset
|
11 |
Addcongs [UN_cong, INT_cong]; |
5252 | 12 |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
13 |
|
5867 | 14 |
(** SKIP **) |
15 |
||
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
16 |
Goal "Init SKIP = UNIV"; |
5648 | 17 |
by (simp_tac (simpset() addsimps [SKIP_def]) 1); |
5611 | 18 |
qed "Init_SKIP"; |
19 |
||
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
20 |
Goal "Acts SKIP = {Id}"; |
5648 | 21 |
by (simp_tac (simpset() addsimps [SKIP_def]) 1); |
22 |
qed "Acts_SKIP"; |
|
23 |
||
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
24 |
Addsimps [Init_SKIP, Acts_SKIP]; |
5648 | 25 |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
26 |
Goal "reachable SKIP = UNIV"; |
6012
1894bfc4aee9
Addition of the States component; parts of Comp not working
paulson
parents:
5970
diff
changeset
|
27 |
by (force_tac (claset() addEs [reachable.induct] |
1894bfc4aee9
Addition of the States component; parts of Comp not working
paulson
parents:
5970
diff
changeset
|
28 |
addIs reachable.intrs, simpset()) 1); |
5867 | 29 |
qed "reachable_SKIP"; |
30 |
||
31 |
Addsimps [reachable_SKIP]; |
|
32 |
||
6836 | 33 |
(** SKIP and safety properties **) |
34 |
||
35 |
Goalw [constrains_def] "(SKIP : A co B) = (A<=B)"; |
|
36 |
by Auto_tac; |
|
37 |
qed "SKIP_in_constrains_iff"; |
|
38 |
AddIffs [SKIP_in_constrains_iff]; |
|
39 |
||
40 |
Goalw [Constrains_def] "(SKIP : A Co B) = (A<=B)"; |
|
41 |
by Auto_tac; |
|
42 |
qed "SKIP_in_Constrains_iff"; |
|
43 |
AddIffs [SKIP_in_Constrains_iff]; |
|
44 |
||
45 |
Goalw [stable_def] "SKIP : stable A"; |
|
46 |
by Auto_tac; |
|
47 |
qed "SKIP_in_stable"; |
|
48 |
AddIffs [SKIP_in_stable, SKIP_in_stable RS stable_imp_Stable]; |
|
49 |
||
5867 | 50 |
|
6012
1894bfc4aee9
Addition of the States component; parts of Comp not working
paulson
parents:
5970
diff
changeset
|
51 |
(** Join **) |
1894bfc4aee9
Addition of the States component; parts of Comp not working
paulson
parents:
5970
diff
changeset
|
52 |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
53 |
Goal "Init (F Join G) = Init F Int Init G"; |
6012
1894bfc4aee9
Addition of the States component; parts of Comp not working
paulson
parents:
5970
diff
changeset
|
54 |
by (simp_tac (simpset() addsimps [Join_def]) 1); |
5313
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
55 |
qed "Init_Join"; |
5252 | 56 |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
57 |
Goal "Acts (F Join G) = Acts F Un Acts G"; |
5596 | 58 |
by (auto_tac (claset(), simpset() addsimps [Join_def])); |
5313
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
59 |
qed "Acts_Join"; |
5252 | 60 |
|
7537 | 61 |
Addsimps [Init_Join, Acts_Join]; |
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
62 |
|
6012
1894bfc4aee9
Addition of the States component; parts of Comp not working
paulson
parents:
5970
diff
changeset
|
63 |
|
1894bfc4aee9
Addition of the States component; parts of Comp not working
paulson
parents:
5970
diff
changeset
|
64 |
(** JN **) |
1894bfc4aee9
Addition of the States component; parts of Comp not working
paulson
parents:
5970
diff
changeset
|
65 |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
66 |
Goalw [JOIN_def, SKIP_def] "(JN i:{}. F i) = SKIP"; |
6012
1894bfc4aee9
Addition of the States component; parts of Comp not working
paulson
parents:
5970
diff
changeset
|
67 |
by Auto_tac; |
1894bfc4aee9
Addition of the States component; parts of Comp not working
paulson
parents:
5970
diff
changeset
|
68 |
qed "JN_empty"; |
1894bfc4aee9
Addition of the States component; parts of Comp not working
paulson
parents:
5970
diff
changeset
|
69 |
Addsimps [JN_empty]; |
1894bfc4aee9
Addition of the States component; parts of Comp not working
paulson
parents:
5970
diff
changeset
|
70 |
|
6633 | 71 |
Goal "(JN i:insert a I. F i) = (F a) Join (JN i:I. F i)"; |
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
72 |
by (rtac program_equalityI 1); |
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
73 |
by (ALLGOALS (simp_tac (simpset() addsimps [JOIN_def, Join_def]))); |
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
74 |
qed "JN_insert"; |
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
75 |
Addsimps[JN_empty, JN_insert]; |
6012
1894bfc4aee9
Addition of the States component; parts of Comp not working
paulson
parents:
5970
diff
changeset
|
76 |
|
5611 | 77 |
Goal "Init (JN i:I. F i) = (INT i:I. Init (F i))"; |
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
78 |
by (simp_tac (simpset() addsimps [JOIN_def]) 1); |
5313
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
79 |
qed "Init_JN"; |
5252 | 80 |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
81 |
Goal "Acts (JN i:I. F i) = insert Id (UN i:I. Acts (F i))"; |
5596 | 82 |
by (auto_tac (claset(), simpset() addsimps [JOIN_def])); |
5313
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
83 |
qed "Acts_JN"; |
5252 | 84 |
|
7537 | 85 |
Addsimps [Init_JN, Acts_JN]; |
5867 | 86 |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
87 |
val prems = Goalw [JOIN_def] |
6633 | 88 |
"[| I=J; !!i. i:J ==> F i = G i |] ==> \ |
89 |
\ (JN i:I. F i) = (JN i:J. G i)"; |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
90 |
by (asm_simp_tac (simpset() addsimps prems) 1); |
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
91 |
qed "JN_cong"; |
6012
1894bfc4aee9
Addition of the States component; parts of Comp not working
paulson
parents:
5970
diff
changeset
|
92 |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
93 |
Addcongs [JN_cong]; |
5584 | 94 |
|
95 |
||
5611 | 96 |
(** Algebraic laws **) |
5259 | 97 |
|
5611 | 98 |
Goal "F Join G = G Join F"; |
5313
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
99 |
by (simp_tac (simpset() addsimps [Join_def, Un_commute, Int_commute]) 1); |
5259 | 100 |
qed "Join_commute"; |
101 |
||
7360 | 102 |
Goal "A Join (B Join C) = B Join (A Join C)"; |
103 |
by (simp_tac (simpset() addsimps Un_ac@Int_ac@[Join_def]) 1); |
|
104 |
qed "Join_left_commute"; |
|
105 |
||
5611 | 106 |
Goal "(F Join G) Join H = F Join (G Join H)"; |
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
107 |
by (simp_tac (simpset() addsimps Un_ac@[Join_def, Int_assoc]) 1); |
5259 | 108 |
qed "Join_assoc"; |
5596 | 109 |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
110 |
Goalw [Join_def, SKIP_def] "SKIP Join F = F"; |
5611 | 111 |
by (rtac program_equalityI 1); |
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
112 |
by (ALLGOALS (simp_tac (simpset() addsimps [insert_absorb]))); |
5611 | 113 |
qed "Join_SKIP_left"; |
5584 | 114 |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
115 |
Goalw [Join_def, SKIP_def] "F Join SKIP = F"; |
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
116 |
by (rtac program_equalityI 1); |
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
117 |
by (ALLGOALS (simp_tac (simpset() addsimps [insert_absorb]))); |
5611 | 118 |
qed "Join_SKIP_right"; |
119 |
||
120 |
Addsimps [Join_SKIP_left, Join_SKIP_right]; |
|
121 |
||
122 |
Goalw [Join_def] "F Join F = F"; |
|
123 |
by (rtac program_equalityI 1); |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
124 |
by Auto_tac; |
5313
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
125 |
qed "Join_absorb"; |
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
126 |
|
5611 | 127 |
Addsimps [Join_absorb]; |
5313
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
128 |
|
7915
c7fd7eb3b0ef
ALMOST working version: LocalTo results commented out
paulson
parents:
7878
diff
changeset
|
129 |
Goalw [Join_def] "F Join (F Join G) = F Join G"; |
7360 | 130 |
by (rtac program_equalityI 1); |
131 |
by Auto_tac; |
|
132 |
qed "Join_left_absorb"; |
|
133 |
||
134 |
(*Join is an AC-operator*) |
|
135 |
val Join_ac = [Join_assoc, Join_left_absorb, Join_commute, Join_left_commute]; |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
136 |
|
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
137 |
|
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
138 |
(*** JN laws ***) |
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
139 |
|
6633 | 140 |
(*Also follows by JN_insert and insert_absorb, but the proof is longer*) |
141 |
Goal "k:I ==> F k Join (JN i:I. F i) = (JN i:I. F i)"; |
|
7537 | 142 |
by (auto_tac (claset() addSIs [program_equalityI], simpset())); |
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
143 |
qed "JN_absorb"; |
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
144 |
|
6633 | 145 |
Goal "(JN i: I Un J. F i) = ((JN i: I. F i) Join (JN i:J. F i))"; |
7537 | 146 |
by (auto_tac (claset() addSIs [program_equalityI], simpset())); |
6633 | 147 |
qed "JN_Un"; |
5970 | 148 |
|
6836 | 149 |
Goal "(JN i:I. c) = (if I={} then SKIP else c)"; |
7537 | 150 |
by (auto_tac (claset() addSIs [program_equalityI], simpset())); |
5970 | 151 |
qed "JN_constant"; |
152 |
||
6633 | 153 |
Goal "(JN i:I. F i Join G i) = (JN i:I. F i) Join (JN i:I. G i)"; |
7537 | 154 |
by (auto_tac (claset() addSIs [program_equalityI], simpset())); |
5970 | 155 |
qed "JN_Join_distrib"; |
5584 | 156 |
|
6633 | 157 |
Goal "i : I ==> (JN i:I. F i Join G) = ((JN i:I. F i) Join G)"; |
158 |
by (asm_simp_tac (simpset() addsimps [JN_Join_distrib, JN_constant]) 1); |
|
6836 | 159 |
by Auto_tac; |
6633 | 160 |
qed "JN_Join_miniscope"; |
161 |
||
5584 | 162 |
|
6536 | 163 |
(*** Safety: co, stable, FP ***) |
5313
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
164 |
|
6633 | 165 |
(*Fails if I={} because it collapses to SKIP : A co B*) |
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
166 |
Goalw [constrains_def, JOIN_def] |
6633 | 167 |
"i : I ==> (JN i:I. F i) : A co B = (ALL i:I. F i : A co B)"; |
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
168 |
by (Simp_tac 1); |
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
169 |
by (Blast_tac 1); |
7523 | 170 |
qed "JN_constrains"; |
5313
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
171 |
|
6633 | 172 |
Goal "(F Join G : A co B) = (F : A co B & G : A co B)"; |
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
173 |
by (auto_tac |
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
174 |
(claset(), |
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
175 |
simpset() addsimps [constrains_def, Join_def])); |
7523 | 176 |
qed "Join_constrains"; |
5620 | 177 |
|
6633 | 178 |
(*Analogous weak versions FAIL; see Misra [1994] 5.4.1, Substitution Axiom. |
179 |
reachable (F Join G) could be much bigger than reachable F, reachable G |
|
180 |
*) |
|
6012
1894bfc4aee9
Addition of the States component; parts of Comp not working
paulson
parents:
5970
diff
changeset
|
181 |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
182 |
|
6536 | 183 |
Goal "[| F : A co A'; G : B co B' |] \ |
184 |
\ ==> F Join G : (A Int B) co (A' Un B')"; |
|
7523 | 185 |
by (simp_tac (simpset() addsimps [Join_constrains]) 1); |
5313
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
186 |
by (blast_tac (claset() addIs [constrains_weaken]) 1); |
7523 | 187 |
qed "Join_constrains_weaken"; |
5313
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
188 |
|
6633 | 189 |
Goal "[| ALL i:I. F i : A i co A' i; i: I |] \ |
190 |
\ ==> (JN i:I. F i) : (INT i:I. A i) co (UN i:I. A' i)"; |
|
7523 | 191 |
by (asm_simp_tac (simpset() addsimps [JN_constrains]) 1); |
6633 | 192 |
by (blast_tac (claset() addIs [constrains_weaken]) 1); |
7523 | 193 |
qed "JN_constrains_weaken"; |
6633 | 194 |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
195 |
Goal "i : I ==> \ |
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
196 |
\ (JN i:I. F i) : stable A = (ALL i:I. F i : stable A)"; |
7523 | 197 |
by (asm_simp_tac (simpset() addsimps [stable_def, JN_constrains]) 1); |
198 |
qed "JN_stable"; |
|
5313
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
199 |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
200 |
Goal "[| ALL i:I. F i : invariant A; i : I |] \ |
5970 | 201 |
\ ==> (JN i:I. F i) : invariant A"; |
7523 | 202 |
by (asm_full_simp_tac (simpset() addsimps [invariant_def, JN_stable]) 1); |
5970 | 203 |
by (Blast_tac 1); |
204 |
bind_thm ("invariant_JN_I", ballI RS result()); |
|
205 |
||
7594
8a188ef6545e
working version with co-guarantees-leadsto results
paulson
parents:
7537
diff
changeset
|
206 |
Goal "(F Join G : stable A) = \ |
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
207 |
\ (F : stable A & G : stable A)"; |
7523 | 208 |
by (simp_tac (simpset() addsimps [stable_def, Join_constrains]) 1); |
209 |
qed "Join_stable"; |
|
5313
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
210 |
|
7594
8a188ef6545e
working version with co-guarantees-leadsto results
paulson
parents:
7537
diff
changeset
|
211 |
Goal "(F Join G : increasing f) = \ |
8a188ef6545e
working version with co-guarantees-leadsto results
paulson
parents:
7537
diff
changeset
|
212 |
\ (F : increasing f & G : increasing f)"; |
8a188ef6545e
working version with co-guarantees-leadsto results
paulson
parents:
7537
diff
changeset
|
213 |
by (simp_tac (simpset() addsimps [increasing_def, Join_stable]) 1); |
8a188ef6545e
working version with co-guarantees-leadsto results
paulson
parents:
7537
diff
changeset
|
214 |
by (Blast_tac 1); |
8a188ef6545e
working version with co-guarantees-leadsto results
paulson
parents:
7537
diff
changeset
|
215 |
qed "Join_increasing"; |
8a188ef6545e
working version with co-guarantees-leadsto results
paulson
parents:
7537
diff
changeset
|
216 |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
217 |
Goal "[| F : invariant A; G : invariant A |] \ |
5970 | 218 |
\ ==> F Join G : invariant A"; |
7523 | 219 |
by (full_simp_tac (simpset() addsimps [invariant_def, Join_stable]) 1); |
5970 | 220 |
by (Blast_tac 1); |
221 |
qed "invariant_JoinI"; |
|
222 |
||
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
223 |
Goal "i : I ==> FP (JN i:I. F i) = (INT i:I. FP (F i))"; |
7523 | 224 |
by (asm_simp_tac (simpset() addsimps [FP_def, JN_stable, INTER_def]) 1); |
5313
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
225 |
qed "FP_JN"; |
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
226 |
|
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
227 |
|
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
228 |
(*** Progress: transient, ensures ***) |
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
229 |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
230 |
Goal "i : I ==> \ |
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
231 |
\ (JN i:I. F i) : transient A = (EX i:I. F i : transient A)"; |
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
232 |
by (auto_tac (claset(), |
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
233 |
simpset() addsimps [transient_def, JOIN_def])); |
7523 | 234 |
qed "JN_transient"; |
5313
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
235 |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
236 |
Goal "F Join G : transient A = \ |
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
237 |
\ (F : transient A | G : transient A)"; |
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
238 |
by (auto_tac (claset(), |
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
239 |
simpset() addsimps [bex_Un, transient_def, |
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
240 |
Join_def])); |
7523 | 241 |
qed "Join_transient"; |
5313
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
242 |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
243 |
Goal "i : I ==> \ |
6536 | 244 |
\ (JN i:I. F i) : A ensures B = \ |
245 |
\ ((ALL i:I. F i : (A-B) co (A Un B)) & \ |
|
246 |
\ (EX i:I. F i : A ensures B))"; |
|
5313
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
247 |
by (auto_tac (claset(), |
7523 | 248 |
simpset() addsimps [ensures_def, JN_constrains, JN_transient])); |
249 |
qed "JN_ensures"; |
|
5313
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
250 |
|
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
251 |
Goalw [ensures_def] |
6536 | 252 |
"F Join G : A ensures B = \ |
7630 | 253 |
\ (F : (A-B) co (A Un B) & G : (A-B) co (A Un B) & \ |
254 |
\ (F : transient (A-B) | G : transient (A-B)))"; |
|
5313
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
255 |
by (auto_tac (claset(), |
7523 | 256 |
simpset() addsimps [Join_constrains, Join_transient])); |
257 |
qed "Join_ensures"; |
|
5313
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
258 |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
259 |
Goalw [stable_def, constrains_def, Join_def] |
6536 | 260 |
"[| F : stable A; G : A co A' |] \ |
261 |
\ ==> F Join G : A co A'"; |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
262 |
by (asm_full_simp_tac (simpset() addsimps [ball_Un]) 1); |
5313
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
263 |
by (Blast_tac 1); |
7523 | 264 |
qed "stable_Join_constrains"; |
5313
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
265 |
|
6633 | 266 |
(*Premise for G cannot use Always because F: Stable A is weaker than |
5648 | 267 |
G : stable A *) |
6570 | 268 |
Goal "[| F : stable A; G : invariant A |] ==> F Join G : Always A"; |
269 |
by (full_simp_tac (simpset() addsimps [Always_def, invariant_def, |
|
7523 | 270 |
Stable_eq_stable, Join_stable]) 1); |
5313
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
271 |
by (force_tac(claset() addIs [stable_reachable, stable_Int], |
7537 | 272 |
simpset()) 1); |
6570 | 273 |
qed "stable_Join_Always"; |
5313
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
274 |
|
6536 | 275 |
Goal "[| F : stable A; G : A ensures B |] ==> F Join G : A ensures B"; |
7523 | 276 |
by (asm_simp_tac (simpset() addsimps [Join_ensures]) 1); |
5313
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
277 |
by (asm_full_simp_tac (simpset() addsimps [stable_def, ensures_def]) 1); |
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
278 |
by (etac constrains_weaken 1); |
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
279 |
by Auto_tac; |
7523 | 280 |
qed "stable_Join_ensures1"; |
5313
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
281 |
|
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
282 |
(*As above, but exchanging the roles of F and G*) |
6536 | 283 |
Goal "[| F : A ensures B; G : stable A |] ==> F Join G : A ensures B"; |
5313
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
284 |
by (stac Join_commute 1); |
7523 | 285 |
by (blast_tac (claset() addIs [stable_Join_ensures1]) 1); |
286 |
qed "stable_Join_ensures2"; |
|
5313
1861a564d7e2
Constrains, Stable, Invariant...more of the substitution axiom, but Union
paulson
parents:
5259
diff
changeset
|
287 |
|
5648 | 288 |
|
5804
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5785
diff
changeset
|
289 |
(** Diff and localTo **) |
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5785
diff
changeset
|
290 |
|
7878
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
291 |
Goalw [Diff_def] "F Join (Diff UNIV G (Acts F)) = F Join G"; |
5804
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5785
diff
changeset
|
292 |
by (rtac program_equalityI 1); |
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
293 |
by Auto_tac; |
5804
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5785
diff
changeset
|
294 |
qed "Join_Diff2"; |
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5785
diff
changeset
|
295 |
|
7594
8a188ef6545e
working version with co-guarantees-leadsto results
paulson
parents:
7537
diff
changeset
|
296 |
Goalw [Diff_def] |
7878
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
297 |
"Diff C (F Join G) (Acts H) = (Diff C F (Acts H)) Join (Diff C G (Acts H))"; |
7594
8a188ef6545e
working version with co-guarantees-leadsto results
paulson
parents:
7537
diff
changeset
|
298 |
by (rtac program_equalityI 1); |
8a188ef6545e
working version with co-guarantees-leadsto results
paulson
parents:
7537
diff
changeset
|
299 |
by Auto_tac; |
8a188ef6545e
working version with co-guarantees-leadsto results
paulson
parents:
7537
diff
changeset
|
300 |
qed "Diff_Join_distrib"; |
8a188ef6545e
working version with co-guarantees-leadsto results
paulson
parents:
7537
diff
changeset
|
301 |
|
7878
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
302 |
Goalw [Diff_def] "Diff C F (Acts F) = mk_program(Init F, {})"; |
7594
8a188ef6545e
working version with co-guarantees-leadsto results
paulson
parents:
7537
diff
changeset
|
303 |
by Auto_tac; |
7878
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
304 |
qed "Diff_self_eq"; |
7594
8a188ef6545e
working version with co-guarantees-leadsto results
paulson
parents:
7537
diff
changeset
|
305 |
|
7878
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
306 |
Goalw [Diff_def, Disjoint_def] "Disjoint C F (Diff C G (Acts F))"; |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
307 |
by (force_tac (claset(), |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
308 |
simpset() addsimps [Restrict_imageI, |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
309 |
sym RSN (2,Restrict_imageI)]) 1); |
5804
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5785
diff
changeset
|
310 |
qed "Diff_Disjoint"; |
5648 | 311 |
|
7878
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
312 |
Goalw [Disjoint_def] |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
313 |
"[| A <= B; Disjoint A F G |] ==> Disjoint B F G"; |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
314 |
by (blast_tac (claset() addIs [Restrict_eq_mono RSN (2,Restrict_imageI)]) 1); |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
315 |
qed "Disjoint_mono"; |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
316 |
|
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
317 |
(*** localTo ***) |
5804
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5785
diff
changeset
|
318 |
|
7878
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
319 |
Goalw [LOCALTO_def, Diff_def, stable_def, constrains_def] |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
320 |
"A <= B ==> v localTo[B] F <= v localTo[A] F"; |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
321 |
by Auto_tac; |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
322 |
by (dres_inst_tac [("x", "v xc")] spec 1); |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
323 |
by (dres_inst_tac [("x", "Restrict B xa")] bspec 1); |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
324 |
by Auto_tac; |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
325 |
by (blast_tac (claset() addIs [Restrict_eq_mono RSN (2,Restrict_imageI)]) 1); |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
326 |
qed "localTo_anti_mono"; |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
327 |
|
7947 | 328 |
bind_thm ("localTo_UNIV_imp_localTo", |
329 |
impOfSubs (subset_UNIV RS localTo_anti_mono)); |
|
330 |
||
7878
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
331 |
Goalw [LocalTo_def] |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
332 |
"G : v localTo[UNIV] F ==> G : v LocalTo F"; |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
333 |
by (blast_tac (claset() addDs [impOfSubs localTo_anti_mono]) 1); |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
334 |
qed "localTo_imp_LocalTo"; |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
335 |
|
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
336 |
Goalw [LOCALTO_def, stable_def, constrains_def] |
7964
6b3e345c47b3
localTo_imp_o_localTo is now really an implication
paulson
parents:
7947
diff
changeset
|
337 |
"G : v localTo[C] F ==> G : (f o v) localTo[C] F"; |
6b3e345c47b3
localTo_imp_o_localTo is now really an implication
paulson
parents:
7947
diff
changeset
|
338 |
by (Force_tac 1); |
5804
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5785
diff
changeset
|
339 |
qed "localTo_imp_o_localTo"; |
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5785
diff
changeset
|
340 |
|
8041 | 341 |
Goal "G : v LocalTo F ==> G : (f o v) LocalTo F"; |
342 |
by (asm_full_simp_tac |
|
343 |
(simpset() addsimps [LocalTo_def, localTo_imp_o_localTo]) 1); |
|
344 |
qed "LocalTo_imp_o_LocalTo"; |
|
345 |
||
7915
c7fd7eb3b0ef
ALMOST working version: LocalTo results commented out
paulson
parents:
7878
diff
changeset
|
346 |
(*NOT USED*) |
7878
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
347 |
Goalw [LOCALTO_def, stable_def, constrains_def] |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
348 |
"(%s. x) localTo[C] F = UNIV"; |
7689 | 349 |
by (Blast_tac 1); |
350 |
qed "triv_localTo_eq_UNIV"; |
|
351 |
||
7915
c7fd7eb3b0ef
ALMOST working version: LocalTo results commented out
paulson
parents:
7878
diff
changeset
|
352 |
Goal "(F Join G : v localTo[C] H) = \ |
c7fd7eb3b0ef
ALMOST working version: LocalTo results commented out
paulson
parents:
7878
diff
changeset
|
353 |
\ (F : v localTo[C] H & G : v localTo[C] H)"; |
c7fd7eb3b0ef
ALMOST working version: LocalTo results commented out
paulson
parents:
7878
diff
changeset
|
354 |
by (simp_tac (simpset() addsimps [LOCALTO_def, Diff_Join_distrib, |
c7fd7eb3b0ef
ALMOST working version: LocalTo results commented out
paulson
parents:
7878
diff
changeset
|
355 |
stable_def, Join_constrains]) 1); |
7594
8a188ef6545e
working version with co-guarantees-leadsto results
paulson
parents:
7537
diff
changeset
|
356 |
by (Blast_tac 1); |
8a188ef6545e
working version with co-guarantees-leadsto results
paulson
parents:
7537
diff
changeset
|
357 |
qed "Join_localTo"; |
8a188ef6545e
working version with co-guarantees-leadsto results
paulson
parents:
7537
diff
changeset
|
358 |
|
7878
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
359 |
Goal "F : v localTo[C] F"; |
7594
8a188ef6545e
working version with co-guarantees-leadsto results
paulson
parents:
7537
diff
changeset
|
360 |
by (simp_tac |
7878
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
361 |
(simpset() addsimps [LOCALTO_def, stable_def, constrains_def, |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
362 |
Diff_self_eq]) 1); |
7594
8a188ef6545e
working version with co-guarantees-leadsto results
paulson
parents:
7537
diff
changeset
|
363 |
qed "self_localTo"; |
8a188ef6545e
working version with co-guarantees-leadsto results
paulson
parents:
7537
diff
changeset
|
364 |
|
7947 | 365 |
Goal "(F Join G : v localTo[C] F) = (G : v localTo[C] F)"; |
366 |
by (simp_tac (simpset() addsimps [Join_localTo, self_localTo]) 1); |
|
367 |
qed "self_Join_localTo"; |
|
368 |
||
369 |
Goal "(F Join G : v LocalTo F) = (G : v LocalTo F)"; |
|
370 |
by (simp_tac (simpset() addsimps [self_Join_localTo, LocalTo_def, |
|
371 |
Join_left_absorb]) 1); |
|
372 |
qed "self_Join_LocalTo"; |
|
373 |
||
5804
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5785
diff
changeset
|
374 |
|
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5785
diff
changeset
|
375 |
(*** Higher-level rules involving localTo and Join ***) |
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5785
diff
changeset
|
376 |
|
8041 | 377 |
Goal "[| F : {s. P (v s)} co B; G : v localTo[C] F |] \ |
378 |
\ ==> G : C Int {s. P (v s)} co B"; |
|
7878
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
379 |
by (ftac constrains_imp_subset 1); |
7826
c6a8b73b6c2a
working shapshot with "projecting" and "extending"
paulson
parents:
7689
diff
changeset
|
380 |
by (auto_tac (claset(), |
7878
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
381 |
simpset() addsimps [LOCALTO_def, stable_def, constrains_def, |
7826
c6a8b73b6c2a
working shapshot with "projecting" and "extending"
paulson
parents:
7689
diff
changeset
|
382 |
Diff_def])); |
7878
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
383 |
by (case_tac "Restrict C act: Restrict C `` Acts F" 1); |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
384 |
by (blast_tac (claset() addSEs [equalityE]) 1); |
7826
c6a8b73b6c2a
working shapshot with "projecting" and "extending"
paulson
parents:
7689
diff
changeset
|
385 |
by (subgoal_tac "v x = v xa" 1); |
7878
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
386 |
by (Force_tac 1); |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
387 |
by (thin_tac "ALL act: ?A. ?P act" 1); |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
388 |
by (dtac spec 1); |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
389 |
by (dres_inst_tac [("x", "Restrict C act")] bspec 1); |
7826
c6a8b73b6c2a
working shapshot with "projecting" and "extending"
paulson
parents:
7689
diff
changeset
|
390 |
by Auto_tac; |
c6a8b73b6c2a
working shapshot with "projecting" and "extending"
paulson
parents:
7689
diff
changeset
|
391 |
qed "constrains_localTo_constrains"; |
c6a8b73b6c2a
working shapshot with "projecting" and "extending"
paulson
parents:
7689
diff
changeset
|
392 |
|
7878
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
393 |
Goalw [LOCALTO_def, stable_def, constrains_def, Diff_def] |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
394 |
"[| G : v localTo[C] F; G : w localTo[C] F |] \ |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
395 |
\ ==> G : (%s. (v s, w s)) localTo[C] F"; |
7826
c6a8b73b6c2a
working shapshot with "projecting" and "extending"
paulson
parents:
7689
diff
changeset
|
396 |
by (Blast_tac 1); |
c6a8b73b6c2a
working shapshot with "projecting" and "extending"
paulson
parents:
7689
diff
changeset
|
397 |
qed "localTo_pairfun"; |
c6a8b73b6c2a
working shapshot with "projecting" and "extending"
paulson
parents:
7689
diff
changeset
|
398 |
|
8041 | 399 |
Goal "[| F : {s. P (v s) (w s)} co B; \ |
7878
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
400 |
\ G : v localTo[C] F; \ |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
401 |
\ G : w localTo[C] F |] \ |
8041 | 402 |
\ ==> G : C Int {s. P (v s) (w s)} co B"; |
403 |
by (res_inst_tac [("A", "C Int {s. (%(x,y). P x y) (v s, w s)}")] |
|
7826
c6a8b73b6c2a
working shapshot with "projecting" and "extending"
paulson
parents:
7689
diff
changeset
|
404 |
constrains_weaken 1); |
c6a8b73b6c2a
working shapshot with "projecting" and "extending"
paulson
parents:
7689
diff
changeset
|
405 |
by (rtac (localTo_pairfun RSN (2, constrains_localTo_constrains)) 1); |
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6019
diff
changeset
|
406 |
by Auto_tac; |
5804
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5785
diff
changeset
|
407 |
qed "constrains_localTo_constrains2"; |
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5785
diff
changeset
|
408 |
|
7878
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
409 |
(*Used just once, in Client.ML. Having F in the conclusion is silly.*) |
5804
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5785
diff
changeset
|
410 |
Goalw [stable_def] |
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5785
diff
changeset
|
411 |
"[| F : stable {s. P (v s) (w s)}; \ |
7878
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
412 |
\ G : v localTo[UNIV] F; G : w localTo[UNIV] F |] \ |
5804
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5785
diff
changeset
|
413 |
\ ==> F Join G : stable {s. P (v s) (w s)}"; |
7878
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
414 |
by (asm_simp_tac (simpset() addsimps [Join_constrains]) 1); |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
415 |
by (blast_tac (claset() addIs [constrains_localTo_constrains2 RS |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
416 |
constrains_weaken]) 1); |
5804
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5785
diff
changeset
|
417 |
qed "stable_localTo_stable2"; |
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5785
diff
changeset
|
418 |
|
7878
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
419 |
(*Used just in Client.ML. Generalize to arbitrary C?*) |
5804
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5785
diff
changeset
|
420 |
Goal "[| F : stable {s. v s <= w s}; \ |
7878
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
421 |
\ G : v localTo[UNIV] F; \ |
7826
c6a8b73b6c2a
working shapshot with "projecting" and "extending"
paulson
parents:
7689
diff
changeset
|
422 |
\ F Join G : Increasing w |] \ |
5804
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5785
diff
changeset
|
423 |
\ ==> F Join G : Stable {s. v s <= w s}"; |
7826
c6a8b73b6c2a
working shapshot with "projecting" and "extending"
paulson
parents:
7689
diff
changeset
|
424 |
by (auto_tac (claset(), |
c6a8b73b6c2a
working shapshot with "projecting" and "extending"
paulson
parents:
7689
diff
changeset
|
425 |
simpset() addsimps [stable_def, Stable_def, Increasing_def, |
c6a8b73b6c2a
working shapshot with "projecting" and "extending"
paulson
parents:
7689
diff
changeset
|
426 |
Constrains_def, Join_constrains, all_conj_distrib])); |
c6a8b73b6c2a
working shapshot with "projecting" and "extending"
paulson
parents:
7689
diff
changeset
|
427 |
by (blast_tac (claset() addIs [constrains_weaken]) 1); |
c6a8b73b6c2a
working shapshot with "projecting" and "extending"
paulson
parents:
7689
diff
changeset
|
428 |
(*The G case remains; proved like constrains_localTo_constrains*) |
c6a8b73b6c2a
working shapshot with "projecting" and "extending"
paulson
parents:
7689
diff
changeset
|
429 |
by (auto_tac (claset(), |
7878
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
430 |
simpset() addsimps [LOCALTO_def, stable_def, constrains_def, |
43b03d412b82
working version with localTo[C] instead of localTo
paulson
parents:
7826
diff
changeset
|
431 |
Diff_def])); |
7826
c6a8b73b6c2a
working shapshot with "projecting" and "extending"
paulson
parents:
7689
diff
changeset
|
432 |
by (case_tac "act: Acts F" 1); |
c6a8b73b6c2a
working shapshot with "projecting" and "extending"
paulson
parents:
7689
diff
changeset
|
433 |
by (Blast_tac 1); |
c6a8b73b6c2a
working shapshot with "projecting" and "extending"
paulson
parents:
7689
diff
changeset
|
434 |
by (thin_tac "ALL act:Acts F. ?P act" 1); |
c6a8b73b6c2a
working shapshot with "projecting" and "extending"
paulson
parents:
7689
diff
changeset
|
435 |
by (thin_tac "ALL z. ALL act:Acts F. ?P z act" 1); |
c6a8b73b6c2a
working shapshot with "projecting" and "extending"
paulson
parents:
7689
diff
changeset
|
436 |
by (dres_inst_tac [("x", "v xa")] spec 1 THEN dtac bspec 1 THEN rtac DiffI 1); |
c6a8b73b6c2a
working shapshot with "projecting" and "extending"
paulson
parents:
7689
diff
changeset
|
437 |
by (assume_tac 1); |
c6a8b73b6c2a
working shapshot with "projecting" and "extending"
paulson
parents:
7689
diff
changeset
|
438 |
by (Blast_tac 1); |
c6a8b73b6c2a
working shapshot with "projecting" and "extending"
paulson
parents:
7689
diff
changeset
|
439 |
by (subgoal_tac "v x = v xa" 1); |
5804
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5785
diff
changeset
|
440 |
by Auto_tac; |
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5785
diff
changeset
|
441 |
qed "Increasing_localTo_Stable"; |