src/ZF/UNITY/WFair.thy
author paulson
Wed, 19 Dec 2001 11:13:27 +0100
changeset 12552 d2d2ab3f1f37
parent 12195 ed2893765a08
child 14077 37c964462747
permissions -rw-r--r--
separation of the AC part of Main into Main_ZFC, plus a few new lemmas
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     1
(*  Title:      HOL/UNITY/WFair.thy
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     2
    ID:         $Id$
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     3
    Author:     Sidi Ehmety, Computer Laboratory
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     4
    Copyright   1998  University of Cambridge
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     5
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     6
Weak Fairness versions of transient, ensures, leadsTo.
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     7
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     8
From Misra, "A Logic for Concurrent Programming", 1994
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     9
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    10
Theory ported from HOL.
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    11
*)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    12
12552
d2d2ab3f1f37 separation of the AC part of Main into Main_ZFC, plus a few new lemmas
paulson
parents: 12195
diff changeset
    13
WFair = UNITY + Main_ZFC + 
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    14
constdefs
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    15
  
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 11479
diff changeset
    16
  (* This definition specifies weak fairness.  The rest of the theory
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    17
    is generic to all forms of fairness.*) 
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    18
 transient :: "i=>i"
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 11479
diff changeset
    19
  "transient(A) =={F:program. (EX act: Acts(F). A<=domain(act) &
ed2893765a08 *** empty log message ***
ehmety
parents: 11479
diff changeset
    20
			       act``A <= state-A) & st_set(A)}"
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    21
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    22
  ensures :: "[i,i] => i"       (infixl 60)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    23
  "A ensures B == ((A-B) co (A Un B)) Int transient(A-B)"
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    24
  
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    25
consts
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    26
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    27
  (*LEADS-TO constant for the inductive definition*)
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 11479
diff changeset
    28
  leads :: "[i, i]=>i"
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    29
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 11479
diff changeset
    30
inductive 
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    31
  domains
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 11479
diff changeset
    32
     "leads(D, F)" <= "Pow(D)*Pow(D)"
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    33
  intrs 
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 11479
diff changeset
    34
    Basis  "[| F:A ensures B;  A:Pow(D); B:Pow(D) |] ==> <A,B>:leads(D, F)"
ed2893765a08 *** empty log message ***
ehmety
parents: 11479
diff changeset
    35
    Trans  "[| <A,B> : leads(D, F); <B,C> : leads(D, F) |] ==>  <A,C>:leads(D, F)"
ed2893765a08 *** empty log message ***
ehmety
parents: 11479
diff changeset
    36
    Union   "[| S:Pow({A:S. <A, B>:leads(D, F)}); B:Pow(D); S:Pow(Pow(D)) |] ==> 
ed2893765a08 *** empty log message ***
ehmety
parents: 11479
diff changeset
    37
	      <Union(S),B>:leads(D, F)"
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    38
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    39
  monos        Pow_mono
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 11479
diff changeset
    40
  type_intrs  "[Union_PowI, UnionI, PowI]"
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    41
 
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    42
constdefs
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    43
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 11479
diff changeset
    44
  (* The Visible version of the LEADS-TO relation*)
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    45
  leadsTo :: "[i, i] => i"       (infixl 60)
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 11479
diff changeset
    46
  "A leadsTo B == {F:program. <A,B>:leads(state, F)}"
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    47
  
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 11479
diff changeset
    48
  (* wlt(F, B) is the largest set that leads to B*)
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    49
  wlt :: "[i, i] => i"
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 11479
diff changeset
    50
    "wlt(F, B) == Union({A:Pow(state). F: A leadsTo B})"
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    51
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    52
syntax (xsymbols)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    53
  "op leadsTo" :: "[i, i] => i" (infixl "\\<longmapsto>" 60)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    54
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    55
end