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

10.6. THE ASSOCIATED FUNCTIONAL CALCULUS

79

Having said this, we shall give no proof, because the theoretical interest is limited. One tends to think that natural deduction should be modi ed to correct such atrocities: if a connector has such bad rules, one ignores it (a very common attitude) or one tries to change the very spirit of natural deduction in order to be able to integrate it harmoniously with the others. It does not seem that the (?; _; 9) fragment of the calculus is etched on tablets of stone.

Moreover, the extensions are long and di cult, and for all that you will not learn anything new apart from technical variations on reducibility. So it will su ce to know that the strong normalisation theorem also holds in this case. In the unlikely event that you want to see the proof, you may consult the references above.

10.6The associated functional calculus

Returning to the idea of Heyting, it is possible to understand the Curry-Howard isomorphism in the case of ? and _ (the case of 9 will receive no more consideration than did that of 8).

10.6.1Empty type

Emp is considered to be the empty type. For this reason, there will be a canonical function "U from Emp to any type U: if t is of type Emp, them "U t is of type U. The commutation for "U is set out in ve cases:

1("U V t)

"U t

2("U V t)

"V t

("U!V t) u

"V t

"U ("Emp t)

"U t

x: u y: v ("R+S t)

"U t

In the last case ( x: u y: v t is introduced

below) U is the common type of

u and v. It is easy to see that "U corresponds exactly to ?E and the ve conversions above to the ve commutations of ?.

80

CHAPTER 10. SUMS IN NATURAL DEDUCTION

10.6.2Sum type

For U + V , we have the following schemes:

1.

If u is of type U, then 1u is of type U + V .

2.

If v is of type V , then 2v is of type U + V .

3.If x, y are variables of respective types R, S, and u, v, t are of respective types U, U, R + S, then

x: u y: v t

is a term of type U. Furthermore, the occurrences of x in u are bound by this construction, as are those of y in v. This corresponds to the pattern matching

match t with inl x ! u j inr y ! v

in a functional programming language like CAML.

Obviously the 1, 2 and schemes interpret _1I, _2I and _E. The standard conversions are:

x: u y: v ( 1r) u[r=x]

The commuting conversions are

1( x: u y: v t)

2( x: u y: v t)

( x: u y: v t) w

"W ( x: u y: v t)x0: u0 y0: v0 ( x: u y: v t)

x: u y: v ( 2s)

v[s=y]

1

1

U = V W

x: ( 2u) y: ( 2v) t

x: ( u) y: ( v) t

U = V W

x: (u w) y: (v w) t

U = V !W

( x: ("W u) y: ("W v) t)

U = Emp

x: ( x0: u0 y0: v0 u) y: ( x0: u0 y0: v0 v) t

U = V + W

which correspond exactly to the rules of natural deduction.

10.6.3Additional conversions

Let us note for the record

the analogues of h 1t; 2ti t and x: t x t:

"Emp t t

x: ( 1x) y: ( 2y) t t

Clearly the terms on both sides of the \ " are denotationally equal. However the direction in which the conversion should work is not very clear: the opposite one is in fact much more natural.

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