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