192 by (etac (hd_is_reduce_hd RS mp) 1); |
192 by (etac (hd_is_reduce_hd RS mp) 1); |
193 by (rtac (bool_if_impl_or RS mp) 1); |
193 by (rtac (bool_if_impl_or RS mp) 1); |
194 by (etac reduce_tl 1); |
194 by (etac reduce_tl 1); |
195 qed"channel_abstraction"; |
195 qed"channel_abstraction"; |
196 |
196 |
197 goal Correctness.thy |
197 Goal |
198 "is_weak_ref_map reduce srch_ioa srch_fin_ioa"; |
198 "is_weak_ref_map reduce srch_ioa srch_fin_ioa"; |
199 by (simp_tac (list_ss addsimps [srch_fin_ioa_def,rsch_fin_ioa_def, |
199 by (simp_tac (list_ss addsimps [srch_fin_ioa_def,rsch_fin_ioa_def, |
200 srch_ioa_def,rsch_ioa_def,rename_through_pmap,channel_abstraction]) 1); |
200 srch_ioa_def,rsch_ioa_def,rename_through_pmap,channel_abstraction]) 1); |
201 qed"sender_abstraction"; |
201 qed"sender_abstraction"; |
202 |
202 |
203 goal Correctness.thy |
203 Goal |
204 "is_weak_ref_map reduce rsch_ioa rsch_fin_ioa"; |
204 "is_weak_ref_map reduce rsch_ioa rsch_fin_ioa"; |
205 by (simp_tac (list_ss addsimps [srch_fin_ioa_def,rsch_fin_ioa_def, |
205 by (simp_tac (list_ss addsimps [srch_fin_ioa_def,rsch_fin_ioa_def, |
206 srch_ioa_def,rsch_ioa_def,rename_through_pmap,channel_abstraction]) 1); |
206 srch_ioa_def,rsch_ioa_def,rename_through_pmap,channel_abstraction]) 1); |
207 qed"receiver_abstraction"; |
207 qed"receiver_abstraction"; |
208 |
208 |
209 |
209 |
210 (* 3 thms that do not hold generally! The lucky restriction here is |
210 (* 3 thms that do not hold generally! The lucky restriction here is |
211 the absence of internal actions. *) |
211 the absence of internal actions. *) |
212 goal Correctness.thy |
212 Goal |
213 "is_weak_ref_map (%id. id) sender_ioa sender_ioa"; |
213 "is_weak_ref_map (%id. id) sender_ioa sender_ioa"; |
214 by (simp_tac (simpset() addsimps [is_weak_ref_map_def]) 1); |
214 by (simp_tac (simpset() addsimps [is_weak_ref_map_def]) 1); |
215 by (TRY( |
215 by (TRY( |
216 (rtac conjI 1) THEN |
216 (rtac conjI 1) THEN |
217 (* start states *) |
217 (* start states *) |
254 (* 7 cases *) |
254 (* 7 cases *) |
255 by (ALLGOALS(simp_tac (simpset() addsimps [externals_def] addsplits [split_if]))); |
255 by (ALLGOALS(simp_tac (simpset() addsimps [externals_def] addsplits [split_if]))); |
256 qed"env_unchanged"; |
256 qed"env_unchanged"; |
257 Addsplits [split_if]; |
257 Addsplits [split_if]; |
258 |
258 |
259 goal Correctness.thy "compatible srch_ioa rsch_ioa"; |
259 Goal "compatible srch_ioa rsch_ioa"; |
260 by (simp_tac (simpset() addsimps [compatible_def,Int_def,empty_def]) 1); |
260 by (simp_tac (simpset() addsimps [compatible_def,Int_def,empty_def]) 1); |
261 by (rtac set_ext 1); |
261 by (rtac set_ext 1); |
262 by (Action.action.induct_tac "x" 1); |
262 by (Action.action.induct_tac "x" 1); |
263 by (ALLGOALS(Simp_tac)); |
263 by (ALLGOALS(Simp_tac)); |
264 val compat_single_ch = result(); |
264 val compat_single_ch = result(); |
265 |
265 |
266 (* totally the same as before *) |
266 (* totally the same as before *) |
267 goal Correctness.thy "compatible srch_fin_ioa rsch_fin_ioa"; |
267 Goal "compatible srch_fin_ioa rsch_fin_ioa"; |
268 by (simp_tac (simpset() addsimps [compatible_def,Int_def,empty_def]) 1); |
268 by (simp_tac (simpset() addsimps [compatible_def,Int_def,empty_def]) 1); |
269 by (rtac set_ext 1); |
269 by (rtac set_ext 1); |
270 by (Action.action.induct_tac "x" 1); |
270 by (Action.action.induct_tac "x" 1); |
271 by (ALLGOALS(Simp_tac)); |
271 by (ALLGOALS(Simp_tac)); |
272 val compat_single_fin_ch = result(); |
272 val compat_single_fin_ch = result(); |
276 asig_of_def, actions_def, srch_trans_def, rsch_trans_def, |
276 asig_of_def, actions_def, srch_trans_def, rsch_trans_def, |
277 srch_ioa_def, srch_fin_ioa_def, rsch_fin_ioa_def, |
277 srch_ioa_def, srch_fin_ioa_def, rsch_fin_ioa_def, |
278 rsch_ioa_def, Sender.sender_trans_def, |
278 rsch_ioa_def, Sender.sender_trans_def, |
279 Receiver.receiver_trans_def] @ set_lemmas); |
279 Receiver.receiver_trans_def] @ set_lemmas); |
280 |
280 |
281 goal Correctness.thy "compatible receiver_ioa (srch_ioa || rsch_ioa)"; |
281 Goal "compatible receiver_ioa (srch_ioa || rsch_ioa)"; |
282 by (simp_tac (ss addsimps [empty_def,compatible_def, |
282 by (simp_tac (ss addsimps [empty_def,compatible_def, |
283 asig_of_par,asig_comp_def,actions_def, |
283 asig_of_par,asig_comp_def,actions_def, |
284 Int_def]) 1); |
284 Int_def]) 1); |
285 by (Simp_tac 1); |
285 by (Simp_tac 1); |
286 by (rtac set_ext 1); |
286 by (rtac set_ext 1); |
287 by (Action.action.induct_tac "x" 1); |
287 by (Action.action.induct_tac "x" 1); |
288 by (ALLGOALS Simp_tac); |
288 by (ALLGOALS Simp_tac); |
289 val compat_rec = result(); |
289 val compat_rec = result(); |
290 |
290 |
291 (* 5 proofs totally the same as before *) |
291 (* 5 proofs totally the same as before *) |
292 goal Correctness.thy "compatible receiver_ioa (srch_fin_ioa || rsch_fin_ioa)"; |
292 Goal "compatible receiver_ioa (srch_fin_ioa || rsch_fin_ioa)"; |
293 by (simp_tac (ss addsimps [empty_def,compatible_def,asig_of_par,asig_comp_def,actions_def,Int_def]) 1); |
293 by (simp_tac (ss addsimps [empty_def,compatible_def,asig_of_par,asig_comp_def,actions_def,Int_def]) 1); |
294 by (Simp_tac 1); |
294 by (Simp_tac 1); |
295 by (rtac set_ext 1); |
295 by (rtac set_ext 1); |
296 by (Action.action.induct_tac "x" 1); |
296 by (Action.action.induct_tac "x" 1); |
297 by (ALLGOALS Simp_tac); |
297 by (ALLGOALS Simp_tac); |
298 val compat_rec_fin =result(); |
298 val compat_rec_fin =result(); |
299 |
299 |
300 goal Correctness.thy "compatible sender_ioa \ |
300 Goal "compatible sender_ioa \ |
301 \ (receiver_ioa || srch_ioa || rsch_ioa)"; |
301 \ (receiver_ioa || srch_ioa || rsch_ioa)"; |
302 by (simp_tac (ss addsimps [empty_def,compatible_def,asig_of_par,asig_comp_def,actions_def,Int_def]) 1); |
302 by (simp_tac (ss addsimps [empty_def,compatible_def,asig_of_par,asig_comp_def,actions_def,Int_def]) 1); |
303 by (Simp_tac 1); |
303 by (Simp_tac 1); |
304 by (rtac set_ext 1); |
304 by (rtac set_ext 1); |
305 by (Action.action.induct_tac "x" 1); |
305 by (Action.action.induct_tac "x" 1); |
306 by (ALLGOALS(Simp_tac)); |
306 by (ALLGOALS(Simp_tac)); |
307 val compat_sen=result(); |
307 val compat_sen=result(); |
308 |
308 |
309 goal Correctness.thy "compatible sender_ioa\ |
309 Goal "compatible sender_ioa\ |
310 \ (receiver_ioa || srch_fin_ioa || rsch_fin_ioa)"; |
310 \ (receiver_ioa || srch_fin_ioa || rsch_fin_ioa)"; |
311 by (simp_tac (ss addsimps [empty_def, compatible_def,asig_of_par,asig_comp_def,actions_def,Int_def]) 1); |
311 by (simp_tac (ss addsimps [empty_def, compatible_def,asig_of_par,asig_comp_def,actions_def,Int_def]) 1); |
312 by (Simp_tac 1); |
312 by (Simp_tac 1); |
313 by (rtac set_ext 1); |
313 by (rtac set_ext 1); |
314 by (Action.action.induct_tac "x" 1); |
314 by (Action.action.induct_tac "x" 1); |
315 by (ALLGOALS(Simp_tac)); |
315 by (ALLGOALS(Simp_tac)); |
316 val compat_sen_fin =result(); |
316 val compat_sen_fin =result(); |
317 |
317 |
318 goal Correctness.thy "compatible env_ioa\ |
318 Goal "compatible env_ioa\ |
319 \ (sender_ioa || receiver_ioa || srch_ioa || rsch_ioa)"; |
319 \ (sender_ioa || receiver_ioa || srch_ioa || rsch_ioa)"; |
320 by (simp_tac (ss addsimps [empty_def,compatible_def,asig_of_par,asig_comp_def,actions_def,Int_def]) 1); |
320 by (simp_tac (ss addsimps [empty_def,compatible_def,asig_of_par,asig_comp_def,actions_def,Int_def]) 1); |
321 by (Simp_tac 1); |
321 by (Simp_tac 1); |
322 by (rtac set_ext 1); |
322 by (rtac set_ext 1); |
323 by (Action.action.induct_tac "x" 1); |
323 by (Action.action.induct_tac "x" 1); |
324 by (ALLGOALS(Simp_tac)); |
324 by (ALLGOALS(Simp_tac)); |
325 val compat_env=result(); |
325 val compat_env=result(); |
326 |
326 |
327 goal Correctness.thy "compatible env_ioa\ |
327 Goal "compatible env_ioa\ |
328 \ (sender_ioa || receiver_ioa || srch_fin_ioa || rsch_fin_ioa)"; |
328 \ (sender_ioa || receiver_ioa || srch_fin_ioa || rsch_fin_ioa)"; |
329 by (simp_tac (ss addsimps [empty_def,compatible_def,asig_of_par,asig_comp_def,actions_def,Int_def]) 1); |
329 by (simp_tac (ss addsimps [empty_def,compatible_def,asig_of_par,asig_comp_def,actions_def,Int_def]) 1); |
330 by (Simp_tac 1); |
330 by (Simp_tac 1); |
331 by (rtac set_ext 1); |
331 by (rtac set_ext 1); |
332 by (Action.action.induct_tac "x" 1); |
332 by (Action.action.induct_tac "x" 1); |
333 by (ALLGOALS Simp_tac); |
333 by (ALLGOALS Simp_tac); |
334 val compat_env_fin=result(); |
334 val compat_env_fin=result(); |
335 |
335 |
336 |
336 |
337 (* lemmata about externals of channels *) |
337 (* lemmata about externals of channels *) |
338 goal Correctness.thy |
338 Goal |
339 "externals(asig_of(srch_fin_ioa)) = externals(asig_of(srch_ioa)) & \ |
339 "externals(asig_of(srch_fin_ioa)) = externals(asig_of(srch_ioa)) & \ |
340 \ externals(asig_of(rsch_fin_ioa)) = externals(asig_of(rsch_ioa))"; |
340 \ externals(asig_of(rsch_fin_ioa)) = externals(asig_of(rsch_ioa))"; |
341 by (simp_tac (simpset() addsimps [externals_def]) 1); |
341 by (simp_tac (simpset() addsimps [externals_def]) 1); |
342 val ext_single_ch = result(); |
342 val ext_single_ch = result(); |
343 |
343 |