src/HOL/HOLCF/IOA/meta_theory/Abstraction.thy
author huffman
Sat, 27 Nov 2010 16:08:10 -0800
changeset 40774 0437dbc127b3
parent 37785 src/HOLCF/IOA/meta_theory/Abstraction.thy@173667d73115
child 40945 b8703f63bfb2
permissions -rw-r--r--
moved directory src/HOLCF to src/HOL/HOLCF; added HOLCF theories to src/HOL/IsaMakefile;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
     1
(*  Title:      HOLCF/IOA/meta_theory/Abstraction.thy
12218
wenzelm
parents: 10835
diff changeset
     2
    Author:     Olaf Müller
17233
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
     3
*)
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
     4
17233
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
     5
header {* Abstraction Theory -- tailored for I/O automata *}
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
     6
17233
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
     7
theory Abstraction
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
     8
imports LiveIOA
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
     9
begin
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    10
36452
d37c6eed8117 renamed command 'defaultsort' to 'default_sort';
wenzelm
parents: 32149
diff changeset
    11
default_sort type
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    12
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    13
definition
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    14
  cex_abs :: "('s1 => 's2) => ('a,'s1)execution => ('a,'s2)execution" where
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    15
  "cex_abs f ex = (f (fst ex), Map (%(a,t). (a,f t))$(snd ex))"
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    16
definition
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    17
  -- {* equals cex_abs on Sequences -- after ex2seq application *}
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    18
  cex_absSeq :: "('s1 => 's2) => ('a option,'s1)transition Seq => ('a option,'s2)transition Seq" where
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    19
  "cex_absSeq f = (%s. Map (%(s,a,t). (f s,a,f t))$s)"
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    20
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    21
definition
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    22
  is_abstraction ::"[('s1=>'s2),('a,'s1)ioa,('a,'s2)ioa] => bool" where
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    23
  "is_abstraction f C A =
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    24
   ((!s:starts_of(C). f(s):starts_of(A)) &
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    25
   (!s t a. reachable C s & s -a--C-> t
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    26
            --> (f s) -a--A-> (f t)))"
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    27
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    28
definition
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    29
  weakeningIOA :: "('a,'s2)ioa => ('a,'s1)ioa => ('s1 => 's2) => bool" where
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    30
  "weakeningIOA A C h = (!ex. ex : executions C --> cex_abs h ex : executions A)"
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    31
definition
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    32
  temp_strengthening :: "('a,'s2)ioa_temp => ('a,'s1)ioa_temp => ('s1 => 's2) => bool" where
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    33
  "temp_strengthening Q P h = (!ex. (cex_abs h ex |== Q) --> (ex |== P))"
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    34
definition
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    35
  temp_weakening :: "('a,'s2)ioa_temp => ('a,'s1)ioa_temp => ('s1 => 's2) => bool" where
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    36
  "temp_weakening Q P h = temp_strengthening (.~ Q) (.~ P) h"
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    37
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    38
definition
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    39
  state_strengthening :: "('a,'s2)step_pred => ('a,'s1)step_pred => ('s1 => 's2) => bool" where
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    40
  "state_strengthening Q P h = (!s t a.  Q (h(s),a,h(t)) --> P (s,a,t))"
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    41
definition
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    42
  state_weakening :: "('a,'s2)step_pred => ('a,'s1)step_pred => ('s1 => 's2) => bool" where
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    43
  "state_weakening Q P h = state_strengthening (.~Q) (.~P) h"
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    44
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    45
definition
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    46
  is_live_abstraction :: "('s1 => 's2) => ('a,'s1)live_ioa => ('a,'s2)live_ioa => bool" where
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    47
  "is_live_abstraction h CL AM =
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    48
     (is_abstraction h (fst CL) (fst AM) &
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    49
      temp_weakening (snd AM) (snd CL) h)"
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    50
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    51
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    52
axiomatization where
4577
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
    53
(* thm about ex2seq which is not provable by induction as ex2seq is not continous *)
17233
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    54
ex2seq_abs_cex:
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    55
  "ex2seq (cex_abs h ex) = cex_absSeq h (ex2seq ex)"
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    56
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    57
axiomatization where
5976
44290b71a85f tuning to assimiliate it with PhD;
mueller
parents: 4816
diff changeset
    58
(* analog to the proved thm strength_Box - proof skipped as trivial *)
17233
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    59
weak_Box:
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    60
"temp_weakening P Q h
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    61
 ==> temp_weakening ([] P) ([] Q) h"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    62
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    63
axiomatization where
5976
44290b71a85f tuning to assimiliate it with PhD;
mueller
parents: 4816
diff changeset
    64
(* analog to the proved thm strength_Next - proof skipped as trivial *)
17233
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    65
weak_Next:
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    66
"temp_weakening P Q h
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    67
 ==> temp_weakening (Next P) (Next Q) h"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    68
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    69
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    70
subsection "cex_abs"
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    71
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    72
lemma cex_abs_UU: "cex_abs f (s,UU) = (f s, UU)"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    73
  by (simp add: cex_abs_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    74
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    75
lemma cex_abs_nil: "cex_abs f (s,nil) = (f s, nil)"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    76
  by (simp add: cex_abs_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    77
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    78
lemma cex_abs_cons: "cex_abs f (s,(a,t)>>ex) = (f s, (a,f t) >> (snd (cex_abs f (t,ex))))"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    79
  by (simp add: cex_abs_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    80
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    81
declare cex_abs_UU [simp] cex_abs_nil [simp] cex_abs_cons [simp]
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    82
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    83
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    84
subsection "lemmas"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    85
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    86
lemma temp_weakening_def2: "temp_weakening Q P h = (! ex. (ex |== P) --> (cex_abs h ex |== Q))"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    87
  apply (simp add: temp_weakening_def temp_strengthening_def NOT_def temp_sat_def satisfies_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    88
  apply auto
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    89
  done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    90
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    91
lemma state_weakening_def2: "state_weakening Q P h = (! s t a. P (s,a,t) --> Q (h(s),a,h(t)))"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    92
  apply (simp add: state_weakening_def state_strengthening_def NOT_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    93
  apply auto
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    94
  done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    95
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    96
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    97
subsection "Abstraction Rules for Properties"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    98
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
    99
lemma exec_frag_abstraction [rule_format]:
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   100
 "[| is_abstraction h C A |] ==>
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   101
  !s. reachable C s & is_exec_frag C (s,xs)
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   102
  --> is_exec_frag A (cex_abs h (s,xs))"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   103
apply (unfold cex_abs_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   104
apply simp
27208
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   105
apply (tactic {* pair_induct_tac @{context} "xs" [@{thm is_exec_frag_def}] 1 *})
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   106
txt {* main case *}
26359
6d437bde2f1d more antiquotations
haftmann
parents: 25135
diff changeset
   107
apply (auto dest: reachable.reachable_n simp add: is_abstraction_def)
19741
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
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   111
lemma abs_is_weakening: "is_abstraction h C A ==> weakeningIOA A C h"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   112
apply (simp add: weakeningIOA_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   113
apply auto
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   114
apply (simp add: executions_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   115
txt {* start state *}
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   116
apply (rule conjI)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   117
apply (simp add: is_abstraction_def cex_abs_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   118
txt {* is-execution-fragment *}
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   119
apply (erule exec_frag_abstraction)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   120
apply (simp add: reachable.reachable_0)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   121
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   122
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   123
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   124
lemma AbsRuleT1: "[|is_abstraction h C A; validIOA A Q; temp_strengthening Q P h |]
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   125
          ==> validIOA C P"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   126
apply (drule abs_is_weakening)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   127
apply (simp add: weakeningIOA_def validIOA_def temp_strengthening_def)
26359
6d437bde2f1d more antiquotations
haftmann
parents: 25135
diff changeset
   128
apply (auto simp add: split_paired_all)
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   129
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   130
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   131
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   132
(* FIX: Nach TLS.ML *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   133
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   134
lemma IMPLIES_temp_sat: "(ex |== P .--> Q) = ((ex |== P) --> (ex |== Q))"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   135
  by (simp add: IMPLIES_def temp_sat_def satisfies_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   136
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   137
lemma AND_temp_sat: "(ex |== P .& Q) = ((ex |== P) & (ex |== Q))"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   138
  by (simp add: AND_def temp_sat_def satisfies_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   139
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   140
lemma OR_temp_sat: "(ex |== P .| Q) = ((ex |== P) | (ex |== Q))"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   141
  by (simp add: OR_def temp_sat_def satisfies_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   142
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   143
lemma NOT_temp_sat: "(ex |== .~ P) = (~ (ex |== P))"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   144
  by (simp add: NOT_def temp_sat_def satisfies_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   145
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   146
declare IMPLIES_temp_sat [simp] AND_temp_sat [simp] OR_temp_sat [simp] NOT_temp_sat [simp]
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   147
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   148
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   149
lemma AbsRuleT2:
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   150
   "[|is_live_abstraction h (C,L) (A,M);
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   151
          validLIOA (A,M) Q;  temp_strengthening Q P h |]
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   152
          ==> validLIOA (C,L) P"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   153
apply (unfold is_live_abstraction_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   154
apply auto
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   155
apply (drule abs_is_weakening)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   156
apply (simp add: weakeningIOA_def temp_weakening_def2 validLIOA_def validIOA_def temp_strengthening_def)
26359
6d437bde2f1d more antiquotations
haftmann
parents: 25135
diff changeset
   157
apply (auto simp add: split_paired_all)
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   158
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   159
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   160
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   161
lemma AbsRuleTImprove:
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   162
   "[|is_live_abstraction h (C,L) (A,M);
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   163
          validLIOA (A,M) (H1 .--> Q);  temp_strengthening Q P h;
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   164
          temp_weakening H1 H2 h; validLIOA (C,L) H2 |]
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   165
          ==> validLIOA (C,L) P"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   166
apply (unfold is_live_abstraction_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   167
apply auto
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   168
apply (drule abs_is_weakening)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   169
apply (simp add: weakeningIOA_def temp_weakening_def2 validLIOA_def validIOA_def temp_strengthening_def)
26359
6d437bde2f1d more antiquotations
haftmann
parents: 25135
diff changeset
   170
apply (auto simp add: split_paired_all)
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   171
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   172
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   173
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   174
subsection "Correctness of safe abstraction"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   175
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   176
lemma abstraction_is_ref_map:
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   177
"is_abstraction h C A ==> is_ref_map h C A"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   178
apply (unfold is_abstraction_def is_ref_map_def)
26359
6d437bde2f1d more antiquotations
haftmann
parents: 25135
diff changeset
   179
apply auto
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   180
apply (rule_tac x = "(a,h t) >>nil" in exI)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   181
apply (simp add: move_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   182
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   183
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   184
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   185
lemma abs_safety: "[| inp(C)=inp(A); out(C)=out(A);
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   186
                   is_abstraction h C A |]
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   187
                ==> C =<| A"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   188
apply (simp add: ioa_implements_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   189
apply (rule trace_inclusion)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   190
apply (simp (no_asm) add: externals_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   191
apply (auto)[1]
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   192
apply (erule abstraction_is_ref_map)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   193
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   194
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   195
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   196
subsection "Correctness of life abstraction"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   197
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   198
(* Reduces to Filter (Map fst x) = Filter (Map fst (Map (%(a,t). (a,x)) x),
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   199
   that is to special Map Lemma *)
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   200
lemma traces_coincide_abs:
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   201
  "ext C = ext A
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   202
         ==> mk_trace C$xs = mk_trace A$(snd (cex_abs f (s,xs)))"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   203
apply (unfold cex_abs_def mk_trace_def filter_act_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   204
apply simp
27208
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   205
apply (tactic {* pair_induct_tac @{context} "xs" [] 1 *})
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   206
done
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
(* Does not work with abstraction_is_ref_map as proof of abs_safety, because
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   210
   is_live_abstraction includes temp_strengthening which is necessarily based
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   211
   on cex_abs and not on corresp_ex. Thus, the proof is redoone in a more specific
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   212
   way for cex_abs *)
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   213
lemma abs_liveness: "[| inp(C)=inp(A); out(C)=out(A);
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   214
                   is_live_abstraction h (C,M) (A,L) |]
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   215
                ==> live_implements (C,M) (A,L)"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   216
apply (simp add: is_live_abstraction_def live_implements_def livetraces_def liveexecutions_def)
26359
6d437bde2f1d more antiquotations
haftmann
parents: 25135
diff changeset
   217
apply auto
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   218
apply (rule_tac x = "cex_abs h ex" in exI)
26359
6d437bde2f1d more antiquotations
haftmann
parents: 25135
diff changeset
   219
apply auto
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   220
  (* Traces coincide *)
27208
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   221
  apply (tactic {* pair_tac @{context} "ex" 1 *})
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   222
  apply (rule traces_coincide_abs)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   223
  apply (simp (no_asm) add: externals_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   224
  apply (auto)[1]
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   225
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   226
  (* cex_abs is execution *)
27208
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   227
  apply (tactic {* pair_tac @{context} "ex" 1 *})
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   228
  apply (simp add: executions_def)
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   229
  (* start state *)
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   230
  apply (rule conjI)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   231
  apply (simp add: is_abstraction_def cex_abs_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   232
  (* is-execution-fragment *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   233
  apply (erule exec_frag_abstraction)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   234
  apply (simp add: reachable.reachable_0)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   235
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   236
 (* Liveness *)
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   237
apply (simp add: temp_weakening_def2)
27208
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   238
 apply (tactic {* pair_tac @{context} "ex" 1 *})
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   239
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   240
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   241
(* FIX: NAch Traces.ML bringen *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   242
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   243
lemma implements_trans:
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   244
"[| A =<| B; B =<| C|] ==> A =<| C"
26359
6d437bde2f1d more antiquotations
haftmann
parents: 25135
diff changeset
   245
by (auto simp add: ioa_implements_def)
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   246
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   247
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   248
subsection "Abstraction Rules for Automata"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   249
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   250
lemma AbsRuleA1: "[| inp(C)=inp(A); out(C)=out(A);
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   251
                   inp(Q)=inp(P); out(Q)=out(P);
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   252
                   is_abstraction h1 C A;
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   253
                   A =<| Q ;
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   254
                   is_abstraction h2 Q P |]
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   255
                ==> C =<| P"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   256
apply (drule abs_safety)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   257
apply assumption+
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   258
apply (drule abs_safety)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   259
apply assumption+
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   260
apply (erule implements_trans)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   261
apply (erule implements_trans)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   262
apply assumption
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   263
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   264
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   265
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   266
lemma AbsRuleA2: "!!LC. [| inp(C)=inp(A); out(C)=out(A);
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   267
                   inp(Q)=inp(P); out(Q)=out(P);
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   268
                   is_live_abstraction h1 (C,LC) (A,LA);
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   269
                   live_implements (A,LA) (Q,LQ) ;
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   270
                   is_live_abstraction h2 (Q,LQ) (P,LP) |]
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   271
                ==> live_implements (C,LC) (P,LP)"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   272
apply (drule abs_liveness)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   273
apply assumption+
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   274
apply (drule abs_liveness)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   275
apply assumption+
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   276
apply (erule live_implements_trans)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   277
apply (erule live_implements_trans)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   278
apply assumption
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   279
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   280
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   281
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   282
declare split_paired_All [simp del]
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   283
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   284
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   285
subsection "Localizing Temporal Strengthenings and Weakenings"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   286
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   287
lemma strength_AND:
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   288
"[| temp_strengthening P1 Q1 h;
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   289
          temp_strengthening P2 Q2 h |]
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   290
       ==> temp_strengthening (P1 .& P2) (Q1 .& Q2) h"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   291
apply (unfold temp_strengthening_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   292
apply auto
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   293
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   294
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   295
lemma strength_OR:
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   296
"[| temp_strengthening P1 Q1 h;
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   297
          temp_strengthening P2 Q2 h |]
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   298
       ==> temp_strengthening (P1 .| P2) (Q1 .| Q2) h"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   299
apply (unfold temp_strengthening_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   300
apply auto
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   301
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   302
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   303
lemma strength_NOT:
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   304
"[| temp_weakening P Q h |]
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   305
       ==> temp_strengthening (.~ P) (.~ Q) h"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   306
apply (unfold temp_strengthening_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   307
apply (simp add: temp_weakening_def2)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   308
apply auto
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   309
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   310
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   311
lemma strength_IMPLIES:
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   312
"[| temp_weakening P1 Q1 h;
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   313
          temp_strengthening P2 Q2 h |]
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   314
       ==> temp_strengthening (P1 .--> P2) (Q1 .--> Q2) h"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   315
apply (unfold temp_strengthening_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   316
apply (simp add: temp_weakening_def2)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   317
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   318
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   319
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   320
lemma weak_AND:
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   321
"[| temp_weakening P1 Q1 h;
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   322
          temp_weakening P2 Q2 h |]
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   323
       ==> temp_weakening (P1 .& P2) (Q1 .& Q2) h"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   324
apply (simp add: temp_weakening_def2)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   325
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   326
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   327
lemma weak_OR:
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   328
"[| temp_weakening P1 Q1 h;
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   329
          temp_weakening P2 Q2 h |]
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   330
       ==> temp_weakening (P1 .| P2) (Q1 .| Q2) h"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   331
apply (simp add: temp_weakening_def2)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   332
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   333
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   334
lemma weak_NOT:
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   335
"[| temp_strengthening P Q h |]
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   336
       ==> temp_weakening (.~ P) (.~ Q) h"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   337
apply (unfold temp_strengthening_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   338
apply (simp add: temp_weakening_def2)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   339
apply auto
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   340
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   341
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   342
lemma weak_IMPLIES:
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   343
"[| temp_strengthening P1 Q1 h;
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   344
          temp_weakening P2 Q2 h |]
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   345
       ==> temp_weakening (P1 .--> P2) (Q1 .--> Q2) h"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   346
apply (unfold temp_strengthening_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   347
apply (simp add: temp_weakening_def2)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   348
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   349
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   350
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   351
subsubsection {* Box *}
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   352
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   353
(* FIX: should be same as nil_is_Conc2 when all nils are turned to right side !! *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   354
lemma UU_is_Conc: "(UU = x @@ y) = (((x::'a Seq)= UU) | (x=nil & y=UU))"
27208
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   355
apply (tactic {* Seq_case_simp_tac @{context} "x" 1 *})
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   356
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   357
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   358
lemma ex2seqConc [rule_format]:
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   359
"Finite s1 -->
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   360
  (! ex. (s~=nil & s~=UU & ex2seq ex = s1 @@ s) --> (? ex'. s = ex2seq ex'))"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   361
apply (rule impI)
27208
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   362
apply (tactic {* Seq_Finite_induct_tac @{context} 1 *})
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   363
apply blast
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   364
(* main case *)
26359
6d437bde2f1d more antiquotations
haftmann
parents: 25135
diff changeset
   365
apply clarify
27208
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   366
apply (tactic {* pair_tac @{context} "ex" 1 *})
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   367
apply (tactic {* Seq_case_simp_tac @{context} "y" 1 *})
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   368
(* UU case *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   369
apply (simp add: nil_is_Conc)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   370
(* nil case *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   371
apply (simp add: nil_is_Conc)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   372
(* cons case *)
27208
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   373
apply (tactic {* pair_tac @{context} "aa" 1 *})
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   374
apply auto
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   375
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   376
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   377
(* important property of ex2seq: can be shiftet, as defined "pointwise" *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   378
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   379
lemma ex2seq_tsuffix:
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   380
"tsuffix s (ex2seq ex) ==> ? ex'. s = (ex2seq ex')"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   381
apply (unfold tsuffix_def suffix_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   382
apply auto
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   383
apply (drule ex2seqConc)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   384
apply auto
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   385
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   386
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   387
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   388
(* FIX: NAch Sequence.ML bringen *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   389
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   390
lemma Mapnil: "(Map f$s = nil) = (s=nil)"
27208
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   391
apply (tactic {* Seq_case_simp_tac @{context} "s" 1 *})
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   392
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   393
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   394
lemma MapUU: "(Map f$s = UU) = (s=UU)"
27208
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   395
apply (tactic {* Seq_case_simp_tac @{context} "s" 1 *})
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   396
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   397
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   398
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   399
(* important property of cex_absSeq: As it is a 1to1 correspondence,
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   400
  properties carry over *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   401
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   402
lemma cex_absSeq_tsuffix:
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   403
"tsuffix s t ==> tsuffix (cex_absSeq h s) (cex_absSeq h t)"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   404
apply (unfold tsuffix_def suffix_def cex_absSeq_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   405
apply auto
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   406
apply (simp add: Mapnil)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   407
apply (simp add: MapUU)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   408
apply (rule_tac x = "Map (% (s,a,t) . (h s,a, h t))$s1" in exI)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   409
apply (simp add: Map2Finite MapConc)
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
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   413
lemma strength_Box:
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   414
"[| temp_strengthening P Q h |]
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   415
       ==> temp_strengthening ([] P) ([] Q) h"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   416
apply (unfold temp_strengthening_def state_strengthening_def temp_sat_def satisfies_def Box_def)
26359
6d437bde2f1d more antiquotations
haftmann
parents: 25135
diff changeset
   417
apply clarify
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   418
apply (frule ex2seq_tsuffix)
26359
6d437bde2f1d more antiquotations
haftmann
parents: 25135
diff changeset
   419
apply clarify
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   420
apply (drule_tac h = "h" in cex_absSeq_tsuffix)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   421
apply (simp add: ex2seq_abs_cex)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   422
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   423
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   424
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   425
subsubsection {* Init *}
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   426
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   427
lemma strength_Init:
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   428
"[| state_strengthening P Q h |]
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   429
       ==> temp_strengthening (Init P) (Init Q) h"
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   430
apply (unfold temp_strengthening_def state_strengthening_def
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   431
  temp_sat_def satisfies_def Init_def unlift_def)
26359
6d437bde2f1d more antiquotations
haftmann
parents: 25135
diff changeset
   432
apply auto
27208
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   433
apply (tactic {* pair_tac @{context} "ex" 1 *})
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   434
apply (tactic {* Seq_case_simp_tac @{context} "y" 1 *})
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   435
apply (tactic {* pair_tac @{context} "a" 1 *})
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   436
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   437
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   438
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   439
subsubsection {* Next *}
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   440
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   441
lemma TL_ex2seq_UU:
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   442
"(TL$(ex2seq (cex_abs h ex))=UU) = (TL$(ex2seq ex)=UU)"
27208
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   443
apply (tactic {* pair_tac @{context} "ex" 1 *})
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   444
apply (tactic {* Seq_case_simp_tac @{context} "y" 1 *})
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   445
apply (tactic {* pair_tac @{context} "a" 1 *})
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   446
apply (tactic {* Seq_case_simp_tac @{context} "s" 1 *})
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   447
apply (tactic {* pair_tac @{context} "a" 1 *})
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   448
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   449
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   450
lemma TL_ex2seq_nil:
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   451
"(TL$(ex2seq (cex_abs h ex))=nil) = (TL$(ex2seq ex)=nil)"
27208
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   452
apply (tactic {* pair_tac @{context} "ex" 1 *})
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   453
apply (tactic {* Seq_case_simp_tac @{context} "y" 1 *})
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   454
apply (tactic {* pair_tac @{context} "a" 1 *})
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   455
apply (tactic {* Seq_case_simp_tac @{context} "s" 1 *})
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   456
apply (tactic {* pair_tac @{context} "a" 1 *})
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   457
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   458
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   459
(* FIX: put to Sequence Lemmas *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   460
lemma MapTL: "Map f$(TL$s) = TL$(Map f$s)"
27208
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   461
apply (tactic {* Seq_induct_tac @{context} "s" [] 1 *})
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   462
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   463
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   464
(* important property of cex_absSeq: As it is a 1to1 correspondence,
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   465
  properties carry over *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   466
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   467
lemma cex_absSeq_TL:
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   468
"cex_absSeq h (TL$s) = (TL$(cex_absSeq h s))"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   469
apply (unfold cex_absSeq_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   470
apply (simp add: MapTL)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   471
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   472
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   473
(* important property of ex2seq: can be shiftet, as defined "pointwise" *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   474
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   475
lemma TLex2seq: "[| (snd ex)~=UU ; (snd ex)~=nil |] ==> (? ex'. TL$(ex2seq ex) = ex2seq ex')"
27208
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   476
apply (tactic {* pair_tac @{context} "ex" 1 *})
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   477
apply (tactic {* Seq_case_simp_tac @{context} "y" 1 *})
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   478
apply (tactic {* pair_tac @{context} "a" 1 *})
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   479
apply auto
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   480
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   481
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   482
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   483
lemma ex2seqnilTL: "(TL$(ex2seq ex)~=nil) = ((snd ex)~=nil & (snd ex)~=UU)"
27208
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   484
apply (tactic {* pair_tac @{context} "ex" 1 *})
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   485
apply (tactic {* Seq_case_simp_tac @{context} "y" 1 *})
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   486
apply (tactic {* pair_tac @{context} "a" 1 *})
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   487
apply (tactic {* Seq_case_simp_tac @{context} "s" 1 *})
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   488
apply (tactic {* pair_tac @{context} "a" 1 *})
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   489
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   490
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   491
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   492
lemma strength_Next:
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   493
"[| temp_strengthening P Q h |]
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   494
       ==> temp_strengthening (Next P) (Next Q) h"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   495
apply (unfold temp_strengthening_def state_strengthening_def temp_sat_def satisfies_def Next_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   496
apply simp
26359
6d437bde2f1d more antiquotations
haftmann
parents: 25135
diff changeset
   497
apply auto
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   498
apply (simp add: TL_ex2seq_nil TL_ex2seq_UU)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   499
apply (simp add: TL_ex2seq_nil TL_ex2seq_UU)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   500
apply (simp add: TL_ex2seq_nil TL_ex2seq_UU)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   501
apply (simp add: TL_ex2seq_nil TL_ex2seq_UU)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   502
(* cons case *)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   503
apply (simp add: TL_ex2seq_nil TL_ex2seq_UU ex2seq_abs_cex cex_absSeq_TL [symmetric] ex2seqnilTL)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   504
apply (erule conjE)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   505
apply (drule TLex2seq)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   506
apply assumption
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   507
apply auto
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   508
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   509
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   510
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   511
text {* Localizing Temporal Weakenings     - 2 *}
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   512
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   513
lemma weak_Init:
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   514
"[| state_weakening P Q h |]
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   515
       ==> temp_weakening (Init P) (Init Q) h"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   516
apply (simp add: temp_weakening_def2 state_weakening_def2
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   517
  temp_sat_def satisfies_def Init_def unlift_def)
26359
6d437bde2f1d more antiquotations
haftmann
parents: 25135
diff changeset
   518
apply auto
27208
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   519
apply (tactic {* pair_tac @{context} "ex" 1 *})
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   520
apply (tactic {* Seq_case_simp_tac @{context} "y" 1 *})
5fe899199f85 proper context for tactics derived from res_inst_tac;
wenzelm
parents: 26359
diff changeset
   521
apply (tactic {* pair_tac @{context} "a" 1 *})
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   522
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   523
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   524
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   525
text {* Localizing Temproal Strengthenings - 3 *}
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   526
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   527
lemma strength_Diamond:
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   528
"[| temp_strengthening P Q h |]
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   529
       ==> temp_strengthening (<> P) (<> Q) h"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   530
apply (unfold Diamond_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   531
apply (rule strength_NOT)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   532
apply (rule weak_Box)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   533
apply (erule weak_NOT)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   534
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   535
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   536
lemma strength_Leadsto:
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   537
"[| temp_weakening P1 P2 h;
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   538
          temp_strengthening Q1 Q2 h |]
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   539
       ==> temp_strengthening (P1 ~> Q1) (P2 ~> Q2) h"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   540
apply (unfold Leadsto_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   541
apply (rule strength_Box)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   542
apply (erule strength_IMPLIES)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   543
apply (erule strength_Diamond)
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
text {* Localizing Temporal Weakenings - 3 *}
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   548
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   549
lemma weak_Diamond:
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   550
"[| temp_weakening P Q h |]
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   551
       ==> temp_weakening (<> P) (<> Q) h"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   552
apply (unfold Diamond_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   553
apply (rule weak_NOT)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   554
apply (rule strength_Box)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   555
apply (erule strength_NOT)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   556
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   557
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   558
lemma weak_Leadsto:
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   559
"[| temp_strengthening P1 P2 h;
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   560
          temp_weakening Q1 Q2 h |]
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   561
       ==> temp_weakening (P1 ~> Q1) (P2 ~> Q2) h"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   562
apply (unfold Leadsto_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   563
apply (rule weak_Box)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   564
apply (erule weak_IMPLIES)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   565
apply (erule weak_Diamond)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   566
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   567
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   568
lemma weak_WF:
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   569
  " !!A. [| !! s. Enabled A acts (h s) ==> Enabled C acts s|]
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   570
    ==> temp_weakening (WF A acts) (WF C acts) h"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   571
apply (unfold WF_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   572
apply (rule weak_IMPLIES)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   573
apply (rule strength_Diamond)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   574
apply (rule strength_Box)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   575
apply (rule strength_Init)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   576
apply (rule_tac [2] weak_Box)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   577
apply (rule_tac [2] weak_Diamond)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   578
apply (rule_tac [2] weak_Init)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   579
apply (auto simp add: state_weakening_def state_strengthening_def
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   580
  xt2_def plift_def option_lift_def NOT_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   581
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   582
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   583
lemma weak_SF:
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 23560
diff changeset
   584
  " !!A. [| !! s. Enabled A acts (h s) ==> Enabled C acts s|]
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   585
    ==> temp_weakening (SF A acts) (SF C acts) h"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   586
apply (unfold SF_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   587
apply (rule weak_IMPLIES)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   588
apply (rule strength_Box)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   589
apply (rule strength_Diamond)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   590
apply (rule strength_Init)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   591
apply (rule_tac [2] weak_Box)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   592
apply (rule_tac [2] weak_Diamond)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   593
apply (rule_tac [2] weak_Init)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   594
apply (auto simp add: state_weakening_def state_strengthening_def
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   595
  xt2_def plift_def option_lift_def NOT_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   596
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   597
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   598
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   599
lemmas weak_strength_lemmas =
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   600
  weak_OR weak_AND weak_NOT weak_IMPLIES weak_Box weak_Next weak_Init
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   601
  weak_Diamond weak_Leadsto strength_OR strength_AND strength_NOT
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   602
  strength_IMPLIES strength_Box strength_Next strength_Init
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   603
  strength_Diamond strength_Leadsto weak_WF weak_SF
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   604
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   605
ML {*
30607
c3d1590debd8 eliminated global SIMPSET, CLASET etc. -- refer to explicit context;
wenzelm
parents: 27208
diff changeset
   606
fun abstraction_tac ctxt =
32149
ef59550a55d3 renamed simpset_of to global_simpset_of, and local_simpset_of to simpset_of -- same for claset and clasimpset;
wenzelm
parents: 31773
diff changeset
   607
  let val (cs, ss) = clasimpset_of ctxt in
30607
c3d1590debd8 eliminated global SIMPSET, CLASET etc. -- refer to explicit context;
wenzelm
parents: 27208
diff changeset
   608
    SELECT_GOAL (auto_tac (cs addSIs @{thms weak_strength_lemmas},
c3d1590debd8 eliminated global SIMPSET, CLASET etc. -- refer to explicit context;
wenzelm
parents: 27208
diff changeset
   609
        ss addsimps [@{thm state_strengthening_def}, @{thm state_weakening_def}]))
c3d1590debd8 eliminated global SIMPSET, CLASET etc. -- refer to explicit context;
wenzelm
parents: 27208
diff changeset
   610
  end
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
   611
*}
17233
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
   612
30607
c3d1590debd8 eliminated global SIMPSET, CLASET etc. -- refer to explicit context;
wenzelm
parents: 27208
diff changeset
   613
method_setup abstraction = {* Scan.succeed (SIMPLE_METHOD' o abstraction_tac) *} ""
c3d1590debd8 eliminated global SIMPSET, CLASET etc. -- refer to explicit context;
wenzelm
parents: 27208
diff changeset
   614
17233
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
   615
end