331 done |
331 done |
332 |
332 |
333 declare laststate_UU [simp] laststate_nil [simp] laststate_cons [simp] |
333 declare laststate_UU [simp] laststate_nil [simp] laststate_cons [simp] |
334 |
334 |
335 lemma exists_laststate: "!!ex. Finite ex ==> (! s. ? u. laststate (s,ex)=u)" |
335 lemma exists_laststate: "!!ex. Finite ex ==> (! s. ? u. laststate (s,ex)=u)" |
336 apply (tactic "Seq_Finite_induct_tac 1") |
336 apply (tactic "Seq_Finite_induct_tac @{context} 1") |
337 done |
337 done |
338 |
338 |
339 |
339 |
340 subsection "has_trace, mk_trace" |
340 subsection "has_trace, mk_trace" |
341 |
341 |
357 this condition is included once more. (see Lemmas 1.1.1c in CompoExecs for example) *) |
357 this condition is included once more. (see Lemmas 1.1.1c in CompoExecs for example) *) |
358 |
358 |
359 lemma execfrag_in_sig: |
359 lemma execfrag_in_sig: |
360 "!! A. is_trans_of A ==> |
360 "!! A. is_trans_of A ==> |
361 ! s. is_exec_frag A (s,xs) --> Forall (%a. a:act A) (filter_act$xs)" |
361 ! s. is_exec_frag A (s,xs) --> Forall (%a. a:act A) (filter_act$xs)" |
362 apply (tactic {* pair_induct_tac "xs" [thm "is_exec_frag_def", |
362 apply (tactic {* pair_induct_tac @{context} "xs" [@{thm is_exec_frag_def}, |
363 thm "Forall_def", thm "sforall_def"] 1 *}) |
363 @{thm Forall_def}, @{thm sforall_def}] 1 *}) |
364 (* main case *) |
364 (* main case *) |
365 apply (auto simp add: is_trans_of_def) |
365 apply (auto simp add: is_trans_of_def) |
366 done |
366 done |
367 |
367 |
368 lemma exec_in_sig: |
368 lemma exec_in_sig: |
369 "!! A.[| is_trans_of A; x:executions A |] ==> |
369 "!! A.[| is_trans_of A; x:executions A |] ==> |
370 Forall (%a. a:act A) (filter_act$(snd x))" |
370 Forall (%a. a:act A) (filter_act$(snd x))" |
371 apply (simp add: executions_def) |
371 apply (simp add: executions_def) |
372 apply (tactic {* pair_tac "x" 1 *}) |
372 apply (tactic {* pair_tac @{context} "x" 1 *}) |
373 apply (rule execfrag_in_sig [THEN spec, THEN mp]) |
373 apply (rule execfrag_in_sig [THEN spec, THEN mp]) |
374 apply auto |
374 apply auto |
375 done |
375 done |
376 |
376 |
377 lemma scheds_in_sig: |
377 lemma scheds_in_sig: |
384 |
384 |
385 subsection "executions are prefix closed" |
385 subsection "executions are prefix closed" |
386 |
386 |
387 (* only admissible in y, not if done in x !! *) |
387 (* only admissible in y, not if done in x !! *) |
388 lemma execfrag_prefixclosed: "!x s. is_exec_frag A (s,x) & y<<x --> is_exec_frag A (s,y)" |
388 lemma execfrag_prefixclosed: "!x s. is_exec_frag A (s,x) & y<<x --> is_exec_frag A (s,y)" |
389 apply (tactic {* pair_induct_tac "y" [thm "is_exec_frag_def"] 1 *}) |
389 apply (tactic {* pair_induct_tac @{context} "y" [@{thm is_exec_frag_def}] 1 *}) |
390 apply (intro strip) |
390 apply (intro strip) |
391 apply (tactic {* Seq_case_simp_tac "xa" 1 *}) |
391 apply (tactic {* Seq_case_simp_tac @{context} "xa" 1 *}) |
392 apply (tactic {* pair_tac "a" 1 *}) |
392 apply (tactic {* pair_tac @{context} "a" 1 *}) |
393 apply auto |
393 apply auto |
394 done |
394 done |
395 |
395 |
396 lemmas exec_prefixclosed = |
396 lemmas exec_prefixclosed = |
397 conjI [THEN execfrag_prefixclosed [THEN spec, THEN spec, THEN mp], standard] |
397 conjI [THEN execfrag_prefixclosed [THEN spec, THEN spec, THEN mp], standard] |
399 |
399 |
400 (* second prefix notion for Finite x *) |
400 (* second prefix notion for Finite x *) |
401 |
401 |
402 lemma exec_prefix2closed [rule_format]: |
402 lemma exec_prefix2closed [rule_format]: |
403 "! y s. is_exec_frag A (s,x@@y) --> is_exec_frag A (s,x)" |
403 "! y s. is_exec_frag A (s,x@@y) --> is_exec_frag A (s,x)" |
404 apply (tactic {* pair_induct_tac "x" [thm "is_exec_frag_def"] 1 *}) |
404 apply (tactic {* pair_induct_tac @{context} "x" [@{thm is_exec_frag_def}] 1 *}) |
405 apply (intro strip) |
405 apply (intro strip) |
406 apply (tactic {* Seq_case_simp_tac "s" 1 *}) |
406 apply (tactic {* Seq_case_simp_tac @{context} "s" 1 *}) |
407 apply (tactic {* pair_tac "a" 1 *}) |
407 apply (tactic {* pair_tac @{context} "a" 1 *}) |
408 apply auto |
408 apply auto |
409 done |
409 done |
410 |
410 |
411 |
|
412 end |
411 end |