4776
|
1 |
(* Title: HOL/UNITY/SubstAx
|
|
2 |
ID: $Id$
|
|
3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory
|
|
4 |
Copyright 1998 University of Cambridge
|
|
5 |
|
|
6 |
Weak Fairness versions of transient, ensures, LeadsTo.
|
|
7 |
|
|
8 |
From Misra, "A Logic for Concurrent Programming", 1994
|
|
9 |
*)
|
|
10 |
|
|
11 |
open SubstAx;
|
|
12 |
|
5111
|
13 |
(*constrains Acts B B' ==> constrains Acts (reachable(Init,Acts) Int B)
|
|
14 |
(reachable(Init,Acts) Int B') *)
|
4776
|
15 |
bind_thm ("constrains_reachable",
|
|
16 |
rewrite_rule [stable_def] stable_reachable RS constrains_Int);
|
|
17 |
|
|
18 |
|
|
19 |
(*** Introduction rules: Basis, Trans, Union ***)
|
|
20 |
|
5111
|
21 |
Goal "leadsTo Acts A B ==> LeadsTo(Init,Acts) A B";
|
|
22 |
by (simp_tac (simpset() addsimps [LeadsTo_def]) 1);
|
4776
|
23 |
by (blast_tac (claset() addIs [PSP_stable2, stable_reachable]) 1);
|
|
24 |
qed "leadsTo_imp_LeadsTo";
|
|
25 |
|
5111
|
26 |
Goal "[| constrains Acts (reachable(Init,Acts) Int (A - A')) \
|
4776
|
27 |
\ (A Un A'); \
|
5111
|
28 |
\ transient Acts (reachable(Init,Acts) Int (A-A')) |] \
|
|
29 |
\ ==> LeadsTo(Init,Acts) A A'";
|
|
30 |
by (simp_tac (simpset() addsimps [LeadsTo_def]) 1);
|
4776
|
31 |
by (rtac (stable_reachable RS stable_ensures_Int RS leadsTo_Basis) 1);
|
|
32 |
by (assume_tac 2);
|
|
33 |
by (asm_simp_tac
|
|
34 |
(simpset() addsimps [Int_Un_distrib RS sym, Diff_Int_distrib RS sym,
|
|
35 |
stable_constrains_Int]) 1);
|
|
36 |
qed "LeadsTo_Basis";
|
|
37 |
|
5111
|
38 |
Goal "[| LeadsTo(Init,Acts) A B; LeadsTo(Init,Acts) B C |] \
|
|
39 |
\ ==> LeadsTo(Init,Acts) A C";
|
|
40 |
by (full_simp_tac (simpset() addsimps [LeadsTo_def]) 1);
|
4776
|
41 |
by (blast_tac (claset() addIs [leadsTo_Trans]) 1);
|
|
42 |
qed "LeadsTo_Trans";
|
|
43 |
|
5111
|
44 |
val [prem] = goalw thy [LeadsTo_def]
|
|
45 |
"(!!A. A : S ==> LeadsTo(Init,Acts) A B) ==> LeadsTo(Init,Acts) (Union S) B";
|
|
46 |
by (Simp_tac 1);
|
4776
|
47 |
by (stac Int_Union 1);
|
5111
|
48 |
by (blast_tac (claset() addIs [leadsTo_UN,
|
|
49 |
simplify (simpset()) prem]) 1);
|
4776
|
50 |
qed "LeadsTo_Union";
|
|
51 |
|
|
52 |
|
|
53 |
(*** Derived rules ***)
|
|
54 |
|
5111
|
55 |
Goal "id: Acts ==> LeadsTo(Init,Acts) A UNIV";
|
4776
|
56 |
by (asm_simp_tac (simpset() addsimps [LeadsTo_def,
|
|
57 |
Int_lower1 RS subset_imp_leadsTo]) 1);
|
|
58 |
qed "LeadsTo_UNIV";
|
|
59 |
Addsimps [LeadsTo_UNIV];
|
|
60 |
|
|
61 |
(*Useful with cancellation, disjunction*)
|
5111
|
62 |
Goal "LeadsTo(Init,Acts) A (A' Un A') ==> LeadsTo(Init,Acts) A A'";
|
4776
|
63 |
by (asm_full_simp_tac (simpset() addsimps Un_ac) 1);
|
|
64 |
qed "LeadsTo_Un_duplicate";
|
|
65 |
|
5111
|
66 |
Goal "LeadsTo(Init,Acts) A (A' Un C Un C) ==> LeadsTo(Init,Acts) A (A' Un C)";
|
4776
|
67 |
by (asm_full_simp_tac (simpset() addsimps Un_ac) 1);
|
|
68 |
qed "LeadsTo_Un_duplicate2";
|
|
69 |
|
|
70 |
val prems = goal thy
|
5111
|
71 |
"(!!i. i : I ==> LeadsTo(Init,Acts) (A i) B) \
|
|
72 |
\ ==> LeadsTo(Init,Acts) (UN i:I. A i) B";
|
4776
|
73 |
by (simp_tac (simpset() addsimps [Union_image_eq RS sym]) 1);
|
|
74 |
by (blast_tac (claset() addIs (LeadsTo_Union::prems)) 1);
|
|
75 |
qed "LeadsTo_UN";
|
|
76 |
|
|
77 |
(*Binary union introduction rule*)
|
5069
|
78 |
Goal
|
5111
|
79 |
"[| LeadsTo(Init,Acts) A C; LeadsTo(Init,Acts) B C |] ==> LeadsTo(Init,Acts) (A Un B) C";
|
4776
|
80 |
by (stac Un_eq_Union 1);
|
|
81 |
by (blast_tac (claset() addIs [LeadsTo_Union]) 1);
|
|
82 |
qed "LeadsTo_Un";
|
|
83 |
|
|
84 |
|
5111
|
85 |
Goal "[| reachable(Init,Acts) Int A <= B; id: Acts |] \
|
|
86 |
\ ==> LeadsTo(Init,Acts) A B";
|
|
87 |
by (simp_tac (simpset() addsimps [LeadsTo_def]) 1);
|
4776
|
88 |
by (blast_tac (claset() addIs [subset_imp_leadsTo]) 1);
|
|
89 |
qed "Int_subset_imp_LeadsTo";
|
|
90 |
|
5111
|
91 |
Goal "[| A <= B; id: Acts |] ==> LeadsTo(Init,Acts) A B";
|
|
92 |
by (simp_tac (simpset() addsimps [LeadsTo_def]) 1);
|
4776
|
93 |
by (blast_tac (claset() addIs [subset_imp_leadsTo]) 1);
|
|
94 |
qed "subset_imp_LeadsTo";
|
|
95 |
|
|
96 |
bind_thm ("empty_LeadsTo", empty_subsetI RS subset_imp_LeadsTo);
|
|
97 |
Addsimps [empty_LeadsTo];
|
|
98 |
|
5111
|
99 |
Goal "[| reachable(Init,Acts) Int A = {}; id: Acts |] \
|
|
100 |
\ ==> LeadsTo(Init,Acts) A B";
|
4776
|
101 |
by (asm_simp_tac (simpset() addsimps [Int_subset_imp_LeadsTo]) 1);
|
|
102 |
qed "Int_empty_LeadsTo";
|
|
103 |
|
|
104 |
|
5111
|
105 |
Goal "[| LeadsTo(Init,Acts) A A'; \
|
|
106 |
\ reachable(Init,Acts) Int A' <= B' |] \
|
|
107 |
\ ==> LeadsTo(Init,Acts) A B'";
|
|
108 |
by (full_simp_tac (simpset() addsimps [LeadsTo_def]) 1);
|
4776
|
109 |
by (blast_tac (claset() addIs [leadsTo_weaken_R]) 1);
|
|
110 |
qed_spec_mp "LeadsTo_weaken_R";
|
|
111 |
|
|
112 |
|
5111
|
113 |
Goal "[| LeadsTo(Init,Acts) A A'; \
|
|
114 |
\ reachable(Init,Acts) Int B <= A; id: Acts |] \
|
|
115 |
\ ==> LeadsTo(Init,Acts) B A'";
|
|
116 |
by (full_simp_tac (simpset() addsimps [LeadsTo_def]) 1);
|
4776
|
117 |
by (blast_tac (claset() addIs [leadsTo_weaken_L]) 1);
|
|
118 |
qed_spec_mp "LeadsTo_weaken_L";
|
|
119 |
|
|
120 |
|
|
121 |
(*Distributes over binary unions*)
|
5069
|
122 |
Goal
|
5111
|
123 |
"id: Acts ==> \
|
|
124 |
\ LeadsTo(Init,Acts) (A Un B) C = \
|
|
125 |
\ (LeadsTo(Init,Acts) A C & LeadsTo(Init,Acts) B C)";
|
4776
|
126 |
by (blast_tac (claset() addIs [LeadsTo_Un, LeadsTo_weaken_L]) 1);
|
|
127 |
qed "LeadsTo_Un_distrib";
|
|
128 |
|
5069
|
129 |
Goal
|
5111
|
130 |
"id: Acts ==> \
|
|
131 |
\ LeadsTo(Init,Acts) (UN i:I. A i) B = \
|
|
132 |
\ (ALL i : I. LeadsTo(Init,Acts) (A i) B)";
|
4776
|
133 |
by (blast_tac (claset() addIs [LeadsTo_UN, LeadsTo_weaken_L]) 1);
|
|
134 |
qed "LeadsTo_UN_distrib";
|
|
135 |
|
5069
|
136 |
Goal
|
5111
|
137 |
"id: Acts ==> \
|
|
138 |
\ LeadsTo(Init,Acts) (Union S) B = \
|
|
139 |
\ (ALL A : S. LeadsTo(Init,Acts) A B)";
|
4776
|
140 |
by (blast_tac (claset() addIs [LeadsTo_Union, LeadsTo_weaken_L]) 1);
|
|
141 |
qed "LeadsTo_Union_distrib";
|
|
142 |
|
|
143 |
|
5069
|
144 |
Goal
|
5111
|
145 |
"[| LeadsTo(Init,Acts) A A'; id: Acts; \
|
|
146 |
\ reachable(Init,Acts) Int B <= A; \
|
|
147 |
\ reachable(Init,Acts) Int A' <= B' |] \
|
|
148 |
\ ==> LeadsTo(Init,Acts) B B'";
|
4776
|
149 |
(*PROOF FAILED: why?*)
|
|
150 |
by (blast_tac (claset() addIs [LeadsTo_Trans, LeadsTo_weaken_R,
|
|
151 |
LeadsTo_weaken_L]) 1);
|
|
152 |
qed "LeadsTo_weaken";
|
|
153 |
|
|
154 |
|
|
155 |
(*Set difference: maybe combine with leadsTo_weaken_L??*)
|
5069
|
156 |
Goal
|
5111
|
157 |
"[| LeadsTo(Init,Acts) (A-B) C; LeadsTo(Init,Acts) B C; id: Acts |] \
|
|
158 |
\ ==> LeadsTo(Init,Acts) A C";
|
4776
|
159 |
by (blast_tac (claset() addIs [LeadsTo_Un, LeadsTo_weaken]) 1);
|
|
160 |
qed "LeadsTo_Diff";
|
|
161 |
|
|
162 |
|
|
163 |
(** Meta or object quantifier ???????????????????
|
|
164 |
see ball_constrains_UN in UNITY.ML***)
|
|
165 |
|
|
166 |
val prems = goal thy
|
5111
|
167 |
"(!! i. i:I ==> LeadsTo(Init,Acts) (A i) (A' i)) \
|
|
168 |
\ ==> LeadsTo(Init,Acts) (UN i:I. A i) (UN i:I. A' i)";
|
4776
|
169 |
by (simp_tac (simpset() addsimps [Union_image_eq RS sym]) 1);
|
|
170 |
by (blast_tac (claset() addIs [LeadsTo_Union, LeadsTo_weaken_R]
|
|
171 |
addIs prems) 1);
|
|
172 |
qed "LeadsTo_UN_UN";
|
|
173 |
|
|
174 |
|
|
175 |
(*Version with no index set*)
|
|
176 |
val prems = goal thy
|
5111
|
177 |
"(!! i. LeadsTo(Init,Acts) (A i) (A' i)) \
|
|
178 |
\ ==> LeadsTo(Init,Acts) (UN i. A i) (UN i. A' i)";
|
4776
|
179 |
by (blast_tac (claset() addIs [LeadsTo_UN_UN]
|
|
180 |
addIs prems) 1);
|
|
181 |
qed "LeadsTo_UN_UN_noindex";
|
|
182 |
|
|
183 |
(*Version with no index set*)
|
5069
|
184 |
Goal
|
5111
|
185 |
"ALL i. LeadsTo(Init,Acts) (A i) (A' i) \
|
|
186 |
\ ==> LeadsTo(Init,Acts) (UN i. A i) (UN i. A' i)";
|
4776
|
187 |
by (blast_tac (claset() addIs [LeadsTo_UN_UN]) 1);
|
|
188 |
qed "all_LeadsTo_UN_UN";
|
|
189 |
|
|
190 |
|
|
191 |
(*Binary union version*)
|
5111
|
192 |
Goal "[| LeadsTo(Init,Acts) A A'; LeadsTo(Init,Acts) B B' |] \
|
|
193 |
\ ==> LeadsTo(Init,Acts) (A Un B) (A' Un B')";
|
4776
|
194 |
by (blast_tac (claset() addIs [LeadsTo_Un,
|
|
195 |
LeadsTo_weaken_R]) 1);
|
|
196 |
qed "LeadsTo_Un_Un";
|
|
197 |
|
|
198 |
|
|
199 |
(** The cancellation law **)
|
|
200 |
|
5069
|
201 |
Goal
|
5111
|
202 |
"[| LeadsTo(Init,Acts) A (A' Un B); LeadsTo(Init,Acts) B B'; \
|
4776
|
203 |
\ id: Acts |] \
|
5111
|
204 |
\ ==> LeadsTo(Init,Acts) A (A' Un B')";
|
4776
|
205 |
by (blast_tac (claset() addIs [LeadsTo_Un_Un,
|
|
206 |
subset_imp_LeadsTo, LeadsTo_Trans]) 1);
|
|
207 |
qed "LeadsTo_cancel2";
|
|
208 |
|
5069
|
209 |
Goal
|
5111
|
210 |
"[| LeadsTo(Init,Acts) A (A' Un B); LeadsTo(Init,Acts) (B-A') B'; id: Acts |] \
|
|
211 |
\ ==> LeadsTo(Init,Acts) A (A' Un B')";
|
4776
|
212 |
by (rtac LeadsTo_cancel2 1);
|
|
213 |
by (assume_tac 2);
|
|
214 |
by (ALLGOALS Asm_simp_tac);
|
|
215 |
qed "LeadsTo_cancel_Diff2";
|
|
216 |
|
5069
|
217 |
Goal
|
5111
|
218 |
"[| LeadsTo(Init,Acts) A (B Un A'); LeadsTo(Init,Acts) B B'; id: Acts |] \
|
|
219 |
\ ==> LeadsTo(Init,Acts) A (B' Un A')";
|
4776
|
220 |
by (asm_full_simp_tac (simpset() addsimps [Un_commute]) 1);
|
|
221 |
by (blast_tac (claset() addSIs [LeadsTo_cancel2]) 1);
|
|
222 |
qed "LeadsTo_cancel1";
|
|
223 |
|
5069
|
224 |
Goal
|
5111
|
225 |
"[| LeadsTo(Init,Acts) A (B Un A'); LeadsTo(Init,Acts) (B-A') B'; id: Acts |] \
|
|
226 |
\ ==> LeadsTo(Init,Acts) A (B' Un A')";
|
4776
|
227 |
by (rtac LeadsTo_cancel1 1);
|
|
228 |
by (assume_tac 2);
|
|
229 |
by (ALLGOALS Asm_simp_tac);
|
|
230 |
qed "LeadsTo_cancel_Diff1";
|
|
231 |
|
|
232 |
|
|
233 |
|
|
234 |
(** The impossibility law **)
|
|
235 |
|
5111
|
236 |
Goal "LeadsTo(Init,Acts) A {} ==> reachable(Init,Acts) Int A = {}";
|
|
237 |
by (full_simp_tac (simpset() addsimps [LeadsTo_def]) 1);
|
4776
|
238 |
by (etac leadsTo_empty 1);
|
|
239 |
qed "LeadsTo_empty";
|
|
240 |
|
|
241 |
|
|
242 |
(** PSP: Progress-Safety-Progress **)
|
|
243 |
|
|
244 |
(*Special case of PSP: Misra's "stable conjunction". Doesn't need id:Acts. *)
|
5111
|
245 |
Goal "[| LeadsTo(Init,Acts) A A'; stable Acts B |] \
|
|
246 |
\ ==> LeadsTo(Init,Acts) (A Int B) (A' Int B)";
|
|
247 |
by (asm_full_simp_tac (simpset() addsimps [LeadsTo_def, Int_assoc RS sym,
|
|
248 |
PSP_stable]) 1);
|
4776
|
249 |
qed "R_PSP_stable";
|
|
250 |
|
5111
|
251 |
Goal "[| LeadsTo(Init,Acts) A A'; stable Acts B |] \
|
|
252 |
\ ==> LeadsTo(Init,Acts) (B Int A) (B Int A')";
|
4776
|
253 |
by (asm_simp_tac (simpset() addsimps (R_PSP_stable::Int_ac)) 1);
|
|
254 |
qed "R_PSP_stable2";
|
|
255 |
|
|
256 |
|
5111
|
257 |
Goal "[| LeadsTo(Init,Acts) A A'; constrains Acts B B'; id: Acts |] \
|
|
258 |
\ ==> LeadsTo(Init,Acts) (A Int B) ((A' Int B) Un (B' - B))";
|
|
259 |
by (full_simp_tac (simpset() addsimps [LeadsTo_def]) 1);
|
4776
|
260 |
by (dtac PSP 1);
|
|
261 |
by (etac constrains_reachable 1);
|
|
262 |
by (etac leadsTo_weaken 2);
|
|
263 |
by (ALLGOALS Blast_tac);
|
|
264 |
qed "R_PSP";
|
|
265 |
|
5069
|
266 |
Goal
|
5111
|
267 |
"[| LeadsTo(Init,Acts) A A'; constrains Acts B B'; id: Acts |] \
|
|
268 |
\ ==> LeadsTo(Init,Acts) (B Int A) ((B Int A') Un (B' - B))";
|
4776
|
269 |
by (asm_simp_tac (simpset() addsimps (R_PSP::Int_ac)) 1);
|
|
270 |
qed "R_PSP2";
|
|
271 |
|
5069
|
272 |
Goalw [unless_def]
|
5111
|
273 |
"[| LeadsTo(Init,Acts) A A'; unless Acts B B'; id: Acts |] \
|
|
274 |
\ ==> LeadsTo(Init,Acts) (A Int B) ((A' Int B) Un B')";
|
4776
|
275 |
by (dtac R_PSP 1);
|
|
276 |
by (assume_tac 1);
|
|
277 |
by (asm_full_simp_tac (simpset() addsimps [Un_Diff_Diff, Int_Diff_Un]) 2);
|
|
278 |
by (asm_full_simp_tac (simpset() addsimps [Diff_Int_distrib]) 2);
|
|
279 |
by (etac LeadsTo_Diff 2);
|
|
280 |
by (blast_tac (claset() addIs [subset_imp_LeadsTo]) 2);
|
|
281 |
by Auto_tac;
|
|
282 |
qed "R_PSP_unless";
|
|
283 |
|
|
284 |
|
|
285 |
(*** Induction rules ***)
|
|
286 |
|
|
287 |
(** Meta or object quantifier ????? **)
|
5111
|
288 |
Goal
|
|
289 |
"[| wf r; \
|
|
290 |
\ ALL m. LeadsTo(Init,Acts) (A Int f-``{m}) \
|
4776
|
291 |
\ ((A Int f-``(r^-1 ^^ {m})) Un B); \
|
|
292 |
\ id: Acts |] \
|
5111
|
293 |
\ ==> LeadsTo(Init,Acts) A B";
|
|
294 |
by (full_simp_tac (simpset() addsimps [LeadsTo_def]) 1);
|
4776
|
295 |
by (etac leadsTo_wf_induct 1);
|
|
296 |
by (assume_tac 2);
|
|
297 |
by (blast_tac (claset() addIs [leadsTo_weaken]) 1);
|
|
298 |
qed "LeadsTo_wf_induct";
|
|
299 |
|
|
300 |
|
5069
|
301 |
Goal
|
5111
|
302 |
"[| wf r; \
|
|
303 |
\ ALL m:I. LeadsTo(Init,Acts) (A Int f-``{m}) \
|
4776
|
304 |
\ ((A Int f-``(r^-1 ^^ {m})) Un B); \
|
|
305 |
\ id: Acts |] \
|
5111
|
306 |
\ ==> LeadsTo(Init,Acts) A ((A - (f-``I)) Un B)";
|
4776
|
307 |
by (etac LeadsTo_wf_induct 1);
|
|
308 |
by Safe_tac;
|
|
309 |
by (case_tac "m:I" 1);
|
|
310 |
by (blast_tac (claset() addIs [LeadsTo_weaken]) 1);
|
|
311 |
by (blast_tac (claset() addIs [subset_imp_LeadsTo]) 1);
|
|
312 |
qed "R_bounded_induct";
|
|
313 |
|
|
314 |
|
5069
|
315 |
Goal
|
5111
|
316 |
"[| ALL m. LeadsTo(Init,Acts) (A Int f-``{m}) \
|
4776
|
317 |
\ ((A Int f-``(lessThan m)) Un B); \
|
|
318 |
\ id: Acts |] \
|
5111
|
319 |
\ ==> LeadsTo(Init,Acts) A B";
|
4776
|
320 |
by (rtac (wf_less_than RS LeadsTo_wf_induct) 1);
|
|
321 |
by (assume_tac 2);
|
|
322 |
by (Asm_simp_tac 1);
|
|
323 |
qed "R_lessThan_induct";
|
|
324 |
|
5069
|
325 |
Goal
|
5111
|
326 |
"[| ALL m:(greaterThan l). LeadsTo(Init,Acts) (A Int f-``{m}) \
|
4776
|
327 |
\ ((A Int f-``(lessThan m)) Un B); \
|
|
328 |
\ id: Acts |] \
|
5111
|
329 |
\ ==> LeadsTo(Init,Acts) A ((A Int (f-``(atMost l))) Un B)";
|
4776
|
330 |
by (simp_tac (HOL_ss addsimps [Diff_eq RS sym, vimage_Compl, Compl_greaterThan RS sym]) 1);
|
|
331 |
by (rtac (wf_less_than RS R_bounded_induct) 1);
|
|
332 |
by (assume_tac 2);
|
|
333 |
by (Asm_simp_tac 1);
|
|
334 |
qed "R_lessThan_bounded_induct";
|
|
335 |
|
5069
|
336 |
Goal
|
5111
|
337 |
"[| ALL m:(lessThan l). LeadsTo(Init,Acts) (A Int f-``{m}) \
|
4776
|
338 |
\ ((A Int f-``(greaterThan m)) Un B); \
|
|
339 |
\ id: Acts |] \
|
5111
|
340 |
\ ==> LeadsTo(Init,Acts) A ((A Int (f-``(atLeast l))) Un B)";
|
4776
|
341 |
by (res_inst_tac [("f","f"),("f1", "%k. l - k")]
|
|
342 |
(wf_less_than RS wf_inv_image RS LeadsTo_wf_induct) 1);
|
|
343 |
by (assume_tac 2);
|
|
344 |
by (simp_tac (simpset() addsimps [inv_image_def, Image_singleton]) 1);
|
|
345 |
by (Clarify_tac 1);
|
|
346 |
by (case_tac "m<l" 1);
|
|
347 |
by (blast_tac (claset() addIs [not_leE, subset_imp_LeadsTo]) 2);
|
|
348 |
by (blast_tac (claset() addIs [LeadsTo_weaken_R, diff_less_mono2]) 1);
|
|
349 |
qed "R_greaterThan_bounded_induct";
|
|
350 |
|
|
351 |
|
|
352 |
|
|
353 |
(*** Completion: Binary and General Finite versions ***)
|
|
354 |
|
5111
|
355 |
Goal
|
|
356 |
"[| LeadsTo(Init,Acts) A A'; stable Acts A'; \
|
|
357 |
\ LeadsTo(Init,Acts) B B'; stable Acts B'; id: Acts |] \
|
|
358 |
\ ==> LeadsTo(Init,Acts) (A Int B) (A' Int B')";
|
|
359 |
by (full_simp_tac (simpset() addsimps [LeadsTo_def]) 1);
|
4776
|
360 |
by (blast_tac (claset() addIs [stable_completion RS leadsTo_weaken]
|
|
361 |
addSIs [stable_Int, stable_reachable]) 1);
|
|
362 |
qed "R_stable_completion";
|
|
363 |
|
|
364 |
|
5111
|
365 |
Goal "[| finite I; id: Acts |] \
|
|
366 |
\ ==> (ALL i:I. LeadsTo(Init,Acts) (A i) (A' i)) --> \
|
4776
|
367 |
\ (ALL i:I. stable Acts (A' i)) --> \
|
5111
|
368 |
\ LeadsTo(Init,Acts) (INT i:I. A i) (INT i:I. A' i)";
|
4776
|
369 |
by (etac finite_induct 1);
|
|
370 |
by (Asm_simp_tac 1);
|
|
371 |
by (asm_simp_tac
|
|
372 |
(simpset() addsimps [R_stable_completion, stable_def,
|
|
373 |
ball_constrains_INT]) 1);
|
|
374 |
qed_spec_mp "R_finite_stable_completion";
|
|
375 |
|
|
376 |
|
5111
|
377 |
Goal
|
|
378 |
"[| LeadsTo(Init,Acts) A (A' Un C); constrains Acts A' (A' Un C); \
|
|
379 |
\ LeadsTo(Init,Acts) B (B' Un C); constrains Acts B' (B' Un C); \
|
4776
|
380 |
\ id: Acts |] \
|
5111
|
381 |
\ ==> LeadsTo(Init,Acts) (A Int B) ((A' Int B') Un C)";
|
4776
|
382 |
|
5111
|
383 |
by (full_simp_tac (simpset() addsimps [LeadsTo_def, Int_Un_distrib]) 1);
|
4776
|
384 |
by (dtac completion 1);
|
|
385 |
by (assume_tac 2);
|
|
386 |
by (ALLGOALS
|
|
387 |
(asm_simp_tac
|
|
388 |
(simpset() addsimps [constrains_reachable, Int_Un_distrib RS sym])));
|
|
389 |
by (blast_tac (claset() addIs [leadsTo_weaken]) 1);
|
|
390 |
qed "R_completion";
|
|
391 |
|
|
392 |
|
5069
|
393 |
Goal
|
5111
|
394 |
"[| finite I; id: Acts |] \
|
|
395 |
\ ==> (ALL i:I. LeadsTo(Init,Acts) (A i) (A' i Un C)) --> \
|
4776
|
396 |
\ (ALL i:I. constrains Acts (A' i) (A' i Un C)) --> \
|
5111
|
397 |
\ LeadsTo(Init,Acts) (INT i:I. A i) ((INT i:I. A' i) Un C)";
|
4776
|
398 |
by (etac finite_induct 1);
|
|
399 |
by (ALLGOALS Asm_simp_tac);
|
|
400 |
by (Clarify_tac 1);
|
|
401 |
by (dtac ball_constrains_INT 1);
|
|
402 |
by (asm_full_simp_tac (simpset() addsimps [R_completion]) 1);
|
|
403 |
qed "R_finite_completion";
|
|
404 |
|