author | paulson |
Tue, 31 Aug 1999 15:56:56 +0200 | |
changeset 7399 | cf780c2bcccf |
parent 7378 | ed9230a0a700 |
child 7482 | 7badd511844d |
permissions | -rw-r--r-- |
6297 | 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 |
||
7399
cf780c2bcccf
changed "component" infix in HOL/UNITY/Comp.thy to be overloaded <
paulson
parents:
7378
diff
changeset
|
11 |
Extend = Guar + |
6297 | 12 |
|
13 |
constdefs |
|
14 |
||
15 |
extend_set :: "['a*'b => 'c, 'a set] => 'c set" |
|
16 |
"extend_set h A == h `` (A Times UNIV)" |
|
17 |
||
7342 | 18 |
project_set :: "['a*'b => 'c, 'c set] => 'a set" |
19 |
"project_set h C == {x. EX y. h(x,y) : C}" |
|
20 |
||
21 |
extend_act :: "['a*'b => 'c, ('a*'a) set] => ('c*'c) set" |
|
6677 | 22 |
"extend_act h act == UN (s,s'): act. UN y. {(h(s,y), h(s',y))}" |
6297 | 23 |
|
7342 | 24 |
project_act :: "['a*'b => 'c, ('c*'c) set] => ('a*'a) set" |
25 |
"project_act h act == {(x,x'). EX y y'. (h(x,y), h(x',y')) : act}" |
|
26 |
||
6297 | 27 |
extend :: "['a*'b => 'c, 'a program] => 'c program" |
28 |
"extend h F == mk_program (extend_set h (Init F), |
|
29 |
extend_act h `` Acts F)" |
|
30 |
||
7342 | 31 |
project :: "['a*'b => 'c, 'c program] => 'a program" |
32 |
"project h F == mk_program (project_set h (Init F), |
|
33 |
project_act h `` Acts F)" |
|
34 |
||
6297 | 35 |
locale Extend = |
36 |
fixes |
|
37 |
f :: 'c => 'a |
|
38 |
g :: 'c => 'b |
|
39 |
h :: "'a*'b => 'c" (*isomorphism between 'a * 'b and 'c *) |
|
40 |
slice :: ['c set, 'b] => 'a set |
|
41 |
f_act :: "('c * 'c) set => ('a*'a) set" |
|
42 |
||
43 |
assumes |
|
7378 | 44 |
bij_h "bij h" |
6297 | 45 |
defines |
46 |
f_def "f z == fst (inv h z)" |
|
47 |
g_def "g z == snd (inv h z)" |
|
48 |
slice_def "slice Z y == {x. h(x,y) : Z}" |
|
49 |
f_act_def "f_act act == (%(z,z'). (f z, f z')) `` act" |
|
50 |
||
51 |
end |