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

2.1. THE CALCULUS

9

2.1The calculus

We shall use the notation

A

to designate a deduction of A, that is, ending at A. The deduction will be written as a nite tree, and in particular, the tree will have leaves labelled by sentences. For these sentences, there are two possible states, dead or alive.

In the usual state, a sentence is alive, that is to say it takes an active part in the proof: we say it is a hypothesis. The typical case is illustrated by the rst rule of natural deduction, which allows us to form a deduction consisting of a single sentence:

A

Here A is both the leaf and the root; logically, we deduce A, but that was easy because A was assumed!

Now a sentence at a leaf can be dead, when it no longer plays an active part in the proof. Dead sentences are obtained by killing live ones. The typical example is the )-introduction rule:

[A]

B

)I

A ) B

It must be understood thus: starting from a deduction of B, in which we choose a certain number of occurrences of A as hypotheses (the number is arbitrary: 0, 1, 250, . . . ), we form a new deduction of which the conclusion is A ) B, but in which all these occurrences of A have been discharged, i.e. killed. There may be other occurrences of A which we have chosen not to discharge.

This rule illustrates very well the illusion of the tree-like notation: it is of critical importance to know when a hypothesis was discharged, and so it is essential to record this. But if we do this in the example above, this means we have to link the crossed A with the line of the )I rule; but it is no longer a genuine tree we are considering!

10

CHAPTER 2. NATURAL DEDUCTION

2.1.1The rules

Hypothesis: A

Introductions:

 

 

 

 

 

[A]

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A

 

B

 

 

 

 

 

A

 

 

 

 

^I

 

B

 

)I

 

8I

 

 

 

 

 

 

: A

A

^

B

 

 

 

A

 

 

 

 

 

)

B

8

 

 

 

 

 

 

 

 

 

 

Eliminations:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A ^ B

^1E

A ^ B

^2E

A

A ) B

)E

A

B

 

B

The rule )E is traditionally called modus ponens.

8 : A

8E

A[a= ]

Some remarks:

All the rules, except )I, preserve the stock of hypotheses: for example, the hypotheses in the deduction above which ends in )E, are those of the two immediate sub-deductions.

For well-known logical reasons, it is necessary to restrict 8I to the case where the variable1 is not free in any hypothesis (it may, on the other hand, be free in a dead leaf).

The fundamental symmetry of the system is the introduction/elimination symmetry, which replaces the hypothesis/conclusion symmetry that cannot be implemented in this context.

2.2Computational signi cance

We shall re-examine the natural deduction system in the light of Heyting semantics; we shall suppose xed the interpretation of atomic formulae and also the range of the quanti ers. A formula A will be seen as the set of its possible deductions; instead of saying \ proves A", we shall say \ 2 A".

1The variable belongs to the object language (it may stand for a number, a data-record, an event). We reserve x, y, z for -calculus variables, which we shall introduce in the next section.

2.2. COMPUTATIONAL SIGNIFICANCE

11

The rules of natural deduction then appear as a special way of constructing functions: a deduction of A on the hypotheses B1; : : : ; Bn can be seen as a function t[x1; : : : ; xn] which associates to elements bi 2 Bi a result t[b1; : : : ; bn] 2 A. In fact, for this correspondence to be exact, one has to work with parcels of hypotheses: the same formula B may in general appear several times among the hypotheses, and two occurrences of B in the same parcel will correspond to the same variable.

This is a little mysterious, but it will quickly become clearer with some examples.

2.2.1Interpretation of the rules

1.A deduction consisting of a single hypothesis A is represented by the expression x, where x is a variable for an element of A. Later, if we have other occurrences of A, we shall choose the same x, or another variable, depending upon whether or not those other occurrences are in the same parcel.

2.If a deduction has been obtained by means of ^I from two others

corresponding to u[x1; : : : ; xn] and v[x1; : : : ; xn], then we associate to our deduction the pair hu[x1; : : : ; xn]; v[x1; : : : ; xn]i, since a proof of a conjunction is a pair. We have made u and v depend on the same variables; indeed, the choice of variables of u and v is correlated, because some parcels of hypotheses will be identi ed.

3.If a deduction ends in ^1E, and t[x1; : : : ; xn] was associated with the immediate sub-deduction, then we shall associate 1t[x1; : : : ; xn] to our proof. That is the rst projection, since t, as a proof of a conjunction, has to be a pair. Likewise, the ^2E rule involves the second projection 2.

Although this is not very formal, it will be necessary to consider the fundamental equations:

1hu; vi = u

2hu; vi = v

h 1t; 2ti = t

These equations (and the similar ones we shall have occasion to write down) are the essence of the correspondence between logic and computer science.

4.If a deduction ends in )I, let v be the term associated with the immediate sub-deduction; this immediate sub-deduction is unambiguously determined at the level of parcels of hypotheses, by saying that a whole A-parcel has been discharged. If x is a variable associated to this parcel, then we have a function v[x; x1; : : : ; xn]. We shall associate to our deduction the function

12

CHAPTER 2.

NATURAL DEDUCTION

t[x1; : : : ; xn]

which maps each argument a of

A to v[a; x1; : : : ; xn]. The

notation is x: v[x; x1; : : : ; xn] in which x is bound.

Observe that binding corresponds to discharge.

5.The case of a deduction ending with )E is treated by considering the two functions t[x1; : : : ; xn] and u[x1; : : : ; xn], associated to the two immediate sub-deductions. For xed values of x1; : : : ; xn, t is a function from A to B, and u is an element of A, so t(u) is in B; in other words

t[x1; : : : ; xn] u[x1; : : : ; xn]

represents our deduction in the sense of Heyting.

Here again, we have the equations:

( x: v) u

=

v[u=x]

x: t x

=

t (when x is not free in t)

The rules for 8 echo those for ): they do not add much, so we shall in future omit them from our discussion. On the other hand, we shall soon replace the boring rst-order quanti er by a second-order quanti er with more novel properties.

2.2. COMPUTATIONAL SIGNIFICANCE

13

2.2.2Identi cation of deductions

Returning to natural deduction, the equations we have written lead to equations between deductions. For example:

A B

^I

A ^ B

^1E

A

A B

^I

A ^ B

^2E

B

[A]

B

)I

AA ) B

)E

B

\equals"

 

 

 

 

 

 

A

\equals"

 

 

 

 

 

 

B

\equals"

A

B

What we have written is clear, provided that we observe carefully what happens in the last case: all the discharged hypotheses are replaced by (copies of) the deduction ending in A.

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