src/HOLCF/IOA/meta_theory/CompoScheds.thy
author wenzelm
Sat, 20 Oct 2007 20:32:23 +0200
changeset 25124 a7dd8d3bf969
parent 19741 f65265d71426
child 25135 4f8176c940cf
permissions -rw-r--r--
maintain PolyML.Compiler.printInAlphabeticalOrder in polyml.ML;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
     1
(*  Title:      HOLCF/IOA/meta_theory/CompoScheds.thy
3275
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
     2
    ID:         $Id$
12218
wenzelm
parents: 12028
diff changeset
     3
    Author:     Olaf Müller
17233
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
     4
*)
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
     5
17233
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
     6
header {* Compositionality on Schedule level *}
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
     7
17233
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
     8
theory CompoScheds
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
     9
imports CompoExecs
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    10
begin
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    11
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    12
consts
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    13
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    14
 mkex     ::"('a,'s)ioa => ('a,'t)ioa => 'a Seq =>
17233
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    15
              ('a,'s)execution => ('a,'t)execution =>('a,'s*'t)execution"
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    16
 mkex2    ::"('a,'s)ioa => ('a,'t)ioa => 'a Seq ->
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    17
              ('a,'s)pairs -> ('a,'t)pairs ->
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    18
              ('s => 't => ('a,'s*'t)pairs)"
3521
bdc51b4c6050 changes needed for adding fairness
mueller
parents: 3275
diff changeset
    19
 par_scheds ::"['a schedule_module,'a schedule_module] => 'a schedule_module"
bdc51b4c6050 changes needed for adding fairness
mueller
parents: 3275
diff changeset
    20
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    21
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    22
defs
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    23
17233
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    24
mkex_def:
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    25
  "mkex A B sch exA exB ==
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    26
       ((fst exA,fst exB),
10835
nipkow
parents: 3842
diff changeset
    27
        (mkex2 A B$sch$(snd exA)$(snd exB)) (fst exA) (fst exB))"
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    28
17233
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    29
mkex2_def:
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    30
  "mkex2 A B == (fix$(LAM h sch exA exB. (%s t. case sch of
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    31
       nil => nil
17233
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    32
    | x##xs =>
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    33
      (case x of
12028
52aa183c15bb replaced Undef by UU;
wenzelm
parents: 10835
diff changeset
    34
        UU => UU
17233
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    35
      | Def y =>
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    36
         (if y:act A then
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    37
             (if y:act B then
10835
nipkow
parents: 3842
diff changeset
    38
                (case HD$exA of
12028
52aa183c15bb replaced Undef by UU;
wenzelm
parents: 10835
diff changeset
    39
                   UU => UU
10835
nipkow
parents: 3842
diff changeset
    40
                 | Def a => (case HD$exB of
12028
52aa183c15bb replaced Undef by UU;
wenzelm
parents: 10835
diff changeset
    41
                              UU => UU
17233
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    42
                            | Def b =>
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    43
                   (y,(snd a,snd b))>>
10835
nipkow
parents: 3842
diff changeset
    44
                     (h$xs$(TL$exA)$(TL$exB)) (snd a) (snd b)))
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    45
              else
10835
nipkow
parents: 3842
diff changeset
    46
                (case HD$exA of
12028
52aa183c15bb replaced Undef by UU;
wenzelm
parents: 10835
diff changeset
    47
                   UU => UU
17233
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    48
                 | Def a =>
10835
nipkow
parents: 3842
diff changeset
    49
                   (y,(snd a,t))>>(h$xs$(TL$exA)$exB) (snd a) t)
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    50
              )
17233
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    51
          else
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    52
             (if y:act B then
10835
nipkow
parents: 3842
diff changeset
    53
                (case HD$exB of
12028
52aa183c15bb replaced Undef by UU;
wenzelm
parents: 10835
diff changeset
    54
                   UU => UU
17233
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    55
                 | Def b =>
10835
nipkow
parents: 3842
diff changeset
    56
                   (y,(s,snd b))>>(h$xs$exA$(TL$exB)) s (snd b))
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    57
             else
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    58
               UU
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    59
             )
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    60
         )
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    61
       ))))"
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    62
17233
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    63
par_scheds_def:
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    64
  "par_scheds SchedsA SchedsB ==
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    65
       let schA = fst SchedsA; sigA = snd SchedsA;
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    66
           schB = fst SchedsB; sigB = snd SchedsB
3521
bdc51b4c6050 changes needed for adding fairness
mueller
parents: 3275
diff changeset
    67
       in
10835
nipkow
parents: 3842
diff changeset
    68
       (    {sch. Filter (%a. a:actions sigA)$sch : schA}
nipkow
parents: 3842
diff changeset
    69
        Int {sch. Filter (%a. a:actions sigB)$sch : schB}
3521
bdc51b4c6050 changes needed for adding fairness
mueller
parents: 3275
diff changeset
    70
        Int {sch. Forall (%x. x:(actions sigA Un actions sigB)) sch},
bdc51b4c6050 changes needed for adding fairness
mueller
parents: 3275
diff changeset
    71
        asig_comp sigA sigB)"
bdc51b4c6050 changes needed for adding fairness
mueller
parents: 3275
diff changeset
    72
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    73
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    74
declare surjective_pairing [symmetric, simp]
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    75
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    76
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    77
subsection "mkex rewrite rules"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    78
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    79
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    80
lemma mkex2_unfold:
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    81
"mkex2 A B = (LAM sch exA exB. (%s t. case sch of  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    82
      nil => nil 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    83
   | x##xs => 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    84
     (case x of  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    85
       UU => UU   
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    86
     | Def y =>  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    87
        (if y:act A then 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    88
            (if y:act B then 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    89
               (case HD$exA of 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    90
                  UU => UU 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    91
                | Def a => (case HD$exB of 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    92
                             UU => UU 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    93
                           | Def b => 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    94
                  (y,(snd a,snd b))>>  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    95
                    (mkex2 A B$xs$(TL$exA)$(TL$exB)) (snd a) (snd b)))  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    96
             else   
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    97
               (case HD$exA of   
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    98
                  UU => UU  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    99
                | Def a => 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   100
                  (y,(snd a,t))>>(mkex2 A B$xs$(TL$exA)$exB) (snd a) t)  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   101
             )  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   102
         else   
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   103
            (if y:act B then 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   104
               (case HD$exB of  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   105
                  UU => UU  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   106
                | Def b =>  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   107
                  (y,(s,snd b))>>(mkex2 A B$xs$exA$(TL$exB)) s (snd b))  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   108
            else  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   109
              UU  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   110
            )  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   111
        )  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   112
      )))"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   113
apply (rule trans)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   114
apply (rule fix_eq2)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   115
apply (rule mkex2_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   116
apply (rule beta_cfun)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   117
apply simp
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   118
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   119
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   120
lemma mkex2_UU: "(mkex2 A B$UU$exA$exB) s t = UU"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   121
apply (subst mkex2_unfold)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   122
apply simp
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   123
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   124
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   125
lemma mkex2_nil: "(mkex2 A B$nil$exA$exB) s t= nil"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   126
apply (subst mkex2_unfold)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   127
apply simp
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   128
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   129
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   130
lemma mkex2_cons_1: "[| x:act A; x~:act B; HD$exA=Def a|]  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   131
    ==> (mkex2 A B$(x>>sch)$exA$exB) s t =    
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   132
        (x,snd a,t) >> (mkex2 A B$sch$(TL$exA)$exB) (snd a) t"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   133
apply (rule trans)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   134
apply (subst mkex2_unfold)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   135
apply (simp add: Consq_def If_and_if)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   136
apply (simp add: Consq_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   137
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   138
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   139
lemma mkex2_cons_2: "[| x~:act A; x:act B; HD$exB=Def b|]  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   140
    ==> (mkex2 A B$(x>>sch)$exA$exB) s t =  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   141
        (x,s,snd b) >> (mkex2 A B$sch$exA$(TL$exB)) s (snd b)"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   142
apply (rule trans)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   143
apply (subst mkex2_unfold)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   144
apply (simp add: Consq_def If_and_if)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   145
apply (simp add: Consq_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   146
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   147
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   148
lemma mkex2_cons_3: "[| x:act A; x:act B; HD$exA=Def a;HD$exB=Def b|]  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   149
    ==> (mkex2 A B$(x>>sch)$exA$exB) s t =   
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   150
         (x,snd a,snd b) >>  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   151
            (mkex2 A B$sch$(TL$exA)$(TL$exB)) (snd a) (snd b)"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   152
apply (rule trans)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   153
apply (subst mkex2_unfold)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   154
apply (simp add: Consq_def If_and_if)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   155
apply (simp add: Consq_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   156
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   157
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   158
declare mkex2_UU [simp] mkex2_nil [simp] mkex2_cons_1 [simp]
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   159
  mkex2_cons_2 [simp] mkex2_cons_3 [simp]
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   160
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   161
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   162
subsection {* mkex *}
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   163
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   164
lemma mkex_UU: "mkex A B UU  (s,exA) (t,exB) = ((s,t),UU)"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   165
apply (simp add: mkex_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   166
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   167
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   168
lemma mkex_nil: "mkex A B nil (s,exA) (t,exB) = ((s,t),nil)"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   169
apply (simp add: mkex_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   170
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   171
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   172
lemma mkex_cons_1: "[| x:act A; x~:act B |]  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   173
    ==> mkex A B (x>>sch) (s,a>>exA) (t,exB)  =   
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   174
        ((s,t), (x,snd a,t) >> snd (mkex A B sch (snd a,exA) (t,exB)))"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   175
apply (simp (no_asm) add: mkex_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   176
apply (cut_tac exA = "a>>exA" in mkex2_cons_1)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   177
apply auto
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   178
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   179
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   180
lemma mkex_cons_2: "[| x~:act A; x:act B |]  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   181
    ==> mkex A B (x>>sch) (s,exA) (t,b>>exB) =   
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   182
        ((s,t), (x,s,snd b) >> snd (mkex A B sch (s,exA) (snd b,exB)))"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   183
apply (simp (no_asm) add: mkex_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   184
apply (cut_tac exB = "b>>exB" in mkex2_cons_2)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   185
apply auto
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   186
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   187
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   188
lemma mkex_cons_3: "[| x:act A; x:act B |]   
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   189
    ==>  mkex A B (x>>sch) (s,a>>exA) (t,b>>exB) =  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   190
         ((s,t), (x,snd a,snd b) >> snd (mkex A B sch (snd a,exA) (snd b,exB)))"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   191
apply (simp (no_asm) add: mkex_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   192
apply (cut_tac exB = "b>>exB" and exA = "a>>exA" in mkex2_cons_3)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   193
apply auto
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   194
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   195
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   196
declare mkex2_UU [simp del] mkex2_nil [simp del]
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   197
  mkex2_cons_1 [simp del] mkex2_cons_2 [simp del] mkex2_cons_3 [simp del]
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   198
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   199
lemmas composch_simps = mkex_UU mkex_nil mkex_cons_1 mkex_cons_2 mkex_cons_3
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   200
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   201
declare composch_simps [simp]
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   202
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   203
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   204
subsection {* COMPOSITIONALITY on SCHEDULE Level *}
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   205
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   206
subsubsection "Lemmas for ==>"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   207
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   208
(* --------------------------------------------------------------------- *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   209
(*    Lemma_2_1 :  tfilter(ex) and filter_act are commutative            *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   210
(* --------------------------------------------------------------------- *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   211
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   212
lemma lemma_2_1a: 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   213
   "filter_act$(Filter_ex2 (asig_of A)$xs)= 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   214
    Filter (%a. a:act A)$(filter_act$xs)"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   215
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   216
apply (unfold filter_act_def Filter_ex2_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   217
apply (simp (no_asm) add: MapFilter o_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   218
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   219
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   220
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   221
(* --------------------------------------------------------------------- *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   222
(*    Lemma_2_2 : State-projections do not affect filter_act             *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   223
(* --------------------------------------------------------------------- *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   224
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   225
lemma lemma_2_1b: 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   226
   "filter_act$(ProjA2$xs) =filter_act$xs & 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   227
    filter_act$(ProjB2$xs) =filter_act$xs"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   228
apply (tactic {* pair_induct_tac "xs" [] 1 *})
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   229
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   230
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   231
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   232
(* --------------------------------------------------------------------- *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   233
(*             Schedules of A||B have only  A- or B-actions              *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   234
(* --------------------------------------------------------------------- *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   235
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   236
(* very similar to lemma_1_1c, but it is not checking if every action element of
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   237
   an ex is in A or B, but after projecting it onto the action schedule. Of course, this
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   238
   is the same proposition, but we cannot change this one, when then rather lemma_1_1c  *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   239
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   240
lemma sch_actions_in_AorB: "!s. is_exec_frag (A||B) (s,xs)  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   241
   --> Forall (%x. x:act (A||B)) (filter_act$xs)"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   242
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   243
apply (tactic {* pair_induct_tac "xs" [thm "is_exec_frag_def", thm "Forall_def",
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   244
  thm "sforall_def"] 1 *})
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   245
(* main case *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   246
apply (tactic "safe_tac set_cs")
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   247
apply (auto simp add: trans_of_defs2 actions_asig_comp asig_of_par)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   248
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   249
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   250
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   251
subsubsection "Lemmas for <=="
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   252
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   253
(*---------------------------------------------------------------------------
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   254
    Filtering actions out of mkex(sch,exA,exB) yields the oracle sch
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   255
                             structural induction
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   256
  --------------------------------------------------------------------------- *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   257
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   258
lemma Mapfst_mkex_is_sch: "! exA exB s t.  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   259
  Forall (%x. x:act (A||B)) sch  &  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   260
  Filter (%a. a:act A)$sch << filter_act$exA & 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   261
  Filter (%a. a:act B)$sch << filter_act$exB  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   262
  --> filter_act$(snd (mkex A B sch (s,exA) (t,exB))) = sch"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   263
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   264
apply (tactic {* Seq_induct_tac "sch" [thm "Filter_def", thm "Forall_def",
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   265
  thm "sforall_def", thm "mkex_def"] 1 *})
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   266
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   267
(* main case *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   268
(* splitting into 4 cases according to a:A, a:B *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   269
apply (tactic "safe_tac set_cs")
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   270
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   271
(* Case y:A, y:B *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   272
apply (tactic {* Seq_case_simp_tac "exA" 1 *})
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   273
(* Case exA=UU, Case exA=nil*)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   274
(* These UU and nil cases are the only places where the assumption filter A sch<<f_act exA
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   275
   is used! --> to generate a contradiction using  ~a>>ss<< UU(nil), using theorems
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   276
   Cons_not_less_UU and Cons_not_less_nil  *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   277
apply (tactic {* Seq_case_simp_tac "exB" 1 *})
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   278
(* Case exA=a>>x, exB=b>>y *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   279
(* here it is important that Seq_case_simp_tac uses no !full!_simp_tac for the cons case,
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   280
   as otherwise mkex_cons_3 would  not be rewritten without use of rotate_tac: then tactic
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   281
   would not be generally applicable *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   282
apply simp
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   283
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   284
(* Case y:A, y~:B *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   285
apply (tactic {* Seq_case_simp_tac "exA" 1 *})
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   286
apply simp
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   287
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   288
(* Case y~:A, y:B *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   289
apply (tactic {* Seq_case_simp_tac "exB" 1 *})
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   290
apply simp
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   291
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   292
(* Case y~:A, y~:B *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   293
apply (simp add: asig_of_par actions_asig_comp)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   294
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   295
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   296
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   297
(* generalizing the proof above to a tactic *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   298
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   299
ML {*
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   300
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   301
local
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   302
  val defs = [thm "Filter_def", thm "Forall_def", thm "sforall_def", thm "mkex_def",
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   303
    thm "stutter_def"]
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   304
  val asigs = [thm "asig_of_par", thm "actions_asig_comp"]
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   305
in
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   306
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   307
fun mkex_induct_tac sch exA exB =
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   308
    EVERY1[Seq_induct_tac sch defs,
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   309
           SIMPSET' asm_full_simp_tac,
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   310
           SELECT_GOAL (safe_tac set_cs),
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   311
           Seq_case_simp_tac exA,
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   312
           Seq_case_simp_tac exB,
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   313
           SIMPSET' asm_full_simp_tac,
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   314
           Seq_case_simp_tac exA,
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   315
           SIMPSET' asm_full_simp_tac,
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   316
           Seq_case_simp_tac exB,
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   317
           SIMPSET' asm_full_simp_tac,
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   318
           SIMPSET' (fn ss => asm_full_simp_tac (ss addsimps asigs))
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   319
          ]
17233
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
   320
3521
bdc51b4c6050 changes needed for adding fairness
mueller
parents: 3275
diff changeset
   321
end
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   322
*}
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   323
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   324
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   325
(*---------------------------------------------------------------------------
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   326
               Projection of mkex(sch,exA,exB) onto A stutters on A
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   327
                             structural induction
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   328
  --------------------------------------------------------------------------- *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   329
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   330
lemma stutterA_mkex: "! exA exB s t.  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   331
  Forall (%x. x:act (A||B)) sch &  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   332
  Filter (%a. a:act A)$sch << filter_act$exA & 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   333
  Filter (%a. a:act B)$sch << filter_act$exB  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   334
  --> stutter (asig_of A) (s,ProjA2$(snd (mkex A B sch (s,exA) (t,exB))))"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   335
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   336
apply (tactic {* mkex_induct_tac "sch" "exA" "exB" *})
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   337
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   338
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   339
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   340
lemma stutter_mkex_on_A: "[|   
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   341
  Forall (%x. x:act (A||B)) sch ;  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   342
  Filter (%a. a:act A)$sch << filter_act$(snd exA) ; 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   343
  Filter (%a. a:act B)$sch << filter_act$(snd exB) |]  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   344
  ==> stutter (asig_of A) (ProjA (mkex A B sch exA exB))"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   345
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   346
apply (cut_tac stutterA_mkex)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   347
apply (simp add: stutter_def ProjA_def mkex_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   348
apply (erule allE)+
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   349
apply (drule mp)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   350
prefer 2 apply (assumption)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   351
apply simp
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   352
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   353
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   354
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   355
(*---------------------------------------------------------------------------
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   356
               Projection of mkex(sch,exA,exB) onto B stutters on B
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   357
                             structural induction
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   358
  --------------------------------------------------------------------------- *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   359
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   360
lemma stutterB_mkex: "! exA exB s t.  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   361
  Forall (%x. x:act (A||B)) sch &  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   362
  Filter (%a. a:act A)$sch << filter_act$exA & 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   363
  Filter (%a. a:act B)$sch << filter_act$exB  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   364
  --> stutter (asig_of B) (t,ProjB2$(snd (mkex A B sch (s,exA) (t,exB))))"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   365
apply (tactic {* mkex_induct_tac "sch" "exA" "exB" *})
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   366
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   367
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   368
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   369
lemma stutter_mkex_on_B: "[|   
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   370
  Forall (%x. x:act (A||B)) sch ;  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   371
  Filter (%a. a:act A)$sch << filter_act$(snd exA) ; 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   372
  Filter (%a. a:act B)$sch << filter_act$(snd exB) |]  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   373
  ==> stutter (asig_of B) (ProjB (mkex A B sch exA exB))"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   374
apply (cut_tac stutterB_mkex)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   375
apply (simp add: stutter_def ProjB_def mkex_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   376
apply (erule allE)+
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   377
apply (drule mp)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   378
prefer 2 apply (assumption)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   379
apply simp
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   380
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   381
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   382
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   383
(*---------------------------------------------------------------------------
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   384
     Filter of mkex(sch,exA,exB) to A after projection onto A is exA
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   385
        --  using zip$(proj1$exA)$(proj2$exA) instead of exA    --
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   386
        --           because of admissibility problems          --
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   387
                             structural induction
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   388
  --------------------------------------------------------------------------- *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   389
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   390
lemma filter_mkex_is_exA_tmp: "! exA exB s t.  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   391
  Forall (%x. x:act (A||B)) sch &  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   392
  Filter (%a. a:act A)$sch << filter_act$exA  & 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   393
  Filter (%a. a:act B)$sch << filter_act$exB  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   394
  --> Filter_ex2 (asig_of A)$(ProjA2$(snd (mkex A B sch (s,exA) (t,exB)))) =    
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   395
      Zip$(Filter (%a. a:act A)$sch)$(Map snd$exA)"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   396
apply (tactic {* mkex_induct_tac "sch" "exB" "exA" *})
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   397
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   398
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   399
(*---------------------------------------------------------------------------
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   400
                      zip$(proj1$y)$(proj2$y) = y   (using the lift operations)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   401
                    lemma for admissibility problems
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   402
  --------------------------------------------------------------------------- *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   403
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   404
lemma Zip_Map_fst_snd: "Zip$(Map fst$y)$(Map snd$y) = y"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   405
apply (tactic {* Seq_induct_tac "y" [] 1 *})
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   406
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   407
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   408
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   409
(*---------------------------------------------------------------------------
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   410
      filter A$sch = proj1$ex   -->  zip$(filter A$sch)$(proj2$ex) = ex
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   411
         lemma for eliminating non admissible equations in assumptions
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   412
  --------------------------------------------------------------------------- *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   413
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   414
lemma trick_against_eq_in_ass: "!! sch ex.  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   415
  Filter (%a. a:act AB)$sch = filter_act$ex   
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   416
  ==> ex = Zip$(Filter (%a. a:act AB)$sch)$(Map snd$ex)"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   417
apply (simp add: filter_act_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   418
apply (rule Zip_Map_fst_snd [symmetric])
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   419
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   420
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   421
(*---------------------------------------------------------------------------
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   422
     Filter of mkex(sch,exA,exB) to A after projection onto A is exA
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   423
                       using the above trick
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   424
  --------------------------------------------------------------------------- *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   425
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   426
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   427
lemma filter_mkex_is_exA: "!!sch exA exB. 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   428
  [| Forall (%a. a:act (A||B)) sch ;  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   429
  Filter (%a. a:act A)$sch = filter_act$(snd exA)  ; 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   430
  Filter (%a. a:act B)$sch = filter_act$(snd exB) |] 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   431
  ==> Filter_ex (asig_of A) (ProjA (mkex A B sch exA exB)) = exA"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   432
apply (simp add: ProjA_def Filter_ex_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   433
apply (tactic {* pair_tac "exA" 1 *})
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   434
apply (tactic {* pair_tac "exB" 1 *})
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   435
apply (rule conjI)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   436
apply (simp (no_asm) add: mkex_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   437
apply (simplesubst trick_against_eq_in_ass)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   438
back
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   439
apply assumption
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   440
apply (simp add: filter_mkex_is_exA_tmp)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   441
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   442
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   443
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   444
(*---------------------------------------------------------------------------
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   445
     Filter of mkex(sch,exA,exB) to B after projection onto B is exB
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   446
        --  using zip$(proj1$exB)$(proj2$exB) instead of exB    --
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   447
        --           because of admissibility problems          --
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   448
                             structural induction
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   449
  --------------------------------------------------------------------------- *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   450
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   451
lemma filter_mkex_is_exB_tmp: "! exA exB s t.  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   452
  Forall (%x. x:act (A||B)) sch &  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   453
  Filter (%a. a:act A)$sch << filter_act$exA  & 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   454
  Filter (%a. a:act B)$sch << filter_act$exB  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   455
  --> Filter_ex2 (asig_of B)$(ProjB2$(snd (mkex A B sch (s,exA) (t,exB)))) =    
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   456
      Zip$(Filter (%a. a:act B)$sch)$(Map snd$exB)"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   457
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   458
(* notice necessary change of arguments exA and exB *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   459
apply (tactic {* mkex_induct_tac "sch" "exA" "exB" *})
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   460
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   461
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   462
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   463
(*---------------------------------------------------------------------------
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   464
     Filter of mkex(sch,exA,exB) to A after projection onto B is exB
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   465
                       using the above trick
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   466
  --------------------------------------------------------------------------- *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   467
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   468
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   469
lemma filter_mkex_is_exB: "!!sch exA exB. 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   470
  [| Forall (%a. a:act (A||B)) sch ;  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   471
  Filter (%a. a:act A)$sch = filter_act$(snd exA)  ; 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   472
  Filter (%a. a:act B)$sch = filter_act$(snd exB) |] 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   473
  ==> Filter_ex (asig_of B) (ProjB (mkex A B sch exA exB)) = exB"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   474
apply (simp add: ProjB_def Filter_ex_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   475
apply (tactic {* pair_tac "exA" 1 *})
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   476
apply (tactic {* pair_tac "exB" 1 *})
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   477
apply (rule conjI)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   478
apply (simp (no_asm) add: mkex_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   479
apply (simplesubst trick_against_eq_in_ass)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   480
back
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   481
apply assumption
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   482
apply (simp add: filter_mkex_is_exB_tmp)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   483
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   484
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   485
(* --------------------------------------------------------------------- *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   486
(*                    mkex has only  A- or B-actions                    *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   487
(* --------------------------------------------------------------------- *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   488
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   489
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   490
lemma mkex_actions_in_AorB: "!s t exA exB.  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   491
  Forall (%x. x : act (A || B)) sch & 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   492
  Filter (%a. a:act A)$sch << filter_act$exA  & 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   493
  Filter (%a. a:act B)$sch << filter_act$exB  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   494
   --> Forall (%x. fst x : act (A ||B))    
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   495
         (snd (mkex A B sch (s,exA) (t,exB)))"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   496
apply (tactic {* mkex_induct_tac "sch" "exA" "exB" *})
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   497
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   498
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   499
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   500
(* ------------------------------------------------------------------ *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   501
(*           COMPOSITIONALITY   on    SCHEDULE      Level             *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   502
(*                          Main Theorem                              *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   503
(* ------------------------------------------------------------------ *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   504
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   505
lemma compositionality_sch: 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   506
"(sch : schedules (A||B)) =  
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   507
  (Filter (%a. a:act A)$sch : schedules A & 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   508
   Filter (%a. a:act B)$sch : schedules B & 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   509
   Forall (%x. x:act (A||B)) sch)"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   510
apply (simp (no_asm) add: schedules_def has_schedule_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   511
apply (tactic "safe_tac set_cs")
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   512
(* ==> *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   513
apply (rule_tac x = "Filter_ex (asig_of A) (ProjA ex) " in bexI)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   514
prefer 2
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   515
apply (simp add: compositionality_ex)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   516
apply (simp (no_asm) add: Filter_ex_def ProjA_def lemma_2_1a lemma_2_1b)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   517
apply (rule_tac x = "Filter_ex (asig_of B) (ProjB ex) " in bexI)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   518
prefer 2
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   519
apply (simp add: compositionality_ex)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   520
apply (simp (no_asm) add: Filter_ex_def ProjB_def lemma_2_1a lemma_2_1b)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   521
apply (simp add: executions_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   522
apply (tactic {* pair_tac "ex" 1 *})
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   523
apply (erule conjE)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   524
apply (simp add: sch_actions_in_AorB)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   525
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   526
(* <== *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   527
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   528
(* mkex is exactly the construction of exA||B out of exA, exB, and the oracle sch,
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   529
   we need here *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   530
apply (rename_tac exA exB)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   531
apply (rule_tac x = "mkex A B sch exA exB" in bexI)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   532
(* mkex actions are just the oracle *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   533
apply (tactic {* pair_tac "exA" 1 *})
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   534
apply (tactic {* pair_tac "exB" 1 *})
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   535
apply (simp add: Mapfst_mkex_is_sch)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   536
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   537
(* mkex is an execution -- use compositionality on ex-level *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   538
apply (simp add: compositionality_ex)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   539
apply (simp add: stutter_mkex_on_A stutter_mkex_on_B filter_mkex_is_exB filter_mkex_is_exA)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   540
apply (tactic {* pair_tac "exA" 1 *})
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   541
apply (tactic {* pair_tac "exB" 1 *})
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   542
apply (simp add: mkex_actions_in_AorB)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   543
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   544
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   545
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   546
subsection {* COMPOSITIONALITY on SCHEDULE Level -- for Modules *}
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   547
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   548
lemma compositionality_sch_modules: 
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   549
  "Scheds (A||B) = par_scheds (Scheds A) (Scheds B)"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   550
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   551
apply (unfold Scheds_def par_scheds_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   552
apply (simp add: asig_of_par)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   553
apply (rule set_ext)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   554
apply (simp add: compositionality_sch actions_of_par)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   555
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   556
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   557
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   558
declare compoex_simps [simp del]
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   559
declare composch_simps [simp del]
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   560
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   561
end