src/HOL/HOLCF/IOA/meta_theory/ShortExecutions.thy
changeset 62002 f1599e98c4d0
parent 62001 1f2788fb0b8b
child 62005 68db98c2cd97
equal deleted inserted replaced
62001:1f2788fb0b8b 62002:f1599e98c4d0
     4 
     4 
     5 theory ShortExecutions
     5 theory ShortExecutions
     6 imports Traces
     6 imports Traces
     7 begin
     7 begin
     8 
     8 
     9 text {*
     9 text \<open>
    10   Some properties about @{text "Cut ex"}, defined as follows:
    10   Some properties about \<open>Cut ex\<close>, defined as follows:
    11 
    11 
    12   For every execution ex there is another shorter execution @{text "Cut ex"}
    12   For every execution ex there is another shorter execution \<open>Cut ex\<close>
    13   that has the same trace as ex, but its schedule ends with an external action.
    13   that has the same trace as ex, but its schedule ends with an external action.
    14 *}
    14 \<close>
    15 
    15 
    16 definition
    16 definition
    17   oraclebuild :: "('a => bool) => 'a Seq -> 'a Seq -> 'a Seq" where
    17   oraclebuild :: "('a => bool) => 'a Seq -> 'a Seq -> 'a Seq" where
    18   "oraclebuild P = (fix$(LAM h s t. case t of
    18   "oraclebuild P = (fix$(LAM h s t. case t of
    19        nil => nil
    19        nil => nil
    45 
    45 
    46 axiomatization where
    46 axiomatization where
    47   LastActExtsmall2: "[| Finite sch1; LastActExtsch A (sch1 @@ sch2) |] ==> LastActExtsch A sch2"
    47   LastActExtsmall2: "[| Finite sch1; LastActExtsch A (sch1 @@ sch2) |] ==> LastActExtsch A sch2"
    48 
    48 
    49 
    49 
    50 ML {*
    50 ML \<open>
    51 fun thin_tac' ctxt j =
    51 fun thin_tac' ctxt j =
    52   rotate_tac (j - 1) THEN'
    52   rotate_tac (j - 1) THEN'
    53   eresolve_tac ctxt [thin_rl] THEN'
    53   eresolve_tac ctxt [thin_rl] THEN'
    54   rotate_tac (~ (j - 1))
    54   rotate_tac (~ (j - 1))
    55 *}
    55 \<close>
    56 
    56 
    57 
    57 
    58 subsection "oraclebuild rewrite rules"
    58 subsection "oraclebuild rewrite rules"
    59 
    59 
    60 
    60 
   223 
   223 
   224 apply (unfold schedules_def has_schedule_def)
   224 apply (unfold schedules_def has_schedule_def)
   225 apply auto
   225 apply auto
   226 apply (rule_tac x = "filter_act$ (Cut (%a. fst a:ext A) (snd ex))" in exI)
   226 apply (rule_tac x = "filter_act$ (Cut (%a. fst a:ext A) (snd ex))" in exI)
   227 apply (simp add: executions_def)
   227 apply (simp add: executions_def)
   228 apply (tactic {* pair_tac @{context} "ex" 1 *})
   228 apply (tactic \<open>pair_tac @{context} "ex" 1\<close>)
   229 apply auto
   229 apply auto
   230 apply (rule_tac x = " (x1,Cut (%a. fst a:ext A) x2) " in exI)
   230 apply (rule_tac x = " (x1,Cut (%a. fst a:ext A) x2) " in exI)
   231 apply (simp (no_asm_simp))
   231 apply (simp (no_asm_simp))
   232 
   232 
   233 (* Subgoal 1: Lemma:  propagation of execution through Cut *)
   233 (* Subgoal 1: Lemma:  propagation of execution through Cut *)