Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work...

52
Strict Ideal Completions of the Lambda Calculus (Technical Report) Patrick Bahr IT University of Copenhagen, Denmark [email protected] May 2018 Abstract The infinitary lambda calculi pioneered by Kennaway et al. extend the basic lambda calculus by metric completion to infinite terms and re- ductions. Depending on the chosen metric, the resulting infinitary calculi exhibit different notions of strictness. To obtain infinitary normalisation and infinitary confluence properties for these calculi, Kennaway et al. extend β-reduction with infinitely many ‘-rules’, which contract mean- ingless terms directly to . Three of the resulting ohm reduction calculi have unique infinitary normal forms corresponding to B¨ ohm-like trees. In this paper we develop a corresponding theory of infinitary lambda calculi based on ideal completion instead of metric completion. We show that each of our calculi conservatively extends the corresponding metric- based calculus. Three of our calculi are infinitarily normalising and conflu- ent; their unique infinitary normal forms are exactly the B¨ ohm-like trees of the corresponding metric-based calculi. Our calculi dispense with the infinitely many -rules of the metric-based calculi. The fully non-strict calculus (called 111) consists of only β-reduction, while the other two cal- culi (called 001 and 101) require two additional rules that precisely state their strictness properties: λx.⊥→⊥ (for 001) and M →⊥ (for 001 and 101). 1 Introduction In their seminal work on infinitary lambda calculus, Kennaway et al. [11] study different infinitary variants of the lambda calculus, which are obtained by ex- tending the ordinary lambda calculus by means of metric completion. Different variants of the calculus are obtained by choosing a different metric. The ‘stan- dard’ metric on terms measures the distance between two terms depending on how deep one has to go into the term structure to distinguish two terms. For example the term xy is closer to the term xz than to the term x, because in the former case both terms are applications whereas in the latter case one term is an application and the other is a variable. The different metric spaces arise by changing the way in which we measure depth. Kennaway et al. [11] indicate this using a binary triple abc with a, b, c {0, 1}, where a = 0 indicates that we do not count lambda abstractions when 1

Transcript of Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work...

Page 1: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

Strict Ideal Completions of the Lambda Calculus

(Technical Report)

Patrick BahrIT University of Copenhagen, Denmark

[email protected]

May 2018

Abstract

The infinitary lambda calculi pioneered by Kennaway et al. extendthe basic lambda calculus by metric completion to infinite terms and re-ductions. Depending on the chosen metric, the resulting infinitary calculiexhibit different notions of strictness. To obtain infinitary normalisationand infinitary confluence properties for these calculi, Kennaway et al.extend β-reduction with infinitely many ‘⊥-rules’, which contract mean-ingless terms directly to ⊥. Three of the resulting Bohm reduction calculihave unique infinitary normal forms corresponding to Bohm-like trees.

In this paper we develop a corresponding theory of infinitary lambdacalculi based on ideal completion instead of metric completion. We showthat each of our calculi conservatively extends the corresponding metric-based calculus. Three of our calculi are infinitarily normalising and conflu-ent; their unique infinitary normal forms are exactly the Bohm-like treesof the corresponding metric-based calculi. Our calculi dispense with theinfinitely many ⊥-rules of the metric-based calculi. The fully non-strictcalculus (called 111) consists of only β-reduction, while the other two cal-culi (called 001 and 101) require two additional rules that precisely statetheir strictness properties: λx.⊥ → ⊥ (for 001) and ⊥M → ⊥ (for 001and 101).

1 Introduction

In their seminal work on infinitary lambda calculus, Kennaway et al. [11] studydifferent infinitary variants of the lambda calculus, which are obtained by ex-tending the ordinary lambda calculus by means of metric completion. Differentvariants of the calculus are obtained by choosing a different metric. The ‘stan-dard’ metric on terms measures the distance between two terms depending onhow deep one has to go into the term structure to distinguish two terms. Forexample the term x y is closer to the term x z than to the term x, because inthe former case both terms are applications whereas in the latter case one termis an application and the other is a variable.

The different metric spaces arise by changing the way in which we measuredepth. Kennaway et al. [11] indicate this using a binary triple abc with a, b, c ∈0, 1, where a = 0 indicates that we do not count lambda abstractions when

1

Page 2: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

calculating the depth, and b = 0 or c = 0 indicates that we do not count theleft or the right side of applications, respectively. More intuitively these threeparameters can be interpreted as indicating strictness. For example, a = 0indicates that lambda abstraction is strict, i.e. if M diverges, then so doesλx.M .

Since the set of infinite terms is constructed from the set of finite terms bymeans of metric completion, each calculus has a different universe of terms, aswell as a different mode of convergence, which is based on the topology inducedby the metric. For instance, from the lambda term N = (λx.x x y)(λx.x x y),we can derive the infinite reduction N → N y → N y y → . . . . In the fullynon-strict calculus, where abc = 111, this reduction converges to the infiniteterm M = . . . y y y (i.e. M satisfies M = M y). By contrast, in the calculus 101,which is strict on the left-hand side of every application, this reduction does notconverge. In fact, M is not even a valid term in the 101 calculus.

In order to deal with divergence as exemplified for the 101 calculus above,Kennaway et al. [11] extend standard β-reduction to Bohm reduction by addingrules of the form M → ⊥, for each term M that causes divergence such asthe term N in the 101 calculus. The resulting 001, 101, and 111 calculi basedon Bohm reduction have unique normal forms, which correspond to the well-known Bohm Trees [18, 5], Levy-Longo Trees [17, 16] and Berarducci Trees [6],respectively.

In this paper, we introduce infinitary lambda calculi that are based on idealcompletion instead of metric completion with the goal of directly dealing withdiverging terms without the need for additional reduction rules that contractdiverging terms immediately to ⊥. To this end, we devise for each metric of thecalculi of Kennaway et al. [11] a corresponding partial order with the followingproperty: Ideal completion of the set of finite lambda terms yields the same setof infinite lambda terms as the corresponding metric completion (Section 3). Wealso find a strong correspondence between the modes of convergence induced bythese structures: Each ideal completion yields a complete semilattice structure,which means that the limit inferior is always defined. We show that this limitinferior is a conservative extension of the limit in the corresponding metriccompletion in the sense that both modes of convergence coincide on total lambdaterms, i.e. terms without ⊥ (Section 3).

Based on these partial order structures we define infinitary lambda calculiby a straightforward instantiation of transfinite abstract reduction systems [2].We find that the ideal completion calculi form a conservative extension of themetric completion calculi of Kennaway et al. [11] (Section 4). Moreover, inanalogy to Blom [8] and Bahr [3], we find that the differences between the idealcompletion approach and the metric completion approach are compensated forby adding ⊥-rules to the metric calculi in the style of Kennaway et al. [13] (Sec-tion 5). Finally, we also show infinitary normalisation for our ideal completioncalculi and infinitary confluence for the 001, 101, and 111 calculi (Section 5).However, in order to obtain infinitary confluence for 001 and 101, we need toextend β-reduction with two additional rules that precisely capture the strict-ness properties of these calculi: λx.⊥ → ⊥ (for 001) and ⊥M → ⊥ (for 001 and101). In Section 6, we give a brief overview of related work.

We have abridged and in some cases omitted proofs in the main body of thepaper. The corresponding full proofs are collected in Appendix A.

2

Page 3: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

2 The Metric Completion

In this section, we introduce infinite lambda terms as the result of metric com-pletion of the set of finite lambda terms. Before we get started, we introducesome basic notions about transfinite sequences and lambda terms. We presumebasic familiarity with metric spaces and ordinal numbers.

A sequence over a set A of length α is a mapping from an ordinal α intoA and is written as (aι)ι<α, which indicates the mapping ι 7→ aι; the notation|(aι)ι<α| denotes the length α of (aι)ι<α. If α is a limit ordinal, then (aι)ι<α iscalled open; otherwise it is called closed. If (aι)ι<α is finite, it is also written as〈a0, . . . , aα−1〉; in particular, 〈〉 denotes the empty sequence. We write S · T forthe concatenation of two sequences S and T ; S is called a (proper) prefix of T ,denoted S ≤ T (resp. S < T ) if there is a (non-empty) sequence S′ such thatS · S′ = T . The unique prefix of a sequence S of length β ≤ |S| is denoted byS|β .

We consider lambda terms with an additional symbol ⊥; the resulting set oflambda terms Λ⊥ is inductively defined by the following grammar:

M,N ::= ⊥ | x | λx.M |MN

where x is drawn from a countably infinite set V of variable symbols. The set oftotal lambda terms Λ is the subset of lambda terms in Λ⊥ that do not contain⊥. Occurrences of a variable x in a subterm λx.M are called bound ; otheroccurrences are called free. We use the notation M [x → y] to replace all freeoccurrences of the variable x in M with the variable y. We use finite sequencesover 0, 1, 2, called positions, to point to subterms of a lambda term; we write Pfor the set of all positions. For each M ∈ Λ⊥, P(M) denotes the set of positionsof M (excluding ‘⊥’s) recursively defined as follows: P(⊥) = ∅, P(x) = 〈〉,P(M1M2) = 〈〉 ∪ 〈i〉 · p | i ∈ 1, 2 , p ∈ P(Mi), and P(λx.M) = 〈〉 ∪〈0〉 · p | p ∈ P(M).

A conflict [11] between two lambda terms M,N is a position p ∈ P(M) ∪P(N) such that: (a) if p = 〈〉, then M and N are not identical variables, notboth ⊥, not both applications, and not both abstractions; (b) if p = 〈i〉 · q andi ∈ 1, 2, then M = M1M2, N = N1N2, and q is a conflict of Mi and Ni; (c) ifp = 〈0〉 · q, then M = λx.M ′, N = λy.N ′, and q is a conflict of M ′[x→ z] andN ′[y → z], where z is a fresh variable occurring neither in M nor N . The termsM and N are said to be α-equivalent if they have no conflicts. By conventionwe identify α-equivalent terms (i.e. Λ⊥ and Λ are assumed to be quotients byα-equivalence).

Definition 2.1. Given a triple a = a0a1a2 ∈ 0, 13, called strictness signature,a position is called a-strict if it is of the form q · 〈i〉 with ai = 0; otherwise itis called a-non-strict. If a is clear from the context, we only say strict resp.non-strict.

That is, a strictness signature indicates strictness by 0 and non-strictness by1. For example, if a = 011, lambda abstraction is strict, and application is non-strict both from the left and the right. We shall see what this means shortly:Following Kennaway et al. [11], we derive, from a strictness signature a, a depth

measure |·|a, which counts the number of non-strict, non-empty prefixes of aposition. From this depth measure we then derive a corresponding metric da

on lambda terms.

3

Page 4: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

Definition 2.2. Given a strictness signature a, the a-depth of a position p,denoted |p|a, is recursively defined as |〈〉|a = 0 and |q · 〈i〉|a = |q|a + ai. Thea-distance da(M,N) between two terms M,N ∈ Λ⊥ is 0 if M and N are α-

equivalent and otherwise 2−d, where d is the least number satisfying d = |p|afor some conflict p of M and N .

Kennaway et al. [11] showed that the pair (Λ⊥,da) forms an ultrametric

space for any a. Intuitively, the consequence of the definition of these metricspaces is that sequences of terms, such as the sequence N,N y,N y y, . . . , onlyconverge if conflicts between consecutive terms are guarded by an increasingnumber of non-strict positions. In the example, conflicts between consecutiveterms are guarded by an increasing stack of applications to y. If a1 = 1, theseapplications correspond to non-strict positions, and thus the sequence converges.However, if a1 = 0, the sequence does not converge.

We turn now to the metric completion. To facilitate later definitions and toillustrate the resulting structures, we use a partial function representation in theform of lambda trees taken from Blom [8], which will serve as mediator betweenmetric completion and ideal completion.1 A lambda tree is a (possibly infinite)labelled tree where a label λ indicates abstraction and @ indicates application;labels in V indicate free variables and a label p ∈ P indicates a variable that isbound by an abstraction at position p. There is no label corresponding to ⊥,which instead is represented as a ‘hole’ in the tree. We write D(f) to denotethe domain of a partial function f , and f(p) ' g(q) to indicate that the partialfunctions f and g are either both undefined or have the same value at p and q,respectively.

Definition 2.3. A lambda tree is a partial function t : P L with L = λ,@]P ] V so that

(a) p · 〈0〉 ∈ D(t) =⇒ t(p) = λ,(b) p · 〈1〉 ∈ D(t) or p · 〈2〉 ∈ D(t) =⇒ t(p) = @, and(c) t(p) = q, where q ∈ P =⇒ q ≤ p and t(q) = λ.

As one would expect, the domain D(t) of a lambda tree t is prefix closed.The set of all lambda trees is denoted T ∞⊥ . The set of ⊥-positions in t,

denoted D⊥(t), is the smallest set that satisfies the following: (a) 〈〉 6∈ D(t)implies 〈〉 ∈ D⊥(t); (b) t(p) = λ, p · 〈0〉 6∈ D(t) implies p · 〈0〉 ∈ D⊥(t); and(c) t(p) = @, p · 〈i〉 6∈ D(t), i ∈ 1, 2 implies p · 〈i〉 ∈ D⊥(t). A lambda tree t iscalled total if D⊥(t) is empty. The set of all total lambda trees is denoted T ∞.A lambda tree t is called finite if D(t) is a finite set. The set of all finite (total)lambda trees is denoted T⊥ (respectively T ). A renaming of a lambda tree tis a lambda tree s such that there is a bijection f : V → V with the followingproperties: s(p) = t(p) if t(p) ∈ L \ V, s(p) = f(t(p)) if t(p) ∈ V, and otherwises(p) is undefined.

In order to avoid confusion, we use upper case letters M,N for lambda termsand lower case letters s, t, u for lambda trees. Below, we give a bijection fromlambda terms to finite lambda trees that should help illustrate the idea behindlambda trees. At the heart of this bijection are the following constructions basedon Blom [8]:

1In Appendix D we give a direct proof of the correspondence between metric and idealcompletion based on the meta theory of Majster-Cederbaum and Baier [19].

4

Page 5: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

Definition 2.4. Given lambda trees t, t1, t2 ∈ T ∞⊥ and a variable x ∈ V, let ⊥,x, λx.t and t1 t2 be partial functions of type P L defined by their graph asfollows:

⊥ = ∅ x = (〈〉, x)λx.t = (〈〉, λ) ∪ (〈0〉 · p, l) | l ∈ λ,@ ] V \ x , (p, l) ∈ t

∪ (〈0〉 · p, 〈0〉 · q) | q ∈ P, (p, q) ∈ t ∪ (〈0〉 · p, 〈〉) | (p, x) ∈ tt1 t2 = (〈〉,@) ∪ (〈i〉 · p, l) | i ∈ 1, 2 , l ∈ λ,@ ] V, (p, l) ∈ ti

∪ (〈i〉 · p, 〈i〉 · q) | i ∈ 1, 2 , q ∈ P, (p, q) ∈ ti

One can easily check that each of the above four constructions yields alambda tree, where ⊥ is the empty lambda tree, x the lambda tree consistingof a single free variable x, λx.t is a lambda abstraction over x with body t, andt1 t2 is an application of t1 to t2. The following translation of lambda terms tofinite lambda trees illustrates the use of these constructions:

Definition 2.5. Let J·K : Λ⊥ → T⊥ be defined recursively as follows:

J⊥K = ⊥ Jλx.MK = λx. JMK JxK = x JM NK = JMK JNK

One can easily check that J·K : Λ⊥ → T⊥ is indeed a bijection, which, ifrestricted to Λ, is a bijection from Λ to T . Moreover, one can show that eacht ∈ T ∞⊥ with some 〈i〉 ·p ∈ D(t) is equal to λx.t′ if i = 0 and to t1 t2 if i ∈ 1, 2,for some t′, t1, t2 ∈ T ∞⊥ . Following this observation, we define, for each t ∈ T ∞⊥and p ∈ D(t), the subtree of t at p, denoted t|p, by induction on p as follows:t|〈〉 = t, λx.t|〈0〉·p = t|p, and t1 t2|〈i〉·p = ti|p for i ∈ 1, 2. One can easily checkthat t|p is uniquely defined modulo renaming of free variables.

Definition 2.6. An infinite branch in a lambda tree t ∈ T ∞⊥ is an infinitesequence S such that each proper prefix of S is in D(t). We call a proper prefixof S a position along S.

Note that by instantiating Konig’s Lemma to lambda trees, we know that alambda tree is infinite iff it has an infinite branch.

The idea of the metric da on lambda terms is to disallow (in the ensuingmetric completion) infinite branches that have only finitely many non-strictpositions along them. The following definition makes this restriction explicit onlambda trees:

Definition 2.7. An infinite branch S of a lambda tree t is called a-bounded ifthe a-depth of all positions along S is bounded by some n < ω, i.e. |p|a < nfor all p < S. The lambda tree t is called a-unguarded if it has an a-boundedinfinite branch S. Otherwise, t is called a-guarded. The set of all a-guarded(total) lambda trees is denoted T a⊥ (respectively T a). In particular, T 000

⊥ = T⊥and T 111

⊥ = T ∞⊥ .

For example, the lambda tree s with s = s y is 101-unguarded while t witht = λy.t y is 101-guarded as each application is guarded by an abstraction (whichis non-strict).

For each strictness signature a, we give a metric daT on lambda trees thatcorresponds to the metric da on lambda terms.

Definition 2.8. For each two lambda trees s, t ∈ T ∞⊥ , define daT (s, t) = 0 if

s = t and otherwise daT (s, t) = 2−d, where d is the least |p|a with s(p) 6' t(p).

5

Page 6: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

From the characterisation of the metric completion of (Λ⊥,da) from Kenn-

away et al. [11, Lemma 7] we know that the metric space of a-guarded lambdatrees (T a⊥ ,daT ) is indeed the metric completion of (Λ⊥,d

a) with the isomet-ric embedding J·K : Λ⊥ → T⊥ (cf. Appendix D for a more formal treatment).Analogously, (T a,daT ) is the metric completion of (Λ,da).

3 The Ideal Completion

In this section, we present an alternative to the metric completion from Section 2that is based on a family of partial orders on lambda terms indexed by strictnesssignatures. In the following we assume basic familiarity with order theory.

Definition 3.1. Given a strictness signature a, the partial order ≤a⊥ is the leasttransitive, reflexive order on Λ⊥ satisfying the following for all M,M ′, N,N ′ ∈Λ⊥ and x ∈ V:

(a) ⊥ ≤a⊥ M(b) λx.M ≤a⊥ λx.M ′ if M ≤a⊥ M ′ and M 6= ⊥ or a0 = 1

(c) MN ≤a⊥ M ′N if M ≤a⊥ M ′ and M 6= ⊥ or a1 = 1

(d) MN ≤a⊥ MN ′ if N ≤a⊥ N ′ and N 6= ⊥ or a2 = 1

For the case that a = 111, we obtain the partial order ≤⊥ that is typicallyused for ideal completions. This order is fully monotone, i.e. M ≤⊥ M ′ impliesλx.M ≤⊥ λx.M ′, MN ≤⊥ M ′N and NM ≤⊥ NM ′. By contrast, ≤a⊥ restrictsmonotonicity of abstraction in case a0 = 0 and of application in case a1 = 0or a2 = 0. Intuitively, we have M ≤a⊥ N iff N can be obtained from M byreplacing occurrences of ⊥ in M at non-strict positions with arbitrary terms.For example, if a = 001, then neither λx.⊥ ≤a⊥ λx.x x nor λx.⊥x ≤a⊥ λx.x x;but we do have that λx.x⊥ ≤a⊥ λx.x x.

With this intuition in mind, we translate ≤a⊥ to a corresponding order Ea⊥on lambda trees as follows:

Definition 3.2. Given lambda trees s, t ∈ T ∞⊥ , we have s Ea⊥ t if

(a) D(s) ⊆ D(t),(b) s(p) = t(p) for all p ∈ D(s), and(c) p ∈ D(s) =⇒ p · 〈i〉 ∈ D(s) for all a-strict positions p · 〈i〉 ∈ D(t).

Conditions (a) and (b) alone would give us the corresponding order for thestandard partial order ≤⊥. Condition (c) ensures that the partial order Ea⊥ maynot fill a hole in a strict position in the left-hand side tree.

One can check that (T ∞⊥ ,Ea⊥) forms a partially ordered set. Moreover, wehave the following correspondence between the two families of orders ≤a⊥ andEa⊥:

Proposition 3.3. J·K : (Λ⊥,≤a⊥)→ (T⊥,Ea⊥) is an order isomorphism.

For the remainder of this section, we turn our focus to the partial ordersEa⊥ on lambda trees. In particular, we show that (T a⊥ ,Ea⊥) forms a completesemilattice and that it is (order isomorphic to) the ideal completion of (Λ⊥,≤a⊥).A complete semilattice is a partially ordered set (A,≤) that is a complete partialorder (cpo) and that has a greatest lower bound (glb)

dB for every non-empty

6

Page 7: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

set B ⊆ A.2 A partially ordered set (A,≤) is a cpo if it has a least element, andeach directed set D in (A,≤) has a least upper bound (lub)

⊔D; a set D ⊆ A is

called directed if for each two a, b ∈ D there is some c ∈ D with a, b ≤ c.In particular, for any sequence (aι)ι<α in a complete semilattice, its limit

inferior, defined by lim infι→α aι =⊔β<α

(dβ≤ι<α aι

), exists. While the metric

completion lambda calculi are based on the limit of the underlying metric space,our ideal completion lambda calculi are based on the limit inferior.

To show that (T a⊥ ,Ea⊥) forms a complete semilattice structure, we constructthe appropriate lubs and glbs:

Theorem 3.4 (cpo (T a⊥ ,Ea⊥)). The partially ordered set (T a⊥ ,Ea⊥) forms a com-plete partial order. In particular, the lub t of a directed set D satisfies thefollowing:

D(t) =⋃s∈D D(s) s(p) = t(p) for all s ∈ D, p ∈ D(s)

Proof sketch. The lambda tree ⊥ is the least element in (T a⊥ ,Ea⊥). Constructthe lub t of D as follows: t(p) = s(p) iff there is some s ∈ D with p ∈ D(s). Onecan check that t indeed is a well-defined lambda tree that is a-guarded and isthe least upper bound of D.

Proposition 3.5 (glbs of Ea⊥). Every non-empty subset T of T a⊥ has a glbdT in (T a⊥ ,Ea⊥) such that D(

dT ) is the largest set P satisfying the following

properties:

(1) If p ∈ P , then there is some l ∈ L such that s(p) = l for all s ∈ T .

(2) If p · 〈i〉 ∈ P , then p ∈ P .

(3) If p ∈ P , ai = 0, and p · 〈i〉 ∈ D(s) for some s ∈ T , then p · 〈i〉 ∈ P .

Proof sketch. Let P ⊆ P be the largest set satisfying (1) to (3). As theseproperties are closed under union, P is well-defined. We define the partialfunction t : P L as the restriction of an arbitrary lambda tree in T to P .Using (1) and (2), one can show that t is indeed a well-defined a-guarded lambdatree. One can then check that t is the glb of T .

For instancedλx.x y, λx.y x is λx.⊥⊥ for 011, λx.⊥ for 110, and ⊥ for 001.

Theorem 3.6. (T a⊥ ,Ea⊥) is a complete semilattice for any a.

Proof. Follows from Theorem 3.4 and Proposition 3.5.

We conclude this section by establishing the partially ordered set (T a⊥ ,Ea⊥)as (order isomorphic to) the ideal completion of (Λ⊥,≤a⊥). Recall that, givena partially order set (A,≤), its ideal completion is an extension of the originalpartially ordered set to a cpo. A set B ⊆ A is called an ideal in (A,≤) if it isdirected and downward-closed, where the latter means that for all a ∈ A, b ∈ Bwith a ≤ b, we have that a ∈ B. The ideal completion of (A,≤), is the partiallyordered set (I,⊆), where I is the set of all ideals in (A,≤) and ⊆ is standardset inclusion.

2Equivalently, complete semilattices are bounded complete cpos. Hence, complete semilat-tices are a generalisation of Scott domains (which in addition have to be algebraic).

7

Page 8: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

Theorem 3.7 (ideal completion). The ideal completion of (Λ⊥,≤a⊥) is orderisomorphic to (T a⊥ ,Ea⊥).

Proof sketch. By Proposition 3.3, it suffices to show that the ideal completion(I,⊆) of (T⊥,Ea⊥) is order isomorphic to (T a⊥ ,Ea⊥). To this end, we define twofunctions φ : T a⊥ → I and ψ : I → T a⊥ as follows: φ(t) =

s ∈ T⊥

∣∣ s Ea⊥ t;ψ(T ) =

⊔T . Well-definedness of φ and ψ follows from Konig’s Lemma and

Theorem 3.4, respectively. Both φ and ψ are obviously monotone and one cancheck that φ and ψ are inverses of each other. Hence, (I,⊆) is order isomorphicto (T a⊥ ,Ea⊥)

Now that we have established the connection between T a⊥ and the metriccompletion resp. the ideal completion of Λ⊥, we turn our focus to T a⊥ for therest of this paper.

The characterisation of lubs and glbs for the complete semilattice (T a⊥ ,Ea⊥)allows us to relate the corresponding notion of limit inferior with the limit inthe complete metric space (T a⊥ ,daT ) as summarised in the following theorem:

Theorem 3.8. Let (tι)ι<α be a sequence in T a⊥ .

(i) If limι→α tι = t in (T a⊥ ,daT ), then lim infι→α tι = t in (T a⊥ ,Ea⊥).

(ii) If lim infι→α tι = t in (T a⊥ ,Ea⊥) and t is total, then limι→α tι = t in(T a⊥ ,daT ).

The key to establish the correspondence above is the following characterisa-tion of the limit t of a converging sequence (tι)ι<α in (T a⊥ ,daT ):

D(t) =⋃β<α

⋂β≤ι<αD(tι), and t(p) = l ⇐⇒ ∃β < α∀β ≤ ι < α : tι(p) = l

The proof of the correspondence result makes use of a notion of truncationsimilar Arnold and Nivat’s [1] but generalised to be compatible with the Ea⊥-orderings.

From the above findings we can conclude that the limit inferior in (T a⊥ ,Ea⊥)restricted to total lambda trees coincides with the limit in (T a,daT ). In otherwords, the limit inferior is a conservative extension of the limit. In the nextsection, we transfer this result to (strong) convergence of reductions.

4 Transfinite Reductions

In this section, we study finite and transfinite reductions on lambda trees. Tothis end, we assume for the remainder of this paper a fixed strictness signaturea such that all subsequent definitions and theorems work on the same universeof lambda trees T a⊥ and its associated structures daT and Ea⊥ (unless statedotherwise). Moreover, we need a suitably general notion of reduction stepsbeyond the familiar β- and η-rules in order to accommodate Bohm reductionsin Section 5.

Definition 4.1. A rewrite system R is a binary relation on T a⊥ such that (s, t) ∈R implies that s 6= ⊥. Given s, t ∈ T a⊥ and p ∈ P, an R-reduction step froms to t at p, denoted s →R,p t, is inductively defined as follows: if (s, t) ∈ R,then s →R,〈〉 t; if t →R,p t′, then λx.t →R,〈0〉·p λx.t′, t s →R,〈1〉·p t′ s, ands t→R,〈2〉·p s t

′ for all s ∈ T a⊥ . If R or p are irrelevant or clear from the context,

8

Page 9: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

we omit them in the notation→R,p. If (t, t′) ∈ R, then t is called an R-redex. Ifs→R,p t, then s is said to have an R-redex occurrence at p. A lambda tree t iscalled an R-normal form if no R-reduction step starts from t. The prefix “R-”is dropped if R is irrelevant or clear from the context.

Example 4.2. The familiar β- and η-rules form rewrite systems as follows:

=

((λx.t) s, t [x/s])∣∣ s, t ∈ T a⊥ =

(λx.t x, t)

∣∣ t ∈ T a⊥ , x 6∈ Range(t)

where substitution t [x/s] is defined as follows: for each p ∈ P we have thatt [x/s] (p) = t(p) if t(p) ∈ L \ x; t [x/s] (p) = s(p2) if p = p1 · p2, t(p1) =x, s(p2) ∈ L \ P; t [x/s] (p) = p1 · s(p2) if p = p1 · p2, t(p1) = x, s(p2) ∈ P; andt [x/s] (p) is undefined otherwise.

The resulting -reduction step relation → on lambda trees is isomorphic(via the isomorphism of Theorem 3.7) to the lifting of the ordinary finitary β-reduction step relation on lambda terms to the ideal completion via the liftingoperator [·〉 of Blom [7]. An analogous correspondence can be shown for aswell.

Definition 4.3. A sequence S = (tι →R,pι tι+1)ι<α of R-reduction steps iscalled an R-reduction; S is called total if each tι is total. If S is finite, we alsowrite S : t0 →∗R tα.

The above notion of reductions is too general as it does not relate lambdatrees tβ at a limit ordinal index β to the lambda trees (tι)ι<β that precede it.This shortcoming is addressed with a suitable notion of convergence and conti-nuity. In the literature on infinitary rewriting one finds two different variants ofconvergence/continuity: a weak variant, which defines convergence/continuityonly according to the underlying structure (metric limit or limit inferior), anda strong variant, which also takes the position of contracted redexes into con-sideration. While both the metric and the partial order lend themselves toeither variant, we only consider the strong variant here and refer the reader toAppendix C for the weak variant.

We use the name m-convergence and p-convergence to distinguish betweenthe metric- and the partial order-based notion of convergence, respectively. Ournotion of (strong) m-convergence is the same notion of convergence that Kenn-away et al. [11] used for their infinitary lambda calculi. For our notion of (strong)p-convergence we instantiate the abstract notion of strong p-convergence fromour previous work [2]. The key ingredient of p-convergence is the notion ofreduction context, which assigns to each reduction step s → t a lambda tree cwith c Ea⊥ s, t. Intuitively, this reduction context c comprises the (maximal)fragment of s that cannot be changed by the reduction step, regardless of thereduction rule. For instance, the reduction context of λx.(λy.y) x → λx.x isλx.⊥ if a0 = 1, and ⊥ otherwise. The notion of p-convergence is defined usingthe limit inferior of the sequence of reduction contexts (instead of the originallambda trees themselves). The canonical approach to derive such a reductioncontext for any complete semilattice is to take the greatest lower bound of theinvolved lambda trees s and t that does not contain any position of the redex:

Definition 4.4. The reduction context of a reduction step s→p t is the greatestlambda tree c in (T a⊥ ,Ea⊥) with c Ea⊥ s, t and p 6∈ D(c); we write s →c t toindicate the reduction context c.

9

Page 10: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

In order to simplify reasoning and provide an intuitive understanding of theconcept, we give a direct construction of reduction contexts as well:

Definition 4.5. Given t ∈ T ∞⊥ and p ∈ D(t), we write t \ p for the restrictionof t to the domain q ∈ D(t) | p 6≤ q , and p↓a for the longest non-strict prefixof p.

That is, t \ p is obtained from t by replacing the subtree at p with ⊥. More-over, ↓a can be characterised as follows: 〈〉↓a = 〈〉; (p · 〈i〉)↓a = p · 〈i〉 if ai = 1;and (p · 〈i〉)↓a = p↓a if ai = 0.

Lemma 4.6. The reduction context of s→p t is equal to s \ p↓a and t \ p↓a.

Proof sketch. By a straightforward induction on p.

That is, the reduction context of s→p t is obtained from s by removing themost deeply nested subtree that both contains the redex and is in a non-strictposition. The ensuing notions of strong convergence of reductions are spelledout as follows:

Definition 4.7. An R-reduction S = (tι →pι,cι tι+1)ι<α m-converges to tα,

denoted S : t0 m R tα, if limι→γ tι = tγ and (|pι|a)ι<γ tends to infinity for all limitordinals γ ≤ α. S p-converges to tα, denoted S : t0 p R tα, if lim infι→γ cι = tγfor all limit ordinals γ ≤ α. S is called m-continuous resp. p-continuous if thecorresponding convergence conditions hold for limit ordinals γ < α (instead ofγ ≤ α).

Intuitively, strong convergence under-approximates convergence in the un-derlying structure (i.e. weak convergence) by assuming that every contractionchanges the root symbol of the redex. Thus, given a reduction step s →p t,strong convergence assumes that the shortest position at which s and t differ isp.

The semilattice structure underlying p-convergence ensures that every p-continuous reduction also p-converges, whereas m-convergence does not neces-sarily follow from m-continuity:

Example 4.8. Given Ω = (λx.x x)(λx.x x) and t = (λx.xΩ) y, we consider the -reduction S : t→ t→ . . . that repeatedly contracts the redex Ω in t. S is triviallym- and p-continuous. However, it is not m-convergent, since contraction takesplace at a constant a-depth, namely |〈1, 0, 2〉|a. But it p-converges to t\〈1, 0, 2〉↓a,which is also the reduction context of each reduction step in S and is equal to(λx.x⊥) y if a2 = 1, to (λx.⊥) y if a2 = 0 but a0 = 1, to ⊥ y if a = 010, and to⊥ if a = 000.

Similarly to the correspondence between the limit and the limit inferior inTheorem 3.8, we find a correspondence between p- and m-convergence.

Proposition 4.9. For each reduction S : sm t, we also have that S : sp t.

Proof sketch. Let S = (tι →pι,cι tι+1)ι<α. If S m-converges, then (|pι|a)ι<γtends to infinity for all limit ordinals γ < α, i.e. for each d < ω we havethat |pι|a ≥ d after some δ < γ. With the help of Lemma 4.6, one can showthat the latter implies that tι and cι coincide up to a-depth d for all δ ≤ ι <γ. Consequently, limι→γ tι = limι→γ cι, which, by Theorem 3.8 (i), implieslimι→γ tι = lim infι→γ cι. Since this holds for all limit ordinals γ ≤ α, we knowthat S also p-converges to t.

10

Page 11: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

With the proposition above, we derive the other direction of the correspon-dence:

Proposition 4.10. S : sp t implies S : sm t whenever S and t are total.

Proof sketch. One can show that the totality of S and t implies that the a-depth of contracted redexes in each open prefix of S tends to infinity. UsingProposition 5.5 from [2], we can show that the latter implies that S also m-converges. Then according to Proposition 4.9, S must m-converge to the samelambda tree t.

Note that it is not sufficient that the two trees s and t are total. For example,the -reduction S : (λx.y) Ω p (λx.y)⊥ → y p-converges to y but does not m-converge.

Putting Propositions 4.9 and 4.10 together we obtain that p-convergence isa conservative extension of m-convergence:

Corollary 4.11. S : sm t iff S : sp t whenever S and t are total.

5 Beta Reduction

So far we have only studied the properties of p-convergence independent ofthe rewrite system. In this section, we specifically study -reduction and showinfinitary normalisation for all of our calculi, and infinitary confluence for threeof them. However, considering pure -reduction, infinitary confluence only holdsfor the 111 calculus. We can construct counterexamples for the other calculi:

Example 5.1 ([11]). Given a2 = 0 and t = (λx.y) Ω, we find reductions t p

⊥ and t → y. Given a2 = 1, a1 = 0, and t = (λx.x y) Ω, we have t p

(λx.x y)⊥ → ⊥ y and t → Ω y p ⊥. Similarly, given a2 = 1, a0 = 0, andt = (λx.λy.x) Ω, we have tp (λx.λy.x)⊥ → λy.⊥ and t→ λy.Ωp ⊥.

Infinitary confluence of pure -reduction fails for all m-convergence calculi ofKennaway et al.[11] – including the 111 calculus. On the other hand, the Bohmreduction calculi of Kennaway et al. [13], which extend pure -reduction withinfinitely many rules of the form t→ ⊥, do satisfy infinitary confluence for the001, 101, and 111 calculi.

We would like to obtain similar confluence results for the 001, 101, and 111p-convergence calculi. However, the gap we have to bridge to achieve infinitaryconfluence is much narrower in our p-convergence calculi. Intuitively, confluencefails for 001 and 101 because p-convergence only captures partiality that is dueto infinite reductions, but not partiality that can propagate via finite reductions:For example, in the 101 calculus we have Ω y p ⊥ but ⊥ y 6p ⊥. In order toobtain the desired confluence properties, we have to add the rules λx.⊥ → ⊥(for 001) and ⊥ t→ ⊥ (for 001 and 101). More generally we define these S-rulesformally as follows:

S =

(t1 t2,⊥)∣∣ t1, t2 ∈ T a⊥ , ti = ⊥, ai = 0

∪ (λx.⊥,⊥)) | a0 = 0

We use the notation S to denote ∪ S. Abusing notation, we also write (S)to refer to or S, e.g. if a property holds for either system. Note that for the111 calculus, S = .

11

Page 12: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

In addition, we continue studying the relation between m-convergence andp-convergence: In general, they are subtly different, but we show that a p-converging (S)-reduction can be adequately simulated by an m-converging B-reduction and vice versa, where B is an extension of , called Bohm rewritesystem, which additionally contains rules of the form t→ ⊥. This result uses thesame construction used by Kennaway et al. [13] to study so-called meaninglessterms.

In the remainder of this section we first characterise the set of lambda treesthat p-converge to ⊥ (Section 5.1); we then establish a correspondence betweenpure p-convergence and m-convergence extended with rules t → ⊥ for lambdatrees t that p-converge to ⊥ (Section 5.2); and finally we prove infinitary con-fluence and normalisation for p-convergent S-reductions in the 001, 101, and111 calculi (Section 5.3). For the infinitary confluence result, we make use ofthe correspondence between p-convergence and m-convergence.

5.1 Partiality

We begin with the characterisation of lambda trees that p-converge to ⊥:

Definition 5.2. Given an open reduction S = (tι →pι tι+1)ι<α, a positionp is called volatile in S if, for each β < α, there is some β ≤ γ < α withpγ↓a ≤ p ≤ pγ . If p is volatile in S but no proper prefix of p is, then p is calledoutermost-volatile in S.

For instance, in the -reduction in Example 4.8, 〈1, 0, 2〉 is volatile and〈1, 0, 2〉↓a is outermost-volatile. Note that outermost-volatile positions mustbe non-strict, because if p is volatile, then so is p↓a.

The presence of volatile positions characterises partiality in p-convergentreductions, which by Corollary 4.11 can be stated as follows:

Proposition 5.3. S : sm t iff no prefix of S has volatile positions and S : sp t.

Proof sketch. Let S = (tι →pι tι+1)ι<α. The “only if” direction follows from

Proposition 4.9 and the fact that if (|pι|a)ι<β tends to infinity, then S|β has novolatile positions. For the “if” direction, the infinite pigeonhole principle yieldsthat (|pι|a)ι<β tends to infinity. Using this fact, one can show that S : sm t.

More specifically, outermost-volatile positions pinpoint the exact location ofpartiality in the result of a p-converging reduction.

Lemma 5.4. If p is outermost-volatile in S : sp t, then p ∈ D⊥(t).

Proof sketch. Let S = (tι →pι,cι tι+1)ι<α. Since p is volatile in S, we find foreach β < α some β ≤ ι < α with pι↓a ≤ p. Hence, by Lemma 4.6, we know thatp 6∈ D(cι). Consequently, by Theorem 3.4 and Proposition 3.5, we have thatp 6∈ D(t). If p = 〈〉, then p ∈ D⊥(t) follows immediately. If p = q · 〈0〉, thenone can use the fact that no prefix of q is volatile to show that t(q) = λ, whichmeans that p ∈ D⊥(t). The argument for the cases p = q · 〈1〉 and p = q · 〈2〉 isanalogous.

This characterisation of partiality in terms of volatile positions motivatesthe following notions of destructiveness and fragility:

12

Page 13: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

Definition 5.5. A reduction S is called destructive if it is p-continuous and 〈〉is volatile in S. A lambda tree t ∈ T a⊥ is called fragile if there is a destructive-reduction starting from t. The set of all fragile total lambda trees is denotedFa.

Note that fragility is defined in terms of destructive -reductions. However,one can show that a destructive -reduction exists iff a destructive S-reductionexists.

The following proposition explains why destructive reductions have deservedtheir name:

Proposition 5.6. An open reduction is destructive iff it p-converges to ⊥.

Proof sketch. The “only if” direction follows from Lemma 5.4; the conversedirection can be shown using the characterisation of the limit inferior (Theo-rem 3.4, Proposition 3.5).

For example, the -reduction Ω→ Ω→ . . . (cf. Example 4.8) p-converges to⊥ and is thus destructive. As a corollary from the above proposition, we obtainthat every fragile lambda tree – such as Ω – can be contracted to ⊥ by an openp-convergent reduction.

5.2 Correspondence

To compare m- and p-converging reductions, we employ Bohm rewrite systemsand the underlying notion of ⊥-instantiation from Kennaway et al.’s work onmeaningless terms [13].

Definition 5.7. Let U ⊆ T ∞ and t ∈ T ∞⊥ . A lambda tree s ∈ T ∞ is called a⊥-instance of t w.r.t. U if s is obtained from t by inserting elements of U into tat each position p ∈ D⊥(t), i.e. s(p) = t(p) for all p ∈ D(t) and s|p ∈ U for allp ∈ D⊥(t). The set of lambda trees that have a ⊥-instance w.r.t. U that is inU itself is denoted U⊥. In other words, t ∈ U⊥ iff there is a lambda tree s ∈ Usuch that s is obtained from t by replacing occurrences of ⊥ in t by lambdatrees from U .

In particular, we will use the above construction with the set of fragile totallambda trees Fa, which gives us the set Fa⊥.

Finally, we give the construction of Bohm rewrite systems.

Definition 5.8. For each set U ⊆ T a, we define the following two rewritesystems:

á(U) = (t,⊥) | t ∈ U⊥ \ ⊥ , B (U) = ∪ á(U)

If U is clear from the context, we instead use the notation á and B, respectively.

In particular, we consider the Bohm rewrite system w.r.t. fragile total lambdatrees, denoted by B

(Fa). We start with one direction of the correspondence

between p-converging (S)-reductions and m-converging B(Fa)-reductions:

Theorem 5.9. If sp S t, then sm B t, where B = B(Fa).

13

Page 14: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

Proof sketch. Given S : sp S t, we construct a B-reduction T from S that alsop-converges to t but that has no volatile positions in any of its open prefixes.Thus, according to Proposition 5.3, T : sm B t. The construction of T removessteps in S that take place at or below any outermost-volatile position of someprefix of S and replaces them by a single á-step. Such a á-step can be per-formed since a fragile lambda tree must be responsible for an outermost-volatileposition. Moreover, S-steps in S are á-steps in T since S ⊆ á

(Fa). Lemma 5.4

can then be used to show that the resulting B-reduction T p-converges to t.

The converse direction of Theorem 5.9 does not hold in general. The problemis that á-steps can be more selective in which fragile lambda subtree to contractto ⊥ compared to p-convergent reductions with volatile positions. If p is avolatile position, then so is p↓a. Consequently, volatile positions and thus ‘⊥’sin the result of a p-converging reduction are propagated upwards through strictpositions. For example, let a0 = 0, and t = λy.Ω. Since Ω is fragile, we havethe reduction t →á λy.⊥. On the other hand, via p-convergent -reductions, tonly reduces to itself and ⊥. This phenomenon, however, does not occur if werestrict ourselves to the strictness signature 111 or if we only consider á-normalforms. Indeed, in the above example, λy.⊥ is not a á-normal form and can becontracted to ⊥ with a á-step.

Theorem 5.10. Let B = B(Fa)

and sm B t such that s is total. Then sp tif a = 111 or t is a á-normal form.

Proof sketch. The reduction s m B t can be factored into S : s m s′ andT : s′ m á t (by the same proof as Lemma 27 of Kennaway et al. [13]). Moreover,we may assume w.l.o.g. that T contracts disjoint á-redexes in s′ (using an argu-ment similar to Lemma 7.2.4 of Ketema [14]). By Proposition 4.9, we have thatS : sp s

′ and that T : s′ p á t. For each step u→á,p v in T we find a reductionTp : up v

′ in which p is volatile since u|p must be fragile. Given that a = 111or that t is a á-normal form, we can show that p is in fact outermost-volatilein Tp. Hence, the equality v = v′ follows from Lemma 5.4. Therefore, we mayreplace each step u→á,p v in T by Tp, which yields a reduction s′ p t.

That is, in general we get one direction of the correspondence – namelyfrom metric to partial order reduction – only for reductions to normal forms.However, this does not matter that much as p-converging (S)-reductions (anthus also m-converging B

(Fa)-reductions) are normalising as we show below.

5.3 Infinitary Normalisation and Confluence

We begin by recalling the notion of active lambda trees [13], which we useto establish infinitary normalisation and as an alternative characterisation offragile lambda trees (in the 001, 101, and 111 calculi).

Definition 5.11. A lambda tree t is called stable if no lambda tree t′ witht →∗ t′ has a -redex occurrence at a-depth 0; t is called active if no lambdatree t′ with t→∗ t′ is stable. The set of all active total lambda trees is denoted

by Aa.

To construct normalising p-convergent reductions, we follow the idea of Ken-naway et al. [13]: We contract all subtrees of the initial lambda tree into stable

14

Page 15: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

form. The only way to achieve this for active subtrees is to annihilate them bya destructive reduction. The basis for that strategy is the following observation:

Lemma 5.12. Every active lambda tree is fragile.

Proof. If t0 is active, we find a reduction t0 →∗ t′0 to a -redex at a-depth 0. Bycontracting this redex we get a lambda tree t1 that is active, too. By repeatingthis argument we obtain a destructive reduction t0 →∗ t′0 → t1 →∗ t′1 →

. . . .

The following normalisation result then follows straightforwardly:

Theorem 5.13. For each s ∈ T a⊥ , there is a normalising reduction sp (S) t.

Proof sketch. Similar to Theorem 1 of Kennaway et al. [13]: an active subtree atposition p is by Lemma 5.12 also fragile. Hence, there is a -reduction in whicha prefix of p is outermost-volatile. By Lemma 5.4, such a reduction annihilatesthe active subtree at p. This yields a reduction sp t to -normal form t, whichcan be extended by a reduction tp S u to a S-normal form u.

From the above we immediately obtain the corresponding result for m-convergence:

Theorem 5.14. For each s ∈ T a⊥ there is a normalising reduction sm B(Fa) t.

Proof. By Theorem 5.13 and 5.9, as S-normal forms are also B(Fa)-normal

forms.

Consequently, we can derive the following correspondence result.

Corollary 5.15. For each s ∈ T a with sm B(Fa) t, there is a reduction tm B(Fa)t′ such that sp t

′.

Proof. According to Theorem 5.14, there is a normalising reduction tm B(Fa) t′.

Then a reduction sp t′ exists by Theorem 5.10.

A shortcoming of this correspondence property and the correspondence prop-erties established in Section 5.2 is that they consider m-convergence in the sys-tem B

(Fa), which is unsatisfactory since Fa is defined using p-convergence. A

more appropriate choice would be the set Aa of active terms, which is definedin terms of finitary reduction only. To obtain a correspondence in terms of Aa,we will show that Fa = Aa for strictness signatures 001, 101, and 111. To provethis equality of fragility and activeness, we need the following key lemma, whichcan be proved using descendants and complete developments (cf. Appendix B).

Lemma 5.16 (Infinitary Strip Lemma). Given S : s p S t1 and T : s →∗S t2,there are reductions S′ : t1 p S t and T ′ : t2 p S t, provided a ∈ 001, 101, 111.

Recall that S = for a = 111, i.e. the infinitary strip lemma holds forpure -reduction in the 111 calculus; but it does not hold for 001 and 101as Example 5.1 demonstrates. Hence, the need for S-rules. By contrast, inthe metric calculi of Kennaway et al. [11] the infinitary strip lemma does nothold for any a. In order to obtain the infinitary strip lemma and confluence,Kennaway et al. extended β-reduction to Bohm reduction.

We use the Infinitary Strip Lemma to show that p-convergent reductions to⊥ can be compressed to length at most ω.

15

Page 16: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

Lemma 5.17. If a ∈ 001, 101, 111 and S : tp S ⊥, then there is a reductionT : tp S ⊥ of length ≤ ω. If t is total, then T is a -reduction of length ω.

Proof sketch. If |S| ≤ ω, we are done. Otherwise, we can construct a finitereduction t →∗S t′ with at least one contraction at a-depth 0 either using afinite approximation property of p-convergence (in case S contracts -redex ata-depth 0) or by an induction argument (in case S contracts S-redex at rootposition). By Lemma 5.16, there is a reduction S′ : t′ p S ⊥. Thus, we canrepeat the argument for S′. Iterating this argument yields either a reductiont →∗S ⊥ or a reduction t p S s

′ of length ω with infinitely many contractionsat a-depth 0, and thus s′ = ⊥. If s is total, then T cannot be finite, as finiteS-reductions preserve totality. Hence, no step in T can be an S-step.

Lemma 5.18. If a ∈ 001, 101, 111, a total lambda tree is active iff it is fragile.

Proof. The “only if” direction follows from Lemma 5.12. For the converse di-rection let t be total and fragile, and let t →∗ t1. Since t is fragile, there is areduction t p S ⊥ according to Proposition 5.6. Hence, by Lemma 5.16, thereis a reduction T : t1 p S ⊥, which we can assume, according to Lemma 5.17,to be a -reduction of length ω. Since T is, by Proposition 5.6, destructive,there is a proper prefix T ′ : t1 p t2 of T such that t2 has a redex occurrence ata-depth 0. Because T is of length ω, T ′ is finite i.e. T ′ : t1 →∗ t2.

The above lemma allows us to derive confluence w.r.t. p-convergent reduc-tions from the confluence results w.r.t. m-convergence of Kennaway et al. [11]:

Theorem 5.19 (infinitary confluence). Given a ∈ 001, 101, 111, we have thatsp S t1 and sp S t2 implies that t1 p S t and t2 p S t.

Proof. According to Theorem 5.13, we can extend the existing reductions bynormalising reductions t1 p S t

′1 and t2 p S t

′2. According to Theorem 5.9 and

Lemma 5.18, the resulting normalising reductions s p S t′1 and s p S t

′2 are

also m-convergent B(Aa)-reductions. Kennaway et al. [11] have shown that such

reductions are confluent. Hence, t′1 = t′2 (as S-normal forms are B(Aa)-normal

forms too).

Together with the earlier normalisation result, this means that the 001, 101,and 111 calculi have unique normal forms w.r.t. p S. By the correspondenceresults between the metric and the partial order calculi, these normal forms arethe same as the unique normal forms w.r.t. m B(Aa) [11], which in turn corre-spond to Bohm Trees, Levy-Longo Trees, and Berarducci Trees, respectively.

6 Related Work

The use of ideal completion in lambda calculus to construct infinite terms hasa long history (see e.g. Ketema [14] for an overview), in particular in the formof constructing infinite normal forms such as Bohm Trees. In that line of work,the ideal completion is typically based on the fully monotone partial order ≤⊥generated by ⊥ ≤⊥ M for any term M . Different kinds of infinite normal formsare then obtained by modulating the set of rules that are used to generate thenormal forms. In this paper, we instead modulated the partial order and we haveconstructed full infinitary calculi in the style of Kennaway et al. [11]. Blom’s

16

Page 17: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

abstract theory of infinite normal forms and infinitary rewriting based on idealcompletion [7] has been crucial for developing our infinitary calculi.

In previous work, we have compared infinitary rewriting based on partialorders vs. metric spaces in a first-order setting [3, 4]. However, in that work wehave only considered fully non-strict convergence, whereas we consider varyingmodes of strictness in the present paper.

Blom’s work [8] on preservation calculi is similar to our ideal completioncalculi. Blom also considers different calculi indexed by strictness signaturesand relates them to the corresponding metric calculi. However, he uses thesame partial order E111

⊥ for all calculi; the different calculi vary in the notionof reduction contexts they use. Blom’s reduction contexts are the same as ourreduction contexts, and his Ω-rules are more general variants of our S-rules.However, his approach of using a single partial order has some caveats:

Firstly, there is no corresponding weak notion of preservation sequencesthat corresponds to weak m-convergence. Secondly, the partially ordered set(T a⊥ ,E111

⊥ ) is only a complete semilattice for a = 111; otherwise it is not even acpo and limit inferiors do not always exist. For example, let t be an a-unguardedlambda tree (i.e. t 6∈ T a⊥), and for each i < ω let ti be the restriction of t topositions of depth < i, which means that ti ∈ T a⊥ . Then lim infi→ω ti w.r.t.E111⊥ is t itself and thus not in T a⊥ even though all ti are. This does not cause

a problem, if one only considers reduction contexts of p-continuous reductions,though.

For the comparison of his preservation calculi with the metric calculi, Blomuses a notion of 0-active terms, which is different from the notion of active termsas used here and by Kennaway et al. [11, 13] (under the names 0-activenessresp. abc-activeness). Blom defines that a lambda tree is 0-active iff there is adestructive reduction of length ω starting from it. 0-activeness is demonstrablydifferent from activeness for any strictness signature with a2 = 0 as Example 5.1shows. But 0-activeness and activeness do coincide for 001, 101, and 111 as wehave shown with the combination of Lemma 5.17 and Lemma 5.18.

References

[1] Andr Arnold and Maurice Nivat. The metric space of infinite trees. alge-braic and topological properties. Fundamenta Informaticae, 3(4):445–476,1980.

[2] Patrick Bahr. Abstract Models of Transfinite Reductions. In ChristopherLynch, editor, Proceedings of the 21st International Conference on Rewrit-ing Techniques and Applications, volume 6 of Leibniz International Pro-ceedings in Informatics (LIPIcs), pages 49–66, Dagstuhl, Germany, 2010.Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik.

[3] Patrick Bahr. Partial order infinitary term rewriting and Bhm trees. InChristopher Lynch, editor, Proceedings of the 21st International Confer-ence on Rewriting Techniques and Applications, volume 6 of Leibniz In-ternational Proceedings in Informatics (LIPIcs), pages 67–84, Dagstuhl,Germany, 2010. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik.

17

Page 18: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

[4] Patrick Bahr. Infinitary term graph rewriting is simple, sound and com-plete. In Ashish Tiwari, editor, 23rd International Conference on RewritingTechniques and Applications (RTA’12), volume 15 of Leibniz InternationalProceedings in Informatics (LIPIcs), pages 69–84, Dagstuhl, Germany, May2012. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik.

[5] Henk P Barendregt. The Lambda Calculus: Its Syntax and Semantics, vol-ume 103 of Studies in Logic and the Foundations of Mathemantics. ElsevierScience, revised edition, 1984.

[6] Alessandro Berarducci. Infinite λ-calculus and non-sensible models. InA Ursini and P Aglian, editors, Logic and algebra, number 180 in LectureNotes in Pure and Applied Mathematics, pages 339–378. CRC Press, 1996.

[7] Stefan Blom. Term Graph Rewriting–Syntax and Semantics. PhD thesis,Vrije Universiteit te Amsterdam, 2001.

[8] Stefan Blom. An approximation based approach to infinitary lambda cal-culi. In Vincent van Oostrom, editor, Rewriting Techniques and Applica-tions, volume 3091 of Lecture Notes in Computer Science, pages 221–232.Springer Berlin / Heidelberg, 2004.

[9] Jochem Bongaerts. Topological convergence in infinitary abstract rewriting.Master’s thesis, Utrecht University, 2011.

[10] Richard Kennaway and Fer-Jan de Vries. Infinitary rewriting. In Terese,editor, Term Rewriting Systems, chapter 12, pages 668–711. CambridgeUniversity Press, 1st edition, 2003.

[11] Richard Kennaway, Jan Willem Klop, M R Sleep, and Fer-Jan de Vries.Infinitary lambda calculus. Theoretical Computer Science, 175(1):93–125,1997.

[12] Richard Kennaway, Jan Willem Klop, M Ronan Sleep, and Fer-Jan de Vries.Transfinite reductions in orthogonal term rewriting systems. Informationand Computation, 119(1):18–38, 1995.

[13] Richard Kennaway, Vincent van Oostrom, and Fer-Jan de Vries. Mean-ingless terms in rewriting. Journal of Functional and Logic Programming,1999(1):1–35, February 1999.

[14] Jeroen Ketema. Bhm-Like Trees for Rewriting. PhD thesis, Vrije Univer-siteit Amsterdam, 2006.

[15] Jeroen Ketema and Jakob Grue Simonsen. Infinitary combinatory reduc-tion systems. Information and Computation, 209(6):893–926, 2011.

[16] Giuseppe Longo. Set-theoretical models of λ-calculus: theories, expansions,isomorphisms. Annals of pure and applied logic, 24(2):153–188, 1983.

[17] Jean-Jacques Lvy. An algebraic interpretation of the λβK-calculus; and anapplication of a labelled λ-calculus. Theoretical Computer Science, 2(1):97–114, 1976.

18

Page 19: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

[18] Jean-Jacques Lvy. Rductions Correctes et Optimales dans le Lambda-Calcul. PhD thesis, Universit Paris VII, January 1978.

[19] Mila E Majster-Cederbaum and Christel Baier. Metric completion versusideal completion. Theoretical Computer Science, 170(1-2):145–171, 1996.

Contents

1 Introduction 1

2 The Metric Completion 3

3 The Ideal Completion 6

4 Transfinite Reductions 8

5 Beta Reduction 115.1 Partiality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125.2 Correspondence . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135.3 Infinitary Normalisation and Confluence . . . . . . . . . . . . . . 14

6 Related Work 16

A Full Proofs 20A.1 Ideal Completion . . . . . . . . . . . . . . . . . . . . . . . . . . . 20A.2 Transfinite Reductions . . . . . . . . . . . . . . . . . . . . . . . . 27A.3 Beta Reduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

B Finitary Approximation Lemma and Infinitary Strip Lemma 35

C Weak Convergence 47

D Direct Proof of Correspondence 48

19

Page 20: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

A Full Proofs

A.1 Ideal Completion

Proposition A.1. The function J·K : Λ⊥ → T⊥ is a bijection.

Proof Proof of Proposition A.1. For injectivity assume some M,N ∈ Λ⊥ suchthat JMK = JNK. We proceed by induction on M . If M = ⊥, then also N = ⊥.Likewise, if M = x ∈ V, then N = x, too.

If M = λx.M ′, then N = λy.N ′. W.l.o.g. we may assume that x = y(otherwise we can just rename both to a fresh variable z). Hence, JM ′K = JN ′Kand thus, by induction hypothesis, M ′ = N ′. Consequently, we have thatλx.M ′ = λy.N ′.

If M = M1M2, then N = N1N2 and JMiK = JNiK. By applying the inductionhypothesis to the latter, we obtain that Mi = Ni and thus M1M2 = N1N2.

For surjectivity we assume some t ∈ T⊥ and construct by induction on thecardinality of D(t) a term M ∈ Λ⊥ with JMK = t. If D(t) = ∅, then J⊥K = t.Otherwise, we know that 〈〉 ∈ D(t). If t(〈〉) = x, then JxK = t. The caset(〈〉) ∈ P is not possible.

If t(〈〉) = λ, then construct the lambda tree s as follows:

s(p) =

x if t(〈0〉 · p) = 〈〉q if t(〈0〉 · p) = 〈0〉 · qt(〈0〉 · p) otherwise

where x is a fresh variable not occurring in the image of t. One can easily checkthat s is indeed a lambda tree. Since |D(s)| = |D(t)| − 1, we can apply theinduction hypothesis to obtain some M ∈ Λ⊥ with JMK = s. We then have thatJλx.MK = t.

If t(〈〉) = @, then construct for each i ∈ 1, 2 a lambda tree si as follows:

si(p) =

q if t(〈i〉 · p) = 〈i〉 · qt(〈i〉 · p) otherwise

One can easily check that both s1 and s2 are lambda terms. Since |D(s1)| +|D(s2)| = |t| − 1, we may use the induction hypothesis for si. Hence, we findMi ∈ Λ⊥ with JMiK = si and we can conclude that JM1M2K = t.

Before we proceed, we give the explicit proof that Ea⊥ is indeed a partialorder as this fact is needed in the proof of Proposition 3.3.

Proposition A.2. For each strictness signature a, the relation Ea⊥ is a partialorder on T ∞⊥ .

Proof. Reflexivity and antisymmetry of Ea⊥ follow immediately from the defini-tion. For transitivity, let t1 Ea⊥ t2 and t2 Ea⊥ t3. Then conditions (a) and (b) fort1 Ea⊥ t3 follow immediately. For (c), let ai = 0, p ∈ D(t1) and p · 〈i〉 ∈ D(t3).Then p ∈ D(t2) due to t1 Ea⊥ t2, which in turn implies p · 〈i〉 ∈ D(t2) due tot2 Ea⊥ t3. Hence, p · 〈i〉 ∈ D(t1) due to t1 Ea⊥ t2.

Proposition 3.3. The function J·K : Λ⊥ → T⊥ is an order isomorphism from(Λ⊥,≤a⊥) to (T⊥,Ea⊥).

20

Page 21: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

Proof Proof of Proposition 3.3. By Proposition A.1 it remains to be shown thatM ≤a⊥ N iff JMK Ea⊥ JNK for all M,N ∈ Λ⊥.

We show that the relation R defined by (M,N) ∈ R ⇐⇒ JMK Ea⊥ JNK hasthe properties given in Definition 3.1. Since ≤a⊥ is the least such relation, weobtain the “only if” direction of the equivalence. The relation R is a preordersince Ea⊥ is a preorder according to Proposition A.2.

We trivially have J⊥K Ea⊥ JMK since D(J⊥K) = ∅. If a0 = 1 or M 6= ⊥, we caneasily check that JMK Ea⊥ JNK implies Jλx.MK Ea⊥ Jλx.NK, using Definition 2.5.The same goes for the remaining two closure properties in Definition 3.1.

For the converse direction, we assume that JMK Ea⊥ JNK and show that thenM ≤a⊥ N by induction on M . If M = ⊥, we immediately have M ≤a⊥ N by (a)of Definition 3.1. If M = x, then JMK Ea⊥ JNK implies, by (b) of Definition 3.2,that N = x. By reflexivity of ≤a⊥, we thus have M ≤a⊥ N .

If M = M1M2, then JMK Ea⊥ JNK implies, by (b) of Definition 3.2, thatN is of the form N1N2. Using the definition of JMK (resp. JNK) in terms ofJM1K and JM2K (resp. JN1K and JN2K), we can derive that JMiK Ea⊥ JNiK forall i ∈ 1, 2. By induction hypothesis, we thus have that Mi ≤a⊥ Ni for alli ∈ 1, 2. Moreover, if ai = 0 for i ∈ 1, 2, then we can derive from JMK Ea⊥ JNK,using (c) of Definition 3.2, that 〈〉 ∈ JNiK implies 〈〉 ∈ JMiK. That is, Mi = ⊥implies Ni = ⊥. Consequently, we have that M1M2 ≤a⊥ N1M2 due to (c) ofDefinition 3.1 in case a1 = 1, or a1 = 0 and M1 6= ⊥. In case, a1 = 0 andM1 = ⊥, we know that also N1 = ⊥. Thus, M1M2 ≤a⊥ N1M2 follows byreflexivity. By the same argument, also N1M2 ≤a⊥ N1N2 holds, which meansthat by transitivity, we obtain that M1M2 ≤a⊥ N1N2.

If M = λx.M ′, then JMK Ea⊥ JNK implies, by (b) of Definition 3.2, thatN is of the form λy.N ′ and w.l.o.g. we may assume that y = x. By the sameargument as above, we derive from JMK Ea⊥ JNK, that JM ′K Ea⊥ JN ′K, which,by induction hypothesis, yields M ′ ≤a⊥ N ′. Likewise we obtain, in case thata0 = 0 that 〈〉 ∈ JN ′K implies 〈〉 ∈ JM ′K, which means that M ′ = ⊥ impliesN ′ = ⊥. Hence, if a0 = 0 and M ′ = ⊥, we obtain that N ′ = ⊥, which meansthat λx.M ′ ≤a⊥ λy.N ′ follows by reflexivity. Otherwise, we may apply (b) ofDefinition 3.1 to obtain λx.M ′ ≤a⊥ λy.N ′.

Theorem 3.4.For each strictness signature a, the partially ordered set (T a⊥ ,Ea⊥)forms a complete partial order. In particular, the lub t of a directed set Dsatisfies the following:

D(t) =⋃s∈DD(s) s(p) = t(p) for all s ∈ D, p ∈ D(s)

Proof Proof of Theorem 3.4. The lambda tree ⊥ is obviously the least elementin (T a⊥ ,Ea⊥). To show that (T a⊥ ,Ea⊥) is directed complete, we assume a directedset D in (T a⊥ ,Ea⊥) and construct a lambda tree t ∈ T a⊥ that is the lub of D.Define t as follows: t(p) = s(p) iff there is some s ∈ D with p ∈ D(s).

• At first we show that this indeed defines a partial function t : P L. Tothis end assume s1, s2 ∈ D and p ∈ D(s1) ∩ D(s2). Since D is directed,there is some s ∈ D with s1, s2 Ea⊥ s, which implies s1(p) = s(p) = s2(p).

• Next, we show that t is a well-defined lambda tree according to Defini-tion 2.3:

21

Page 22: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

(a) If p · 〈0〉 ∈ D(t), then p · 〈0〉 ∈ D(s) for some s ∈ D. Hence, s(p) = λand thus t(p) = λ.

(b) If p · 〈1〉 ∈ D(t) or p · 〈2〉 ∈ D(t), then p · 〈1〉 ∈ D(s) or p · 〈2〉 ∈ D(s)for some s ∈ D. Hence, s(p) = @ and thus t(p) = @.

(c) If t(p) = q ∈ P, then s(p) = q for some s ∈ D. Hence, q ≤ p ands(q) = λ, which implies t(q) = λ.

• Next, we show that t is a-guarded and thus member of T a⊥ . Assume thatt is a-unguarded, i.e. t has an a-bounded infinite branch (mi)i<ω. Thatmeans pj ∈ D(t) for all j < ω where pj = (mi)i<j and there is some n < ωsuch that ami = 0 for all n ≤ i < ω. Consequently, we find for each j < ωsome sj ∈ D such that pj ∈ D(sj). We will show by induction on j thatpj ∈ D(sn) for all j < ω. From this we can then conclude that (mi)i<ωis an a-bounded infinite branch in sn, which means that sn 6∈ T a⊥ . Thiscontradicts the assumption that D ⊆ T a⊥ , and we can thus conclude thatt is a-guarded.

The case j ≤ n is trivial since pn ∈ D(sn) and thus pj ∈ D(sn). For thecase n < j + 1 < ω, we have that pj+1 = pj · 〈mj〉 with amj = 0. Byinduction hypothesis, we have that pj ∈ D(sn) and since D is directed,we find some s ∈ D with sj+1 Ea⊥ s and sn Ea⊥ s. The former yieldsthat pj+1 ∈ D(s). According to (c) of Definition 3.2, the latter yields thatpj+1 ∈ D(sn) due to amj = 0, pj+1 ∈ D(s) and pj ∈ D(sn).

• Next, we show that t is an upper bound of D. To this end we assumesome s ∈ D and show that s Ea⊥ t:

(a) & (b) Immediate.

(c) Let ai = 0, p ∈ D(s) and p · 〈i〉 ∈ D(t). Then there is some s1 ∈ Dwith p · 〈i〉 ∈ D(s1). As D is directed, we find some s2 ∈ D withs1 Ea⊥ s2 and s Ea⊥ s2. The former yields that p · 〈i〉 ∈ D(s2), whichtogether with the latter implies that p · 〈i〉 ∈ D(s).

• Finally, we show that t is the least upper bound of D. To this end, weassume some t′ with s Ea⊥ t

′ for all s ∈ D and show that then t Ea⊥ t′.

(a) & (b) If p ∈ D(t) with t(p) = l then there is some s ∈ D with s(p) = l.Since s Ea⊥ t

′, we then obtain that t′(p) = l, too.

(c) Let ai = 0, p ∈ D(t) and p · 〈i〉 ∈ D(t′). Then there is some s ∈ Dwith p ∈ D(s), which implies p · 〈i〉 ∈ D(s) due to s Ea⊥ t′. Hence,p · 〈i〉 ∈ D(t).

Proposition 3.5.Every non-empty subset T of T a⊥ has a glbdT in (T a⊥ ,Ea⊥)

such that D(dT ) is the largest set P satisfying the following properties:

(1) If p ∈ P , then there is some l ∈ L such that s(p) = l for all s ∈ T .

(2) If p · 〈i〉 ∈ P , then p ∈ P .

(3) If p ∈ P , ai = 0, and p · 〈i〉 ∈ D(s) for some s ∈ T , then p · 〈i〉 ∈ P .

22

Page 23: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

Proof Proof of Proposition 3.5. Given a non-empty subset T of T a⊥ , we con-struct a lambda tree t ∈ T a⊥ and show that it is the glb of T .

Let P be the largest subset of P satisfying properties (1) through (3). Sincethese properties are closed under union, P is well-defined. Let s be and arbitrarylambda tree in T . We define the partial function t : P L as the restriction ofs to P . This construction is justified since P ⊆ D(s) by (1).

• At first, we show that t is a well-defined lambda tree. For all three partsbelow, we make use of the fact that P is closed under taking prefixesaccording to (2).

(a) If p · 〈0〉 ∈ P , then p · 〈0〉 ∈ D(s) by (1). Hence, t(p) = s(p) = λ.

(b) If p · 〈1〉 ∈ P or p · 〈2〉 ∈ P , then p · 〈1〉 ∈ D(s) or p · 〈2〉 ∈ P by (1).Hence, t(p) = s(p) = @.

(c) If t(p) = q ∈ P, then s(p) = q by (1). Hence, q ≤ p and t(q) = s(q) =λ.

• Next, we show that t is a-guarded and thus member of T a⊥ . To this end,we assume that t is a-unguarded. That is, t has an a-bounded infinitebranch S. By (1), each position along S is also in s, which means thatS is an infinite branch of s as well. Hence, s is a-unguarded, too. Sincethis contradicts the assumption that T ⊆ T a⊥ , we can conclude that t isa-guarded.

• Next, we show that t is a lower bound of T . To this end, we assume somes ∈ T and show that then t Ea⊥ s:

(a) Immediate consequence of the construction of t.

(b) If p ∈ P , then t(p) = s(p)(1)= s(p).

(c) Immediate consequence of (3).

• Finally, we show that t is the greatest lower bound of T . To this end,we assume some t′ ∈ T a⊥ with t′ Ea⊥ s for all s ∈ T and show that thent′ Ea⊥ t:

(a) In order to prove the inclusion D(t′) ⊆ P , we show that D(t′) satisfies(1) through (3) of the coinductive definition of P : (1) and (3) followfrom the fact that t′ Ea⊥ s for all s ∈ T , whereas (2) follows from thefact that t′ is a lambda tree.

(b) If p ∈ D(t′), then t′(p) = s(p) since t′ Ea⊥ s. Because D(t′) ⊆ P asshown above, we know that p ∈ P . Hence, t(p) = s(p) = t′(p).

(c) Let ai = 0, p ∈ D(t′), and p · 〈i〉 ∈ P . From the latter, we obtainthat p · 〈i〉 ∈ D(s), which implies p · 〈i〉 ∈ D(t′) due to t′ Ea⊥ s.

In the proof of Theorem 3.7, we use the following lemma, which allows us toconstruct ideals:

Lemma A.3. For each t ∈ T a⊥ , the set t↓fin =t ∈ T⊥

∣∣ s Ea⊥ t forms anideal in (T⊥,Ea⊥).

23

Page 24: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

Proof. By construction, t↓fin is downwards-closed. To argue that t↓fin is di-rected, we first observe that t↓fin is non-empty since ⊥ ∈ t↓fin. Furthermore,let s1, s2 ∈ t↓fin, i.e. s1, s2 Ea⊥ t. Since (T a⊥ ,Ea⊥) is a complete semilatticeaccording to Theorem 3.6, every set with an upper bound also has a lub. Inparticular, s1, s2 has a lub s in (T a⊥ ,Ea⊥). Since t is an upper bound of s1, s2,we have that s Ea⊥ t. It only remains to be shown that s is finite.

Assume that s is not finite. By Konig’s Lemma, there is an infinite branchS in s. Moreover, since s1, s2 are finite, S cannot be an infinite branch in s1and s2. That is, there is some p1 < S such that p1 6∈ D(s1) ∪ D(s2). Moreover,since s is a-guarded, S cannot be a-bounded, which means that we find somep2 · 〈k〉 with p1 < p2 · 〈k〉 < S and ak = 1.

Let s′ be the restriction of s to p ∈ D(s) |not p2 < p < S . Clearly, s′ isan a-guarded lambda tree, too. We show that s′ Ea⊥ s:

(a) & (b) follow from the construction of s′.

(c) If ai = 0, p ∈ D(s′), and p · 〈i〉 ∈ D(s), then we know that p 6< S or p 6> p2.In the former case, also p · 〈i〉 6< S. In the latter case, if p · 〈i〉 > p2, thenp = p2. Consequently, p · 〈i〉 6< S since otherwise ai = ak = 1. For eithercase, we conclude that p · 〈i〉 ∈ D(s′).

Since p2 · 〈i〉 is in D(s) but not in D(s′), we know that s 6= s′ and thus s′ Ca⊥ s.Next, we show that sj Ea⊥ s

′ for all j ∈ 1, 2:

(a) If p ∈ D(sj), then p ∈ D(s) since sj Ea⊥ s. Since p ∈ D(sj) and thusp 6≥ p1 and a fortiori p 6≥ p2, we have that p ∈ D(s′).

(b) If p ∈ D(sj), then sj(p) = s(p) due to sj Ea⊥ s. Moreover, by constructionof s′, we obtain s′(p) = s(p) = sj(p).

(c) If ai = 0, p ∈ D(sj), and p · 〈i〉 ∈ D(s′), then p · 〈i〉 ∈ D(s), too. Since,sj Ea⊥ s, we can then conclude that p · 〈i〉 ∈ D(sj).

This contradicts the fact that s is the lub of s1, s2. Hence, s must be finite.

Theorem 3.7.The ideal completion of (Λ⊥,≤a⊥) is order isomorphic to (T a⊥ ,Ea⊥).

Proof Proof of Theorem 3.7. By Proposition 3.3, it suffices to show that theideal completion (I,⊆) of (T⊥,Ea⊥) is order isomorphic to (T a⊥ ,Ea⊥). To thisend, we define two functions φ : T a⊥ → I and ψ : I → T a⊥ :

φ(t) =s ∈ T⊥

∣∣ s Ea⊥ t ψ(T ) =⊔T

By Lemma A.3, φ is well-defined. Moreover, as each ideal T of (T⊥,Ea⊥) isdirected and thus has a lub in (T a⊥ ,Ea⊥) according to Theorem 3.4, ψ is well-defined, too. Both φ and ψ are obviously monotonic. Hence, it remains to beshown that φ and ψ are inverses of each other:

• For each T ∈ I, we show φ(ψ(T )) ⊆ T . If t ∈ φ(ψ(T )), then t ∈ T⊥ andt Ea⊥ t for t =

⊔T . According to Theorem 3.4, there is, for each p ∈ D(t),

a tp ∈ T such that tp(p) = t(p). Since t Ea⊥ t, we thus have that

t(p) = t(p) = tp(p) for each p ∈ D(t). (1)

24

Page 25: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

Moreover, as D(t) is finite and T is directed, we find some s ∈ T with

tp Ea⊥ s for all p ∈ D(t). (2)

We will show that t Ea⊥ s:

(a) & (b) If p ∈ D(t), then t(p)(1)= tp(p)

(2)= s(p).

(c) If ai = 0, p ∈ D(t), and p · 〈i〉 ∈ D(s), then p · 〈i〉 ∈ D(t) since s Ea⊥ t.Because t Ea⊥ t, we can then conclude that p · 〈i〉 ∈ D(t).

As s ∈ T and T is downwards-closed, t Ea⊥ s implies that t ∈ T .

• For each T ∈ I, we show φ(ψ(T )) ⊇ T . If t ∈ T , then t ∈ T⊥ andt Ea⊥

⊔T . That is, t ∈ φ(ψ(T )).

• For each t ∈ T a⊥ , we show that ψ(φ(t)) = t. Let t =⊔φ(t). We will show

that t = t.

If p ∈ D(t), then there is some s ∈ φ(t) with p ∈ D(s) and t(p) = s(p),according to Theorem 3.4. Since s Ea⊥ t, this means that t(p) = s(p) =t(p).

If p ∈ D(t), then consider t|ad for d = |p|a + 1. By construction of t|ad, wehave that p ∈ D(t|ad). According to Lemma A.6 and Lemma A.8, t|ad isfinite and t|ad Ea⊥ t. That is, t|ad ∈ φ(t). Hence, we can employ Theorem 3.4to conclude that t(p) = t|ad(p) = t(p).

Next we show correspondences between the limit inferior in (T a⊥ ,Ea⊥) andthe limit in (T a⊥ ,daT ), akin to the corresponding result on first-order terms [3],but with the addition of selective strictness according to a. As the first step, wegive a direct characterisation of the limit of a converging sequence of lambdatrees:

Lemma A.4. If a sequence (tι)ι<α converges to t in (T a⊥ ,daT ), then

D(t) =⋃β<α

⋂β≤ι<αD(tι), and t(p) = l ⇐⇒ ∃β < α∀β ≤ ι <

α : tι(p) = l

Proof. We only show one direction for each of the two equalities above. Theother direction follows analogously. Let t(p) = l and d = |p|a + 1. Since (tι)ι<αconverges to t, there is some β < α such that daT (tι, t) < 2−d for all β ≤ ι < α.

That is, tι(q) ' t(q) for all q ∈ P with |q|a < d. In particular, tι(p) ' t(p).Since p ∈ D(t), this means that p ∈

⋂β≤ι<αD(tι), and since t(p) = l, we have

that tι(p) = t(p) = l for all β ≤ ι < α.

The following definition of truncations will help us to compare the limitinferior in (T a⊥ ,Ea⊥) and the limit in the corresponding metric space (T a⊥ ,daT ):

Definition A.5. Given a strictness signature a, a depth d ≤ ω, and a lambdatree t ∈ T ∞⊥ , the a-truncation t|ad of t at d is defined as the restriction of t to

the domainp ∈ D(t)

∣∣∣ |p|a < d

.

25

Page 26: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

The above definition of truncation is a straightforward translation of thenotion of truncation used by Arnold and Nivat [1] to the a-depth measures thatwe use here. In the following, we make use of the fact that the metric daTcan be characterised by daT (s, t) = 2−d with d = max

d ≤ ω

∣∣ s|ad = t|ad

. Thisobservation follows immediately from Definition A.5.

Lemma A.6. If t ∈ T a⊥ and d < ω, then t|ad ∈ T⊥.

Proof. We show the contraposition: Assume that t|ad is infinite. Then, byKonig’s Lemma, t|ad has an infinite branch S. By construction of t|ad, S isa-bounded, viz. by d. Since D(t|ad) ⊆ D(t), S is also an infinite branch of t,which means that t is a-unguarded.

We can then derive the following proposition that characterises a-guardedlambda trees:

Proposition A.7. A lambda tree is a-guarded iff it does not have infinitelymany positions that have the same a-depth.

Proof. The “if” direction follows from the fact that an a-bounded infinite branchhas infinitely many positions of the same a-depth; the converse direction followsfrom Lemma A.6.

The a-truncation construction is monotonic w.r.t. Ea⊥:

Lemma A.8. For each t ∈ T ∞⊥ and d ≤ e ≤ ω, we have t|ad Ea⊥ t|ae . Inparticular, t|ad Ea⊥ t.

Proof. We show the properties (a) through (c) from Definition 3.2:

(a) If p ∈ D(t|ad), then p ∈ D(t) with |p|a < d ≤ e. Hence, p ∈ D(t|ae).

(b) If p ∈ D(t|ad), then t|ad(p) = t(p) = t|ae(p).

(c) If ai = 0 and p ∈ D(t|ad), then |p · 〈i〉|a = |p|a + ai = |p|a < d, i.e.p · 〈i〉 ∈ D(t|ad).

The theorem below detail the two directions of the correspondence betweenthe limit inferior and the limit.

Theorem 3.8. Let (tι)ι<α be a sequence in T a⊥ .

(i) If limι→α tι = t in (T a⊥ ,daT ), then lim infι→α tι = t in (T a⊥ ,Ea⊥).

(ii) If lim infι→α tι = t in (T a⊥ ,Ea⊥) and t is total, then limι→α tι = t in(T a⊥ ,daT ).

Proof of Theorem 3.8. (i) If (tι)ι<α convergences to t, we find for each d < ωsome β < α such that t|ad = tι|ad for all β ≤ ι < α. By Lemma A.8, we thushave that t|ad Ea⊥ tι for all β ≤ ι < α, which means that t|ad Ea⊥ sβ , forsβ =

dβ≤ι<α tι. This inequality implies that

⊔d<ω t|ad Ea⊥

⊔β<α sβ . The

left-hand side is well-defined as the setd < ω

∣∣ t|ad is directed accordingto Lemma A.8. Moreover, by Theorem 3.4, the left-hand side is equal tot. Since the right-hand side is by definition equal to t′ = lim infι→α tι, we

26

Page 27: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

obtain the inequality t Ea⊥ t′. Consequently, D(t) ⊆ D(t′) and t(p) = t′(p)

for all p ∈ D(t). It thus remains to be shown that D(t′) ⊆ D(t). To thisend, assume some p ∈ D(t′). By Theorem 3.4, we have that there is someβ < α such that p ∈ D(

dβ≤ι<α tι) and thus p ∈ D(tι) for all β ≤ ι < α.

Therefore, by Lemma A.4, we have that p ∈ D(t).

(ii) In order to prove that (tι)ι<α converges to t, we need to show that for eachd < ω there is some β < α such that tι|ad = t|ad for all β ≤ ι < α. Let d < ω.According to the definition of the limit inferior, t =

⊔β<α sβ with sβ =d

β≤ι<α tι. By Theorem 3.4, we thus know that for each p ∈ D(t) there is

some βp < α such that sβp(p) = t(p). Let B =βp∣∣ p ∈ D(t|ad)

. Since,

according to Lemma A.6, D(t|ad) is finite, so is B. Hence, B has a maximalelement, say β. Since (sι)ι<α is monotonic w.r.t. Ea⊥, we thus have thatsβp E

a⊥ sβ for each p ∈ D(t|ad), which means that t(p) = sβp(p) = sβ(p)

for all p ∈ D(t|ad). By construction, sβ Ea⊥ tι for all β ≤ ι < α, and thust(p) = sβ(p) = tι(p) for all p ∈ D(t|ad) and β ≤ ι < α. We can thereforeconclude that t|ad(p) = tι|ad(p) for all p ∈ D(t|ad) and β ≤ ι < α.

Now it only remains to be shown that whenever p 6∈ D(t|ad) then p 6∈ D(tι|ad)

for all β ≤ ι < α. If |p|a ≥ d, then p 6∈ D(tι|ad) trivially holds. Otherwise,

if |p|a < d, then p 6∈ D(t|ad) implies p 6∈ D(t). Since t is total, 〈〉 ∈ D(t), i.e.there is some prefix of p in D(t). Let q be the longest such prefix. Thenq ∈ D(t|ad) and, by the previous paragraph, we know that tι(q) = t(q) forall β ≤ ι < α. Since q is maximal in D(t) and t is total, we know thatt(q) 6∈ @, λ and thus tι(q) 6∈ @, λ for all β ≤ ι < α. Hence, p is not inD(tι) and therefore not in D(tι|ad).

A.2 Transfinite Reductions

For the proof of Lemma 4.6, we need the following property:

Lemma A.9. For each reduction step s→R,p t, we have that p ∈ D(s).

Proof. We proceed by induction on p. If p = 〈〉, then p ∈ D(s) follows fromthe restriction of rewrite systems such that (l, r) ∈ R implies that l 6= ⊥. Ifp = 〈i〉 · q, then p ∈ D(s) follows immediately by the induction hypothesis.

Lemma A.10. For all s, t ∈ T ∞⊥ with s Ea⊥ t and for all p ∈ D(t), we havethat p↓a ∈ D(s) implies p ∈ D(s).

Proof. We show that if p↓a ∈ D(s), then all q with p↓a ≤ q ≤ p are in D(s).We proceed by induction on q. The case where q ≤ p↓a is trivial. Otherwise,q = q′ · 〈i〉 for some q′ with p↓a ≤ q′ ≤ p. Hence, by induction hypothesis,q′ ∈ D(s). Moreover, p↓a ≤ q′ ≤ p implies that ai = 0. Additionally, since p isin D(t), so is its prefix q. Since s Ea⊥ t, we thus can conclude that q ∈ D(s).

Lemma 4.6. The reduction context of a step s →p t is equal to s \ p↓a andt \ p↓a.

Proof Proof of Lemma 4.6. Let c be the reduction context of s →p t. We pro-ceed by induction on p. The case p = 〈〉 is trivial since then c = s \ (p↓a) =t \ (p↓a) = ⊥.

27

Page 28: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

Let p = 〈j〉 · p′. We only look at the case where j = 0, the cases j = 1 andj = 2 follow by a similar argument. If p = 〈0〉 · p′, then s = λx.s′, t = λx.t′ ands′ →p′ t

′. By induction hypothesis, the reduction context c′ of s′ →p′ t′ is equal

to s′ \ p′↓a and t′ \ p′↓a.We consider two cases. At first, suppose p↓a = 〈〉. Consequently, s \ p↓a =

t \ p↓a = ⊥. If c 6= ⊥, then p↓a ∈ D(c). Since, by Lemma A.9, p ∈ D(s),and since c Ea⊥ s, we can apply Lemma A.10 to conclude that p ∈ D(c). Thiscontradicts the definition of reduction contexts. Hence, c = ⊥.

Finally, suppose that p↓a 6= 〈〉. Consequently, p↓a = 〈0〉 · p′↓a, which meansthat s \ p↓a = λx.(s′ \ p′↓a) and t \ p↓a = λx.(t′ \ p′↓a). Hence, s \ p↓a = λx.c′ =t \ p↓a. We claim that c = λx.c′. To prove this we show the following twostatements, where c = λx.c′: (i) c Ea⊥ s, t, and (ii) if d Ea⊥ s, t with p 6∈ D(d),then d Ea⊥ c.

(i) We show (a)-(c) of Definition 3.2:

(a)&(b) Let c(q) = l. If q = 〈〉 then l = λ and s(q) = t(q) = λ.

If q = 〈0〉 · q′, then we have three cases to distinguish:

– l ∈ L \ P: Then c′(q′) = l, which means that s′(q′) = t′(q′) = lsince c′ Ea⊥ s

′, t′.

– l = 〈〉: Then c′(q′) = x, which means that s′(q′) = t′(q′) = xsince c′ Ea⊥ s

′, t′.

– l = 〈0〉 · q: Then c′(q′) = q, which means that s′(q′) = t′(q′) = qsince c′ Ea⊥ s

′, t′.

In all cases we can conclude that s(q) = t(q) = l.

(c) Assume that q ∈ D(c) and that q · 〈i〉 is in D(s) ∪ D(t) and strict.We have to show that q · 〈i〉 ∈ D(c).

– If q = 〈〉, then i = 0, ai = 0 and 〈〉 ∈ D(s′)∪D(t′). Since p↓a 6= 〈〉and a0 = 0, we know that p′↓a 6= 〈〉. Since c′ = s′\p′↓a = t′\p′↓a,we can thus conclude that 〈〉 ∈ D(c′). That means that q · 〈i〉 ∈D(c).

– If q = 〈0〉 · q′, then q′ ∈ D(c′), q′ · 〈i〉 ∈ D(s′)∪D(t′) and q′ · 〈i〉 isstrict. Since c′ Ea⊥ s

′, t′, we can thus conclude that q′ ·〈i〉 ∈ D(c′),which means that q · 〈i〉 ∈ D(c).

(ii) Assuming d Ea⊥ s, t and p 6∈ D(d), we show (a)-(c) of Definition 3.2 toprove that d Ea⊥ c:

(a)&(b) Let d(q) = l. If p↓a ≤ q, then also p↓a ∈ D(d). Since p ∈ D(s),by Lemma A.9, and d Ea⊥ s, we can apply Lemma A.10 to obtainthat p ∈ D(d), which contradicts the assumption. Thus, we canassume that p↓a 6≤ q. Consequently, (s \ p↓a)(q) = l, which meansthat c(q) = l.

(a) Assume that q ∈ D(d) and that q · 〈i〉 is in D(c) and strict. Conse-quently, since c Ea⊥ s, we have that q · 〈i〉 ∈ D(s). The latter impliesthat q · 〈i〉 ∈ D(d) since d Ea⊥ s.

28

Page 29: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

The following property, which relates m-convergence and -continuity, fol-lows from the fact that our definition of m-convergence on T a⊥ instantiates theabstract notion of (strong) m-convergence from our previous work [2]:

Lemma A.11. Let S = (tι →pι tι+1)ι<α be an open m-continuous reduction.

If (|pι|a)ι<α tends to infinity, then S is m-convergent.

Proof. Special case of Proposition 5.5 from [2]; also cf. [9, Thm. B.2.5].

Proposition 4.9. For each reduction S : sm t, we also have that S : sp t.

Proof of Proposition 4.9. Let S = (tι →pι,cι tι+1)ι<α. Given a limit ordinalγ ≤ α, we have to show that lim infι<γ cι = tγ , assuming tα = t. By m-

convergence of S, we know that (|pι|a)ι<γ tends to infinity and thus so does

(∣∣pι↓a∣∣a)ι<γ . In other words, for each d < ω there is some δ < γ with

∣∣pι↓a∣∣a ≥ dfor all δ ≤ ι < γ. Since, by Lemma 4.6, cι = tι\pι↓a, we thus have that cι|ad = tι|adfor all δ ≤ ι < γ. Consequently, (cι)ι<γ converges to the same lambda tree as(tι)ι<γ if any. Since m-convergence of S implies that limι→γ tι = tγ , we cantherefore conclude that limι→γ cι = tγ . According to Theorem 3.8 (i), we thushave that lim infι→γ cι = tγ .

The above proposition allows us to prove the following lemma that providesa characterisation for when p-convergence implies m-convergence:

Lemma A.12. Let S : sp t. Then S : sm t iff the a-depth of contracted redexoccurrences tends to infinity for each open prefix of S.

Proof. The “only if” direction follows from the definition of m-convergence. Forthe converse direction, we assume that S = (tι →pι tι+1)ι<α, and show thatS|β : s m tβ for each prefix S|β of S by induction on its length β. The caseβ = 0 is trivial; if β is a successor ordinal the statement follows immediatelyfrom the induction hypothesis. Let β be a limit ordinal. By the inductionhypothesis, each proper prefix S|γ of S|β m-converges to tγ , which means that

S|β is m-continuous. Since (|pι|a)ι<α tends to infinity, there is, by Lemma A.11,some t′β such that S|β : s m t′β , which implies S|β : s p t′β by Proposition 4.9.As we know that S|β : s p tβ , we can then conclude that t′β = tβ , and thusS|β : sm tβ .

Proposition 4.10. S : sp t implies S : sm t whenever S and t are total.

Proof Proof of Proposition 4.10. Let S = (tι →pι,cι tι+1)ι<α. To complete the

proof it remains to be show that (|pι|a)ι<γ tends to infinity for each limit ordinalγ ≤ α. To this end, we assume some limit ordinal γ ≤ α and d < ω and constructsome δ < γ such that |pι|a ≥ d for all δ ≤ ι < γ.

By p-convergence, we know that tγ = lim infι→γ cι, i.e. tγ =⊔β<γ sβ where

sβ =dβ≤ι<γ cι. By Theorem 3.4, we find for each p ∈ D(tγ |ad) some δ(p) < γ

with p ∈ D(sδ(p)). Since D(sδ′) ⊆ D(sδ′′) whenever δ′ ≤ δ′′ and since t|aa is finiteaccording to Lemma A.6, we find some δ < γ with D(tγ |ad) ⊆ D(sδ), namelyδ = max

δ(p)

∣∣ p ∈ D(tγ |ad)

. Since, by definition, sδ Ea⊥ cι for all δ ≤ ι < γ,we then have that D(tγ |ad) ⊆ D(cι) for all δ ≤ ι < γ. From this we derive thefollowing for all δ ≤ ι < γ:

29

Page 30: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

(1) pι 6∈ D(tγ |ad), and (2) tι(p) = tγ(p) for all p ∈ D(tγ |ad).

(1) follows from the fact that pι 6∈ D(cι). For (2), assume that p ∈ D(tγ |ad).Then p ∈ D(sδ), which implies that sδ(p) = tγ(p) as sδ Ea⊥ tγ . Since sδ Ea⊥ cι,we also have that sδ(p) = cι(p), and since cι Ea⊥ tι, we have that cι(p) = tι(p).Altogether, we thus have that tγ(p) = tι(p).

Finally, we prove the claim that |pι|a ≥ d for all δ ≤ ι < γ. If pι ∈ D(tγ),

then |pι|a ≥ d follows immediately from (1). Otherwise, if pι 6∈ D(tγ), wefind a maximal prefix q < pι with q ∈ D(tγ). Because tγ is total, we know

that tγ(q) ∈ V ] P. Assume that |pι|a ≥ d does not hold. Consequently,

|q|a ≤ |pι|a < d, which means that q ∈ D(tγ |ad). According to (2), we thusobtain that tι(q) = tγ(q). Hence, tι(q) ∈ V ] P which means that pι 6∈ D(tι),which, according to Lemma A.9, contradicts the fact that there is a reductionstep from tι at pι since D⊥(tι) = ∅. Consequently, |pι|a ≥ d.

A.3 Beta Reduction

Proposition 5.3. S : sm t iff no prefix of S has volatile positions and S : sp

t.

Proof of Proposition 5.3. Let S = (tι →pι tι+1)ι<α. The “only if” direction

follows from Proposition 4.9 and the fact that if (|pι|a)ι<β tends to infinity,then S|β has no volatile positions. The “if” direction follows from Lemma A.12as the absence of volatile positions implies that the a-depth of contracted redexoccurrences tends to infinity (by the infinite pigeonhole principle).

Lemma A.13. Let S = (tι →cι,pι tι+1)ι<α be an open reduction p-convergingto t. Then we have the following:

(i) p ∈ D(t) =⇒ ∃β < α∀β ≤ ι < α : pι↓a 6≤ p and tι(p) = t(p).

(ii) p ∈ D(tβ) and ∀β ≤ ι < α : pι↓a 6≤ p =⇒ ∀β ≤ ι < α : tι(p) = t(p).

Proof. (i) If p ∈ D(t), then, by Theorem 3.4, there is some β < α suchthat s(p) = t(p), where s =

dβ≤ι<α cι. Since s Ea⊥ cι, we thus have

that cι(p) = s(p) = t(p) for all β ≤ ι < α. According to Lemma 4.6,cι = tι \ p↓aι. Consequently, p↓aι 6≤ p and tι(p) = t(p) for all β ≤ ι < α.

(ii) Let β < α and P =p ∈ D(tβ)

∣∣∀β ≤ ι < α : pι↓a 6≤ p

. We show thefollowing statements for all β ≤ γ ≤ α:

cι(p) = tβ(p) for all p ∈ P, β ≤ ι < γ (A)

tγ(p) = tβ(p) for all p ∈ P (B)

Then (ii) follows from (B). We proceed by induction on γ.

For γ = β, (A) is vacuously true and (B) is trivial.

Let γ = γ′ + 1 > β. For (A), it remains to be shown that cγ′(p) = tβ(p)for all p ∈ P . Since, according to Lemma 4.6, cγ′ = tγ′ \ pγ′↓a, we knowthat cγ′(p) = tγ′(p) for all p ∈ P . By the induction hypothesis for (B), wethen have that cγ′(p) = tβ(p) for all p ∈ P . Moreover, since cγ′ Ea⊥ tγ , wehave that tγ(p) = cγ′(p) = tβ(p) for all p ∈ P .

30

Page 31: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

Let γ be a limit ordinal. Then (A) follows immediately from the inductionhypothesis. For (B), we observer that properties (1) to (3) from Proposi-tion 3.5 are satisfied for the glb s =

dβ≤ι<γ cι. Property (1) follows from

the induction hypothesis for (A) and (2) is immediate from the construc-tion of P . To see that (3) is true, assume some β ≤ ι < γ and p ∈ P withp · 〈i〉 ∈ D(cι) but p · 〈i〉 6∈ P . Then there is some β ≤ ι′ < γ such thatp · 〈i〉 = pι′↓a. Consequently, ai = 1. Since (1)-(3) are fulfilled, we mayapply Proposition 3.5, to conclude that s(p) = cβ(p) for all p ∈ P . Hence,because s Ea⊥ tγ , we have that tγ(p) = cβ(p) for all p ∈ P . By applyingthe induction hypothesis for (A), we can then conclude that tγ(p) = tβ(p)for all p ∈ P .

Corollary A.14. Let S = (tι →cι,pι tι+1)ι<α be an open reduction p-convergingto t. Then we have the following:

(i) p · 〈i〉 ∈ D⊥(t) and ai = 0 =⇒ ∃β < α∀β ≤ ι < α : p · 〈i〉 ∈ D⊥(tι)

(ii) p · 〈i〉 ∈ D⊥(tβ) and ∀β ≤ ι < α : pι↓a 6≤ p =⇒ ∀β ≤ ι < α : p · 〈i〉 ∈D⊥(t).

Proof. (i) Since p · 〈i〉 ∈ D⊥(t), we know that p ∈ D(t). Consequently, byLemma A.13 (i), there is some β < α such that pι↓a 6≤ p and tι(p) = t(p)for all β ≤ ι < α. Since ai = 0, we have that pι↓a 6≤ p · 〈i〉 for allβ ≤ ι < α. Hence, p · 〈i〉 6∈ D(tι) for all β ≤ ι < α, because otherwisep · 〈i〉 6∈ D(t) according to Lemma A.13 (ii). Consequently, p · 〈i〉 ∈ D⊥(tι)for all β ≤ ι < α.

(ii) Let i = 0. The other cases follow by a similar argument.

Then tβ(p) = λ, and by Lemma A.13 (ii), also t(p) = λ. Hence, p ·〈i〉 ∈ D(t) ∪ D⊥(t). By induction, we show below that p · 〈i〉 ∈ D(t)implies p · 〈i〉 ∈ D(tβ) for any reduction S (including closed ones). Sincep · 〈i〉 6∈ D(tβ), that must mean that p · 〈i〉 ∈ D⊥(t).

The base case β = α is trivial. If α = γ + 1, then also p · 〈i〉 ∈ D(tγ)and by induction hypothesis p · 〈i〉 ∈ D(tβ). If α is a limit ordinal, thenp · 〈i〉 ∈ D(tγ) for some β ≤ γ < α according Lemma A.13 (i). Thenp · 〈i〉 ∈ D(tβ) follows by the induction hypothesis.

Lemma 5.4. If p is outermost-volatile in S : sp t, then p ∈ D⊥(t).

Proof of Lemma 5.4. Let S = (tι →pι,cι tι+1)ι<α. Since p is volatile in S, wefind for each β < α some β ≤ ι < α with pι↓a ≤ p. Hence, by Lemma 4.6, weknow that p 6∈ D(cι). Consequently, by Theorem 3.4 and Proposition 3.5, wehave that p 6∈ D(t).

If p = 〈〉, then p ∈ D⊥(t) follows immediately. If p = q · 〈0〉, then we haveto show that t(q) = λ to conclude that p ∈ D⊥(t). Since p is outermost-volatilein S, we find some β < α such that p ∈ D(tβ) and pι↓a 6≤ q for all β ≤ ι < α(the latter because otherwise some prefix of q would be volatile in S). Hence,by Lemma A.13 t(q) = tβ(q). Moreover, since q · 〈0〉 ∈ D(tβ), we know thattβ(q) = λ. Consequently, t(q) = λ. The argument for the cases p = q · 〈1〉 andp = q · 〈2〉 is analogous.

31

Page 32: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

Corollary A.15. If p is volatile in S : sp t, then p 6∈ D(t).

Proof. Follows from Lemma 5.4.

Proposition 5.6. An open reduction is destructive iff it p-converges to ⊥.

Proof. The “only if” direction follows immediately from Lemma 5.4.For the “if” direction, let S = (tι →pι tι+1)ι<α. Because ⊥ is not a redex,

we know that D(tι) is non-empty for all ι < α. Since S p-converges to ⊥, wethus know, according to (the contrapositive of) Lemma A.13 (ii), that for eachβ < α there is some β ≤ ι < α such that pι↓a ≤ 〈〉. That is, S is destructive.

Lemma A.16. Given t ∈ T a⊥ and p ∈ D⊥(t) with |p|a = 0, we have that t ∈ Fa⊥.

Proof. Let s be a ⊥-instance of t w.r.t. Fa. Then s|p ∈ Fa, i.e. there is adestructive reduction s|p p ⊥. By embedding this reduction into s at position

p, we obtain a reduction S : s→ s′ that has a volatile position p. Since |p|a = 0,also 〈〉 is volatile in S. Consequently, s ∈ Fa, which means that t ∈ Fa⊥.

Lemma A.17. For any open S-reduction tp S ⊥, we find an open -reductiontp ⊥.

Proof. We first show that any reduction S : t p S ⊥ contracts infinitely many-redexes at a-depth 0.

To this end, suppose this was not the case. Then, by Proposition 5.6, Scontracts infinitely many S-redexes at a-depth 0. However, S-reduction at a-depth > 0 creates no new S-redexes at a-depth 0, and S-reduction at a-depth 0creates at most one S-redex at the same a-depth (but at a strictly smaller 111-depth). Hence, contraction of infinitely many S-redexes at a-depth 0 requirest to contain infinitely many S-redexes at a-depth 0, which is impossible byProposition A.7

Finally we construct a -reduction T : t p ⊥ from S by removing all S-steps. Clearly -redexes contracted in S are still -redexes in T . Moreover,since infinitely many redexes at a-depth 0 are contracted T also p-converges to⊥ by Proposition 5.6.

Theorem 5.9. If sp S t, then sm B t, where B = B(Fa).

Proof of Theorem 5.9. Let S = (φι : tι →pι tι+1)ι<α be a S-reduction that p-converges to tα. We construct a B-reduction T from S that also p-converges totα but that has no volatile positions in any of its open prefixes. Thus, accordingto Proposition 5.3, T also m-converges to tα. The construction removes stepsin S that take place at or below outermost-volatile positions of some prefix ofS and replaces them by á-steps. Let p be an outermost-volatile position ofsome prefix S|β . Then there is some ordinal γ < β such that no reduction stepbetween γ and β in S takes place strictly above p, i.e. pι 6< p for all γ ≤ ι < β.Hence, we can construct a destructive reduction S1 : tγ |p p S ⊥ by taking thesubsequence of the segment S|[γ,β) that contains the reduction steps φι withp ≤ pι. Moreover, by Lemma A.17, we find a -reduction S2 : tγ |p p ⊥.

Note that tγ |p may not be total. However, the applicability of -steps ispreserved by forming ⊥-instances. In particular, we can form ⊥-instances w.r.t.Fa. Let r be such a ⊥-instance of tγ |p w.r.t. Fa. Then there is a destructivereduction S3 : r p ⊥ that contracts redexes at the same positions as S2. Hence,

32

Page 33: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

r ∈ Fa, which means that tγ |p ∈ Fa⊥. Additionally, tγ |p 6= ⊥ since tγ |p containsa -redex. Consequently, there is a pair (tγ |p,⊥) ∈ á. Let T ′ be the reductionthat is obtained from S|β by replacing the γ-th step, which we can assumew.l.o.g. to take place at p, by a á-step at the same position p and removing allreduction steps φι with p ≤ pι and γ < ι < β. Let t′ be the lambda tree thatthe reduction T ′ p-converges to. tβ and t′ can only differ at position p or below.However, by construction, we have p ∈ D⊥(t′) and, by Lemma 5.4, p ∈ D⊥(tβ),too. Consequently, t′ = tβ .

Lemma A.18. If B = B(Fa)

and sm B t, then sm s′ and s′ m á t.

Proof. According to Lemma 27 of Kennaway et al. [13], this property holds forthe metric d111

T for all B (U) given U is closed under substitution. The proofworks for all other metrics of the form daT as well, and Fa is clearly closed undersubstitution: given a total, fragile lambda tree t witnessed by the destructive-reduction S and a substitution σ (of total lambda trees), then σ(t) is alsofragile witnessed by the reduction obtained from S by applying σ to each of itslambda trees.

Lemma A.19. Let á=á(U) for some U ⊆ T a and S : sm á t. Then there is areduction T : sm á t of length at most ω contracting disjoint á-redexes of s.

Proof. Let S = (tι →pι tι+1)ι<α, and let P be the set of outermost positions ofredexes contracted in S, i.e. P = pβ |β < α,∀ι < α : pι 6< pβ . Then, for eachp ∈ P , also s|p is a á-redex by the definition of U⊥. Let T be the reductionthat contracts all redexes in s at positions P . By Proposition A.7, this yieldsa reduction m-converging to some lambda tree t′. Since all redexes that arecontracted in S are subtrees of some redex contracted in T , we have that t′ =t.

Theorem 5.10. Let B = B(Fa)

and sm B t such that s is total. Then sp tif a = 111 or t is a á-normal form.

Proof of Theorem 5.10. By Lemmas A.18 and A.19, we find reductions S : sm

s′ and T : s′ m á t, where T contracts disjoint á-redexes in s′. By Proposition 4.9,we have that S : s p s

′ and that T : s′ p á t. Let u →á,p v be a step in T .Then u|p ∈ Fa⊥. Because s is total, so is s′. Together with the fact that allsteps in T occur at disjoint positions, this implies that u|p is total and thusan element of Fa. Consequently, we have a destructive reduction starting inu|p. By embedding this reduction in u at position p, we obtain a reductionU : u p u

′ that has p as a volatile position. Following Lemma 5.4, we onlyhave to show that p is outermost-volatile in U in order to obtain that u′ = v.Since all steps in U take place at p or below, p can only fail to be outermost-volatile if it is strict. We show that p is non-strict. If p = 〈〉, this is trivial.Otherwise, p = q · 〈i〉. If a = 111, then p is non-strict. Otherwise, t must be aá-normal form according to the assumption. Moreover, we know that t|p = ⊥.Hence, t|q 6= ⊥, and, according to Lemma A.16, t|q ∈ Fa⊥ whenever ai = 0. Thatmeans, t|q is a á-redex whenever ai = 0, which contradicts the assumption thatt is a á-normal form. Hence, ai = 1 and, thus, p is non-strict.

Let T ′ be the reduction that is obtained from T by replacing each stepu→á,p v with a reduction up v as constructed above. Clearly, we then havethat T ′ : s′ p t.

33

Page 34: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

Note that the restriction to total lambda trees s is crucial: if a0 = 0, thenwe have a single step reduction λx.⊥ →B ⊥ to a á-normal form, but there is nop-converging reduction λx.⊥p ⊥ as λx.⊥ is a -normal form.

Theorem 5.13. For each s ∈ T a⊥ , there is a normalising reduction sp (S) t.

Proof Proof of Theorem 5.14. For each lambda tree u and non-strict positionp ∈ D(u), we have the following: If u|p is not active, then there is a finitereduction u→∗ v, where v|p is stable. If, on the other hand, u|p is active, thenit is, according to Lemma 5.12, also fragile. Consequently, we find a reductionS : up v, in which p is volatile. Hence, according to Lemma 5.4, we have thatp 6∈ D(v), i.e. subtree at p has been annihilated.

By performing the above reductions starting with s at root position andproceeding at positions of increasing depth, we obtain a p-converging reductionsp t such that each subtree of t is stable. That is, t is a -normal form.

We also find a reduction s p S u to S-normal form u by extending the-reduction s p t with a S-reduction t p S u that consecutively contracts allS-redexes:

t = t0 p

S t1 p

S t2 p

S . . .

where each reduction ti p S ti+1 is a complete development (cf. Section B) of allS-redexes in ti. Since each contraction of a S-redex at depth d creates at mostone new redex at depth d− 1 and no other redexes, this process will terminate.In other words, there is some n < ω such that tn is a S-normal form. Sincecontraction of S-redexes creates no -redexes and t0 is a -normal form, weknow that tn is a S-normal form.

Lemma A.20. If s p S t contracts a -redex at position p, then there is afinite reduction s→∗ u to a term u with a -redex occurrence at p.

Proof. Let S : sp S s′ be the prefix of sp S t that converges to a lambda tree

s′ that has a -redex occurrence at position p. This means that s′(p · 〈1〉) = λ.By Lemma B.8, there is a finite reduction s→∗ t with t(p · 〈1〉) = λ. That is, thas a -redex occurrence at p.

Lemma A.21. Let S : tp S ⊥. Then there is a finite reduction t→∗S u suchthat either u = ⊥ or u has a -redex occurrence at a-depth 0.

Proof. We proceed by induction on the length of S. In case S is finite, there isnothing to show. Otherwise, S is of the form tp S s→∗S ⊥.

• Let s →∗S ⊥ contain a -step at a-depth 0. By Lemma A.20, there is afinite reduction t→∗ u where u has a -redex occurrence at a-depth 0.

• Let s →∗S ⊥ be empty, i.e. S : t →∗S ⊥ is empty. Then S can be turnedinto an open -reduction tp ⊥ according to Lemma A.17. Which accord-ing to Proposition 5.6, contains a -step at a-depth 0. By Lemma A.20,there is a finite reduction t→∗ u a -redex at a-depth 0.

• Let s →∗S ⊥ be non-empty with no -step at a-depth 0. Then s mustcontain a non-root occurrence of ⊥ at a-depth 0, i.e. there is some p ∈D⊥(s) with p 6= ∅ and |p|a = 0. That means p = q · 〈i〉 with ai = 0. ByCorollary A.14 (i), there is a proper prefix tp S u of the reduction tp S s

34

Page 35: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

such that p ∈ D⊥(u), too. Hence, t p S u →∗S ⊥. Since this reduction isstrictly shorter than S, we may apply the induction hypothesis to obtainthe desired finite reduction t →∗S v such that either v = ⊥ or v has a-redex occurrence at a-depth 0.

Lemma 5.17. If a ∈ 001, 101, 111 and S : tp S ⊥, then there is a reductionT : tp S ⊥ of length ≤ ω. If s is total, then T is a -reduction of length ω.

Proof. By Lemma A.21, we find a finite reduction t →∗S t1 that contracts aredex at a-depth 0 or ends in ⊥. By Lemma 5.16 there is also a reductionS′ : t1 p S ⊥. Thus we can repeat the argument for S′ (instead of S). Byiterating this argument, we obtain a reduction

T : t→∗S t1 →∗S t2 →∗S . . .

that either stops at some tn = ⊥ or is of length ω and contracts infinitely manyredexes at a-depth 0 and thus p-converges to ⊥ according to Proposition 5.6.In either case T : tp ⊥.

If s is total then T cannot be finite, as finite S-reductions preserve totality.Hence, no step in T can be an S-step.

B Finitary Approximation Lemma and Infini-tary Strip Lemma

In order to prove the finitary approximation lemma and the infinitary striplemma for p-converging S-reductions, we adopt the familiar technique of de-scendants and complete developments.

Throughout this section we consider only S-reductions over T a⊥ . As wedevelop the theory, we have to make restrictions on the strictness signatures awe consider.

Our definition of complete developments for p-converging S-reductions is astraightforward adaptation of the concept from the literature [12, 10, 15]:

Definition B.1 (descendants). Let S : t0 p S tα of length α, and U ⊆ D(t0).The descendants of U by S, denoted U//S, is a subset of D(tα) inductivelydefined as follows:

(a) If S = 〈〉, then U//S = U .

(b) If S = 〈φ〉 with φ : s→p t, then U//S =⋃u∈U Ru, where:

If φ is a -step:

Ru =

u if p 6≤ u∅ if u ∈ p, p · 〈1〉p · q · w

∣∣∣∣∣ s(p · 〈1, 0〉 · q)= p · 〈1〉

if u = p · 〈2〉 · w

p · w if u = p · 〈1, 0〉 · w and s(u) 6= p · 〈1〉∅ if u = p · 〈1, 0〉 · w and s(u) = p · 〈1〉

35

Page 36: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

If φ is a S-step:

Ru =

∅ if p ≤ uu if p 6≤ u

(c) If S = T · 〈φ〉, then U//S = (U//T )//〈φ〉

(d) If S is open, then U//S = D(tα) ∩ lim infι→α U//S|ιThat is, u ∈ U//S iff u ∈ D(tα) and ∃β < α∀β ≤ ι < α : u ∈ U//S|ι

If, in particular, U is a set of redex occurrences, then U//S is also called the setof residuals of U by S. Moreover, by abuse of notation, we write u//S insteadof u //S.

The following lemma provides a more convenient characterisation of descen-dants in the case of open reductions.

Lemma B.2. Let S = (φι : tι →pι tι+1)ι<α be an open S-reduction withS : sp S t and U ⊆ D(s). Then we have the following:

p ∈ U//S ⇐⇒ ∃β < α : p ∈ U//S|β and ∀β ≤ ι < α : pι↓a 6≤ p

Proof. We first prove the “=⇒” direction. To this end, we assume some p ∈U//S. Consequently, p ∈ D(t) and there is some β1 < α such that p ∈ U//S|ιfor all β1 ≤ ι < α. According to Lemma A.13 (i), we thus also find some β2 < αsuch that pι↓a 6≤ p for all β2 ≤ ι < α. Consequently, given β = max β1, β2,we have that p ∈ U//S|β and that pι↓a 6≤ p for all β ≤ ι < α.

For the “⇐=” direction, we show by induction on γ that p ∈ U//S|γ for allβ ≤ γ ≤ α.

The case γ = β is trivial. Let γ = γ′ + 1 > β. That is, U//S|γ =(U//S|γ′) //〈φγ′〉. By the induction hypothesis, we know that p ∈ U//S|γ′ .Moreover, pγ′↓a 6≤ p implies that pγ′ 6≤ p. Consequently, p ∈ U//S|γ′ impliesp ∈ U//S|γ .

Let γ be a limit ordinal. By the induction hypothesis, we know that p ∈U//S|ι for all β ≤ ι < γ. Hence, it remains to be shown that p ∈ D(tγ). Sincep ∈ U//S|β , we know that p ∈ D(tβ). The latter, combined with the assumptionthat pι↓a 6≤ p for all β ≤ ι < γ, implies by Lemma A.13 (ii) that p ∈ D(tγ).

Lemma B.3 (monotonicity). Let S : sp S t and U, V ⊆ D(s). If U ⊆ V , thenU//S ⊆ V//S.

Proof. We prove this statement by induction on the length of S. If S is empty,the statement is trivial. If S = T · 〈φ〉, then

U//S = (U//T ) //〈φ〉IH⊆ (V//T ) //〈φ〉 = V//S

Let S be open, α = |S|, and p ∈ U//S. Then p ∈ D(t) and there is someβ < α such that p ∈ U//S|ι for all β ≤ ι < α. According to the inductionhypothesis, we then have that p ∈ V//S|ι for all β ≤ ι < α. Consequently,p ∈ V//S.

Proposition B.4. Let S : sp S t and U ⊆ D(s). Then U//S =⋃u∈U u//S.

36

Page 37: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

Proof. We prove this proposition by induction on the length of S. The casesS = 〈〉 and S = 〈φ〉 are trivial.

If S = T · 〈φ〉, we can reason as follows:

U//S = (U//T )//〈φ〉 IH= (⋃u∈U

Vu︷ ︸︸ ︷u//T )︸ ︷︷ ︸V

//〈φ〉 IH=⋃u∈V

u//〈φ〉

=⋃u∈U

⋃v∈Vu

v//〈φ〉 IH=⋃u∈U

Vu//〈φ〉 =⋃u∈U

(u//T )//〈φ〉 =⋃u∈U

u//S

Let S be open. The “⊇” follows from Lemma B.3. For the converse direction,we assume S = (tι →pι tι+1)ι<α and p ∈ U//S. By Lemma B.2, there is someβ < α such that p ∈ U//S|β and pι↓a 6≤ p for all β ≤ ι < α. Hence, byinduction hypothesis, p ∈

⋃u∈U u//S|β . That is, there is some u∗ ∈ U with

p ∈ u∗//S|β . By Lemma B.2, we may thus conclude that p ∈ u∗//S and thusp ∈

⋃u∈U u//S.

Proposition B.5. Let S : s p S t and U, V ⊆ D(s). If U ∩ V = ∅, thenU//S ∩ V//S = ∅.

Proof. We show the contraposition of the above statement. To this end, assumethat there is some w ∈ U//S ∩ V//S. By Proposition B.4, we thus find someu ∈ U, v ∈ V with w ∈ u//S ∩ v//S. We show by induction on the length of Sthat u = v, which then implies that U ∩ V 6= ∅.

The case S = 〈〉 is trivial and the case that S = T · 〈φ〉 follows immediatelyfrom the induction hypothesis.

Let S be open with length α. Since w ∈ u//S ∩ v//S, we find β1, β2 suchthat w ∈ u//S|ι for all β1 ≤ ι < α and w ∈ v//S|ι for all β2 ≤ ι < α. Givenβ = max β1, β2, we thus have that w ∈ u//S|β ∩ v//S|β . Hence, by inductionhypothesis, we have that u = v.

By combining Proposition B.4 and Proposition B.5, we know that for eachp ∈ U//S there is a unique q ∈ U such that p ∈ q//S. This unique position q isalso called an ancestor. Moreover, we can show that every position in a lambdatree has an ancestor:

Lemma B.6. Let S : s p S t and p ∈ D(t). Then there is a unique q ∈ D(s)with p ∈ q//S.

Proof. By Proposition B.4 and Proposition B.5, it suffices to show that D(t) ⊆D(s)//S. If we have that, then we find, according to Proposition B.4, for eachp ∈ D(t) some q ∈ D(s) with p ∈ q//S. By Proposition B.5, this q is unique.

Let S = (tι →pι tι+1)ι<α. We prove that D(t) ⊆ D(s)//S, by induction onα.

The case α = 0 is trivial. If α is a successor ordinal, the inclusion followsimmediately from the induction hypothesis.

Let α be a limit ordinal and let p ∈ D(t). By Lemma A.13 (i), this impliesthat there is some β < α such that p ∈ D(tβ) and pι↓a 6≤ p for all β ≤ ι < α.Hence, by the induction hypothesis, p ∈ D(s)//S|β . Since pι↓a 6≤ p for all β ≤ι < α, we know by Lemma B.2 that p ∈ D(s)//S|β implies that p ∈ D(s)//S.

37

Page 38: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

Lemma B.7. Let S : sp S t and p ∈ D(s). Then we have that s(p) = t(q) forall q ∈ p//S.

Proof. Let S = (tι →pι tι+1)ι<α. We prove this lemma by induction on α.The case α = 0 is trivial. If α is a successor ordinal, the inclusion follows

immediately from the induction hypothesis.Let α be a limit ordinal and let q ∈ p//S. By Lemma B.2, this implies that

there is some β < α such that q ∈ p//S|β and pι↓a 6≤ q for all β ≤ ι < α.By the induction hypothesis, we thus have that s(p) = tβ(q). Lemma A.13 (ii)then yields that tβ(q) = t(q), which means that we have the desired equalitys(p) = t(q).

Lemma B.8 (Finitary Approximation Lemma). Let s p S t, and P a finitesubset of D(t). Then there is a reduction s→∗ t′ with t(p) = t′(p) for all p ∈ P .

Proof. We prove this by induction on the length of S. The case S = 〈〉 is trivial.Let S = T · 〈φ〉, where φ : s′ →q t is a -step. Define

P ′ = p′ ∈ D(s′) | ∃p ∈ P : p ∈ p′//φ ∪ q · 〈1〉 .

By Lemma B.6, P ′ is finite, too. Thus, by induction hypothesis, there is a finitereduction S′ : s→∗ s′′ such that s′(p) = s′′(p) for all p ∈ P ′. In particular, thatmeans that q is still -redex occurrence in s′′. Thus there is a -reduction stepφ′ : s′′ →q t

′. Let p ∈ P . According to Lemma B.6, there is a unique p′ ∈ D(s′)with p ∈ p′//φ. By the construction of P ′, we know that p′ ∈ P ′. Hence,

t′(p)Lemma B.7

= s′′(p′)IH= s′(p′)

Lemma B.7= t(p)

Let S = T · 〈φ〉, where φ : s′ →q t is a S-step. Then s′(p) = t′(p) forall p ∈ D(t). Moreover, we also have that D(t) ⊆ D(s′), which implies thatP ⊆ D(s′). Hence, we may apply the induction hypothesis to obtain a finitereduction S′ : s →∗ s′′ such that s′(p) = s′′(p) for all p ∈ P . Consequently,s′′(p) = t(p) for all p ∈ P .

Let S be open. By Lemma A.13 (i), there is a prefix T < S with T : sp t′

and t(p) = t′(p) for all p ∈ P . By applying the induction hypothesis, we thenobtain a finite reduction s→∗ t′′ with t′(p) = t′′(p) for all p ∈ P . Consequently,we have that t(p) = t′′(p) for all p ∈ P .

Proposition B.9. Let S : t0 p S t1, T : t1 p S t2, and U ⊆ D(t0). ThenU//S · T = (U//S) //T .

Proof. We prove this by induction on the length of T . The case T = is trivial.If T = T ′ · 〈φ〉, then we can reason as follows:

U//S · T ′ · 〈φ〉 = (U//S · T ′) //〈φ〉 IH= ((U//S) //T ′) //〈φ〉 = (U//S) //T ′ · 〈φ〉

Let T be open. That means, also S · T is open. Hence, we can reason asfollows:

p ∈ U//S · T ⇐⇒ p ∈ D(t2),∃β < |S · T | ∀β ≤ ι ≤ |S · T | : p ∈ U// (S · T ) |ι⇐⇒ p ∈ D(t2),∃β < |S · T | ∀β ≤ ι ≤ |S · T | : p ∈ U//S · (T |ι)IH⇐⇒ p ∈ D(t2),∃β < |S · T | ∀β ≤ ι ≤ |S · T | : p ∈ (U//S) //T |ι⇐⇒ p ∈ (U//S) //T

38

Page 39: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

For the next proposition we have to exclude certain strictness signatures,in particular strictness signatures of the form 01∗. The problem is that forstrictness signatures of this form a descendant of a redex occurrence may notbe a redex occurrence as the following example demonstrates:

Example B.10. Let Ω = (λx.x x)(λx.x x) and t = (λx.Ω) y. We consider the-reduction S : t →〈1,0〉 t →〈1,0〉 . . . that repeatedly contracts the redex Ω at〈1, 0〉. This reduction p-converges to ⊥ y if a0 = 0 and a1 = 1. The descendentof the redex occurrence 〈〉 in t by S is not a redex occurrence in ⊥ y, which is a-normal form.

If, in addition, a2 = 1, this phenomenon may also occur for developments.Let Iω be a lambda tree with Iω = (λx.x)Iω, and let t = (λx.Iω) y. Both Iω andt are lambda trees in T 011

⊥ . Let U be the set of all occurrences of Iω in t. Acomplete development of U in t, e.g. S : t →〈1,0〉 t →〈1,0〉 . . . , p-converges to⊥ y. Again, 〈〉 is a redex occurrence in t, but its descendant by S is not a redexoccurrence in ⊥ y.

Proposition B.11. Let S : s p S t, and a0 = 1 or a1 = 0. If U is a set ofredex occurrences in s, then U//S is a set of redex occurrences in t.

Proof. Let S = (tι →pι tι+1)ι<α. We proceed by induction on α. The caseα = 0 is trivial, and for α a successor ordinal the statement follows immediatelyfrom the induction hypothesis.

Let α be a limit ordinal. To prove the statement, we assume some p ∈ U//Sand show that t|p is a S-redex. According to Lemma B.2, p ∈ U//S impliesthat there is some β < α such that

p ∈ U//S|β and ∀β ≤ ι < α : pι↓a 6≤ p (1)

By the induction hypothesis, we know that tβ |p is a S-redex.

• We first consider the case that tβ |p is a -redex, i.e. tβ(p · 〈1〉) = λ.

We proceed by showing the following two statements for all β ≤ γ ≤ α,where tα = t:

tγ(p · 〈1〉) = λ (2)

cι(p · 〈1〉) = λ for all β ≤ ι < γ (3)

For the case γ = α, we then obtain that t(p · 〈1〉) = λ, i.e. t|p is a -redex.

For the case γ = β, we have already shown (2) above, and (3) is vacuouslytrue.

Let γ = γ′ + 1 > β. According to the induction hypothesis, (3) holds forγ′, which means it remains to be shown that tγ(p · 〈1〉) = cγ′(p · 〈1〉) = λ.We consider cγ′ first. If pγ′↓a 6≤ p · 〈1〉, then

cγ′(p · 〈1〉) = tγ′(p · 〈1〉)IH= λ

Otherwise, by (1), pγ′↓a must be equal to p · 〈1〉. This can only happenif a1 = 1. Hence, according to the assumption about a, we know thata0 = 1. Moreover, tγ′ |p·〈1〉 cannot be a -redex because, by the induction

39

Page 40: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

hypothesis, tγ′(p · 〈1〉) = λ. Consequently, pγ′ ≥ p · 〈1, 0〉, which is notpossible since a0 = 1 and pγ′↓a = p · 〈1〉.Next we consider tγ : since cγ′ Ea⊥ tγ , we have tγ(p · 〈1〉) = cγ′(p · 〈1〉) = λ.

Finally, let γ be a limit ordinal. Then (3) follows immediately from theinduction hypothesis. We will show that p · 〈1〉 ∈ D(s) for s =

dβ≤ι<γ cι.

Since s Ea⊥ cβ , tγ , we then have:

tγ(p · 〈1〉) sEa⊥tγ= s(p · 〈1〉) sE

a⊥cβ= cβ(p · 〈1〉) IH

= λ

We know that pι↓a 6≤ p · 〈1〉 · w for all β ≤ ι < γ and w with |w|a = 0.Otherwise, we would have pι↓a ≤ p · 〈1〉 for some β ≤ ι < γ, which wouldcontradict the induction hypothesis for (2) if pι↓a = p · 〈1〉, and (1) ifpι↓a ≤ p. Since we know from induction hypothesis for (3), that, for eachβ ≤ ι < γ, we have that p · 〈1〉 ∈ D(cι), we can apply Lemma 4.6, conclude

that also p·〈1〉·w ∈ D(cι) for all w with |w|a = 0. Consequently, accordingto Proposition 3.5, we have that p · 〈1〉 ∈ D(s).

• Finally we consider the case that tβ |p is an S-redex, i.e. p · 〈i〉 ∈ D⊥(tβ)for some i with ai = 0.

We can then show by a simple induction proof that the following holds forall β ≤ γ ≤ α, where tα = t:

p · 〈i〉 ∈ D⊥(tγ) (4)

For the case γ = α, we then obtain that p·〈i〉 ∈ D⊥(t), i.e. t|p is a S-redex.

The case γ = β is trivial.

If γ = γ′ + 1, then p · 〈i〉 ∈ D⊥(tγ) follows from the induction hypothesis(p · 〈i〉 ∈ D⊥(tγ′)) and the fact that by (1), pγ 6≤ p.Let γ be a limit ordinal. Then p · 〈i〉 ∈ D⊥(tγ) follows from Corol-lary A.14 (ii) using (1).

For the remainder of this section we (tacitly) restrict ourselves to strictnesssignatures a with a0 = 1 or a1 = 0. This restriction is necessary in orderfor the following definition of developments to make sense, since it depends onProposition B.11.

For technical reasons, we have to generalise the notion of developments. Adevelopment of a set of redex occurrences U in s is typically only allowed tocontract redexes occurrences that are descendants of redex occurrences in U . Inaddition to that we also allow developments to contract any S-redex.

Definition B.12 (developments). Let s ∈ T a⊥ and U a set of redex occurrencesin s.

(i) A reduction S : sp S t is a development of U if each ι-th step φι : tι →pι

tι+1 of S contracts a redex at a position pι ∈ U//S|ι or an S-redex.

(ii) A development S : s p S t of U is called almost complete if S//U = ∅.If, in addition, t is an S-normal form, then S is called complete, denotedS : sp U t.a

40

Page 41: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

Definition B.13. Given t ∈ T a⊥ , the set DS(t) is the smallest set satisfying thefollowing:

(a) D⊥(t) ⊆ DS(t);

(b) If p · 〈i〉 ∈ DS(t) and ai = 0, then p ∈ DS(t); and

(c) If p ∈ DS(t) and p · 〈i〉 ∈ DS(t), then p · 〈i〉 ∈ DS(t).

Proposition B.14. S is infinitarily normalising and confluent. The uniqueS-normal form t↓S of t can be characterised as follows:

D(t↓S) = D(t) \ DS(t) t↓S(p) = t(p) for all p ∈ D(t↓S)

Proof. Let t ∈ T a⊥ and define t↓S as the restriction of t to the domain D(t) \DS(t). By (c) of Definition B.13 this definition yields a well-defined lambdatree. Moreover, t↓S is clearly an S-normal form.

To prove the proposition, we assume a reduction S : t p S u and show thatthen up S t↓S. It is easy to see that any reduction step in S contracts a S-redexat a position in DS(t), and thus DS(u) ⊆ DS(t). Then a reduction u p S t↓Scan be obtained by contracting all S-redexes by an innermost parallel reductionstrategy.

According to Proposition B.14, each lambda tree t ∈ T a⊥ has a unique S-normal form. We write t↓S to denote this unique normal form. Moreover, thisS-normal form

Proposition B.15. Every set of redex occurrences has a complete development.

Proof. Below, we construct an almost complete development t0 p S s. Thisalmost complete development can be extended to a complete development bya reduction s p S s↓S to the S-normal form s↓S, which exists according toProposition B.14.

Let t0 ∈ T a⊥ , U0 a set of redex occurrences in t0 and V0 the set of outer-most redex occurrences in U0. Furthermore, let S0 : t0 p V0

t1 be some completedevelopment of V0 in t0. S0 can be constructed by contracting the redex occur-rences in V0 in a left-to-right order. This step can be continued for each i < ωby taking Ui+1 = Ui//Si, where Si : ti p Vi ti+1 is some complete developmentof Vi in ti with Vi the set of outermost redex occurrences in Ui.

Note that then, by iterating Proposition B.9, we have that

U//S0 · . . . · Sn−1 = Un for all n < ω (1)

If there is some n < ω for which Un = ∅, then S0 · . . . · Sn−1 is a completedevelopment of U according to (1).

If this is not the case, consider the reduction S =∏i<ω Si, i.e. the concate-

nation of all ’Si’s. We claim that S is a complete development of U . Supposethat this is not the case, i.e. U//S 6= ∅. Hence, there is some u ∈ U//S. Sinceall ’Ui’s are non-empty, so are the ’Vi’s. Consequently, all ’Si’s are non-emptyreductions which implies that S is an open reduction. Therefore, we can ap-ply Lemma B.2 to infer from u ∈ U//S that there is some α < |S| such thatu ∈ U//S|α and all reduction steps beyond α do not take place at u or above.This is not possible due to the parallel-outermost reduction strategy that Sfollows.

41

Page 42: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

Next we want to show that the final lambda tree of complete developmentsis uniquely determined by the start lambda tree and the set of redexes. Tothis end we restrict ourselves to strictness signatures 111, 101 and 001, sincethis uniqueness of complete developments fails for all other strictness signatures(except for the trivial 000).

Example B.16. At first let a2 = 0, and let a1 = 1 or a0 = 1. Hence, thelambda tree s with s = (λx.s) x is in T a⊥ . Given t = (λx.y) s, we find twocomplete developments of the set of all redex occurrences in t: t p ⊥ (bycontracting s to itself repeatedly) and t→ y.

If we had chosen a more strict notion of complete developments, that doesnot contract arbitrary S-redexes, then the uniqueness of complete developmentswould also fail for 101 and 001: Let a2 = 1. Then the lambda tree Iω withIω = (λx.x) Iω is in T a⊥ . At first consider a1 = 0 and t = (λx.x y) Iω. Thenwe have two complete developments of the set of all redex occurrences in t:t p (λx.x y)⊥ → ⊥ y and t → I

ω y p ⊥. Similarly, given a0 = 0, andt = (λx.λy.x) Iω, we have tp (λx.λy.x)⊥ → λy.⊥ and t→ λy.I

ω p ⊥.

Definition B.17 (paths). Given a lambda tree t ∈ T a⊥ and U a set of redexoccurrences in t, a U -path in t (or simply path) is a finite sequence of lengthover the set D(t)∪D⊥(t)]0, 1, 2, λ,V of the form 〈n0, e0, n1, e1, . . . , el−1, nl〉,subject to a number of restrictions. We write paths using the notation n0

e0→n1

e1→ · · · el−1→ nl, and call ni nodes and ei edges. Nodes range over D(t)∪D⊥(t)

and edges over 0, 1, 2, λ,V. If a path contains niei→ ni+1, we say that ni has

an outgoing ei-edge to ni+1.The set of well-formed U -paths in t, denoted P(t, U), is defined as follows.

Each path starts with the node 〈〉 and must end in a node. For each node nwith an outgoing e-edge to n′, we require that n ∈ P(t) and that one of thefollowing conditions holds:

(a) If n 6∈ U , then n′ = n · 〈i〉 and e = i.

(b) If n ∈ U , then n′ = n · 〈1, 0〉 and e = λ.

(c) If t(n) = p · 〈1〉 ∈ D(t) and p ∈ U , then n′ = p · 〈2〉 and e = V.

Note that for (a), we implicitly require that n · 〈i〉 ∈ D(t) ∪ D⊥(t).

Note that the path consisting only of a single node 〈〉 is a path in any lambdatree.

Definition B.18 (diverging paths). Let t ∈ T a⊥ and U a set of redex occurrencesin t. The set of diverging U -paths in t, denoted P⊥(t, U), is the subset of P(t, U)inductively defined as follows:

(a) Let nk ∈ D(t) ∪ D⊥(t) and ek ∈ λ,V ∪ i | ai = 0 for all k ≥ 0. If

Pe0→ n0

e1→ n1e2→ · · · em→ nm is a path in P(t, U) for each m ≥ 0, then

P ∈ P⊥(t, U).

(b) If P ∈ P(t, U) ends in a node n ∈ D⊥(t), then P ∈ P⊥(t, U).

(c) If Pi→ n ∈ P⊥(t, U) with ai = 0, then P ∈ P⊥(t, U).

(d) If P ∈ P⊥(t, U) and Pi→ n ∈ P(t, U), then P

i→ n ∈ P⊥(t, U).

42

Page 43: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

Definition B.19 (terminated paths). Let t ∈ T a⊥ , U a set of redex occurrencesin t, and P a U -path in t.

(i) The position of P , denoted pos(P ), is the subsequence of P containingonly (and all) i-edges (with i ∈ 0, 1, 2), i.e.

pos(n) = 〈〉 pos(Pe→ n) =

pos(P ) · 〈e〉 if e ∈ 0, 1, 2pos(P ) if e ∈ λ,V

(ii) P is called terminated if it is not diverging, does not end in a node n ∈ U ,and cannot be extended with a V-edge, i.e. there is no U -path in t of the

form PV→ n′. The set of all terminated U -paths in t is denoted PT (t, U).

(iii) If P is terminated, we define the labelling of P , denoted lab(P ), as follows:

lab(P ) =

t(n) if P terminates in a node n with t(n) ∈ L \ Ppos(Q) if P terminates in a node n with t(n) ∈ P and

Q is the longest prefix of P that ends in t(n)

Lemma B.20. Let S : s p t be a development of a set U of redex occurrencesin s. Then there is a surjective mapping θS : PT (s, U) → PT (t, U//S) thatpreserves pos(·) and lab(·), i.e.

pos(θS(P )) = pos(P ) and lab(θS(P )) = lab(P ) for all P ∈ PT (s, U).

Proof. Let S = (tι →pι tι+1)ι<α. We proceed by induction on α. The caseα = 0 is trivial. If α is a successor ordinal, the statement follows from theinduction hypothesis by careful case analysis (similar to [10]).

Let α be a limit ordinal. Furthermore, let P ∈ PT (t0, U) and let Pι = θS|ι(P )for all ι < α. The latter is well-defined by the induction hypothesis. Since eachPι is terminated, no node in Pι is a volatile position in S. Hence, there is someβ < α such that pι↓a is not a node in Pι for all β ≤ ι < α. Consequently,Pι = Pβ for all β ≤ ι < α. From the characterisation of lubs and glbs fromTheorem 3.4 and Proposition 3.5 we can then derive that Pβ is also a U//S-path in tα. Additionally, Pβ must also be terminated in tα, and we thus havethat Pβ ∈ PT (tα, U//S). Define θS(P ) = Pβ . Preservation of pos(·) and lab(·)follows from the induction hypothesis.

To show that the thus defined function θS is indeed surjective, we assumesome P ∈ PT (tα, U//S) and show that there is some Q ∈ PT (t0, U) withθS(Q) = P .

Let V be the set of nodes in P (which are positions in tα). Since V is finite,we may apply Lemma A.13 (i), to obtain some β < α such that tι(p) = tα(p)and pι↓a 6≤ p for all β ≤ ι < α and p ∈ V . Consequently, P is a terminatedU//S|β-path in tβ , i.e. P ∈ PT (tβ , U//S|β). Since, by induction hypothesis θS|βis surjective, there is some Q ∈ PT (t0, U) with θS|β (Q) = P . Hence, accordingto the definition of θS , we have that θS(Q) = P .

We can use the above lemma to directly define the uniquely determinedfinal lambda tree of an arbitrary complete development of a given set of redexoccurrences:

43

Page 44: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

Definition B.21. Let t ∈ T a⊥ and U a set of redex occurrences in t. Thendefine the set of path labellings of t w.r.t. U , denoted PL(t, U), as follows:

PL(t, U) = (pos(P ), lab(P )) |P ∈ PT (t, U)

Lemma B.22. Let P be a U -path in t with U = ∅. Then

(i) P ends in the node pos(P ), and

(ii) P ∈ PT (t, ∅) iff P 6∈ P⊥(t, ∅).

Proof. (i) We proceed by induction on P . If P consists of a single node,

which thus has to be 〈〉, then pos(P ) = 〈〉. Otherwise, P = Qi→ n and

by induction hypothesis we have that Q ends in pos(Q). Since the set Uof redex occurrences is empty, only (a) of Definition B.17 is applicable.Hence, we then have that n = pos(Q) · 〈i〉, which is also the position of P .

(ii) Since U = ∅, P cannot end in a node in U . Moreover, P cannot beextended by a V edge, since U = ∅ implies that all edges are labelled withnumbers from 0, 1, 2. Hence, by definition, P 6∈ P⊥(t, ∅) necessary andsufficient for P ∈ PT (t, ∅).

Lemma B.23. If t ∈ T a⊥ and U = ∅, then P⊥(t, U) is the least subset of P(t, U)satisfying conditions (b) - (d) of Definition B.18.

Proof. Let P be the least subset satisfying conditions (b) - (d) of Definition B.18.Hence, P ⊆ P⊥(t, U). To show that P ⊇ P⊥(t, U), we need to show that Psatisfies (a) as well. To this end, we show that the precondition of (a) can neverbe satisfied.

Let nk ∈ D(t)∪D⊥(t) and ek ∈ λ,V∪i | ai = 0 for all k ≥ 0. Moreover,

let Pe0→ n0

e1→ n1e2→ · · · em→ nm is a path in P(t, U) for each m ≥ 0. We show

that this assumption leads to a contradiction.Since U = ∅, we know that ek 6∈ λ,V, and thus ek ∈ i | ai = 0. Define

the infinite sequence S = pos(P ) · 〈e0, e1, e2, . . .〉. By Lemma B.22, S is aninfinite branch in t. Moreover, since ek ∈ i | ai = 0 for all k ≥ 0, we knowthat S a-bounded. This contradicts the assumption that t ∈ T a⊥ .

Lemma B.24. The mapping θ : PT (t, ∅) → D(t↓S) with θ(P ) = pos(P ) is abijection.

Proof. It is easy to show by induction that pos(·) : P(t, ∅) → D(t) ∪ D⊥(t) is abijection. Moreover, D(t↓S) = D(t)\DS(t) by Proposition B.14, and PT (t, ∅) =P(t, ∅) \ P⊥(t, ∅), by Lemma B.22 (ii). Hence, it suffices to show that P ∈P⊥(t, ∅) iff pos(P ) ∈ DS(t) for all P ∈ P(t, ∅).

We first prove the “only if” direction by induction on P ∈ P⊥(t, ∅). ByLemma B.23, we only have to consider the cases (b)-(d) of Definition B.18.

(b) Let P ∈ P(t, ∅) such that P ends in a node n ∈ D⊥(t). Hence, n ∈ DS(t).Since pos(P ) = n by Lemma B.22, we have that pos(P ) ∈ DS(t).

(c) Let Pi→ n ∈ P⊥(t, ∅) and ai = 0. By induction hypothesis, pos(P

i

)∈

DS(t). Since pos(Pi

)= pos(P ) · 〈i〉, we then have pos(P ) ∈ DS(t).

44

Page 45: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

(d) Let P = Qi→ n and Q ∈ P⊥(t, ∅). By induction hypothesis, pos(Q) ∈

DS(t). Since pos(P ) = pos(Q) · 〈i〉, we then have pos(P ) ∈ DS(t).

The converse direction follows by a similar proof by induction on P ∈ P(t, ∅).

From the definition of paths, we can derive that the set of path labellings ofa lambda tree w.r.t. the empty set is the graph of the lambda tree itself:

Lemma B.25. For all t ∈ T a⊥ , we have that PL(t, ∅) = t↓S.

Proof. By Lemma B.24 and Proposition B.14, it suffices to show that lab(P ) =t(pos(P )) for all P ∈ PT (t, ∅). Let P ∈ PT (t, ∅):

• If t(pos(P )) ∈ L \ P, then lab(P ) = t(n), where n is the node P ends in.By Lemma B.22, n = pos(P ). Thus, lab(P ) = t(pos(P )).

• If t(pos(P )) ∈ P, then lab(P ) = pos(Q), where Q is the unique path thatends in t(pos(P )). Thus, lab(P ) = t(pos(P ))

Moreover, from Lemma B.20 and Lemma B.25, we can immediately derivethe following corollary:

Corollary B.26. For each complete development sp U t, we have PL(s, U) =t.

Proof. PL(s, U)Lemma B.20

= PL(t, ∅) Lemma B.25= t↓S = t.

The equality t↓S = t follows from the fact that t is a S-normal form by thedefinition of complete developments.

From this corollary we may derive the following two corollaries.

Corollary B.27. Given two complete developments s p U t1 and s p U t2, wehave that t1 = t2.

Proof. Immediate from Corollary B.26

Corollary B.28. For every pair of complete developments S : s p U t1 andT : sp V t2, we find two complete developments S′ : t1 p V//S t and T ′ : t2 p U//T

t.

Proof. By Propositions B.4 and B.9, S ·S′ and T ·T ′ are complete developmentsof U ∪ V . Hence, according to Corollary B.27, they p-converge to the samelambda tree.

Corollary B.27 shows that the final term of a complete development isuniquely determined, no matter in which order redexes are contracted. Onecan also show that descendants are uniquely determined as well, i.e. given twocomplete developments S : s p U t1 and T : s p U t2 and a set of positionsV ⊆ D(s), we have that V//S = V//T . This suggest the notation V//U for thedescendants of V in s by a complete development of U in s.

However, there is no need to prove that this is the case since none of ourproofs depend on it. We are only interested in the final term of a complete

45

Page 46: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

t0 t1 tβ tβ+1 tα

s0 s1 sβ sβ+1 sα

p0

U0 U1

Uβ Uβ+1 Uα

p0//U0 pβ//Uβ

S

Figure 1: The Infinitary Strip Lemma.

development: we know that a complete development of U followed by a com-plete development of V//U is a complete development of U ∪ V , and accordingto Corollary B.27, the final term of such a complete development is uniquelydetermined (independent of whether V//U is uniquely determined).

We conclude with the proof of the strip lemma:

Lemma B.29. Let S : t0 p tα a p-convergent reduction, and T : t0 p U s0a complete development of a set U of redex occurrences in t0. Then tα ands0 are joinable by a reduction S/T : s0 p sα and a complete developmentT/S : tα p U//S sα.

Proof. Let S = (tι →pι tι+1)ι<α. To prove this proposition, we constructthe diagram shown in Figure 1. The ’Uι’s in the diagram are sets of redexoccurrences: Uι = U//S|ι for all 0 ≤ ι ≤ α. In particular, U0 = U . That eachUι is indeed a set of redex occurrences in tι follows from Proposition B.11. Allarrows in the diagram represent complete developments of the indicated setsof redex occurrences. Particularly, in each ι-th step of S the redex at pι iscontracted. We will construct the diagram by an induction on α.

If α = 0, the diagram is trivial. If α is a successor ordinal β+1, then we cantake the diagram for the prefix S|β , which exists by the induction hypothesis,and extend it to a diagram for S. The necessary square to extend the diagramfollows from Corollary B.28.

Let α be a limit ordinal. By induction hypothesis, the diagram exists foreach proper prefix of S. Let Tι : s0 p sι denote the reduction at the bottom ofthe diagram for the reduction S|ι for each ι < α. Since (Tι)ι<α is a monotonesequence, S/T =

⊔ι<α Tι is a well-defined -reduction. Moreover since each Tι

is p-convergent, S/T is p-continuous. Hence, it is also p-convergent, i.e. there issome sα such that S/T : s0 p sα.

Let T 0 : tα p Uα s be a complete development of Uα in tα. It remains tobe shown that s = sα. To this end, assume that T 0 = (φι : rι →qι rι+1)ι<α.Moreover, we assume the following factorisations of T 0: for each ι < α, letT 1ι , T

2ι be such that T 0 = T 1

ι · 〈φι〉 · T 2ι .

Let p ∈ D(s). According to Lemma B.6, we find for each ι < α some uι ∈D(rι) such that p ∈ uι//〈φι〉 · T 2

ι . By Lemma B.7, we have that s(p) = tα(u0).Hence, by Lemma A.13 (i), we find some β < α such that tι(u0) = tα(u0) andpι 6≤ u0 for all β ≤ ι < α.

By Lemma B.2, we know that there must be some β < α such that qι 6≤ uιfor all β ≤ ι < α. Consequently, we may assume w.l.o.g. that β is chosen largeenough such that sι(u0) = tι(u0) for all β ≤ ι < α. Moreover, there must

46

Page 47: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

be an upper bound β ≤ γ < α such that, sι(p) = tι(u0) and if vι ∈ pι//Uι,then vι 6≤ p for all γ ≤ ι < α. Then, if S/T is closed, we trivially have thatsα(p) = tγ(u0). Otherwise, if S/T is open, we can apply Lemma A.13 (ii) toobtain that sα(p) = tγ(u0). Combining the equalities we have found, we obtainthat sα(p) = tγ(u0) = tα(u0) = s(p).

By a similar argument we can show that D⊥(s) ⊆ D⊥(sα). Consequently,we have that s = sα.

Lemma 5.16 (Infinitary Strip Lemma). Given reductions S : sp S t1 andT : s →∗S t2, there are reductions S′ : t1 p S t and T ′ : t2 p S t, provideda ∈ 001, 101, 111.

Proof. This follows by iterating Lemma B.29 for the special case that T a com-plete development of a single redex occurrence.

C Weak Convergence

We briefly give the definition and some of the properties of weak convergence.To distinguish this variant of convergence from the one in the main text of thispaper, we refer to the latter explicitly as strong (m-/p-) convergence.

Definition C.1 (weak convergence). An R-reduction S = (tι →R tι+1)ι<α iscalled weakly m-continuous resp. p-continuous if, for all limit ordinals γ < α, wehave that limι→γ tι = tγ resp. lim infι→γ tι = tγ ; S is said to weakly m-convergeresp. p-converge to t, denoted S : t0 →mR t resp. S : t0 →p R t, if it is weaklym-continuous and limι→α tι = t resp. weakly p-continuous and lim infι→α tι = t.

Intuitively, a reduction is continuous if it is well-defined at limit ordinalindices, and a reduction is convergent if it additionally has a final result. Sincethe partially ordered set (T a⊥ ,Ea⊥) forms a complete semilattice, every weaklyp-continuous reduction also weakly p-converges. In contrast, however, a weaklym-continuous reduction is not necessarily weakly m-convergent:

Example C.2. Given I = λx.x and t = λx.I x x, consider the -reduction t t→

I t t → t t → . . . , which is trivially m- and p-continuous. Since the subtreeat position 〈1〉 alternates between t and I t, the reduction does not weakly m-converge (for any a); but it does weakly p-converge to ⊥ t if a1 = 1 (i.e. position〈1〉 is non-strict) and to ⊥ if a1 = 0 (i.e. 〈1〉 is strict).

Transferring the results from Section 3 to weak convergence is trivial as thesenotions of convergence are directly based on the modes of convergence of theunderlying structures:

Theorem C.3. For each R-reduction S, we have the following:

(i) S : s →mR t =⇒ S : s →p R t.

(ii) S : s →p R t =⇒ S : s →mR t, provided S and t are total.

Proof. (i) follows from Theorem 3.8 (i), (ii) follows from Theorem 3.8 (i).

Note that for (ii) it is not enough to require that the reduction S is total,since t is not necessarily a part of S but may only arise as a limit inferior of thelambda trees in S.

47

Page 48: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

Corollary C.4. S : s →m t iff S : s →p t whenever S and t are total.

Another observation is that the strong notions of convergence indeed implytheir weak counterpart – however, with a small caveat for p-convergence. Toprove this, we need to prove the following observation:

Lemma C.5. Each t ∈ T ∞ is maximal in (T ∞⊥ ,Ea⊥).

Proof. Let t ∈ T ∞ and s ∈ T ∞⊥ with t Ea⊥ s. We prove that s = t by showingthat D(s) ⊆ D(t) by induction on the length of positions. If 〈〉 ∈ D(s), then〈〉 ∈ D(t) as t ∈ T ∞. If p · 〈0〉 ∈ D(s), then s(p) = λ. Since t Ea⊥ s and, byinduction hypothesis, p ∈ D(t), we know that t(p) = λ. As t ∈ T ∞, we canconclude that p · 〈0〉 ∈ D(t). The cases p · 〈1〉 and p · 〈2〉 follow analogously.

Lemma C.6. For each R-reduction S, we have the following:

(i) S : sm t implies S : s →m t.

(ii) S : sp t implies S : s →p t, provided S and t are total.

Proof. (i) follows immediately from the definition m-convergence. For (ii), weuse the fact that weak/strong p-convergence on lambda trees is an instantiationof the abstract notion of weak/strong p-convergence from [2]. Proposition 6.5from [2] states that (strong) p-convergence implies weak p-convergence if thelambda trees in S and the lambda tree t is maximal w.r.t. Ea⊥, which followsfrom Lemma C.5.

D Direct Proof of Correspondence

In this section we prove directly that the there is a one-to-one correspondencebetween the ideal completion (ΛI,a⊥ ,⊆) of (Λ⊥,≤a⊥) and the metric comple-

tion (ΛM,a⊥ ,da) of (Λ⊥,d

a). To this end we use the meta theory of Majster-Cederbaum and Baier [19].

The first step is to show that the metric da may be canonically derivedfrom the partial order ≤a⊥ by what Majster-Cederbaum and Baier call a weight,which in our case will be the height of lambda terms:

Definition D.1 (a-height). The a-height hgta (M) of a term M ∈ Λ⊥, is

hgta (M) = mind < ω

∣∣∣ ∀p ∈ P(M). |p|a < d

Instead of 111-height and hgt111 (·), we also use height and hgt (·), respectively.For each d < ω, define

↓da (M) =N ≤a⊥ M

∣∣∣ hgta (N) ≤ d

Alternatively, we may characterise the a-height of a term as follows.

Lemma D.2. For each M1,M2 ∈ Λ⊥, we have the following:

hgta (⊥) = 0 hgta (x) = 1

hgta (M1M2) = max

1, hgta (M1) + a1, hgta (M2) + a2

hgta (λx.M1) = max

1, hgta (M1) + a0

48

Page 49: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

Proof. Follows straightforwardly from the definition.

Lemma D.3. For all M,N ∈ Λ⊥ with M ≤a⊥ N , we have that P(M) ⊆ P(N).

Proof. We define the relation by M N iff P(M) ⊆ P(N), and show that satisfies the condition in Definition 3.1. Since ≤a⊥ is the least such relation,the lemma follows.

Since ⊆ is a preorder, so is . ⊥ M holds for all M since P(⊥) = ∅. LetM N . If p ∈ P(λx.M) then p = 〈0〉 · q with q ∈ P(M). By M N , wehave that q ∈ P(N) and thus p = 〈0〉 · q ∈ P(λx.N). Hence, λx.M λ.N . Theremaining two closure properties follow similarly.

Moreover, we have that the a-height satisfies the condition of a weight ac-cording to Majster-Cederbaum and Baier [19]:

Lemma D.4. For each M ∈ Λ⊥, we have that

(i) hgta (M) = 0 iff M = ⊥.

(ii) M ≤a⊥ N implies hgta (M) ≤ hgta (N).

(iii) For each d < ω, ↓da (M) has a greatest element.

Proof. (i) follows immediately from the definition; (ii) follows from Lemma D.3.For (iii), we construct by induction for each M ∈ Λ⊥ a term Md that is the

greatest element of ↓da (M). If d = 0, then Md is obviously ⊥. In the followingwe assume that d > 0. The cases M = x and M = ⊥ are trivial.

If M = M1M2, then we may assume, by induction hypothesis, terms Mdii

for di = d − ai. If Md11 Md2

2 ≤a⊥ M1M2 then define Md = Md11 Md2

2 ; otherwise

Md = ⊥. In either case, Md ≤a⊥ M and hgta(Md)≤ d, i.e. Md ∈ ↓da (M).

In order to show that Md is the greatest element in ↓da (M), we assume someN ∈ ↓da (M) and show that then N ≤a⊥ Md. We have that N ≤a⊥ M and thuseither N = ⊥, in which case N ≤a⊥ Md follows immediately, or N = N1N2 with

Ni ≤a⊥ Mi. In the latter case we then have, according to (ii), that hgta (Ni) ≤hgta (Mi) ≤ di, i.e. Ni ∈ ↓dia (Mi). By induction hypothesis, we thus have that

Ni ≤a⊥ Mdii . Note that this means that if Mdi

i = ⊥, then Ni = ⊥. SinceN ≤a⊥ M , this then implies that Mi = ⊥ or ai = 1. In sum, we thus have

that Md11 Md2

2 ≤a⊥ M and therefore Md = Md11 Md2

2 . It thus remains to be

shown that N1N2 ≤a⊥ Md11 Md1

1 . To this end, we show that N1N2 ≤a⊥ Md11 N2;

Md11 N2 ≤a⊥ M

d11 Md2

2 follows analogously.

If a1 = 1 or N 6= ⊥, then N1N2 ≤a⊥ Md11 N2 follows immediately from

N1 ≤a⊥ Md11 . If a1 = 0 and N1 = ⊥, then M1 = ⊥ follows from N ≤a⊥ M .

Consequently, M1 = ⊥ and N1N2 ≤a⊥ Md11 N2 follows by reflexivity.

The case M = λx.M ′ follows analogously.

In fact, a-height is a finite weight since, by definition, hgta (M) < ω for alllambda terms M .

According to Majster-Cederbaum and Baier [19], the measure provided byhgta (·) can thus be used to define an ultrametric d on Λ⊥ as follows:

d(M,N) =l

2−d∣∣∣ ↓da (M) = ↓da (N)

.

The following two lemmas, will help us show that d and da coincide.

49

Page 50: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

Lemma D.5. If all conflicts of M,N ∈ Λ⊥ have an a-depth of at least d, thenM ′ ≤a⊥ N for all M ′ ∈ ↓da (M).

Proof. We proceed by induction on M ′. If d = 0, then hgta (M ′) ≤ d impliesthat M ′ = ⊥ and thus M ′ ≤a⊥ N follows. In the following we thus assume d > 0.The case M = ⊥ is trivial. If M ′ = x, then also M = x. Since d > 0, 〈〉 is nota conflict of M,N , which means that N = x. Hence, M ′ ≤a⊥ N by reflexivity.

If M ′ = M ′1M′2, then M = M1M2 with M ′i ≤a⊥ Mi. Moreover, since d > 0,

〈〉 is not a conflict of M,N and thus N is of the form N = N1N2 and allconflicts of Mi, Ni have a-depth ≥ d − ai. Moreover, because, by Lemma D.2,hgta (M ′i) ≤ hgta (M ′) − ai ≤ d − ai, we may apply the induction hypothesisto obtain that M ′i ≤a⊥ Ni. In order to show that M ′ ≤a⊥ N , we show thatM ′1M

′2 ≤a⊥ N1M

′2; N1M

′2 ≤a⊥ N1N2 follows likewise. If a1 = 1 or M ′1 6= ⊥, then

M ′1M′2 ≤a⊥ N1M

′2 follows immediately fromM ′1 ≤a⊥ N1. Otherwise, if a1 = 0 and

M ′1 = ⊥, then M1 = ⊥ since M ′ ≤a⊥ M . Hence, also N1 = ⊥, since otherwise,〈1〉 is a conflict of M,N of a-depth 0. Consequently, M ′1M

′2 ≤a⊥ N1M

′2 follows

by reflexivity.The case M ′ = λx.M ′1 follows analogously.

Lemma D.6. For all M ∈ Λ⊥ \⊥ there is some N ≤a⊥ M with hgta (N) = 1.

Proof. We proceed by induction on M . If M = x, set N = x.Let M = M1M2. If Mi = ⊥ or ai = 1, set Ni = ⊥. Otherwise, there are, by

induction hypothesis, Ni ≤a⊥ Mi with hgta (Ni) = 1 and Ni 6= ⊥. In either caseset N = N1N2. Moreover, we have N = N1N2 ≤a⊥ M1N2 ≤a⊥ M1M2 = M and

hgta (N) = max

1, hgta (N1) + a1, hgta (N2) + a2

= 1.

The case M = λx.M ′ follows analogously.

Lemma D.7. If p is a conflict of M,N with a-depth d, then there is someM ′ ≤a⊥ M with hgta (M ′) = d + 1 and M ′ 6≤a⊥ N , or vice versa there is some

N ′ ≤a⊥ N with hgta (N ′) = d+ 1 and N ′ 6≤a⊥ M

Proof. We proceed by induction on p.Let p = 〈〉. Since 〈〉 a conflict, M,N cannot be both ⊥. W.l.o.g. assume that

M 6= ⊥. By Lemma D.6, there is some M ′ ≤a⊥ M of a-height 1. Hence, M ′ andM are either both the same variable, both applications or both abstractions.Hence, p is also a conflict of M ′, N , which implies that M ′ 6≤a⊥ N .

Let p = 〈i〉 · q. We assume that i = 1; the cases for i ∈ 0, 2 followanalogously. Since p is a conflict of M,N , we know that M = M1M2, N = N1N2

and q is a conflict of M1, N1. By induction hypothesis, we can assume w.l.o.g.that there is some M ′1 ≤a⊥ M1 of a-height d+ 1−a1 and with M ′1 6≤a⊥ N1. Fromthe latter we deduce that M ′1 6= ⊥ and thus M ′1M2 ≤a⊥ M . If a2 = 1 or M2 = ⊥,then set M ′2 = ⊥. We get that M ′1M

′2 ≤a⊥ M ′1M2. Otherwise, if a2 = 0 and

M2 6= ⊥, then there is, according to Lemma D.6, some M ′2 6= ⊥ of a-height 1with M ′2 ≤a⊥ M2. In either case, we have that M ′1M

′2 ≤a⊥ M ′1M2 ≤a⊥ M and that

hgta (M ′2) + a2 ≤ 1. The latter implies, by Lemma D.2, that hgta (M ′1M′2) =

maxhgta (M ′1) + a1, 1

= max d+ 1, 1 = d+ 1

50

Page 51: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

Finally, we can prove that two metrics d and da coincide:

Proposition D.8. For all M,N ∈ Λ⊥, we have that

da(M,N) =l

2−d∣∣∣ ↓da (M) = ↓da (M)

Proof. We write d(M,N) to denote the right-hand side of the above equation.If da(M,N) = 0, then M,N have no conflicts. By Lemma D.5, we then havethat ↓da (M) = ↓da (N) for all d < ω. Hence, d(M,N) = 0, too.

Otherwise, da(M,N) = 2−d such that there is a conflict p of M,N witha-depth d and each conflict of M,N has a-depth at least d. The former implies,by Lemma D.7, that ↓ea (M) 6= ↓ea (N) for all e > d and the latter implies, byLemma D.5, that ↓da (M) = ↓da (N). Hence, d(M,N) = 2−d as well.

The ultrametric induced by hgta (·) can be canonically extended to the ideal

completion ΛI,a⊥ of (Λ⊥,≤a⊥):

Definition D.9. For each set S ⊆ Λ⊥ and d < ω, define

⇓da (S) =M ∈ S

∣∣∣ hgta (M) ≤ d.

Define the distance measure daI on ΛI,a⊥ as follows:

daI (I, J) =l

2−d∣∣∣⇓da (I) = ⇓da (J)

According to Majster-Cederbaum and Baier [19], daI is an ultrametric. More-

over, they also show that the metric completion (da,ΛM,a⊥ ) is isometric to ideal

completion ΛI,a⊥ endowed with the metric daI whenever, each ⇓da (I) of an idealI is finite.

Lemma D.10. For each M,N ∈ Λ⊥ with M ≤a⊥ N and each p ∈ P(M) andp · 〈i〉 ∈ P(N) with ai = 0, we have that p · 〈i〉 ∈ P(M).

Proof. We proceed by induction on p. Note that M 6= ⊥ since P(M) 6= ∅. Letp = 〈〉. If i = 0, then N = λx.N1 and thus M = λx.M1. Since 〈0〉 ∈ P(N),we know that N1 6= ⊥. Because a0 = 0, this implies that M1 6= ⊥. Hence,〈0〉 ∈ P(M). The cases for i ∈ 1, 2 follow analogously.

Let p = 〈j〉 · q and assume j = 0. Then M = λx.M1, N = λx.N1, andM1 ≤a⊥ N1. Since q ∈ P(M1) and q · 〈i〉 ∈ P(N1), we may apply the inductionhypothesis to obtain that q · 〈i〉 ∈ P(M1). Consequently, 〈j〉 · q · 〈i〉 ∈ P(M1).The cases for j ∈ 1, 2 follow likewise.

Definition D.11. For each I ⊆ Λ⊥ define the set of positions P(I) of I as⋃M∈I P(M).

A set I in (Λ⊥,≤a⊥) is said to be finitely bounded if for each M,N ∈ I there

is some M ∈ Λ⊥ with M,N ≤a⊥ M .

Proposition D.12. Given a finitely bounded set I in (Λ⊥,≤a⊥), I is finite iffP(I) is finite.

51

Page 52: Strict Ideal Completions of the Lambda Calculus report.pdf · 1 Introduction In their seminal work on in nitary lambda calculus, Kennaway et al. [11] study ... form of lambda trees

Proof. The “only if” direction is trivial. For the converse direction, assume thatI is infinite. We show that Id = M ∈ I | hgt (M) ≤ d is finite for each d < ω.From this we can then deduce that for each d < ω, the set I \ Id is non-empty,i.e. there is an M ∈ I with a height greater than d. Consequently, for each d,there is a position p with height d in P(I), i.e. P(I) is infinite.

We show the above claim that Id is finite for any finitely bounded set I byinduction on d. The case d = 0 is trivial, since only ⊥ has depth 0. Let d > 0.We show that Id contains only finitely many different variables, applications andabstractions. For each two variables x, y ∈ Id, we find some M with x, y ≤a⊥ Msince I finitely bounded. Hence x = y. Let J = M | ∃N ∈ Λ⊥ : M N ∈ I andK = N | ∃M ∈ Λ⊥ : M N ∈ I . Then also J and K are finitely bounded. Foreach abstraction MN ∈ Id, we know that M ∈ Jd−1 and N ∈ Kd−1. Since, byinduction hypothesis, both Jd−1 and Kd−1 are finite, there are also only finitelymany applications in Id. The same argument applies to abstractions.

Lemma D.13. For each I ∈ ΛI,a⊥ and d < ω, ⇓da (I) is a finite set.

Proof. Assume that the lemma is not true, i.e. there is some I ∈ ΛI,a⊥ and

d < ω such that ⇓da (I) is an infinite set. According to Proposition D.12, the setP(⇓da (I)) is infinite, too.

Since there are only finitely many different sequences over 0, 1, 2 of a givenfinite length, there must be an infinite sequence q : ω → 0, 1, 2 such that

Pi =p ∈ P(⇓da (I))

∣∣∣ pi ≤ p is finite for all i < ω, where pi is the prefix of q

of length i.Note that since each pi ∈ P(⇓da (I)), we know that |pi|a ≤ d. Hence, there

must be a k < ω such that aq(i) = 0 for all i ≥ k.

Let M ∈ ⇓da (I) with pk ∈ P(M). We show by induction on i that pi ∈ P(M)for all i ≥ k, which is impossible as P(M) is finite. Thus our assumption thatthe lemma is not true is false.

The case i = k is trivial. Let i ≥ k and pi ∈ P(M). Moreover, let N bea term with pi+1 ∈ P(N). Since I is directed, we find a term M ′ ∈ I withM,N ≤a⊥ M ′. By Lemma D.3, we thus also have that pi+1 ∈ P(M ′). Sincepi+1 = pi · 〈aq(i+1)〉 with aq(i+1) = 0, we can derive from pi ∈ P(M) thatpi+1 ∈ P(M) according to Lemma D.10.

Proposition D.14. The pair (da,ΛM,a⊥ ) is isometric (daI ,Λ

I,a⊥ ).

Proof. This proposition follows from Theorem 3.16 of Majster-Cederbaum andBaier [19] with Lemma D.13 as hgta (·) is a finite weight.

52