src/HOLCF/IOA/meta_theory/Abstraction.ML
author nipkow
Tue, 10 Mar 1998 19:15:00 +0100
changeset 4725 7edba45a6998
parent 4577 674b0b354feb
child 4833 2e53109d4bc8
permissions -rw-r--r--
Updated proofs because of new simplifier.
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
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
     2
    ID:         $Id$
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
     3
    Author:     Olaf M"uller
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
     4
    Copyright   1997  TU Muenchen
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
     5
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
     6
Abstraction Theory -- tailored for I/O automata
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
     7
*)   
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
     8
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
     9
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    10
section "cex_abs";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    11
	
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    12
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    13
(* ---------------------------------------------------------------- *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    14
(*                             cex_abs                              *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    15
(* ---------------------------------------------------------------- *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    16
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    17
goal thy "cex_abs f (s,UU) = (f s, UU)";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    18
by (simp_tac (simpset() addsimps [cex_abs_def]) 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    19
qed"cex_abs_UU";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    20
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    21
goal thy "cex_abs f (s,nil) = (f s, nil)";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    22
by (simp_tac (simpset() addsimps [cex_abs_def]) 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    23
qed"cex_abs_nil";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    24
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    25
goal thy "cex_abs f (s,(a,t)>>ex) = (f s, (a,f t) >> (snd (cex_abs f (t,ex))))";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    26
by (simp_tac (simpset() addsimps [cex_abs_def]) 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    27
qed"cex_abs_cons";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    28
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    29
Addsimps [cex_abs_UU, cex_abs_nil, cex_abs_cons];
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    30
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    31
 
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    32
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    33
section "lemmas";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    34
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    35
(* ---------------------------------------------------------------- *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    36
(*                           Lemmas                                 *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    37
(* ---------------------------------------------------------------- *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    38
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    39
goal thy "temp_weakening Q P h = (! ex. (ex |== P) --> (cex_abs h ex |== Q))";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    40
by (simp_tac (simpset() addsimps [temp_weakening_def,temp_strengthening_def,
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    41
     NOT_def,temp_sat_def,satisfies_def]) 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    42
auto();
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    43
qed"temp_weakening_def2";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    44
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    45
goal thy "state_weakening Q P h = (! s t a. P (s,a,t) --> Q (h(s),a,h(t)))";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    46
by (simp_tac (simpset() addsimps [state_weakening_def,state_strengthening_def,
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    47
     NOT_def]) 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    48
auto();
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    49
qed"state_weakening_def2";
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
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    52
section "Abstraction Rules for Properties";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    53
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    54
(* ---------------------------------------------------------------- *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    55
(*                Abstraction Rules for Properties                  *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    56
(* ---------------------------------------------------------------- *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    57
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    58
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    59
goalw thy [cex_abs_def]
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    60
 "!!h.[| is_abstraction h C A |] ==>\
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    61
\ !s. reachable C s & is_exec_frag C (s,xs) \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    62
\ --> is_exec_frag A (cex_abs h (s,xs))"; 
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    63
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    64
by (Asm_full_simp_tac 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    65
by (pair_induct_tac "xs" [is_exec_frag_def] 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    66
(* main case *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    67
by (safe_tac set_cs);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    68
by (asm_full_simp_tac (simpset() addsimps [is_abstraction_def])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    69
by (forward_tac [reachable.reachable_n] 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    70
by (assume_tac 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    71
by (Asm_full_simp_tac 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    72
qed"exec_frag_abstraction";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    73
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    74
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    75
goal thy "!!A. is_abstraction h C A ==> weakeningIOA A C h";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    76
by (asm_full_simp_tac (simpset() addsimps [weakeningIOA_def])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    77
auto();
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    78
by (asm_full_simp_tac (simpset() addsimps [executions_def]) 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    79
(* start state *) 
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    80
by (rtac conjI 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    81
by (asm_full_simp_tac (simpset() addsimps [is_abstraction_def,cex_abs_def]) 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    82
(* is-execution-fragment *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    83
by (etac (exec_frag_abstraction RS spec RS mp) 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    84
by (asm_full_simp_tac (simpset() addsimps [reachable.reachable_0]) 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    85
qed"abs_is_weakening";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    86
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    87
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    88
goal thy "!!A. [|is_abstraction h C A; validIOA A Q; temp_strengthening Q P h |] \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    89
\         ==> validIOA C P";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    90
bd abs_is_weakening 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    91
by (asm_full_simp_tac (simpset() addsimps [weakeningIOA_def, 
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    92
    validIOA_def, temp_strengthening_def])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    93
by (safe_tac set_cs);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    94
by (pair_tac "ex" 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    95
qed"AbsRuleT1";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    96
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    97
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    98
(* FIX: Nach TLS.ML *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    99
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   100
goal thy "(ex |== P .--> Q) = ((ex |== P) --> (ex |== Q))";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   101
by (simp_tac (simpset() addsimps [IMPLIES_def,temp_sat_def, satisfies_def])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   102
qed"IMPLIES_temp_sat";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   103
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   104
goal thy "(ex |== P .& Q) = ((ex |== P) & (ex |== Q))";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   105
by (simp_tac (simpset() addsimps [AND_def,temp_sat_def, satisfies_def])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   106
qed"AND_temp_sat";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   107
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   108
goal thy "(ex |== P .| Q) = ((ex |== P) | (ex |== Q))";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   109
by (simp_tac (simpset() addsimps [OR_def,temp_sat_def, satisfies_def])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   110
qed"OR_temp_sat";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   111
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   112
goal thy "(ex |== .~ P) = (~ (ex |== P))";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   113
by (simp_tac (simpset() addsimps [NOT_def,temp_sat_def, satisfies_def])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   114
qed"NOT_temp_sat";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   115
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   116
Addsimps [IMPLIES_temp_sat,AND_temp_sat,OR_temp_sat,NOT_temp_sat];
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   117
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   118
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   119
goalw thy [is_live_abstraction_def]
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   120
   "!!A. [|is_live_abstraction h (C,L) (A,M); \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   121
\         validLIOA (A,M) Q;  temp_strengthening Q P h |] \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   122
\         ==> validLIOA (C,L) P";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   123
auto();
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   124
bd abs_is_weakening 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   125
by (asm_full_simp_tac (simpset() addsimps [weakeningIOA_def, temp_weakening_def2,
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   126
    validLIOA_def, validIOA_def, temp_strengthening_def])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   127
by (safe_tac set_cs);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   128
by (pair_tac "ex" 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   129
qed"AbsRuleT2";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   130
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   131
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   132
goalw thy [is_live_abstraction_def]
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   133
   "!!A. [|is_live_abstraction h (C,L) (A,M); \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   134
\         validLIOA (A,M) (H1 .--> Q);  temp_strengthening Q P h; \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   135
\         temp_weakening H1 H2 h; validLIOA (C,L) H2 |] \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   136
\         ==> validLIOA (C,L) P";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   137
auto();
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   138
bd abs_is_weakening 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   139
by (asm_full_simp_tac (simpset() addsimps [weakeningIOA_def, temp_weakening_def2,
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   140
    validLIOA_def, validIOA_def, temp_strengthening_def])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   141
by (safe_tac set_cs);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   142
by (pair_tac "ex" 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   143
qed"AbsRuleTImprove";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   144
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   145
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   146
section "Correctness of safe abstraction";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   147
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   148
(* ---------------------------------------------------------------- *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   149
(*              Correctness of safe abstraction                     *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   150
(* ---------------------------------------------------------------- *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   151
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   152
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   153
goalw thy [is_abstraction_def,is_ref_map_def] 
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   154
"!! h. is_abstraction h C A ==> is_ref_map h C A";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   155
by (safe_tac set_cs);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   156
by (res_inst_tac[("x","(a,h t)>>nil")] exI 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   157
by (asm_full_simp_tac (simpset() addsimps [move_def])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   158
qed"abstraction_is_ref_map";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   159
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   160
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   161
goal thy "!! h. [| inp(C)=inp(A); out(C)=out(A); \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   162
\                  is_abstraction h C A |] \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   163
\               ==> C =<| A";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   164
by (asm_full_simp_tac (simpset() addsimps [ioa_implements_def]) 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   165
br trace_inclusion 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   166
by (simp_tac (simpset() addsimps [externals_def])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   167
by (SELECT_GOAL (auto_tac (claset(),simpset()))1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   168
be abstraction_is_ref_map 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   169
qed"abs_safety";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   170
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   171
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   172
section "Correctness of life abstraction";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   173
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   174
(* ---------------------------------------------------------------- *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   175
(*              Correctness of life abstraction                     *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   176
(* ---------------------------------------------------------------- *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   177
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   178
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   179
(* Reduces to Filter (Map fst x) = Filter (Map fst (Map (%(a,t). (a,x)) x),
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   180
   that is to special Map Lemma *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   181
goalw thy [cex_abs_def,mk_trace_def,filter_act_def]
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   182
  "!! f. ext C = ext A \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   183
\        ==> mk_trace C`xs = mk_trace A`(snd (cex_abs f (s,xs)))";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   184
by (Asm_full_simp_tac 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   185
by (pair_induct_tac "xs" [] 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   186
qed"traces_coincide_abs";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   187
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   188
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   189
goalw thy [cex_abs_def]
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   190
 "!!f.[| is_abstraction h C A |] ==>\
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   191
\ !s. reachable C s & is_exec_frag C (s,xs) \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   192
\ --> is_exec_frag A (cex_abs h (s,xs))"; 
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   193
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   194
by (Asm_full_simp_tac 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   195
by (pair_induct_tac "xs" [is_exec_frag_def] 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   196
(* main case *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   197
by (safe_tac set_cs);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   198
(* Stepd correspond to each other *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   199
by (asm_full_simp_tac (simpset() addsimps [is_abstraction_def])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   200
(* IH *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   201
(* reachable_n looping, therefore apply it manually *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   202
by (eres_inst_tac [("x","y")] allE 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   203
by (Asm_full_simp_tac 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   204
by (forward_tac [reachable.reachable_n] 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   205
by (assume_tac 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   206
by (Asm_full_simp_tac 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   207
qed_spec_mp"correp_is_exec_abs";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   208
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   209
(* Does not work with abstraction_is_ref_map as proof of abs_safety, because
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   210
   is_live_abstraction includes temp_strengthening which is necessarily based
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   211
   on cex_abs and not on corresp_ex. Thus, the proof is redoone in a more specific
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   212
   way for cex_abs *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   213
goal thy "!! h. [| inp(C)=inp(A); out(C)=out(A); \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   214
\                  is_live_abstraction h (C,M) (A,L) |] \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   215
\               ==> live_implements (C,M) (A,L)";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   216
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   217
by (asm_full_simp_tac (simpset() addsimps [is_live_abstraction_def, live_implements_def,
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   218
livetraces_def,liveexecutions_def]) 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   219
by (safe_tac set_cs);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   220
by (res_inst_tac[("x","cex_abs h ex")] exI 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   221
by (safe_tac set_cs);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   222
  (* Traces coincide *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   223
  by (pair_tac "ex" 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   224
  by (rtac traces_coincide_abs 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   225
  by (simp_tac (simpset() addsimps [externals_def])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   226
  by (SELECT_GOAL (auto_tac (claset(),simpset()))1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   227
 
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   228
  (* cex_abs is execution *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   229
  by (pair_tac "ex" 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   230
  by (asm_full_simp_tac (simpset() addsimps [executions_def]) 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   231
  (* start state *) 
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   232
  by (rtac conjI 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   233
  by (asm_full_simp_tac (simpset() addsimps [is_abstraction_def,cex_abs_def]) 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   234
  (* is-execution-fragment *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   235
  by (etac correp_is_exec_abs 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   236
  by (asm_full_simp_tac (simpset() addsimps [reachable.reachable_0]) 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   237
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   238
 (* Liveness *) 
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   239
by (asm_full_simp_tac (simpset() addsimps [temp_weakening_def2]) 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   240
 by (pair_tac "ex" 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   241
qed"abs_liveness";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   242
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   243
(* FIX: NAch Traces.ML bringen *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   244
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   245
goalw thy [ioa_implements_def] 
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   246
"!! A. [| A =<| B; B =<| C|] ==> A =<| C"; 
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   247
auto();
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   248
qed"implements_trans";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   249
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   250
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   251
section "Abstraction Rules for Automata";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   252
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   253
(* ---------------------------------------------------------------- *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   254
(*                Abstraction Rules for Automata                    *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   255
(* ---------------------------------------------------------------- *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   256
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   257
goal thy "!! C. [| inp(C)=inp(A); out(C)=out(A); \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   258
\                  inp(Q)=inp(P); out(Q)=out(P); \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   259
\                  is_abstraction h1 C A; \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   260
\                  A =<| Q ; \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   261
\                  is_abstraction h2 Q P |] \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   262
\               ==> C =<| P";   
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   263
bd abs_safety 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   264
by (REPEAT (atac 1));
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   265
bd abs_safety 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   266
by (REPEAT (atac 1));
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   267
be implements_trans 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   268
be implements_trans 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   269
ba 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   270
qed"AbsRuleA1";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   271
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   272
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   273
goal thy "!! C. [| inp(C)=inp(A); out(C)=out(A); \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   274
\                  inp(Q)=inp(P); out(Q)=out(P); \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   275
\                  is_live_abstraction h1 (C,LC) (A,LA); \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   276
\                  live_implements (A,LA) (Q,LQ) ; \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   277
\                  is_live_abstraction h2 (Q,LQ) (P,LP) |] \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   278
\               ==> live_implements (C,LC) (P,LP)";   
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   279
bd abs_liveness 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   280
by (REPEAT (atac 1));
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   281
bd abs_liveness 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   282
by (REPEAT (atac 1));
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   283
be live_implements_trans 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   284
be live_implements_trans 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   285
ba 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   286
qed"AbsRuleA2";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   287
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   288
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   289
Delsimps [split_paired_All];
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   290
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   291
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   292
section "Localizing Temporal Strengthenings and Weakenings";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   293
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   294
(* ---------------------------------------------------------------- *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   295
(*                Localizing Temproal Strengthenings - 1               *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   296
(* ---------------------------------------------------------------- *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   297
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   298
goalw thy [temp_strengthening_def]
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   299
"!! h. [| temp_strengthening P1 Q1 h; \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   300
\         temp_strengthening P2 Q2 h |] \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   301
\      ==> temp_strengthening (P1 .& P2) (Q1 .& Q2) h";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   302
auto();
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   303
qed"strength_AND";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   304
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   305
goalw thy [temp_strengthening_def]
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   306
"!! h. [| temp_strengthening P1 Q1 h; \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   307
\         temp_strengthening P2 Q2 h |] \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   308
\      ==> temp_strengthening (P1 .| P2) (Q1 .| Q2) h";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   309
auto();
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   310
qed"strength_OR";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   311
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   312
goalw thy [temp_strengthening_def]
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   313
"!! h. [| temp_weakening P Q h |] \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   314
\      ==> temp_strengthening (.~ P) (.~ Q) h";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   315
by (asm_full_simp_tac (simpset() addsimps [temp_weakening_def2])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   316
auto();
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   317
qed"strength_NOT";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   318
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   319
goalw thy [temp_strengthening_def]
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   320
"!! h. [| temp_weakening P1 Q1 h; \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   321
\         temp_strengthening P2 Q2 h |] \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   322
\      ==> temp_strengthening (P1 .--> P2) (Q1 .--> Q2) h";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   323
by (asm_full_simp_tac (simpset() addsimps [temp_weakening_def2])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   324
qed"strength_IMPLIES";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   325
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   326
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   327
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   328
(* ---------------------------------------------------------------- *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   329
(*                Localizing Temproal Weakenings - Part 1           *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   330
(* ---------------------------------------------------------------- *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   331
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   332
goal thy
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   333
"!! h. [| temp_weakening P1 Q1 h; \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   334
\         temp_weakening P2 Q2 h |] \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   335
\      ==> temp_weakening (P1 .& P2) (Q1 .& Q2) h";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   336
by (asm_full_simp_tac (simpset() addsimps [temp_weakening_def2])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   337
qed"weak_AND";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   338
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   339
goal thy 
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   340
"!! h. [| temp_weakening P1 Q1 h; \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   341
\         temp_weakening P2 Q2 h |] \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   342
\      ==> temp_weakening (P1 .| P2) (Q1 .| Q2) h";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   343
by (asm_full_simp_tac (simpset() addsimps [temp_weakening_def2])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   344
qed"weak_OR";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   345
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   346
goalw thy [temp_strengthening_def]
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   347
"!! h. [| temp_strengthening P Q h |] \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   348
\      ==> temp_weakening (.~ P) (.~ Q) h";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   349
by (asm_full_simp_tac (simpset() addsimps [temp_weakening_def2])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   350
auto();
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   351
qed"weak_NOT";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   352
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   353
goalw thy [temp_strengthening_def]
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   354
"!! h. [| temp_strengthening P1 Q1 h; \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   355
\         temp_weakening P2 Q2 h |] \
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   356
\      ==> temp_weakening (P1 .--> P2) (Q1 .--> Q2) h";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   357
by (asm_full_simp_tac (simpset() addsimps [temp_weakening_def2])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   358
qed"weak_IMPLIES";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   359
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   360
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   361
(* ---------------------------------------------------------------- *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   362
(*             Localizing Temproal Strengthenings - 2               *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   363
(* ---------------------------------------------------------------- *)
4577
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   364
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   365
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   366
(* ------------------ Box ----------------------------*)
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   367
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   368
(* FIX: should be same as nil_is_Conc2 when all nils are turned to right side !! *)
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   369
goal thy "(UU = x @@ y) = (((x::'a Seq)= UU) | (x=nil & y=UU))";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   370
by (Seq_case_simp_tac "x" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   371
by Auto_tac;
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   372
qed"UU_is_Conc";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   373
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   374
goal thy 
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   375
"Finite s1 --> \
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   376
\ (! ex. (s~=nil & s~=UU & ex2seq ex = s1 @@ s) --> (? ex'. s = ex2seq ex'))";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   377
by (rtac impI 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   378
by (Seq_Finite_induct_tac 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   379
(* main case *)
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   380
by (Blast_tac 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   381
by (clarify_tac set_cs 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   382
by (pair_tac "ex" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   383
by (Seq_case_simp_tac "y" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   384
(* UU case *)
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   385
by (asm_full_simp_tac (simpset() addsimps [UU_is_Conc])1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   386
(* nil case *)
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   387
by (asm_full_simp_tac (simpset() addsimps [nil_is_Conc])1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   388
(* cons case *)
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   389
by (pair_tac "aa" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   390
auto();
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   391
qed_spec_mp"ex2seqConc";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   392
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   393
(* important property of ex2seq: can be shiftet, as defined "pointwise" *)
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   394
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   395
goalw thy [tsuffix_def,suffix_def]
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   396
"!!s. tsuffix s (ex2seq ex) ==> ? ex'. s = (ex2seq ex')";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   397
auto();
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   398
bd ex2seqConc 1;
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   399
auto();
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   400
qed"ex2seq_tsuffix";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   401
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   402
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   403
goal thy "(Map f`s = nil) = (s=nil)";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   404
by (Seq_case_simp_tac "s" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   405
qed"Mapnil";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   406
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   407
goal thy "(Map f`s = UU) = (s=UU)";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   408
by (Seq_case_simp_tac "s" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   409
qed"MapUU";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   410
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   411
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   412
(* important property of cex_absSeq: As it is a 1to1 correspondence, 
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   413
  properties carry over *)
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   414
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   415
goalw thy [tsuffix_def,suffix_def,cex_absSeq_def]
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   416
"!! s. tsuffix s t ==> tsuffix (cex_absSeq h s) (cex_absSeq h t)";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   417
auto();
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   418
by (asm_full_simp_tac (simpset() addsimps [Mapnil])1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   419
by (asm_full_simp_tac (simpset() addsimps [MapUU])1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   420
by (res_inst_tac [("x","Map (%(s,a,t). (h s,a, h t))`s1")] exI 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   421
by (asm_full_simp_tac (simpset() addsimps [Map2Finite,MapConc])1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   422
qed"cex_absSeq_tsuffix";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   423
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   424
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   425
goalw thy [temp_strengthening_def,state_strengthening_def, temp_sat_def,
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   426
satisfies_def,Box_def]
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   427
"!! h. [| temp_strengthening P Q h |]\
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   428
\      ==> temp_strengthening ([] P) ([] Q) h";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   429
by (clarify_tac set_cs 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   430
by (forward_tac [ex2seq_tsuffix] 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   431
by (clarify_tac set_cs 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   432
by (dres_inst_tac [("h","h")] cex_absSeq_tsuffix 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   433
by (asm_full_simp_tac (simpset() addsimps [ex2seq_abs_cex])1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   434
qed"strength_Box";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   435
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   436
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   437
(* ------------------ Init ----------------------------*)
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   438
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   439
goalw thy [temp_strengthening_def,state_strengthening_def,
4577
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   440
temp_sat_def,satisfies_def,Init_def,unlift_def]
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   441
"!! h. [| state_strengthening P Q h |]\
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   442
\      ==> temp_strengthening (Init P) (Init Q) h";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   443
by (safe_tac set_cs);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   444
by (pair_tac "ex" 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   445
by (Seq_case_simp_tac "y" 1);
4577
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   446
by (pair_tac "a" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   447
qed"strength_Init";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   448
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   449
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   450
(* ------------------ Next ----------------------------*)
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   451
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   452
goal thy 
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   453
"(TL`(ex2seq (cex_abs h ex))=UU) = (TL`(ex2seq ex)=UU)";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   454
by (pair_tac "ex" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   455
by (Seq_case_simp_tac "y" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   456
by (pair_tac "a" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   457
by (Seq_case_simp_tac "s" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   458
by (pair_tac "a" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   459
qed"TL_ex2seq_UU";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   460
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   461
goal thy 
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   462
"(TL`(ex2seq (cex_abs h ex))=nil) = (TL`(ex2seq ex)=nil)";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   463
by (pair_tac "ex" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   464
by (Seq_case_simp_tac "y" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   465
by (pair_tac "a" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   466
by (Seq_case_simp_tac "s" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   467
by (pair_tac "a" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   468
qed"TL_ex2seq_nil";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   469
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   470
(* FIX: put to Sequence Lemmas *)
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   471
goal thy "Map f`(TL`s) = TL`(Map f`s)";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   472
by (Seq_induct_tac "s" [] 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   473
qed"MapTL";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   474
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   475
(* important property of cex_absSeq: As it is a 1to1 correspondence, 
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   476
  properties carry over *)
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   477
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   478
goalw thy [cex_absSeq_def]
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   479
"cex_absSeq h (TL`s) = (TL`(cex_absSeq h s))";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   480
by (simp_tac (simpset() addsimps [MapTL]) 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   481
qed"cex_absSeq_TL";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   482
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   483
(* important property of ex2seq: can be shiftet, as defined "pointwise" *)
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   484
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   485
goal thy "!!ex. [| (snd ex)~=UU ; (snd ex)~=nil |] ==> (? ex'. TL`(ex2seq ex) = ex2seq ex')";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   486
by (pair_tac "ex" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   487
by (Seq_case_simp_tac "y" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   488
by (pair_tac "a" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   489
auto();
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   490
qed"TLex2seq";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   491
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   492
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   493
goal thy "(TL`(ex2seq ex)~=UU) = ((snd ex)~=UU)";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   494
by (pair_tac "ex" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   495
by (Seq_case_simp_tac "y" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   496
by (pair_tac "a" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   497
by (Seq_case_simp_tac "s" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   498
by (pair_tac "a" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   499
qed"ex2seqUUTL";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   500
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   501
goal thy "(TL`(ex2seq ex)~=nil) = ((snd ex)~=nil)";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   502
by (pair_tac "ex" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   503
by (Seq_case_simp_tac "y" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   504
by (pair_tac "a" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   505
by (Seq_case_simp_tac "s" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   506
by (pair_tac "a" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   507
qed"ex2seqnilTL";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   508
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   509
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   510
goalw thy [temp_strengthening_def,state_strengthening_def,
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   511
temp_sat_def, satisfies_def,Next_def]
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   512
"!! h. [| temp_strengthening P Q h |]\
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   513
\      ==> temp_strengthening (Next P) (Next Q) h";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   514
by (asm_full_simp_tac (simpset() setloop split_tac [expand_if]) 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   515
by (safe_tac set_cs);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   516
by (asm_full_simp_tac (simpset() addsimps [TL_ex2seq_nil,TL_ex2seq_UU]) 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   517
by (asm_full_simp_tac (simpset() addsimps [TL_ex2seq_nil,TL_ex2seq_UU]) 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   518
by (asm_full_simp_tac (simpset() addsimps [TL_ex2seq_nil,TL_ex2seq_UU]) 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   519
by (asm_full_simp_tac (simpset() addsimps [TL_ex2seq_nil,TL_ex2seq_UU]) 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   520
(* cons case *)
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   521
by (asm_full_simp_tac (simpset() addsimps [TL_ex2seq_nil,TL_ex2seq_UU,
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   522
        ex2seq_abs_cex,cex_absSeq_TL RS sym, ex2seqUUTL,ex2seqnilTL])1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   523
bd TLex2seq 1;
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   524
ba 1;
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   525
auto();
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   526
qed"strength_Next";
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   527
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   528
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   529
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   530
(* ---------------------------------------------------------------- *)
4577
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   531
(*             Localizing Temporal Weakenings     - 2               *)
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   532
(* ---------------------------------------------------------------- *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   533
4577
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   534
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   535
goal thy 
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   536
"!! h. [| state_weakening P Q h |]\
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   537
\      ==> temp_weakening (Init P) (Init Q) h";
4577
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   538
by (asm_full_simp_tac (simpset() addsimps [temp_weakening_def2,
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   539
      state_weakening_def2, temp_sat_def,satisfies_def,Init_def,unlift_def])1);
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   540
by (safe_tac set_cs);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   541
by (pair_tac "ex" 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   542
by (Seq_case_simp_tac "y" 1);
4577
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   543
by (pair_tac "a" 1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   544
qed"weak_Init";
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   545
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   546
4577
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   547
(*
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   548
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   549
(* analog to strengthening thm above, with analog lemmas used  *)
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   550
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   551
goalw thy [state_weakening_def]
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   552
"!! h. [| temp_weakening P Q h |]\
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   553
\      ==> temp_weakening ([] P) ([] Q) h";
4577
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   554
by (asm_full_simp_tac (simpset() addsimps [temp_weakening_def2,
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   555
         temp_sat_def,satisfies_def,Box_def])1);
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   556
4577
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   557
(* analog to strengthening thm above, with analog lemmas used  *)
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   558
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   559
goalw thy [state_weakening_def]
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   560
"!! h. [| temp_weakening P Q h |]\
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   561
\      ==> temp_weakening (Next P) (Next Q) h";
4577
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   562
by (asm_full_simp_tac (simpset() addsimps [temp_weakening_def2,
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   563
         temp_sat_def,satisfies_def,Next_def])1);
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   564
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   565
*)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   566
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   567
(* ---------------------------------------------------------------- *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   568
(*             Localizing Temproal Strengthenings - 3               *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   569
(* ---------------------------------------------------------------- *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   570
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   571
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   572
goalw thy [Diamond_def]
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   573
"!! h. [| temp_strengthening P Q h |]\
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   574
\      ==> temp_strengthening (<> P) (<> Q) h";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   575
br strength_NOT 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   576
br weak_Box 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   577
be weak_NOT 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   578
qed"strength_Diamond";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   579
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   580
goalw thy [Leadsto_def]
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   581
"!! h. [| temp_weakening P1 P2 h;\
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   582
\         temp_strengthening Q1 Q2 h |]\
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   583
\      ==> temp_strengthening (P1 ~> Q1) (P2 ~> Q2) h";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   584
br strength_Box 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   585
be strength_IMPLIES 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   586
be strength_Diamond 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   587
qed"strength_Leadsto";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   588
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   589
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   590
(* ---------------------------------------------------------------- *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   591
(*             Localizing Temporal Weakenings - 3                   *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   592
(* ---------------------------------------------------------------- *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   593
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   594
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   595
goalw thy [Diamond_def]
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   596
"!! h. [| temp_weakening P Q h |]\
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   597
\      ==> temp_weakening (<> P) (<> Q) h";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   598
br weak_NOT 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   599
br strength_Box 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   600
be strength_NOT 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   601
qed"weak_Diamond";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   602
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   603
goalw thy [Leadsto_def]
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   604
"!! h. [| temp_strengthening P1 P2 h;\
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   605
\         temp_weakening Q1 Q2 h |]\
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   606
\      ==> temp_weakening (P1 ~> Q1) (P2 ~> Q2) h";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   607
br weak_Box 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   608
be weak_IMPLIES 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   609
be weak_Diamond 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   610
qed"weak_Leadsto";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   611
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   612
goalw thy [WF_def]
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   613
  " !!A. [| !! s. Enabled A acts (h s) ==> Enabled C acts s|] \ 
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   614
\   ==> temp_weakening (WF A acts) (WF C acts) h";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   615
br weak_IMPLIES 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   616
br strength_Diamond 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   617
br strength_Box 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   618
br strength_Init 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   619
br weak_Box 2;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   620
br weak_Diamond 2;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   621
br weak_Init 2;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   622
by (auto_tac (claset(),
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   623
              simpset() addsimps [state_weakening_def,state_strengthening_def,
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   624
                             xt2_def,plift_def,option_lift_def,NOT_def]));
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   625
qed"weak_WF";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   626
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   627
goalw thy [SF_def]
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   628
  " !!A. [| !! s. Enabled A acts (h s) ==> Enabled C acts s|] \ 
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   629
\   ==> temp_weakening (SF A acts) (SF C acts) h";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   630
br weak_IMPLIES 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   631
br strength_Box 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   632
br strength_Diamond 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   633
br strength_Init 1;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   634
br weak_Box 2;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   635
br weak_Diamond 2;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   636
br weak_Init 2;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   637
by (auto_tac (claset(),
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   638
              simpset() addsimps [state_weakening_def,state_strengthening_def,
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   639
                             xt2_def,plift_def,option_lift_def,NOT_def]));
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   640
qed"weak_SF";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   641
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   642
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   643
val weak_strength_lemmas = 
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   644
    [weak_OR,weak_AND,weak_NOT,weak_IMPLIES,weak_Box,weak_Next,weak_Init,
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   645
     weak_Diamond,weak_Leadsto,strength_OR,strength_AND,strength_NOT,
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   646
     strength_IMPLIES,strength_Box,strength_Next,strength_Init,
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   647
     strength_Diamond,strength_Leadsto,weak_WF,weak_SF];
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   648
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   649
fun abstraction_tac i = 
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   650
    SELECT_GOAL (auto_tac (claset() addSIs weak_strength_lemmas,
4725
7edba45a6998 Updated proofs because of new simplifier.
nipkow
parents: 4577
diff changeset
   651
                           simpset() addsimps [state_strengthening_def,state_weakening_def])) i;