An Ideal Model for an Extended
-Calculus with Renement
Jordi Levy, Jaume Agust, Francesc Esteva and Pere Garca
Centre d'Estudis Avancats de Blanes (CSIC), Cam de Santa Barbara s/n, 17300 Blanes, Girona, Spain.
e-mail: [email protected]
Abstract
In Computer Science, Lambda Calculus has been mainly used as the skeleton of func- tional programming languages. It has also been used as a higher order parameterization mechanism in some specication languages. In this paper we view -calculus as both the applicative structure of a programming formalism and a low-level specication for- malism. Considered as a programming formalism, its operational semantics is the usual one, mainly based on -reduction. Considered as a specication formalism -calculus admits a precise notion of renement between -expressions. This renement relation will stand for the correctness of a step in the incremental development of a program from a specication. The main goal of this paper is to show that -calculus, extended with some set operators, can be interpreted as a specication formalism in a domain whose elements are a particular class of posets (partial ordered sets), the closed ideals. The main reason of such interpretation is that it allows to dene a renement relationship between
-expressions by means of the inclusion relation. Moreover a coherent link between the inclusion order of ideals and the order of their elements is established. Furthermore, with this interpretation -expressions can also be seen as types denoting a set of values and the renement relation can be compared with the subtype relation.
1 Introduction
In Computer Science, Lambda Calculus (i. e. the subject of [Bar81] and [HS86]) has been mainly used as the skeleton of functional programming languages [Lan64]. It has also been used as a higher order parameterization mechanism in some specication languages [ST91]. In this paper we view
-calculus as both the applicative structure of a programming formalism and a low-level specication formalism. Considered as a programming formalism, its opera- tional semantics is the usual one, mainly based on -reduction. More unusual is to consider -calculus as a specication formalism which admits a precise notion of renement between -expressions. By specication we mean here an intensional description of a set of objects sharing some properties and the renement relation expresses the correctness of a step in the incremental development of a program from a specication. Lambda expressions can be considered specications so far we make them denote not elements of a domain 1 as usual, but a particular poset of them. Then an expression can be rened by giving another expres- sion whose denotation is included in the denotation of the former. We model the renementResearch supported by the CICYT project SPES number 880j382.
1We take the category of domains to be the one called consistently complete and!-algebraic partial ordered set, built using Scott's techniques [Sco76]
relation between expressions as the inclusion relation between sets. The limited expressive power of
-calculus as a specication formalism is compensated for by the fact that there is a formal renement relation [LAEG90] which is semidecidable and can be checked by a complete procedure.Having in mind the interpretation of
-expressions as specications, we have taken closed ideals2as denotations of-expressions. There are dierent reasons that support this decision.Ideals establish a coherent link between the inclusion order of ideals and the order of their elements. When introducing the semantics of
-expressions in subsection 1.1, we will see another reason to have ideals as semantic objects. These and other similar reasons have been given in [MPS86] to model polymorphic types as ideals. Furthermore, -expressions can also be seen as types denoting a set of values and the renement relation can be compared with the subtype relation in [Car88] [Rey85] and with the containment relation between types in [Mit88]. In the same research line, there are several systems [ML79] [CABea86] [CH88] [LB88]in which types and values are so intertwined that types become program specications and programs become constructive proofs that such specications are satisable. For instance, in the Calculus of Constructions [CH88],
-expressions have been used to represent both values and types. In that paper and in [ML79], however, value expressions and type expressions are rigorously distinguished and a type relation between values and types is formalized. Less rigorous is the distinction in Nuprl [CABea86] and in Pebble [LB88]. For instance types are taken in Pebble as values at compile time. However in all those systems the distinction between values and types is made in some sense. Here, on the contrary, the distinction is completely dropped from the very beginning and the type membership relation is replaced by a particular subtype relation called renement. Although these considerations about and comparisons between -expressions as specications and as types have guided our intuition and can be exploited in future research as a guide for program development, they will not be further developed in this paper. The construction of the semantic domain of ideals in which this discussion acquires a precise meaning is the priority endeavor here.Given that we want
-expressions to denote ideals and that the set of ideals is closed under union, intersection and cartesian product (see lemma 2.7) it seems natural to extend pure -calculus with these set operators. Besides these operators we have extended pure-calculus with the recursion operator. The syntax of the extended -calculus is then the following one, wheree
ranges over expressions andx
over variables:e
::=x
jtop
jerror
jx:e
je
(e
) je
[e
je
\e
je
e
jfst
(e
) jscd
(e
) jx:e
(1) We want to give semantics to these expressions in the domain of ideals I(U
), the domain of elementsU
being the solution of the equation:U
=K
+U
U
+ [I(U
)!U
] (2) whereK
is any initially given domain and [I(U
) !U
] stands for the set of continuous functions from I(U
) toU
.In subsection 1.1 we motivate the particular form of this equation. The main goal of the paper is to prove that the domain of ideals I(
U
) is a semantic model of the extended -calculus. A simple renement relationship can be dened in this domain of ideals as follows.2Closed ideals are a particular class of posets left closed and closed under least upper bounds of increasing sequences, henceforth ideals for short [MPS86].
An expression
e
1 renes another expressione
2, writtene
1e
2, if the ideal denoted by the rst, [[e
1]], is included in the ideal denoted by the second, [[e
2]], that is:e
1e
2 if and only if [[e
1]][[e
2]]where [[ ]] is used here informally to mean the semantic function whose precise denition is given in section 4. The formalization of the renement relation in a calculus of rene- ments is the subject of another paper [LAEG90]. Based on this calculus we are dening a specication-programming language which allows formal program development following the stepwise renement paradigm.
The rest of the introduction motivates some technical decisions taken in order to interpret extended
-expressions as specications. In section 2 we show that ideals of a domain form also a domain. This result enables us to build a solution of the previously mentioned isomorphism equation (2). In section 3 a natural connection between functions on ideals and ideals of functions on values is dened. The properties of that connection are used in section 4 to prove that the domain of ideals is a model of the extended -calculus. A satisfaction relation is dened between the model and the renement formulae. This opens up the way to the denition of a sound entailment relation on the set of renement formulae.1.1 Semantics of
-expressions as specications
-expressions usually denote elements of a domain solution of an equation similar to the following one:V
=K
+V
V
+ [V
!V
] (3) However, as we have mentioned before, we want the expressions (1) of our extended -calculus denote ideals of some domain of elements. An easy way would be to take the domainV
dened by (3) as the domain of elements on which the set of idealsI(V
) is dened.Unfortunately this does not work. In this subsection we will show why
V
is not adequate and why we need the domainU
dened by (2) as the domain of elements on which to build ideals. To do that we must, rst of all, give an idea of the semantics of -expressions. The detailed semantics of-expressions is the subject of section 4.In the ideals semantic domain the interpretation of the symbols [, \ and in (1) is straightforward. They denote the set operators union, intersection and cartesian product, as intended. Less evident is the interpretation of
-abstraction, application and recursion. The semantics of recursion can be derived from the semantics of -abstraction and application, as known. Therefore, only the semantics of these two constructors will be discussed in the following.The standard interpretation of
-abstraction is a function whose computation is performed using -reduction. In our case, as variables denote ideals, one might expect -abstraction to denote functions from ideals to ideals. But functions on ideals are not ideals. This con icts with the intended semantics. On the one hand we want to keep -reduction as the compu- tational mechanism for our -abstractions and, on the other hand, we want-abstractions denote ideals, not functions on ideals. We need then an appropriate connection between functions on ideals and ideals (of functions on elements). Fortunately there is a natural connection, dened by two maps + and as follows:+ : (I(
V
)!I(V
))!I(V
): I(
V
)!(I(V
)!I(V
))where for any
F
:I(V
)!I(V
), the set +(F
), notedF
+, is dened byF
+ =ff
:V
!V
jf
()2F
(I
)for every I
2I(V
)and
2I
gwhich can be proved to be an ideal, and where for any
I
2I(V
), (I
) notedI
, is dened byI
(J
) =ff
() j2J and f
2I
gUsing + and we can dene the semantics of
-abstractions and applications in I(V
) as follows:[[
x:e
]] = h:
[[e
]][=x]i
+
[[
e
1(e
2)]] = [[[e
1]]]([[e
2]]) On the other hand, using-reduction we have:(
x:e
1)(e
2) =e
1[e
2=x
]Then if we want to have
-reduction as computational mechanism, the following equation must hold:F
+=F
(4)where
F
=:
[[e
]][=x].A necessary condition for this equality to hold (see [SST90]) is that
F
must be an additive function, a morphism with respect to the union operator. However not all functions dened by -expressions are additive. A simple example of a non-additive function is the one dened by the expressionx:x
x
. As can be seen in the following, this function does not satisfy equality (4) for the at domainN
? of natural numbers:(
x:x
x
)(N
?) =N
?N
? 6=f(n;n
)jn
2N
?g= (x:x
x
)+(N
?)This example makes clear that the set of functions from
V
toV
can not catch the behavior of functions fromI(V
) toI(V
). As can be seen by analyzing the example above, the operator + must be dened using functions not fromV
toV
but from I(V
) toV
. Then the basic domain of elements from which ideals are built can not be the solution of (3) but must be the solution of (2). Using the domainU
dened by (2) the denition of the operators + andwhich connect I(
U
)!I(U
) andI(U
) is now:F
+ = ff
:I(U
)!U
jf
(I
)2F
(I
)for every I
2I(U
)gI
(X
) = ff
(X
) jf
2[I(U
)!U
]\I
gAn important result is that with this new denition it can be proved (see theorem 3.6) the following:
F
+ =F
if and only ifF
is a continuous function (5) Then for the equality (5) to hold we must prove that -expressions dene continuous functions on ideals. The proof relies on the fact that ideals are closed under least upper bounds of increasing sequences. This is one of the reasons that have led us to take the domain of closed ideals as semantic domain. It is easy to see that in a wider domain, the domain of order ideals for instance, the functionF
dened byF
(x
) = [y:x
]+ is not continuous.To prove it, let us take an increasing sequence of ideals on the at domain
N
?, dened byff?
;
0::n
ggn2N with least upper bound Fn2Nf?;
0::n
g= 3N
?. IfF
were continuous then the following equality would hold:F
( [n2N
f?
;
0::n
g) =ff
j8I
2H(U
)f
(I
)2N
?g6= [n2N
f
f
j8I
2H(U
)f
(I
)2f?;
0::n
gg= [n2N
F
(f?;
0::n
g) However this equality is not true. The maximum function, dened asmax
(f?;
0::n
g) =n
over these ideals, belongs to the left hand side but not to the right hand side. The order ideal dened by the right hand side contains an increasing sequence of functions f
f
ngn2N dened byf
n(I
) =max
(I
) ifmax
(I
)2 f?;
0::n
g orf
n(I
) = ?otherwise, whose least upper bound is the maximum function, but as it is not closed the maximum function does not need belong to it. The conclusion is that we need the ideals to be closed in order to keep -reduction as the operational semantics of the extended -calculus.2 Domain construction
The semantics of the proposed extended
-calculus (1) depends on the solution of the iso- morphism equation (2) as shown in the previous section. Solutions to isomorphism equations like (3) are usually found using cpos. However, equation (2) introduces a new construction when compared with equation (3), the space of continuous functions [I(U
)!U
]. So, theU
and I(U
) domains are closely intertwined in equation (2). This fact makes it rather dicult to face the solution of (2) using only the properties of cpos. For instance, the proof of the continuity of functions relies on having a constructive way to calculate the least upper bounds (lub) of increasing sequences. There is no such constructive way to compute lubs for the set of ideals I(U
) of a cpoU
, even knowing that I(U
) is a complete lattice (see lemma 2.7).As has been shown in [MPS86] when ideals are involved the suitable structure to work with is the category of domains, given that, the set of ideals of a domain is also a domain (see lemma 2.19). Domains allow to dene a very useful closure operator which can be used to build the minimum ideal that contains a given set. This operator is used, for instance, to dene the embeddings between the sets of ideals in the solution of equation (2). Given an embedding between cpos
D
andE
, to prove that there exists an embedding betweenI(D
) andI(
E
) we have needed to suppose thatD
andE
are domains (see lemma 2.24). The closure operator has been also used to dene the semantics of the applicationI
(see denition 3.1).At the end of the section we use standard techniques to solve the equation (2).
2.1 Preliminary denitions
In this section we present some preliminary denitions.
Denition 2.1
A poset (D;
vD) is said to be a Complete Partial Order (cpo) if 1.D
has a minimum noted by ?D.2. Every increasing sequence f
x
igi0 has a least upper bound (lub), inD
, noted byFi0
x
i.3The least upper bound of an increasing sequence of order ideals is given by their union.
Denition 2.2
Given two cpos (D;
vD) and (E;
vE), a mapf
:D
!E
is said to be continuous if for every increasing sequencefX
igi0 of elements ofD
,Fi0f
(X
i) =f
(Fi0X
i).4Denition 2.3
Given a cpo (D;
vD), a subsetI
D
is said to be an order ideal, notedI
2H(D
), if1.
I
6=;.2. If
y
vDx
andx
2D
theny
2D
.Denition 2.4
An order idealI
D
is said to be a closed ideal (ideal for short), notedI
2I(D
), if3. For every increasing sequence f
x
igi0 such thatx
i 2I
,Fi0x
i 2I
.Denition 2.5
Given two posets (D;
vD) and (E;
vE), the following posets can be dened:1. The coalesced sum(
D
+E;
vD+E) whereD
+E
f(d;
?E)jd
2D
g [ f(?D;e
)je
2E
g and(d;e
)vD+E (d
0;e
0) if and only ifd
vDd
0 ande
vEe
0.2. The smash product (
D
E;
vDE) whereD
E
f(d;e
)jd
2D
?f?Dg ^e
2E
?f?Egg[f(?D;
?E)g and (d;e
) vDE (d
0;e
0) if and only ifd
vDd
0 ande
vEe
0.3. The continuous function space ([
D
!E
];
v[D!E]) wheref
v[D!E]g
if and only if for anyx
2D
we havef
(x
) vEg
(x
). 54. The order ideal set (H(
D
);
vH(D)) whereA
vH(D)B
if and only ifA
B
. 5. The closed ideal set (I(D
);
vI (D)) whereA
vI (D)B
if and only ifA
B
.Lemma 2.6
Given two cpos (D;
vD) and (E;
vE) the following posets are cpos:1. The coalesced sumF (
D
+E;
vD+E) with bottom element (?D;
?E) andi0(
a
i;b
i) = (Fi0a
i;
Fi0b
i) for the increasing sequence f(a
i;b
i)gi0.2. The smash product (
D
E;
vDE) with ?DE = (?D;
?E) and Fi0(a
i;b
i) = (Fi0a
i;
Fi0b
i).3. The function space ([
D
!E
];
v[D!E]) with [?[D!E]](x
) = ?E for anyx
2D
and [Fi0f
i](x
) =Fi0[f
i(x
)].4. The set of order ideals(H(
D
);
vH(D)) with?H(D) =f?DgandFi0X
i =Si0X
i. 5. The set of closed ideals (I(D
);
vI (D)) with?I (D) =f?Dg and Fi0X
i =TfY
2I(
D
) jX
iY for all i
0g.4Note that f continuous implies f monotonic and, therefore, ff(Xi)gi0 is an increasing sequence, so
F
i0f(Xi) exists.
5From now on we will use the convention
f:D!E means thatf maps elements ofDtoEand
f2[D!E] is a stronger condition that meansf:D!E andfis continuous.
Lemma 2.7
Let(I(D
);
vI (D)) be the cpo of closed ideals ofD
. IfX
,Y
2I(D
) thenX
[Y
,X
\Y
,X
Y
2I(D
). Moreover (I(D
);
T;
W) is a complete lattice whereTis the usual intersection andWis dened byWi2IX
iTfY
2I(D
) jX
iY
for alli
2I
g.6
Corollary 2.8
For every nite set fa
1;:::;a
ngD
, the setI
(a1;:::;an) fx
2D
jthere exists a
i 2A such that x
va
ig is a closed ideal. We will nameI
(a1;:::;an) the ideal generated byfa
1;:::;a
ng.Denition 2.9
LetD
be a cpo andx
2D
. We say thatx
is!
-nite if for any increasing sequencefa
igi0 withx
vFi0a
i there existsk
2N
such thatx
va
k.Denition 2.10
LetD
be a cpo.We say that
D
is consistently complete if every upper bounded setX
D
has least upper bound.We say that
D
is!
-algebraic if1.
D
has countably many!
-nite elements.2. For any
x
2D
the set of!
-nite elements less thanx
is directed and hasx
as least upper bound.And, we say that
D
is a domain if 1.D
is consistently complete.2. and
D
is!
-algebraic.Property 2.11
[MPS86]1. Countable at cpos are domains.
2. The cpo constructors +, and [ ! ] send domains to domains.
Lemma 2.12
LetD
be a!
-algebraic cpo. For everyx
2D
there exists an increasing sequencefx
igi0 of!
-nite elements ofD
with Fi0x
i=x
.Proof:
The set of!
-nite elements less thanx
is countable and directed. Letfa
1;:::;a
n;:::
g be this set. Because it is directed, we can construct the increasing chaina
1 vc
1;2 v:::
vc
1;2;:::;n v:::
wherec
1;2;:::;n is an upper bound of fc
1;:::;n?1;a
ng belonging to the set of!
- nite elements less thanx
, that is, belonging to fa
1;:::;a
n;:::
g. Thus, it's easy to see thatFi0
c
1;:::;i=x
. 2!
-algebraic elements of a domain are a countable base that generates all the domain elements using only the least upper bound operator F.6In general, the innite union of closed ideals is not a closed ideal.
2.2 Constructing a domain of ideals
We will prove now that theI( ) constructor also maps domains to domains, in order to ensure that the set of ideals of a domain forms also a domain.
Denition 2.13
For any setX
2P(D
) we dene:X
0 fx
2X
jx
is!
-nitegX
fFi0a
i jfa
igi0is an increasing sequence inX
gProperty 2.14
LetD
be an!
-algebraic cpo.1. The map
C
:H(D
) !H(D
) dened byC
(X
) =X
is a closure operator.2. For all
I
2I(D
) we haveI
0 =I
.3. For all
H
2H(D
) we haveH
0=H
0 andH
0=H
.4. For all ideal increasing sequence f
I
igi0 in I(D
) we have Fi0I
i=Si0I
i0.Proof:
It can be constructed easily from lemma 2.12. 2Denition 2.15
A setX
is said to be maximal complete if for every elementx
2X
, exists a maximal 7 elementm
2X
such thatx
vm
.Fact 2.16
1. The ideal
I
(a1;:::;an) generated by the nite set fa
1;:::;a
ng is maximal complete and the set of maximals ofI
(a1;:::;an) is the set of maximals of fa
1;:::;a
ng. 2. If the idealJ
is maximal complete, then it is generated by the setM
of its maximalelements
J
=I
M.These properties allow us to characterize the
!
-nite ideals ofI(D
).Lemma 2.17
An idealI
2I(D
) is!
-nite (I
2I(D
)0) if and only if it is maximal complete, and the set of maximal elements is nite and contains only!
-nite elements.Proof:
(
)
Letfa
1;:::;a
ngbe the set of maximal elements, and letI
Fi0A
i=Si0A
0i. For every maximal elementsa
r we can saya
r 2 Si0A
0i. But, becausea
r is an!
-nite element there existsk
r2N
such thata
r2A
kr. There are a nite number of maximals, thus there existsk
= maxfk
1;:::;k
ng such thata
i 2A
k for alli
= 1;:::;n
. Using fact 2.16 it is easy to see thatI
A
k.)
)
BecauseD
is a domain,I
0 must be countable. LetI
0 =fa
i ji
2N
gbe an enumeration ofI
0, andI
(a0) vI
(a0;a1) v:::
vI
(a0;:::;an) v:::
vI
be the sequence of ideals generated by fa
0g,fa
0;a
1g,:::
,fa
0;:::;a
ng,:::
An easy computation shows thatI
=Fi0I
(a0;:::;ai) andI
6vI
(a0;:::;ai) for alli
2N
. Therefore,I
is not an!
-nite ideal.7A maximal elementxof a setXis an element ofXwith no other element inXgreater than it.
The rst point can be proved byFi0
I
(a0;:::;ai)=Si0I
(0a0;:::;ai)=Si0fa
0;:::;a
ig=I
0 =I
. The second point,I
6vI
(a0;:::;ai), is justied because fact 2.16 ensures thatI
(a0;:::;ai) satises the lemma conditions (is maximal complete and has a nite set of!
-nite maximal elements),and
I
does not satisfy these conditions. 2Lemma 2.18
IfD
is!
-algebraic,I(D
) is also!
-algebraic.Proof:
1.
There are countably many!
-nite ideals because they are characterized by a nite number of!
-nite elements fromD
, and there are countably many of them.2.
The set of!
-nite ideals less than anyI
2 I(D
) is directed. The proof is an easy consequence of the equalityI
(a1;:::;an)[I
(b1;:::;bm)=I
(a1;:::;an;b1;:::;bm).3.
The lub of such set isI
.We have to nd an increasing sequence f
I
igi0 such thatG
i0
I
i= [i0
I
i0=I
0=I
The set
I
has countably many!
-nite elements (because the number of such elements in the domain is countable). Leta
1;:::;a
n;:::
be an enumeration of them. Then we can construct the increasing sequence takingI
i equal to the ideal generated by fa
1;:::;a
ig. 2Theorem 2.19
IfD
is a domain,I(D
) is also a domain.Proof:
IfD
is a domain, lemma 2.18 ensures that it is!
-algebraic, and lemma 2.7 provesthe completeness. 2
2.3 Embeddings connecting domains of ideals
Here we will dene a functional ^I that maps functions on domains to functions on the corre- sponding domain of ideals. We prove that the functional ^I preserves embeddings, and other properties needed in the following subsection.
Denition 2.20
LetE
andD
be cpos. A continuous map:D
!E
is an embedding if there exists a continuous map R:E
!D
such that R =id
D R vid
EDenition 2.21
Letf
:D
!E
andg
:D
0 !E
0 be embeddings. We denef
^g
,f
^+g
, andf
R!^g
as usual, andf
^g
:D
D
0 !E
E
0 (x;y
) ! (f
(x
);g
(y
))f
^+g
:D
+D
0 !E
+E
0x
!( (
f
(a
);
?E0)if x
= (a;
?D0) (?E;g
(b
))if x
= (?D;b
)f
R!^g
: [D
!D
0] ! [E
!E
0]h
!g
h
f
R^
H(
f
) : H(D
) ! H(E
)A
! fy
2E
j9x
2A y
vf
(x
)g^
I(
f
) : I(D
) ! I(E
)A
! fy
2E
j 9x
2A y
vf
(x
)g8Fact 2.22
^
I(
f
)(A)=fy
2E
j9x
2A y
vf
(x
)g=fy
2E
0 j 9x
2A
0y
vf
(x
)gProof:
UsingI
=I
0, that can be deduced from properties 2.14, we havef
y
2E
j9x
2A y
vf
(x
)g=fy
2E
0 j9x
2A y
vf
(x
)gNow, if
x
is not!
-nite, there exists an increasing sequence fx
igi0 of!
-nite elements withx
= Fi0x
i. Using the continuity off
,y
vf
(x
) =f
(Fi0x
i) = Fi0f
(x
i), and using the!
-niteness ofy
, there existsn
2N
such thaty
vf
(x
n), withx
n2A
0, becausex
nvx
andA
is an ideal set. Therefore, we can say that if there existsx
2A
withy
vf
(x
), then there existsx
02A
0 withy
vf
(x
0)vf
(x
), which ensures:f
y
2E
0 j9x
2A y
vf
(x
)g=fy
2E
0 j9x
2A
0y
vf
(x
)g2
Lemma 2.23
Letf
:D
!E
andg
:E
!F
be continuous functions over domains then ^I(g
)I^(f
) = ^I(g
f
).8In this denition we suppose in addition thatDandE are domains.
Proof:
^
I(
g
)I^(f
)(A) = fz
2F
0 j9y
2I^(f
)(A)0z
vg
(y
)g= f
z
2F
0 j9y
2fy
02E
0j9x
2A
0y
0vf
(x
)gz
vg
(y
)g= f
z
2F
0 j9y
2E
0 9x
2A
0y
vf
(x
) andz
vg
(y
)g=
:::
But, because
z
vg
(y
) andy
vf
(x
), by the monotonicity ofg
we can ensure thatz
vg
(f
(x
)).Then
:::
fz
2F
0 j 9x
2A
0z
vg
(f
(x
))g= ^I(g
f
)(A)In the other direction, from
z
vg
(f
(x
)) we have to nd an!
-nitey
such thatz
vg
(y
) andy
vf
(x
). We already know thatx
andz
are!
-nite. Iff
(x
) is!
-nite we can takey
f
(x
).If this is not the case, then there exists an increasing sequence f
t
igi0 of!
-nite elements such thatf
(x
) = Fi0t
i. Using the continuity ofg
we can sayz
vg
(f
(x
))vg
(Fi0t
i) =Fi0
g
(t
i). And using the!
-niteness ofz
, there existsn
2N
such thatz
vg
(t
n). We can take theny
t
n, which ensuresy
vf
(x
) and the!
-nite ofy
, therefore we can say:::
fz
2F
0 j 9x
2A
0z
vg
(f
(x
))g= ^I(g
f
)(A)2
Lemma 2.24
Letf
andg
be embeddings. Then the following functions are embed- dings:1.
f
^g
, with (f
^g
)R=f
R^g
R. 2.f
^+g
, with (f
^+g
)R=f
R^+g
R. 3.f
R!^g
, with (f
R!^g
)R=f
!^g
R. 4. ^H(f
) with ( ^H(f
))R= ^H(f
R).5. ^I(
f
) with (^I(f
))R= ^I(f
R).6.
g
f
with(g
f
)R=f
Rg
R.Proof:
We will prove the ^I case1.
IfA
is an ideal then ^I(f
)(A) is also an ideal.It's easy to see that
B
fy
2E
j 9x
2A y
vf
(x
)g is an hereditary set because ify
02B
then there existsx
2A
such thaty
0vf
(x
), and ify
vy
0 we can nd anx
2A
0 (the samex
that fory
0) such thaty
vf
(x
) (which is the condition fory
2B
).The property 2.14 allows to prove that f
y
2E
j9x
2A y
vf
(x
)g is an ideal set of I(E
) ifE
is a domain, because it is the closure of an order ideal ofH(E
).2.
Iff
is continuous then ^I(f
) is also continuous.We have
^
I(
f
)(Fn0An) = f
y
2E
0 j9x
2[Gn0
A
n]0y
vf
(x
)g=fy
2E
0 j9x
2 [n0
A
0ny
vf
(x
)g= [
n0
f
y
2E
0 j9x
2A
0ny
vf
(x
)g= [n0I^(
f
)(An) = Gn0I^(
f
)(An)3.
Iff
is an embedding then ^I(f
) is also an embedding, with ^I(f
)R= ^I(f
R).The function ^I(
f
R) is continuous becausef
Ris continuous; let us see that it satises the two relations. For the rst one, using lemma 2.23 we have^
I(
f
R)I^(f
)(A)= ^I(f
Rf
)(A)=fy
2D
j9x
2A y
vf
R(f
(x
)) =x
g=A
=A
becausef
is an embedding. For the second one, using the same lemma,^
I(
f
)I^(f
R)(A)= ^I(f
f
R)(A)=fy
2E
j9x
2A y
vf
(f
R(x
))vx
gA
2
Fact 2.25
Letf
:D
!E
be an embedding between the domainsD
andE
, andA
2I(D
). For any idealI
2I(E
) verifying that for anyy
2I
withf
R(y
) 2A
, we have ^I(f
)(A)I
.Lemma 2.26
The functional ^I is continuous, that is, for every increasing sequencef
f
igi0 and every idealA
2I(D
), ^I(Fi0f
i)(A) =Fi0I^(f
i)(A) is satised.Proof:
^
I(G
i0
f
i)(A)=fy
2E
0 j9x
2A
0y
v[Gi0
f
i](x
) = Gi0
f
i(x
)g=:::
Using that
y
is!
-nite, we can say that there existsn
2N
such thaty
vf
n(x
). Thenf
y
2E
0 j9x
2A
0 9n
2N y
vf
n(x
)g= [i0I^(
f
i)(A)0= Gi0I^(
f
i)(A)2
In the domain construction it is shown why the continuity of all functionals between cpos is important.
2.4 Solving the isomorphism equation
Formally we dene this semantic domain
U
as the least solution of the isomorphism:U
=K
+U
U
+ [I(U
)!U
]To construct the semantic domain
U
we use an initial non empty domain of values (K;
vK), with bottom element (?K). In this domain we include all the predened constants we want to have. It would be, for instance:int
. # &
1 2 3
bool
. &
true false
We enrich this initial domain with pairs and functions in order to construct our semantic domain.
To construct the domain