src/HOL/UNITY/Extend.thy
author paulson
Wed May 24 18:40:01 2000 +0200 (2000-05-24)
changeset 8948 b797cfa3548d
parent 8703 816d8f6513be
child 10064 1a77667b21ef
permissions -rw-r--r--
restructuring: LessThan.ML mostly moved to HOL/SetInterval.ML
     1 (*  Title:      HOL/UNITY/Extend.thy
     2     ID:         $Id$
     3     Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
     4     Copyright   1998  University of Cambridge
     5 
     6 Extending of state sets
     7   function f (forget)    maps the extended state to the original state
     8   function g (forgotten) maps the extended state to the "extending part"
     9 *)
    10 
    11 Extend = Guar +
    12 
    13 constdefs
    14 
    15   (*MOVE to Relation.thy?*)
    16   Restrict :: "[ 'a set, ('a*'b) set] => ('a*'b) set"
    17     "Restrict A r == r Int (A <*> UNIV)"
    18 
    19   good_map :: "['a*'b => 'c] => bool"
    20     "good_map h == surj h & (ALL x y. fst (inv h (h (x,y))) = x)"
    21      (*Using the locale constant "f", this is  f (h (x,y))) = x*)
    22   
    23   extend_set :: "['a*'b => 'c, 'a set] => 'c set"
    24     "extend_set h A == h `` (A <*> UNIV)"
    25 
    26   project_set :: "['a*'b => 'c, 'c set] => 'a set"
    27     "project_set h C == {x. EX y. h(x,y) : C}"
    28 
    29   extend_act :: "['a*'b => 'c, ('a*'a) set] => ('c*'c) set"
    30     "extend_act h == %act. UN (s,s'): act. UN y. {(h(s,y), h(s',y))}"
    31 
    32   project_act :: "['a*'b => 'c, ('c*'c) set] => ('a*'a) set"
    33     "project_act h act == {(x,x'). EX y y'. (h(x,y), h(x',y')) : act}"
    34 
    35   extend :: "['a*'b => 'c, 'a program] => 'c program"
    36     "extend h F == mk_program (extend_set h (Init F),
    37 			       extend_act h `` Acts F)"
    38 
    39   (*Argument C allows weak safety laws to be projected*)
    40   project :: "['a*'b => 'c, 'c set, 'c program] => 'a program"
    41     "project h C F == mk_program (project_set h (Init F),
    42 		  	          project_act h `` Restrict C `` Acts F)"
    43 
    44 locale Extend =
    45   fixes 
    46     f       :: 'c => 'a
    47     g       :: 'c => 'b
    48     h       :: "'a*'b => 'c"    (*isomorphism between 'a * 'b and 'c *)
    49     slice   :: ['c set, 'b] => 'a set
    50 
    51   assumes
    52     good_h  "good_map h"
    53   defines
    54     f_def       "f z == fst (inv h z)"
    55     g_def       "g z == snd (inv h z)"
    56     slice_def   "slice Z y == {x. h(x,y) : Z}"
    57 
    58 end