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

Chapter 9

Denotational Semantics of T

The constructions of chapter 8 provide a nice denotational semantics of the systems we have already considered.

9.1Simple typed calculus

We propose here to interpret the simple typed calculus, based on ! and . The essential idea is that:

-abstraction turns a function (x 7!t[x]) into an object;

application associates to an object t of type U!V a function u 7!t u.

In other words, application and -abstraction are two mutually inverse operations which identify objects of type U!V and functions from U to V .

So we shall interpret them as follows:

-abstraction by the operation which maps a stable function from A to B to its trace, a point of A ! B;

application by the operation which maps a point of A ! B to the function of which it is the trace.

9.1.1Types

Suppose we have xed for each atomic type Si a coherence space [[Si]]; then we de ne [[T ]] for each type T by:

[[U V ]] = [[U]] N [[V ]]

[[U!V ]] = [[U]] ! [[V ]]

66

9.1. SIMPLE TYPED CALCULUS

67

9.1.2Terms

If t[x1; : : : ; xn] is a term of type T depending on free variables xi of type Si (some of the xi may not actually occur in t), we associate to it a stable function [[t]] of n arguments from [[S1]]; : : : ; [[Sn]] to [[T ]]:

1.t[x1; : : : ; xn] = xi: then [[t]](a1; : : : ; an) = ai; the stability of this function is immediate.

2. t = hu; vi; we have at our disposal functions [[u]] and [[v]] from [[S1]]; : : : ; [[Sn]] to [[U]] and [[V ]] respectively. Consider the stable binary function Pair, from [[U]]; [[V ]] to [[U]] N [[V ]], de ned by:

Pair(a; b) = f1g a [ f2g b

We put [[t]](a1; : : : ; an) = Pair([[u]](a1; : : : ; an); [[v]](b1; : : : ; bn)); this function is still stable.

3.t = 1w or t = 2w. Here again we compose with one of the following two stable functions:

1(c) = f : (1; ) 2 cg 2(c) = f : (2; ) 2 cg

4. t = x: v; by hypothesis we already have a (n + 1)-ary stable function [[v]] from [[S]]; [[U]] to [[V ]]; in particular, for a xed, the function b 7![[v]](a; b) is stable from [[U]] to [[V ]] and so one can de ne [[t]](a) = Tr(b 7![[v]](a; b)).

Checking that [[t]] is stable is a boring but straightforward exercise. For example, in the case where n = 1, we have to show that if F is a stable function from A N B to C, it induces a stable function G from A to B ! C, by

G(a) = Tr(b 7!F (Pair(a; b)))

Then G itself has a trace, for which we shall just give the formula:

Tr(G) = f(a; (b; )) : (Pair(a; b); ) 2 Tr(F )g

It is not a proof, but it should be enough to convince us!

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