src/HOLCF/IOA/meta_theory/TL.ML
author paulson
Fri, 29 Jan 1999 16:23:56 +0100
changeset 6161 bc2a76ce1ea3
parent 5976 44290b71a85f
child 10835 f4745d77e620
permissions -rw-r--r--
tidied
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/TL.ML
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
Temporal Logic 
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
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4833
diff changeset
    10
Goal "[] <> (.~ P) = (.~ <> [] P)";
5132
24f992a25adc isatool expandshort;
wenzelm
parents: 5068
diff changeset
    11
by (rtac ext 1);
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    12
by (simp_tac (simpset() addsimps [Diamond_def,NOT_def,Box_def])1);
5132
24f992a25adc isatool expandshort;
wenzelm
parents: 5068
diff changeset
    13
by Auto_tac;
5976
44290b71a85f tuning to assimiliate it with PhD;
mueller
parents: 5132
diff changeset
    14
qed"simple";
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    15
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4833
diff changeset
    16
Goal "nil |= [] P";
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    17
by (asm_full_simp_tac (simpset() addsimps [satisfies_def,
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    18
     Box_def,tsuffix_def,suffix_def,nil_is_Conc])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    19
qed"Boxnil";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    20
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4833
diff changeset
    21
Goal "~(nil |= <> P)";
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    22
by (simp_tac (simpset() addsimps [Diamond_def,satisfies_def,NOT_def])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    23
by (cut_inst_tac [] Boxnil 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    24
by (asm_full_simp_tac (simpset() addsimps [satisfies_def])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    25
qed"Diamondnil";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    26
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4833
diff changeset
    27
Goal "(<> F) s = (? s2. tsuffix s2 s & F s2)";
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    28
by (simp_tac (simpset() addsimps [Diamond_def,NOT_def,Box_def])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    29
qed"Diamond_def2";
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 "TLA Axiomatization by Merz";
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
(*                 TLA Axiomatization by Merz                       *)
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
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4833
diff changeset
    39
Goal "suffix s s";
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    40
by (simp_tac (simpset() addsimps [suffix_def])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    41
by (res_inst_tac [("x","nil")] exI 1);
5132
24f992a25adc isatool expandshort;
wenzelm
parents: 5068
diff changeset
    42
by Auto_tac;
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    43
qed"suffix_refl";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    44
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4833
diff changeset
    45
Goal "s~=UU & s~=nil --> (s |= [] F .--> F)";
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    46
by (simp_tac (simpset() addsimps [satisfies_def,IMPLIES_def,Box_def])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    47
by (REPEAT (rtac impI 1));
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    48
by (eres_inst_tac [("x","s")] allE 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    49
by (asm_full_simp_tac (simpset() addsimps [tsuffix_def,suffix_refl])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    50
qed"reflT";
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
6161
paulson
parents: 5976
diff changeset
    53
Goal "[| suffix y x ; suffix z y |]  ==> suffix z x";
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    54
by (asm_full_simp_tac (simpset() addsimps [suffix_def])1);
5132
24f992a25adc isatool expandshort;
wenzelm
parents: 5068
diff changeset
    55
by Auto_tac;
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    56
by (res_inst_tac [("x","s1 @@ s1a")] exI 1);
5132
24f992a25adc isatool expandshort;
wenzelm
parents: 5068
diff changeset
    57
by Auto_tac;
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    58
by (simp_tac (simpset() addsimps [Conc_assoc]) 1); 
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    59
qed"suffix_trans";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    60
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4833
diff changeset
    61
Goal "s |= [] F .--> [] [] F";
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    62
by (simp_tac (simpset() addsimps [satisfies_def,IMPLIES_def,Box_def,tsuffix_def])1);
5132
24f992a25adc isatool expandshort;
wenzelm
parents: 5068
diff changeset
    63
by Auto_tac;
24f992a25adc isatool expandshort;
wenzelm
parents: 5068
diff changeset
    64
by (dtac suffix_trans 1);
24f992a25adc isatool expandshort;
wenzelm
parents: 5068
diff changeset
    65
by (assume_tac 1);
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    66
by (eres_inst_tac [("x","s2a")] allE 1);
5132
24f992a25adc isatool expandshort;
wenzelm
parents: 5068
diff changeset
    67
by Auto_tac;
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    68
qed"transT";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    69
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    70
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4833
diff changeset
    71
Goal "s |= [] (F .--> G) .--> [] F .--> [] G";
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    72
by (simp_tac (simpset() addsimps [satisfies_def,IMPLIES_def,Box_def])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    73
qed"normalT";
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
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    76
section "TLA Rules by Lamport";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    77
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    78
(* ---------------------------------------------------------------- *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    79
(*                      TLA Rules by Lamport                        *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    80
(* ---------------------------------------------------------------- *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    81
6161
paulson
parents: 5976
diff changeset
    82
Goal "validT P ==> validT ([] P)";
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    83
by (asm_full_simp_tac (simpset() addsimps [validT_def,satisfies_def,Box_def,tsuffix_def])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    84
qed"STL1a";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    85
6161
paulson
parents: 5976
diff changeset
    86
Goal "valid P ==> validT (Init P)";
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    87
by (asm_full_simp_tac (simpset() addsimps [valid_def,validT_def,satisfies_def,Init_def])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    88
qed"STL1b";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    89
6161
paulson
parents: 5976
diff changeset
    90
Goal "valid P ==> validT ([] (Init P))";
5132
24f992a25adc isatool expandshort;
wenzelm
parents: 5068
diff changeset
    91
by (rtac STL1a 1);
24f992a25adc isatool expandshort;
wenzelm
parents: 5068
diff changeset
    92
by (etac STL1b 1);
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    93
qed"STL1";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    94
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    95
(* Note that unlift and HD is not at all used !!! *)
6161
paulson
parents: 5976
diff changeset
    96
Goal "valid (P .--> Q)  ==> validT ([] (Init P) .--> [] (Init Q))";
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    97
by (asm_full_simp_tac (simpset() addsimps [valid_def,validT_def,satisfies_def,IMPLIES_def,Box_def,Init_def])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    98
qed"STL4";
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
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   101
section "LTL Axioms by Manna/Pnueli";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   102
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
(*                LTL Axioms by Manna/Pnueli                        *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   105
(* ---------------------------------------------------------------- *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   106
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   107
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4833
diff changeset
   108
Goalw [tsuffix_def,suffix_def]
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   109
"s~=UU & s~=nil --> tsuffix s2 (TL`s) --> tsuffix s2 s";
5132
24f992a25adc isatool expandshort;
wenzelm
parents: 5068
diff changeset
   110
by Auto_tac;
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   111
by (Seq_case_simp_tac "s" 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   112
by (res_inst_tac [("x","a>>s1")] exI 1);
5132
24f992a25adc isatool expandshort;
wenzelm
parents: 5068
diff changeset
   113
by Auto_tac;
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   114
qed_spec_mp"tsuffix_TL";
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
val tsuffix_TL2 = conjI RS tsuffix_TL;
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   117
4833
2e53109d4bc8 Renamed expand_const -> split_const
nipkow
parents: 4681
diff changeset
   118
Delsplits[split_if];
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4833
diff changeset
   119
Goalw [Next_def,satisfies_def,NOT_def,IMPLIES_def,AND_def,Box_def] 
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   120
   "s~=UU & s~=nil --> (s |= [] F .--> (F .& (Next ([] F))))";
5132
24f992a25adc isatool expandshort;
wenzelm
parents: 5068
diff changeset
   121
by Auto_tac;
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   122
(* []F .--> F *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   123
by (eres_inst_tac [("x","s")] allE 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   124
by (asm_full_simp_tac (simpset() addsimps [tsuffix_def,suffix_refl])1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   125
(* []F .--> Next [] F *)
4833
2e53109d4bc8 Renamed expand_const -> split_const
nipkow
parents: 4681
diff changeset
   126
by (asm_full_simp_tac (simpset() addsplits [split_if]) 1);
5132
24f992a25adc isatool expandshort;
wenzelm
parents: 5068
diff changeset
   127
by Auto_tac;
24f992a25adc isatool expandshort;
wenzelm
parents: 5068
diff changeset
   128
by (dtac tsuffix_TL2 1);
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   129
by (REPEAT (atac 1));
5132
24f992a25adc isatool expandshort;
wenzelm
parents: 5068
diff changeset
   130
by Auto_tac;
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   131
qed"LTL1";
4833
2e53109d4bc8 Renamed expand_const -> split_const
nipkow
parents: 4681
diff changeset
   132
Addsplits[split_if];
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   133
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   134
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4833
diff changeset
   135
Goalw [Next_def,satisfies_def,NOT_def,IMPLIES_def] 
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   136
    "s |= .~ (Next F) .--> (Next (.~ F))";
4833
2e53109d4bc8 Renamed expand_const -> split_const
nipkow
parents: 4681
diff changeset
   137
by (Asm_full_simp_tac 1);
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   138
qed"LTL2a";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   139
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4833
diff changeset
   140
Goalw [Next_def,satisfies_def,NOT_def,IMPLIES_def] 
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   141
    "s |= (Next (.~ F)) .--> (.~ (Next F))";
4833
2e53109d4bc8 Renamed expand_const -> split_const
nipkow
parents: 4681
diff changeset
   142
by (Asm_full_simp_tac 1);
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   143
qed"LTL2b";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   144
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4833
diff changeset
   145
Goalw [Next_def,satisfies_def,NOT_def,IMPLIES_def] 
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   146
"ex |= (Next (F .--> G)) .--> (Next F) .--> (Next G)";
4833
2e53109d4bc8 Renamed expand_const -> split_const
nipkow
parents: 4681
diff changeset
   147
by (Asm_full_simp_tac 1);
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   148
qed"LTL3";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   149
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4833
diff changeset
   150
Goalw [Next_def,satisfies_def,Box_def,NOT_def,IMPLIES_def] 
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   151
 "s |= [] (F .--> Next F) .--> F .--> []F";
4833
2e53109d4bc8 Renamed expand_const -> split_const
nipkow
parents: 4681
diff changeset
   152
by (Asm_full_simp_tac 1);
5132
24f992a25adc isatool expandshort;
wenzelm
parents: 5068
diff changeset
   153
by Auto_tac;
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   154
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   155
by (asm_full_simp_tac (simpset() addsimps [tsuffix_def,suffix_def])1);
5132
24f992a25adc isatool expandshort;
wenzelm
parents: 5068
diff changeset
   156
by Auto_tac;
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   157
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
   158
4577
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   159
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   160
6161
paulson
parents: 5976
diff changeset
   161
Goal "[| validT (P .--> Q); validT P |] ==> validT Q";
4577
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   162
by (asm_full_simp_tac (simpset() addsimps [validT_def,satisfies_def,IMPLIES_def])1);
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   163
qed"ModusPonens";
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   164
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   165
(* works only if validT is defined without restriction to s~=UU, s~=nil *)
6161
paulson
parents: 5976
diff changeset
   166
Goal "validT P ==> validT (Next P)";
4577
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
   167
by (asm_full_simp_tac (simpset() addsimps [validT_def,satisfies_def,Next_def])1);
4681
a331c1f5a23e expand_if is now by default part of the simpset.
nipkow
parents: 4577
diff changeset
   168
(* qed"NextTauto"; *)