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

7.1. THE CALCULUS

47

7.1The calculus

7.1.1Types

In chapter 3 we allowed for given additional constant types; we shall now specify two such types, namely Int (integers) and Bool (booleans).

7.1.2Terms

Besides the usual ve, there are schemes for the speci c constants Int and Bool. We have retained the introduction/elimination terminology, as these schemes will appear later in F:

1. Int-introduction:

O is a constant of type Int;

if t is of type Int, then S t is of type Int.

2.Int-elimination: if u, v, t are of types respectively U, U!(Int!U) and Int, then R u v t is of type U.

3.Bool-introduction: T and F are constants of type Bool.

4.Bool-elimination: if u, v, t are of types respectively U, U and Bool, then D u v t is of type U.

7.1.3Intended meaning

1.O and S are respectively zero and the successor function.

2.R is a recursion operator: R u v 0 = u, R u v (n + 1) = v (R u v n) n.

3.T and F are the truth values.

4. D is the operation \if . . . then . . . else" | de nition by case: D u v T = u,

D u v F = v.

7.1.4Conversions

To the classical redexes, we add:

R u v O

u

D u v T

u

R u v (S t)

v (R u v t) t

D u v F

v

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