• Aucun résultat trouvé

Realizability algebras

N/A
N/A
Protected

Academic year: 2022

Partager "Realizability algebras"

Copied!
49
0
0

Texte intégral

(1)

Realizability algebras : a program to well order R

Jean-Louis Krivine

[email protected] April 26, 2010 (updated April 22, 2011)

Introduction

When we want to obtain programs from mathematical proofs, the main problem is, naturally, raised by theaxioms: indeed, it has been a long time since we know how to transform a proof in pure (i.e. without axioms) intuitionistic logic, even at second order [2, 7, 4].

The very first of these axioms is theexcluded middle, and it seemed completely hopeless for decades. The solution, given by T. Griffin [5] in 1990, was absolutely surprising. It was an essential discovery in logic because, at this moment, it became clear that all other axioms will follow, as soon as we will work in a suitable framework.

Thetheory of classical realizabilityis such a framework : it was developed in [12, 13], where we treat the axioms ofAnalysis(second order arithmetic with dependent choice).

In [15], we attack a more difficult case of the general axiom of choice, which is the existence of a non trivial ultrafilter onN; the main tool is the notion ofrealizability structure, in which the programs are written inλ-calculus.

In the present paper, we replace it with the notion ofrealizability algebra, which has many advantages : it is simpler, first order and much more practical for implementation. It is a three-sorted variant of the usual notion of combinatory algebra. Thus, the programming language is no longer theλ-calculus, but a suitable set of combinators ; remarkably enough, this is almost exactly the original set given by Curry. Theλ-terms are now considered only as notations or abbreviations, very useful in fact : aλ-term is infinitely more readable than its translation into a sequence of combinators. The translation used here is new, as far as I know ; its fundamental property is given in theorem 2.

The aim of this paper is to show how to transform into programs, the classical proofs which use dependent choice and :

i) the existence of a non trivial ultrafilter onN; ii) the existence of a well ordering onR.

Of course, (ii) implies (i) but the method used for (i) is interesting, because it can give simpler programs. This is an important point, because a new problem is appearing now, an impor- tant and very difficult problem : to understand the programs we obtain in this way, that is to explain their behavior. A fascinating, but probably long work.

(2)

The logical frame is given byclassical second order logic, in other words the (first order) the- ory of the comprehension scheme. However, since we use a binary membership relation on individuals, we work, in reality, in at least third order logic. Moreover, this is indispens- able since, although the axiom of dependent choice onRcan be expressed as a second order scheme, axioms (i) and (ii) cannot be expressed in this way.

By using the method expounded in [11], we can obtain the same results in ZF.

It seems clear to me that, by developing the technology of classical realizability, we shall be able to treat all “natural” axioms introduced in set theory. It is already done for thecontin- uum hypothesis, which will be the topic of a forthcoming paper. In my opinion, the axiom of choice and the generalized continuum hypothesis in ZF do not pose serious issues, except this : it will be necessary to use theproper class forcingof Easton [3] inside the realizability model, and it will probably be very painful.

A very interesting open problem is posed by axioms such as the existence of measurable cardinals or the determination axiom.

But the most important open problem is to understand what all these programs do and, in this way, to be able toexecute them. I believe that big surprises are waiting for us here.

Indeed, when we realize usual axioms of mathematics, we need to introduce, one after the other, the very standard tools insystem programming: for the law of Peirce, these are contin- uations (particularly useful for exceptions) ; for the axiom of dependent choice, these are the clock and the process numbering ; for the ultrafilter axiom and the well ordering ofR, these are no less than read and write instructions on a global memory, in other wordsassignment.

It seems reasonable to conjecture that such tools are introduced for some worthwhile pur- pose, and therefore that the very complex programs we obtain by means of this formalization work, perform interesting and useful tasks. The question is : which ones ?

Remark.

The problem of obtaining a program from a proof which uses a given axiom, must be set correctly from the point of view of computer science. As an example, consider a proof of a theorem of arith- metic, which uses a well ordering ofP(N) : if you restrict this proof to the class of constructible sets, you easily get a new proof of the same theorem, which does not use this well ordering any more. Thus, it looks like you simply have to transform this new proof into a program.

But this program would be extracted from a proof which isdeeply different from (and dramatically more complicated than) the original one. Moreover, with this method, it is impossible to associate a program with the well ordering axiom itself. From the point of view of computer science, this is an unacceptable lack ofmodularity: since we cannot put the well ordering axiom in aprogram library, we need to undertake again the programming work with each new proof.

With the method which is explained below, we only use theλ-termextracted from the original proof.

Therefore, this term contains an unknown instruction for the well ordering axiom onP(N), which is not yet implemented. Then, by means of a suitable compilation, we transform this term into a true program whichrealizesthe initial theorem.

As a corollary of this technology, we obtain a program which is associated with the well ordering ax- iom, which we can put in a library for later use.

(3)

Realizability algebras

Arealizability algebrais composed of three sets : Λ(the set ofterms),Π(the set ofstacks), Λ?Π(the set ofprocesses) with the following operations :

(ξ,η)7→(ξ)ηfromΛ2intoΛ(application) ; (ξ,π)7→ξ

.

πfromΛ×ΠintoΠ(push) ;

(ξ,π)7→ξ?πfromΛ×ΠintoΛ?Π(process) ; π7→kπfromΠintoΛ(continuation).

We have, inΛ, the distinguished elements B,C,E,I,K,W,cc, calledelementary combinators orinstructions.

Notation.The term (. . . (((ξ)η12) . . .)ηnwill be also denoted by (ξ)η1η2. . .ηnorξη1η2. . .ηn. For example : ξηζ=(ξ)ηζ=(ξη)ζ=((ξ)η)ζ.

We define onΛ?Πa preorder relation, denoted byÂ. It is the least reflexive and transitive relation such that we have, for anyξ,η,ζΛandπ,$Π:

(ξ)η?πÂξ?η

.

π. I?ξ

.

πÂξ?π.

K?ξ

.

η

.

πÂξ?π.

E?ξ

.

η

.

πÂ(ξ)η?π. W?ξ

.

η

.

πÂξ?η

.

η

.

π.

C?ξ

.

η

.

ζ

.

πÂξ?ζ

.

η

.

π.

B?ξ

.

η

.

ζ

.

πÂ(ξ)(η)ζ?π. cc?ξ

.

πÂξ?kπ

.

π.

kπ?ξ

.

$Âξ?π.

Finally, we are given a subset⊥⊥ofΛ?Πwhich is a terminal segment for this preorder, which means that : p∈ ⊥⊥,p0Âp⇒p0∈ ⊥⊥.

In other words, we ask that⊥⊥be such that : (ξ)η?π∉ ⊥⊥ ⇒ξ?η

.

π∉ ⊥⊥.

I?ξ

.

π∉ ⊥⊥ ⇒ξ?π∉ ⊥⊥.

K?ξ

.

η

.

π∉ ⊥⊥ ⇒ξ?π∉ ⊥⊥.

E?ξ

.

η

.

π∉ ⊥⊥ ⇒(ξ)η?π∉ ⊥⊥. W?ξ

.

η

.

π∉ ⊥⊥ ⇒ξ?η

.

η

.

π∉ ⊥⊥. C?ξ

.

η

.

ζ

.

π∉ ⊥⊥ ⇒ξ?ζ

.

η

.

π∉ ⊥⊥.

B?ξ

.

η

.

ζ

.

π∉ ⊥⊥ ⇒(ξ)(η)ζ?π∉ ⊥⊥. cc?ξ

.

π∉ ⊥⊥ ⇒ξ?kπ

.

π∉ ⊥⊥. kπ?ξ

.

$∉ ⊥⊥ ⇒ξ?π∉ ⊥⊥.

c -terms and λ -terms

We call c-term a term which is built with variables, the elementary combinatorsB, C, E, I,K,W,ccand the application (binary function). Ac-term is calledclosedif it contains no variable ; it will then also be calledproof-like; a proof-like term has a value inΛ.

Given ac-termtand a variablex, we define inductively ont, a newc-term denoted byλx t. To this aim, we apply the first possible case in the following list :

(4)

1.λx t=(K)tiftdoes not containx.

2.λx x=I.

3.λx t u=(Cλx(E)t)uifudoes not containx.

4.λx t x=(E)tiftdoes not containx.

5.λx t x=(W)λx(E)t(iftcontainsx).

6.λx(t)(u)v=λx(B)t uv (ifuv containsx).

We easily see that this rewriting is finite, for any givenc-termt: indeed, during the rewriting, no combinator is introduced insidet, but only in front of it. Moreover, the only changes int are : moving parentheses and erasing occurrences ofx. Now, rules 1 to 5 strictly decrease the part oftwhich remains underλx, and rule 6 can be applied consecutively only finitely many times.

Theλ-termsare defined as usual. But, in this paper, we considerλ-terms only as a notation for particularc-terms, by means of the above translation. This notation is essential, because almost everyc-term we shall use, will be given as aλ-term. Theorem 2 gives the fundamental property of this translation.

Remark. We cannot use the well knownK S-translation of λ-calculus, because it does not satisfy Theorem 2.

Lemma 1. If t is a c-term with the only variables x,y1, . . . ,yn, and if ξ,η1, . . . ,ηnΛ, then : (λx t)[η1/y1, . . . ,ηn/yn]?ξ

.

πÂt[ξ/x,η1/y1, . . . ,ηn/yn]?π.

To lighten the notation, let us put u=u[η1/y1, . . . ,ηn/yn] for eachc-termu; thus, we have : u[ξ/x]=u[ξ/x,η1/y1, . . . ,ηn/yn].

The proof is done by induction on the number of rules 1 to 6 used to translate the termλx t. Consider the rule used first.

If it is rule 1, then we have (λx t)?ξ

.

π≡(K)t?ξ

.

πÂt?π

t[ξ/x,η1/y1, . . . ,ηn/yn]?πsincexis not int.

If it is rule 2, we havet=xand (λx t)?ξ

.

πI?ξ

.

πÂξ?πt[ξ/x,η1/y1, . . . ,ηn/yn]?π. If it is rule 3, we havet=uv and (λx t)?ξ

.

π≡(Cλx(E)u)v?ξ

.

π

ÂC?(λx(E)u)

.

v

.

ξ

.

πÂ(λx(E)u)?ξ

.

v

.

πÂ(E)u[ξ/x]?v

.

π(by induction hypoth- esis)ÂE?u[ξ/x]

.

v

.

πÂ(u[ξ/x])v?πt[ξ/x,η1/y1, . . . ,ηn/yn]?πsincexis not inv. If it is rule 4, we havet=ux and (λx t)?ξ

.

π≡(E)u?ξ

.

πÂE?u

.

ξ

.

πÂuξ?π

t[ξ/x,η1/y1, . . . ,ηn/yn]?πsinceudoes not containx.

If it is rule 5, we havet=ux and (λx t)?ξ

.

π≡(Wλx(E)u)?ξ

.

πÂW?(λx(E)u)

.

ξ

.

π Â(λx(E)u)?ξ

.

ξ

.

πÂ(E)u[ξ/x]?ξ

.

π(by induction hypothesis)

ÂE?u[ξ/x]

.

ξ

.

πÂ(u[ξ/x])ξ?πt[ξ/x,η1/y1, . . . ,ηn/yn]?π.

If it is rule 6, we havet=(u)(v)w and (λx t)?ξ

.

π≡(λx(B)uv w)?ξ

.

π Â(B)u[ξ/x]v[ξ/x]w[ξ/x]?π(by induction hypothesis)

ÂB?u[ξ/x]

.

v[ξ/x]

.

w[ξ/x]

.

πÂ(u[ξ/x])(v[ξ/x])w[ξ/x]?π

t[ξ/x,η1/y1, . . . ,ηn/yn]?π.

Q.E.D.

Theorem 2. If t is a c-term with the only variables x1, . . . ,xn, and if ξ1, . . . ,ξnΛ, then λx1. . .λxnt?ξ1

.

. . .

.

ξn

.

πÂt[ξ1/x1, . . . ,ξn/xn]?π.

(5)

Proof by induction onn; the casen=0 is trivial.

We have λx1. . .λxn1λxnt?ξ1

.

. . .

.

ξn1

.

ξn

.

πÂ(λxnt)[ξ1/x1, . . . ,ξn1/xn1]?ξn

.

π (by induction hypothesis) Ât[ξ1/x1, . . . ,ξn1/xn1,ξn/xn]?πby lemma 1.

Q.E.D.

Natural deduction

Before giving the formal language that we shall use, it is perhaps useful to describe informally the structures (models) we have in mind. They are second order structures, with two types of objects :individualsalso calledconditionsandpredicates(of various arity). Since we remain at an intuitive level, we start with afull modelwhich we call theground model.

Such a model consists of :

• an infinite setP (the set of individuals or conditions).

• the set ofk-ary predicates isP(Pk) (full model).

• some functions fromPkintoP.

In particular, there is an individual 0 and a bijective function s:P →(P\ {0}). This enables us to define the set of integersNas the least set which contains 0 and which is closed fors.

There is also a particular condition denoted by1and an application denoted by fromP2 intoP.

• some relations (fixed predicates) on P. In particular, we have the equality relation on individuals and the subset Cofnon trivial conditions.

C[pq] reads as : “pandqare twocompatibleconditions”.

We now come to the formal language, in order to write formulas and proofs about such struc- tures. It consists of :

individual variablesorvariables of conditions calledx,y, . . . orp,q, . . .

predicate variablesorsecond order variables X,Y, . . . ; each predicate variable has an arity which is inN.

function symbols on individuals f,g, . . . ; each one has an arity which is inN.

In particular, there is a function symbol of aritykfor each recursive functionf :Nk→N. This symbol will also be written asf.

There is also a constant symbol1 (which represents the greatest condition) and a binary function symbol(which represents the inf of two conditions).

Thetermsare built in the usual way with variables and function symbols.

Theatomic formulasare the expressionsX(t1, . . . ,tn), whereX is ann-ary predicate variable, andt1, . . . ,tnare terms.

Formulasare built as usual, from atomic formulas, with the only logical symbols →,∀:

• each atomic formula is a formula ;

• if A,Bare formulas, then AB is a formula ;

• if Ais a formula, then∀x Aand∀X Aare formulas.

Notations.The formulaA1→(A2→(. . . (AnB) . . .) will be written A1,A2, . . . ,AnB. The usual logical symbols are defined as follows :

(X is a predicate variable of arity 0, also calledpropositional variable)

⊥ ≡ ∀X XAA→ ⊥;AB ≡(A→ ⊥), (B→ ⊥)→ ⊥; AB≡(A,B→ ⊥)→ ⊥;

yF ≡ ∀y(F → ⊥)→ ⊥(whereyis an individual or predicate variable).

(6)

More generally, we shall write ∃y{F1, . . . ,Fk} for ∀y(F1, . . . ,Fk→ ⊥)→ ⊥. We shall sometimes write ~F for a finite sequence of formulas F1, . . . ,Fk. Then, we shall also write ∃y{~F} and ∀y(~F → ⊥)→ ⊥.

x=yis the formula∀Z(Z x→Z y), whereZ is a unary predicate variable.

The rules of natural deduction are the following (theAi’s are formulas, thexi’s are variables ofc-terms,t,uarec-terms) :

1.x1:A1, . . . ,xn:An`xi:Ai.

2.x1:A1, . . . ,xn:An`t:AB, x1:A1, . . . ,xn:An`u:Ax1:A1, . . . ,xn:An`t u:B. 3.x1:A1, . . . ,xn:An,x:A`t:Bx1:A1, . . . ,xn:An`λx t :AB.

4.x1:A1, . . . ,xn:An`t:Ax1:A1, . . . ,xn: An`t:∀xA for every variablex(individual or predicate) which does not appear inA1, . . . ,An.

5.x1:A1, . . . ,xn:An`t:∀x A ⇒ x1:A1, . . . ,xn:An`t: A[τ/x] wherexis an individual variable andτis a term.

6. x1: A1, . . . ,xn : An `t :∀X Ax1: A1, . . . ,xn : An`t : A[F/X y1. . .yk] where X is a predicate variable of arityk andF an arbitrary formula.

Remark.

In the notationA[F/X y1. . .yk], the variables y1, . . . ,ykare bound. A more usual notation is : A[λy1. . .λykF/X]. I prefer this one, to avoid confusion with theλdefined forc-terms.

Realizability

Given a realizability algebraA =(Λ,Π,Λ?Π,⊥⊥), aA-model M consists of the following data :

• An infinite setPwhich is the domain of variation of individual variables.

• The domain of variation ofk-ary predicate variables isP(Π)Pk.

• We associate with eachk-ary function symbolf, a function fromPk intoP, denoted by f or evenf if there is no ambiguity.

In particular, there is a distinguished element 0 inP and a functions:PP (which is the interpretation of the symbols). We suppose thatsis a bijection fromP ontoP\ {0}.Then, we can identifysn0∈P with the integern, and therefore, we haveN⊂P.

Each recursive function f :Nk →Nis, by hypothesis, a function symbol. Of course, we as- sume that its interpretation f :PkP takes the same values as f onNk.

Finally, we have also a condition1Pand a binary functionfromP2intoP.

Aclosed term(resp. aclosed formula)with parameters in the model M is, by definition, a term (resp. a formula) in which all free occurrences of each variable have been replaced with aparameter, i.e. an object of the same type in the modelM : a condition for an individual variable, an application fromPkintoP(Π) for ak-ary predicate variable.

Each closed termt, with parameters inM has a valuetP.

AninterpretationI is an application which associates an individual (condition) with each individual variable and a parameter of aritykwith each second orderk-ary variable.

I[x←p] (resp.I[X ←X]) is, by definition, the interpretation obtained by changing, inI, the value of the variablex(resp.X) and giving to it the valuepP (resp.X ∈P(Π)Pk).

For each formulaF (resp. termt), we denote byFI (resp.tI) the closed formula (resp. term) with parameters obtained by replacing each free variable with the value given byI.

(7)

For each closed formulaFI with parameters inM, we define two truth values : kFIk ⊂Πand|FI| ⊂Λ.

|FI|is defined as follows : ξ∈ |FI| ⇔ (∀π∈ kFIk)ξ?π∈ ⊥⊥. kFIkis defined by recurrence onF :

F is atomic : thenFI has the formX(t1, . . . ,tk) whereX :Pk →P(Π) and the ti’s are closed terms with parameters inM. We set kX(t1, . . . ,tk)k =X(t1, . . . ,tk).

FAB : we set kFIk ={ξ

.

π;ξ∈ |AI|,π∈ kBIk}.

F ≡ ∀x A: we set kFIk =S

{kAI[xp]k; pP}.

F ≡ ∀X A: we set kFIk =S

{kAI[X←X]k;X ∈P(Π)Pk} ifX is ak-ary predicate variable.

Notation. We shall write ξ||−F for ξ∈ |F|.

Theorem 3(Adequacy lemma).

If x1:A1, . . . ,xk:Ak`t: A and if ξ1||−AI1, . . . ,ξk ||−AIk, whereI is an interpretation, then t1/x1, . . . ,ξk/xk]||−AI.

In particular, if A is closed and if `t:A, then t||−A.

Proof by recurrence on the length of the derivation of x1:A1, . . . ,xn:An`t:A.

We consider the last used rule.

1. We havet=xi,AAi. Now, we have assumed thatξi||−AIi ; and it is the desired result.

2. We havet=uvand we already obtained :

x1:A1, . . . ,xk:Ak`u:BA and x1:A1, . . . ,xk:Ak`v:B. Givenπ∈ kAIk, we must show (uv)[ξ1/x1, . . . ,ξk/xk]?π∈ ⊥⊥.

By hypothesis on⊥⊥, it is sufficient to show u[ξ1/x1, . . . ,ξk/xk]?v[ξ1/x1, . . . ,ξk/xk]

.

π∈ ⊥⊥. By the induction hypothesis, we have v1/x1, . . . ,ξk/xk]||−BI and therefore :

v[ξ1/x1, . . . ,ξk/xk]

.

π∈ kBIAIk.

But, by the induction hypothesis, we have also u[ξ1/x1, . . . ,ξk/xk]||−BIAI, hence the result.

3. We have A=BC, t =λx u. We must show λx u[ξ1/x1, . . . ,ξk/xk]||−BICI ; thus, we suppose ξ||−BI, π∈ kCIk and we have to show λx u[ξ1/x1, . . . ,ξk/xk]?ξ

.

π∈ ⊥⊥. By hypothesis on⊥⊥and lemma 1, it suffices to show u[ξ/x,ξ1/x1, . . . ,ξk/xk]?π∈ ⊥⊥.

But this follows from the induction hypothesis applied to x1:A1, . . . ,xn:An,x:B`u:C. 4. We haveA≡ ∀X B, andX is not free inA1, . . . ,An. We must show :

t[ξ1/x1, . . . ,ξk/xk]||−(∀X B)I, i.e. t[ξ1/x1, . . . ,ξk/xk]||−BJ withJ =I[X ←X]. But, by hypothesis,ξi ||−AIi thereforeξi ||−AJi : indeed, sinceX is not free inAi, we have :

kAIi k = kAJi k. Then, the induction hypothesis gives the result.

6. We haveA=B[F/X y1. . .yn] and we must show :

t1/x1, . . . ,ξk/xk]||−B[F/X y1. . .yn]I assuming thatt1/x1, . . . ,ξk/xk]||−(∀X B)I. This follows from lemma 4 below.

Q.E.D.

Lemma 4. kB[F/X y1. . .yn]Ik = kBI[X←X]kwhereX :Pn→P(Π)is defined by : X(p1, . . . ,pn)= kFI[y1p1,...,ynpn]k.

The proof is by induction onB. That is trivial ifX is not free inB. Indeed, the only non trivial case of the induction is B= ∀Y C ; and then, we have Y 6=X and :

(8)

kB[F/X y1. . .yn]Ik = k(∀Y C[F/X y1. . .yn])Ik =S

YkC[F/X y1. . .yn]I[Y←Y]k. By induction hypothesis, this gives S

YkCI[Y←Y][X←X]k, that is S

YkCI[X←X][Y←Y]k i.e.

k(∀Y C)I[X←X]k.

Q.E.D.

Lemma 5. LetX,Y ⊂Πbe truth values. Ifπ∈X, then kπ||−X Y.

Suppose ξ||−X and ρ∈Y ; we must show kπ?ξ

.

ρ∈ ⊥⊥, that isξ?π∈ ⊥⊥, which is clear.

Q.E.D.

Proposition 6(Law of Peirce). cc||− ∀XY(((X →Y)→X)→X).

We want to show that cc||−((X →Y)→X)→X. Thus, we take ξ||−(X →Y)→X and π∈X ; we must show that cc?ξ

.

π∈ ⊥⊥, that isξ?kπ

.

π∈ ⊥⊥. By hypothesis onξandπ, it is sufficient to show thatkπ||−X →Y, which results from lemma 5.

Q.E.D. Proposition 7.

i) If ξ||−AB , then ∀η(η||−Aξη||−B).

ii) If ∀η(η||−Aξη||−B), then (E)ξ||−AB . i) From ξη?πÂξ?η

.

π.

ii) From (E)ξ?η

.

πÂξη?π.

Q.E.D.

Remark.Proposition 7 shows that ξ||−AB is “almost” equivalent (i.e. up to anη-expansion ofξ) to ∀η(η||−Aξη||−B).

Predicate symbols

In the following, we shall useextended formulaswhich containpredicate symbols (or predi- cate constants) R,S, . . . on individuals. Each one has an arity, which is an integer.

In particular, we have a unary predicate symbolC (which represents the set of non trivial conditions).

We have to add some rules of construction of formulas :

• IfF is a formula,Ris an-ary predicate constant andt1, . . . ,tnare terms, then R(t1, . . . ,tn)→F and R(t1, . . . ,tn)7→F are formulas.

• >is an atomic formula.

In the definition of aA-modelM, we add the following clause :

• With each relation symbol Rof arityn, we associate an application, denoted by RM or R, from Pn into P(Λ). We shall also write |R(p1, . . . ,pn)|, instead of R(p1, . . . ,pn), for p1, . . . ,pnP.

In particular, we have an applicationC:P→P(Λ), which we denote as |C[p]|.

We define as follows the truth value inM of an extended formula : k>k = ;.

k(R(t1, . . . ,tn)→F)Ik ={t

.

π;t∈ |R(t1I, . . . ,tnI)|,π∈ kFIk}.

k(R(t1, . . . ,tn)7→F)Ik = kFIkifI∈ |R(t1I, . . . ,tnI)|; k(R(t1, . . . ,tn)7→F)Ik = ;otherwise.

(9)

Proposition 8.

i)λx(x)I ||− ∀X∀x1. . .∀xn[(R(x1, . . . ,xn)→X)→(R(x1, . . . ,xn)7→X)].

ii) If we have |R(p1, . . . ,pn)| 6= ; ⇒I∈ |R(p1, . . . ,pn)| for every p1, . . . ,pnP , then : K ||− ∀Xx1. . .∀xn[(R(x1, . . . ,xn)7→X)→(R(x1, . . . ,xn)→X)].

Trivial.

Q.E.D.

Remark. By means of proposition 8, we see that, if the applicationR:Pn →P(Λ) takes only the values {I} and;, we can replace R(t1, . . . ,tn)→F with R(t1, . . . ,tn)7→F.

We define the binary predicate'by putting|p'q| ={I} ifp=q and |p'q| = ;ifp6=q. By the above remark, we can replace p'qF withp'q7→F. Proposition 9 shows that we can also replace p=qF withp'q7→F.

Notations.We shall write p=q7→F instead of p'q7→F. Thus, we have : kp=q7→Fk = kFk ifp=q; kp=q7→Fk = ; ifp6=q.

We shall write p6=q for p=q7→ ⊥. Thus, we have : kp6=qk =Πifp=qand kp6=qk = ;ifp6=q.

Using p=q7→F instead of p=qF, and p6=q instead ofp=q→ ⊥, greatly simplifies the computation of the truth value of a formula which contains the symbol=.

Proposition 9.

i)λx x I||− ∀X∀x∀y((x=yX)→(x=y7→X)); ii)λxλy y x||− ∀Xxy((x=y7→X),x=yX).

i) Leta,bP,X ⊂Π,ξ||−a=b→X andπ∈ ka=b7→Xk.

Then, we havea=b, thusI||−a=b, thereforeξ?I

.

π∈ ⊥⊥, thusλx x I?ξ

.

π∈ ⊥⊥.

ii) Now letη||−(a=b7→X),ζ||−a=bandρ∈ kXk.

We show that λxλy y x?η

.

ζ

.

ρ∈ ⊥⊥in other words ζ?η

.

ρ∈ ⊥⊥.

Ifa=b, thenη||−X,ζ||− ∀Y(Y →Y). We haveη

.

ρ∈ kX →Xk, thusζ?η

.

ρ∈ ⊥⊥.

Ifa6=b, thenζ||− > → ⊥, thusζ?η

.

ρ∈ ⊥⊥.

In both cases, we get the desired result.

Q.E.D. Remark.

LetRbe a subset ofPkand 1R:Pk→{0, 1} its characteristic function, defined as follows : 1R(p1, . . . ,pn)=1 (resp.=0) if (p1, . . . ,pn)∈R(resp. (p1, . . . ,pn)∉R).

Let us define the predicateRin the modelMby putting :

|R(p1, . . . ,pn)| ={I} (resp.= ;) if (p1, . . . ,pn)∈R(resp. (p1, . . . ,pn)∉R).

By propositions 8 and 9, we see thatR(x1, . . . ,xn) and 1R(x1, . . . ,xn)=1 are interchangeable. More precisely, we have : I ||− ∀Xx1. . .∀xn((R(x1, . . . ,xn)7→X)↔(1R(x1, . . . ,xn)=17→X)).

For each formula A[x1, . . . ,xk], we can define the k-ary predicate symbol NA, by putting

|NA(p1, . . . ,pk)| ={kπ; π∈ kA[p1, . . . ,pk]k}. Proposition 10 below shows thatNA and¬A are interchangeable ; this may simplify truth value computations.

Proposition 10.

i) I||− ∀x1. . .∀xk(NA(x1, . . . ,xk)→ ¬A(x1, . . . ,xk)); ii) cc||− ∀x1. . .∀xk((NA(x1, . . . ,xk)→ ⊥)→A(x1, . . . ,xk)).

(10)

i) Letp1, . . . ,pkP,π∈ kA(p1, . . . ,pk)k,ξ||−A(p1, . . . ,pk) andρΠ. We must show : I?kπ

.

ξ

.

ρ∈ ⊥⊥, that isξ?π∈ ⊥⊥, which is obvious.

ii) Letη||−NA(p1, . . . ,pk)→ ⊥ and π∈ kA(p1, . . . ,pk)k. We must show : cc?η

.

π∈ ⊥⊥, i.e.η?kπ

.

π∈ ⊥⊥, which is clear, since kπ∈ |NA(p1, . . . ,pk)|.

Q.E.D.

Fixed point combinator

Theorem 11. Let Y=A A with A=λaλf(f)(a)a f . Then, we have Y?ξ

.

πÂξ?Yξ

.

π. Let f :P2P such that f(x,y)=1is a well founded relation on P . Then :

i) Y||− ∀X{∀x[∀y(f(y,x)=17→X y)X x]→ ∀x X x}.

ii) Y||− ∀X1. . .∀Xk

{∀x[y(X1y, . . . ,Xkyf(y,x)6=1),X1x, . . . ,Xkx→ ⊥]→ ∀x(X1x, . . . ,Xkx→ ⊥)}.

The property Y?ξ

.

πÂξ?Yξ

.

π is immediate, from theorem 2.

i) We takeX :P →P(Π), pP and ξ||− ∀x[∀y(f(y,x)=17→Xy)→Xx]. We show, by induction on the well founded relationf(x,y)=1, thatY?ξ

.

π∈ ⊥⊥for everyπ∈Xp.

Letπ∈Xp ; from (i), we get Y?ξ

.

πÂξ?Yξ

.

π and thus, it is sufficient to prove that ξ?Yξ

.

π∈ ⊥⊥. By hypothesis, we haveξ||− ∀y(f(y,p)=17→Xy)→Xp; thus, it suffices to show thatYξ||−f(q,p)=17→Xq for every qP. This is clear if f(q,p)6=1, by definition of 7→.

If f(q,p)=1, we must showYξ||−Xq, i.e. Y?ξ

.

ρ∈ ⊥⊥for every ρ∈Xq. But this follows from the induction hypothesis.

ii) The proof is almost the same : takeX1, . . . ,Xk:P→P(Π),pP and

ξ||− ∀x[y(X1y, . . . ,Xkyf(y,x)6=1),X1x, . . . ,Xkx→ ⊥]. We show, by induction on the well founded relationf(x,y)=1, thatY?ξ

.

π∈ ⊥⊥for everyπ∈ kX1p, . . . ,Xkp→ ⊥k.

As before, we have to show that : Yξ||−X1q, . . . ,Xkqf(q,p)6=1 for allqP;

this is obvious iff(q,p)6=1. If f(q,p)=1, we must show Yξ||−X1q, . . . ,Xkq→ ⊥, or else : Y?ξ

.

ρ∈ ⊥⊥for everyρ∈ kX1q, . . . ,Xkq→ ⊥k. But this follows from the induction hypothesis.

Q.E.D.

Integers, storage and recursive functions

Recall that we have a constant symbol 0 and a unary function symbolswhich is interpreted, in the modelM by a bijective functions:P→(P\ {0}).

And also, that we have identifiedsn0 with the integern; thus, we supposeN⊂P. We denote by int(x) the formula∀X(∀y(X y→X s y),X0→X x).

Letu=(un)n∈Nbe a sequence of elements ofΛ. We define the unary predicate symboleuby putting : |eu(sn0)| ={un} ; |eu(p)| = ;ifp∉N.

Theorem 12. Let Tu,SuΛbe such that Su||−(> → ⊥),> → ⊥ and : Tu?φ

.

ν

.

πÂν?Su

.

φ

.

u0

.

π; Su?ψ

.

un

.

πÂψ?un+1

.

π

for everyν,φ,ψΛandπΠ. Then : Tu||− ∀Xx[(eu(x)→X),int(x)X].

Tuis called a storage operator.

(11)

Let pP,φ||−eu(p)→X, ν||−int(p) and π∈ kXk. We must show Tu?φ

.

ν

.

π∈ ⊥⊥ i.e.

ν?Su

.

φ

.

u0

.

π∈ ⊥⊥.

• Ifp∉N, we define the unary predicateY by putting : Y(q)≡ >ifq∈N; Y(q)≡ > → ⊥ifq∉N.

Thus, we have obviously φ||−Y(0) andu0

.

π∈ kY(p)k.

But, by hypothesis onν, we have ν||− ∀y(Y y→Y s y),Y0→Y p.

Thus, it is sufficient to show that :

Su||− ∀y(Y y→Y s y), i.e. Su||−Y(q)→Y(sq) for everyqP. This is clear ifq∈N, since we have kY(sq)k = ;.

Ifq∉N, we must show Su||−(> → ⊥),> → ⊥, which follows from the hypothesis.

• Ifp∈N, we have p=sp0 ; we define the unary predicateY by putting : kY si0k ={up−i

.

π} for 0≤ipandkY qk = ;ifq∉{si0; 0≤ip}.

By hypothesis onν,φ,π, we have :

ν||− ∀y(Y y→Y s y),Y0→Y sp0 ; φ||−Y0 ; u0

.

π∈ kY sp0k.

Thus, it suffices to show that Su||− ∀y(Y yY s y), i.e. Su||−Y qY sqfor everyqP. This is clear ifq∉{si0; 0≤i <p}, since then kY sqk = ;.

Ifq=si0 withi<p, let ξ||−Y q ; we must show Su?ξ

.

upi1

.

π∈ ⊥⊥.

But we have Su?ξ

.

up−i−1

.

πÂξ?up−i

.

π which is in⊥⊥, by hypothesis onξ.

Q.E.D.

Notation. We define the closedc-terms 0=λxλy y; σ=λnλfλx(f)(n)f x ; and, for each n∈N, we put n=(σ)n0. We define the unary predicate symbol ent(x) by putting :

|ent(n)| ={n} ifn∈N;

|ent(p)| = ;ifp∉N.

In other words, ent(x) is the predicateeu(x) when the sequenceuis (n)n∈N. Theorem 13.

We put T=λfλn(n)S f0, with S=λgλx(g)(σ)x. Then, we have : i) T ||− ∀Xx((ent(x)X),int(x)X).

ii) I ||− ∀x((ent(x)int(x)).

Therefore,T is a storage operator (theorem 12).

i) We immediately have, by theorem 2 :

T?φ

.

ν

.

πÂν?S

.

φ

.

0

.

π; S?ψ

.

(σ)n0

.

πÂψ?(σ)n+10

.

π for everyν,φ,ψΛandπΠ.

Now, we check that S||−(> → ⊥),> → ⊥: indeed, ifξ||− > → ⊥, thenS

.

η

.

πÂξ?ση

.

π∈ ⊥⊥ for everyηΛandπΠ(by theorem 2).

Then, the result follows immediately, from theorem 12.

ii) We must show I||− ent(p)→int(p) for everypP. We may supposep∈N(otherwise ent(p)= ;and the result is trivial). Then, we must show :

I?σp0

.

ρ∈ ⊥⊥knowing thatρ∈ kint(sp0)k.

Therefore, we can find a unary predicate X :P → P(Π), φ||− ∀y(X y → X s y), ω||−X0 and π∈ kX sp0ksuch thatρ=φ

.

ω

.

π. We must show (σ)p0?φ

.

ω

.

π∈ ⊥⊥. In fact, we show by recurrence onp, that (σ)p0?φ

.

ω

.

π∈ ⊥⊥ for all π∈ kX sp0k.

Ifp=0, letπ∈ kX0k; we must show 0?φ

.

ω

.

π∈ ⊥⊥, i.e. ω?π∈ ⊥⊥, which is clear, since ω||−X0.

(12)

To move up fromptop+1, letπ∈ kX sp+10k. We have :

σp+10?φ

.

ω

.

π≡(σ)(σ)p0?φ

.

ω

.

πÂσ?σp0

.

φ

.

ω

.

πÂφ?(σp0)φω

.

π.

But, by induction hypothesis, we haveσp0?φ

.

ω

.

ρ∈ ⊥⊥for everyρ∈ kX sp0k. It follows that (σp0)φω||−X sp0. Sinceφ||−X sp0→X sp+10, we obtain φ?(σp0)φω

.

π∈ ⊥⊥.

Q.E.D.

Theorem 13 shows that we can use the predicate ent(x) instead of int(x), which greatly sim- plifies many computations. In particular, we define theuniversal quantifier restricted to in- tegersxintby putting ∀xintF ≡ ∀x(int(x)F).

Thus, we can replace it with theuniversal quantifier restricted to ent(x) defined as follows :

xentF ≡ ∀x(ent(x)F). Then, we have k∀xentFk ={n

.

π;n∈N,π∈ kF[sn0/x]k}.

Therefore, the truth value of the formula ∀xentF is much simpler than the one of the for- mula ∀xintF.

Theorem 14. Letφ:N→Nbe a recursive function. There exists a closedλ-term θsuch that, if m∈N, n=φ(m)and f is aλ-variable, thenθm f reduces into f n by weak head reduction.

This is a variant of the theorem of representation of recursive functions by λ-terms. It is proved in [13].

Theorem 15. Letφ:Nk→Nbe a recursive function. We define, inM, a function symbol f , by putting f(sm10, . . . ,smk0)=sn0with n=φ(m1, . . . ,mk); we extend f on Pk\Nkin an arbitrary way. Then, there exists a proof-like term θsuch that :

θ||− ∀x1. . .∀xk[int(x1), . . . ,int(xk)→int(f(x1, . . . ,xk))].

For simplicity, we assumek=1. By theorem 13, it suffices to find a proof-like termθ such that θ||− ∀x[ent(x), (ent(f(x))→ ⊥)→ ⊥]. In other words :

θ||−ent(p), (ent(f(p))→ ⊥)→ ⊥for everypP.

We can suppose thatp=sm0 (otherwise, |ent(p)| = ;and the result is trivial).

Thus, we have ent(p)={m} ; we must show :

θ?m

.

ξ

.

π∈ ⊥⊥for allπΠandξ||−ent(sn0)→ ⊥, withn=φ(m).

Take theλ-term θgiven by theorem 14. From this theorem, we get : θ?m

.

ξ

.

πÂξ?n

.

π, which is in⊥⊥, by hypothesis onξ.

Q.E.D.

Remark.We have now found proof-like terms which realize all the axioms of second order arithmetic, with a function symbol for each recursive function.

Standard realizability algebras

A realizability algebraA is calledstandard if its set of terms Λand its set of stacksΠare defined as follows :

We have a countable setΠ0which is the set ofstack constants.

The terms and the stacks ofA are finite sequences of elements of the set : Π0∪{B,C,E,I,K,W,cc,ς,χ,χ0,k, (, ), [, ],

.

}

which are obtained by the following rules :

B,C,E,I,K,W,cc,ς,χ,χ0are terms ;

• each element ofΠ0is a stack ;

(13)

• ifξ,ηare terms, then (ξ)ηis a term ;

• ifξis a term andπa stack, thenξ

.

πis a stack ;

• ifπis a stack, thenk[π] is a term.

A term of the formk[π] is calledcontinuation. It will also be denoted askπ. The set of processes of the algebraA isΛ×Π.

Ifξ∈Λandπ∈Π, the ordered pair (ξ,π) is denoted asξ?π.

Therefore, every stack has the form π=ξ1

.

. . .

.

ξn

.

π0, whereξ1, . . . ,ξn∈Λandπ0∈Π00is a stack constant). Given a termτ, we put :

πτ=ξ1

.

. . .

.

ξn

.

τ

.

π0.

We choose a recursive bijection fromΠontoN, which is written π7→nπ.

We define a preorder relation Â, onΛ?Π. It is the least reflexive and transitive relation such that, for allξ,η,ζ∈Λandπ,$∈Π, we have :

(ξ)η?πÂξ?η

.

π.

I?ξ

.

πÂξ?π.

K?ξ

.

η

.

πÂξ?π. E?ξ

.

η

.

πÂ(ξ)η?π.

W?ξ

.

η

.

πÂξ?η

.

η

.

π.

C?ξ

.

η

.

ζ

.

πÂξ?ζ

.

η

.

π. B?ξ

.

η

.

ζ

.

πÂ(ξ)(η)ζ?π.

cc?ξ

.

πÂξ?kπ

.

π.

kπ?ξ

.

$Âξ?π. ς?ξ

.

πÂξ?nπ

.

π.

χ?ξ

.

πτÂξ?τ

.

π.

χ0?ξ

.

τ

.

πÂξ?πτ.

Finally, we have a subset⊥⊥ofΛ ? Πwhich is a final segment for this preorder, which means that : p∈ ⊥⊥,p0Âp⇒p0∈ ⊥⊥.

In other words, we ask that⊥⊥has the following properties : (ξ)η?π∉ ⊥⊥ ⇒ξ?η

.

π∉ ⊥⊥.

I?ξ

.

π∉ ⊥⊥ ⇒ξ?π∉ ⊥⊥.

K?ξ

.

η

.

π∉ ⊥⊥ ⇒ξ?π∉ ⊥⊥. E?ξ

.

η

.

π∉ ⊥⊥ ⇒(ξ)η?π∉ ⊥⊥. W?ξ

.

η

.

π∉ ⊥⊥ ⇒ξ?η

.

η

.

π∉ ⊥⊥.

C?ξ

.

η

.

ζ

.

π∉ ⊥⊥ ⇒ξ?ζ

.

η

.

π∉ ⊥⊥. B?ξ

.

η

.

ζ

.

π∉ ⊥⊥ ⇒(ξ)(η)ζ?π∉ ⊥⊥. cc?ξ

.

π∉ ⊥⊥ ⇒ξ?kπ

.

π∉ ⊥⊥.

kπ?ξ

.

$∉ ⊥⊥ ⇒ξ?π∉ ⊥⊥. ς?ξ

.

π∉ ⊥⊥ ⇒ξ?nπ

.

π∉ ⊥⊥. χ?ξ

.

πτ∉ ⊥⊥ ⇒ξ?τ

.

π∉ ⊥⊥.

χ0?ξ

.

τ

.

π∉ ⊥⊥ ⇒ξ?πτ∉ ⊥⊥.

Remark. Thus, the only arbitrary elements in a standard realizability algebra are the setΠ0of stack constants and the set⊥⊥of processes.

Références

Documents relatifs

We report on a proof-checked version of Stone’s result on the representability of Boolean algebras via the clopen sets of a totally disconnected compact Hausdor↵ space.. Our

The roots f 1 , f 2 of the derivative polynomial are situated in the interior of the triangle abc and they have an interesting geometric property: f 1 and f 2 are the focal points

We conclude about the existence of imaginary quadratic fields, p-rational for all p ≥ 2 (Angelakis–Stevenhagen on the concept of “minimal absolute abelian Galois group”) which

An important property of finite semigroups is that they admit factorization forests of finite height.. This fact is called the Factorization

A similar Poincar´e inequality is established in a more general setting in Ambrosio [1], which develops a general theory of functions of bounded variation taking values in a

(refer to fig. Our model category proof is preceded by the following lemma which says, roughly, that a pullback of a weak équivalence along a fibration is a weak équivalence. This

holds because the difference in arithmetic and geometric genus due to a triple point with linearly independent tangents is equal to 2..

Since (sin(α 1 + 2q)) is positive and negative over certain intervals we can see that the function clearly has two rises and two falls, also, since cos(α 1 + 2q) has zeros and