src/HOLCF/IOA/meta_theory/TL.thy
author wenzelm
Thu, 21 Apr 2005 22:10:12 +0200
changeset 15805 1e8017f1e971
parent 14981 e73f8140af78
child 17233 41eee2e7b465
permissions -rw-r--r--
adapt theories and ML files to new CPure/Pure arrangement;
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/TLS.thy
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
     2
    ID:         $Id$
12218
wenzelm
parents: 12114
diff changeset
     3
    Author:     Olaf Müller
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
     4
12218
wenzelm
parents: 12114
diff changeset
     5
A General Temporal Logic.
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
     6
*)   
12218
wenzelm
parents: 12114
diff changeset
     7
	       
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
     8
TL = Pred + Sequence +  
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
     9
12338
de0f4a63baa5 renamed class "term" to "type" (actually "HOL.type");
wenzelm
parents: 12218
diff changeset
    10
default type
4559
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
types
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
'a temporal      = 'a Seq predicate
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
consts
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    18
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    19
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    20
suffix     :: "'a Seq => 'a Seq => bool"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    21
tsuffix    :: "'a Seq => 'a Seq => bool"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    22
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    23
validT     :: "'a Seq predicate => bool"
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
unlift     ::  "'a lift => 'a"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    26
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    27
Init         ::"'a predicate => 'a temporal"          ("<_>" [0] 1000)
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
Box          ::"'a temporal => 'a temporal"   ("[] (_)" [80] 80)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    30
Diamond      ::"'a temporal => 'a temporal"   ("<> (_)" [80] 80)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    31
Next         ::"'a temporal => 'a temporal"   
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    32
Leadsto      ::"'a temporal => 'a temporal => 'a temporal"  (infixr "~>" 22)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    33
12114
a8e860c86252 eliminated old "symbols" syntax, use "xsymbols" instead;
wenzelm
parents: 12028
diff changeset
    34
syntax (xsymbols)
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    35
   "Box"        ::"'a temporal => 'a temporal"   ("\\<box> (_)" [80] 80)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    36
   "Diamond"    ::"'a temporal => 'a temporal"   ("\\<diamond> (_)" [80] 80)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    37
   "Leadsto"    ::"'a temporal => 'a temporal => 'a temporal"  (infixr "\\<leadsto>" 22)
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
defs
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    40
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    41
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    42
unlift_def
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    43
  "unlift x == (case x of 
12028
52aa183c15bb replaced Undef by UU;
wenzelm
parents: 10835
diff changeset
    44
                 UU   => arbitrary
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    45
               | Def y   => y)"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    46
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    47
(* this means that for nil and UU the effect is unpredictable *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    48
Init_def
10835
nipkow
parents: 5976
diff changeset
    49
  "Init P s ==  (P (unlift (HD$s)))" 
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    50
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    51
suffix_def
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    52
  "suffix s2 s == ? s1. (Finite s1  & s = s1 @@ s2)" 
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
tsuffix_def
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    55
  "tsuffix s2 s == s2 ~= nil & s2 ~= UU & suffix s2 s"
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
Box_def
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    58
  "([] P) s == ! s2. tsuffix s2 s --> P s2"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    59
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    60
Next_def
10835
nipkow
parents: 5976
diff changeset
    61
  "(Next P) s == if (TL$s=UU | TL$s=nil) then (P s) else P (TL$s)"
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    62
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    63
Diamond_def
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    64
  "<> P == .~ ([] (.~ P))"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    65
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    66
Leadsto_def
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    67
   "P ~> Q == ([] (P .--> (<> Q)))"  
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
validT_def
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    70
  "validT P == ! s. s~=UU & s~=nil --> (s |= P)"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    71
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    72
end