Bar recursion in classical realisability : dependent choice and well ordering of R
Jean-Louis Krivine
May 1, 2015
Introduction
T. Streicher has shown, in [8], by using abar recursion operator, that the models of ZF, as- sociated with realizability algebras [4, 6] obtained from usual models ofλ-calculus (Scott domains, coherent spaces, . . . ), satisfy theaxiom of dependent choice.
We give here a proof of this result, in the framework of classical realizability (see [6]) taking, as an example, the Engeler’s model ofλ-calculus [3].
In sections 2 and 3, which are very similar, we show that a bar recursion operator realizes the axiom of countable choice (CC), then the axiom of dependent choix (DC). The proof is a little simpler for CC.
The ideas are taken from [2], but used in a completely different context.
We deduce from this result that, in the model of ZF associated with one of these realizability algebras,every real (more generally, every sequence of ordinals) is constructible.
The formula “Ris well ordered” is therefore realized, in these models, by a closedλc-term (i.e. aλ-term containing the control instructioncc).
We show also thatevery true formula of analysis is realized by a closedλc-term.
1 The Engeler’s model as a realizability algebra
The Engeler’s model is the simplest model ofλ-calculus. We recall below rapidly its con- struction.
We have two symbolsO,→ and we define thewebof the Engeler’s model as the smallest set Dsuch that :
O∈D; ifα∈Dand ifais a finite subset ofD, then (a→α)∈D.
Moreover, we identify Oand (; →O).1 The set of finite subsets ofDis denotedD∗.
We shall use the notation a1, . . . ,an→α for a1→(a2→(· · ·(an→α)· · ·)) (withα∈Danda1, . . . ,an∈D∗).
1This a slight modification of the original definition.
The elements of the webDare calledformulasortypes.
Every formula can be written, in only one way, as a1, . . . ,an→O, withan6= ;.
Its other forms are a1, . . . ,an,;, . . . ,; →O. We now define an order relation onD.
Let a1, . . . ,ak,b1, . . . ,bl∈D∗, withak,bl6= ;. Then, we have : (a1, . . . ,ak→O)≤(b1, . . . ,bl→O) ⇔ k≥landb1⊂a1, . . . ,bl⊂al.
The lower bound (a1, . . . ,ak→O)u(b1, . . . ,bk→O) is (a1∪b1, . . . ,ak∪bk→O).
Ois the greatest element ofD.
Themodel of Engeler, denotedΛ, is the setP(D) of subsets ofD.
We define, onΛ, a binary operation t,u7→(t)u, calledapplication, by setting : (t)u={α∈D; (∃a∈D∗){a⊂u, (a→α)∈t}}.
We shall often writet u1. . .unor (t)u1. . .unfor (. . . ((t)u1) . . .)un. We define the combinatorsK,S, makingΛacombinatory algebra: Kis the set of formulas : {α},; →α forα∈D;
Sis the set of formulas : {a, {α1, . . . ,αk}→α}, {a1→α1, . . . ,ak→αk},a∪a1∪. . .∪ak→α withα,α1, . . . ,αk∈Danda,a1, . . . ,ak∈D∗.
We define now arealizability algebra[4, 6], denotedAA =(Λ,Π,⊥⊥⊥), which is associated with this model ofλ-calculus.2
The setΛoftermsofAA has just been defined.
Astackof the algebraAA is afilter, i.e. a subsetπofDsuch that : α∈π,β≥α⇒β∈π;α,β∈π⇒αuβ∈π;O∈π.
The setΠof stacks of the algebraAA can be identified withΛN: Indeed, ifπ∈Π, we define the sequenceti∈Λ(i∈N) by setting : ti =S
{ai; (a1, . . . ,ai, . . . ,an→O)∈π}. Then, we have : π={a1, . . . ,an→O;ai⊂ti for 1≤i ≤n}.
In order to complete the definition of the realizability algebraAA, we set : Λ?Π=Λ×Πand⊥⊥⊥ ={t?π∈Λ?Π; t∩π6= ;}.
t
.
π={a→α;a⊂t,α∈π} fort∈Λandπ∈Π. kπ={{α}→O;α∈π} forπ∈Π.ccis the set of formulas : {a→α}→α1u. . .uαnuα withα1, . . . ,αn,α∈Danda={{α1}→O, . . . , {αn}→O} }.3 We check that :
kπ?t
.
ρ∈ ⊥⊥⊥ ⇔t?π∈ ⊥⊥⊥, i.e. kπ∩t.
ρ6= ; ⇔t∩π6= ;.Indeed, if ({α}→O)∈t
.
ρwithα∈π, thenα∈t∩πand conversely.cc?t
.
π∈ ⊥⊥⊥ ⇔t?kπ.
π∈ ⊥⊥⊥, i.e.cc∩t.
π6= ; ⇔t∩kπ.
π6= ;.Indeed, if ({a→α}→α1u. . .uαnuα)∈t
.
πwitha={{α1}→O, . . . , {αn}→O}, then we have : α1, . . . ,αn,α∈π, and thereforea⊂kπ; moreover, (a→α)∈t, thus (a→α)∈t∩kπ.
π.Conversely, if (a→α)∈t, witha⊂kπandα∈π, we have : a={{α1}→O, . . . , {αn}→O}, andα1, . . . ,αn∈π;
thus ({a→α}→γ)∈t
.
π, withγ=α1u. . .uαnuα. Therefore, ({a→α}→γ)∈cc∩t.
π.2The definition of this algebra is due to T. Ehrhard and T. Streicher.
3The definition of⊥⊥⊥,kπandccin usual models ofλ-calculus is due to T. Ehrhard.
In order to finish the definition of the realizability algebraAA, it remains to choose the setPL ofproof-like terms[4, 6]. This set must contain the values of the combinatorsK,S,cc, and be closed by the operation ofapplication. We do not choose the smallest such set, because we shall need some new combinators, which we define now.
Letνi∈Ddefined by induction fori∈N:ν0={O}→O;νi+1= ; →νi ;
we definen={νn}∈Λ;nis called theatomic integer n. TheChurch integeris writtenn.
We haven=(K)n0 ; thus, thesuccessorfor atomic integers isK.
We need a combinatorcmpto compare atomic integers ; it is defined as follows : cmp={({νi}, {νj}, {α},; →α) ;α∈D,i,j∈N,i<j}∪
{({νi}, {νj},;, {α}→α) ;α∈D,i,j ∈N,i≥j}∪ {({νi}, {O}→O) ;i∈N}∪{{O}→O} ;
thus, we havecmpi¯j t u¯ =tifi<j ;cmpi¯j t u¯ =uifi≥j.
We define now the setPLofproof-like termsto be the smallest set, containing the combina- torsK,S,cc, 0,cmp, which is closed by the operation ofapplication.
With each realizability algebra, we can build a model of ZF, provided that this algebra satis- fies the following condition ofcoherence[4, 6] :
For every t∈PL, there exists a stackπ∈Πsuch that t?π∉ ⊥⊥⊥. Lemma 1. The realizability algebraAA is coherent.
For every formulaα∈D, we define itstruth value|α| ∈{0, 1} :
|O| =0 ;|a→α| =0⇔ |α| =0 and (∀β∈a)(|β| =1).
Then, for eacht∈Λ, we set |t| =inf{|α|; α∈t}.
It is easily checked that |K|,|S|,|cc|,|0|,|cmp| =1 and that :
(∀t,u∈Λ)(|t| = |u| =1→ |t u| =1). It follows that (∀t∈PL)(|t| =1).
Therefore, ift∈PL, thenO∉t, thust?{O}∉ ⊥⊥⊥. Thus, the stackπwe are looking for is {O}.
C.Q.F.D.
Theorem 2. For every sequenceξn∈Λ(n∈N), there exists φ∈Λsuch that :
• φn=ξnfor every n∈N;
• for every U∈Λsuch that Uφ||− ⊥, there exists k ∈Nsuch that Uψ||− ⊥for every ψ∈Λ such that ψ; = ;and ψi =ξi for every i<k.
A termψ∈Λsuch that ψ; = ;is calledstrict.
We setφ={({νn}→α) ;n∈N,α∈ξn} and we have immediatelyφn=ξn. Moreover, we have : Uφ||− ⊥ ⇔ O∈Uφ ⇔ there existsa∈D∗,a⊂φsuch that (a→O)∈U.
Now,ais a finite subset ofφ, and we have O∈Uψfor every ψ∈Λsuch thata⊂ψ.
We obtain the second part of the theorem by takingk greater than every integeri such that ({νi}→α)∈a, withα∈ξi. Indeed, we haveα∈φi, i.e.α∈ψ{νi} and (; →α)∉ψbecauseψ is strict. Therefore, ({νi}→α)∈ψand it follows thata⊂ψ.
C.Q.F.D.
Quantifiers restricted to N
In [6], we defined the quantifier∀xint, by setting : k∀xintF[x]k =S
n∈Nk{n}→F[n]}k ={n
.
π;n∈N,π∈ kF[n]k}, so that we have :ξ||− ∀xintF[x] ⇔ ξn||−F[n] for alln∈N;
and it is shown that it is a correct definition of the restricted quantifier toN.
Indeed the equivalence ∀xintF[x]↔ ∀x(int[x]→F[x]) is realized by a closedλ-term inde- pendent ofF, called astorage operator.
The formula int[x] is any formula of ZF which says thatxis an integer.
We now do the same withatomic integers. Let us define the quantifier∀xINT, by setting : k∀xINTF[x]k =S
n∈Nk{n}→F[n]}k ={n
.
π;n∈N,π∈ kF[n]k}, so that we have : ξ||− ∀xINTF[x] ⇔ ξn||−F[n] for alln∈N.It is also a correct definition of the restricted quantifier toN. Indeed, we have : θ0||− ∀xINTF[x]→ ∀xintF[x] ; θ1||− ∀xintF[x]→ ∀xINTF[x]
whereθ0,θ1areproof-like termssuch that θ0f n=f n; θ1f n=f n; they are defined as follows :
θ0=λfλn(f)(n)K0 ;
θ1=λfλn(f)(τ) 0n0, whereτis defined by : τi nx=((cmpi n)(τ)i+n x+)x; i+=Ki is the successor of the atomic integeri ;
x+=λfλz(x f)(f)zis the successor of the Church integerx.
The bar recursion operator
We define below twoproof-like termsχandΨ.
In these definitions, the variablesi,k represent (intuitively) atomic integers and the vari- ablef represents a function of domainN, with arbitrary values inΛ.
χmust be such that : χk f zi=f i if i <k;χk f zi=z if i≥k Therefore, we set :
χ=λkλfλzλi((cmpi k)(f)i)z
The termχk f is a representation of the finite sequence (f0,f1, . . . ,f k−1).
Ψmust be such that : Ψg uk f =(u)(χk f)(g)λz(Ψg uk+)(χ)k f z wherek+=Kkis the successor of the atomic integerk. We have thus :
Ψ=λgλu(Y)λhλkλf(u)(χk f)(g)λz(hk+)(χ)k f z. The termΨis called abar recursion operator.
2 Realizing countable choice
We write theaxiom of countable choiceas follows :
(CC) ∀nגN¬∀xגX¬F[n,x],∀fג(XN)¬∀nINTF[n,f(n)]→ ⊥
whereX is an arbitrarynon voidset of the ground modelM, andF(n,x) an arbitrary formula of ZFε(see [5]), with parameters and two free variables.4
It is known (see [6]) that, in the realizability model (N ,ε), N (resp. X) is a subset of גN (resp.גX), andג(XN) is a subset of (גX)גN.
Thus, if f εג(XN), thenf defines a function fromNintoגX.
4The symbolגand the restricted quantifier∀xגXare defined in [6]. The conservative extension ZFεof ZF is defined in [5].
Theorem 3. λgλu(Ψ)g u0 ||−CC.
The axiom of countable choice is therefore realized in the model of ZF associated with the realizability algebra of the Engeler’s model (in fact, it is sufficient that the realizability algebra satisfies the property formulated in theorem 2).
LetG,U∈Λbe such that G||− ∀nגN¬∀xגX¬F[n,x] and U ||− ∀fגXN¬∀nINTF[n,f(n)].
We setH=ΨGU and we have to show thatH0||− ⊥.
Lemma 4. Let k∈Nand φ∈Λbe such that (∀i<k)(∃ai∈X)(φi ||−F[i,ai]).
If H kφ6||− ⊥, then there exists ak∈X and ζk,φ||−F[k,ak]such that(H k+)(χ)kφζk,φ6||− ⊥.
Leta∈X be fixed. Defineηk,φ=λz(H k+)(χ)kφz, so thatH kφ=(U)(χkφ)(G)ηk,φ. If ηk,φ||− ∀xגX¬F[k,x] then, by hypothesis onG, we haveGηk,φ||− ⊥and therefore :
(χkφ)(G)ηk,φ||− ∀nINTF[n,fk(n)]
wherefk:N→X is defined by fk(i)=ai fori <k; fk(i)=afori≥k.
Indeed, if we set φ0=(χkφ)(G)ηk,φ, we have :
φ0i=φi ||−F[i,ai] fori<kandφ0i=(G)ηk,φ||− ⊥fori≥k, and thereforeφ0i||−F[i,a].
By hypothesis onU, it follows that (U)(χkφ)(G)ηk,φ||− ⊥, in other wordsH kφ||− ⊥.
Thus, we have shown that, ifH kφ6||− ⊥, thenηk,φ6||− ∀xגX¬F[k,x], which gives immediately the desired result.
C.Q.F.D.
Letφ0 ∈Λbe such that H0φ06||− ⊥. By means of lemma 4, we define ak ∈X and φk ∈Λ recursively onk, by setting φk+1=χkφkζk,φk.
Then, we show immediately, by recurrence onk:
φki ||−F[i,ai]for i<k ; φki=φk+1i for i<k ; H kφk6||− ⊥.
Then, we can define :
a functionf :N→X such thatf(i)=ai for everyi∈N;
and, by theorem 2, a termφ∈Λsuch thatφi=φki fori,k∈Nwithi<k.
The functionφ:N→Λis the common extension of theφkk (φkrestricted to{0, 1, . . . ,k−1}).
Therefore, we haveφi ||−F[i,f(i)] for everyi ∈N, that is to say φ||− ∀nINTF[n,f(n)].
By hypothesis onU, it follows thatUφ||− ⊥. Therefore, by theorem 2, there exists an integerk such thatUψ||− ⊥, for everystricttermψ∈Λsuch thatψi =φi fori<k.
Now,χkt uvis strict for anyk,t,u,v∈Λ, since cmp;k= ;.
Therefore, we have (U)(χkφk)ξ||− ⊥for everyξ∈Λ.
Now, we have H kφk=(U)(χkφk)(G)ηk,φk and therefore H kφk||− ⊥, that is a contradiction.
Thus, we have shown that H0φ0||− ⊥for everyφ0∈Λ, and therefore H0||− ⊥.
C.Q.F.D.
3 Realizing dependent choice
We write theaxiom of dependent choiceas follows :
(DC) ∀xגX¬∀yגX¬F[x,y],∀fג(XN)¬∀nINTF[f(n),f(n+1)]→ ⊥
whereX is an arbitrarynon voidset of the ground modelM, andF(x,y) an arbitrary formula of ZFε, with parameters and two free variables.
Theorem 5. λgλu(Ψ)g u0 ||−DC.
The axiom of dependent choice is therefore realized in the model of ZF associated with the realizability algebra of the Engeler’s model (or, more generally, with any realizability algebra satisfying the property formulated in theorem 2).
The proof of theorem 5 is almost the same as theorem 3.
LetG,U∈Λbe such that G||− ∀xגX¬∀yגX¬F[x,y] andU ||− ∀fגXN¬∀nINTF[f(n),f(n+1)].
We setH=ΨGU and we have to show thatH0||− ⊥.
Lemma 6. Let k∈N, a0, . . . ,ak∈X and φ∈Λbe such that (∀i<k)(φi ||−F[ai,ai+1]).
If H kφ6||− ⊥, then there exists ak+1∈X and ζ||−F[ak,ak+1]such that(H k+)(χ)kφζ6||− ⊥. Defineηk=λz(H k+)(χ)kφz, so thatH kφ=(U)(χkφ)(G)ηk.
If ηk||− ∀yגX¬F[ak,y] then, by hypothesis onG, we haveGηk||− ⊥and therefore : (χkφ)(G)ηk||− ∀nINTF[fk(n),fk(n+1)]
wherefk:N→X is defined byfk(i)=ai fori<k; fk(i)=akfori≥k. Indeed, if we set φ0=(χkφ)(G)ηk, we have :
φ0i=φi ||−F[ai,ai+1] fori <kandφ0i=(G)ηk||− ⊥fori ≥k.
Therefore, we haveφ0i ||−F[fk(i),fk(i+1)] for everyi∈N.
By hypothesis onU, it follows that (U)(χkφ)(G)ηk ||− ⊥, that isH kφ||− ⊥.
Thus, we have shown that, ifH kφ6||− ⊥, thenηk6||− ∀yגX¬F[ak,y], which gives immediately the desired result.
C.Q.F.D.
Leta0∈X andφ0∈Λbe such that H0φ06||− ⊥. By means of lemma 6, we defineak∈X and φk∈Λrecursively onk, by setting φk+1=χkφkζ, whereζis given by lemma 6, where we set φ=φk. Then, we show immediately, by recurrence onk:
φki ||−F[ai,ai+1]for i<k ; φki=φk+1i for i≤k ; H kφk 6||− ⊥. Then, we can define :
a functionf :N→X such thatf(i)=ai for everyi∈N;
and, by means of theorem 2, a termφ∈Λsuch thatφi=φki fori,k∈Nwithi<k.
The functionφ:N→Λis the common extension of the functionsφkk(restriction ofφkto {0, 1, . . . ,k−1}).
Thus, we haveφi ||−F[f(i),f(i+1)] for everyi∈N, that is to say φ||− ∀nINTF[f(n),f(n+1)].
By hypothesis onU, it follows thatUφ||− ⊥. Therefore, by theorem 2, there exists an integerk such thatUψ||− ⊥, for everystricttermψ∈Λsuch thatψi =φi fori<k.
Now,χkt uvis strict for anyk,t,u,v∈Λ, since cmp;k= ;.
Therefore, we have (U)(χkφk)ξ||− ⊥for everyξ∈Λ.
But, we have H kφk=(U)(χkφk)(G)ηkand therefore H kφk||− ⊥, that is a contradiction.
Thus, we have shown that H0φ0||− ⊥for everyφ0∈Λ, and therefore H0||− ⊥.
C.Q.F.D.
4 A well ordering on R
In this section, we use the notations and the results of [6] and [7].
IfF is a closed formula of ZFε, the notation ||−F means that there exists a proof-like term θ such that θ||−F.
In section 2, we have realized the axiom of countable choice (CC). We consider here the particular case whereX ={0, 1}. By adding a parameterφ, we obtain :
||− ∀φ³
∀nint∃xג2F(n,x,φ)→ ∃fג(2N)∀nintF(n,f(n),φ)´ for every formulaF(n,x,φ) of ZFε.
In particular, takingφε2NandF(n,x,φ)≡(x=φ(n)) (i.e. (n,x)εφ), we find :
||−(∀φε2N)∃fג(2N)∀nint(f(n)=φ(n)).
Thus, in the realizability modelN , every functionφ:N→2, (i.e. every real) is the restriction toNof a functionf εג(2N) (which is itself, as shown in [6], a function fromגNintoג2).
In the ground modelM, letg ⊂Nandf ∈2Nbe its characteristic function.
We have obviously I||−f(n)= 〈n∈g〉, for everyn∈N.5 It follows that : λx xI||− ∀fג(2N)∃g∀nגN(f(n)= 〈n∈g〉).
We have shown that :
||−(∀φε2N)∃g∀nint(φ(n)= 〈n∈g〉).
Now, in [7], we have built an ultrafilterD :ג2→2 on the Boolean algebra ג2, with the fol- lowing property : the modelN , equipped with the binary relationsD(〈x∈y〉),D(〈x=y〉), is a model of ZF, denotedMD, which is an elementary extension of the ground modelM. Moreover,MD is isomorphic to a transitive submodel ofN, which contains every ordinal ofN .
MDsatisfies the axiom of choice, because we suppose thatM|=ZFC.
If we suppose thatM |= V = L, thenMD is isomorphic to the classLN of constructible sets ofN .
For everyφ:N→2, we have obviouslyD(φ(n))=φ(n). It follows that :
||−(∀φε2N)∃g∀nint(φ(n)=D(〈n∈g〉)).
This shows that the subset ofNdefined byφis in the modelMD: indeed, it is the elementg of this model.
We have just shown thatN andMDhave the same reals.
Therefore,Ris well ordered inN , and we have : ||−(Ris well ordered).
Moreover, if the ground modelM satisfies V = L, we have : ||−(every real is constructible).
Since the modelsN andMDhave the same reals, every formula of analysis (closed formula with quantifiers restricted toNorR) has the same truth value inMD,M orN.
It follows that :
For every formula F of analysis, we have M |=F if and only if ||−F . In particular, we have ||−F or ||− ¬F.
5The notation〈F〉, whereFis a closed formula of ZF, with parameters, is defined in [7].
References
[1] S. Berardi, M. Bezem and T. Coquand.On the computational content of the axiom of choice.J. Symb. Logic 63, 2 (1998) p. 600-622.
[2] U. Berger and P. Oliva.Modified bar recursion and classical dependent choice.
Proc. Logic Colloquium 2001 - Springer (2005) p. 89-107.
[3] E. Engeler.Algebras and combinators.Algebra Universalis, vol. 13, 1 (1981) p. 389-392.
[4] J.-L. Krivine.Realizability algebras : a program to well orderR. Logical Methods in Computer Science vol. 7, 3:02 (2011) p. 1-47.
[5] J.-L. Krivine.Realizability algebras II : new models of ZF + DC.
Logical Methods in Computer Science, vol. 8, 1:10 (2012) p. 1-28.
[6] J.-L. Krivine.Realizability algebras III: some examples.To appear (2013).6
[7] J.-L. Krivine.On the structure of classical realizability models of ZF.To appear (2014).
[8] T. Streicher. A classical realizability model arising from a stable model of untyped λ- calculus.To appear (2013).
6Articles [4, 5, 6, 7] can be found at www.pps.univ-paris-diderot.fr/∼krivine/