Discriminating Lambda-Terms Using Clocked Boehm Trees

As observed by Intrigila, there are hardly techniques available in the lambda-calculus to prove that two lambda-terms are not beta-convertible. Techniques employing the usual Boehm Trees are inadequate when we deal with terms having the same Boehm Tree (BT). This is the case in particular for fixed point combinators, as they all have the same BT. Another interesting equation, whose consideration was suggested by Scott, is BY = BYS, an equation valid in the classical model P-omega of lambda-calculus, and hence valid with respect to BT-equality but nevertheless the terms are beta-inconvertible. To prove such beta-inconvertibilities, we employ `clocked' BT's, with annotations that convey information of the tempo in which the data in the BT are produced. Boehm Trees are thus enriched with an intrinsic clock behaviour, leading to a refined discrimination method for lambda-terms. The corresponding equality is strictly intermediate between beta-convertibility and Boehm Tree equality, the equality in the model P-omega. An analogous approach pertains to Levy-Longo and Berarducci Trees. Our refined Boehm Trees find in particular an application in beta-discriminating fixed point combinators (fpc's). It turns out that Scott's equation BY = BYS is the key to unlocking a plethora of fpc's, generated by a variety of production schemes of which the simplest was found by Boehm, stating that new fpc's are obtained by postfixing the term SI, also known as Smullyan's Owl. We prove that all these newly generated fpc's are indeed new, by considering their clocked BT's. Even so, not all pairs of new fpc's can be discriminated this way. For that purpose we increase the discrimination power by a precision of the clock notion that we call `atomic clock'.


Introduction
Böhm Trees constitute a well-known method to discriminate λ-terms M , N : if BT(M ) and BT(N ) are not identical, then M and N are β-inconvertible, M = β N .But how do we prove β-inconvertibility of λ-terms with the same Böhm Tree?This question was raised in Scott [24] for the interesting equation BY = BYS between terms that as Scott noted are presumably β-inconvertible, yet BT-equal (= BT ).Scott used his Induction Rule to prove that BY = BYS; instead we will employ below the infinitary λ-calculus with the same effect, but with more convenience for calculations as a direct generalization of finitary λ-calculus.Often one can solve such a β-discrimination problem by finding a suitable invariant for all the β-reducts of M , N. Below we will do this by way of preparatory example for the fixed point combinators (fpc's) in the Böhm sequence.But a systematic method for this discrimination problem has been lacking, and such a method is one of the two contributions of this paper.Actually, the need for such a strategic method was forced upon us, by the other contribution, because Scott's equation BY = BYS turned out to be the key unlocking a plethora of new fpc's.The new generation schemes are of the form: if Y is an fpc, then Y P 1 . . .P n is an fpc, abbreviated as Y ⇒ Y P 1 . . .P n .So P 1 . . .P n is an 'fpc-generating' vector, and can be considered as a building block to make new fpc's.But are they indeed new?A well-known example of a (singleton)-fpc-generating vector is δ, where δ = SI, giving rise when starting from Curry's fpc to the Böhm sequence of fpc's.Here another interesting equation is turning up, namely Y = Y δ, for an arbitrary fpc Y , considered by Statman and Intrigila [16].In fact, it is implied by Scott's equation, for an arbitrary fpc Y : The first equation BY = BY S will yield many new fpc's, built in a modular way; the last equation Y = Y δ addresses the question whether they are indeed new.Finding ad hoc invariant proofs for their novelty is too cumbersome.But fortunately, it turns out that although the new fpc's all have the same BT, namely λf.f ω , they differ in the way this BT is formed, in the 'tempo of formation', where the ticks of the clock are head reduction steps.We can thus discern a clock-like behaviour of BT's, and we refine BT's to 'clocked' BT's by annotating them with this information.These then enable us to discriminate the terms in question.
best for pairs of simple terms, it can also fruitfully be applied to compare a simple term with a non-simple term, and with some more effort, we can even compare and discriminate non-simple terms; see Section 5 for an example.
Even so, many pairs of fpc's cannot yet be discriminated, because they not only have the same BT, they also have the same clocked BT.Therefore, in a final grading up of the precision, we introduce 'atomic clocks', where the actual position of a head reduction step is administrated.All this pertains not only to the BT-semantics, but also to Lévy-Longo Trees (LLT) (or lazy trees), and Berarducci Trees (BeT) (or syntactic trees).Many problems stay open, in particular problems generalizing the equation of Statman and Intrigila, when arbitrary fpc's are considered.
Overview.After defining preliminary notions in Section 2, in Section 3 we are concerned with constructing new fpc's from old, by some generating schemes.In Section 4 we define clocked Böhm Trees.The main results here are Theorems 4.6 and 4.11.The first states that if no reduct of M has a clock that is at least as fast as the clock of N , then M and N are inconvertible, whereas Theorem 4.11 states that if M is a simple term then it suffices that the clock M is not eventually faster than the clock of N .In the paper we are mainly concerned with λ-terms which have simple reducts.An exception is Section 5, where we answer a question of Plotkin (see Related Work below) which involves arbitrary (not necessarily simple) fpc's.Another elaborate example is given in Section 6, where we compute the clocks of three enumerators for Combinatory Logic.In Section 7, we give a refinement of the clock method by not only recording the number of head reduction steps but also their positions.As an application we show that every combination of the fixed point generating vectors (SS)S ∼n I introduced in Section 3 give rise to new fpc's.We briefly mention how the theory can be extended to the other well-known semantics of λ-calculus, namely Lévy-Longo and Berarducci Trees, in Section 8. We conclude in Section 9 with directions for future research.
Related Work.The present paper is an extension and elaboration of [13].In particular, as an example application of the main theorems (Theorem 4. 6), we now answer the following question of Plotkin [22]: Is there a fixed point combinator Y such that Y (λz.f zz) = β Y (λx.Y (λy.f xy)) ?
An idea similar to clocked Böhm Trees is employed in the excellent paper [2], pointed out to us by Tarmo Uustalu at the 2010 LICS conference in Edinburgh.In [2], Aehlig and Joachimski study continuous normalization of the coinductive λ-calculus (see [19,17]) extended with a void 'wait' constructor R.This extra constructor is returned whenever the head constructor of a term cannot immediately be read off from the argument.If the head constructor of an application rs is to be found, it depends on a recursive call to investigate whether r is a variable, an abstraction or an application again; in this case an R is returned.Thus it is guaranteed that the procedure of building a non-wellfounded term over the extended grammar is productive by making the recursion guarded.Every R is matched either by a β-step necessary to reach the normal form (as represented by the Böhm Tree) or by an application node in the Böhm Tree.When r = λx.r′ then R matches a β-step and so s is used in the substitution r ′ [x := s].Or we find that r is a variable and so R matches an application node in the Böhm Tree.So the number of R's in the normal form of a term t is precisely related to the number of reduction steps and the 'size' of the resulting Böhm Tree.Summarizing, similar to the clocked Böhm Trees that we introduce in Section 4, in [2] Böhm Trees are enriched with information about how the tree is constructed.However, in [2] the refinement is used for proving their normalization function to be continuous, and not for discriminating λ-terms, the goal we pursue here.
In [15] a heuristic procedure in finitary λ-calculus is given to construct fpc's in a uniform way.

Preliminaries
To make this paper moderately self-contained, and to fix notations, we lay out some ingredients.For λ-calculus we refer to [3] and [7].For an introduction to Böhm, Berarducci and Lévy-Longo Trees, we refer to [3,1,8,5].Definition 2.1.Let X be an countably infinite set of variables.The set Ter (λ) of finite λ-terms is defined inductively by the following grammar: We use x, y, z, . . .for variables, and M, N, . . . to range over the elements of Ter (λ).
Thus λ-terms are variables, abstractions or applications.Usually we suppress the application symbol in a term M • N and just write (M N ).We also adopt the usual conventions for omitting brackets, i.e., we let application associate to the left, so that N 1 N 2 . . .N k denotes (. . .(N 1 N 2 ) . . .N k ), and we let abstraction associate to the right: λx 1 . . .x n .M stands for (λx 1 .(. . .(λx n .(M)))).
Definition 2.2.The set Ter ∞ (λ) of (finite and) infinite λ-terms is defined by interpreting the grammar from Definition 2.1 coinductively, that is, Ter ∞ (λ) is the largest set X such that every element M ∈ X is either a variable x, an abstraction λx.M ′ or an application M 1 M 2 with M ′ , M 1 , M 2 ∈ X. (See further [23] for a precise treatment of coinductive definition and proof principles.)Böhm, Lévy-Longo and Berarducci Trees are infinite λ-terms with an additional clause for ⊥ in the grammar, where ⊥ stands for the different notions of 'undefined' in these semantics, see Definitions 4.1, 8.1 and 8.2.
Definition 2.3.The relation → β on Ter (λ) or Ter ∞ (λ), called β-reduction, is the compatible closure (i.e., closure under term formation) of the β-rule: where M [x := N ] denotes the result of substituting N for all free occurrences of x in M .Furthermore, we write → n β for the n-fold composition of → β , defined by M → 0 β M , and We write M = β N to denote that M is β-convertible with N , i.e., = β is the equivalence closure of → β .For syntactic equality (modulo renaming of bound variables), we use ≡.
Apart from the 'many-steps' relation ։ β , we introduce 'multi-steps' • −→ β [30,3], which arise from complete developments.Definition 2.4.We write • −→ β for multi-steps, that is, complete developments of a set of redex occurrences in a term.A development of a set of redex occurrences U in a term contracts exclusively descendants (residuals) of U , and it is called complete if there are no residuals of U left.
A complete development of U can alternatively be viewed as contracting all redex occurrences in U in an inside-out fashion.
We will often omit the subscript We say that a term M has a normal form if it reduces to one.For λ-terms M having a normal form we write M for the unique normal form N with M ։ N (uniqueness follows from confluence of the λ-calculus).
Some commonly used combinators are: Definition 2.6.A position is a sequence over {0, 1, 2}.For a finite or infinite λ-term M , the subterm M | p of M at position p is defined by: The definition of weak fpc's in ( 4) is essentially coinductive [23], that is, implicitly employing a 'largest set' semantics.In long form, the definition means the following: the set of weak fpc's is the largest set W ⊆ Ter (λ) such that for every Z ∈ W we have Zx = β x(Z ′ x) for some Z ′ ∈ W .A wfpc is alternatively defined as a term having the same Böhm Tree as an fpc, namely λx.x ω ≡ λx.x(x(x(. ..))).Weak fpc's are known in foundational studies of type systems as looping combinators; see, e.g., [10] and [14].
Example 2.8.Define by double recursion, Z and Z ′ such that Zx = x(Z ′ x) and Z ′ x = x(Zx).Then Z, Z ′ are both wfpc's, and Zx = x(x(Zx)).So Z delivers its output twice as fast as an ordinary fpc, but the generator flipflops.
(1) A head reduction step → h is a β-reduction step of the form: (3) A weak head normal form (whnf ) is an hnf or an abstraction, that is, a whnf is a term of the form xM 1 . . .M m or λx.M .(4) A term has a (weak) hnf if it reduces to one.(5) We call a term root-stable if it does not reduce to a redex: (λx.M )N .A term is called root-active if it does not reduce to a root-stable term.
Definition 2.10.For terms A, B we define AB ∼n and A n B: A context of the form B ∼n is called a vector.For the vector notation, it is to be understood that term formation gets highest priority, i.e., ABC ∼n = (AB)C ∼n .

Fixed Point Combinators
The theory of sage birds (technically called fixed point combinators) is a fascinating and basic part of combinatory logic; we have only scratched the surface.R. Smullyan [28].
It is well-known, as observed by C. Böhm [9,3], that the class of fpc's coincides exactly with the class of fixed points of the peculiar term δ = λab.b(ab),convertible with SI.The notation δ is convenient for calculations and stems from [16].This term also attracted the attention of R. Smullyan, in his beautiful fable about fpc's figuring as birds in an enchanted forest: "An extremely interesting bird is the owl O defined by the following condition: Oxy = y(xy)."[28].We will return to the Owl in Remark 3.4 below.
Thus the term Y δ is an fpc whenever Y is.It follows that starting with Y 0 , Curry's fpc, we have an infinite sequence of fpc's Y 0 , Y 0 δ, Y 0 δδ, . . ., Y 0 δ ∼n , . ..; we call this sequence the 'Böhm sequence'.Note that Y 0 δ = β ηη, justifying the overloaded notation Y 1 .Now the question is whether all these 'derived' fpc's are really new, in other words, whether the sequence is free of duplicates.This is *Exercise 6.8.9 in [3].
Note that we could also have started the sequence from another fpc than Curry's.Now for the sequence starting from an arbitrary fpc Y , it is actually an open problem whether that sequence of fpc's Y, Y δ, Y δδ, . . ., Y δ ∼n , . . . is free of repetitions.All we know, applying Intrigila's theorem, Theorem 3.3 below, is that no two consecutive fpc's in this sequence are convertible.But let us first consider the Böhm sequence.
We show that the Böhm sequence contains no duplicates by determining the set of reducts of every Y n .For Y 3 1 the head reduction is displayed in Figure 2, but this is by no means the whole reduction graph.For future reference we note that the head reduction diagram suggests a 'clock behaviour'.

ηηδδx
x(ηηδδx) h  Proof.We define languages L n ⊆ Ter (λ) as follows: We show that: (1) Y n ∈ L n ; (2) L n is closed under β-reduction; and (3) L n and L m are disjoint, for n = m.Then it follows that L n contains the set of ։ β -reducts of Y n , and using (iii) this implies that Y n = β Y m for all n = m.For (i) note that Y 0 ∈ L 0 , and 1) which is in L n by induction on n > 0.
We show (ii): if M ∈ L n and M → N , then N ∈ L n .Using induction, we do not need to consider cases where the rewrite step is inside a variable of the grammar.We write L n in terms as shorthand for a term M ∈ L n .
1 Actually Figure 2 displays Y3x.We will frequently consider Y x instead of Y as then the repetition is immediate, and because we have that if For n = m, n > 1, (iii) follows by counting the number of passive δ's, that is, the number of occurrences of the form P δ for some P .To see that A very interesting theorem involving δ was proved by B. Intrigila, affirming a conjecture by R. Statman.

Theorem 3.3 (Intrigila [16]
).There is no 'double' fixed point combinator.That is, for no fpc Y we have We collect some salient facts and questions.
(2) Call an applicative combination of δ's a δ-term, that is, a term solely built from δ and application.In spite of δ's simplicity, not all δ-terms are strongly normalizing (SN).
However, its Berarducci Tree is not trivial.Zantema remarked that δ-terms, even infinite ones, such as ∆∆, are "top-terminating" (Zantema considered the applicative rule for δ only -we expect that his observation remains valid for the λβ-version).(7) Is Intrigila's theorem also valid for wfpc's: for no wfpc Z we have Zδ = β Z? 3.2.The Scott Sequence.In [24, p. 360] the equation BY 0 = BY 0 S is mentioned as an interesting example of an equation not provable in λβ 2 , while easily provable with Scott's Induction Rule.Scott mentions that he expects that using 'methods of Böhm' the nonconvertibility in λβ can be established, but that he did not attempt a proof.On the other hand, with the induction rule the equality is easily established.We will not consider Scott's Induction Rule, but we will be working in the infinitary lambda calculus, λ ∞ β.It is readily verified that in λ ∞ β we have: 2), the result follows.
In the same way we can strengthen this non-equation to all fpc's Y , using Theorem 3.3.Actually, the comparison between the terms BY and BY S has more in store for us than just providing an example that the extension from finitary lambda calculus λβ to infinitary lambda calculus λ ∞ β is not conservative.The BT-equality of BY and BY S suggests looking at the whole sequence BY, BY S, BY SS, . . ., BY S ∼n , . ... All these terms have the Böhm Tree λab.(ab) ω , and hence they are not fpc's.But postfixing an I turns them into fpc's.
We write U n = BY 0 S ∼n I for the n-th term in this sequence.
The Scott sequence concurs with the Böhm sequence of fpc's only for the first two elements, and then splits off with different fpc's.But there is a second surprise.In showing that U n is an fpc, we find as a bonus the fpc-generating vector (SS)S ∼n I (which does preserve the property of fpc's to be reducing).
The proof of Theorem 3.8 is easy: see the next example.
Example 3.9.Let Y be a k-reducing fpc.Then: This shows that BY S ∼3 I is a non-reducing fpc, and at the same time that Y (SS)SIx is reducing.

Generalized Generation Schemes.
The schemes mentioned in Theorem 3.8 for generating new fixed points from old, are by no means the only ones.There are in fact infinitely many of such schemes.They can be obtained analogously to the ones that we extracted above from the equation BY = BY S = λab.(ab)ω , or the equation M ab = ab(M ab).We only treat the case for n = 3: consider the equation N abc = abc(N abc).Then every solution N is again a 'pre-fpc', namely N II is an fpc: Again the first two coincide with Y 0 , Y 1 , but the series deviates not only from the Böhm sequence but also from the Scott sequence above.As above, the proof that a term in this sequence is indeed an fpc, yields an fpc-generating vector.In this way we find as a new fpc-generating scheme Y ⇒ Y (AAA)A ∼n II We can derive many more of these schemes by proceeding with solving the general equation N a 1 a 2 ...a n = a 1 a 2 ...a n (N a 1 a 2 ...a n ), bearing in mind the following proposition.

Clock Behaviour of Lambda Terms
As we have seen, there is vast space of fpc's and there are many ways to derive new fpc's.The question is whether all these fpc's are indeed new.So we have to prove that they are not β-convertible.
For the Böhm sequence we did this by an ad hoc argument based on a syntactic invariant; and this method works fine to establish lots of non-equations between the alleged 'new' fpc's that we constructed above.Still, the question remains whether there are not more 'strategic' ways of proving such inequalities.
In this section we propose a more strategic way to discriminate terms with respect to β-conversion.The idea is to extract from a λ-term more than just its BT, but also how the BT was formed; one could say, in what tempo, or in what rhythm.A BT is formed from static pieces of information, but these are rendered in a clock-wise fashion, where the ticks of the internal clock are head reduction steps.
In the sequel we write [k]M for the term M where the root is annotated with k ∈ N. Here, term formation binds stronger than annotation [k].For example [k]M N stands for the term [k](M N ) (that is, annotating the (non-displayed) application symbol in-between M and N , in contrast to ([k]M )N ).Moreover, for an annotated term M we use ⌊M ⌋ to denote the term obtained from M by dropping all annotations (including annotations of subterms).The notions of subterms and positions (see Definition 2.6) carry over to annotated terms, in particular clocked Böhm Trees, in a straightforward way.The (non-clocked) Böhm Tree of a λ-term M can be obtained by dropping the annotations: Let us consider the fpc's Y 0 of Curry and Y 1 of Turing.We have Y 0 ≡ λf.ω f ω f where ω f ≡ λx.f (xx), and For Y 1 ≡ ηη where η ≡ λx.λf.f (xxf ) we get: The following definition captures the well-known Böhm equality of λ-terms.
Definition 4.2.λ-terms M and N are BT-equal, denoted by Below, we refine this approach by comparing the clocked Böhm Trees BT (M ) and BT (N ) instead of the ordinary (non-clocked) Böhm Trees.In general, BT (M ) ≡ BT (N ) does not always imply that M = β N .Nevertheless, for a large class of λ-terms, called 'simple' below, this implication will turn out to be true.
In the following definition, we lift relations over natural numbers to relations over clocked Böhm Trees.Definition 4.3.Let T 1 and T 2 be clocked Böhm Trees, and R ⊆ N × N. We define the following notations: (1) For p ∈ Pos(T 1 ) ∩ Pos(T 2 ) we let T 1 R p T 2 denote that either both T 1 | p and T 2 | p are not annotated, or both are annotated and then (3) We write T 1 R ∃ T 2 , and say that R holds eventually, if ⌊T 1 ⌋ ≡ ⌊T 2 ⌋ and there exists a depth level ℓ ∈ N such that T 1 R p T 2 for all positions p ∈ Pos(T 1 ) with |p| ≥ ℓ.
Definition 4.4.For λ-terms M and N we say: (1) The following proposition states that the ordering > on λ-terms defined by M > N if and only if BT (M ) ≥ BT (N ) is a 'semi-model' of β-reduction [21].We leave this for future research.Proof.We proceed by an elementary diagram construction.Whenever we have co-initial steps M → h M 1 and M • −→ M 2 , then by orthogonal projection [30] there exist joining steps Note that the head step M → h M 1 cannot be duplicated, only erased in case of an overlap.This leads to the elementary diagram displayed in Figure 4.
We have ։ ⊆ • −→ * .By induction on the length of the rewrite sequence If M has no hnf, then the same holds for N , and hence BT (M ) = ⊥ = BT (N ).Assume that there exists a head rewrite sequence Using the elementary diagram above (k times), we can project We then can apply the same argument to Note that for distinguishing M and N we can always consider β-equivalent terms M ′ = β M and N ′ = β N instead.For Theorem 4.6 we have to show ¬(BT (M ′ ) ≤ BT (N )) for all reducts M ′ of M .This condition is in general difficult to prove.However, the theorem is of use if one of the terms has a manageable set of reducts, and this term happens to have slower clocks.A striking example will be given below in solving a question of Plotkin in Section 5.
For a large class of λ-terms it turns out that clocks are invariant under reduction.We call these terms 'simple'.Note that this definition is essentially coinductive: the set of simple terms is the largest set X such that if M ∈ X then either M has no hnf or the reduction to hnf M ։ h λx 1 . . . .λx n .yM 1 . . .M m contracts only simple redexes and M 1 , . . ., M n ∈ X again.
All the fpc's in this paper are either simple or have simple reducts.The clock of simple λ-terms is invariant under reduction, that is, reduction of a simple term affects only finitely many annotations in the clocked Böhm Tree.For example, by reducing a term we can always make the clock values in a finite prefix equal to 0. Proposition 4.9.Let N be a reduct of a simple term M .Then N matches M eventually (BT (M ) = ∃ BT (N )).
Proof.The proof is a straightforward extension of the proof of Proposition 4.5 with the observation that for simple terms M , rewriting M → k h H ≡ λx 1 . . . .λx n .yM 1 . . .M m to hnf does not duplicate redexes.For simple terms M , the elementary diagrams are of the form displayed in Figure 5.We use s We briefly explain the two elementary diagrams.They depict the possible scenarios for joining co-initial steps M → h M 1 and M → M 2 , that is, a head reduction step set out against an arbitrary reduction step.If M is a simple term, then either (1) both are the same step, and can be joined with empty steps ∅ −→, or (2) they can be joined by M 2 → h M ′ ← = M 1 since a head step in a simple term with hnf cannot duplicate a redex (but deletion is possible).We show the following implication by induction on n ∈ N (employing the diagrams in Figure 5): For n = 0, there is nothing to be shown.Let n > 0, and consider For λ-terms M and integers n ∈ N, we define finite approximations BT ,n (M ) of the clocked Böhm Tree BT (M ) of M .We let BT ,0 (M ) = M , and for n > 0 define Let M, N be terms, M simple and M → n N .Then we claim where Note that every reduction BT ,m (M ) → ≤n BT ,m (N ) is contained within the subterms M ′ of BT ,m (M ) that are left unreduced by the clause BT ,0 (M ′ ) = M ′ ; everything outside these subterms is in normal form.Using the previous observation and ( * ), we obtain by induction that for all m ∈ N: ⌊BT ,m (M )⌋ → ≤n−dm ⌊BT ,m (N )⌋ where d m is the number of positions p where the annotation of BT ,m (M )| p differs from the annotation of BT ,m (N )| p .As a consequence, the annotations of BT (M ) and BT (N ) differ at most at n positions.Hence BT (M ) = ∃ BT (N ).
Reduction accelerates clocks, and for simple terms the clock is invariant under reduction, see Proposition 4.9.Hence if a term M has a simple reduct N , then N has the fastest clock reachable from M modulo a finite prefix.This justifies the following convention.We only consider the clocked BT's of M and N , instead of all reducts M ′ of M .
Note that Theorem 4.11 can also be employed for discriminating non-simple λ-terms if one of the terms has a simple reduct.For the case that both M and N are simple, there is no need to look for reducts since the eventual clocks are invariant under reduction, see Proposition 4.9: Corollary 4.12.If simple terms M , N do not match eventually, then they are not βconvertible, that is, M = β N .
Remark 4.13.The reason for the qualifier 'eventually' in the notions above, in other words, working modulo a finite prefix of the BT, is that by some preliminary reduction we can always make the clock values in any finite prefix equal to 0. So we are interested exclusively in the 'tail behaviour', or the behaviour 'at infinity', and not in the initial behaviour of the development to the BT.To give a concrete example: Y 0 and Y 1 , the fpc's of Curry and Turing, can be reduced to reducts M 0 , M 1 respectively, that have an initial segment of arbitrary length n of their BT's with clock labels 0 (just reduce first to λf.f n (. ..)).However, the infinite remainders of their BT's, their tails as it were, will reveal the difference in clock values, witnessing the fact that Y 0 eventually improves Y 1 .And this situation is stable under reduction; indeed, for any two reducts M 0 , M 1 as above, the first eventually improves the second.
h x(ηηδ ∼n−1 x) Notice that none of these steps duplicate a redex, hence Y n is a simple term.We find BT (Y n x) = [2n](xBT (Y n x)).Hence, for n ≥ 2 the clock of Y n is 2n.Consequently, all terms in the Böhm sequence have distinct clocks.Thus we have an alternative proof of Theorem 3.2: the Böhm sequence contains no duplicates.
Example 4.16.Let n ≥ 2. We compute the clocks of the fpc's U n = BY 0 S ∼n I of the Scott sequence.We first reduce U n x to a simple term: where ω SS ≡ λabc.bc(aabc).We abbreviate θ = ω SS .Then we compute the clocks for n = 2, n = 3, and n > 3: h x(θθS ∼(n−2) Ix) respectively.For all three cases, we find:  Plotkin's question is pertinent to the question whether absolutely unorderable models of the λ-calculus exist, see Selinger's work [25,26,27].The negative solution of Plotkin's question blocks an appeal to Lemma 3.6 in [27] to show that the generalized Mal'cev equations for all n are inconsistent with the λβ-calculus.(For n = 0, 1 this is established, but the general case is a difficult open problem.) We show that there is no fpc Y satisfying (5.1).We begin with an example.
Example 5.1.We consider Turing's fpc Y 1 , and compute the clocked BT's of A Y 1 and B Y 1 .
Note that for B Y 1 developing the left branch takes six steps, whereas the right branch only needs three.We remark that this is not sufficient to conclude that A Y 1 = β B Y 1 since A Y and B Y are non-simple even for simple fpc's Y .The clocked BT's for A Y 1 and B Y 1 are depicted in Figure 6 using hnf-notation, see [3] or [5].
for some Y ′′ = β Y x.The underlined term in head normal form is obtained without reducing, and hence will be annotated with Note that in the statement of the above lemma, the positions (12) n 2 refer to trees in applicative notation, which is equivalent to 1 n 2 in the hnf-notation, as seen in Figure 7.
We continue by proving that no reduct of A Y improves globally on B ′ Y .More precisely, we show that for every reduct A ′ Y of A Y there exists a position p of the form ( 12) * 2 such that the annotation of BT (A ′ Y ) at p is nonzero. . ... . .Note that, in case Y is not closed, the term may contain occurrences f .In the definition of 'balanced' we are not interested in those occurrences of f , but only the residuals of f displayed in Y (λz.f zz), that is, the f in λz.f zz.Let us label this f as f ⋆ , i.e.Y (λz.f ⋆ zz), such that f ⋆ does not occur in Y .Then by 'residuals of the displayed f ' we mean the free occurrences of f ⋆ in all reducts of Y (λz.f ⋆ zz).
The following lemma states that every reduct of A Y can be balanced: There exists a balanced N such that M ։ N .
Proof.Let • −→ denote complete developments of the set of all redex occurrences (also known as Gross-Knuth steps).We consider the sequence

. By cofinality of •
−→ [3,30] there exists i ∈ N such that M ։ N i .We define N ≡ N i .It remains to be shown that the term N is balanced.This follows from the fact that A Y is balanced, and that balancedness is preserved under • −→.The latter can be seen as follows: consider a term C[f s s].Obviously both displayed occurrences of s contain the same redexes, and the same variables bound from above f s s in C. Hence all descendants of both occurrences of s after • −→ will again be identical.

Lemma 5.5. Let A Y ։ A ′
Y .There exists a position p of the form (12) * 2 such that BT (A ′ Y ) has a nonzero annotation at position p.

there exists a balanced reduct A ′′′
Y of A ′′ Y .Note that also A ′′′ Y is in hnf and its head symbol is f .Let q be the shortest position of the form (12

Clocked Böhm Trees and Periodic Terms
In the last two sections we saw that the concept of clocked Böhm Trees can be successfully used to discriminate between λ-terms with equal Böhm Trees or to analyze the existence of terms satisfying certain equations.In this section we will address the following question: to which classes of λ-terms is the clocks method most readily applicable?
A common feature of terms studied in Sections 4 and 5 is that their Böhm Trees are 'periodic': they have inherent cyclical content that allows us to analyze how their clocks are developed towards infinity.For example, Y is an fpc if the term Y x ≡ Y x satisfies That is, the subterm of Y x occurring at position 2 is equal to the term Y x itself.If we use Böhm Tree equality instead of β-equality then the equation (6.1) would say that Y is a wfpc, or a looping combinator: The next definition attempts to capture such situations in a general fashion.
In what follows, M σ denotes the term at position σ in the Böhm Tree of M , with . By a Böhm Tree context C 1 • • • n we mean a finite Böhm Tree in which the leaves, in addition to being variables or ⊥, are allowed to be either of the holes i .(Equivalently, it is a λ⊥-context which is redex-free.)Definition 6.1.Let M ∈ Ter (λ), and ǫ = σ ∈ Pos(BT(M )).
(1) M is periodic at (3) M is (weakly) locally periodic if for every infinite path x = x 0 , x 1 , . . .through the Böhm Tree of M we have that M is (weakly) periodic at x n for some n.(4) M is (weakly) globally periodic if there is a Böhm Tree context Example 6.2.
(1) If Y is an fpc, then Y x is periodic at 2.
(2) If Y is a weak fpc, then Y x is weakly periodic at 2.
(3) Using the fixed point theorem, let M be such that M = λz.zMM .Then M is periodic at 02, 012.Since any infinite path through BT(M ) passes through one of these positions, M is locally periodic.In fact, M is globally periodic with the context C 1 2 ≡ λz.z 1 2 .Generally, any term which is defined by an application of the fixed point theorem is periodic by construction.If a looping combinator is used instead of an fpc, then the resulting term will be weakly periodic.This suggests that (w)fpc's play a central role in the study of general periodic terms.
We prove the following elementary fact: Proposition 6.3.Let M ∈ Ter (λ).Then M is (weakly) locally periodic ⇐⇒ M is (weakly) globally periodic Proof.The statement is proved simultaneously for weak and strong periodicity.For the latter case, the equality should be read as β-convertibility.For the former, it should be read as Böhm Tree equality.
x must pass through one of the holes i .Since M = M i is periodic at this position, x passes through a periodic position.Since x was arbitrary, M is locally periodic.
(⇐) Suppose that M is locally periodic, and let X denote the set of infinite paths through the Böhm Tree of M (X could be called the Böhm space of M ).Since BT(M ) is a finitely branching tree, the space X is compact, when given the topology generated by the cylinders X σ = {θ | σ ⊑ θ} For x ∈ X , let σ x be a periodic position that x passes through (by local periodicity).Then the collection Σ = {σ x } x∈X is an open cover of X .By compactness, there exists a subcollection σ 1 , . . ., σ n ∈ Σ which covers X .Let C ≡ C 1 • • • n be obtained from M by unfolding its Böhm Tree up to depth max{|σ 1 |, . . ., |σ n |} and placing holes i at positions σ i .We claim that C is the desired Böhm Tree context.
By construction, C is a Böhm Tree context with We also have that M is periodic at σ i , hence M = M σ i .Furthermore, if x ∈ X , then x passes through σ i for some i.Therefore, outside the holes i the Böhm Tree of C is finite.
Indeed, M is globally periodic.
In light of the proposition above, when M is either locally or globally periodic, we simply say that M is periodic.
The resulting notion of periodicity is somewhat restrictive, because it does not account for terms in which repetition begins later in the Böhm Tree.For example if Y is an fpc, then Y x is periodic, but Y itself is not, because the first node of its Böhm Tree has the abstraction λf.f , which is never repeated in the infinite sequence of f 's that follows.
(1) M is periodic at σ with offset θ if M θ is periodic at π.In this case, we say that σ is cyclic in BT(M ), and call π the period and θ the phase of the cycle at σ. (2) M is weakly periodic at σ with offset θ if M θ is weakly periodic at π.We say that σ is weakly cyclic, and call π the period and θ the phase of the weak cycle at σ. (3) M is (weakly) fully periodic if every infinite path through BT(M ) passes through a (weak) cycle (θ, π) (that is, eventually comes into a periodic subterm of M ).
As before, it is easy to see that M is fully periodic if and only if there are finitely many positions σ 1 , . . ., σ n ∈ Pos(BT(M )), σ i = θ i π i such that M is periodic at σ i with offset θ i and period π i , and outside these positions the Böhm Tree is finite.Periodic and fully periodic terms are the perfect targets for exercising the clocks method.We will now illustrate this with an example, where, instead of fpc's, we consider enumerators, also called evaluators, for Combinatory Logic.There are many possibilities for such an enumerator E, depending on how one does the coding.However, in most schemes E is a periodic term.It is straightforward to verify that, for i ∈ {1, 2, 3} we have E i M = M for any {K, S}term M .The evaluators look similar, and their Böhm Trees are indeed the same.However, it is not immediate whether the terms are β-convertible or if they are distinct.
Fortunately, since these terms are periodic, their clocked Böhm Trees can be computed easily: (1) For N ∈ Ter (λ), let V N ≡ λabc.ab((NN b)(N N c)), and W = λw.V w .Then we have Again, we are at a point where every position lies on a cycle, giving us a full description of the clocked Böhm Tree of E 2 .
(3) Let V N = λabc.ab(Sbc(NN )), and W , S ′ N , S ′′ N,M as before.Then  The Böhm Trees of E i are displayed in Figures 8 and 9.This information, together with Theorem 4.11, allows us to discriminate between the terms.Note that E 1 does not eventually improve on E 3 : the occurrences of the variable c in the clocked Böhm Tree of E 3 are annotated by a 0, while the corresponding subterms of E 1 take two head steps to converge.Furthermore, the head redexes contracted in this reduction W W and V W c are both callby-value.By Theorem 4.11 we conclude that E 3 = β E 1 .In contrast, E 2 is improved by E 1 .In fact, E 1 and E 2 can be reduced so that their clocked Böhm Trees match eventually.
Upon further inspection, we see that the two terms are indeed convertible.
Remark 6.6.We note that (fully) periodic terms are the λ-calculus analogue of the usual 'circular' terms defined by mutually recursive definitions.The let binder in Haskell is an example of such a construct -one difference being that, because the semantics of Haskell is graph rewriting, such terms actually denote possibly cyclic graphs rather than their unfoldings as infinite trees.For example, the following is an example of a 'periodic Haskell term': where zz n = n : zz (n+1) in x *Main> take 20 streamSys [0,0,0, 1,4,10,20,35,56,84,120,165,220,286,364,455,560,680,816,969] In discussion of such recursive systems, a well-known topic is the distinction between 'strong equality' and 'weak equality'; the former being syntactic convertibility between two such systems, and the latter being bisimulation or 'behavioral equivalence'.For this reason, the complexity of strong equality is usually Σ 1 , since one only needs to check the existence of a proof object (the conversion sequence) for the equality between two terms, while weak equality is Π 2 , since it asks whether for every number n, there is a conversion that makes the terms coincide up to depth n.
This discussion applies to our notions of fpc's and wfpc's, and also periodic and weakly periodic terms.From this point of view, the clocked Böhm Trees offer a refinement of these two types of equality, replacing dichotomy with a spectrum, or hierarchy, of equality, by augmenting the syntactic shape of the terms with the information of how quickly the computation they define is performed.For the case of λ-calculus, this spectrum was displayed in Figure 1.
Concluding this elaboration on cyclic terms, we note that also for the fragment of λ-calculus consisting of µ-terms, with the definition of the corresponding µ-rule µx.A(x) → A(µx.A(x)), the notion of clocked Böhm Trees may be interesting, as it yields an equality strictly in between weak and strong equality, as it is called in [12,4].There µ-terms are treated extensively, for their application as a representation of recursive types.

Atomic Clocks
We have introduced clocked Böhm Trees for discriminating λ-terms.In this section, we refine the clocks to measure not only the number of head steps, but, in addition, the position of each of these steps.We call these clocks 'atomic'.We write → h,p for the head reduction step at position p.
Before we give the formal definition (Definition 7.1), we consider a motivating example.We discriminate Y 2 from U 2 .First, we reduce both terms to simple reducts: where η = λab.b(aab) Second, we compute the atomic clocks of these simple reducts, that is, the positions of the head steps, as follows: Thus the atomic clocks of these terms are: Note that both terms have the (non-atomic) clocked Böhm Tree T ≡ [4](xT ).Hence the method from the previous section is not applicable.However, the atomic clocks do allow us to discriminate the terms.Hence Y 2 = β U 2 (by Corollary 4.12 which generalises to the setting of atomic BT's).Note that the (non-atomic) clocked BT's can be obtained by taking the length of the lists of positions.For lists p, q of positions, we write p • q for concatenating p to q.We write → h, p 1 ,...,pn for the rewrite sequence → h,p 1 • • • → h,pn consisting of steps at position p 1 ,. . .,p n .Definition 7.1 (Atomic clock Böhm Trees).Let M ∈ Ter (λ).The atomic clock Böhm Tree BT (M ) of M is an annotated infinite term defined as follows.If M has no hnf, then define BT (M ) as ⊥.Otherwise, there is a head reduction of length k to hnf.Then we define BT (M ) as the term: The theory developed for (non-atomic) BT's in Section 4 generalises to atomic trees, as follows.
Theorem 7.2.For lists of positions p, q we define p ≥ q whenever q is a subsequence of p, and p > q if additionally p = q.Here a 1 , . . ., a n is a subsequence of b 1 , . . ., b m if there exist indexes i 1 < i 2 < . . .< i n such that a 1 , . . ., a n = b i 1 , . . ., b in .
Using this notation for comparing the atomic annotations (lists of positions), Proposition 4.5, Theorem 4.6, Proposition 4.9, Theorem 4.11, and Corollary 4.12 remain valid.
As an application of using atomic clocks to discriminate λ-terms, we show that every combination of the fpc-generating vectors (SS)S ∼n I from Theorem 3.8 applied to Curry's fpc Y 0 gives rise to inconvertible fpc's.We note that this cannot be proved using non-atomic clocks, as for example we have BT (Y 0 (SS)S ∼n I(SS)S ∼m I) = BT (Y 0 (SS)S ∼m I(SS)S ∼n I).Proposition 7.3.Let G n = (SS)S ∼n I the fpc-generating vectors from Theorem 3.8.For n 1 , . . ., n k ∈ N we define Proof.In this proof we abbreviate context filling by simply concatenating the contexts, so that for Y n 1 ,...,n k defined above we have Y For p = 1 m 1 , . . ., 1 m k a list of positions we define p × n as follows: For example, we have 1 5 × 3 = 1 5 , 1 4 , 1 3 .We also use the following abbreviations, for n ∈ N: . .G n k so that we have the following reduction: and we observe that Yx is a simple term (as can be inferred from the reductions below).Let V m = N 1 . . .N m be a vector of length m.Then we have, for every n ≥ 0: For M an arbitrary term, we have the following reductions ( * ) n,m (n, m ≥ 0): Moreover, let ( ‡) denote the following rewrite sequence: The rewrite sequence Yx ։ h x(Yx) is composed of k subsequences as follows: where m i is defined by m k = 1 and m

)).
As the goal is to prove inconvertibility, we may without loss of generality assume that n k = 0 since the fact M N = β M ′ N =⇒ M = β M ′ allows us to append G n with arbitrary n > 0. We argue that the starting positions of the subsequences ( * ) n i ,m i in ( * ) coincide with the occurrences of subsequences of the form (♪) 1 l , 1 l+1 , 1 l , 1 l−1 , 1 l−2 (for some l ∈ N), that is, an increment followed by four decrements.(In particular, we find exactly the patterns for l = n i + m i + 1.)This suffices to derive k, n 1 , . . ., n k since then the number of occurrences (♪) is k − 1, and the n i 's are a function of the length of the blocks; see also Example 7.4 below.This shows that n = m implies that ¬(BT (Y n ) = ∃ BT (Y m )), and hence we conclude Y n = β Y m by atomic version of Corollary 4.12, see Theorem 7.2.
For the sequences ( * ) n i ,m i where n i > 0, notice that ( * ) n i ,m i starts with the positions 1 n i +m i +1 , 1 n i +m i +2 , 1 n i +m i +1 , 1 n i +m i , 1 n i +m i −1 , a subsequence of the form (♪); this is the only occurrence of four consecutive decrements in ( * ) n i ,m i .For sequences ( * ) n i ,m i with n i = 0, we have i < k (since n k = 0), and ( * ) n i ,m i is of the form 1 m i +1 , 1 m i +2 , 1 m i +1 , 1 m i .This combined with the first element m i − 1 = m i+1 + n i+1 + 1 of ( * ) n i+1 ,m i+1 is an occurrence of the form (♪). Finally, we need to check that there are no other occurrences of (♪) in ( * ) .Note that other occurrences of four consecutive decrements can only occur as overlaps between ( * ) n i ,m i and ( * ) n i+1 ,m i+1 .Each of the sequences ( * ) n i+1 ,m i+1 starts with an increment 1 n i+1 +m i+1 +1 , 1 n i+1 +m i+1 +2 , thus only the first element can overlap.For n i = 0, we have already analyzed the overlap, and for n i > 1, only the last three elements of ( * ) n i ,m i are not decreasing.This concludes the proof.

Clocked Lévy-Longo and Berarducci Trees
In fact, there are three main semantics for the λ-calculus: BT, LLT, and BeT; see [1,6,8,18,5].In the Böhm Tree semantics, a term is meaningful only if it has a hnf.The Lévy-Longo semantics weakens this condition to whnf's, and thereby allows more terms to be distinguished.The Berarducci Tree semantics is a further weakening where only root-active terms are discarded as meaningless.
The notions from the Sections 4 and 7 generalize directly to LLT and BeT semantics.We only treat the non-atomic versions here.Thus, in LLT (M ) every λ requires one head reduction step whereas in LLT (N ) every second λ is obtained for 'free' (that is, in 0 steps).
We remark that M and N cannot be distinguished in the Böhm Tree semantics since BT (M ) ≡ BT (N ) ≡ ⊥.

Concluding Remarks
We conclude with an encompassing conjecture, and some further research questions.
Conjecture.Building fpc's with fpc-generating vectors is a free construction, that is, there are no non-trivial identifications.
A first step is found in Intrigila's theorem Y δ = β Y , for any fpc Y .A second step is that the Böhm sequence is duplicate-free.A third step is found in our proof that the Scott sequence is duplicate-free, and Proposition 7.3, which states that there are no identifications when starting the construction with Y 0 .
Other parts of the conjecture are as follows.Let Y, Y ′ be fpc's and B 1 . . .B n , C 1 . . .C k be fpc-generating vectors. (1) For general fpc's Y , Y ′ these conjectures may be beyond current techniques, but for the wellknown fpc's of Curry and Turing, and the fpc-generating vectors introduced here, including their versions for n > 3, these problems are tractable.
Other directions of research could be (1) For atomic clock Böhm Trees (Section 7) we have recorded the positions of head reduction steps building up the head normal form.What about a generalization to other spine reduction strategies [3]?Would this give rise to a stronger discrimination method?(2) The notion of simple terms could be refined by focusing on an infinite path in the clocked Böhm Trees.Then duplication of redexes may be allowed along other paths, thereby making the method applicable to a larger class of terms.(3) What general condition on a given term's head reduction is sufficient to ensure that it possesses a 'minimal clock' ?(4) Is it possible to characterize fully cyclic terms using a coinductive version of simple type theory?
(5) Can the notion of a clock itself be given a type-theoretic interpretation?(6) Can the clocks method be used to give a quantitative measure for optimization of functional programs?(7) Is it possible, using the clocks method, to extend Intrigila's result [16], and prove that there is no fixed point combinator Y and no n ∈ N such that Y = β Y δ ∼n ?This is an instance of the conjecture above.(8) Also interesting is to systematically study all solutions of equations M x = x(M x) (we might call them vector-fpc's) where it is understood that x = x 1 . . .x n associates to the right when it occurs at an active position xM = x 1 (x 2 (. . .(x n M ) . ..)), and to the left if it occurs in a passive position M x = M x 1 x 2 . . .x n .Can these solutions M be discriminated by the methods presented here?Notice that the terms M lead to fpc's; for example M I ∼n−1 is an fpc (see Section 3.3), or more generally, M N with N = N 1 . . .N n−1 is an fpc when N x ։ β x. (9) Another interesting notion is that of prime fpc's, that is, fpc's Y not of the form Y = Y ′ P where Y ′ is an fpc.In λ-calculus no prime fpc's exist, due to Y = β Y (KY ), but in the λI-calculus the notion is non-trivial.

Figure 1 :
Figure 1: Comparison of (atomic) clock semantics and unclocked semantics.Higher means more identifications.

Definition 3 . 1 .
The Böhm sequence is the sequence (Y n ) n≥0 where Y n is defined by

Figure 2 :
Figure 2: Head reduction of Y 3 x.

Proposition 3 . 5 .
BY 0 = β BY 0 S Proof.Postfixing the combinator I yields BY 0 I and BY 0 SI.Now BY 0 I = β Y 0 and BY 0

Remark 3. 6 . ( 1 )
The idea of postfixing an I is suggested by the Böhm Tree λab.(ab) ω of BY and BY S. Namely, in λ ∞ β we calculate: (λab.(ab)ω )I = λb.(Ib)ω = λb.bω which is the Böhm Tree of any fpc.(2) Interestingly, Scott's equation BY = BY S implies the equation of Statman and Intrigila, Y = Y δ as one readily verifies, as in the proof of Proposition 3.5.

Figure 3 :
Figure 3: Clocked Böhm Trees of Y 0 f and Y 1 f .

Proposition 4 . 5 .
Clocks are accelerated under reduction, that is, if M ։N , then the reduct N improves M globally (BT (M ) ≥ BT (N )).Dually, clocks slow down under expansion (the reverse of reduction).

i
and by coinduction (or induction on the depth), we obtain BT (M ) ≥ BT (N ).While BT (M ) ≡ BT (N ) does not imply M = β N , the following theorem allows us to use clocked Böhm Trees for discriminating λ-terms: Theorem 4.6.Let M and N be λ-terms.If N cannot be improved globally by any reduct of M , then M = β N .Proof.If M = β N , then M ։ M ′ և N for some M ′ by confluence.Hence BT (M ′ ) ≤ BT (N ) by Proposition 4.5.

Definition 4 . 7 .
A redex (λx.M )N is called: (1) linear if x has at most one occurrence in M ; (2) call-by-value if N is a normal form; and (3) simple if it is linear or call-by-value.The definition of simple redexes generalizes the well-known notions of call-by-value and linear redexes.Next, we define simple terms.Intuitively, we call a term M 'simple' if every reduction admitted by M only contracts simple redexes.The following definition further generalizes this intuition by considering only reductions computing the Böhm Tree.

Figure 5 :
Figure 5: Elementary diagrams for simple M .

Convention 4 . 10 .
The (minimal) clock of a λ-term M with a simple reduct N is BT (N ), the clocked BT of N .For simple terms we obtain the following theorem: Theorem 4.11.Let M and N be λ-terms such that M is simple.If M does not improve eventually on N , then M = β N .Proof.Assume M = β N .Then M ։ M ′ և N for some M ′ .We have BT (M ) = ∃ BT (M ′ ) by Proposition 4.9, and BT (M ′ ) ≤ BT (N ) by Proposition 4.5.Hence we obtain BT (M ) ≤ ∃ BT (N ).

Theorem 4 .
11 significantly reduces the proof obligation in comparison to Theorem 4.6.

Remark 4 . 14 .
Take λ-terms M , N with finite BT's.Then the clock comparison of M and N amounts to the comparison of their non-clocked BT's.In case their BT's are equal and ⊥-free, then M = β N .If their BT's coincide but are not ⊥-free, then we can fine-tune the analysis by comparing their clocked Lévy-Longo or Berarducci Trees (a ⊥ in a BT may give rise to an infinite Berarducci Tree), see Section 8.Example 4.15.We compute the clocks of Y n x with Y n the n-th term of the Böhm sequence.The clocks of Y 0 x and Y 1 x have been computed before, see Figure3.We now compute the clock of Y n x for n ≥ 2:

5 .
An Answer to a Question of Plotkin Plotkin [22] asked: Is there a fixed point combinator Y such that A Y ≡ Y (λz.f zz) = β Y (λx.Y (λy.f xy)) ≡ B Y (5.1) or in other notation: µz.f zz = β µx.µy.f xy , with the usual definition µx.M (x) = Y (λx.M (x)).The terms A Y and B Y have the same Böhm Trees, namely the solution of T = f T T .
[0] in the clocked Böhm tree of Y ′ [x := M ].The same argument applies for Y ′′ [x := M ], and so on.Hence the second argument of every f on the leftmost spine of BT (Y ′ [x := M ]) has annotation [0], as in Figure 7, which depicts the clocked Böhm tree BT (B ′ Y ) of B ′ Y .Therefore we obtain: Lemma 5.2.Every annotation at a position of the form (12
and so A ′′′ Y | q2 is not in hnf, too.Hence the annotation of BT (A ′′′ Y ) at the position p = q2 is nonzero.The claim follows since BT (A ′′′ Y ) ≤ BT (A ′ Y ).The combination of Lemmas 5.2 and 5.5 implies that there exists no reduct of A Y that improves globally on B ′ Y .Therefore by Theorem 4.6 we obtain: Proposition 5.6.There exists no fpc Y such that Y (λz.f zz) = β Y (λx.Y (λy.f xy)).
streamSys = let x = f 0 y where f n (b:ys) = n : f (b n) ys y = f id z where f g (c:cs) = g : f (\n -> g c + n) cs z = zz 0 For a rewrite sequence σ, let σ denote the sequence of positions of the steps in σ.Note that the atomic clock Böhm Tree of Y n x is of the form BT (Y n x) = [ ( * ) ] x([ ( * ) ] x(. . .