src/HOL/UNITY/Union.thy
author paulson
Mon Oct 11 10:53:39 1999 +0200 (1999-10-11)
changeset 7826 c6a8b73b6c2a
parent 7359 98a2afab3f86
child 7878 43b03d412b82
permissions -rw-r--r--
working shapshot with "projecting" and "extending"
paulson@5252
     1
(*  Title:      HOL/UNITY/Union.thy
paulson@5252
     2
    ID:         $Id$
paulson@5252
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
paulson@5252
     4
    Copyright   1998  University of Cambridge
paulson@5252
     5
paulson@5252
     6
Unions of programs
paulson@5252
     7
paulson@5804
     8
Partly from Misra's Chapter 5: Asynchronous Compositions of Programs
paulson@7359
     9
paulson@7359
    10
Do we need a Meet operator?  (Aka Intersection)
paulson@5252
    11
*)
paulson@5252
    12
paulson@5252
    13
Union = SubstAx + FP +
paulson@5252
    14
paulson@5252
    15
constdefs
paulson@5648
    16
  JOIN  :: ['a set, 'a => 'b program] => 'b program
paulson@6295
    17
    "JOIN I F == mk_program (INT i:I. Init (F i), UN i:I. Acts (F i))"
paulson@5252
    18
paulson@5648
    19
  Join :: ['a program, 'a program] => 'a program      (infixl 65)
paulson@6295
    20
    "F Join G == mk_program (Init F Int Init G, Acts F Un Acts G)"
paulson@5252
    21
paulson@6295
    22
  SKIP :: 'a program
paulson@6295
    23
    "SKIP == mk_program (UNIV, {})"
paulson@5259
    24
paulson@5648
    25
  Diff :: "['a program, ('a * 'a)set set] => 'a program"
paulson@6295
    26
    "Diff F acts == mk_program (Init F, Acts F - acts)"
paulson@5648
    27
paulson@5804
    28
  (*The set of systems that regard "v" as local to F*)
paulson@5648
    29
  localTo :: ['a => 'b, 'a program] => 'a program set  (infixl 80)
paulson@5804
    30
    "v localTo F == {G. ALL z. Diff G (Acts F) : stable {s. v s = z}}"
paulson@5804
    31
paulson@7826
    32
  (*Two programs with disjoint actions, except for identity actions.
paulson@7826
    33
    It's a weak property but still useful.*)
paulson@5804
    34
  Disjoint :: ['a program, 'a program] => bool
paulson@6295
    35
    "Disjoint F G == Acts F Int Acts G <= {Id}"
paulson@5648
    36
paulson@5313
    37
syntax
paulson@7359
    38
  "@JOIN1"     :: [pttrns, 'b set] => 'b set         ("(3JN _./ _)" 10)
paulson@5313
    39
  "@JOIN"      :: [pttrn, 'a set, 'b set] => 'b set  ("(3JN _:_./ _)" 10)
paulson@5313
    40
paulson@5313
    41
translations
paulson@5313
    42
  "JN x:A. B"   == "JOIN A (%x. B)"
paulson@7359
    43
  "JN x y. B"   == "JN x. JN y. B"
paulson@7359
    44
  "JN x. B"     == "JOIN UNIV (%x. B)"
paulson@5313
    45
paulson@5252
    46
end