94 \ (F : constrains A B & G : constrains A B)"; |
94 \ (F : constrains A B & G : constrains A B)"; |
95 by (auto_tac |
95 by (auto_tac |
96 (claset(), |
96 (claset(), |
97 simpset() addsimps [constrains_def, Join_def])); |
97 simpset() addsimps [constrains_def, Join_def])); |
98 qed "constrains_Join"; |
98 qed "constrains_Join"; |
99 |
|
100 |
|
101 (** |
|
102 Michel says... |
|
103 |
|
104 p inductive-next q' in F |
|
105 p inductive-next q'' in G |
|
106 p noninductive-next q in FoG |
|
107 ------------------------------------------- |
|
108 p noninductive-next q /\ (q' \/ q'') in FoG |
|
109 |
|
110 From which you deduce: |
|
111 |
|
112 inductive-stable A /\ B in F |
|
113 inductive-stable A in G |
|
114 noninductive-stable B in FoG |
|
115 --------------------------------- |
|
116 noninductive-stable A /\ B in FoG |
|
117 **) |
|
118 |
|
119 Goal "[| F : constrains A B'; G : constrains A B''; \ |
|
120 \ F Join G : Constrains A B |] \ |
|
121 \ ==> F Join G : Constrains A (B Int (B' Un B''))"; |
|
122 by (auto_tac |
|
123 (claset() addIs [constrains_Int RS constrains_weaken], |
|
124 simpset() addsimps [Constrains_def, constrains_Join])); |
|
125 qed "constrains_imp_Join_Constrains"; |
|
126 |
|
127 Goalw [Stable_def, stable_def] |
|
128 "[| F : stable (A Int B); G : stable A; \ |
|
129 \ F Join G : Stable B |] \ |
|
130 \ ==> F Join G : Stable (A Int B)"; |
|
131 by (auto_tac |
|
132 (claset() addIs [constrains_Int RS constrains_weaken], |
|
133 simpset() addsimps [Constrains_def, constrains_Join])); |
|
134 qed "stable_imp_Join_Stable"; |
|
135 |
|
136 |
|
137 |
99 |
138 (**FAILS, I think; see 5.4.1, Substitution Axiom. |
100 (**FAILS, I think; see 5.4.1, Substitution Axiom. |
139 The problem is to relate reachable (F Join G) with |
101 The problem is to relate reachable (F Join G) with |
140 reachable F and reachable G |
102 reachable F and reachable G |
141 |
103 |
233 by (stac Join_commute 1); |
195 by (stac Join_commute 1); |
234 by (blast_tac (claset() addIs [ensures_stable_Join1]) 1); |
196 by (blast_tac (claset() addIs [ensures_stable_Join1]) 1); |
235 qed "ensures_stable_Join2"; |
197 qed "ensures_stable_Join2"; |
236 |
198 |
237 |
199 |
238 (** localTo **) |
200 (** Diff and localTo **) |
239 |
201 |
240 Goal "[| F Join G : f localTo F; (s,s') : act; \ |
202 Goalw [Join_def, Diff_def] "F Join (Diff G (Acts F)) = F Join G"; |
241 \ act : Acts G; act ~: Acts F |] ==> f s' = f s"; |
203 by (rtac program_equalityI 1); |
|
204 by Auto_tac; |
|
205 qed "Join_Diff2"; |
|
206 |
|
207 Goalw [Diff_def, Disjoint_def] "Disjoint F (Diff G (Acts F))"; |
|
208 by Auto_tac; |
|
209 qed "Diff_Disjoint"; |
|
210 |
|
211 Goal "[| F Join G : v localTo F; Disjoint F G |] \ |
|
212 \ ==> G : (INT z. stable {s. v s = z})"; |
242 by (asm_full_simp_tac |
213 by (asm_full_simp_tac |
243 (simpset() addsimps [localTo_def, Diff_def, Acts_Join, stable_def, |
214 (simpset() addsimps [localTo_def, Diff_def, Disjoint_def, |
244 constrains_def]) 1); |
215 Acts_Join, stable_def, constrains_def]) 1); |
|
216 by (Blast_tac 1); |
|
217 qed "localTo_imp_stable"; |
|
218 |
|
219 Goal "[| F Join G : v localTo F; (s,s') : act; \ |
|
220 \ act : Acts G; Disjoint F G |] ==> v s' = v s"; |
|
221 by (asm_full_simp_tac |
|
222 (simpset() addsimps [localTo_def, Diff_def, Disjoint_def, |
|
223 Acts_Join, stable_def, constrains_def]) 1); |
245 by (Blast_tac 1); |
224 by (Blast_tac 1); |
246 qed "localTo_imp_equals"; |
225 qed "localTo_imp_equals"; |
|
226 |
|
227 Goalw [localTo_def, stable_def, constrains_def] |
|
228 "v localTo F <= (f o v) localTo F"; |
|
229 by (Clarify_tac 1); |
|
230 by (auto_tac (claset() addSEs [allE, ballE], simpset())); |
|
231 qed "localTo_imp_o_localTo"; |
|
232 |
|
233 |
|
234 (*** Higher-level rules involving localTo and Join ***) |
|
235 |
|
236 Goal "[| F : constrains {s. P (v s) (w s)} {s. P' (v s) (w s)}; \ |
|
237 \ F Join G : v localTo F; \ |
|
238 \ F Join G : w localTo F; \ |
|
239 \ Disjoint F G |] \ |
|
240 \ ==> F Join G : constrains {s. P (v s) (w s)} {s. P' (v s) (w s)}"; |
|
241 by (auto_tac (claset(), simpset() addsimps [constrains_def, Acts_Join])); |
|
242 by (REPEAT_FIRST (dtac localTo_imp_equals THEN' REPEAT1 o atac)); |
|
243 by Auto_tac; |
|
244 qed "constrains_localTo_constrains2"; |
|
245 |
|
246 Goalw [stable_def] |
|
247 "[| F : stable {s. P (v s) (w s)}; \ |
|
248 \ F Join G : v localTo F; \ |
|
249 \ F Join G : w localTo F; \ |
|
250 \ Disjoint F G |] \ |
|
251 \ ==> F Join G : stable {s. P (v s) (w s)}"; |
|
252 by (blast_tac (claset() addIs [constrains_localTo_constrains2]) 1); |
|
253 qed "stable_localTo_stable2"; |
|
254 |
|
255 |
|
256 Goal "(UN k. {s. f s = k}) = UNIV"; |
|
257 by (Blast_tac 1); |
|
258 qed "UN_eq_UNIV"; |
|
259 |
|
260 Goal "[| F : stable {s. v s <= w s}; \ |
|
261 \ F Join G : v localTo F; \ |
|
262 \ F Join G : Increasing w; \ |
|
263 \ Disjoint F G |] \ |
|
264 \ ==> F Join G : Stable {s. v s <= w s}"; |
|
265 by (safe_tac (claset() addSDs [localTo_imp_stable])); |
|
266 by (rewrite_goals_tac [stable_def, Stable_def, Increasing_def]); |
|
267 by (subgoal_tac "ALL k: UNIV. ?H : Constrains ({s. v s = k} Int ?AA) ?AA" 1); |
|
268 by (dtac ball_Constrains_UN 1); |
|
269 by (full_simp_tac (simpset() addsimps [UN_eq_UNIV]) 1); |
|
270 by (rtac ballI 1); |
|
271 by (subgoal_tac "F Join G : constrains ({s. v s = k} Int {s. v s <= w s}) \ |
|
272 \ ({s. v s = k} Un {s. v s <= w s})" 1); |
|
273 by (asm_simp_tac (simpset() addsimps [constrains_Join]) 2); |
|
274 by (blast_tac (claset() addIs [constrains_weaken]) 2); |
|
275 by (dtac (constrains_imp_Constrains RS Constrains_Int) 1 THEN etac INT_D 1); |
|
276 by (etac Constrains_weaken 2); |
|
277 by Auto_tac; |
|
278 qed "Increasing_localTo_Stable"; |