12 |
12 |
13 (* ---------------------------------------------------------------- *) |
13 (* ---------------------------------------------------------------- *) |
14 (* cex_abs *) |
14 (* cex_abs *) |
15 (* ---------------------------------------------------------------- *) |
15 (* ---------------------------------------------------------------- *) |
16 |
16 |
17 goal thy "cex_abs f (s,UU) = (f s, UU)"; |
17 Goal "cex_abs f (s,UU) = (f s, UU)"; |
18 by (simp_tac (simpset() addsimps [cex_abs_def]) 1); |
18 by (simp_tac (simpset() addsimps [cex_abs_def]) 1); |
19 qed"cex_abs_UU"; |
19 qed"cex_abs_UU"; |
20 |
20 |
21 goal thy "cex_abs f (s,nil) = (f s, nil)"; |
21 Goal "cex_abs f (s,nil) = (f s, nil)"; |
22 by (simp_tac (simpset() addsimps [cex_abs_def]) 1); |
22 by (simp_tac (simpset() addsimps [cex_abs_def]) 1); |
23 qed"cex_abs_nil"; |
23 qed"cex_abs_nil"; |
24 |
24 |
25 goal thy "cex_abs f (s,(a,t)>>ex) = (f s, (a,f t) >> (snd (cex_abs f (t,ex))))"; |
25 Goal "cex_abs f (s,(a,t)>>ex) = (f s, (a,f t) >> (snd (cex_abs f (t,ex))))"; |
26 by (simp_tac (simpset() addsimps [cex_abs_def]) 1); |
26 by (simp_tac (simpset() addsimps [cex_abs_def]) 1); |
27 qed"cex_abs_cons"; |
27 qed"cex_abs_cons"; |
28 |
28 |
29 Addsimps [cex_abs_UU, cex_abs_nil, cex_abs_cons]; |
29 Addsimps [cex_abs_UU, cex_abs_nil, cex_abs_cons]; |
30 |
30 |
34 |
34 |
35 (* ---------------------------------------------------------------- *) |
35 (* ---------------------------------------------------------------- *) |
36 (* Lemmas *) |
36 (* Lemmas *) |
37 (* ---------------------------------------------------------------- *) |
37 (* ---------------------------------------------------------------- *) |
38 |
38 |
39 goal thy "temp_weakening Q P h = (! ex. (ex |== P) --> (cex_abs h ex |== Q))"; |
39 Goal "temp_weakening Q P h = (! ex. (ex |== P) --> (cex_abs h ex |== Q))"; |
40 by (simp_tac (simpset() addsimps [temp_weakening_def,temp_strengthening_def, |
40 by (simp_tac (simpset() addsimps [temp_weakening_def,temp_strengthening_def, |
41 NOT_def,temp_sat_def,satisfies_def]) 1); |
41 NOT_def,temp_sat_def,satisfies_def]) 1); |
42 auto(); |
42 auto(); |
43 qed"temp_weakening_def2"; |
43 qed"temp_weakening_def2"; |
44 |
44 |
45 goal thy "state_weakening Q P h = (! s t a. P (s,a,t) --> Q (h(s),a,h(t)))"; |
45 Goal "state_weakening Q P h = (! s t a. P (s,a,t) --> Q (h(s),a,h(t)))"; |
46 by (simp_tac (simpset() addsimps [state_weakening_def,state_strengthening_def, |
46 by (simp_tac (simpset() addsimps [state_weakening_def,state_strengthening_def, |
47 NOT_def]) 1); |
47 NOT_def]) 1); |
48 auto(); |
48 auto(); |
49 qed"state_weakening_def2"; |
49 qed"state_weakening_def2"; |
50 |
50 |
54 (* ---------------------------------------------------------------- *) |
54 (* ---------------------------------------------------------------- *) |
55 (* Abstraction Rules for Properties *) |
55 (* Abstraction Rules for Properties *) |
56 (* ---------------------------------------------------------------- *) |
56 (* ---------------------------------------------------------------- *) |
57 |
57 |
58 |
58 |
59 goalw thy [cex_abs_def] |
59 Goalw [cex_abs_def] |
60 "!!h.[| is_abstraction h C A |] ==>\ |
60 "!!h.[| is_abstraction h C A |] ==>\ |
61 \ !s. reachable C s & is_exec_frag C (s,xs) \ |
61 \ !s. reachable C s & is_exec_frag C (s,xs) \ |
62 \ --> is_exec_frag A (cex_abs h (s,xs))"; |
62 \ --> is_exec_frag A (cex_abs h (s,xs))"; |
63 |
63 |
64 by (Asm_full_simp_tac 1); |
64 by (Asm_full_simp_tac 1); |
83 by (etac (exec_frag_abstraction RS spec RS mp) 1); |
83 by (etac (exec_frag_abstraction RS spec RS mp) 1); |
84 by (asm_full_simp_tac (simpset() addsimps [reachable.reachable_0]) 1); |
84 by (asm_full_simp_tac (simpset() addsimps [reachable.reachable_0]) 1); |
85 qed"abs_is_weakening"; |
85 qed"abs_is_weakening"; |
86 |
86 |
87 |
87 |
88 goal thy "!!A. [|is_abstraction h C A; validIOA A Q; temp_strengthening Q P h |] \ |
88 Goal "!!A. [|is_abstraction h C A; validIOA A Q; temp_strengthening Q P h |] \ |
89 \ ==> validIOA C P"; |
89 \ ==> validIOA C P"; |
90 bd abs_is_weakening 1; |
90 bd abs_is_weakening 1; |
91 by (asm_full_simp_tac (simpset() addsimps [weakeningIOA_def, |
91 by (asm_full_simp_tac (simpset() addsimps [weakeningIOA_def, |
92 validIOA_def, temp_strengthening_def])1); |
92 validIOA_def, temp_strengthening_def])1); |
93 by (safe_tac set_cs); |
93 by (safe_tac set_cs); |
95 qed"AbsRuleT1"; |
95 qed"AbsRuleT1"; |
96 |
96 |
97 |
97 |
98 (* FIX: Nach TLS.ML *) |
98 (* FIX: Nach TLS.ML *) |
99 |
99 |
100 goal thy "(ex |== P .--> Q) = ((ex |== P) --> (ex |== Q))"; |
100 Goal "(ex |== P .--> Q) = ((ex |== P) --> (ex |== Q))"; |
101 by (simp_tac (simpset() addsimps [IMPLIES_def,temp_sat_def, satisfies_def])1); |
101 by (simp_tac (simpset() addsimps [IMPLIES_def,temp_sat_def, satisfies_def])1); |
102 qed"IMPLIES_temp_sat"; |
102 qed"IMPLIES_temp_sat"; |
103 |
103 |
104 goal thy "(ex |== P .& Q) = ((ex |== P) & (ex |== Q))"; |
104 Goal "(ex |== P .& Q) = ((ex |== P) & (ex |== Q))"; |
105 by (simp_tac (simpset() addsimps [AND_def,temp_sat_def, satisfies_def])1); |
105 by (simp_tac (simpset() addsimps [AND_def,temp_sat_def, satisfies_def])1); |
106 qed"AND_temp_sat"; |
106 qed"AND_temp_sat"; |
107 |
107 |
108 goal thy "(ex |== P .| Q) = ((ex |== P) | (ex |== Q))"; |
108 Goal "(ex |== P .| Q) = ((ex |== P) | (ex |== Q))"; |
109 by (simp_tac (simpset() addsimps [OR_def,temp_sat_def, satisfies_def])1); |
109 by (simp_tac (simpset() addsimps [OR_def,temp_sat_def, satisfies_def])1); |
110 qed"OR_temp_sat"; |
110 qed"OR_temp_sat"; |
111 |
111 |
112 goal thy "(ex |== .~ P) = (~ (ex |== P))"; |
112 Goal "(ex |== .~ P) = (~ (ex |== P))"; |
113 by (simp_tac (simpset() addsimps [NOT_def,temp_sat_def, satisfies_def])1); |
113 by (simp_tac (simpset() addsimps [NOT_def,temp_sat_def, satisfies_def])1); |
114 qed"NOT_temp_sat"; |
114 qed"NOT_temp_sat"; |
115 |
115 |
116 Addsimps [IMPLIES_temp_sat,AND_temp_sat,OR_temp_sat,NOT_temp_sat]; |
116 Addsimps [IMPLIES_temp_sat,AND_temp_sat,OR_temp_sat,NOT_temp_sat]; |
117 |
117 |
118 |
118 |
119 goalw thy [is_live_abstraction_def] |
119 Goalw [is_live_abstraction_def] |
120 "!!A. [|is_live_abstraction h (C,L) (A,M); \ |
120 "!!A. [|is_live_abstraction h (C,L) (A,M); \ |
121 \ validLIOA (A,M) Q; temp_strengthening Q P h |] \ |
121 \ validLIOA (A,M) Q; temp_strengthening Q P h |] \ |
122 \ ==> validLIOA (C,L) P"; |
122 \ ==> validLIOA (C,L) P"; |
123 auto(); |
123 auto(); |
124 bd abs_is_weakening 1; |
124 bd abs_is_weakening 1; |
127 by (safe_tac set_cs); |
127 by (safe_tac set_cs); |
128 by (pair_tac "ex" 1); |
128 by (pair_tac "ex" 1); |
129 qed"AbsRuleT2"; |
129 qed"AbsRuleT2"; |
130 |
130 |
131 |
131 |
132 goalw thy [is_live_abstraction_def] |
132 Goalw [is_live_abstraction_def] |
133 "!!A. [|is_live_abstraction h (C,L) (A,M); \ |
133 "!!A. [|is_live_abstraction h (C,L) (A,M); \ |
134 \ validLIOA (A,M) (H1 .--> Q); temp_strengthening Q P h; \ |
134 \ validLIOA (A,M) (H1 .--> Q); temp_strengthening Q P h; \ |
135 \ temp_weakening H1 H2 h; validLIOA (C,L) H2 |] \ |
135 \ temp_weakening H1 H2 h; validLIOA (C,L) H2 |] \ |
136 \ ==> validLIOA (C,L) P"; |
136 \ ==> validLIOA (C,L) P"; |
137 auto(); |
137 auto(); |
148 (* ---------------------------------------------------------------- *) |
148 (* ---------------------------------------------------------------- *) |
149 (* Correctness of safe abstraction *) |
149 (* Correctness of safe abstraction *) |
150 (* ---------------------------------------------------------------- *) |
150 (* ---------------------------------------------------------------- *) |
151 |
151 |
152 |
152 |
153 goalw thy [is_abstraction_def,is_ref_map_def] |
153 Goalw [is_abstraction_def,is_ref_map_def] |
154 "!! h. is_abstraction h C A ==> is_ref_map h C A"; |
154 "!! h. is_abstraction h C A ==> is_ref_map h C A"; |
155 by (safe_tac set_cs); |
155 by (safe_tac set_cs); |
156 by (res_inst_tac[("x","(a,h t)>>nil")] exI 1); |
156 by (res_inst_tac[("x","(a,h t)>>nil")] exI 1); |
157 by (asm_full_simp_tac (simpset() addsimps [move_def])1); |
157 by (asm_full_simp_tac (simpset() addsimps [move_def])1); |
158 qed"abstraction_is_ref_map"; |
158 qed"abstraction_is_ref_map"; |
159 |
159 |
160 |
160 |
161 goal thy "!! h. [| inp(C)=inp(A); out(C)=out(A); \ |
161 Goal "!! h. [| inp(C)=inp(A); out(C)=out(A); \ |
162 \ is_abstraction h C A |] \ |
162 \ is_abstraction h C A |] \ |
163 \ ==> C =<| A"; |
163 \ ==> C =<| A"; |
164 by (asm_full_simp_tac (simpset() addsimps [ioa_implements_def]) 1); |
164 by (asm_full_simp_tac (simpset() addsimps [ioa_implements_def]) 1); |
165 br trace_inclusion 1; |
165 br trace_inclusion 1; |
166 by (simp_tac (simpset() addsimps [externals_def])1); |
166 by (simp_tac (simpset() addsimps [externals_def])1); |
176 (* ---------------------------------------------------------------- *) |
176 (* ---------------------------------------------------------------- *) |
177 |
177 |
178 |
178 |
179 (* Reduces to Filter (Map fst x) = Filter (Map fst (Map (%(a,t). (a,x)) x), |
179 (* Reduces to Filter (Map fst x) = Filter (Map fst (Map (%(a,t). (a,x)) x), |
180 that is to special Map Lemma *) |
180 that is to special Map Lemma *) |
181 goalw thy [cex_abs_def,mk_trace_def,filter_act_def] |
181 Goalw [cex_abs_def,mk_trace_def,filter_act_def] |
182 "!! f. ext C = ext A \ |
182 "!! f. ext C = ext A \ |
183 \ ==> mk_trace C`xs = mk_trace A`(snd (cex_abs f (s,xs)))"; |
183 \ ==> mk_trace C`xs = mk_trace A`(snd (cex_abs f (s,xs)))"; |
184 by (Asm_full_simp_tac 1); |
184 by (Asm_full_simp_tac 1); |
185 by (pair_induct_tac "xs" [] 1); |
185 by (pair_induct_tac "xs" [] 1); |
186 qed"traces_coincide_abs"; |
186 qed"traces_coincide_abs"; |
187 |
187 |
188 |
188 |
189 goalw thy [cex_abs_def] |
189 Goalw [cex_abs_def] |
190 "!!f.[| is_abstraction h C A |] ==>\ |
190 "!!f.[| is_abstraction h C A |] ==>\ |
191 \ !s. reachable C s & is_exec_frag C (s,xs) \ |
191 \ !s. reachable C s & is_exec_frag C (s,xs) \ |
192 \ --> is_exec_frag A (cex_abs h (s,xs))"; |
192 \ --> is_exec_frag A (cex_abs h (s,xs))"; |
193 |
193 |
194 by (Asm_full_simp_tac 1); |
194 by (Asm_full_simp_tac 1); |
208 |
208 |
209 (* Does not work with abstraction_is_ref_map as proof of abs_safety, because |
209 (* Does not work with abstraction_is_ref_map as proof of abs_safety, because |
210 is_live_abstraction includes temp_strengthening which is necessarily based |
210 is_live_abstraction includes temp_strengthening which is necessarily based |
211 on cex_abs and not on corresp_ex. Thus, the proof is redoone in a more specific |
211 on cex_abs and not on corresp_ex. Thus, the proof is redoone in a more specific |
212 way for cex_abs *) |
212 way for cex_abs *) |
213 goal thy "!! h. [| inp(C)=inp(A); out(C)=out(A); \ |
213 Goal "!! h. [| inp(C)=inp(A); out(C)=out(A); \ |
214 \ is_live_abstraction h (C,M) (A,L) |] \ |
214 \ is_live_abstraction h (C,M) (A,L) |] \ |
215 \ ==> live_implements (C,M) (A,L)"; |
215 \ ==> live_implements (C,M) (A,L)"; |
216 |
216 |
217 by (asm_full_simp_tac (simpset() addsimps [is_live_abstraction_def, live_implements_def, |
217 by (asm_full_simp_tac (simpset() addsimps [is_live_abstraction_def, live_implements_def, |
218 livetraces_def,liveexecutions_def]) 1); |
218 livetraces_def,liveexecutions_def]) 1); |
268 be implements_trans 1; |
268 be implements_trans 1; |
269 ba 1; |
269 ba 1; |
270 qed"AbsRuleA1"; |
270 qed"AbsRuleA1"; |
271 |
271 |
272 |
272 |
273 goal thy "!! C. [| inp(C)=inp(A); out(C)=out(A); \ |
273 Goal "!! C. [| inp(C)=inp(A); out(C)=out(A); \ |
274 \ inp(Q)=inp(P); out(Q)=out(P); \ |
274 \ inp(Q)=inp(P); out(Q)=out(P); \ |
275 \ is_live_abstraction h1 (C,LC) (A,LA); \ |
275 \ is_live_abstraction h1 (C,LC) (A,LA); \ |
276 \ live_implements (A,LA) (Q,LQ) ; \ |
276 \ live_implements (A,LA) (Q,LQ) ; \ |
277 \ is_live_abstraction h2 (Q,LQ) (P,LP) |] \ |
277 \ is_live_abstraction h2 (Q,LQ) (P,LP) |] \ |
278 \ ==> live_implements (C,LC) (P,LP)"; |
278 \ ==> live_implements (C,LC) (P,LP)"; |
293 |
293 |
294 (* ---------------------------------------------------------------- *) |
294 (* ---------------------------------------------------------------- *) |
295 (* Localizing Temproal Strengthenings - 1 *) |
295 (* Localizing Temproal Strengthenings - 1 *) |
296 (* ---------------------------------------------------------------- *) |
296 (* ---------------------------------------------------------------- *) |
297 |
297 |
298 goalw thy [temp_strengthening_def] |
298 Goalw [temp_strengthening_def] |
299 "!! h. [| temp_strengthening P1 Q1 h; \ |
299 "!! h. [| temp_strengthening P1 Q1 h; \ |
300 \ temp_strengthening P2 Q2 h |] \ |
300 \ temp_strengthening P2 Q2 h |] \ |
301 \ ==> temp_strengthening (P1 .& P2) (Q1 .& Q2) h"; |
301 \ ==> temp_strengthening (P1 .& P2) (Q1 .& Q2) h"; |
302 auto(); |
302 auto(); |
303 qed"strength_AND"; |
303 qed"strength_AND"; |
304 |
304 |
305 goalw thy [temp_strengthening_def] |
305 Goalw [temp_strengthening_def] |
306 "!! h. [| temp_strengthening P1 Q1 h; \ |
306 "!! h. [| temp_strengthening P1 Q1 h; \ |
307 \ temp_strengthening P2 Q2 h |] \ |
307 \ temp_strengthening P2 Q2 h |] \ |
308 \ ==> temp_strengthening (P1 .| P2) (Q1 .| Q2) h"; |
308 \ ==> temp_strengthening (P1 .| P2) (Q1 .| Q2) h"; |
309 auto(); |
309 auto(); |
310 qed"strength_OR"; |
310 qed"strength_OR"; |
311 |
311 |
312 goalw thy [temp_strengthening_def] |
312 Goalw [temp_strengthening_def] |
313 "!! h. [| temp_weakening P Q h |] \ |
313 "!! h. [| temp_weakening P Q h |] \ |
314 \ ==> temp_strengthening (.~ P) (.~ Q) h"; |
314 \ ==> temp_strengthening (.~ P) (.~ Q) h"; |
315 by (asm_full_simp_tac (simpset() addsimps [temp_weakening_def2])1); |
315 by (asm_full_simp_tac (simpset() addsimps [temp_weakening_def2])1); |
316 auto(); |
316 auto(); |
317 qed"strength_NOT"; |
317 qed"strength_NOT"; |
318 |
318 |
319 goalw thy [temp_strengthening_def] |
319 Goalw [temp_strengthening_def] |
320 "!! h. [| temp_weakening P1 Q1 h; \ |
320 "!! h. [| temp_weakening P1 Q1 h; \ |
321 \ temp_strengthening P2 Q2 h |] \ |
321 \ temp_strengthening P2 Q2 h |] \ |
322 \ ==> temp_strengthening (P1 .--> P2) (Q1 .--> Q2) h"; |
322 \ ==> temp_strengthening (P1 .--> P2) (Q1 .--> Q2) h"; |
323 by (asm_full_simp_tac (simpset() addsimps [temp_weakening_def2])1); |
323 by (asm_full_simp_tac (simpset() addsimps [temp_weakening_def2])1); |
324 qed"strength_IMPLIES"; |
324 qed"strength_IMPLIES"; |
327 |
327 |
328 (* ---------------------------------------------------------------- *) |
328 (* ---------------------------------------------------------------- *) |
329 (* Localizing Temproal Weakenings - Part 1 *) |
329 (* Localizing Temproal Weakenings - Part 1 *) |
330 (* ---------------------------------------------------------------- *) |
330 (* ---------------------------------------------------------------- *) |
331 |
331 |
332 goal thy |
332 Goal |
333 "!! h. [| temp_weakening P1 Q1 h; \ |
333 "!! h. [| temp_weakening P1 Q1 h; \ |
334 \ temp_weakening P2 Q2 h |] \ |
334 \ temp_weakening P2 Q2 h |] \ |
335 \ ==> temp_weakening (P1 .& P2) (Q1 .& Q2) h"; |
335 \ ==> temp_weakening (P1 .& P2) (Q1 .& Q2) h"; |
336 by (asm_full_simp_tac (simpset() addsimps [temp_weakening_def2])1); |
336 by (asm_full_simp_tac (simpset() addsimps [temp_weakening_def2])1); |
337 qed"weak_AND"; |
337 qed"weak_AND"; |
338 |
338 |
339 goal thy |
339 Goal |
340 "!! h. [| temp_weakening P1 Q1 h; \ |
340 "!! h. [| temp_weakening P1 Q1 h; \ |
341 \ temp_weakening P2 Q2 h |] \ |
341 \ temp_weakening P2 Q2 h |] \ |
342 \ ==> temp_weakening (P1 .| P2) (Q1 .| Q2) h"; |
342 \ ==> temp_weakening (P1 .| P2) (Q1 .| Q2) h"; |
343 by (asm_full_simp_tac (simpset() addsimps [temp_weakening_def2])1); |
343 by (asm_full_simp_tac (simpset() addsimps [temp_weakening_def2])1); |
344 qed"weak_OR"; |
344 qed"weak_OR"; |
345 |
345 |
346 goalw thy [temp_strengthening_def] |
346 Goalw [temp_strengthening_def] |
347 "!! h. [| temp_strengthening P Q h |] \ |
347 "!! h. [| temp_strengthening P Q h |] \ |
348 \ ==> temp_weakening (.~ P) (.~ Q) h"; |
348 \ ==> temp_weakening (.~ P) (.~ Q) h"; |
349 by (asm_full_simp_tac (simpset() addsimps [temp_weakening_def2])1); |
349 by (asm_full_simp_tac (simpset() addsimps [temp_weakening_def2])1); |
350 auto(); |
350 auto(); |
351 qed"weak_NOT"; |
351 qed"weak_NOT"; |
352 |
352 |
353 goalw thy [temp_strengthening_def] |
353 Goalw [temp_strengthening_def] |
354 "!! h. [| temp_strengthening P1 Q1 h; \ |
354 "!! h. [| temp_strengthening P1 Q1 h; \ |
355 \ temp_weakening P2 Q2 h |] \ |
355 \ temp_weakening P2 Q2 h |] \ |
356 \ ==> temp_weakening (P1 .--> P2) (Q1 .--> Q2) h"; |
356 \ ==> temp_weakening (P1 .--> P2) (Q1 .--> Q2) h"; |
357 by (asm_full_simp_tac (simpset() addsimps [temp_weakening_def2])1); |
357 by (asm_full_simp_tac (simpset() addsimps [temp_weakening_def2])1); |
358 qed"weak_IMPLIES"; |
358 qed"weak_IMPLIES"; |
390 auto(); |
390 auto(); |
391 qed_spec_mp"ex2seqConc"; |
391 qed_spec_mp"ex2seqConc"; |
392 |
392 |
393 (* important property of ex2seq: can be shiftet, as defined "pointwise" *) |
393 (* important property of ex2seq: can be shiftet, as defined "pointwise" *) |
394 |
394 |
395 goalw thy [tsuffix_def,suffix_def] |
395 Goalw [tsuffix_def,suffix_def] |
396 "!!s. tsuffix s (ex2seq ex) ==> ? ex'. s = (ex2seq ex')"; |
396 "!!s. tsuffix s (ex2seq ex) ==> ? ex'. s = (ex2seq ex')"; |
397 auto(); |
397 auto(); |
398 bd ex2seqConc 1; |
398 bd ex2seqConc 1; |
399 auto(); |
399 auto(); |
400 qed"ex2seq_tsuffix"; |
400 qed"ex2seq_tsuffix"; |
401 |
401 |
402 |
402 |
403 goal thy "(Map f`s = nil) = (s=nil)"; |
403 Goal "(Map f`s = nil) = (s=nil)"; |
404 by (Seq_case_simp_tac "s" 1); |
404 by (Seq_case_simp_tac "s" 1); |
405 qed"Mapnil"; |
405 qed"Mapnil"; |
406 |
406 |
407 goal thy "(Map f`s = UU) = (s=UU)"; |
407 Goal "(Map f`s = UU) = (s=UU)"; |
408 by (Seq_case_simp_tac "s" 1); |
408 by (Seq_case_simp_tac "s" 1); |
409 qed"MapUU"; |
409 qed"MapUU"; |
410 |
410 |
411 |
411 |
412 (* important property of cex_absSeq: As it is a 1to1 correspondence, |
412 (* important property of cex_absSeq: As it is a 1to1 correspondence, |
413 properties carry over *) |
413 properties carry over *) |
414 |
414 |
415 goalw thy [tsuffix_def,suffix_def,cex_absSeq_def] |
415 Goalw [tsuffix_def,suffix_def,cex_absSeq_def] |
416 "!! s. tsuffix s t ==> tsuffix (cex_absSeq h s) (cex_absSeq h t)"; |
416 "!! s. tsuffix s t ==> tsuffix (cex_absSeq h s) (cex_absSeq h t)"; |
417 auto(); |
417 auto(); |
418 by (asm_full_simp_tac (simpset() addsimps [Mapnil])1); |
418 by (asm_full_simp_tac (simpset() addsimps [Mapnil])1); |
419 by (asm_full_simp_tac (simpset() addsimps [MapUU])1); |
419 by (asm_full_simp_tac (simpset() addsimps [MapUU])1); |
420 by (res_inst_tac [("x","Map (%(s,a,t). (h s,a, h t))`s1")] exI 1); |
420 by (res_inst_tac [("x","Map (%(s,a,t). (h s,a, h t))`s1")] exI 1); |
421 by (asm_full_simp_tac (simpset() addsimps [Map2Finite,MapConc])1); |
421 by (asm_full_simp_tac (simpset() addsimps [Map2Finite,MapConc])1); |
422 qed"cex_absSeq_tsuffix"; |
422 qed"cex_absSeq_tsuffix"; |
423 |
423 |
424 |
424 |
425 goalw thy [temp_strengthening_def,state_strengthening_def, temp_sat_def, |
425 Goalw [temp_strengthening_def,state_strengthening_def, temp_sat_def, |
426 satisfies_def,Box_def] |
426 satisfies_def,Box_def] |
427 "!! h. [| temp_strengthening P Q h |]\ |
427 "!! h. [| temp_strengthening P Q h |]\ |
428 \ ==> temp_strengthening ([] P) ([] Q) h"; |
428 \ ==> temp_strengthening ([] P) ([] Q) h"; |
429 by (clarify_tac set_cs 1); |
429 by (clarify_tac set_cs 1); |
430 by (forward_tac [ex2seq_tsuffix] 1); |
430 by (forward_tac [ex2seq_tsuffix] 1); |
434 qed"strength_Box"; |
434 qed"strength_Box"; |
435 |
435 |
436 |
436 |
437 (* ------------------ Init ----------------------------*) |
437 (* ------------------ Init ----------------------------*) |
438 |
438 |
439 goalw thy [temp_strengthening_def,state_strengthening_def, |
439 Goalw [temp_strengthening_def,state_strengthening_def, |
440 temp_sat_def,satisfies_def,Init_def,unlift_def] |
440 temp_sat_def,satisfies_def,Init_def,unlift_def] |
441 "!! h. [| state_strengthening P Q h |]\ |
441 "!! h. [| state_strengthening P Q h |]\ |
442 \ ==> temp_strengthening (Init P) (Init Q) h"; |
442 \ ==> temp_strengthening (Init P) (Init Q) h"; |
443 by (safe_tac set_cs); |
443 by (safe_tac set_cs); |
444 by (pair_tac "ex" 1); |
444 by (pair_tac "ex" 1); |
447 qed"strength_Init"; |
447 qed"strength_Init"; |
448 |
448 |
449 |
449 |
450 (* ------------------ Next ----------------------------*) |
450 (* ------------------ Next ----------------------------*) |
451 |
451 |
452 goal thy |
452 Goal |
453 "(TL`(ex2seq (cex_abs h ex))=UU) = (TL`(ex2seq ex)=UU)"; |
453 "(TL`(ex2seq (cex_abs h ex))=UU) = (TL`(ex2seq ex)=UU)"; |
454 by (pair_tac "ex" 1); |
454 by (pair_tac "ex" 1); |
455 by (Seq_case_simp_tac "y" 1); |
455 by (Seq_case_simp_tac "y" 1); |
456 by (pair_tac "a" 1); |
456 by (pair_tac "a" 1); |
457 by (Seq_case_simp_tac "s" 1); |
457 by (Seq_case_simp_tac "s" 1); |
458 by (pair_tac "a" 1); |
458 by (pair_tac "a" 1); |
459 qed"TL_ex2seq_UU"; |
459 qed"TL_ex2seq_UU"; |
460 |
460 |
461 goal thy |
461 Goal |
462 "(TL`(ex2seq (cex_abs h ex))=nil) = (TL`(ex2seq ex)=nil)"; |
462 "(TL`(ex2seq (cex_abs h ex))=nil) = (TL`(ex2seq ex)=nil)"; |
463 by (pair_tac "ex" 1); |
463 by (pair_tac "ex" 1); |
464 by (Seq_case_simp_tac "y" 1); |
464 by (Seq_case_simp_tac "y" 1); |
465 by (pair_tac "a" 1); |
465 by (pair_tac "a" 1); |
466 by (Seq_case_simp_tac "s" 1); |
466 by (Seq_case_simp_tac "s" 1); |
467 by (pair_tac "a" 1); |
467 by (pair_tac "a" 1); |
468 qed"TL_ex2seq_nil"; |
468 qed"TL_ex2seq_nil"; |
469 |
469 |
470 (* FIX: put to Sequence Lemmas *) |
470 (* FIX: put to Sequence Lemmas *) |
471 goal thy "Map f`(TL`s) = TL`(Map f`s)"; |
471 Goal "Map f`(TL`s) = TL`(Map f`s)"; |
472 by (Seq_induct_tac "s" [] 1); |
472 by (Seq_induct_tac "s" [] 1); |
473 qed"MapTL"; |
473 qed"MapTL"; |
474 |
474 |
475 (* important property of cex_absSeq: As it is a 1to1 correspondence, |
475 (* important property of cex_absSeq: As it is a 1to1 correspondence, |
476 properties carry over *) |
476 properties carry over *) |
477 |
477 |
478 goalw thy [cex_absSeq_def] |
478 Goalw [cex_absSeq_def] |
479 "cex_absSeq h (TL`s) = (TL`(cex_absSeq h s))"; |
479 "cex_absSeq h (TL`s) = (TL`(cex_absSeq h s))"; |
480 by (simp_tac (simpset() addsimps [MapTL]) 1); |
480 by (simp_tac (simpset() addsimps [MapTL]) 1); |
481 qed"cex_absSeq_TL"; |
481 qed"cex_absSeq_TL"; |
482 |
482 |
483 (* important property of ex2seq: can be shiftet, as defined "pointwise" *) |
483 (* important property of ex2seq: can be shiftet, as defined "pointwise" *) |
484 |
484 |
485 goal thy "!!ex. [| (snd ex)~=UU ; (snd ex)~=nil |] ==> (? ex'. TL`(ex2seq ex) = ex2seq ex')"; |
485 Goal "!!ex. [| (snd ex)~=UU ; (snd ex)~=nil |] ==> (? ex'. TL`(ex2seq ex) = ex2seq ex')"; |
486 by (pair_tac "ex" 1); |
486 by (pair_tac "ex" 1); |
487 by (Seq_case_simp_tac "y" 1); |
487 by (Seq_case_simp_tac "y" 1); |
488 by (pair_tac "a" 1); |
488 by (pair_tac "a" 1); |
489 auto(); |
489 auto(); |
490 qed"TLex2seq"; |
490 qed"TLex2seq"; |
491 |
491 |
492 |
492 |
493 goal thy "(TL`(ex2seq ex)~=UU) = ((snd ex)~=UU)"; |
493 Goal "(TL`(ex2seq ex)~=UU) = ((snd ex)~=UU)"; |
494 by (pair_tac "ex" 1); |
494 by (pair_tac "ex" 1); |
495 by (Seq_case_simp_tac "y" 1); |
495 by (Seq_case_simp_tac "y" 1); |
496 by (pair_tac "a" 1); |
496 by (pair_tac "a" 1); |
497 by (Seq_case_simp_tac "s" 1); |
497 by (Seq_case_simp_tac "s" 1); |
498 by (pair_tac "a" 1); |
498 by (pair_tac "a" 1); |
499 qed"ex2seqUUTL"; |
499 qed"ex2seqUUTL"; |
500 |
500 |
501 goal thy "(TL`(ex2seq ex)~=nil) = ((snd ex)~=nil)"; |
501 Goal "(TL`(ex2seq ex)~=nil) = ((snd ex)~=nil)"; |
502 by (pair_tac "ex" 1); |
502 by (pair_tac "ex" 1); |
503 by (Seq_case_simp_tac "y" 1); |
503 by (Seq_case_simp_tac "y" 1); |
504 by (pair_tac "a" 1); |
504 by (pair_tac "a" 1); |
505 by (Seq_case_simp_tac "s" 1); |
505 by (Seq_case_simp_tac "s" 1); |
506 by (pair_tac "a" 1); |
506 by (pair_tac "a" 1); |
507 qed"ex2seqnilTL"; |
507 qed"ex2seqnilTL"; |
508 |
508 |
509 |
509 |
510 goalw thy [temp_strengthening_def,state_strengthening_def, |
510 Goalw [temp_strengthening_def,state_strengthening_def, |
511 temp_sat_def, satisfies_def,Next_def] |
511 temp_sat_def, satisfies_def,Next_def] |
512 "!! h. [| temp_strengthening P Q h |]\ |
512 "!! h. [| temp_strengthening P Q h |]\ |
513 \ ==> temp_strengthening (Next P) (Next Q) h"; |
513 \ ==> temp_strengthening (Next P) (Next Q) h"; |
514 by (Asm_full_simp_tac 1); |
514 by (Asm_full_simp_tac 1); |
515 by (safe_tac set_cs); |
515 by (safe_tac set_cs); |
530 (* ---------------------------------------------------------------- *) |
530 (* ---------------------------------------------------------------- *) |
531 (* Localizing Temporal Weakenings - 2 *) |
531 (* Localizing Temporal Weakenings - 2 *) |
532 (* ---------------------------------------------------------------- *) |
532 (* ---------------------------------------------------------------- *) |
533 |
533 |
534 |
534 |
535 goal thy |
535 Goal |
536 "!! h. [| state_weakening P Q h |]\ |
536 "!! h. [| state_weakening P Q h |]\ |
537 \ ==> temp_weakening (Init P) (Init Q) h"; |
537 \ ==> temp_weakening (Init P) (Init Q) h"; |
538 by (asm_full_simp_tac (simpset() addsimps [temp_weakening_def2, |
538 by (asm_full_simp_tac (simpset() addsimps [temp_weakening_def2, |
539 state_weakening_def2, temp_sat_def,satisfies_def,Init_def,unlift_def])1); |
539 state_weakening_def2, temp_sat_def,satisfies_def,Init_def,unlift_def])1); |
540 by (safe_tac set_cs); |
540 by (safe_tac set_cs); |
546 |
546 |
547 (* |
547 (* |
548 |
548 |
549 (* analog to strengthening thm above, with analog lemmas used *) |
549 (* analog to strengthening thm above, with analog lemmas used *) |
550 |
550 |
551 goalw thy [state_weakening_def] |
551 Goalw [state_weakening_def] |
552 "!! h. [| temp_weakening P Q h |]\ |
552 "!! h. [| temp_weakening P Q h |]\ |
553 \ ==> temp_weakening ([] P) ([] Q) h"; |
553 \ ==> temp_weakening ([] P) ([] Q) h"; |
554 by (asm_full_simp_tac (simpset() addsimps [temp_weakening_def2, |
554 by (asm_full_simp_tac (simpset() addsimps [temp_weakening_def2, |
555 temp_sat_def,satisfies_def,Box_def])1); |
555 temp_sat_def,satisfies_def,Box_def])1); |
556 |
556 |
557 (* analog to strengthening thm above, with analog lemmas used *) |
557 (* analog to strengthening thm above, with analog lemmas used *) |
558 |
558 |
559 goalw thy [state_weakening_def] |
559 Goalw [state_weakening_def] |
560 "!! h. [| temp_weakening P Q h |]\ |
560 "!! h. [| temp_weakening P Q h |]\ |
561 \ ==> temp_weakening (Next P) (Next Q) h"; |
561 \ ==> temp_weakening (Next P) (Next Q) h"; |
562 by (asm_full_simp_tac (simpset() addsimps [temp_weakening_def2, |
562 by (asm_full_simp_tac (simpset() addsimps [temp_weakening_def2, |
563 temp_sat_def,satisfies_def,Next_def])1); |
563 temp_sat_def,satisfies_def,Next_def])1); |
564 |
564 |
567 (* ---------------------------------------------------------------- *) |
567 (* ---------------------------------------------------------------- *) |
568 (* Localizing Temproal Strengthenings - 3 *) |
568 (* Localizing Temproal Strengthenings - 3 *) |
569 (* ---------------------------------------------------------------- *) |
569 (* ---------------------------------------------------------------- *) |
570 |
570 |
571 |
571 |
572 goalw thy [Diamond_def] |
572 Goalw [Diamond_def] |
573 "!! h. [| temp_strengthening P Q h |]\ |
573 "!! h. [| temp_strengthening P Q h |]\ |
574 \ ==> temp_strengthening (<> P) (<> Q) h"; |
574 \ ==> temp_strengthening (<> P) (<> Q) h"; |
575 br strength_NOT 1; |
575 br strength_NOT 1; |
576 br weak_Box 1; |
576 br weak_Box 1; |
577 be weak_NOT 1; |
577 be weak_NOT 1; |
578 qed"strength_Diamond"; |
578 qed"strength_Diamond"; |
579 |
579 |
580 goalw thy [Leadsto_def] |
580 Goalw [Leadsto_def] |
581 "!! h. [| temp_weakening P1 P2 h;\ |
581 "!! h. [| temp_weakening P1 P2 h;\ |
582 \ temp_strengthening Q1 Q2 h |]\ |
582 \ temp_strengthening Q1 Q2 h |]\ |
583 \ ==> temp_strengthening (P1 ~> Q1) (P2 ~> Q2) h"; |
583 \ ==> temp_strengthening (P1 ~> Q1) (P2 ~> Q2) h"; |
584 br strength_Box 1; |
584 br strength_Box 1; |
585 be strength_IMPLIES 1; |
585 be strength_IMPLIES 1; |
590 (* ---------------------------------------------------------------- *) |
590 (* ---------------------------------------------------------------- *) |
591 (* Localizing Temporal Weakenings - 3 *) |
591 (* Localizing Temporal Weakenings - 3 *) |
592 (* ---------------------------------------------------------------- *) |
592 (* ---------------------------------------------------------------- *) |
593 |
593 |
594 |
594 |
595 goalw thy [Diamond_def] |
595 Goalw [Diamond_def] |
596 "!! h. [| temp_weakening P Q h |]\ |
596 "!! h. [| temp_weakening P Q h |]\ |
597 \ ==> temp_weakening (<> P) (<> Q) h"; |
597 \ ==> temp_weakening (<> P) (<> Q) h"; |
598 br weak_NOT 1; |
598 br weak_NOT 1; |
599 br strength_Box 1; |
599 br strength_Box 1; |
600 be strength_NOT 1; |
600 be strength_NOT 1; |
601 qed"weak_Diamond"; |
601 qed"weak_Diamond"; |
602 |
602 |
603 goalw thy [Leadsto_def] |
603 Goalw [Leadsto_def] |
604 "!! h. [| temp_strengthening P1 P2 h;\ |
604 "!! h. [| temp_strengthening P1 P2 h;\ |
605 \ temp_weakening Q1 Q2 h |]\ |
605 \ temp_weakening Q1 Q2 h |]\ |
606 \ ==> temp_weakening (P1 ~> Q1) (P2 ~> Q2) h"; |
606 \ ==> temp_weakening (P1 ~> Q1) (P2 ~> Q2) h"; |
607 br weak_Box 1; |
607 br weak_Box 1; |
608 be weak_IMPLIES 1; |
608 be weak_IMPLIES 1; |
609 be weak_Diamond 1; |
609 be weak_Diamond 1; |
610 qed"weak_Leadsto"; |
610 qed"weak_Leadsto"; |
611 |
611 |
612 goalw thy [WF_def] |
612 Goalw [WF_def] |
613 " !!A. [| !! s. Enabled A acts (h s) ==> Enabled C acts s|] \ |
613 " !!A. [| !! s. Enabled A acts (h s) ==> Enabled C acts s|] \ |
614 \ ==> temp_weakening (WF A acts) (WF C acts) h"; |
614 \ ==> temp_weakening (WF A acts) (WF C acts) h"; |
615 br weak_IMPLIES 1; |
615 br weak_IMPLIES 1; |
616 br strength_Diamond 1; |
616 br strength_Diamond 1; |
617 br strength_Box 1; |
617 br strength_Box 1; |
622 by (auto_tac (claset(), |
622 by (auto_tac (claset(), |
623 simpset() addsimps [state_weakening_def,state_strengthening_def, |
623 simpset() addsimps [state_weakening_def,state_strengthening_def, |
624 xt2_def,plift_def,option_lift_def,NOT_def])); |
624 xt2_def,plift_def,option_lift_def,NOT_def])); |
625 qed"weak_WF"; |
625 qed"weak_WF"; |
626 |
626 |
627 goalw thy [SF_def] |
627 Goalw [SF_def] |
628 " !!A. [| !! s. Enabled A acts (h s) ==> Enabled C acts s|] \ |
628 " !!A. [| !! s. Enabled A acts (h s) ==> Enabled C acts s|] \ |
629 \ ==> temp_weakening (SF A acts) (SF C acts) h"; |
629 \ ==> temp_weakening (SF A acts) (SF C acts) h"; |
630 br weak_IMPLIES 1; |
630 br weak_IMPLIES 1; |
631 br strength_Box 1; |
631 br strength_Box 1; |
632 br strength_Diamond 1; |
632 br strength_Diamond 1; |