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