author | paulson |
Fri, 07 Jan 2000 10:55:35 +0100 | |
changeset 8110 | f7651ede12b7 |
parent 8072 | 5b95377d7538 |
child 8122 | b43ad07660b9 |
permissions | -rw-r--r-- |
8044 | 1 |
(* Title: HOL/UNITY/ELT |
2 |
ID: $Id$ |
|
3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
|
4 |
Copyright 1999 University of Cambridge |
|
5 |
||
6 |
leadsTo strengthened with a specification of the allowable sets transient parts |
|
7 |
*) |
|
8 |
||
8055
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
9 |
Goalw [givenBy_def] "givenBy id = UNIV"; |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
10 |
by Auto_tac; |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
11 |
qed "givenBy_id"; |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
12 |
Addsimps [givenBy_id]; |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
13 |
|
8044 | 14 |
Goalw [givenBy_def] "(givenBy v) = {A. ALL x:A. ALL y. v x = v y --> y: A}"; |
15 |
by Safe_tac; |
|
16 |
by (res_inst_tac [("x", "v `` ?u")] image_eqI 2); |
|
17 |
by Auto_tac; |
|
18 |
qed "givenBy_eq_all"; |
|
19 |
||
20 |
Goal "givenBy v = {A. EX P. A = {s. P(v s)}}"; |
|
21 |
by (simp_tac (simpset() addsimps [givenBy_eq_all]) 1); |
|
22 |
by Safe_tac; |
|
23 |
by (res_inst_tac [("x", "%n. EX s. v s = n & s : ?A")] exI 1); |
|
24 |
by (Blast_tac 1); |
|
25 |
by Auto_tac; |
|
26 |
qed "givenBy_eq_Collect"; |
|
27 |
||
28 |
val prems = |
|
8069
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
29 |
Goal "(!!x y. [| x:A; v x = v y |] ==> y: A) ==> A: givenBy v"; |
8044 | 30 |
by (stac givenBy_eq_all 1); |
31 |
by (blast_tac (claset() addIs prems) 1); |
|
32 |
qed "givenByI"; |
|
33 |
||
34 |
Goalw [givenBy_def] "[| A: givenBy v; x:A; v x = v y |] ==> y: A"; |
|
35 |
by Auto_tac; |
|
36 |
qed "givenByD"; |
|
37 |
||
38 |
Goal "{} : givenBy v"; |
|
39 |
by (blast_tac (claset() addSIs [givenByI]) 1); |
|
40 |
qed "empty_mem_givenBy"; |
|
41 |
||
42 |
AddIffs [empty_mem_givenBy]; |
|
43 |
||
44 |
Goal "A: givenBy v ==> EX P. A = {s. P(v s)}"; |
|
45 |
by (res_inst_tac [("x", "%n. EX s. v s = n & s : A")] exI 1); |
|
46 |
by (full_simp_tac (simpset() addsimps [givenBy_eq_all]) 1); |
|
47 |
by (Blast_tac 1); |
|
48 |
qed "givenBy_imp_eq_Collect"; |
|
49 |
||
50 |
Goalw [givenBy_def] "EX P. A = {s. P(v s)} ==> A: givenBy v"; |
|
51 |
by (Best_tac 1); |
|
52 |
qed "eq_Collect_imp_givenBy"; |
|
53 |
||
54 |
Goal "givenBy v = {A. EX P. A = {s. P(v s)}}"; |
|
55 |
by (blast_tac (claset() addIs [eq_Collect_imp_givenBy, |
|
56 |
givenBy_imp_eq_Collect]) 1); |
|
57 |
qed "givenBy_eq_eq_Collect"; |
|
58 |
||
8055
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
59 |
(*preserving v preserves properties given by v*) |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
60 |
Goal "[| F : preserves v; D : givenBy v |] ==> F : stable D"; |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
61 |
by (force_tac (claset(), |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
62 |
simpset() addsimps [impOfSubs preserves_subset_stable, |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
63 |
givenBy_eq_Collect]) 1); |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
64 |
qed "preserves_givenBy_imp_stable"; |
8044 | 65 |
|
8069
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
66 |
Goal "givenBy (w o v) <= givenBy v"; |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
67 |
by (simp_tac (simpset() addsimps [givenBy_eq_Collect]) 1); |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
68 |
by (Deepen_tac 0 1); |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
69 |
qed "givenBy_o_subset"; |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
70 |
|
8044 | 71 |
|
72 |
(** Standard leadsTo rules **) |
|
73 |
||
8072
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
74 |
Goalw [leadsETo_def] |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
75 |
"[| F: A ensures B; A-B: insert {} CC |] ==> F : A leadsTo[CC] B"; |
8044 | 76 |
by (blast_tac (claset() addIs [elt.Basis]) 1); |
77 |
qed "leadsETo_Basis"; |
|
78 |
||
79 |
Goalw [leadsETo_def] |
|
80 |
"[| F : A leadsTo[CC] B; F : B leadsTo[CC] C |] ==> F : A leadsTo[CC] C"; |
|
81 |
by (blast_tac (claset() addIs [elt.Trans]) 1); |
|
82 |
qed "leadsETo_Trans"; |
|
83 |
||
84 |
(*Useful with cancellation, disjunction*) |
|
85 |
Goal "F : A leadsTo[CC] (A' Un A') ==> F : A leadsTo[CC] A'"; |
|
86 |
by (asm_full_simp_tac (simpset() addsimps Un_ac) 1); |
|
87 |
qed "leadsETo_Un_duplicate"; |
|
88 |
||
89 |
Goal "F : A leadsTo[CC] (A' Un C Un C) ==> F : A leadsTo[CC] (A' Un C)"; |
|
90 |
by (asm_full_simp_tac (simpset() addsimps Un_ac) 1); |
|
91 |
qed "leadsETo_Un_duplicate2"; |
|
92 |
||
93 |
(*The Union introduction rule as we should have liked to state it*) |
|
94 |
val prems = Goalw [leadsETo_def] |
|
95 |
"(!!A. A : S ==> F : A leadsTo[CC] B) ==> F : (Union S) leadsTo[CC] B"; |
|
96 |
by (blast_tac (claset() addIs [elt.Union] addDs prems) 1); |
|
97 |
qed "leadsETo_Union"; |
|
98 |
||
99 |
val prems = Goal |
|
100 |
"(!!i. i : I ==> F : (A i) leadsTo[CC] B) \ |
|
101 |
\ ==> F : (UN i:I. A i) leadsTo[CC] B"; |
|
102 |
by (stac (Union_image_eq RS sym) 1); |
|
103 |
by (blast_tac (claset() addIs leadsETo_Union::prems) 1); |
|
104 |
qed "leadsETo_UN"; |
|
105 |
||
106 |
(*The INDUCTION rule as we should have liked to state it*) |
|
107 |
val major::prems = Goalw [leadsETo_def] |
|
108 |
"[| F : za leadsTo[CC] zb; \ |
|
8072
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
109 |
\ !!A B. [| F : A ensures B; A-B : insert {} CC |] ==> P A B; \ |
8044 | 110 |
\ !!A B C. [| F : A leadsTo[CC] B; P A B; F : B leadsTo[CC] C; P B C |] \ |
111 |
\ ==> P A C; \ |
|
112 |
\ !!B S. ALL A:S. F : A leadsTo[CC] B & P A B ==> P (Union S) B \ |
|
113 |
\ |] ==> P za zb"; |
|
114 |
by (rtac (major RS CollectD RS elt.induct) 1); |
|
115 |
by (REPEAT (blast_tac (claset() addIs prems) 1)); |
|
116 |
qed "leadsETo_induct"; |
|
117 |
||
118 |
||
119 |
(** New facts involving leadsETo **) |
|
120 |
||
121 |
Goal "CC' <= CC ==> (A leadsTo[CC'] B) <= (A leadsTo[CC] B)"; |
|
122 |
by Safe_tac; |
|
123 |
by (etac leadsETo_induct 1); |
|
124 |
by (blast_tac (claset() addIs [leadsETo_Union]) 3); |
|
125 |
by (blast_tac (claset() addIs [leadsETo_Trans]) 2); |
|
126 |
by (blast_tac (claset() addIs [leadsETo_Basis]) 1); |
|
127 |
qed "leadsETo_mono"; |
|
128 |
||
129 |
val prems = Goalw [leadsETo_def] |
|
130 |
"(!!A. A : S ==> F : (A Int C) leadsTo[CC] B) ==> F : (Union S Int C) leadsTo[CC] B"; |
|
131 |
by (simp_tac (HOL_ss addsimps [Int_Union_Union]) 1); |
|
132 |
by (blast_tac (claset() addIs [elt.Union] addDs prems) 1); |
|
133 |
qed "leadsETo_Union_Int"; |
|
134 |
||
135 |
(*Binary union introduction rule*) |
|
136 |
Goal "[| F : A leadsTo[CC] C; F : B leadsTo[CC] C |] ==> F : (A Un B) leadsTo[CC] C"; |
|
137 |
by (stac Un_eq_Union 1); |
|
138 |
by (blast_tac (claset() addIs [leadsETo_Union]) 1); |
|
139 |
qed "leadsETo_Un"; |
|
140 |
||
141 |
val prems = |
|
142 |
Goal "(!!x. x : A ==> F : {x} leadsTo[CC] B) ==> F : A leadsTo[CC] B"; |
|
143 |
by (stac (UN_singleton RS sym) 1 THEN rtac leadsETo_UN 1); |
|
144 |
by (blast_tac (claset() addIs prems) 1); |
|
145 |
qed "single_leadsETo_I"; |
|
146 |
||
147 |
||
8072
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
148 |
Goal "A<=B ==> F : A leadsTo[CC] B"; |
8044 | 149 |
by (asm_simp_tac (simpset() addsimps [subset_imp_ensures RS leadsETo_Basis, |
150 |
Diff_eq_empty_iff RS iffD2]) 1); |
|
151 |
qed "subset_imp_leadsETo"; |
|
152 |
||
153 |
bind_thm ("empty_leadsETo", empty_subsetI RS subset_imp_leadsETo); |
|
154 |
Addsimps [empty_leadsETo]; |
|
155 |
||
156 |
||
8072
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
157 |
(** Weakening laws **) |
8044 | 158 |
|
8072
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
159 |
Goal "[| F : A leadsTo[CC] A'; A'<=B' |] ==> F : A leadsTo[CC] B'"; |
8044 | 160 |
by (blast_tac (claset() addIs [subset_imp_leadsETo, leadsETo_Trans]) 1); |
161 |
qed "leadsETo_weaken_R"; |
|
162 |
||
8072
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
163 |
Goal "[| F : A leadsTo[CC] A'; B<=A |] ==> F : B leadsTo[CC] A'"; |
8044 | 164 |
by (blast_tac (claset() addIs [leadsETo_Trans, subset_imp_leadsETo]) 1); |
165 |
qed_spec_mp "leadsETo_weaken_L"; |
|
166 |
||
167 |
(*Distributes over binary unions*) |
|
8072
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
168 |
Goal "F : (A Un B) leadsTo[CC] C = \ |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
169 |
\ (F : A leadsTo[CC] C & F : B leadsTo[CC] C)"; |
8044 | 170 |
by (blast_tac (claset() addIs [leadsETo_Un, leadsETo_weaken_L]) 1); |
171 |
qed "leadsETo_Un_distrib"; |
|
172 |
||
8072
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
173 |
Goal "F : (UN i:I. A i) leadsTo[CC] B = \ |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
174 |
\ (ALL i : I. F : (A i) leadsTo[CC] B)"; |
8044 | 175 |
by (blast_tac (claset() addIs [leadsETo_UN, leadsETo_weaken_L]) 1); |
176 |
qed "leadsETo_UN_distrib"; |
|
177 |
||
8072
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
178 |
Goal "F : (Union S) leadsTo[CC] B = (ALL A : S. F : A leadsTo[CC] B)"; |
8044 | 179 |
by (blast_tac (claset() addIs [leadsETo_Union, leadsETo_weaken_L]) 1); |
180 |
qed "leadsETo_Union_distrib"; |
|
181 |
||
8072
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
182 |
Goal "[| F : A leadsTo[CC'] A'; B<=A; A'<=B'; CC' <= CC |] \ |
8044 | 183 |
\ ==> F : B leadsTo[CC] B'"; |
184 |
by (dtac (impOfSubs leadsETo_mono) 1); |
|
185 |
by (assume_tac 1); |
|
8110 | 186 |
by (blast_tac (claset() delrules [subsetCE] |
187 |
addIs [leadsETo_weaken_R, leadsETo_weaken_L, |
|
8044 | 188 |
leadsETo_Trans]) 1); |
189 |
qed "leadsETo_weaken"; |
|
190 |
||
191 |
Goal "[| F : A leadsTo[CC] A'; CC <= givenBy v |] \ |
|
192 |
\ ==> F : A leadsTo[givenBy v] A'"; |
|
193 |
by (blast_tac (claset() addIs [empty_mem_givenBy, leadsETo_weaken]) 1); |
|
194 |
qed "leadsETo_givenBy"; |
|
195 |
||
196 |
||
197 |
(*Set difference*) |
|
8072
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
198 |
Goal "[| F : (A-B) leadsTo[CC] C; F : B leadsTo[CC] C |] \ |
8044 | 199 |
\ ==> F : A leadsTo[CC] C"; |
200 |
by (blast_tac (claset() addIs [leadsETo_Un, leadsETo_weaken]) 1); |
|
201 |
qed "leadsETo_Diff"; |
|
202 |
||
203 |
||
204 |
(** Meta or object quantifier ??? |
|
205 |
see ball_constrains_UN in UNITY.ML***) |
|
206 |
||
207 |
val prems = goal thy |
|
8072
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
208 |
"[| !! i. i:I ==> F : (A i) leadsTo[CC] (A' i) |] \ |
8044 | 209 |
\ ==> F : (UN i:I. A i) leadsTo[CC] (UN i:I. A' i)"; |
210 |
by (simp_tac (HOL_ss addsimps [Union_image_eq RS sym]) 1); |
|
211 |
by (blast_tac (claset() addIs [leadsETo_Union, leadsETo_weaken_R] |
|
212 |
addIs prems) 1); |
|
213 |
qed "leadsETo_UN_UN"; |
|
214 |
||
215 |
(*Binary union version*) |
|
8072
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
216 |
Goal "[| F : A leadsTo[CC] A'; F : B leadsTo[CC] B' |] \ |
8044 | 217 |
\ ==> F : (A Un B) leadsTo[CC] (A' Un B')"; |
218 |
by (blast_tac (claset() addIs [leadsETo_Un, |
|
219 |
leadsETo_weaken_R]) 1); |
|
220 |
qed "leadsETo_Un_Un"; |
|
221 |
||
222 |
||
223 |
(** The cancellation law **) |
|
224 |
||
8072
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
225 |
Goal "[| F : A leadsTo[CC] (A' Un B); F : B leadsTo[CC] B' |] \ |
8044 | 226 |
\ ==> F : A leadsTo[CC] (A' Un B')"; |
227 |
by (blast_tac (claset() addIs [leadsETo_Un_Un, |
|
228 |
subset_imp_leadsETo, leadsETo_Trans]) 1); |
|
229 |
qed "leadsETo_cancel2"; |
|
230 |
||
8072
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
231 |
Goal "[| F : A leadsTo[CC] (A' Un B); F : (B-A') leadsTo[CC] B' |] \ |
8044 | 232 |
\ ==> F : A leadsTo[CC] (A' Un B')"; |
233 |
by (rtac leadsETo_cancel2 1); |
|
234 |
by (assume_tac 2); |
|
235 |
by (ALLGOALS Asm_simp_tac); |
|
236 |
qed "leadsETo_cancel_Diff2"; |
|
237 |
||
8072
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
238 |
Goal "[| F : A leadsTo[CC] (B Un A'); F : B leadsTo[CC] B' |] \ |
8044 | 239 |
\ ==> F : A leadsTo[CC] (B' Un A')"; |
240 |
by (asm_full_simp_tac (simpset() addsimps [Un_commute]) 1); |
|
241 |
by (blast_tac (claset() addSIs [leadsETo_cancel2]) 1); |
|
242 |
qed "leadsETo_cancel1"; |
|
243 |
||
8072
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
244 |
Goal "[| F : A leadsTo[CC] (B Un A'); F : (B-A') leadsTo[CC] B' |] \ |
8044 | 245 |
\ ==> F : A leadsTo[CC] (B' Un A')"; |
246 |
by (rtac leadsETo_cancel1 1); |
|
247 |
by (assume_tac 2); |
|
248 |
by (ALLGOALS Asm_simp_tac); |
|
249 |
qed "leadsETo_cancel_Diff1"; |
|
250 |
||
251 |
||
252 |
(** The impossibility law **) |
|
253 |
||
254 |
Goal "F : A leadsTo[CC] B ==> B={} --> A={}"; |
|
255 |
by (etac leadsETo_induct 1); |
|
256 |
by (ALLGOALS Asm_simp_tac); |
|
257 |
by (rewrite_goals_tac [ensures_def, constrains_def, transient_def]); |
|
258 |
by (Blast_tac 1); |
|
259 |
val lemma = result() RS mp; |
|
260 |
||
261 |
Goal "F : A leadsTo[CC] {} ==> A={}"; |
|
262 |
by (blast_tac (claset() addSIs [lemma]) 1); |
|
263 |
qed "leadsETo_empty"; |
|
264 |
||
265 |
||
266 |
(** PSP: Progress-Safety-Progress **) |
|
267 |
||
268 |
(*Special case of PSP: Misra's "stable conjunction"*) |
|
269 |
Goalw [stable_def] |
|
270 |
"[| F : A leadsTo[CC] A'; F : stable B; ALL C:CC. C Int B : CC |] \ |
|
271 |
\ ==> F : (A Int B) leadsTo[CC] (A' Int B)"; |
|
272 |
by (etac leadsETo_induct 1); |
|
273 |
by (blast_tac (claset() addIs [leadsETo_Union_Int]) 3); |
|
274 |
by (blast_tac (claset() addIs [leadsETo_Trans]) 2); |
|
275 |
by (rtac leadsETo_Basis 1); |
|
8072
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
276 |
by (force_tac (claset(), |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
277 |
simpset() addsimps [Diff_Int_distrib2 RS sym]) 2); |
8044 | 278 |
by (asm_full_simp_tac |
279 |
(simpset() addsimps [ensures_def, |
|
280 |
Diff_Int_distrib2 RS sym, Int_Un_distrib2 RS sym]) 1); |
|
281 |
by (blast_tac (claset() addIs [transient_strengthen, constrains_Int]) 1); |
|
282 |
qed "e_psp_stable"; |
|
283 |
||
284 |
Goal "[| F : A leadsTo[CC] A'; F : stable B; ALL C:CC. C Int B : CC |] \ |
|
285 |
\ ==> F : (B Int A) leadsTo[CC] (B Int A')"; |
|
286 |
by (asm_simp_tac (simpset() addsimps e_psp_stable::Int_ac) 1); |
|
287 |
qed "e_psp_stable2"; |
|
288 |
||
289 |
Goal "[| F : A leadsTo[CC] A'; F : B co B'; \ |
|
8072
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
290 |
\ ALL C:CC. C Int B Int B' : CC |] \ |
8044 | 291 |
\ ==> F : (A Int B') leadsTo[CC] ((A' Int B) Un (B' - B))"; |
292 |
by (etac leadsETo_induct 1); |
|
293 |
by (blast_tac (claset() addIs [leadsETo_Union_Int]) 3); |
|
294 |
(*Transitivity case has a delicate argument involving "cancellation"*) |
|
295 |
by (rtac leadsETo_Un_duplicate2 2); |
|
296 |
by (etac leadsETo_cancel_Diff1 2); |
|
297 |
by (asm_full_simp_tac (simpset() addsimps [Int_Diff, Diff_triv]) 2); |
|
298 |
by (blast_tac (claset() addIs [leadsETo_weaken_L] |
|
299 |
addDs [constrains_imp_subset]) 2); |
|
300 |
(*Basis case*) |
|
301 |
by (rtac leadsETo_Basis 1); |
|
302 |
by (blast_tac (claset() addIs [psp_ensures]) 1); |
|
303 |
by (subgoal_tac "A Int B' - (Ba Int B Un (B' - B)) = (A - Ba) Int B Int B'" 1); |
|
304 |
by Auto_tac; |
|
305 |
qed "e_psp"; |
|
306 |
||
307 |
Goal "[| F : A leadsTo[CC] A'; F : B co B'; \ |
|
8072
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
308 |
\ ALL C:CC. C Int B Int B' : CC |] \ |
8044 | 309 |
\ ==> F : (B' Int A) leadsTo[CC] ((B Int A') Un (B' - B))"; |
310 |
by (asm_full_simp_tac (simpset() addsimps e_psp::Int_ac) 1); |
|
311 |
qed "e_psp2"; |
|
312 |
||
313 |
||
314 |
(*** Special properties involving the parameter [CC] ***) |
|
315 |
||
316 |
(*??IS THIS NEEDED?? or is it just an example of what's provable??*) |
|
8055
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
317 |
Goal "[| F: (A leadsTo[givenBy v] B); G : preserves v; \ |
8044 | 318 |
\ F Join G : stable C |] \ |
319 |
\ ==> F Join G : ((C Int A) leadsTo[(%D. C Int D) `` givenBy v] B)"; |
|
320 |
by (etac leadsETo_induct 1); |
|
321 |
by (stac Int_Union 3); |
|
322 |
by (blast_tac (claset() addIs [leadsETo_UN]) 3); |
|
323 |
by (blast_tac (claset() addIs [e_psp_stable2 RS leadsETo_weaken_L, |
|
324 |
leadsETo_Trans]) 2); |
|
325 |
by (rtac leadsETo_Basis 1); |
|
326 |
by (auto_tac (claset(), |
|
8072
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
327 |
simpset() addsimps [Diff_eq_empty_iff RS iffD2, |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
328 |
Int_Diff, ensures_def, |
8055
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
329 |
givenBy_eq_Collect, Join_stable, |
8044 | 330 |
Join_constrains, Join_transient])); |
331 |
by (blast_tac (claset() addIs [transient_strengthen]) 3); |
|
8055
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
332 |
by (ALLGOALS (dres_inst_tac [("P1","P")] (impOfSubs preserves_subset_stable))); |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
333 |
by (rewtac stable_def); |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
334 |
by (blast_tac (claset() addSEs [equalityE] |
8044 | 335 |
addIs [constrains_Int RS constrains_weaken]) 2); |
8055
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
336 |
by (blast_tac (claset() addSEs [equalityE] |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
337 |
addIs [constrains_Int RS constrains_weaken]) 1); |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
338 |
qed "gen_leadsETo_imp_Join_leadsETo"; |
8044 | 339 |
|
340 |
(*useful??*) |
|
341 |
Goal "[| F Join G : (A leadsTo[CC] B); ALL C:CC. G : stable C |] \ |
|
342 |
\ ==> F: (A leadsTo[CC] B)"; |
|
343 |
by (etac leadsETo_induct 1); |
|
344 |
by (blast_tac (claset() addIs [leadsETo_Union]) 3); |
|
345 |
by (blast_tac (claset() addIs [leadsETo_Trans]) 2); |
|
346 |
by (rtac leadsETo_Basis 1); |
|
347 |
by (case_tac "A <= B" 1); |
|
348 |
by (etac subset_imp_ensures 1); |
|
349 |
by (auto_tac (claset() addIs [constrains_weaken], |
|
8072
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
350 |
simpset() addsimps [stable_def, ensures_def, |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
351 |
Join_constrains, Join_transient])); |
8044 | 352 |
by (REPEAT (thin_tac "?F : ?A co ?B" 1)); |
353 |
by (etac transientE 1); |
|
354 |
by (rewtac constrains_def); |
|
355 |
by (blast_tac (claset() addSDs [bspec]) 1); |
|
356 |
qed "Join_leadsETo_stable_imp_leadsETo"; |
|
357 |
||
8067 | 358 |
(**** Relationship with traditional "leadsTo", strong & weak ****) |
359 |
||
360 |
(** strong **) |
|
361 |
||
362 |
Goal "(A leadsTo[CC] B) <= (A leadsTo B)"; |
|
363 |
by Safe_tac; |
|
364 |
by (etac leadsETo_induct 1); |
|
365 |
by (blast_tac (claset() addIs [leadsTo_Union]) 3); |
|
366 |
by (blast_tac (claset() addIs [leadsTo_Trans]) 2); |
|
367 |
by (blast_tac (claset() addIs [leadsTo_Basis]) 1); |
|
368 |
qed "leadsETo_subset_leadsTo"; |
|
369 |
||
370 |
Goal "(A leadsTo[UNIV] B) = (A leadsTo B)"; |
|
371 |
by Safe_tac; |
|
372 |
by (etac (impOfSubs leadsETo_subset_leadsTo) 1); |
|
373 |
(*right-to-left case*) |
|
374 |
by (etac leadsTo_induct 1); |
|
375 |
by (blast_tac (claset() addIs [leadsETo_Union]) 3); |
|
376 |
by (blast_tac (claset() addIs [leadsETo_Trans]) 2); |
|
377 |
by (blast_tac (claset() addIs [leadsETo_Basis]) 1); |
|
378 |
qed "leadsETo_UNIV_eq_leadsTo"; |
|
379 |
||
8072
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
380 |
(**** weak ****) |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
381 |
|
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
382 |
Goalw [LeadsETo_def] |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
383 |
"A LeadsTo[CC] B = \ |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
384 |
\ {F. F : (reachable F Int A) leadsTo[(%C. reachable F Int C) `` CC] \ |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
385 |
\ (reachable F Int B)}"; |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
386 |
by (blast_tac (claset() addDs [e_psp_stable2] addIs [leadsETo_weaken]) 1); |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
387 |
qed "LeadsETo_eq_leadsETo"; |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
388 |
|
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
389 |
(*** Introduction rules: Basis, Trans, Union ***) |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
390 |
|
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
391 |
Goal "[| F : A LeadsTo[CC] B; F : B LeadsTo[CC] C |] \ |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
392 |
\ ==> F : A LeadsTo[CC] C"; |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
393 |
by (asm_full_simp_tac (simpset() addsimps [LeadsETo_eq_leadsETo]) 1); |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
394 |
by (blast_tac (claset() addIs [leadsETo_Trans]) 1); |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
395 |
qed "LeadsETo_Trans"; |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
396 |
|
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
397 |
val prems = Goalw [LeadsETo_def] |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
398 |
"(!!A. A : S ==> F : A LeadsTo[CC] B) ==> F : (Union S) LeadsTo[CC] B"; |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
399 |
by (Simp_tac 1); |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
400 |
by (stac Int_Union 1); |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
401 |
by (blast_tac (claset() addIs [leadsETo_UN] addDs prems) 1); |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
402 |
qed "LeadsETo_Union"; |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
403 |
|
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
404 |
val prems = |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
405 |
Goal "(!!i. i : I ==> F : (A i) LeadsTo[CC] B) \ |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
406 |
\ ==> F : (UN i:I. A i) LeadsTo[CC] B"; |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
407 |
by (simp_tac (HOL_ss addsimps [Union_image_eq RS sym]) 1); |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
408 |
by (blast_tac (claset() addIs (LeadsETo_Union::prems)) 1); |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
409 |
qed "LeadsETo_UN"; |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
410 |
|
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
411 |
(*Binary union introduction rule*) |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
412 |
Goal "[| F : A LeadsTo[CC] C; F : B LeadsTo[CC] C |] \ |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
413 |
\ ==> F : (A Un B) LeadsTo[CC] C"; |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
414 |
by (stac Un_eq_Union 1); |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
415 |
by (blast_tac (claset() addIs [LeadsETo_Union]) 1); |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
416 |
qed "LeadsETo_Un"; |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
417 |
|
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
418 |
(*Lets us look at the starting state*) |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
419 |
val prems = |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
420 |
Goal "(!!s. s : A ==> F : {s} LeadsTo[CC] B) ==> F : A LeadsTo[CC] B"; |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
421 |
by (stac (UN_singleton RS sym) 1 THEN rtac LeadsETo_UN 1); |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
422 |
by (blast_tac (claset() addIs prems) 1); |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
423 |
qed "single_LeadsETo_I"; |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
424 |
|
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
425 |
Goal "A <= B ==> F : A LeadsTo[CC] B"; |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
426 |
by (simp_tac (simpset() addsimps [LeadsETo_def]) 1); |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
427 |
by (blast_tac (claset() addIs [subset_imp_leadsETo]) 1); |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
428 |
qed "subset_imp_LeadsETo"; |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
429 |
|
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
430 |
bind_thm ("empty_LeadsETo", empty_subsetI RS subset_imp_LeadsETo); |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
431 |
|
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
432 |
Goal "[| F : A LeadsTo[CC] A'; A' <= B' |] ==> F : A LeadsTo[CC] B'"; |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
433 |
by (full_simp_tac (simpset() addsimps [LeadsETo_def]) 1); |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
434 |
by (blast_tac (claset() addIs [leadsETo_weaken_R]) 1); |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
435 |
qed_spec_mp "LeadsETo_weaken_R"; |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
436 |
|
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
437 |
Goal "[| F : A LeadsTo[CC] A'; B <= A |] ==> F : B LeadsTo[CC] A'"; |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
438 |
by (full_simp_tac (simpset() addsimps [LeadsETo_def]) 1); |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
439 |
by (blast_tac (claset() addIs [leadsETo_weaken_L]) 1); |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
440 |
qed_spec_mp "LeadsETo_weaken_L"; |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
441 |
|
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
442 |
Goal "[| F : A LeadsTo[CC'] A'; \ |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
443 |
\ B <= A; A' <= B'; CC' <= CC |] \ |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
444 |
\ ==> F : B LeadsTo[CC] B'"; |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
445 |
by (full_simp_tac (simpset() addsimps [LeadsETo_def]) 1); |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
446 |
by (blast_tac (claset() addIs [leadsETo_weaken]) 1); |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
447 |
qed "LeadsETo_weaken"; |
8067 | 448 |
|
449 |
Goalw [LeadsETo_def, LeadsTo_def] "(A LeadsTo[CC] B) <= (A LeadsTo B)"; |
|
450 |
by (blast_tac (claset() addIs [impOfSubs leadsETo_subset_leadsTo]) 1); |
|
451 |
qed "LeadsETo_subset_LeadsTo"; |
|
452 |
||
453 |
(*Postcondition can be strengthened to (reachable F Int B) *) |
|
454 |
Goal "F : A ensures B ==> F : (reachable F Int A) ensures B"; |
|
455 |
by (rtac (stable_ensures_Int RS ensures_weaken_R) 1); |
|
8069
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
456 |
by Auto_tac; |
8067 | 457 |
qed "reachable_ensures"; |
458 |
||
459 |
Goal "F : A leadsTo B ==> F : (reachable F Int A) leadsTo[Pow(reachable F)] B"; |
|
460 |
by (etac leadsTo_induct 1); |
|
461 |
by (stac Int_Union 3); |
|
462 |
by (blast_tac (claset() addIs [leadsETo_UN]) 3); |
|
463 |
by (blast_tac (claset() addDs [e_psp_stable2] |
|
8069
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
464 |
addIs [leadsETo_Trans, leadsETo_weaken_L]) 2); |
8067 | 465 |
by (blast_tac (claset() addIs [reachable_ensures, leadsETo_Basis]) 1); |
466 |
val lemma = result(); |
|
467 |
||
468 |
Goal "(A LeadsTo[UNIV] B) = (A LeadsTo B)"; |
|
469 |
by Safe_tac; |
|
470 |
by (etac (impOfSubs LeadsETo_subset_LeadsTo) 1); |
|
471 |
(*right-to-left case*) |
|
472 |
by (rewrite_goals_tac [LeadsETo_def, LeadsTo_def]); |
|
473 |
by (fast_tac (claset() addEs [lemma RS leadsETo_weaken]) 1); |
|
474 |
qed "LeadsETo_UNIV_eq_LeadsTo"; |
|
475 |
||
8044 | 476 |
|
477 |
(**** EXTEND/PROJECT PROPERTIES ****) |
|
478 |
||
479 |
Open_locale "Extend"; |
|
480 |
||
8069
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
481 |
Goal "givenBy (v o f) = extend_set h `` (givenBy v)"; |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
482 |
by (simp_tac (simpset() addsimps [givenBy_eq_Collect]) 1); |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
483 |
by (Deepen_tac 0 1); |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
484 |
qed "givenBy_o_eq_extend_set"; |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
485 |
|
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
486 |
Goal "givenBy f = range (extend_set h)"; |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
487 |
by (simp_tac (simpset() addsimps [givenBy_eq_Collect]) 1); |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
488 |
by (Deepen_tac 0 1); |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
489 |
qed "givenBy_eq_extend_set"; |
8044 | 490 |
|
491 |
Goal "D : givenBy v ==> extend_set h D : givenBy (v o f)"; |
|
492 |
by (full_simp_tac (simpset() addsimps [givenBy_eq_all]) 1); |
|
493 |
by (Blast_tac 1); |
|
494 |
qed "extend_set_givenBy_I"; |
|
495 |
||
496 |
||
497 |
Goal "F : A leadsTo[CC] B \ |
|
498 |
\ ==> extend h F : (extend_set h A) leadsTo[extend_set h `` CC] \ |
|
499 |
\ (extend_set h B)"; |
|
500 |
by (etac leadsETo_induct 1); |
|
501 |
by (asm_simp_tac (simpset() addsimps [leadsETo_UN, extend_set_Union]) 3); |
|
502 |
by (blast_tac (claset() addIs [leadsETo_Trans]) 2); |
|
8072
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
503 |
by (force_tac (claset() addIs [leadsETo_Basis, subset_imp_ensures], |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
504 |
simpset() addsimps [extend_ensures, |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
505 |
extend_set_Diff_distrib RS sym]) 1); |
8044 | 506 |
qed "leadsETo_imp_extend_leadsETo"; |
507 |
||
8069
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
508 |
(*MOVE to Extend.ML?*) |
8044 | 509 |
Goal "A Int extend_set h ((project_set h A) Int B) = A Int extend_set h B"; |
8069
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
510 |
by (auto_tac (claset(), simpset() addsimps [split_extended_all])); |
8044 | 511 |
qed "Int_extend_set_lemma"; |
512 |
||
8069
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
513 |
(*MOVE to extend.ML??*) |
8044 | 514 |
Goal "G : C co B ==> project h C G : project_set h C co project_set h B"; |
515 |
by (full_simp_tac (simpset() addsimps [constrains_def, project_def, |
|
8069
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
516 |
project_act_def]) 1); |
8044 | 517 |
by (Blast_tac 1); |
518 |
qed "project_constrains_project_set"; |
|
519 |
||
8069
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
520 |
(*MOVE to extend.ML??*) |
8044 | 521 |
Goal "G : stable C ==> project h C G : stable (project_set h C)"; |
522 |
by (asm_full_simp_tac (simpset() addsimps [stable_def, |
|
523 |
project_constrains_project_set]) 1); |
|
524 |
qed "project_stable_project_set"; |
|
525 |
||
8055
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
526 |
|
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
527 |
|
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
528 |
(*NOT USED, but analogous to preserves_project_transient_empty in Project.ML*) |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
529 |
Goal "[| G : preserves (v o f); project h C G : transient D; \ |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
530 |
\ D : givenBy v |] ==> D={}"; |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
531 |
by (rtac stable_transient_empty 1); |
8044 | 532 |
by (assume_tac 2); |
8055
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
533 |
(*If addIs then PROOF FAILED at depth 2*) |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
534 |
by (blast_tac (claset() addSIs [preserves_givenBy_imp_stable, |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
535 |
project_preserves_I]) 1); |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
536 |
result(); |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
537 |
|
8110 | 538 |
(*GENERALIZES the version proved in Project.ML*) |
8055
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
539 |
Goal "[| G : preserves (v o f); \ |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
540 |
\ project h C G : transient (C' Int D); \ |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
541 |
\ project h C G : stable C'; D : givenBy v |] \ |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
542 |
\ ==> C' Int D = {}"; |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
543 |
by (rtac stable_transient_empty 1); |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
544 |
by (assume_tac 2); |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
545 |
(*If addIs then PROOF FAILED at depth 3*) |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
546 |
by (blast_tac (claset() addSIs [stable_Int, preserves_givenBy_imp_stable, |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
547 |
project_preserves_I]) 1); |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
548 |
qed "preserves_o_project_transient_empty"; |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
549 |
|
8044 | 550 |
|
551 |
(*This version's stronger in the "ensures" precondition |
|
552 |
BUT there's no ensures_weaken_L*) |
|
8055
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
553 |
Goal "[| project h C G ~: transient (project_set h C Int (A-B)) | \ |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
554 |
\ project_set h C Int (A - B) = {}; \ |
8044 | 555 |
\ extend h F Join G : stable C; \ |
556 |
\ F Join project h C G : (project_set h C Int A) ensures B |] \ |
|
557 |
\ ==> extend h F Join G : (C Int extend_set h A) ensures (extend_set h B)"; |
|
558 |
by (stac (Int_extend_set_lemma RS sym) 1); |
|
559 |
by (rtac Join_project_ensures 1); |
|
560 |
by (auto_tac (claset(), simpset() addsimps [Int_Diff])); |
|
561 |
qed "Join_project_ensures_strong"; |
|
562 |
||
563 |
Goal "[| extend h F Join G : stable C; \ |
|
8055
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
564 |
\ F Join project h C G : (project_set h C Int A) leadsTo[(%D. project_set h C Int D)``givenBy v] B; \ |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
565 |
\ G : preserves (v o f) |] \ |
8044 | 566 |
\ ==> extend h F Join G : \ |
567 |
\ (C Int extend_set h (project_set h C Int A)) \ |
|
568 |
\ leadsTo[(%D. C Int extend_set h D)``givenBy v] (extend_set h B)"; |
|
569 |
by (etac leadsETo_induct 1); |
|
570 |
by (asm_simp_tac (simpset() delsimps UN_simps |
|
571 |
addsimps [Int_UN_distrib, leadsETo_UN, extend_set_Union]) 3); |
|
572 |
by (blast_tac (claset() addIs [e_psp_stable2 RS leadsETo_weaken_L, |
|
573 |
leadsETo_Trans]) 2); |
|
8110 | 574 |
by Auto_tac; |
8072
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
575 |
by (force_tac (claset() addIs [leadsETo_Basis, subset_imp_ensures], |
5b95377d7538
removing the "{} : CC" requirement for leadsTo[CC]
paulson
parents:
8069
diff
changeset
|
576 |
simpset()) 1); |
8044 | 577 |
by (rtac leadsETo_Basis 1); |
578 |
by (asm_simp_tac (simpset() addsimps [Int_Diff, Int_extend_set_lemma, |
|
579 |
extend_set_Diff_distrib RS sym]) 2); |
|
580 |
by (rtac Join_project_ensures_strong 1); |
|
8055
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
581 |
by (auto_tac (claset() addDs [preserves_o_project_transient_empty] |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
582 |
addIs [project_stable_project_set], |
8044 | 583 |
simpset() addsimps [Int_left_absorb, Join_stable])); |
584 |
by (asm_simp_tac |
|
585 |
(simpset() addsimps [stable_ensures_Int RS ensures_weaken_R, |
|
586 |
Int_lower2, project_stable_project_set, |
|
587 |
Join_stable, extend_stable_project_set]) 1); |
|
588 |
val lemma = result(); |
|
589 |
||
590 |
Goal "[| extend h F Join G : stable C; \ |
|
8055
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
591 |
\ F Join project h C G : \ |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
592 |
\ (project_set h C Int A) \ |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
593 |
\ leadsTo[(%D. project_set h C Int D)``givenBy v] B; \ |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
594 |
\ G : preserves (v o f) |] \ |
8044 | 595 |
\ ==> extend h F Join G : (C Int extend_set h A) \ |
596 |
\ leadsTo[(%D. C Int extend_set h D)``givenBy v] (extend_set h B)"; |
|
597 |
by (rtac (lemma RS leadsETo_weaken) 1); |
|
8069
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
598 |
by (auto_tac (claset(), |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
599 |
simpset() addsimps [split_extended_all])); |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
600 |
qed "project_leadsETo_D_lemma"; |
8044 | 601 |
|
8055
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
602 |
Goal "[| F Join project h UNIV G : A leadsTo[givenBy v] B; \ |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
603 |
\ G : preserves (v o f) |] \ |
8044 | 604 |
\ ==> extend h F Join G : (extend_set h A) \ |
605 |
\ leadsTo[givenBy (v o f)] (extend_set h B)"; |
|
8069
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
606 |
by (rtac (make_elim project_leadsETo_D_lemma) 1); |
8055
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
607 |
by (stac stable_UNIV 1); |
8044 | 608 |
by Auto_tac; |
609 |
by (etac leadsETo_givenBy 1); |
|
8069
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
610 |
by (rtac (givenBy_o_eq_extend_set RS equalityD2) 1); |
8044 | 611 |
qed "project_leadsETo_D"; |
612 |
||
613 |
Goal "[| F Join project h (reachable (extend h F Join G)) G \ |
|
8055
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
614 |
\ : A LeadsTo[givenBy v] B; \ |
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
615 |
\ G : preserves (v o f) |] \ |
8044 | 616 |
\ ==> extend h F Join G : \ |
617 |
\ (extend_set h A) LeadsTo[givenBy (v o f)] (extend_set h B)"; |
|
618 |
by (rtac (make_elim (subset_refl RS stable_reachable RS |
|
8069
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
619 |
project_leadsETo_D_lemma)) 1); |
8044 | 620 |
by (auto_tac (claset(), |
8055
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
621 |
simpset() addsimps [LeadsETo_def])); |
8044 | 622 |
by (asm_full_simp_tac |
623 |
(simpset() addsimps [project_set_reachable_extend_eq RS sym]) 1); |
|
624 |
by (etac (impOfSubs leadsETo_mono) 1); |
|
625 |
by (blast_tac (claset() addIs [extend_set_givenBy_I]) 1); |
|
626 |
qed "project_LeadsETo_D"; |
|
627 |
||
628 |
Goalw [extending_def] |
|
8055
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
629 |
"extending (v o f) (%G. UNIV) h F \ |
8044 | 630 |
\ (extend_set h A leadsTo[givenBy (v o f)] extend_set h B) \ |
631 |
\ (A leadsTo[givenBy v] B)"; |
|
8055
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
632 |
by (auto_tac (claset(), simpset() addsimps [project_leadsETo_D])); |
8044 | 633 |
qed "extending_leadsETo"; |
634 |
||
635 |
||
636 |
Goalw [extending_def] |
|
8055
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
637 |
"extending (v o f) (%G. reachable (extend h F Join G)) h F \ |
8044 | 638 |
\ (extend_set h A LeadsTo[givenBy (v o f)] extend_set h B) \ |
639 |
\ (A LeadsTo[givenBy v] B)"; |
|
8055
bb15396278fb
abolition of localTo: instead "guarantees" has local vars as extra argument
paulson
parents:
8044
diff
changeset
|
640 |
by (blast_tac (claset() addIs [project_LeadsETo_D]) 1); |
8044 | 641 |
qed "extending_LeadsETo"; |
642 |
||
643 |
||
8069
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
644 |
(*** leadsETo in the precondition ***) |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
645 |
|
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
646 |
(*Lemma for the Trans case*) |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
647 |
Goal "[| extend h F Join G : stable C; \ |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
648 |
\ F Join project h C G \ |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
649 |
\ : project_set h C Int project_set h A leadsTo project_set h B |] \ |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
650 |
\ ==> F Join project h C G \ |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
651 |
\ : project_set h C Int project_set h A leadsTo \ |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
652 |
\ project_set h C Int project_set h B"; |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
653 |
by (rtac (psp_stable2 RS leadsTo_weaken_L) 1); |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
654 |
by (auto_tac (claset(), |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
655 |
simpset() addsimps [project_stable_project_set, Join_stable, |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
656 |
extend_stable_project_set])); |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
657 |
val lemma = result(); |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
658 |
|
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
659 |
Goal "[| extend h F Join G : stable C; \ |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
660 |
\ extend h F Join G : \ |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
661 |
\ (C Int A) leadsTo[(%D. C Int D)``givenBy f] B |] \ |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
662 |
\ ==> F Join project h C G \ |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
663 |
\ : (project_set h C Int project_set h (C Int A)) leadsTo (project_set h B)"; |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
664 |
by (etac leadsETo_induct 1); |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
665 |
by (asm_simp_tac (HOL_ss addsimps [Int_UN_distrib, project_set_Union]) 3); |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
666 |
by (blast_tac (claset() addIs [leadsTo_UN]) 3); |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
667 |
by (blast_tac (claset() addIs [leadsTo_Trans, lemma]) 2); |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
668 |
by (asm_full_simp_tac |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
669 |
(simpset() addsimps [givenBy_eq_extend_set, Join_stable]) 1); |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
670 |
by (rtac leadsTo_Basis 1); |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
671 |
by (blast_tac (claset() addIs [leadsTo_Basis, |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
672 |
ensures_extend_set_imp_project_ensures]) 1); |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
673 |
|
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
674 |
qed "project_leadsETo_I_lemma"; |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
675 |
|
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
676 |
Goal "extend h F Join G : (extend_set h A) leadsTo[givenBy f] (extend_set h B)\ |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
677 |
\ ==> F Join project h UNIV G : A leadsTo B"; |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
678 |
by (rtac (project_leadsETo_I_lemma RS leadsTo_weaken) 1); |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
679 |
by Auto_tac; |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
680 |
qed "project_leadsETo_I"; |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
681 |
|
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
682 |
Goal "extend h F Join G : (extend_set h A) LeadsTo[givenBy f] (extend_set h B)\ |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
683 |
\ ==> F Join project h (reachable (extend h F Join G)) G \ |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
684 |
\ : A LeadsTo B"; |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
685 |
by (full_simp_tac (simpset() addsimps [LeadsTo_def, LeadsETo_def]) 1); |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
686 |
by (rtac (project_leadsETo_I_lemma RS leadsTo_weaken) 1); |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
687 |
by (auto_tac (claset(), |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
688 |
simpset() addsimps [project_set_reachable_extend_eq RS sym])); |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
689 |
qed "project_LeadsETo_I"; |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
690 |
|
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
691 |
Goalw [projecting_def] |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
692 |
"projecting (%G. UNIV) h F \ |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
693 |
\ (extend_set h A leadsTo[givenBy f] extend_set h B) \ |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
694 |
\ (A leadsTo B)"; |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
695 |
by (force_tac (claset() addDs [project_leadsETo_I], simpset()) 1); |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
696 |
qed "projecting_leadsTo"; |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
697 |
|
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
698 |
Goalw [projecting_def] |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
699 |
"projecting (%G. reachable (extend h F Join G)) h F \ |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
700 |
\ (extend_set h A LeadsTo[givenBy f] extend_set h B) \ |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
701 |
\ (A LeadsTo B)"; |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
702 |
by (force_tac (claset() addDs [project_LeadsETo_I], simpset()) 1); |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
703 |
qed "projecting_LeadsTo"; |
19b9f92ca503
working with weak LeadsTo in guarantees precondition\!
paulson
parents:
8067
diff
changeset
|
704 |
|
8044 | 705 |
Close_locale "Extend"; |
706 |
||
707 |