0% found this document useful (0 votes)
14 views22 pages

Longo and Moggi - CCcateg-for-types

Uploaded by

jtpaasch
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views22 pages

Longo and Moggi - CCcateg-for-types

Uploaded by

jtpaasch
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

G. Longo, E. Moggi.

Cartesian closed categories of enumerations


and effective type structures. in: Khan, MacQueen, Plotkin (Eds.),
Symposium on "Semantics of Data Types", LNCS, vol. 173,
Springer Verlag, 1984.
CARTESIAN CI.OSEDCATE(]CRIES OF F _ ~ T I C N S

FCREFFECTIVE TYPE STRUCTLRES

G. LCN33, E. NIDC~I

UNIVERSITA DI PISA
DiDartimento di Informatica
Corso Italia 40
56100 PISA
ITALIE

PART I

§.0 INTRODUCTION - (to Part I and II) -. By "data type" one usually in-
tends a set of objects of the same "type" or "kind", suitable for mani-

pulation by a computer program. Of course, computers actually manipula-

te formal r e p r e s e n t a t i o n s of objects. The purpose of the mathematical

semantics of p r o g r a m m i n g languages, though, is to characterize data ty-


pes (and functions on them) in a way which is independent of any speci-

fic r e p r e s e n t a t i o n mechanism. Thus the objects one deals with are mo-

stly elements of domains b o r r o w e d from Set-Theory, Algebra, Category

Theory .... whose meaning is well u n d e r s t o o d w i t h i n each framework and


does not depend on the practice of programming. However, by doing so,
what is lost is the notion of effective computability, w h i c h has an in-

trinsic operational character. This notion may be r e c o v e r e d by a sui-


table definition of "computable'object" in abstract set-theoretic, al-
gebraic, category-theoretic ... settings.

In particular, a more specific m o t i v a t i o n for the study of effec-


tiveness over semantic domains may be suggested by the following analo-

gY-
The categories one needs for interpreting high level p r o g r a m m i n g
languages must possess strong completeness and closure properties so

R e s e a r c h p a r t i a l l y supported by Min. P.I. (fondi 40%) and in part by


C o n s i g l i o Nazionale delle Ricerche, grant n ° 83.00031.01, under the
auspices of the U . S . - I t a l y Cooperative Science Program.
2~

that the existence of objects, which are formally given by general de-

finitional tools, is "a priori" assured: e.g. we want that cartesian

products and m o r p h i s m spaces still belong to the given category, for

these c o n s t r u c t s are c o m m o n l y used in the design of high level languages.

Similarly, completeness and closure properties are the key idea

for defining domains and categories in several areas of Mathematics,

Banach, Hilbert or Sobolev spaces, say, may be c o n s i d e r e d as the (metric)

completion of the p o s s i b l e solutions of a given set of equations. Once

the solution of the p r o b l e m studied is found in one such a space, it is

then time to ask w h e t h e r it is an "acceptable" solution from the inten-

ded v i e w p o i n t or w h e t h e r it has been added by the completion technique.

For example, for a given set of partial differential equations, one may

(easely) find a solution in the r e l a t e d (Sobolev) space and then check

whether it is an a c c e p t a b l e (regular) solution, i.e. w h e t h e r it is dif-

feren t i a b l e in the ordinary sense.

Now, acceptable for a computer scientist means computable. It is

then w o r t h pursuing a general notion of e f f e c t i v e n e s s over abstract data

types, since computable elements and maps provide the "regular" inter-

pretation of p r o g r a m m i n g constructs over semantic ~omains. Preliminary

investigations on the e f f e c t i v e n e s s of the semantics of programs may be

found in Scott (1976), Giannini & Longo (1983), Kanda (1984).

Unfortunately, the natural numbers, ~, and the partial recursive

functions, PR, are not sufficient for this investigation, since, in ge-

neral, typed and type-free languages cannot be directly interpreted over

PR or ~. PR and ~, though, may be used for defining effectiveness over

more general data types. The methods are b o r r o w e d from higher type Re-

cursion Theory or c o m p u t a b i l i t y in abstract structures, nowadays strictly

interelated topics in view of the work done in the 70's by several au-

thors (see references).

This paper is m o t i v a t e d by the study of c o m p l e t e n e s s and closure

properties of natural categories of e f f e c t i v e l y given data types.

Countability, say, is a useful assumption for dealing with effectiveness


over abstract data types.

Suppose one is given two countable sets A and B, and two numbe-

rings (onto maps) eA ~ ~ -~A, e B : ~ -+B. There is then a natural de-


237

finition of computable map between A and B : call g : A , B

(effective) m o r p h i s m iff there exists a recursive function f such that


the f o l l o w i n g diagram commutes:

f
[0 --+~

(1 ) eA[ I eB

A +B
g

The category of n u m b e r e d sets (EN) whose objects are pairs such

as A : (A,e A) and m o r p h i s m s defined as in (i), has been studied in


Ershov (1973, 1975). An introduction and some applications may be found
in Visser (1980) and Bernardi & Sorbi (1983), mainly, or Barendregt &
Longo (1982).

The first question one may ask about EN is whether there is na-
tural way to give, effectively, a numbering to the set EN(A,B), the

set of m o r p h i s m s from A to B : (B,eB). In general, there is no


such a "uniform" and "effective '{ coding of EN(A,B), given A and B.

As a matter of fact EN is far away from being Cartesian Closed.

Nonetheless EN has several nice properties. We recall a notion

and a simple c o n s e q u e n c e of it, whose relevance should be clear.

(R is the set of the (total) recursive functions; _~ is (~,id)).

0.i Definition. A is a precomplete n u m b e r e d set if

(2) Vf PR ~]f'eR Vn(f(n) + ~ e A ( f ' ( n ) ) : eA(f(n))


(i.e. f' extends f w.r.t. (A,eA)).
A is complete if

(2) above holds and :~aeA Vn(f(n)+ ~ eA(f'(n)) : a)


(a is a special (bottom) element).

0.2 G e n e r a l i z e d R e c u r s i o n Theorem. Let (A,e A) be precomplete. Then

(3) YfePR~n(f(n)+ ~ eA(f(n)) = eA(n)).


The partial recursive functions suggest an obvious notion of partial
m o r p h i s m for n u m b e r e d sets.

0.3 Definition. A and B be numbered sets. Then feEN (A,B) (f is


p -- --
238

a partial morphism) if ~f'{PR foe A = e B of'

For the purposes of this paper, partial morphisms will be studied

in a general category-theoretic setting, since partial maps come out

naturally in c o m p u t a b i l i t y theory. Note that (3) above is equivalent

to Vf EN p (w,A)
-- _ ]n(f(n)+ = f(n) = eA(n)) -

Completeness may be related to a Least F ix e d Point Theorem (see later).

Of course, (3) in T h e o r e m 0.2 is a very desirable property for

handling abstract data types, in view of the recursive definitions.

But exactly because of this, one may want more; namely the p o s s i b i l i t y

of i n h e r i t i n g completeness and other p r o p e r t i e s at higher types, i.e.

for the set of m o r p h i s m s on n u m b e r e d sets, since functions are among

the typical data to be mostly defined recursively. This cannot be done

in general, in view of the lack of the above m e n t i o n e d closure proper-

ties for EN.

There are two r e a s o n a b l e ways to obtain the C a r t e s i a n Closure (CC)

of a C a t e g o r y such as EN: one may restrict the attention to a subcate-

gory or enlarge the Category itself. The point is that both ways should

be "natural" and should give interesting categories.

In Part I we study a direct, elementary characterization of the

"main" types of a well known sub-CCC of EN, Scott's effectively given

domains (their c o m p u t a b l e sub-objects, to be precise). This will be

done by a type structure over m, based on two simple notions: accepta-

ble p a i r i n g and relative (G~del-)numberings (§.i).

§.2 and 3 presents CCC's with partial morphisms and partial objects

and relates domains to EN also by using these notions.

Part II will introduce the CCC of G e n e r a l i z e d Enumerations, whose

definition is inspired by the notion of relative numbering and will

relate it, as well as its c o m p u t a b i l i t y properties, to EN.

§.i An e l e m e n t a r y approach to higher type c o m p u t a b i l i t y

Let 0 be the type of w. Then the integer types are defined by

n+l;=n +n and the pure types by n+l;:n +0. Partial computable func-

tionals in the integer and pure types may be i n t r o d u c e d by using only

w and PR, with no mention of the c a t e g o r y - t h e o r e t i c and c o n t i n u i t y


239

properties of EN and Scott's domains, at f i r s t reading. The H e r e d i t a -

ry P a r t i a l Effective Functionals were given in L o n g o (1982) (see L o n g o

& Moggi (1983) for a few r e s u l t s and L o n g o (1984) for a d i s c u s s i o n ) .

i.i Definition. Let L° = ~ and fix L c w--~ Define then

L n+l.5 = {~ : L n ÷Ln+i/~xy.~(x)(y)cL n+l}

L n+2 = {f : L ~n+l + L n + I / ~eLn+l'5 f o C a L n+l.5}.

The key idea is that (some) functions in L n'5 g~delize L n+l by Ln

(see the n o t i o n of r e l a t i v e numberings in 3.2.2).

There is a n o t h e r way to look at the HPEF, which makes explicit the

role of the p a i r i n g function <,>, implicitely used in the d e f i n i t i o n


n+l.5
of L

1.2 Definition. Let U be a set and F ~ U---~U. Then <,>:U×U ÷U


is an a c c e p t a b l e pairing w.r.t. F if:

1) ~pl,P2cF Vx,yeU pi(<Xl,X2>) = xi, w h e r e Pl and P2 are total

2) ~f,gcF Xx.<f(x),g(x)>~F.

Following the p o l i s h tradition in c o n s t r u c t i v e mathematics, an in-

teresting class of (pure) type 2 total functionals on R is d e f i n e d

in R o g e r s (1967; p. 364). Namely, f:R--+ ~ is B a n a c h - M a z u r if

Yg~R ~hcR f(ly.g(<x,y>)) = h(x), where <,>:~x~ ÷ ~ is an e f f e c t i v e

pairing function (an a c c e p t a b l e pairing w.r.t. R, in our terminology).

This can be g e n e r a l i z e d and e x t e n d e d athigher types as follows.

1.3 Definition. (GBM) Let BM ° = ~ and fix BM 1 S ~ - - ~ ~. Define then


BM n+2 B M n + I - ~ B M n+l by

f e B M n+2 if ~ g ~ B M n+l ~ h e B M n+l Yx BM n f(ly.g(<x,g>)) = ly.h(<x,y>),

where <,>:BM b x BM n ÷BM n is an a c c e p t a b l e pairing w.r.t. BMn+I~

What remains to v e r i f i e d is that <,> actually exists in any type,


1
for a suitable c h o i c e of BM . This w i l l be done in §.3.
It is now e a s y to see that, if L1 BM 1 then Vn Ln BM n

Just notice that

n+l.5 n+l n
(3) geL iff ~g'cL Yx,ycL g(x)(y) = g'(<x,y>).
240

n+2 n+l
Thus, for fcL , fog(x) = f(ly.g'(<x,y>)) and, for some hcL ,
n+2
fog(x) : ly.h(<x,y>), by the d e f i n i t i o n of L and (3) applied to

fog. The rest is obvious.

It is also a simple exercise to give a variant in the pure types

of the GBM or the HPEF. Thus these functionals are an easy way to de-
1
fine partial c o m p u t a b l e functions in higher types, by taking L = PR
1
or BM = PR. Partial maps turned out to be essential in c o m p u t a b i l i t y

theory, mainly because they may be e f f e c t i v e l y numbered and possess

universal functions. Moreover, the related type structures yield mo-

dels of f u n c t i o n a l languages: namely of typed and type-free l-calculus,

as it will be m e n t i o n e d below.

Interestingly enough the proof that these h i e r a r c h i e s are well de-

fined (i.e. that <,> exists in any type) goes toghether with the proof

of their main properties, which heavely rely on c a t e g o r y theoretic and

continuity notions for EN and Scott's domains. One cannot avoid, then,

some mathematics. Let's first discuss the issue of partiality in a ca-

tegory-theoretic frame.

§.2. Partial morphisms and partial objects

There are at least three different ways to introduce the notion of

divergence in categories. By using partial morphisms, partial objects

or both. In this section we consider c o nc r e t e categories (with partial

morphisms), i.e. subcategories of Set (Set), and see how these ways re-
P
late.

2.1 Definition. Set is the category whose objects are sets and where
P
Set (x,y) = {fl f:X ÷Y (partial)}, for all objects x,y.
P
The f o l l o w i n g notion has been inspired by a talk given in Siena by

A. Heller.

2.2 Definition~ C is a concrete category with partial morphisms (pC)

if:

l) Every hom-set C(x,y) contains an e v e r y - w h e r e divergent morphism

0 s.t. for all objects z,v and any f~C(z,x) and any g cC(y,v)
x,y
one has
241

0 of = 0 and go0 = 0 .
x/y z,y x,y x,t

2) There exists a singleton object t s.t.

C(t,t) = {0t,t,idt ~ and

VX,~ Yf,g~C(x,y) (f = g ~ = ~ ¥ h 6 C ( t , x ) foh : goh).

Singleton objects clearly coincide to w i t h i n isomorphism. Thus

the c a t e g o r y of total morphisms, defined as follows, does not depend on

the c h o i c e of t.

2.3 Definition. Let C be pC and t a singleton in C. Define

then C w i t h o b j e c t s in C and m o r p h i s m s as follows:


--T
CT(X,y) = { f e C ( x ~ y ) / V h e C ( t , x ) ( f o h = 0t,y ~ h = 0 t , x ) }.

Clearly ENp is pC and (ENp) T = EN.

A pC may be e m b e d d e d in Set in the same w a y as a c o n c r e t e cate-


P
gory m a y be e m e b e d d e d in Set. Namely, the e m b e d d i n g f u n c t o r

I = CT(t,-):C Set is f a i t h f u l and I(C(t,x)) = Set (It,Ix).


p p
As usual, one m a y also represent a partial f:x~y by a total map

f:x ÷y±; where y± is o b t a i n e d from y by a d d i n g a fresh element

to y. Recall that, in a c a t e g o r y C, x 4 y (x is a r e t r a c t of y)

if there exists a pair (in, out), with in eC(x,y), out c C(y,x) s.t.

outoin = id . By this, we may give a notion of p a r t i a l object, suita-


x
bly related to p a r t i a l morphisms.

2.4 Definition. Let C be a pC. Define then

i) -±:C +C T is a b o t t o m functor if C(x,y) ~ Ct(x,yi).


.i
2) x is a p a r t i a l object if x ~ x in C T.

(Intuition: ~ 4 ~7 )"

2.5 R e m a r k . Let t be a t e r m i n a l object (a s i n g l e t o n ) in C T. Then


i
t ( x ; moreover, if x is a p a r t i a l object, then t ~ x.

Partial morphisms and p a r t i a l objects may be more fully related

within Cartesian Closed Categories. These categories may be d e f i n e d

as in the c l a s s i c a l case. One has to take care, though, of the b e h a -

viour of f u n c t o r s and n a t u r a l transformations~ which should be p r e s e r v e d


242

on partial morphisms. This may be done using an (implicit) notion of


domain (see i,ii,iii in 2.6 below).

2.6 Definition. C is a P q~C if c is pC with the following ad-


junctions:

i) a terminal singleton object t for CT;

2) < A - , - x - , - - - > : C T +C T x CT,


a
3) for any object a, <-xa,- , AI>:CT÷ C,
P
where:
i) if f6C(x,y) and g(C(x,z), then

VheCT(t,x) (flg)oh = I 0 if foh = 0 or goh = 0

[(f°h)-(goh) otherwise;

ii) if f6C(x,y) and gEC(x',y'), then

fxg = (fopl)'(gop2);

iil) if fcC(x,y~), then


~0 if foh = 0
VhcC(t,x) (A-if)°(hxida) = [A-l(foh)
I otherwise.

Observe that the extensions in the adjunctions in 2.6.2 and 3 are uni-
que. As usual, xy is an object and represents C(y,x).
P

2.7 Proposition. Let C be a pCCC, x and y objects in C and t


a terminal object. Then
t ~ t
(i) x x ±, i.e. - is a bottom functor,
P P
(ii) x y is a partial object.
P
Proof. (i) obvious (ii). We have to prove that x yp ( ( x Y ±) p in C T-
Let us identify x × t with x and x± with x t , by (i). Note then
P
that the following diagrams commute:

(xY) ± x t e v a < xy eval ~ x


xy x y
Pl -1 I J
(Aid) 7 evalxid A eval i eval
Y I i

Xy x t (xY) ×Y -- ---i. . . . . ~ xy ×
P P "(A(A eval)) id P Y
Y
243

Finally set in = Aid:xY--+(xY) i and out = h(A-leval):(xY)l---~x y U,


P P P P

2.8 Proposition. Let C be a pCCC, C T CCC and x a partial object.

Then, for any o b j e c t y, one has:

(i) xy ~ xy
P
(ii) x y 4 x y × ty
P P

Proof. (i) x y ( (x ±)Y


- (xt) y - x t×y ~ x y, by 2.6 (i). (ii) in I = out:
P yP P
xY---+x y by (i); in 2 : out: xY---+t , by t ~ x (see 2.5). Moreover
p ' p P
out = ---:x y × t Y - - + x y, by the e x t e n d e d a ~ j u n c t i o n as d e f i n e d in 2.6.
P P

By 2.7 and 2.8, total and p a r t i a l morphisms, as w e l l as p a r t i a l

objects, are n i c e l y related. In p a r t i c u l a r , when the target object is

partial, partial morphisms do not c h a n g e the h i g h e r type structure in

an e s s e n t i a l way. In c o n t r a s t to this, when the t a r g e t x is not par-

tial, we only know that xy is a s u b o b j e c t of x y, w h i l e nothing can


P
be said about higher types.

We c o n c l u d e this section by r e t u r n i n g to the c a t e g o r i e s we are in-

terested in for the p u r p o s e s of c o m p u t a b i l i t y in a b s t r a c t data types:


domains and n u m b e r e d sets.

A presentation of the C C C ' s of d o m a i n s and e f f e c t i v e l y given domains,


with continuous (and c o m p u t a b l e ) maps as m o r p h i s m s , may be f o u n d in

Scott (1982) (see also G i a n n i n i & Longo (1983)). A constructive domain

is (isomorphic to) the c o l l e c t i o n of all c o m p u t a b l e elements in an ef-


fectively given domain.

2.9 Generalized Myhill-Shepherdson Theorem (Ershov (1976)). The c a t e -


gory of c o n s t r u c t i v e domains is a full sub-CCC of EN.

Proof. (see G i a n n i n i & Longo (1983), say).

We are now in the p o s i t i o n to r e w o r d a simple result in E r s h o v


(1973/5). A pCC is a p a r t i a l Cartesian Category in the o b v i o u s way.

2.10 Proposition. EN is a pCC with a bottom functor.


P
EN is c l e a r l y not a full sub-category of EN . However, one m a y
P
244

still n a t u r a l l y relate domains to EN by the following simple variant


P
of 2.9. Note also that all now empty domains are partial objects.

2.11 Theorem. The category of c o n s t r u c t i v e domains with strict maps


is a full sub-pCCC of EN .
P

§.3. R e l a t i v e n u m b e r i n g s and Principal morphisms in EN

3.1 Definition. Let A,B be objects in EN 3nd f,g:A +B.


Define then

f~Ag if JhcEN(A,A) f = g~h

Note that, if A = B = ~, this is a classical notion of recursion-


theoretic reducibility. Acceptable GSdel-numberings inspired 3.2.1.

3.2 Definition. Let A and B be in EN. Define then

l) fcEN(w,A) is an acceptable numberinq of A : (A,e A) if e < f.


-- A--~

2) f~EN(A,B) is a relative n u m b e r i n g of B w.r.t. A if eB_< foe A

(i.e. foe A) is an acceptable n u m b e r i n g of B).

3) feEN(A,B)
-- --
is a principal m o r p h i s m if Vh{EN(A,B) h -<- a f.

3.3 Remark. f EN(m,A) and f EN(A,B) in 3.2.1-2 are equivalent to

f < e and f°eA<_ e B. Principal morphisms may be easely g e n e r a l i z e d


-w A
to arbitrary categories. In CCC's: principal morphisms characterize mo-

dels of C o m b i n a t o r y Logic, see Longo & Moggi (1983b).

3.4 Remark. It is easy to prove that, if feEN(A,B) is a relative num-


bering, then

(pre-)complete ~ B (pre-)complete,
see Longo & Moggi (1983).

3.5 Proposition. Let feEN(A,B) be a relative numbering. Then one has

(i) for h~B +C, heEN(B,C) iff hof(EN(A,C),

(ii) if f ~AgCEN(A,B), then also g is relative.

(Thus, in presence of a relative numbering, any principal m o r p h i s m is a


relative numbering too).
245

Proof. (i) ~ : obviuos. ~ : f'e R h o e B : h o f o e A o f ' , f o r f is r e l a t i v e .

Thus ~h' R hoe B = ecoh', by the a s s u m t i o n .

(ii) e B = foeAof', for some f'eR since f is r e l a t i v e ,

= goloeAof,, for some 16EN(A,A) since f ~Ag,

= goeAOl'of', for some i'{R.

In v i e w of the strict limit on the n u m b e r of p a g e s imposed by the

Publisher, f r o m n o w on w e are f o r c e d to s k i p the p r o o f s . An elementary

proof (i.e. w i t h no c a t e g o r y theory) of 3 . 1 1 m a y be f o u n d in L o n g o &

Moggi (1983). The authors plan an e x p a n d e d version of the p r e s e n t pa-

per.

Write A
-- ~p .B (or .A 4 B) . for A. is a . r e t r a c t i o n of B in EN p (or in

EN).

I
3.6 Theorem. Let ~ 4p_
A and B ~ B . Then one has

(i) ~f6EN(A,B) relative numbering,

A
(ii) if o n e also has A x A 4 A and B-- exists, then ~geEN(A,B)

principal.

The following Lemma shows how retractions are inherited at h i g h e r

types.

3.7 Lemma~ Assume that, for A and B in EN, B~ exists Then

(i) ~ 4 p--
B( ~ --
B) ~ ~ ( p--
B~(4 B ~),
--

(ii) B ~ B± ~ B~ ~ (B--)
~ ± ,

(iii) B × B 4 B(~ B) ~ B ~ × B--


A ~ BA( ~ B~).

The type structure of d o m a i n s over w in EN m a y be d e f i n e d as

follows.

3.8 Definition. Let T be the smallest set of f i n i t e types symbols

containing 1 (i.e. lET; a , T e T ~ O × T , O ÷ T E T.). Define then


T
E1 = ~ ~(~± )~, EOxT = EO x E ~ and EO+T = (ET )Ec
c p c c c c c

Of c o u r s e , {E
2 o T} is the sub-CCC generated by ~p = P R in EN.

The subscript c recalls that each EO is a c t u a l l y a constructive


c
246

domain, by 2.8. Thus all the n u m b e r e d sets in the type structure, are

actualy partial objects. By 2~4 and the r e s u l t s following it, the to-
tal maps in e a c h E a÷T may be r i g h t f u l l y considered as p a r t i a l compu-
c
table functionals.

3.9 nemma . VoeT w ~pEc° ' E cO 4 (Eac )± and E c~ × E a ~ Eo' for all n > 0.
-- C C

3.10 Theorem. Vo, T T ~}~, T E N ( E G ' E T ) principal morphism and r e l a t i v e


c c
numbering.

Proof. By 3.6 (ii), 3.9 and 2.8, E N ( E O , E T) contains a principal


c c
morphism. Moreover, by 3.6 (i) and 3.9, it also c o n t a i n s a r e l a t i v e
numbering. By 3.5 (ii) we are done.

3.11 Remark. By this and by r e s u l t s in L o n g o & Moggi (1983b), each


E yields a type-free Combinatory Algebra; actually a m o d e l of l-calcu-
C

lus.

In v i e w of all the i n f o r m a t i o n we h a v e on n u m b e r e d sets, we are now


in the p o s i t i o n to give the m a i n t h e o r e m in L o n g o & M o g g i (1983) as a

simple corollary. This p r o v e s that the BMn's and the H P E F (see §.i)
give the i n t e g e r types in the type structure over w. The pure type
variant of 3.12 is e a s e l y given.

1
3.12 Corollary. Let L = PR. Then, for all n > 0,
n) Ln = En
c
n+l.5) L n+l~5 = E N ( E n E n+l)
C C

Proof. (By i n d u c t i o n ) 0), l) by d e f i n i t i o n

1.5
1.5) by a s i m p l e argument (show that L contains all a c c e p t a b l e
g~del-numberings of PR).

n+2) E N ( E n + I , E n+l) ~ L n+2, by d e f i n i t i o n and n+l.5.


C C

Conversely, let ~ n + I 6 Z N ( E cn 'En+l)


c as in 3.10. Then

n+2 E N ( E n , E n+l) by n+l.5),


TeL ~ T°¢n+l c
T { E N ( E n + I , E n+l) by 3.5 (i).
c c
n+2 5) E n+l E n+l n+l The p a i r i n g is
" c x c ~ Ec , via (<,>,(p0,Pl)), by 3.9.
247

n+2
clearly acceptable w.r.t. E , in the sense of definition 1.2;
c
hence
n+2.5
~L ~ g = Xx.~(P0(X))(Pl(X))~En+2
c
= ~ = Xx'(XY'g(<x'Y>))cEN(E~ +l'En+2)c
Conversely,

eEN(En+l,E n+2) ~ f = '~xy.~(x)(y) EN(E~ +l x En+l,E n+l )


e c c c
EN En+l n+l Ln+l.
Xx'~(P0(X))(PI(X)) = f°(P0APl) ( C 'Ec ) =

3.13 Remark. The key issue in this part has been the study of partial
morphisms and objects in EN and the related sub-CCC's. Note that, in
precomplete numbered sets, partial morphisms may be always extended to
total ones. As for complete numbered sets one can say more, in view
of 2.4: with some work, it may be actually shown that complete numbered
sets and partial objects concide in EN.

(For references, see end of part II)~


C ~ T E S I # N CLOSED C A T E ( ~ I E S OF
EI'~TIaNS AND PARTIAL N I ~ I S M
FOR EFFECTIVE TYPE SIT~TLIRES

E. B41~I
UNIVERSITA DI PISA
D i p a r t i m e n £ o di I n f o r m a t i c a
Corso Italia 40
96188 PISA
ITALIE

PART I I

§.l. Introduction. The type s t r u c t u r e {L n} s t u d i e d in §.3 of p a r t


new
1
I (i.e. w i t h L = PR) a c t u a l l y g i v e s the p a r t i a l c o m p u t a b l e f u n c t i o n a l s

(see Ershov (1975)) in the integer types. The key fact was the p o s s i b i -

lity of e n u m e r a t i n g each type n+l by type n, via a principal relative


1
numbering. This generalizes the fact that PR, i.e. L , can be e f f e c -
0
tively numbered by ~, i.e. L .
1
If one takes L = R (the total recursive maps) this is no longer

possible, i.e. there is no e f f e c t i v e numbering of R by w, therefore


[L n} (with L 1 = R) is not r e p r e s e n t a b l e in EN.
n Ew
As p o i n t e d out in §.i of part I, the definition of H P E F is r a t h e r
1
general, and still w o r k s if we take as L a set L of p a r t i a l maps

from w to m (instead of PR or R).


n 1
We give a characterization of {L }nEw' for L enumeration-
acceptable (see i.i below), in terms of a c o n c r e t e CCC (and pCCC) based

on the n o t i o n of n u m b e r i n g :

I.i Definition. Let L cw--~w, then L is e n u m e r a t i o n - a c c e p t a b l e iff:

i) LoL c L, id e L;

i') 0 e L (0 is the e v e r y w h e r e divergent function);

2) VnEW Ix.nEL;

3) there is an a c c e p t a b l e pairing of ~ w.r.~t. L (see 1.2 of p a r t I);

4) equality in ~ is d e c i d a b l e w.r.t. L, i.e.

Vf,geL ~heL h(<x,y,z>) = if (x = y) then fz else gz


249

1.2 Definition. The category of n u m b e r e d sets on L (EN L) is defined


P
by:

i) --A = (A,eA) ~ ENpL iff eA:,~--~A is onto;


ii) feENL(A,B)
p -- _ iff f:A--~B and ~geL foe A = eBog

Let L be e n u m e r a t i o n - a c c e p t a b l e and 1)-4) be the assumptions on


L in (I.i), then one easely has:

i) implies that EN L is a category;


P
i') implies that EN L has null morphisms;
P
2) implies that EN L has a singleton object;
P
L
2) and 3) imply that EN is cartesian.
P

Remark. Note that the notion of e n u m e r a t i o n - a c c e p t a b l e class of func-


tion is also a sound r e c u r s i o n - t h e o r e t i c g e n e r a l i z a t i o n of basic pro-

perties of PR. As a matter of fact, if (~,-~ is a Uniformely Reflexive

Structure, then (~--+w)= {f:~-~-~/~aE~Vb~w f(b) = a-b} is e n u m e r a t i o n


acceptable EN L is not a pCCC, hence 5he type structure generated from
P
does not need to exist in it.

However every c a t e g o r y C may be e m b e d d e d in the category of pre-


op
sheaves on C, Set C (which is a CCC), by a full and faithful functor,
which preserves products and r e p r e s e n t a t i o n s of morphisms (see Scott
(1980), McLane (1971)). We will define a full sub-CCC (GEN L) of
E.L,op
set ( m ) with the following property:
(ENL) °p
the e m b e d d i n g functor of EN L in Set (IEN) factorizes through

that of GEN L in Set (ENL)°p (IGEN)

i .e. : ~I EN ~ _ _ _ I __GEN L

I E N ~ I IGEN
~4S~t(ENL)°P

1.3 Definition. Let L be e n u m e r a t i o n - a c c e p t a b l e , define then the


category of g e n e r a l i z e d n u m b e r e d sets on L by:

i) X = (XrE)cGEN L iff
-- x p
250

i) E c= w--+ X,
X

2) U {img e l e { E } = X,
X

3) Ve0, ele Ex 3 e ( E x ~f0,fl6L s.t.

e0/:
/:e\

(i.e. E is a d i r e c t e d sets w.r.t. L-reducibility);


X

ii) f e G E N Lp ( x--, Y--) iff f:X--~Y and

~e~Ex ~g~L ~e'CEy foe = e'og, i.e.

I I,

ei ",~e'I
X ........->Y
f

(Intuition; one c a n n o t g6delize all of R, but one can e f f e c t i v e l y enu-


merate it p i e c e w i s e ) .

Notation. EN L and GEN L are the c a t e g o r i e s of total m o r p h i s m s .

Lemma. GEN L has c o p r o d u c t s .

hint: X ~ Y_ : (X [] Y , { e U e' le E X A e' Ey}),


where (e ~ e')(<x,y,z>) _= if (x : y) then ez else e'z, i.e. it is

the sup of e,e' w.r.t. L-reducibility.

1.4 Theorem. i) GEN L is a C C C and

ii) G E N L is a pCCC.
P
hint: X × Y : (X × Y,{e-e'le E x A e' Ey});

fix h_Y>
X<-- X x y y

e ~ / e'
251

use 3) and 4) (in D e f i n i t i o n 1.1) for proving that E is directed;


XxY
let ~ = (~,{id }) GEN L, then

i) y_X_ = ( G E N L ( x , y ) , A (GENL(~ x X,Y)));

ii) Y ~ = ( G E NpL (.x , Y .


--p ) , A (. G E N.L ( ~. x X,Y)))

where A is the curry o p e r a t o r on maps, use 3) and 4) (in i.i) for

proving that ~ U ~ ~ ~ and (~ x X) U (~ x i ) % (~ U ~) × i, then it


follows easely that EyX is directed.

Remark. In general, if C
is pCCC, it does not follow that C is CCC
P
(the p r o b l e m are objects s.t. Y ~ Y±).

1.5 Definition. The e m b e d d i n g functor, I, of EN L into GEN L is


P P
defined by:

i) I(A,e A) = (A,{eA}) on objects and

ii) I is the identity on maps

The properties of I are summarized by theorem 1.7 below.

1.6 Lemma. Let f:X ,Y, then

f ~ GENL(x,Y) ~=~foGENL(~,X) £ GENL(w,Y),


p -- _ p - _

f e ENL(x,Y) ~ f o E N L ( z , X ) ~ ENL(~,y)
p -- _ p -- _

1.7 Theorem. i) I is full and faithful,

ii) I preserves products and r e p r e s e n t a t i o n s of total and partial


morphisms.

The main reason, for using g e n e r a l i z e d n u m b e r e d sets instead of


presheaves, is that the former are more similar to n u m b e r e d sets than
the latter, t h u s w e can easely extend meaningful concepts from EN L
L
to GEN (such as the notion of partial m o r p h i s m and relative numbering),
whereas this seems impossible for preshe~ _s.

§.2 HPEF and g e n e r a l i z e d n u m b e r e d sets.

This section is devoted to the c h a r a c t e r i z a t i o n of the g e n e r a l i z e d


252

HPEF {L n} , in the integer (or pure) types (see §.l of part I), w i t h
n6~

the c o r r e s p o n d i n g type structure in G E N L. For L is an a r b i t r a r y


P
enumeration-acceptable function set, the full g e n e r a l i t y of GEN L is
P
required.

The m a i n step is to f i n d the r i g h t counterpart to the n o t i o n of

relative numbering given in EN (see 3.2 part I).

2.1 Definition~ X factorizes Y iff


GENL(~,Y) = GENL(x,Y) o GENL(m,X)

or e q u i v a l e n t l y Ve'eEy ]eEE x ~f GENL(x,Y) s.t.

e '<<
I
I
e'

X-- -- ~ - ~ Y

Remark. Let A , B < E N L, then

~fcENL~A,B) relative numbering ,e~ IA factorizes IB,

2.2 Proposition. If X factorizes Y and f:Y Z, then


f E GENL(y,z)~=~ f o GENL(x,y) c GENL(x,z). (see 3.5 part I)

2.3 Theorem. Let -e ~p X


. and. Y ~ . Y± r the
. X. f a c t o r i z e s Y.
(see 3.6 part I)

The integer type structure in GEN L is d e f i n e d as in (3.8 part I)=


P

0 {J E 1 ~_~ En+l : EnEL


2.4 Definition. EL =--' L :--p' L L
We h a v e that:

2.5 Lemma~ ~ ~ En n+l 4 .~n+l n × n n


-- p L'EL (~L ) 'EL EL ~ EL"
L L L
hi~':: use _~ U ~_ ~ ~_ for p r o v i n g that El × E1 ~ E 1 , where

in 0 in 1
-'\ ] /-
'~k I
! < f ' g //
f \: / g

then it f o l l o w s by i n d u c t i o n that Yn > 0 EL x EL <~ EL


n n n
253

From (2.5) and (2.3) it f o l l o w s

2.6 Theorem. En factorizes E n+l for n > 0 D


L L --
2.7 Theorem. Let L be e n u m e r a t i o n - a c c e p t a b l e , then {.Ln} is
n~
defined and for all n > 0:
n) Ln E n n+l 5) L n~l'5 L n n+l
= L' " = GEN(EL'EL )"

hint: (see also (3.12) in p a r t I)


0), i) by d e f i n i t i o n ,
n+l.5) follows from n) n+l) and En En En
' L x L ~ L'
n+2) follows from n+l.5, (2.6) and (2.2)

n+l.5
The e x i s t e n c e of p r i n c i p a l morphisms in L does not f o l l o w from

(2.6) (compare to 3.10 in p a r t I), in fact it r e q u i r e s stronger hypo-


theses:

2.8 Theorem. Yn~_ 0 there is a p r i n c i p a l morphism in Ln+l'5~=~ Y n ~ 0


En is r e p r e s e n t a b l e in EN L (i.e. En is the image (w.r t. I) of a
L L "
n u m b e r e d set).

§.3 Generalized numbered sets and p r e s h e a v e s .


E Lop
At last w e r e t u r n of the r e l a t i o n s between GEN L and Set ( N )

First let us d e f i n e the e m b e d d i n g functors IEN and IGE N.

3.1 Definition. i) I = IA.IB.ENL(B,A) is the u s u a l Y o n e d a e m b e n d -


EN

d i n g of EN L in Set (ENL)°p,

ii) IGE N X.IB GENL(IB,X):GEN L ÷ S e t (ENL)Op


= D

3.2 Theorem. i) IEN and IGE N are full and f a i t h f u l ,


ii) preserve products and representations of m o r p h i s m s ,

iii) IEN = IGE N o I

(2.7) m a y be r e s t a t e d , using presheaves only, as follows.

3.3 Theorem. Let L be e n u m e r a t i o n - a c c e p t a b l e , then t h e r e e x i s t two


presheaves F and G such that:
n
n) Ln E n n+l 5) L n + l ' 5 = E n+l EL
= L' " L , where E0L = F, ElL = GF and
En
E n+l n L
L = EL D
254

REFERENCES

Barendregt, H. & Longo, G- (1982) "Recursion Theoretic operators and


morphisms of numbered sets" Fundamenta Matematicae CXIX.
Bernardi, C., Sorbi, A. (1983) "Classifying positive equivalence rela-
tions" J. Symb. Logic, vol. 48,3, 529-539.
Ershov, Yu. L. (1973) "The theory of A-spaces" Algebra and Logic, vol.
12,4, 209-232.
Ershov, Yu. L. (1973/5) "Theorie der Numerierungen I-II", Zeit. Math.
Logik vol. 19/21, 289-388/473-584.
Ershov, Yu. L. (1977) "Model C of partial continuous functionals"
Logic Colloquium 76 (Gandy, Hyland eds.) N o r t h Holland.
Giannini, P., Longo, G. (1983) "Effectively given domains and lambda-
calculus semantics" Info. Contr. (to appear).
Kleene, S.C~ (1959) "Countable functionals" In H. Heyting (ed.)
Constructivity in Mathematics, North-Holland, 81-100.
Kreisel, G. (1959)"Interpretation of Analysis by means of functionals
of finite type" ibidem.
Lambek, J. (1980) "From ~ c a l c u l u s to Cartesian Closed Categories",
In R. Hindley, J. Seldin (eds~) To H.B. Curry: essays in Combina-
t~[Y Logic, lambda calculus and Formalisms Academic Press.
Longo, G. (1982) "Hereditary partial functionals in any finite type
(Preliminary note)". Forsch. Inst. Math. E.T.H. Z~rich.
Longo, G. (1983) "Set theoretical models of l-calculus: theories, ex-
pansions, isomorphisms" Ann. Pure Applied Logic (formerely: Ann.
Math. Logic) 24, 153-188.
Longo, G. (1984) "Continuous structures and analytic methods in Computer
Science" In B. Courcelle (ed.), Proceedings of CAAP, Cambridge
University Press.
~ongo, G., Moggi, E. (1983) "The hereditary partial functionals and
_recursion theory in higher types" J. Symb° Logic (to appear).
Longo, G., Moggi, E. (1983b) "G~del-numberings, principal morphisms,
combinatory algebras" Nora Sci. D.I., Pisa.
Myhill, J., Shepherdson, J. (1955) "Effective operations on partial
recursive functions "~ Zeit. Math. Logik Grund. Math. vol° i, 310-317.
Normann, D. (1980) Recursion on the countable functionals, LNM 811
Springer-Verlag, Berlin.
Rogers, H. (1967) "Theory of ~ecursive functions and effective computa-
bility" Mc Graw-Hill.
Scott, D.S~ (1972) "Continuous lattices" In F. Lawvere (ed. T0poses,
Algebraic Geometry and Logic, LNM 274, Springer-Verla¢.
255

Scott, D.S. (1980) "Relating theories of the l-Calculus" Same volume


as Lambek (1980).

Scott, D.S. (1982) "Some o r d e r e d sets in C o m p u t e r Science" In I. Rival


(ed.) Ordered sets, Reidel.

Visser, A. (1980) "Numerations lambda-calculus and arithmetic" Same


volume as Lambek (1980).

You might also like