Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Logic and CS / Girard. Proofs and Types.pdf
Скачиваний:
38
Добавлен:
10.08.2013
Размер:
947.15 Кб
Скачать

8.5. THE FUNCTION-SPACE

65

8.5.4Partial functions

Let us see how this construction works by calculating Int ! Int. We have

Intn ' N [ f?g and jIntj = N, so jInt ! Intj ' (N [ f?g) N where

i)(n; m) _^ (n0; m0) if n = n0 ) m = m0

ii)(?; m) _^ (?; m)

with incoherence otherwise. This is the direct sum (see section 12.1) of the coherence space which represents partial functions with the space which represents the constants \by vocation". Let us ignore the latter part and concentrate on the space PF de ned on the web N N by condition (i).

What

is

the order relation on PF? Well

f 2 PF is a

set

of pairs (n; m)

such that

if

(n; m); (n; m0) 2 f then m = m0,

which is just

the

usual \graph"

representation of a partial function. Since the Berry order corresponds simply to containment, it is the usual extension order on partial functions.

In the Berry order, the partial functions

f

and the constants by vocation

 

 

 

 

_

n are incomparable. However pointwise we have f < 0 for any partial function

which takes no other value than zero, of

which there are in nitely many. One

 

e

phenomenon of compact5 objects

advantage of our semantics is that it avoids this

e

 

with in nitely many objects below them.

Another consequence of the Berry order arises at an even simpler type: in the function-space Sgl ! Sgl, where Sgl is the coherence space with just one token (section 12.6). In the pointwise (Scott) order, the identity function is below the constant \by vocation" f g, whilst in the Berry order they are incomparable. This means that in the stable semantics, unlike the Scott semantics, it is possible for a test program to succeed on the identity (which reads its input) but fail on the constant (which does not).

5The notion of compactness in topology is purely order-theoretic: if a S" I for some directed set I then a b for some b 2 I. Besides Scott's domain theory, this also arises in ring theory as Noetherianness and in universal algebra as nite presentability.

Соседние файлы в папке Logic and CS