src/HOL/UNITY/Extend.thy
author paulson
Wed Aug 25 10:58:08 1999 +0200 (1999-08-25)
changeset 7342 532841541d73
parent 6677 629b4b3d5bee
child 7378 ed9230a0a700
permissions -rw-r--r--
project constants
paulson@6297
     1
(*  Title:      HOL/UNITY/Extend.thy
paulson@6297
     2
    ID:         $Id$
paulson@6297
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
paulson@6297
     4
    Copyright   1998  University of Cambridge
paulson@6297
     5
paulson@6297
     6
Extending of state sets
paulson@6297
     7
  function f (forget)    maps the extended state to the original state
paulson@6297
     8
  function g (forgotten) maps the extended state to the "extending part"
paulson@6297
     9
*)
paulson@6297
    10
paulson@6297
    11
Extend = Union + Comp +
paulson@6297
    12
paulson@6297
    13
constdefs
paulson@6297
    14
paulson@6297
    15
  extend_set :: "['a*'b => 'c, 'a set] => 'c set"
paulson@6297
    16
    "extend_set h A == h `` (A Times UNIV)"
paulson@6297
    17
paulson@7342
    18
  project_set :: "['a*'b => 'c, 'c set] => 'a set"
paulson@7342
    19
    "project_set h C == {x. EX y. h(x,y) : C}"
paulson@7342
    20
paulson@7342
    21
  extend_act :: "['a*'b => 'c, ('a*'a) set] => ('c*'c) set"
paulson@6677
    22
    "extend_act h act == UN (s,s'): act. UN y. {(h(s,y), h(s',y))}"
paulson@6297
    23
paulson@7342
    24
  project_act :: "['a*'b => 'c, ('c*'c) set] => ('a*'a) set"
paulson@7342
    25
    "project_act h act == {(x,x'). EX y y'. (h(x,y), h(x',y')) : act}"
paulson@7342
    26
paulson@6297
    27
  extend :: "['a*'b => 'c, 'a program] => 'c program"
paulson@6297
    28
    "extend h F == mk_program (extend_set h (Init F),
paulson@6297
    29
			       extend_act h `` Acts F)"
paulson@6297
    30
paulson@7342
    31
  project :: "['a*'b => 'c, 'c program] => 'a program"
paulson@7342
    32
    "project h F == mk_program (project_set h (Init F),
paulson@7342
    33
			        project_act h `` Acts F)"
paulson@7342
    34
paulson@6297
    35
locale Extend =
paulson@6297
    36
  fixes 
paulson@6297
    37
    f       :: 'c => 'a
paulson@6297
    38
    g       :: 'c => 'b
paulson@6297
    39
    h       :: "'a*'b => 'c"    (*isomorphism between 'a * 'b and 'c *)
paulson@6297
    40
    slice   :: ['c set, 'b] => 'a set
paulson@6297
    41
    f_act   :: "('c * 'c) set => ('a*'a) set"
paulson@6297
    42
paulson@6297
    43
  assumes
paulson@6297
    44
    inj_h  "inj h"
paulson@6297
    45
    surj_h "surj h"
paulson@6297
    46
  defines
paulson@6297
    47
    f_def       "f z == fst (inv h z)"
paulson@6297
    48
    g_def       "g z == snd (inv h z)"
paulson@6297
    49
    slice_def   "slice Z y == {x. h(x,y) : Z}"
paulson@6297
    50
    f_act_def   "f_act act == (%(z,z'). (f z, f z')) `` act"
paulson@6297
    51
paulson@6297
    52
end