The Omega Rule is $\mathbf{\Pi_{1}^{1}}$-Complete in the $\lambda\beta$-Calculus

In a functional calculus, the so called \Omega-rule states that if two terms P and Q applied to any closed termNreturn the same value (i.e. PN = QN), then they are equal (i.e. P = Q holds). As it is well known, in the \lambda\beta-calculus the \Omega-rule does not hold, even when the \eta-rule (weak extensionality) is added to the calculus. A long-standing problem of H. Barendregt (1975) concerns the determination of the logical power of the \Omega-rule when added to the \lambda\beta-calculus. In this paper we solve the problem, by showing that the resulting theory is \Pi\_{1}^{1}-complete.


Introduction
In a functional calculus, the so called ω-rule states that if two terms P and Q applied to any closed term N return the same value (i.e.P N = QN ), then they are equal (i.e.P = Q holds).As it is well known, in the λβ-calculus the ω-rule does not hold, even when the η-rule (weak extensionality) is added to the calculus.
It is therefore natural to investigate the logical status of the ω-rule in λ-theories.
We have first considered constructive forms of such rule in [7], obtaining r.e.λ-theories which are closed under the ω-rule.This gives the counterintuitive result that closure under the ω-rule does not necessarily give rise to non constructive λ-theories, thus solving a problem of A. Cantini (see [3]).
Then we have considered the ω-rule with respect to the highly non constructive λ-theory H.The theory H is obtained extending β-conversion by identifying all closed unsolvables.Hω is the closure of this theory under the ω-rule (and β-conversion).A long-standing conjecture of H. Barendregt ([1], Conjecture 17.4.15)stated that the provable equations of Hω form a Π 1  1 -Complete set.In [8], we solved in the affirmative the problem.Of course the most important problem is to determine the logical power of ω-rule when added to the pure λβ-calculus.
As in [1], we call λω the theory that results from adding the ω-rule to the pure λβcalculus.In [6], we showed that the λω is not recursively enumerable, by giving a many-one reduction of the set of true Π 0 2 sentences to the set of closed equalities provable in λω, thus solving a problem originated with H. Barendregt and re-raised in [4].
The problem of the logical upper bound to λω remained open.That this bound is Π 1  1 has been conjectured again by H. Barendregt in the well known Open Problems List, which ends the 1975 Conference on "λ-Calculus and Computer Science Theory", edited by C. Böhm [2].Here we solve in the affirmative this conjecture.The celebrated Plotkin terms (introduced in [10]) furnish the main technical tool.0.1.Remarks on the Structure of the Proof.The present paper is a revised and improved version of [9].It is self-contained, with the exception of some specific points where we use results and methods from [6].Such points will be precisely indicated in Section 3 and in Section 4. The authors are working to a comprehensive formalism to give a unified presentation of all the results.At present, however, this could not have been done without great complications.
To help the reader, we now describe in an informal way the general idea of the proof.
As already for the result in [6], the proof relies on suitable modifications of the mentioned Plotkin terms.Roughly speaking, Plotkin's construction gives rise, in the usual λβηcalculus, to pairs of closed terms P 0 and P 1 such that for every closed term M , P 0 M and P 1 M are βη-convertible.On the other hand, P 0 and P 1 are not themselves βη-convertible (see [1], 17.3.26).
When we add the ω-rule to the λβ-calculus, such terms -suitably modified -become a way to express various forms of universal quantification.Intuitively, P 0 and P 1 are equal if and only if for all M belonging to some given set of terms, P 0 M and P 1 M are equal.
There are two points that must be stressed.• First, different quantifiers require different specific constructions of suitable Plotkin terms.
• Second, to properly use equality between P 0 and P 1 as a test for quantification, one must exclude that P 0 M = P 1 M holds for some M not belonging to the set of interest.Focusing on the second problem, the technical tool that we have used -both in [6] and in the present paper -is to cast proofs in the λβ-calculus with the ω-rule, in some kind of "normal form".(Observe that, in presence of the ω-rule, proofs become infinitary objects.)In particular as "normal form" for proofs, we have used in [6] the notion of cascaded proof.
Here we use the notion of canonical proof introduced in Section 2. In both cases, the intuitive idea is to extensively use the ω-rule to limit the use of β-reductions.This makes the behavior of the (various) Plotkin terms more controllable, which, in turn, makes the mentioned problem solvable.It turns out that one cannot use a unique "normal form", or at least we were not able to do this.In particular, observe that we need terms for two kinds of quantifier: • Arithmetical quantification over recursive enumerable sets of terms.
• One second order universal quantification to express Π 1 1 -complete problems.Different kinds of terms are used to express, via their equality, the two kinds of quantification.So in the present paper we concentrate on canonical proofs.This kind of "normal form" is suitable to cope with terms whose equality is used to express a Π 1 1 -complete problem.It is not suitable, however, to properly control the behavior of terms related to first-order quantification.For such terms, we rely on the methods used in [6] for the analysis of cascaded proofs.The general scheme of the proof is as follows: • In Section 2, we introduce the notion of canonical proof and prove that every provable equality has a canonical proof.• In Section 3, we introduce suitable Plotkin terms to express quantification over Church numerals.• In Section 4, we introduce suitable Plotkin terms to express second order quantification on sequences of numbers to reduce the Π 1 1 -complete problem of well-foundedness of recursive trees to equality of terms in the λβ-calculus with the ω-rule.

The ω-rule
Notation will be standard and we refer to [1], for terminology and results on λ-calculus.In particular: For a λ-term the notion of having order 0 has the usual meaning ([1] 17.3.2).We shall also call zero-term a term of order 0. As usual, we say that a term has positive order if it is not of order zero.We shall refer to a β-reduction performed not within the scope of a λ as a weak β-reduction.In the sequel, we shall need the following notions.We define the notions of trace and extended trace (shortly etrace) as follows.Given the reduction F −→ * βη G and the closed subterm M of F the traces of M in the terms of the reduction are simply the copies of M until each is either deleted by a contraction of a redex with a dummy λ or altered by a reduction internal to M or by a reduction with M at the head (when M begins with λ).The notion of etrace is the same except that we allow internal reductions, so that a copy of M altered by an internal reduction continues to be an etrace.
We formulate λω slightly differently.In particular, we want a formulation of the theory such that only equalities between closed terms can be proven.Moreover it will be convenient to use βη-conversion.The so called η-rule (that is (λx.M x) = η M ) obviously holds in λω.Nevertheless it will be useful to have this rule at disposal to put proofs in some specified forms.
Definition 1.1.Equality in λω (denoted by = ω ) is defined by the following rules: • the rule of substituting equals for equals in the form: if M = ω N then P M = ω P N • transitivity and symmetry of equality, • the ω-rule itself: ∀M, M closed, P M = ω QM P = ω Q We leave to the reader to check that the formulation above is equivalent to the standard one (see Chapter 4 of [1]).
As usual proofs in λω can be thought of as (possibly infinite) well-founded trees.In particular the tree of a proof either ends with an instance of the ω-rule or has an end piece consisting of a finite tree of equality inferences all of whose leaves are either βη conversions or direct conclusions of the ω-rule.It is easy to see that each such endpiece can be put in the form: where M i = ω N i , for 1 ≤ i ≤ t are direct conclusions of the ω-rule.See [8], Section 5, for more details.While the context is slightly different, the argument is verbatim the same.This is a particular case of a general result due to the second author of the present paper, see [12].Moreover, by the Church-Rosser Theorem this configuration of inferences can be put in the form are as above.We shall call the sequence (1.1) the standard form for the endpiece of a proof.
Since proofs are infinite trees (denoted by symbols T , T ′ etc.), they can be assigned countable ordinals.We shall need a few facts about countable ordinals, that we briefly mention in the following.For the basic notions on countable ordinals, see e.g.[11].
(a) Cantor Normal Form to the Base Omega (ω) Every countable ordinal α can be written uniquely in the form ω where some of the n i and m j may be 0. Then the Hessenberg Sum is defined as follows: Hessenberg sum is strictly increasing on both arguments.That is, for α, γ different from 0, we have: α, γ < α ⊕ γ.

(c) Hessenberg Product
We only need this for product with an integer.We put: Coming back to proofs, observe first that we can assume that if a proof has an endpiece, then this endpiece is in standard form (see above).The ordinal that we want to assign to a proof T (considered as a tree) is the transfinite ordinal ord(T ), the order of T , defined recursively by Definition 1.2.
We shall need also the following notion.Definition 1.3.If T ends in an endpiece computation of the form (1.1), with t > 0 instances of the ω-rule, and the t premises M 1 = ω N 1 , . . ., M t = ω N t have resp.trees T 1 , . . ., T t then rank(T ), the rank of T , is the maximum of ord(T 1 ), ord(T 2 ), . . ., ord(T t ).
We need the following propositions.
Proposition 1.4.If T ends in an endpiece computation of the form (1.1), with t > 0, and the equations Proof.ord(T i ) > 0 and ⊕ is strictly increasing on its arguments.Proposition 1.5.Assume that T ends in an instance of the ω-rule whose premises have, respectively, trees T 1 , . . ., T t , . . .Then for any integers t, n 1 , . . ., n t , Proof.Let ord(T i ) = α i , for 1 ≤ i ≤ t and put all α 1 , . . ., α t into Cantor normal form: But ord(T ) is a countable ordinal of the form ω γ and is thus closed under addition.Hence ω β 1 * n * k * t * n < ord(T ).This ends the proof.
Remark 1.6.Since for proofs T we shall mainly use ord(T ), we sometimes refer to ord(T ) simply as the ordinal of the proof T .

Canonical Proofs
We want to show that proofs in λω can be set in a suitable form.Recall that a set X of closed terms, is cofinal for βη-reductions, if every closed term M has a βη-reduct in X .Definition 2.2.We say that a set X of closed terms is supercofinal if it is cofinal and contains all the terms that do not reduce to a zero-term.
Remark 2.3.In the previous Definition, observe that, due to the cofinality of X , if a term reduces to a zero-term then it reduces to a zero-term which is in X .
In the following, let X be a specified supercofinal set.Definition 2.4.An endpiece in standard form is called an X -canonical endpiece (or, when X is clear from the context, simply a canonical endpiece) iff (1) for every i, i = 1, . . ., t + 1, the confluence terms H i belong to X ; (2) for every i, i = 1, . . ., t + 1, there exist terms and such that the following holds: (a) (Conditions on the Left Facing Arrows) for every i, i = 1, . . ., t, the sequence of left reductions − followed by a sequence of non-head β-reductions, − followed by a sequence of η-reductions.(b) (Condition on the Right Facing Arrows) for every i, i = 1, . . ., t, the sequence of right reductions has the following structure and for k = 1, . . ., m In the following definition, recall that an endpiece can be considered as a finite tree of equality inferences.Definition 2.5.Given the supercofinal set X , the notion of X -canonical proof is defined inductively as follows.
• A βη-conversion is X -canonical if the confluence term belongs to X .
• An instance of the ω-rule is X -canonical if the proofs of the premisses of the instances are X -canonical.• Otherwise a proof is canonical if its endpiece is an X -canonical endpiece and all the proofs of the leaves which are direct conclusions of the ω-rule are X -canonical.
Proposition 2.6.For every supercofinal set X , every provable equality M = ω N has an X -canonical proof.
Proof.Let X be fixed.We prove this proposition by induction on the ordinal ord(T ) of a proof T of M = ω N .For the basis case just suppose that M = βη N and use the Church-Rosser theorem.
For the induction step we distinguish two cases.
First Case.M = ω N is the direct conclusion of the ω-rule.This follows directly from the induction hypothesis.
Second Case 2. T has an endpiece of the form where, for each i = 1 . . .t, M i = ω N i is the conclusion of an instance of the ω-rule.
Observe that, without changing the ordinal of the proof, we can assume that every Consider the first component of the endpiece (2.2) βη H 1 , with all the η-reductions postponed.We have now different subcases.
First Subcase.No etrace of M 1 appears in functional position in a head redex neither in the head part of σ, nor in H 1 itself (that is H 1 has not a head redex of the form (λx.U )V , with λx.U an etrace of M 1 ).
In this case, the same head reductions can be performed (up to a substitution of M 1 by N 1 ) in the G 1 N 1 side.Thus simply replacing G 1 , we may freely assume that this head part is missing at all and thus σ is composed only of non-head β-reductions followed by η-reductions.Moreover, by our hypothesis, we can also assume that G 1 has not the form: Moreover we can also assume that G 1 begins with a λ.For otherwise, assume that in the head part of σ, a λ never appears at the beginning of the reducts of G 1 .Therefore all the reduction σ is internal to G 1 and M 1 , and this implies that 1 and M 1 βη-reduces to M ′ 1 , respectively.Thus, replacing G 1 with λx.G ′ 1 x, we obtain a term of the required form.On the G 1 N 1 side, the Conditions on the Right Facing Arrows may require a reduction of G 1 N 1 to a suitable term H + .
By the Church-Rosser Theorem and the cofinality of X , let H be a term in X , which is a common reduct of H + and H 2 .Now, there exists a proof T ′ of H = ω N , with ord(T ′ ) < ord(T ) (where N is the final term of the endpiece (2.2)).Thus by induction hypothesis there exists a canonical proof T 1 of H = ω N .Now, the required canonical proof is obtained by concatenating the component That this concatenation results in a canonical proof can be easily checked in case T 1 ends in an instance of the ω-rule as well as in case T 1 ends in an endpiece.
Second Subcase.Assume that: • an etrace of M 1 appears in functional position in a head redex of the head part of σ, or in H 1 itself; • a λ appears at the beginning of some term in the head part of σ.
Thus we have G 1 M 1 −→ * βη λu.U −→ * βη H 1 , for some U .For any closed term R, consider the reduction: This can be done for every λ appearing in the head part of σ.Thus for each choice of closed R 1 . . .R n we have a standard βη-reduction σ which is H 1 with each abstracted variable u j substituted by the corresponding closed term R j (unless this variable has been eliminated by η-reduction: in this case the resulting term is applied to R j ).Now, being X supercofinal, either H ′′ is in X or H ′′ βη-reduces to a zero-term H 0 in X , by a reduction σ ′′ .In this reduction some new λ may appear at the beginning of the term (since we have also η-reductions), and we treat this λ as before, by applying all the terms in the reduction some other R. Thus we extend the sequence R Since H 0 is a zero-term all the external λ appearing in σ ′′ are eventually eliminated by η-reductions.Therefore, starting from and applying the reductions in σ ′′ , we obtain the term m is a zero-term, so that if it is not in X , the reduction to a suitable term in X adds no new λs at the beginning of the term.So, without loss of generality we can assume that H ′′ is in X , and that σ ′ is a standard βη-reduction of G 1 M 1 R 1 . . .R n to H ′′ , such that no term in the head part of σ ′ begins with λ.Now in the head reduction part of σ ′ , we come to a term V with a head redex of the form: (λu.W )U , where has a proof with ordinal (much) less than ord(T ).Now, consider the component The reduction βη H ′′ has a head part shorter than σ ′ .Thus, iterating the previous transformation for each occurrence M 1 in functional position in the head reduction part of σ ′ , we arrive to a final sequence of terms we can argue as in the First Subcase above.
On the right hand side, observe that the iteration of the previous argument gives rise to a chain of equalities (where for simplicity, we do not consider reduction internal to M 1 ; this does not affect the argument) From this chain, by Proposition 1.5 of Section 1, one obtains a proof of with an ordinal less than ord(T ).We can also substitute M 1 [N 1 /x 1 , . . ., N 1 /x rs ] − → X s with a suitable reduct H, meeting both the Conditions on the Right Facing Arrows w.r.t.
− → X s and the cofinality condition w.r.t.X .Still, H = ω N R 1 . . .R n has a proof with ordinal less than ord(T ).Thus by induction hypothesis there exists a canonical proof That this concatenation results in a canonical proof can be easily checked in case T 1 ends in an instance of the ω-rule as well as in case T 1 ends in an endpiece.
Thus we have proved the following: Now, n applications of the ω-rule give the required canonical proof of M = ω N .
Third Subcase.• an etrace of M 1 appears in functional position in a head redex of the head part of σ, or in H 1 itself; • no λ appears at the beginning of some term in the head part of σ.This case can be treated as the previous one, with the difference that the resulting canonical proof ends in a canonical endpiece, rather than in an instance of the ω-rule.
We shall need the following result on X -canonical proofs.
Proposition 2.7.Let T be an X -canonical proof of M = ω N ending in an endpiece.Then for every sequence of terms P 1 , . . ., P m , there exist terms R 1 , . . ., R n such that the equality also ending in an endpiece, with rank(T 1 ) = rank(T ).
Proof.Assume that T has an endpiece of the form: where, for each i = 1 . . .t, M i = ω N i is the conclusion of an instance of the ω-rule.We argue by induction on t.Assume t = 1.Consider the first (and unique) component of the endpiece (2.3) . ., P m be given.We have two cases.
First Case.
In this case, the component can directly be transformed into a component of the right form, using the equality (λx.(G Second Case.
To obtain a component of the right form, we have to transform as in the proof of the previous proposition.This can be doneas shown in the second subcase of such proof -at the cost (in the worst case) of applying . ., R n of terms and introducing some additional leaves each one of ordinal not greater than the one of Hence the result follows for t = 1.Now assume t > 1.Let P 1 , . . ., P m be given.By induction hypothesis, for some R 1 , . . ., R n there is a proof with an endpiece of rank less In this case, the component can directly be transformed into a component of the right form, using the equality To obtain a component of the right form, we have to transform (λx.G as in the proof of the previous proposition.This can be done -as shown in the second subcase of such proof -at the cost (in the worst case) of applying (λx.(G k of terms and introducing some additional leaves each one of ordinal not greater than the one of Now again by induction hypothesis there exist R ′′ 1 , . . ., R ′′ s such that there is a proof with an endpiece of rank less or equal to rank(T ) of s without introducing new λs but (possibly) only other leaves each one of ordinal not greater than the one of So in both cases, the result follows.

Plotkin Terms
Recall that H, M, N, P, Q always denote closed terms.Let ⌈M ⌉ denote the Church numeral corresponding to the Gödel number of the term M .We can of course require that any term occurs infinitely many times (up to ω-equality) in the enumeration.By Kleene's enumerator construction ([1] 8.1.6)there exists a combinator J such that J⌈M ⌉ β-converts to M , for every M .The combinator J can be used to enumerate various r.e.sets of closed terms.In particular, let X be a r.e.set of terms, and let T X be a term representing the r.e.function that enumerates X .Set E ≡ λx.J(T X x).It is well known that we can assume that E is in βη-normal form.We call E a generator of X .As usual we shorten En with E n .We also suppress the dependency of E from J and X , when it is clear from the context.Now, by the methods of proof used in [6], which make use of modified forms of the celebrated Plotkin terms ([1] 17.3.26),one can prove the following: Lemma 3.1.Given a r.e.set of terms X and a generator E of X , there exists a term H such that for every M the following holds Remark 3.2.The Lemma's proof is identical to the proof of Proposition 5 of [6], and consists of two parts: (1) to show that if M = ω E k , for some k, then HE 0 = ω HM ; this is done by the standard argument based on the structure of Plotkin terms; (2) to show that if M = ω E k , for every k, then HE 0 = ω HM ; this difficult point requires a detailed analysis of proofs in λω, as formulated in [6]; this analysis is done in [6] and is based on casting such proofs in a suitable normal form, called in [6] cascaded proofs.The proof of the following result has the same structure.We define suitable Plotkin terms, which makes the "if part" easy to check, and we rely on the analysis based on cascaded proofs for the "only if part".As the external structure of the involved Plotkin terms is the same (zero-terms obtained by applying suitable βη-normal forms to other βη-normal forms), the proof strictly follows the pattern of the proof of Proposition 5 of [6] and is omitted.
Proposition 3.3.There exist two terms H 1 and H 2 such that for every M Proof.In [6], we constructed Plotkin terms P and Q such that for every n P n = ω Qn iff n is the Gödel number of a closed term which does not βη-convert to a Church numeral.Now, let the Plotkin terms F and G be such that where Ω ≡ (λx.xx)(λx.xx)and, as usual, the notation X 1 , X 2 , X 3 stands for Church triple, i.e.X 1 , X 2 , X 3 ≡ λz.zX 1 X 2 X 3 , and Claim.We claim that for every M To prove the claim, we first show that for every k Indeed, let k be fixed.Then there exists a k ′ ≥ 1, such that J(k + k ′ ) = ω Ω.Then, since Ω = ω n for every n, we have that and (repeatedly applying (3.1)) both terms of equation (3.3) are λω-equal to Assume that M is such that for all n, M = ω n.Let k such that M = ω Jk.By hypothesis, k, M, P k = ω k, Jk, Qk .It follows that Now assume that M is such that for some n, M = ω n.It follows that, for every k, k, M, P k = ω k, Jk, Qk and, roughly speaking, in the term F 0 G 0 M M M , M can never be eliminated by G.A formal proof argues by contradiction on a cascaded proof of This ends the proof of the claim.Now define We shall make extensive use of terms H 1 and H 2 in the following Section.

Barendregt Construction
In the present Section, we shall make use of the Proposition 4 of [6], that we restate here for the sake of the reader.
If M = ω N and M has a βη-normal form then N has the same normal form.Therefore two βη-normal forms equalized in λβω are identical.
We make the following definitions, which will hold in all the present and the next Section: where we have shortened Z(H 1 C) to Z * .
Let gk be the cofinal Gross-Knuth strategy defined in [1] 13.2.7.By writing gk(M ), we mean the term obtained by starting with the term M and applying (once) the gk strategy.
Then the reduction sequences Observe that we use the leftmost outermost reduction strategy, since it is cofinal (see [1], 13.1.3).The following Lemma is immediate.Lemma 4.2.X is supercofinal.
Proof.By induction on the ordinal of a canonical proof T of GM 1 . . .M m = ω GN 1 . . .N m .
Basis: ord(T ) is 1.This case is clear since G is of order 0. Induction step: Case 1. T ends in an application of the ω-rule.Apply the induction hypothesis to the subproof of GM where H * i,j = ω H 2 , for j = 1, . . ., n i , and M * i,k = ω M k for k = 1, . . ., m.Since G is of order 0, we must also have M * t+1,k = ω N k for k = 1, . . ., m.This completes the proof.

THE OMEGA RULE IS Π 1 1 -COMPLETE 15
By an inspection of the proof of the previous Lemma, the following stronger result can be obtained.For the proof of the following Lemma, we need Proposition 4 of [6], stated above.Lemma 4.5.Suppose that: , where, possibly, k = 0 or l = 0.
Proof.By induction on the ordinal of a canonical proof of Basis: The ordinal is 1 and we have a βη-conversion.Use a standard argument, taking into account that by Proposition 3.3 the copies of H 2 are distinct, w.r.t.ω-equality, from the copies of H 1 n.Therefore the β-reduction of G cannot affect the count of the copies of H 1 n.

Induction step:
Case 1.The proof ends in an application of the ω-rule.Just apply the induction hypothesis to any of the premises.Case 2. The proof has a canonical endpiece beginning with a component by the choice of the cofinal set.W.l.o.g.we can assume that the reduction from F L 1 P 1 Q 1 nM 1 . . .M m to H is a standard β-reduction followed by a sequence of η-reductions.The 8 term head reduction cycle of F with 4 arguments must be completed an integral number of times to result in a term which ηreduces to one with F at the head.Suppose that this cycle is completed s times.Let r = k + s.
On the other hand, since the endpiece is canonical L, after a sequence (possibly empty) of η-reductions, reduces to a term of the form where X 0 ≡ λx.X 1 .Indeed, the form of the external structure of H must be this is the form of any term, in the cofinal sequence, starting from F L since we have to obtain H by internal reductions and Q is not substituted for a variable in functional position in a head redex.It follows, using for some items Proposition 4 of [6], that: Corollary 4.8.If F G(An)(Bn)nM 1 . . .M m = ω F G(Bn)(An)nN 1 . . .N m has a canonical proof T then An = ω Bn has a canonical proof T 1 , with ord(T 1 ) ≤ ord(T ).Lemma 4.9.If the subtree t(n) of the tree t rooted at n is well-founded then An = ω Bn.
Proof.By induction on the ordinal of the subtree t(n), which is defined in the natural way.Note that if n is not the number of a sequence in the tree then Tn −→ * βη K * so An −→ * βη I * βη ←− Bn.Basis.The ordinal is 0 so the tree t(n) contains only the empty sequence.Suppose that 0 is the number of the empty sequence.Then  Proof.Consider all canonical proofs of smallest ordinal of An = ω Bn for n in the tree t, and assume that the subtree t(n) rooted at n is not well-founded.Let T be such a proof.
Case 1. T is a βη-conversion.It is easily seen that this is impossible.Indeed, assume that An = βη Bn; by the Church-Rosser Theorem a common βη-reduct must exist.
On the other hand, since n is in t, we have Thus by induction hypothesis, the extension of n * m in the tree is well-founded.So, every extension of n in the tree is well-founded.Thus the subtree rooted at n is well-founded.This contradicts the choice of n.
Case 3. T has an endpiece.Now, by Proposition 2.7, for each m there exist term R 1 , . . ., R k such that we have a canonical proof, with an endpiece of the same rank as T , of To see this consider the particular case when there is only one leaf which is a direct conclusion of the ω-rule.

Lemma 4 . 4 .
Assume that GM 1 . . .M m = ω GN 1 . . .N m has a canonical proof T .Then for each k, 1 ≤ k ≤ m, there is a canonical proof T k of M k = ω N k ,with the ordinal of T k not greater than the ordinal of T .

Lemma 4 . 10 .
If An = ω Bn then the subtree t(n) rooted at n is well-founded or n is not in the tree t.
is a shortening of X(H 1 C)) are cofinal for βη-reductions starting with G and, respectively, with F ZABC.Let P be the initial term or an intermediate term of the reduction sequence of the form (4.1), we indicate by gk(P ) the first term in the sequence, which has the form displayed in (4.1), from P by the reductions in (4.1).Similarly, if P is the initial term or an intermediate term of a reduction sequence of the form (4.2), starting fromF M 1 M 2 M 3 M 4 , for some M 1 , M 2 , M 3 , M 4 ,we indicate by gk(P ) the first term in the sequence, which has the form displayed in (4.2), obtained from P by the reductions in (4.2).Now, we choose the cofinal set X as follows: for every closed term M , • if M βη-reduces, by the leftmost outermost reduction strategy, to a term of the form P N 1 • • • N k , where P is a term of the sequence (4.1) then gk(P )gk(N 1 ) • • • gk(N k ) is the reduct of M in X ; • if M βη-reduces, by the leftmost outermost reduction strategy, to a term the form P N 1 • • • N k , where P is a term of a sequence (4.2), starting from *