src/HOL/UNITY/WFair.thy
author paulson
Fri, 03 Apr 1998 12:34:33 +0200
changeset 4776 1f9362e769c1
child 5155 21177b8a4d7f
permissions -rw-r--r--
New UNITY theory
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4776
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
     1
(*  Title:      HOL/UNITY/WFair
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
     2
    ID:         $Id$
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
     4
    Copyright   1998  University of Cambridge
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
     5
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
     6
Weak Fairness versions of transient, ensures, leadsTo.
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
     7
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
     8
From Misra, "A Logic for Concurrent Programming", 1994
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
     9
*)
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    10
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    11
WFair = Traces + Vimage +
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    12
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    13
constdefs
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    14
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    15
  transient :: "[('a * 'a)set set, 'a set] => bool"
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    16
    "transient Acts A == EX act:Acts. A <= Domain act & act^^A <= Compl A"
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    17
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    18
  ensures :: "[('a * 'a)set set, 'a set, 'a set] => bool"
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    19
    "ensures Acts A B == constrains Acts (A-B) (A Un B) & transient Acts (A-B)"
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    20
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    21
consts leadsTo :: "[('a * 'a)set set, 'a set, 'a set] => bool"
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    22
       leadsto :: "[('a * 'a)set set] => ('a set * 'a set) set"
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    23
  
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    24
translations
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    25
  "leadsTo Acts A B" == "(A,B) : leadsto Acts"
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    26
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    27
inductive "leadsto Acts"
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    28
  intrs 
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    29
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    30
    Basis  "ensures Acts A B ==> leadsTo Acts A B"
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    31
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    32
    Trans  "[| leadsTo Acts A B;  leadsTo Acts B C |]
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    33
	   ==> leadsTo Acts A C"
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    34
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    35
    Union  "(UN A:S. {(A,B)}) : Pow (leadsto Acts)
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    36
	   ==> leadsTo Acts (Union S) B"
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    37
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    38
  monos "[Pow_mono]"
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    39
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    40
constdefs wlt :: "[('a * 'a)set set, 'a set] => 'a set"
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    41
  "wlt Acts B == Union {A. leadsTo Acts A B}"
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    42
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    43
end