Extracting Algorithms from Intuitionistic Proofs

18
Math. Log. Quart. 44 (1998) 143 - 160 Mathematical Logic Quarterly 0 Johann Ambrosius Barth 1998 Extracting Algorithms from Intuitionistic Proofs Fernando Ferreiraa and Ant6nio Marquesb a Departamento de Matemitica, Universidade de Lisboa, Rua Ernest0 de Vasconcelos, bloco C1-3, 1700 Lisboa Codex, Portugal2) Departamento de Matemitica, Instituto Superior Tkcnico Av. Rovisco Pais, 1096 Lisboa Codex, Portugal Abstract. This paper presents a new method - which does not rely on the cut-elimination theorem - for characterizing the provably total functions of certain intuitionistic subsystems of arithmetic. The new method hinges on a realizability argument within an infinitary language. We illustrate the method for the intuitionistic counterpart of Buss’s theory Si, and we briefly sketch it for the other levels of bounded arithmetic and for the theory I&. Mathematics Subject Classification: 03F30, 03F55, 03D15. Keywords: Provably total functions, Intuitionism, Bounded arithmetic. 1 Introduction Given an arbitrary formula A(t, y) with two free variables t and y, an intuitionistic proof of a sentence of the form Vt3yA(z, y) in a given subsystem of arithmetic yields a computable function f such that VxA(z,f(t)). Moreover, if the subsystem of arithmetic is suitably expanded by definitions, the assertion Vx A(z, f(t)) should be provable in the system itself. As we vary along subsystems of arithmetic (say, vary along subsystems of HEYTING’S arithmetic HA), the classes of witness functions become more inclusive the stronger the systems considered. For example, if the assertion Vz3y A(z, y) is provable in the intuitionistic counterpart of BUSS’S well- known system Si - the so-called system IS; defined in [l] - then f is polynomial time computable. If the assertion is provable in the intuitionistic counterpart of the theory 1x1, then f is primitive recursive. The above cited result on 15’: was proved by COOK and URQUHART in [3], whereas the result on the intuitionist version of 1x1 was recently obtained by KAI WEHMEIER in [15]. The argument of WEHMEIER is indirect: it reduces, via a realizability ar- gument, the intuitionistic case to the classical case for II2 sentences. The proof of COOK and URQUHART hinges on a realizability argument which takes place within a ’)The research was partially supported by CMAF (JNICT) and PRAXIS XXI. The first au- thor would like to thank JOSE Luis FIADEIRO for a pertinent remark and DICK DE JONCH for the encouragement. ’Ie-mail: ferfenQptmat.lmc.fc.ul.pt

Transcript of Extracting Algorithms from Intuitionistic Proofs

Page 1: Extracting Algorithms from Intuitionistic Proofs

Math. Log. Quart. 44 (1998) 143 - 160

Mathematical Logic Quarterly

0 Johann Ambrosius Barth 1998

Extracting Algorithms from Intuitionistic Proofs

Fernando Ferreiraa and Ant6nio Marquesb

a Departamento de Matemitica, Universidade de Lisboa, Rua Ernest0 de Vasconcelos, bloco C1-3, 1700 Lisboa Codex, Portugal2) Departamento de Matemitica, Instituto Superior Tkcnico Av. Rovisco Pais, 1096 Lisboa Codex, Portugal

Abstract. This paper presents a new method - which does not rely on the cut-elimination theorem - for characterizing the provably total functions of certain intuitionistic subsystems of arithmetic. The new method hinges on a realizability argument within an infinitary language. We illustrate the method for the intuitionistic counterpart of Buss’s theory Si, and we briefly sketch it for the other levels of bounded arithmetic and for the theory I&.

Mathematics Subject Classification: 03F30, 03F55, 03D15.

Keywords: Provably total functions, Intuitionism, Bounded arithmetic.

1 Introduction

Given an arbitrary formula A ( t , y) with two free variables t and y, an intuitionistic proof of a sentence of the form Vt3yA(z, y) in a given subsystem of arithmetic yields a computable function f such that VxA(z,f(t)) . Moreover, if the subsystem of arithmetic is suitably expanded by definitions, the assertion Vx A ( z , f(t)) should be provable in the system itself. As we vary along subsystems of arithmetic (say, vary along subsystems of HEYTING’S arithmetic HA), the classes of witness functions become more inclusive the stronger the systems considered. For example, if the assertion Vz3y A(z, y) is provable in the intuitionistic counterpart of BUSS’S well- known system Si - the so-called system IS; defined in [l] - then f is polynomial time computable. If the assertion is provable in the intuitionistic counterpart of the theory 1x1, then f is primitive recursive.

The above cited result on 15’: was proved by COOK and URQUHART in [3], whereas the result on the intuitionist version of 1x1 was recently obtained by KAI WEHMEIER in [15]. The argument of WEHMEIER is indirect: it reduces, via a realizability ar- gument, the intuitionistic case to the classical case for I I 2 sentences. The proof of COOK and URQUHART hinges on a realizability argument which takes place within a

’)The research was partially supported by CMAF (JNICT) and PRAXIS XXI. The first au- thor would like to thank JOSE Luis FIADEIRO for a pertinent remark and DICK DE JONCH for the encouragement.

’Ie-mail: ferfenQptmat.lmc.fc.ul.pt

Page 2: Extracting Algorithms from Intuitionistic Proofs

144 Fernando Ferreira and Ant6nio Marques

higher-order version of IS: requiring the use of (feasible) functionals of higher type. At a crucial point one must use a cut-elimination theorem in order to show that this higher-order version is conservative over IS;. Our argument is also a realizability argument, but it circumvents the cut-elimination theorem. Instead of enlarging to a theory of higher types, we enlarge to a theory which permits infinite disjunctions. A conspicuous case of the main axiom schema of this theory is the blatantly false

VX V, {e),(x) 1 -+ V, Vx {e),(X) 1, where {e),(x) 1 means that the Turing calculation of the machine with Godel number e for the input x halts in less than (11 + I 2 +2)" steps, where 11 and 12 are, respectively, the lengths of the binary representations of the numbers e and x.

Although this scheme is false, the enlarged infinitary theory is consistent. More- over, it is conservative over IS;. This result is obtained by a quite simple saturation argument for Kripke-structures (this is what replaces the cut-elimination argument in our setting). The above strategy was first outlined in [7] and, suitably implemented, also yields the characterization of the provably total functions of the upper levels of intuitionistic bounded arithmetic and of the intuitionistic version of 1x1.

The paper is organized as follows. In Section 2 we deal with BUSS'S theory IS;. Actually, we shall use the binary string framework of FERREIRA [8], and work with the intuitionistic version of the theory Cy-NIA and its extension by definitions PTCA+ . To make the paper reasonably self-contained, we briefly describe these theories and leave to an appendix some peculiarities of working in intuitionistic logic. Next, we introduce an infinitary (intuitionistic) false extension PTCAL of PTCA+ and define, within it , the pertinent notion of realizability. The characterization of the (intuition- istically) provably total functions of Cy-NIA is now a consequence of the soundness theorem for this notion of realizability plus the fact that the infinitary theory is con- servative over the finitary one. The proof of this latter fact is the business of Section 3. In the last section we briefly sketch how to adapt the proof of Section 2 in order to obtain the (intuitionistically) provably total functions of the upper levels of BUSS'S hierarchy of bounded theories and of the theory 1x1.

2 Infinitary realizability

In the sequel we briefly describe the first-order theory Ci-NIA, which is a reformula- tion of Buss's well-known theory S; (see [2] or [12]). This reformulation takes place in a stringlanguage L consisting of three constant symbols E , 0 and 1, two binary func- tion symbols - (for concatenation, sometimes omitted) and x , and a binary relation symbol 5 (for initial subwordness). There are fourteen basic open axioms:

Axl. x - E = X , Ax8. 1-1 = y-1- x = y, Ax2. ~ ~ ( y - 0 ) = (x-y)-O, Ax3. ~ ~ ( y - 1 ) = (z-y)- l , Ax4. 2-0 = y-0 + x = y, Ax5. x x E = E ,

Ax6. x x (y-0) = (x x y)-x, Ax7. x x (y-1) = (x x y)-x,

Ax9. AxlO. x C y-0 * x c y V x = y-0, Axl l . x c y-1 * x y V x = y-1, Ax12. x-0 # y-1, Ax13. 2-0 # E ,

Ax14. 2-1 # E.

x & E * x = E ,

Page 3: Extracting Algorithms from Intuitionistic Proofs

Extracting Algorithms from Intuitionistic Proofs 145

The standard model of these axioms is the binary tree (0, l}*, and the interpre- tations of the symbols of the stringlanguage in the standard model are immediately clear, except (perhaps) for x : x x y is the string x concatenated with itself length of y times. We often use x c* y for 32 c y(2-x c y), and abbreviate 1 x x E 1 x y by x 5 y (the length of 2: is less than or equal to the length of y), and I C y A x # y by x c y. The class of swq-formulas (“subword quantification formulas”) is the smallest class of formulas containing the atomic formulas and closed under Boolean opera- tions and subword quantification, i.e., quantification of the form (Vz C* t ) ( . . .) or (32 c* t ) ( . . .), where t is a term in which the variable 3: does not occur. A (strict) C!-formula is a formula of the form (32’ 5 i) A , where t is a term in which the variable x does not occur and A is a swq-formula. In the standard model these formulas define exactly the sets of the complexity class NP. The theory Ck-NIA (for “Notation Induc- tion Axioms”) consists of the fourteen basic open axioms plus the following induction scheme:

F(E) A V x ( F ( x ) + F ( d ) A F(z1)) + t/zF(x),

where F is a Ck-formula. This theory is equivalent, in a sense that could be made precise, to BUSS’S theory Si . BUSS’S main theorem of his thesis [2] says that whenever EY-NIA I- Vx3yA(x,y), where A is a CF formula, there is a polynomial time com- putable function f such that A(u, f(u)), for all u E (0, l}*. Moreover, BUSS showed that, if suitably reformulated, the previous conclusion still holds in the theory itself. More specifically, there is a term t ( x ) of the language L and a C!-formula G j ( x , y) such that

1. Cy-NIA I- VxVy(Gj(x, y) + A ( x , y)), 2. Ck-NIA I- Vx(3y 5 t ( ~ ) ) Gj(2, y), 3. Cy-NIA I- VZVYVZ ( G ~ ( z , y) A G ~ ( z , Z ) + y = z), 4 . for all u f (0, l}*, (0,1}* b Gj(u, f(a)). In fact, it is possible to extend the theory Cy-NIA with function symbols and

appropriate axioms for each (description) of a polynomial time computable function, resulting in the so-called theory PTCA’. This possibility hinges on the fact that, for each (description of a) polynomial time computable function f, there is a Cy- formula Gf(x , y) satisfying the above conditions 2 and 3 plus some simple definitional properties within the theory. This was shown in the above mentioned dissertation of Buss, and an account of the result within the framework of the stringlanguage appeared in [8]. Hence, the theory PTCA’ is formulated in a language extension L p of the L , the new open axioms describe simple definitional properties of the new function symbols, and the induction scheme consists of the notation induction axioms NIA for CF-formulas F : in our context of the extended language L p we may take the Ck-formulas to be of the form (32 5 t ) A , where t is a term in which the variable 1: does not occur and A is an open formula of L p . BUSS’S theorem can be reformulated thus: if C!-NIA I- Vx3yA(x,y), where A is a C; formula, then there is a function symbol f of L p such that PTCA’ I- VxA(x, f(x)).

The point we want to make is that this extension can also be accomplished in- tuitionistically. In effect, the argument for the classical case is purely intuitionistic except for some uses of the law of excluded middle for swq-formulas. However, it is a

Page 4: Extracting Algorithms from Intuitionistic Proofs

146 Fernando Ferreira and Ant6nio Marques

theorem that these particular instances of excluded middle are provable intuitionisti- cally in Ck-NIA (see the appendix). [We do not rename the intuitionistic versions of classical theories. When we are working intuitionistically, this will be stated explicitly or it will show up by the use of the subscripted turnstile I- i . ] Similarly, the law of excluded middle holds for open formulas of PTCA+ (see, once again, the appendix).

We often abuse language and speak of a polynomial time computable function f within the language L p . We really mean a function symbol of L p associated with a convenient description of the polynomial time computable function f. Similarly, we sometimes call members of {0,1}* terms. What happens is that given an element e E {0,1}* there is a closed term of the language of L obtained by concatenating (via the function symbol ) the constants 0 and 1 according to the order of the bits in e (for determinateness, we always associate - to the left).

We shall need an infinitary version PTCAZ of the (intuitionistic) theory PTCA'. The language of this version is L p , and one extends the language of first-order logic to include denumerable disjunctions. The semantics is Kripkean, with the usual clauses of forcing for the first-order logical symbols, plus the following extra clause defining what it means for a node cr of a Kripke model to force an infinitary disjunction:

IFa V, F,, := 3rn E w IFa F,,, The axioms of PTCAZ are those of PTCA+ plus the following infinitary scheme:

vx v n Fn(x) v n vx V k < n - Fk(x),

where Fo(x), Fl(x), Fz(x), . . . is any recursive enumeration of first-order formulas of L p with only a finite number of parameters.

The following fact will be crucial in the sequel. Its proof is the business of the next section.

T h e o r e m (Conservativity). Let Ao, A l , A z , . . . be a sequence of (first-order) sen- tences of L p . If PTCAZ Il- V, A,, then there is rn E w such that PTCA+ l-i A,.

The notions {z}"(T) and (Z}~(T) 1 will play a central role in our definition of re- alizability (f abbreviates the k-tuple X I , . . . , Xk). These notions are familiar: { ~ } ~ ( f ) is the output of the Turing calculation of the machine with Godel number z for the input 5, provided that this calculation is done in less than ( t 1 +& + 2)" steps, where t , and t z are, respectively, the lengths of z and Z (when the calculation exceeds this number of steps, i. e., when {z}"(z) 1 does not hold, the default value E is given). To be completely clear, the symbolic notation of these notions requires an extra index k to show their dependence on the number of inputs; however, we will omit this. More importantly, both these notions can be formalized within intuitionistic PTCA+ via open formulas. This is done (albeit in another notation) for the classical case in P U D L ~ K ' S monograph [lo, Chap. 51 . PUDLAK'S construction also goes throught in the intuitionistic case since the construction only uses instances of excluded middle for open formulas (of the extended language). A remark is in order. We must be careful in defining the meaning of { z } " ( c ) when there are no variables z: by stipulation, {z},,( ) is the output of the Turing calculation of the machine with Godel number z when it starts on an empty tape, provided that this calculation is done in less than (t + 2)" steps, where t is the length of the string z (when the calculation exceeds this number of steps the default value E is given).

Page 5: Extracting Algorithms from Intuitionistic Proofs

Extracting Algorithms from Intuitionistic Proofs 147

We are now ready to define the pertinent notion of realizability for (first-order) formulas of Lp . This notion is a suitable modification of the so-called q-realizability, described on [5, p. 2431.

D e f i n i t i o n (q-realizability). To every (first-order) formula A of L p we associate a formula zqA of the extended language in such a way that FV(zqA) E FV(A) U {t}, and z $ FV(A), according to the following clauses:

1. zqA is A, if A is an open formula; 2. zq (A A B ) is (r)oqA A ( t ) lqB;

3. zq (A V B ) is ( ( t ) o = E --+ (Z)iqA) A ( ( z ) o # E + (z)iqB); 4. t q ( A --+ B ) is ( A -+ B ) AVI(+qA -+ V n ( { t } n ( z ) l A{z}n(z)QB));

5. r q v z A ( z ) is vz Vn ( { Z } n ( z ) l A{r }n( z )QA(z ) ) ; 6. zq3zA(z ) is (Z)oqA((z) i ) ;

where t = ((z)~, (z)~) is a suitable pairing coding. The following mimics a similar result for the usual notion of q-realizability: T h e o r e m . If z does not occur i n A , then PTCAL Il- ( zqA) --+ A . In order to prove a soundness theorem for our notion of realizability, we must use

certain results pertaining to the notions of (Z}~(F) and { z } ~ ( ? Z ) 1. All these results are true universal assertions of the language Lp which could have been introduced by f i a t in the axiomatics of PTCA+ without much ado. We concede that this would have been inelegant. In fact, the desired results are intuitionistically provable in PTCA+. Results 0, 1 and 2 readily follow from PUDLAK’S discussions in [lo, Chap. 51, and a version of the crucial last result 5 is also discussed there. Concerning the other two results, we follow PUDLAK’S common sensical approach: “(. . .) the proofs in the standard model can be carried out in the fragments of Bounded Arithmetic. We omit the proofs since they are not difficult and contain no essential new ideas.”

R e s u 1 t 0 . Given natural numbers k < s, the theory PTCA+ proves the following intuitionistically: { z } k ( j j ) 4 -+ { ~ } ~ ( ? j ) 1 A { ~ } ~ ( j j ) = { z } k ( j j ) .

R e s u l t 1 . Given a polynomial time computable function f, there is a term e E {0,1}* and an element m E w such that the theory PTCA+ proves the following zntuitionzstzcally: b’E({e}m(F) 1 A f ( F ) = {e}m(?Z)).

R e s u 1 t 2 . Given n E w , there is a term pn E (0, I}* with the following property: f o r every k E w there is p E w such thut the theory PTCA+ proves the following intuitionistically: { z } k ( j j ) l - + { ~ , , } ~ ( z , j j ) 1 A{pn}p(z,jj) = { z } k ( j j ) , where ?j is an n-tuple of variables.

R e s u l t 3 . Given n ,m E w , there is a ( n + 1)-ary polynomial time computable function C n , m with the following property: for every k, s1,. . . , sn E w there is p E w such that the theory PTCA’ proves the following intuitionistically:

{ ~ i . } s l ( F ) I A ‘ . ’ A {Yn}s,(z) l A{z}k({?/ l )s l (F) , . . . , { ~ n } s , ( F ) ) l

--* {Cn,m(z, YI, . . ., ?/n ) } p ( F ) 1 A{Cn,rn(z,~l,.-.,~n)}p(T) = {zIk({~i}sl(~), { ? / n } s , ( ~ ) ) ,

where F is an m-tuple of variables.

Page 6: Extracting Algorithms from Intuitionistic Proofs

148 Fernando Ferreira and Ant6nio Marques

The next result is a version of the so-called s-m-n-theorem: R e s u l t 4 . Given n E w , there is a polynomial time computable function Sn with

the following property: for every k E w there is p E w such that the theory PTCA+ proves the following intuitionistically:

{ z ) k ( w , Y ) L - {sn(x, w ) ) p ( Y ) l A { S n ( z , w ) ) p ( Y ) = { z ) k ( w , ~ ) ,

where ij is an n-tuple of variables. R e s u l t 5 . Given m E w and a term t of the language L , there is a ternary

polynomial time computable function R = R,,t with the following property: for every n , s E w there is p E w such that the theory PTCA' proves the following intuitionis- tically:

(1)

(2)

{ v ) n ( z ) 1 + { R ( v , WO, w l ) ) p ( t , ~ ) I A { R ( v , W O , ~ l ) ) p ( z , E ) = {v)n(z),

{ R ( v , WOI Wl))p(Tr z>1 A{wo)s(% 2, { R ( v , Wor Wl))p(T, . ) l t (Z,z)) l - { R ( v , wo, Wl))p(z , 4 1

{ R ( v , wo, W l ) ) p ( 7 1 A{wl)s(F, 2, { R ( v , wo, Wl))p(Z, .)l*(F,z)) 1 - { R ( v , wo, w l ) ) p ( z , z l ) 1

A { R ( v , wo, W l ) ) p ( T , 20) = {wo)s(z, z, { R ( v , wo, Wl))p(z , Z)lt(Z,z)),

(3)

A{R(V , wo, W l ) ) p ( F , = {wl)s(z, I, { R ( v , wo, Wl))p(T, 4 l t ( Z , z ) ) ,

where 7 is an m-tuple of variables and ale is the truncation of the string a at the length of b.

We are now ready to state and prove a soundness theorem about our notion of q-realizability.

T h e o r e m (Soundness of q-realizability). If PTCA+ I-i A @ ) , then there is a term e E {0,1)* such that PTCAZ ti- E V , ({e) , (T) l A{e},(T)qA(T)) , where the free variables of A are among the variables occurring in T .

P r o o f . The proof is by induction on the length of deductions in PTCA+. For de- terminateness, we work with the deductive system described on DUMMETT [6, p. 1261. In such a scenario we must find realizing terms in {0,1)* for the logical and non-logical axioms and, given a rule of the form r 3 A , we must be able to associate to every realization of I? a realization of A . With the exception of the realizability of the in- duction axioms, the usual arguments for the HA case work for our case with some suitable modifications (remark: in these cases the infinitary axioms are not used). We shall only consider a few typical axioms and rules and, to keep the notation simple, we will usually avoid the consideration of free variables.

The logical axiom A - ( B - A ) is q-realized if we can find a term e E {0,1)* such that PTCA; forces

vz(zqA+ ( B - A ) ~ V ~ ( { e } n ( x ) l A V d y q B + V p ( { { e ) n ( z > ) p ( Y ) 1 A { { e ) n ( z ) ) p ( Y ) q A ) ) ) )

First note that we need not worry about the conclusion B - A , since A ---t ( B -+ A ) is provable and zqA implies A . According to Result 1, there exists e' E { O , l ) *

Page 7: Extracting Algorithms from Intuitionistic Proofs

Extracting Algorithms from Intuitionistic Proofs 149

and m E w such that PTCA’ I-j VzVy({e’},(z,y) 1 A {e’},(z,y) = z). Hence, by Result 4, there is p E w such that

Using again Result 1, we can take e E {0,1}* and n E w such that

Hence, for k = max{m,p}, we get

It is easy to check that this e does the job. Now let us consider the axiom ( A + B ) --+ ( ( A -+ ( B + C ) ) -+ ( A + C)). It

is enough to find a term e E {0,1}* such that the following complicated condition obtains:

A judicious calculation using the above results shows the following: there exists a term e E {0,1)* and there are rn, k E w such that

and such that for all n , r , t E w there exists s E w in such a way that the next implication is provable intuitionistically in PTCA’

A careful checking shows that the above e realizes our axiom

such that the following two conditions are forced by PTCAk: Let us now consider the ruIe Modus Ponens. Suppose there are e l , e2 E {0,1}’

and

A straightforward calculation using the above results yields a term e E {0,1}* such that, for all m l , m2 , k w there is s E w in such a way that the following implication is provable intuitionistically in PTCA’

It is easy to check that the above e does the job for B ( Z )

Page 8: Extracting Algorithms from Intuitionistic Proofs

150 Fernando Ferreira and Ant6nio Marques

The other rule that we will consider is the rule “C -, A(y) + C + VzA(z)”, where y is free for z in A(z), and does not occur free in C or in A(z) (A(y) is formed by replacing every freeoccurence of z in A(z) by y). Hence, by hypothesis, there is a term e E w such that PTCAZ forces

VY V m I{elm(y) 1 A V z (ZqC -+ Vn({{e)m(Y)}n(z> 1 A { { e } m ( ~ ) } n ( z ) ~ A ( ~ ) ) ) l .

In particular, using some intuitionistic logic and the fact that y does not occur free

straightforward calculation shows the following: there is a term er E {0,1)* and s E w such that PTCA’ t-i Vz ({e’},(z) 1) and such that, for all m, n E w , there exists p E w in such a way that

in 2 6 ’ 9 we get v z ( z q C -t VYVm Vn({{e)m(Y))n(z) 1 A {{e)m(Y))n(z)qA(Y))). A

PTCA’ t-i {e)m(y) I A {{e)rn(Y))n(Z) I -+ {{e‘)S(~))p(y> 1 A {{e’ls(z)}p(~) = {{elm(Y))n(z).

v z [ZqC -+ Va({e ’ ) s (4 1 A V z V p ( W M 4 1 P ( ~ ) 1 A {{e/}s(z)}~(z)qA(z)))l .

This entails what we want, i.e., that PTCA; forces

Finally, we study the induction axioms

F(E) A Vz(F(z) -+ F ( z 0 ) A F(z1)) -+ V z F ( z ) ,

where F is a Cy-formula, i.e., a formula of the form 3w(w 5 t ( z ) A G(z, w)), with G an open formula of the language of L p . These axioms are implications, and a q-realization of an implication is the conjunction of the implication itself with a cer- tain other statement. The implication itself comes for free, since PTCAL forces the induction axioms. (Actually, it is only at this step that we use the full power of the induction axioms in PTCA:; apart from this instance, in all other steps we only need induction for open formulas of L p .) Hence, an induction axiom is q-realized if we can find a term e E {0,1}* such that PTCAZ forces

Vyvz(yqF(&) A zqVz(f’(z) -+ F ( z 0 ) A F(z1)) + Vp({e}P(Y, 1 A {e)p(!A Z W ’ I F ( 2 ) ) ) -

The second conjunction in the antecedent of the main implication of the above for- mula is VX Vm({Z)m(z) 1 Avw(wqF(z ) -t Vl Hm,/(t, Z, w ) ) ) , where Hm,1(z, Z, w) is the formula {{z}m(z)}1(w) 1 A { { ~ ) m ( ~ ) ) / ( ~ ) q ( F ( ~ O ) A F(z1)) and where we have omitted the condition F ( z ) -+ F ( z 0 ) A F(z1) since it will not be needed in the sequel. The formula “wqF(z)” is “ ( w ) ~ 5 t ( z ) A G(z,(w)l)”; thus, it is an open formula and, hence, decidable (see the last result of the appendix). This permits to export the disjunction “Vl” across “wqF(z)” , and get the intuitionistically equivalent VzVm({z) , ( t ) 1 AVwVl(wqF(z) -+ Hm,/ ( t , z ,w)) ) . At this point (with the aid of Result 0) we apply the infinitary axiom scheme of PTCAZ and argue intuitionisti- cally to get Vx vm v I ( { z ) m ( z ) 1 Avw(wqf‘(z) -+ Hm,/(z, z , w))). By Result 0, we may conflate the two infinitary “ors” into a single “or”:

vx V k ( { ” ) k ( 4 1 A V w ( w F ( z ) + H k , k ( Z , z , w))).

V k Vz({Z)k(z) 1 AVw(%?F(z) - H k , k ( E , z , w))).

Applying once more the infinitary axiom scheme, we conclude that

Page 9: Extracting Algorithms from Intuitionistic Proofs

Extracting Algorithms from Intuitionistic Proofs 151

Let us remind ourselves that, in realizing an induction axiom, the aim is to obtain

and, in order to accomplish this, we may use the conclusion of the discussion above. I t is easy to find a term v E { O , 1)* and n E w such that

A straightforward calculation shows the following: there are terms WO, w1 E { 0,1}* such that, for any k E w , there exists s E w in such a way that PTCA' proves intuitionistically both

and

where, for ease of reading, (...)ij abbreviates (( ...)i)j. We now use Result 5. Let R = Rz , t (u , wo, wl). Thus, given n, s E w as above, there is q E w such that

and

and

It is now easy to show, by notation induction on x, that

A simple calculation obtains a term e E {0,1}* and p E w such that, for any q E w , there exists T E w in such a way that PTCA' proves intuitionistically V y V z { e } p ( y , z) 1 and {RMY, z , .> 1 -+ { { e } p ( ! A .))r(.>l A { { e } p ( Y , z)}r(.) = ( E , {RMY, z , .I). This e does the job. 0

C o r o l l a r y ( C O O K and URQUHART [3]). Suppose that C:-NIA I-i VZ3yA(Z,y), where A is an arbitrary formula of the language L whose free variables are among C and y. Then there is a polynomial t ime computable funct ion f such that

P r o o f . Suppose C!-NIA I-, 3y A@, y) and, a fortiori, PTCA' Fi 3 y A@, y). By the soundness theorem. there is a term e E 10.11* such that

Since the q-realizability of a formula implies that formula, we may conclude that

Page 10: Extracting Algorithms from Intuitionistic Proofs

152 Fernando Ferreira and Ant6nio Marques

Notice that the formula following the above infinitary disjunction is a first-order formula. Hence, by Result 0 and the infinitary axiom of PTCAL,

PTCAL v, ' dC({e}m(F) 1 ( {e} rn (C) ) l ) ) . By the conservativeness result there is n E w such that

PTCA' ki V T ( { e } n ( T ) l A A ( Z , ( { e } n ( z ) ) I ) ) .

Thus, we may put f ( T ) := ( { e } n ( C ) ) i . C o r o l l a r y . Suppose that

0

C;-NIA ki v x 1 3 y l V ~ z 3 y z I . .Vxn3ynA(zl i Y ~ , X Z , Y Z , . . . , xn, yn),

where A i s an arbitrary formula of the language L whose free variables are among x1,x2, . . . , xn and y1, y z , . . . , yn. Then there are polynomial t ime computable functions f i , f 2 , . . . , f n such that

PTCA'ki V2l~xz...~~nA(x1,f(21),~2,f(x1,2~),...r2n,f(x1,~~,...,xn)).

P r o o f . This is a consequence of n applications of the previous corollary. 0

3 The saturation argument

The aim of this section is to prove the conservativeness result stated on the previous section. The method of proof is best explained by the words of DIRK VAN DALEN [4, Chap. 111.41: "If one looks a t a Kripke model from the outside, then it appears as a complicated concoction of classical structures, and hence as a classical structure itself. Such a structure has its own language and we can handle i t by ordinary, classical, model-theoretic means. " With a view of establishing the relevant notation, we will briefly sketch the procedure that associates a classical structure to a given Kripke structure. For more details, the reader is referred to the above mentioned work of VAN DALEN.

Unless otherwise stated, our Kripke structures have a least element, usually de- noted by 0. Let M be a Kripke structure for a certain language C. We will associate to M a classical structure M " , formulated in a certain language L", according to the following specifications. The language CC is two-sorted: one sort a, p, y, . . . for referring to the nodes of M , and the other sort x , y , z , . . . for referring to the elements of the worlds of M . This two-sorted language is obtained from L by replacing each n-ary predicate symbol P (each function symbol f , respectively) by an (n + 1)-ary predicate symbol P" (by an ( n + 1)-ary function symbol fC, respectively), and by adding two new binary predicate symbols 5 and D and a constant 0. The structure M" validates the following laws (referred to by 0):

l . O < a A a _ < a ; 2. a < P A P < ~ - + c x < 7 :

3. a 5 P A P 5 a --+a = p; 4. D ( a , X ) A a < p --+ o(p, 2 ) ;

5. Pc(a, C ) A a 5 p 4 Pc(P, T ) ;

6. D(cr,F) -+ D(a , fC(a ,C) ) ; 7. D ( a , C) A a 5 p -+ r ( a , F) = F ( p , F);

Page 11: Extracting Algorithms from Intuitionistic Proofs

Extracting Algorithms from Intuitionistic Proofs 153

where D(a, C ) abbreviates D ( a , xi), on the supposition that ?I? stands for the n-tuple q , x 2 , . . . , x,. Note that 0 is such that every model of 0 corresponds uniquely to a Kripke structure.

It is straightforward to translate the forcing clauses into the extended language. Firstly we must define t',, for a term t of L and a variable a of the node-sort. If t is a variable t, x', is 2. If t is f ( t 1 , . . . ,in), then t', is fC(a, ( t l ) " , . . . , (in)',). We are now ready to give the clauses for translating the forcing relation:

1. (Ita P ( t 1 , . . . ,tn))" is P C ( a , (t i) ' , , . . . , (tn)',); 2. (IFa A A B)' is (It, A)' A (IF, B)"; 3. ( I ta A V B)" is (IF, A)" V ( I ta B)"; 4. (ka A -+ B)" is (VP 2 a) ((IFp A)" 5. (IF, %A(z))" is 3% (D(cY, x) A (ka A(z))"); 6. (It, VxA(z))" is (VP 2 a) Vx (D(P, x) -+ (Il-p A(z ) )" ) .

(Itp B)");

It is straightforward that M I t , A if and only if M' k (It, A)".

L e m m a . For any countable Krtpke model M of PTCAt there is a countable Kr ipke model M" of PTCAL which forces exactly the same f irs t -order sentences.

P r o o f . Let M be a countable Kripke model of PTCA+, and consider M', its associated classical structure as described above. Take N a (countable) recursively saturated structure elementarily equivalent to M " , and read-off from N the unique Kripke structure M" associated with it. We must check that for any recursive enumeration Fo(x), Fl(x), . . . of first-order formulas of L p with only a finite number of parameters, M" IF Vx V, Fn(x) -+ V, Vx Vk<, Fk (2 ) . In order to show this, let a be an arbitrary node of M" such that M B IF, Vx v, Fn(z). This means that N k (VP 2 a) Vz (D(P, x) -+ V,(Itp F,(x))"). It is clear that the sequence of formulas (ltp Fo(x))', (Ikp Fl(x))", . . . is still a recursive enumeration. Hence, due to the recursive saturation of N , we may conclude that

N I= VnPP 2 a)vz (O(P, - Vk<n(''P Fk(x))c).

This shows that M" It, V, V x V k < , Fk(x). The next ingredient that we need is the operation ( ) -+ (C)' described by

S M O R Y ~ S K I in [14]. We briefly sketch this (two-stage) operation. The first stage consists in defining the disjoint sum CiEr M i of a family (Mi)iEr of Kripke struc- tures. This disjoint sum is the natural Kripke structure obtained from the family (Mi)iCr whose underlying partial ordering is the disjoint sum of the partial orderings of the members of the family (note that if the family has more than one member, its disjoint union does not have a least element). It is a simple fact that if (Mi)iEr is a family of models of PTCAt, then so is its disjoint sum. The second stage of the operation is.a slash construction. Given M a Kripke model (not necessarily with a least element) of PTCA+, M' is obtained from M by adding a new node below all the nodes of M , and by putting there the standard model (0, l}*. This construction is well defined, since atomic formulas are decidable in PTCA' (see the last result of the appendix). The following lemma can be proved like [14, Theorem 5.2.41:

-

Page 12: Extracting Algorithms from Intuitionistic Proofs

154 Fernando Ferreira and Ant6nio Marques

L e m m a . If (Mi)icr i s a family of Kripke modefs of PTCA', then (xiel Mi)'

We are now ready to prove the conservativity result of the previous section. P r o o f (of conservativity result). Let Ao, A1, . . . be a sequence of (first-order)

sentences of L p , and suppose that PTCAL Il- v,, A,. In order to get a contradiction, assume that there is no m E w such that PTCA+ !-i A,. By the completeness theorem of intuitionistic logic, for each m E w , there is a Kripke model M , of PTCA' which does not force A,,,. Let M be (En M,)'. According to the previous lemma, this is a model of PTCA' and it is a simple exercise to show that, for any m E w , M W A,. Now, by the first lemma above, let M" be a Kripke model of PTCAL which forces the same first-order sentences as M . Thus, in particular, for every m E w , M" W A,.

13

is a model of PTCA+.

This contradicts the fact that M" forces V, A,,.

4 Two more applications

The method of Section 2 generalizes naturally to the other levels of BUSS'S hierarchy of theories, thus providing alternative proofs of the results of VICTOR HARNIK in [ll]. Let us describe these results in our stringlanguage notation. Given j 2 2, Cq-NIA is the stringlanguage analogue of the theory S{ of BUSS, and 3SAf-NIA is the analogue of (what may be called) Si(PVj) (see [12]). The theory 3 lAi-NIA and its language are fully described in [9]. We briefly discuss them here. In order to introduce the language L, ( j 2 2), it is better to start with L1. This is just the language L p of Section 2. The language Lj is obtained from Lj-1 by adding a new function symbol K 3 s A ( : , y) for each open formula A(Z, z ) of Lj-1 - with the intended meaning of being the characteristic function of the set defined by the predicate (32 5 y) A @ , z ) - and, then, by permitting the construction of new function symbols by means of composition and bounded iteration on notation (thus obtaining a function symbol for each function in 0;). The theory 3sAy-NIA is just PTCA+. The theory 3sA!-NIA is obtained from 3sA:-1-NIA by adding the following three classes of axioms:

(1) If A @ , z ) is an open formula of Lj-1, then

K 3 < A ( F , Y) = 0 v I c 3 < A ( Z , Y ) = 1, K 3 < A ( Z , Y) = K 3 < ~ ( f , y) = 0 + (VZ 5 y) TA(F, Z)

- (gz 5 Y) A(z ,

are axioms. (Note that the above slightly departs from the definition in [9], although both definitions are classically equivalent .)

(2) Open axioms describing simple definitional properties of the other new function symbols (other than the K's) .

(3) The scheme of induction on notation for formulas of the form (32 5 t ) A , where t is a term in which the variable x does not occur and A is an open formula of the language Lj (note that these formulas define exactly the CjP-sets in the standard model).

In classical logic it is well-known that the theory 3s A?-NIA is a conservative ex- tension of the theory Cq-NIA (see, for instance, [12]). However, as HARNIK remarked,

Page 13: Extracting Algorithms from Intuitionistic Proofs

Extracting Algorithms from Intuitionistic Proofs 155

this requires application of excluded middle for C?-?-formulas and for ,-formulas (this is on a par with the case j = 1, notwithstanding the fact that in the base case the required instances of excluded middle come automatically). Let S2j be the set of all formulas of the form cp V -p, where cp E Cjb-l u IIj"-l. By the previous discussion, the intuitionistic theory 35 At-NIA is conservative over intuitionistic Cj"-NIA + R j . HARNIK'S result can be reformulated thus:

T h e o r e m ( H ~ ~ ~ 1 ~ [ll]). L e t j 2 2. Suppose that E:-NIA+Rj I-i E 3 y A ( f , y ) , where A is an arbitrary formula of the language of L whose free variables are among z and y. Then there is a 07-funct ion f such that 35Ajb-NIA I-i E A ( f , f ( Z ) ) .

P r o o f (sketch). Given a Cjb-l-formula A(w), we introduce the notions { z } t ( z ) 1 and {z } t (z ) , which can be "smoothly" formalized within intuitionistic 35 Ajb-NIA by an open formula of Lj and a function symbol of L j , respectively. These are familiar notions: { z } t ( F ) is the output of the Turing calculation with Godel number z and oracle A(w) for the input Z, provided that this calculation is done in less than (el + l z + 2)" steps, where 11 and t~ are, respectively, the lengths of and z (when the calculation exceeds this number of steps, i. e., when { z } t ( f ) 1 does not hold, the default value E is given). Let Kj-l(w) be a natural C;-l complete set. We shall use the following

R e s u l t . Given a 0:-function f , there is a term e E {0,1}* and an m E w such that the theory 35 A:-NIA proves the following intuitionistically:

-

f i ( { e } ? - 1 ( z ) l A ~ ( F ) = {e},Kj-'(z>). A proof of a reformulation of the above result appears in [lo, Chap. V] for the

classical case. However, it is easy to see that the arguments in [lo] also go through in the intuitionistic case since they only use excluded middle for open formulas of Lj (and these are, of course, decidable).

Given j 2 2, we will work with the concept of q-realizability obtained from that of Section 2 by modifying the first clause to

zqA is A , if A is an open formula of Lj

and by changing, throughout, {z}n(Z) 1 and { z } " ( z ) for {z}?-'(z)l and {z}?-l(z), respectively. A straightforward reformulation of the soundness theorem holds (the proof uses suitable modifications of the six results mentioned in Section 2; for instance, the above result is the modified version of Result 1 that is now needed). The only novelty in the proof of the soundness theorem is the q-realizability of the axioms in (1) above. The first and last groups of these axioms pose no trouble (note that the q-realizability of (Vz 5 y) 7A(Z, z ) reduces to (Vz 5 y) -A@, z ) itself). We only need to be concerned with the q-realizability of the statements

K ~ < A ( C , Y ) = 1 -+ (32 5 y ) A ( Z , z ) ,

where A(F, z ) is an open formula of Lj-1. This easily follows from the fact that there is a function symbol WA of Lj such that the theory 3<A:-NIA proves intuitionistically

v a y ( ( 3 z 5 y) A ( z , 2) -+ wA(F, y) 5 y A A ( f , WA(fr Y))).

Page 14: Extracting Algorithms from Intuitionistic Proofs

156 Fernando Ferreira and Ant6nio Marques

This result was proved in [9] for the classical case, but the same proof also holds intuitionistically.

The result of HARNIK now follows from the soundness theorem and a suitable conservativity result. There are no problems in proving such a conservativity result

0

Finally, we briefly describe the case of the theory IC1, the fragment of PA whose induction scheme is restricted to (strict) C1-formulas. It is well-known that the prim- itive recursive functions can be smoothly introduced in 1x1 , even intuitionistically. If we extend the language L of arithmetic in order to contain function symbols for each (description of a) primitive recursive function, we thus obtain the theory PRA+. In short, this theory is formulated in the extended language L p of primitive recursive arithmetic and its non-logical axioms are the defining equations for all primitive recur- sive functions plus the axiom scheme of induction restricted to C1-formulas. Recently, KAI WEHMEIER proved the following theorem:

T h e o r e m (WEHMEIER [15]). Suppose that 1x1 t-i E 3 y A ( f , y ) , where A is an arbitrary formula of the language of L whose free variables are among c and y. Then there is a primitive recursive function f such that PRA' t - i VcA(Z, f(c)).

The method of proof of Section 2 yields this result if we suitably modify the notions of { ~ } ~ ( y ) and (x},-,(y) 1. For each n, let En be the nth Grzegorczyk function (we are following the notation of [13]). We define {z},,(y) as the output of the Turing machine calculation with Godel number 2 for the input y, provided that this calculation is done in less than E,(max(z, y)) steps (when the calculation exceeds this number of steps, i.e., when { ~ } ~ ( y ) does not hold, the default value 0 is given). These two notions can be formalized within intuitionistic PRA+ via an open formula and a function symbol of the extended language L p , respectiviely. With these definitions, we have available suitable modifications of Results 1 and 5 of Section 2 (the other results are immediate). These modified results are, respectively,

R e s u l t . Given a primitive recursive function f , there is a term e E w and an element m E w such that the theory PRA' proves the following intuitionistically:

by the methods of Section 3.

V c ( { e } m ( Z ) J A f ( F ) = { e } m ( c ) ) .

R e s u l t . Given m E w , there is a binary primitive recursive function R = R, with the following property: for every n , s E w there is p E w such that the theory PRA' proves the following intuitionistically:

and

where F is an m-tuple of variables.

With the above, the proof proceeds like in Section 2.

Page 15: Extracting Algorithms from Intuitionistic Proofs

Extracting Algorithms from Intuitionistic Proofs 157

5 Appendix

A formula p is decidable in the theory r if the formula p v ~ c p is intuitionistically derivable from r. The aim of this appendix is to show that the swq-formulas are decidable in the theory C:-NIA. The following proof actually shows that the swq- formulas are decidable in the theory consisting of the fourteen basic open axioms together with the notation induction scheme for swq-formulas.

P r o p o s i t i o n 1. The formula x = E i s decidable. P r o o f . By notation induction on x applied to the formula x = E V x # E , using

Axioms 13 and 14. 0

L e m m a 2. The following formulas are intuitionistically derivable in Cy-NIA:

( X Y b = .(YZ),

EX = x , E # O A & # ~ ,

x c x , x c xo A x c 21, 2 22 ,

z # E + O ~ I V 1 ~ 2 , x c y --.* x = y v x o c y v x l C y , x c y A y c z --t x c z , x c z A y c z + x c y V y c x ,

X Y = E - + X = E A ~ = E , 2 # E -+ 3z(zO = x v z l = x ) ,

x c y + 3 z ( x z = y).

P r o o f . (2.1) is proved by notation induction on t using Axioms 1, 2 and 3. (2.2) is proved by notation induction on x using Axiom 1 and (2.1). (2.3) is a consequence of Axioms 13 and 14 and of (2.2). (2.4) is proved by induction on x using Axioms 9, 10 and 11. (2.5) is an immediate consequence of (2.4) and Axioms 10 and 11. Similarly, (2.7), (2.8), (2.9) and (2.10) are proven by notation induction on x , y, z and z , respectively. (2.11) is proven by notation induction on x applied to the swq- formula x # E -+ (32 c x) (20 = x V z l = x). To show (2.12) we firstly note that the implication y # E -+ xy # E is an immediate consequence of (2.11) plus Axioms 13 and 14. Since “being equal to E” is decidable, the assertion xy = E entails y = E

and, henceforth, x = E as well. Finallly, (2.13) is proven by notation induction on y 0

L e m m a 3. The following formulas are intuitionistically derivable in Cy-NIA: applied to the swq-formula x c y -+ (32 c* y) (xz = y).

(3.1) (3.2)

1 x zx = (1 x z) ( l x x) , (1 x x)1 = l (1 x x),

(3.3) (3.4) 1 X x = E -+ x = E ,

(1 x x)(1 x y) = (1 x x)( l x 2 ) 4 1 x y = 1 x 2,

(3.5) x c y A 1 ~ x = 1 x y - + ~ = y , (3.6) xy = x + y = E ,

(3.7) x c y A y c x + x = y .

Page 16: Extracting Algorithms from Intuitionistic Proofs

158 Fernando Ferreira and Ant6nio Marques

P r o o f . (3.1) and (3.2) are straightforward by notation induction. (3.3) is also proved by notation induction on x: The base case x = E is immediate

by (2.2), since 1 x E = E by Axiom 5. Assume that (1 x +0)(1 x y) = (1 x x0)(1 x z ) . Then, by Axiom 6, (1 x z)1(1 x y) = (1 x x)1(1 x z). Hence, by (3.2), (1 x z)(1 x y)l = (1 x z)(l x z)l. Thus, by Axiom 8, we may conclude that (1 x z)(l x y) = (1 x x)( 1 x z). By induction hypothesis we get 1 x y = 1 x z . The case xl is similar.

Since “being equal to E” is decidable, (3.4) is equivalent to x # E -+ 1 x x # E .

Suppose x # E . By (2.11) there is z such that 2: = z0 (the case 3: = zl is similar). Hence,’ 1 x z = 1 x z0 = (1 x z)l, and this last term is not equal to E by Axiom 14.

In-order to show (3.5), assume that z C y and 1 x x = 1 x y. By (2.13), take z such that y = xz. By (3.1) we get 1 x y = (1 x z)(l x z). By (3.3) this entails 1 x z = E . We may conclude that z = E by (3.4).

(3.6) is also easy: if xy = z, then 1 x zy = 1 x x and so, by (3.1), we get (1 x z)(l x y) = 1 x x. This entails 1 x y = E , and so - by (3.4) - y = E .

Finally, assume that z y and y C x. By (2.13) take z and w such that y = xz and x = yw. We get y = ywz and so, by (3.6), wz = E . Hence, by (2.12), w = z = E ,

i.e., 3: = y. 0

Let x I y be abbreviate the formula

S z ( ( z 0 C x A zl C_ y) V (zl C z A z0 C y)). L e m m a 4. The following formulas are intuitionistically derivable in C!-NIA:

(4.1) z l y V z C y V z, (4.2) z I y - z p y.

P r o o f . The proof of (4.1) is by notation induction on y (this is permissible since the formula z I y is readily equivalent to a swq-formula). The base case y = E makes the third disjunct true. Assume, by induction hypothesis, that x I y or 2 C y or y E x (in order to conclude a similar disjunct for yo - the case for yl is similar). If either the first or the second of theses disjuncts is true, the same applies to the disjunct x I yo V x yo. Otherwise, y C 2. In this case, by (2.8), either yo C x or yl E z or y = z. We respectively conclude either yo C x or x I yo or z C yo.

To show (4.2), assume that x I y and x E y. Take, without loss of generality, an element z such that z0 C z (thus, z0 C y) and zl C y. By (2.10) either z0 C zl or

0 zl c 20. In either case we get a contradiction by (3.5) and Axiom 12. P r o p o s i t i o n 5. The formulas z C y and x = y are decidable.

P r o o f . Take x and y. By (4.1), either x I y or z C y or y C z. We saw in the last lemma that the first disjunct implies z $ y. Hence, we need only consider the case y C_ x. By (2.8), either yo C_ x or yl E x or y = z. The last case poses no trouble. . Anyone one of the first two cases in conjunction with x E y gives rise to a contradiction (i.e., in these cases x $ y holds intuitionistically). Let us see, for instance, that yo 5 z and x C y gives rise to a contradiction. By (2.9) these two statements imply yo c y. Hence, y = yOz, for some z. By (3.6) this implies that Oz = E , which in turn implies 0 = E , a contradiction with (2.3).

Page 17: Extracting Algorithms from Intuitionistic Proofs

Extracting Algorithms from Intuitionistic Proofs 159

By (2.4) and (3.7), z = y is equivalent to z c y A y E z. Hence, z = y is equivalent to a Boolean combination of decidable formulas, and hence decidable. 0

P r o p o s i t i o n 6. Let A ( x ) be a decidable swq-formula i n which the variable y does not occur. Then the formulas (3% 2 y) A ( z ) and (Vz C y) A ( z ) are decidable. A s a consequence, the s tatement x c* y i s decidable.

P r o o f . We show by notation induction on y that the swq-formula

(4) (32 c Y) 4 x 1 v 4 3 2 c Y) A ( z ) is intuitionistically derivable from the theory C';-NIA. The base case y = E reduces to the decidability of A(&). Now, assume by induction hypothesis that (4) holds. Well, the formula (32: C yo) A ( z ) is equivalent to A(y0) V (32 & y) A ( z ) . This last statement is a Boolean combination of decidable statements and, hence, is decidable. Similarly for y l instead of yo. The universal case is analogous.

By the above, the formula F ( z , y , z ) := (3w c y) (wz c z) is decidable. In 0

L e m m a 7. The following formulas are intuitionistically derivable in C;-NIA: particular, z E* y - which is F ( z , y, y) - is decidable.

(7.1) (7.2)

z0 C zy -+ 0 c y, z1 c zy - 1 c y

zy = zw - y = w. (7.3) (7.4)

zy C xw --+ y c w

P r o o f . In order to prove (7.1), assume that 10 c zy. Then there is z such that zOz = zy and, henceforth, 1 x zOz = 1 x zy. Since 1 x Oz = (1 x 0)(1 x z ) = l (1 x z ) , we may conclude by (3.19), (3,3) and (2.6) that 1 C_ 1 x y and, a fortiori, that y # E .

By (2.7) either 0 C y or 1 C y. We show that the latter alternative does not hold. In fact, if this alternative were the case, y = l w for some w. Hence z0 c z l w . This implies, by (2.10) and (3.5), that z0 = 21 , which contradicts Axiom 12. The proof of (7.2) is similar. (7.3) is proved by notation induction on y. The base case y = E is trivial. Suppose that zy0 c xw. Then zy C xw and, by induction hypothesis, y C w. So, w = yu for some u . We get zy0 C zyu and, according to (7.1), 0 C u , i.e., u = Ov for some v. Hence w = you , getting yo c w. The case for y l is similar. Finally, (7.4)

0

P r o p o s i t i o n 8. Lei A ( z ) be a decidable swq-formula i n which the variable y does not occur. Then the formulas (3z C_* y) A ( z ) and (Vz c* y) A ( z ) are decidable.

P r o o f . Notice that the formula (32 c* y) A ( + ) is equivalent to

is a consequence of (7.3) and (3.7).

(3% c y)(3w C_* y) (zw = y A (32 c w) A(%)) .

Hence, by Proposition 6 i t is enough to show that the formula

(3w g* y) (zw = y A (3z E w) A ( z ) )

is decidable. This is a consequence of Propositions 5 and 6 and Lemmas (2.6), (2.13) and (7.4).

The latter proposition together with Proposition 5 and the fact that Boolean The case of the universal quantifier is similar.

combinations of decidable formulas are decidable yield

Page 18: Extracting Algorithms from Intuitionistic Proofs

160 Fernando Ferreira and Antcjnio Marques

T h e o r e m . Every swq-formula is decidable in C’I-NIA. From Proposition 5 one also obtains: T h e o r e m . Every open formula of Lp i s decidable in PTCA+.

References

[I] BUSS, S., The polynomial hierarchy and intuitionistic bounded arithmetic. In: Structure in Complexity Theory (ALAN L. SELMAN, ed.), Lecture Notes in Computer Science 223, Springer-Verlag, Berlin-Heidelberg-New York 1986, pp. 77 - 103.

[2] BUSS, S., Bounded Arithmetic. PhD thesis, Princeton University, June 1985. A revision of this thesis was published by Bibliopolis, Napoli 1986.

[3] COOK, S., and A. URQUHART, Functional interpretations of feasibly constructive arith- metic. Annals Pure Appl. Logic 63 (1993), 103 - 200.

[4] VAN DALEN, D., Intuitionistic Logic. In: Handbook of Philosophical Logic, (D. GABBAY and F . GUENTHNER, eds.), D. Reidel Publishing Company, Dordrecht 1986.

[5] VAN DALEN, D., and A. S. TROELSTRA, Constructive Mathematics: An Introduction. Volume 1. North-Holland Publ. Comp., Amsterdam 1988.

[6] DUMMETT, M., Elements of Intuitionism. Volume 2 of Oxford Logic Guides. Oxford University Press, Oxford 1977.

[7] FERREIRA, F. , Polynomial Time Computable Arithmetic and Conservative Extensions. PhD thesis, Pennsylvania State University, December 1988.

[8] FERREIRA, F., Polynomial time computable arithmetic. In: Logic and Computation (W. SIEG, ed.), American Mathematical Society, Providence, RI., 1990.

[9] FERREIRA, F., Stockmeyer induction. In: Feasible Mathematics (S. BUSS and P. SCOTT, eds.), Birkhauser, Boston-Basel 1990, pp. 161 - 180.

[lo] H ~ J E K , P., and P. PUDLPIK, Metamathematics of First-Order Arithmetic. Springer- Verlag, Berlin-Heidelberg-New York 1993.

[ll] HARNIK, V., Provably total functions of intuitionistic bounded arithmetic. J. Symbolic Logic 57 (1992), 466 - 477.

[12] KRAJ~CEK, J., Bounded Arithmetic, Propositional Logic, and Complexity Theory. Cam- bridge University Press, Cambridge-New York 1995.

[13] ROSE, H. E., Subrecursion. Functions and Hierarchies. Oxford University Press, Oxford 1984.

[14] S M O R Y ~ K I , C., Applications of Kripke models. In: Metamathematical Investigations of Intuitionistic Arithmetic and Analysis (A. S. TROELSTRA, ed.), Springer-Verlag, Berlin-Heidelberg-New York 1973, pp. 324 - 391.

[15] WEHMEIER, K., Fragments of HA based on &-induction. Archive for Math. Logic (to appear).

(Received: September 24, 1996; Revised: April 29, 1997)