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