A Nonstandard Standardization Theorem Beniamino Accattoli

Eduardo Bonelli

Delia Kesner

Carnegie Mellon University United States

Univ. Nac. de Quilmes and CONICET Argentina

Univ. Paris-Diderot, SPC, PPS, CNRS France

Carlos Lombardi Univ. Nac. de Quilmes and Univ. de Buenos Aires Univ. Paris-Diderot, SPC, PPS, CNRS Argentina and France

Abstract Standardization is a fundamental notion for connecting programming languages and rewriting calculi. Since both programming languages and calculi rely on substitution for defining their dynamics, explicit substitutions (ES) help further close the gap between theory and practice. This paper focuses on standardization for the linear substitution calculus, a calculus with ES capable of mimicking reduction in λcalculus and linear logic proof-nets. For the latter, proof-nets can be formalized by means of a simple equational theory over the linear substitution calculus. Contrary to other extant calculi with ES, our system can be equipped with a residual theory in the sense of L´evy, which is used to prove a left-to-right standardization theorem for the calculus with ES but without the equational theory. Such a theorem, however, does not lift from the calculus with ES to proof-nets, because the notion of left-to-right derivation is not preserved by the equational theory. We then relax the notion of left-to-right standard derivation, based on a total order on redexes, to a more liberal notion of standard derivation based on partial orders. Our proofs rely on Gonthier, L´evy, and Melli`es’ axiomatic theory for standardization. However, we go beyond merely applying their framework, revisiting some of its key concepts: we obtain uniqueness (modulo) of standard derivations in an abstract way and we provide a coinductive characterization of their key abstract notion of external redex. This last point is then used to give a simple proof that linear head reduction—a nondeterministic strategy having a central role in the theory of linear logic—is standard. Categories and Subject Descriptors F.3.2 [Logics and Meanings of Programs]: Semantics of Programming Languages - Operational semantics; F.4.1 [Mathematical Logic and Formal Languages]: Mathematical Logic - Lambda calculus and related systems; I.1.3 Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]. POPL ’14, January 22–24, 2014, San Diego, CA, USA. Copyright is held by the owner/author(s). Publication rights licensed to ACM. ACM 978-1-4503-2544-8/14/01. . . $15.00. http://dx.doi.org/10.1145/2535838.2535886

[Symbolic and Algebraic Manipulation]: Languages and Systems evaluation strategies General Terms Theory, Languages. Keywords Lambda-calculus, Standardization, Residuals, Explicit Substitutions, Linear Logic, Proof-Nets.

1.

Introduction

In his seminal paper [35] Plotkin introduced the idea of relating a calculus (given by means of an equational theory induced by a rewriting relation) and a programming language (specified as an abstract machine) via a standardization theorem: the programming language implements the standard strategy associated to the calculus. Let us recall what standardization is about. The idea is to identify a class of derivations, called standard, that is complete: whenever t  u then there is a standard derivation from t to u. Often, it is possible to describe a reduction strategy that produces standard derivations only (the leftmost-outermost strategy in the λ-calculus), and for which the normalization property holds as a corollary of the standardization theorem: if t has a normal form then the standard strategy will reach this normal form. Completeness and normalization are the justifications for Plotkin’s approach. Another approach to close the gap between calculi and programming languages is to resort to explicit substitutions (ES), that are refinements of λ-calculus where evaluation is decomposed into small steps, and that can be thought as a framework in which to specify abstract machines as strategies. It would be natural to expect calculi with ES to enjoy standardization theorems whose induced standard strategies justify abstract machines. Surprisingly, the literature does not present any such relationship. This is due to some inherent difficulties. Calculi with ES are complex and fragile rewriting systems for which already studying normalization is technically demanding. Standardization—that mixes confluence and termination arguments—generally is simply out of scope. In particular, ES calculi present critical pairs and thus lack orthogonality, a basic syntactic property enjoyed by the λcalculus and on which most standardization techniques rely on. This paper makes significant progress on standardization for ES. The starting point is a recent advance in the field of ES. A new generation of calculi with ES at a distance, having very simple meta-theories and conceived as behaviorally equivalent copies of graphical languages such as linear logic proof-nets, have recently been introduced by Accattoli and Kesner in [6] (see also [2, 3, 5]).

Traditional calculi with ES implement the ordinary substitution by percolating ES through the term structure until they reach variable occurrences, on which they finally substitute or get garbage collected. The key feature of distance calculi is that the percolating process is factored out from the computational process. Indeed, ES at a distance do not move: their dynamics is defined using contexts (i.e. terms with holes) that allows them to act directly on single variable occurrences (via a context isolating the occurrence), without any need to commute with the other constructors in between. The Framework. In this paper we focus on a specific calculus at a distance, the linear substitution calculus λlsub , that is both a slight generalization of a calculus by Robin Milner [33] (related to bigraphs), from which it inherits the substitution rules at a distance, and a slight modification of the structural λ-calculus by Accattoli and Kesner [6] (related to proof nets). Such a calculus has some relevant features: 1. Linear logic and concurrency: it is tightly connected with the translations of λ-calculus into linear logic [4] and the πcalculus [3]. In particular, reduction rules for ES act as exponential cut-elimination rules in linear logic (resp. replication in the π-calculus). 2. Linear head reduction (LHR): given the deep connection between λlsub and proof-nets [4], our calculus naturally expresses linear head reduction, a notion of evaluation for proof nets that is connected with other fundamental models [3, 5, 14, 15, 17, 29]. Notably, LHR is a strategy for λlsub , while it cannot be expressed as a strategy in λ-calculus. 3. Simplicity and expressiveness: the calculus is simple (only 3 rewriting rules) and it enjoys numerous desirable properties including: a tight correspondence with the lambda calculus (simulating β-reduction), confluence on terms and metaterms, preservation of strong β-normalisation and—as we will show— a theory of residuals. The linear substitution calculus—as do all other extant calculi with ES—presents critical pairs, and so standardization is nontrivial. However, λlsub enjoys a unique property, that we call semantical orthogonality. Orthogonality. Orthogonal (first and higher-order) term rewriting systems are defined as left-linear systems without critical pairs. They are the most studied class of rewriting systems, including in particular the λ-calculus. This notion of syntactic orthogonality is handy and simple, but it has the drawback of being too restrictive. Fortunately, orthogonality can be defined in a more abstract way, as the fact that residuals—a standard concept in rewriting theory (see Section 3)—are sufficient to close local confluence diagrams. This form of semantical orthogonality is a particular property of syntactic orthogonality, but it is of a behavioral nature and more general. The crucial point is that λlsub is not syntactically orthogonal but—in contrast to any other calculus with ES—is semantically orthogonal, as we prove in this paper. In this sense λlsub is the first calculus with ES that conservatively refines λ-calculus, preserving its orthogonality. Unfortunately, most techniques for standardization rely on syntactical orthogonality. An exception is the abstract theory of standardization developed by Gonthier, L´evy, and Melli`es (GLM) [19], and later refined by Melli`es [30, 32]. Such a theory can cope even with non semantically orthogonal calculi as the λσcalculus, but it takes a much simpler form in presence of semantical orthogonality. Left-to-Right Standardization and Beyond. Two first contributions of this paper are 1) a theory of residuals for λlsub and 2) a proof of the axioms of GLM’s theory. These technical results allow

us to obtain a left-to-right1 standardization theorem generalizing the well-known standardization theorem for λ-calculus, and capturing the deterministic weak (i.e. not reducing under abstractions) variant of LHR—that is the variant that actually matches evaluation in the Krivine Abstract Machine and the π-calculus—as a standard strategy. It is pleasing that the properties of left-to-right derivations extend naturally to λlsub . However, such a standardization theorem is not fully satisfying. A first reason is that LHR (without the weak restriction) is a nondeterministic strategy whose sequences are not necessarily leftto-right standard. However, the nondeterminism of LHR does not affect the final result nor the length of evaluation sequences (technically, LHR enjoys the diamond property). It is then disappointing that LHR is not left-to-right standard, because LHR is a crucial notion in the theory of linear logic. A second reason for not being satisfied with the left-to-right standardization theorem concerns the close relationship between the linear substitution calculus and linear logic proof-nets, the model behind its inception. Terms and proof-nets are behaviorally equivalent in a strong sense: every term t maps to a proof-net Pt , and every evaluation step on t or Pt maps to an evaluation step on the other. Additionally, the redexes are in bijection and so concepts such as residuals transfer from terms to proof-nets and viceversa. The interest of proof-nets is that they provide a quotient of terms; remarkably, this quotient can be explicitly characterized by a simple equational theory ∼ (in the style of [6, 23], and here generated by 3 equations only) turning the behavioral equivalence with linear logic proof-nets into a true isomorphism: for every proof-net P there is a ∼-class containing all and only the terms behaviorally equivalent to P . Consequently, any notion or result that is stable by equivalence ∼ immediately lifts to proof-nets. Unfortunately, leftto-right derivations in the linear substitution calculus are not stable by ∼, because ∼ swaps some constructors, inverting the relative position of some redexes. Thus, our left-to-right standardization theorem does not hold for proof-nets. This is quite disappointing because proof nets provide an operational model, and one would like to have a notion of standard derivation that can be freely transported from the language to the model and viceversa. We then refine our left-to-right standardization theorem. Partial Standardization Orders. Standard derivations are defined as those reductions that respect a certain order on redexes, for instance the left-to-right order. In GLM’s theory such a total order is replaced by a partial order, providing a more general but also subtler setting. To achieve a notion of standard derivation that is stable by ∼ we are forced to relax the total left-to-right order into a partial order. In the setting of total orders, given a derivation ρ : t  u there is a unique standard derivation ρ0 to which ρ standardizes, and moreover a deterministic and normalizing standard strategy can be easily obtained by selecting the minimum redex according to the order. When the order is partial, instead, there can be many standard derivations to which a derivation standardizes, i.e. uniqueness is lost: a standard derivation is an ordered derivation but only up to swaps of ≺-disjoint steps. Moreover, although GLM’s theory does support partial orders, it requires a number of axioms to hold, some of which are not enjoyed by λlsub modulo ∼. So we shall switch to the axiomatics of Melli`es’ PhD thesis [32], which is more general and allows us to prove existence of standard derivations for a suitable partial order. However, alas, λlsub modulo ∼ does not even satisfy the axioms of [32] required to obtain uniqueness of stan1 We

distinguish between the leftmost strategy (that repeatedly reduces the leftmost redex) from left-to-right standardization that re-arranges redexes (not necessarily involving the leftmost redex) from left to right. We also use leftmost (considering terms as strings of symbols) for what is sometimes called leftmost-outermost (that is relative to terms seen as trees).

dard derivations. Nor does it supply us with the guarantee that reducing external redexes—the generalization to partial orders of the notion of minimum redexes in the setting of total orders—leads to normal forms. We circumvent these inadequacies of the axiomatic framework by exploiting the embedding of a partial order into a total order, thus proving uniqueness (modulo swappings) of standard derivations and the normalization of a (specific) external strategy. Main Contributions. A summary of our results follows: 1. The Standardization Theorem. We identify a partial order ≺B that is related to the concept of exponential box in linear logic proof-nets, and that is stable by ∼. We show that Melli`es’ axioms for existence of a standard derivation hold for ≺B , obtaining a standardization theorem for λlsub modulo ∼. 2. Uniqueness Modulo. For partial orders, GLM’s theory has some additional axioms that ensures uniqueness modulo independent swaps (see Section 8) but one of these axioms does not hold for λlsub . Nonetheless, we prove uniqueness in an abstract way, relying on the embedding of the partial box order into the total left-to-right order. 3. Coinductive External Redexes. In GLM’s theory external redexes are defined somewhat indirectly, via an extraction process [32]. We clarify this concept by providing a direct and simple coinductive characterization: an external redex is a minimal redex that is persistently minimal, i.e. whose (unique) residual after any other redex is still external. 4. Applications. We use the coinductive characterization of external redexes to obtain a normalization theorem for the leftmost strategy and to give a concise proof by coinduction of the fact that LHR is a standard strategy. The nonstandard character of our standardization result comes at least from the following facts: highlight of the first semantical orthogonal calculus with ES being isomorphic to linear logic proofnets and enjoying standardization; use of a partial (vs total) order on redexes being stable by equivalence classes; proof of uniqueness (modulo) of standard derivations by means of simple arguments and an original application of GLM’s theory to a non-syntactical orthogonal case. Abstract Machines. As mentioned before, we will show that weak LHR is a standard strategy. In parallel, Accattoli, Barenbaum and Mazza [7] studied the relationship between abstract machines and calculi at a distance obtaining that weak LHR is the strategy implemented by the Krivine Abstract Machine, up to a certain notion of structural equivalence. This result refines a similar one by Danos and Regnier [14], and completes the lifting of Plotkins’s approach (relating the SECD machine with a standard strategy in the call-by-value λ-calculus) to the granularity of explicit substitutions. Moreover, [7] contains similar correspondences between machines for call-by-value (the CEK and Leroy’s ZINC) and callby-need (Sestoft’s machine) and some variations over weak LHR. We are confident that the new understanding of standardization for ES provided by our work will lead to analogous standardization theorems for call-by-value and call-by-need variant of the linear substitution calculus, completing the picture. Related Work. A brief history of standardization may be found in [30]. Standardization was introduced in 1958 by Curry and Feys [13] for the lambda calculus. L´evy [27] strengthens this result by defining the notion of permutation equivalence and showing that every derivation has a unique standard derivation in each equivalence class. Huet and L´evy [21] extend these ideas to first-order term rewriting without critical pairs and also show that one must abandon the left-to-right order for more general orders in these

systems. Klop gives the first abstract proof of standardization and applies these ideas to higher-order rewriting [26]. Boudol [10] extends Huet and L´evy’s work to term rewriting systems with critical pairs. Clark and Kennaway [12], Khasidashvili and Glauert [25], Paolini and Ronchi Della Rocca [34], and Xi [41] provide further generalizations along various axes. Gonthier, L´evy and Melli`es [19] introduce an axiomatic approach to standardization, later refined by Melli`es [30, 32], that has turned out to be convenient to deal with our case, due to its abstract nature. Indeed, simple techniques such as Plotkin’s inductive reasoning in [35] or the proof terms technique by van Oostrom and De Vrijer [40]—extended to the higher-order case by Bruggink [11]—are not easily adaptable to our equational setting. Takahashi’s technique [37] does not apply either. There is no relationship between our results and standardization by levels for linear logic proof-nets2 : both approaches use partial orders, but such orders are incomparable. This is a further reason to consider our result as nonstandard. Plan of the Paper. The next section introduces the linear substitution calculus. Section 3 defines residuals and Section 4 shows that residuals are compatible with the equivalence ∼ in a very strong sense. Section 5 explains the ideas behind the abstract approach to standardization and Section 6 proves the left-to-right standardization theorem. Section 7 explains how the left-to-right order can be relaxed to cope with the equational theory and Section 8 proves our equational standardization theorem. Section 9 provides uniqueness of standard derivations. Section 10 presents a coinductive characterization of external redexes and Section 11 proves the normalization theorem and the fact that (weak) linear head reduction is standard.

2.

The Linear Substitution Calculus

The set of terms of the linear substitution calculus, denoted by T , is generated by the following grammar: t ::= x | tt | λx.t | t[x/t] A term x is called a variable, tu an application, λx.t an abstraction and t[x/u] an explicit substitution. The notions of free and bound variables are defined as usual plus fv(t[x/u]) := fv(t) \ {x} ∪ fv(u). We work with the standard notion of α-conversion (i.e. renaming of bound variables for abstractions and substitutions). We use C to denote a context w.r.t. the previous grammar (i.e. a term with a unique occurrence of a designated symbol  called the hole). We write C[t] for the term obtained by replacing the hole of C by the term t. We write C[[u]] when the free variables of u are not captured by the context C, i.e. there are no abstractions or explicit substitutions in C that bind the variables of fv(u). The λlsub -calculus is given by the set of terms T and by the reduction relation →λlsub defined as the union of →dB , →ls , and →gc , which are the closure by contexts C of the following rewriting rules, where L denotes a (possibly empty) list of substitutions [x1 /t1 ] . . . [xk /tk ]: (λx.t)Lu C[[x]][x/u] t[x/u]

7→db 7 ls → 7 gc →

t[x/u]L C[[u]][x/u] t

if x ∈ / fv(t)

The names db, ls, and gc stand for distant beta, linear substitution, and garbage collection, respectively. Rule 7→db (resp. 7→ls ) comes from the structural λ-calculus [6] (resp. Milner’s calculus [33]), while 7→gc belongs to both calculi. In db we may assume w.l.o.g. S S that ki=1 {xi } ∩ fv(u) = ∅ and x ∈ / fv(u) ∪ ki=1 fv(ti ) . Note that the meta-notation L = [x1 /t1 ] . . . [xk /tk ] can also be seen as a context [x1 /t1 ] . . . [xk /tk ]. This fact, together with 2 Such

a standardization theorem is folklore in the linear logic community. See [2, 16] for details.

the use of a context C in the second rule, and the global side condition in the third rule, justify the idea of rewriting rules at a distance. The substitution context in rule db is motivated by its encoding in proof-nets, where explicit substitutions are partially free to float (i.e. to traverse some term constructors). Such freedom is formalized by the forthcoming graphical equivalence and by the study of its properties in Section 4. The linear substitution calculus enjoys all the properties required of calculi with ES (including simulation of β-reduction, preservation of strong normalisation, confluence on terms and metaterms and full composition), whose proofs are simple and omitted, as they are minor variations over those for Milner’s calculus [24], or those of the structural λ-calculus [6]. In order to study residuals we need to fix a precise terminology about redexes. A redex occurrence in a term t is either a tuple hD, ri where t = D[r] and r = (λx.s)Lu (a dB-redex) or a tuple hD, r, Ci where t = D[r] and r = C[[x]][x/u] (a ls-redex), or a tuple hD, ri where t = D[r], r = s[x/u] and x ∈ / fv(s) (a gcredex). For example, the term t = (xx)[x/y] has two different redex occurrences, namely hD1 , r1 , C1 i = h, (xx)[x/y], xi and hD2 , r2 , C2 i = h, (xx)[x/y], xi. The pattern of a redex is r, the second component of the tuple; the box3 of the redex is the subterm of the pattern noted u, and the context of the redex is D, the first component of the tuple. We use A, B, . . . for redexes occurrences and Red(t) for the set of all redex occurrences of t. A Given a redex occurrence A ∈ Red(s) we write s → t for the reduction step obtained by contracting A in s. The graphical equivalence ∼ is given by the contextual, transitive, symmetric and reflexive closure of α-conversion (i.e. renaming of bound variables) and the following axioms: t[x/u][y/v] (λy.t)[x/u] (tv)[x/u]

≈CS ≈σ1 ≈σ2

t[y/v][x/u] λy.t[x/u] t[x/u]v

x∈ / fv(v) & y ∈ / fv(u) y∈ / fv(u) x∈ / fv(v)

This equivalence characterizes exactly the representation of terms as proof-nets, in the sense that t ∼ u iff t and u map to the same proof-net [4]. The λ∼ lsub -calculus is given by the set of terms T and by , defined by the rewriting rules the reduction relation →λ∼ lsub u {db, gc, ls} modulo the equations {CS, σ1 , σ2 }, i.e. , t →λ∼ lsub iff t ∼ t0 →λlsub u0 ∼ u. Thus in particular t →λlsub t0 implies t0 . t →λ∼ lsub Given any reduction relation R, an R-derivation is a (possibly empty) sequence of reduction steps having the form s = t0 →R t1 →R . . .. An R-derivation is finite iff the associated sequence is finite. We write d, e, . . . for derivations and d : s R t when we stress the source s and target t of the (finite) derivation. We write  for the empty derivation and A; d : s  t for the derivation A composing s → u to the left of d : u  t. A reduction relation R is said to be terminating iff every R-derivation is finite. An element t is said to be in R-normal form iff there is no u such that t →R u.

3.

Residuals B

The residuals of a redex A after a reduction step t → u are the traces of the redex A that appear in the target term u. The crucial property that residuals need to satisfy is that any local A A confluence diagram u1 ←1 t →2 u2 can be closed by reducing in u1 (resp. u2 ) all and only the residuals of the redex A2 after A1 (resp. of A1 after A2 ). When this happens for every possible local confluence diagram we say that the system is semantically 3 When

terms are represented as linear logic proof-nets, what we call box corresponds exactly to the exponential box.

orthogonal. The subtlety in the study of residuals is that redexes may be duplicated or erased along the way and duplication may even nest two residuals of the same redex. For further references the reader may consult [20, 27, 31, 38]. Another simpler notion of orthogonality is syntactical orthogonality [21], and happens when the system is left-linear and has no critical pairs. Syntactical orthogonality implies semantic orthogonality but the converse does not hold. In particular, the λlsub calculus is not syntactically orthogonal but, as we will show in Section 6, it turns out to be semantically orthogonal, a property that no other calculus with ES enjoys. In order to give an intuition on such a phenomenon let us consider a calculus with ES such as λσ [1] or λx [9] containing at least the following reduction rules: (λx.t)u (tu)[x/v]

→b →@

t[x/u] t[x/v]u[x/v]

The following critical pair arises: (λx.t)[y/v]u[y/v]

@←

((λx.t)u)[y/v] →b t[x/u][y/v]

However, the @-step has no residual after the b-step. The b-step also has no residual (note how it would have a residual if the rule were at a distance). The diagram can be closed, but only reducing created redexes, and so the calculus is not semantically orthogonal. The formal development of residuals is based on a notion of (well-)labeled term to be introduced next. Note that since λlsub is not syntactically orthogonal the technique of underlining the redex pattern [26] cannot be applied, e.g. in (xx)[x/s] the underlining does not distinguish between the two occurrences of the ls redexes. Labels. In order to follow redexes along a derivation we mark them with special symbols called labels, denoted α, β, γ, . . .. The obtained set of labeled terms, denoted by TL , is generated by the following grammar. t ::= x | xα | tt | λx.t | λxα .t | t[x/t] | t[xα /t] The notations x(α) , λx(α) .t and t[x(α) /t] mean that x may or may not be labeled. We write Lab(t) to denote the set of all the labels of t and t◦ to denote the term obtained from t by ◦ removing all its labels. Thus for example ((xα y β )[y/λz γ .z]) = (xy)[y/λz.z]. We extend the meta-notation L to lists of possibly labeled substitutions, and C to possibly labeled contexts. Similarly, the notions of free and bound variables are extended to labeled terms as expected together with their corresponding notion of α-conversion. We use flv(t) to denote the subset of fv(t) having at least one labeled occurrence, e.g. flv(xα y β [y/z]) = {x}. α Labeled reduction → on labeled terms is defined as the contextual closure of the following rewriting rules: (λxα .t)Lu C[[xα ]][x/u] t[xα /u]

α

7→dB α 7→ls α 7→gc

t[x/u]L C[[u]][x/u] t

x∈ / fv(t)

Definition of redexes for terms naturally extends to labeled ones. A labeled redex A is a redex having a pattern of the form (λxα .t)Lu, C[[xα ]][x/u] or t[xα /u], and α is called the label of the redex A. The anchor of a redex (labeled or not) is the variable possibly carrying its label. We will usually associate the labels α, β and γ to the redex names A, B and C respectively; occasionally we will write Aα to emphasize that α is the label of the redex A. We write Redα (t) for all the redexes of t labeled with α. In order to show some key properties required by the axiomatic approach (cfr. Section 6) we will work with a subset of labeled terms, written TWL , called well-labeled terms, and defined by: • x ∈ TWL and xα ∈ TWL

• If t ∈ TWL and x ∈ / flv(t) then λx.t ∈ TWL • If t, u ∈ TWL , then tu ∈ TWL • If (λx.t)L, u ∈ TWL , then (λxα .t)Lu ∈ TWL • If t, u ∈ TWL , then t[x/u] ∈ TWL • If t, u ∈ TWL and x ∈ / fv(t), then t[xα /u] ∈ TWL .

Note that λxα .x, λx.xα and x[xα /u] are not in TWL . Note also that subterms of well-labeled terms are not necessarily well-labeled (e.g. the abstraction of a labeled db-redex). Well-labeled terms are stable by reduction and graphical equivalence: α

L EMMA 1. Let t ∈ TWL . If t → u or t ∼ u, then u ∈ TWL . Residuals. Here we define residuals for the reduction relation λlsub . In Section 4 we will extend them to the λ∼ lsub . A term t can be labeled in different ways, leading to different variants of t. More precisely, we say that t is a variant of u iff t◦ = u◦ . Thus in particular, t is a variant of itself. If t is a variant of u, then we will consider the obvious bijection between the sets of redexes of t and u; sometimes, we will even identify some particular redexes of them which are related by this bijection. B To define the residuals of a redex A ∈ Red(t) after a step t → u, we consider the α-lift of t w.r.t. A by α, written lift(t, A, α), which is a particular variant of t obtained as follows. Let α be a fresh symbol, i.e. α ∈ / Lab(t). If the redex A is already labeled in t, then change the label of A to α, otherwise, if A is not already B labeled, assign α to A. Let us write lift(t, A, α) → u for the induced associated reduction step. Then, the set of residuals of A B after B is given by AhBi := {Redα (u) | lift(t, A, α) → u}. It is clear that this definition is completely independent from the variant used to lift S the term t. We write AhBiA0 for A0 ∈ AhBi, and AhBi for A∈A AhBi. For example, taking v = B

(xβ xβ xβ )[x/y], B = h, v, xβ xβ i (so that v → (xβ yxβ )[x/y] = v 0 ) and A = Redβ (v) \ B, we have AhBi = {B 0 , B 00 }, where B 0 = h, v 0 , yxβ i and B 00 = h, v 0 , xβ yi. Creation. Given a reduction step t →λlsub u, the set of redexes in u that are not residuals of redexes in t are said to be created. While there are only 3 possible ways to create redexes in λ-calculus [27], in the λlsub -calculus redexes may be created in one of 6 possible ways, we just show below one example for each case, where the reduced redex has label α and the created redex is underlined: db creates db: ((λxα .(λy.s))u) v →dB (λy.s)[x/u]v db creates ls: (λxα .x)u →dB x[x/u] db creates gc: (λxα .y)u →dB y[x/u] ls creates db: xα [x/λy.s]u →ls (λy.s)[x/λy.s]u ls creates gc: xα [x/y] →ls y[x/y] gc creates gc: z[y α /x][x/u] →gc z[x/u] Note that dB-steps can create every kind of redex, ls-steps can create {dB, gc}-redexes, and gc-redexes can only create other gcredexes. Note also that whenever a labeled redex creates a redex A, then A is not labeled. Developments. Labels are particularly useful to study developments, i.e. derivations in which only residuals of an initial set of redexes are contracted. For that, we first extend the concept of residual to finite derivations as follows: Ahi := A, AhB; di := (AhBi)hdi. A Given A ⊆ Red(t), a (possibly infinite) derivation t = t0 →1 A2 t1 → t2 . . . is a development of A iff Ai ∈ AhA1 ; . . . ; Ai−1 i for all i. For example, in the λlsub -calculus, t0 = (xx)[x/I] → (xI)[x/I] → (II)[x/I] is a development of the set containing

the two ls-redexes of t0 . In the sequel, A1 ; ...; An denotes any derivation d1 ; ...; dn such that di is a development of the set of redexes Ai for all i. The finite developments (FD) property states that given a term t and a set of redexes A ⊆ Red(t), any development of A starting at t terminates. This property (proved in Section 6) is one of the key requirements for the axiomatic theory of standardization that we are going to apply. The residual of a derivation over a set of redexes A is defined as follows: hAi =  and (B; d)hAi = Bhei; dhAhBii, where e is any development of A.

4.

Working with Equivalence Classes

In this section we first define the notion of residual of a redex along an equation, so that we will be able to trace redexes along λ∼ lsub -derivations. We then show that the notion of residual defined in Section 3 is well-defined w.r.t equivalence classes, i.e. 1) the residual relation yields a unique bijection between two redexes in the same ∼-equivalence class and 2) residuals of rewriting steps lift to ∼-equivalence classes. The labeled graphical equivalence4 ∼ on labeled terms is given by the contextual, transitive, symmetric and reflexive closure of α-conversion and the following axioms: t[x(α) /u][y (β) /v] (λy (β) .t)[x(α) /u] (tv)[x(α) /u]

≈CS ≈ σ1 ≈ σ2

t[y (β) /v][x(α) /u] λy (β) .t[x(α) /u] t[x(α) /u]v

x∈ / fv(v) & y ∈ / fv(u) y∈ / fv(u) x∈ / fv(v)

The axioms are to be understood in such a way that each label occurs either in both sides of the axiom or in none of them. An equational proof of t ∼ u is a derivation tree ending in t ∼ u which uses α-conversion, the axioms ≈CS , ≈σ1 and ≈σ2 and the standard inference schemes expressing compatibility of ∼ w.r.t. all term constructors and transitivity, symmetry and reflexivity of ∼. Residuals Along Equations. We now propose a notion of trace of a redex along an equational proof which is similar to that used for derivations. Although the intuitive idea is quite natural, one needs to guarantee that this notion is independent from the particular syntactic proof used to show that a term t is equivalent to another term u, a property that we call well-definedness. Given t ∼ u, A ∈ Red(t) and α ∈ / Lab(t), we consider the labeled equation lift(t, A, α) ∼ u. The set of residuals of A after t ∼ u, is given by Aht ∼ ui := {Redα (u) | lift(t, A, α) ∼ u}. Again, this definition is independent from the variant used to lift the term t. We write Aht ∼ uiA0 iff A0 ∈ Aht ∼ ui and we extend this notion to sets of redexes as expected, in which case we write Aht ∼ uiA0 , where A ⊆ Red(t) and A0 ⊆ Red(u). For example, given v = (xα xα )[x/y][x0 /y 0 ] ∼ (z α [x0 /y 0 ]z α )[z/y] = v 0 and B = h[x0 /y 0 ], (xα xα )[x/y], xα i, we have Bhv ∼ v 0 i = {h, v 0 , [x0 /y 0 ]z α i}. Well-Definedness. Despite the simplicity of the equivalence relation ∼, the result of well-definedness is not as straightforward as it may seem. In principle, it could be shown by introducing proof-nets and showing that the proof nets corresponding to two ∼-equivalent terms s and t are identical: thus there is a bijection between redexes in s and redexes in t, since there is a bijection between redexes in s (resp t) and redexes in their proof-net representation. We prefer, however, to avoid introducing proof-nets here: on one hand because they are only apparently simpler than terms, on the other hand, to resort to a unique formalism, namely terms, to develop our ideas. Note that our equations do not duplicate/erase/rename labels, so that any redex has a unique residual along the equivalence. Then well-definedness can be stated as the fact that every equational proof of t ∼ u induces the same bijection of redexes. The proof 4 By

abuse of notation we use the same symbol both for the equivalence relation on labeled and unlabeled terms.

of this property is based on the identification of three structural invariants of labeled redexes with respect to the equivalence ∼, it is omitted for lack of space. L EMMA 2 (Well-Definedness). Let t, u ∈ TWL s.t. t ∼ u. Then there is unique bijection φ : Red(t) 7→ Red(u) s.t. φ(A) = A0 iff Aht ∼ uiA0 . d

d

Note that uniqueness guarantees that if t ∼1 u and t ∼2 u are d d two derivation trees of t ∼ u, then Aht ∼1 uiA0 iff Aht ∼2 uiA0 . The last result concerns preservation of residuals by means of ∼-equivalence classes, where below we write t ∼φ u to emphasize that φ is the (unique) bijection given by Lemma 2. A

L EMMA 3. Let t ∼φ u. Consider A, B ∈ Red(t). If t → t0 , then: φ(A)

1. Simulation: ∃u0 s.t. u → u0 and 2. Same equivalence target: t0 ∼ u0 , i.e. ∃ξ s.t. t0 ∼ξ u0 , and 3. Preservation of residuals: if BhAiB 0 , then φ(B)hφ(A)iξ(B 0 ).

5.

Abstract Standardization

A standard derivation is a canonical element of a class of derivations, where canonicity is expressed by means of completeness: whenever t  u then there is a standard derivation from t to u. In λ-calculus, a derivation is standard if redexes are selected from left-to-right. It is easy to see that the right-to-left order, instead, does not provide completeness. Consider the derivation t = (λx.xx)(II) →β (II)(II) →β I(II): it reduces both redexes in t, but it can only be obtained by reducing these redexes according to a left-to-right order, as the right-to-left order would instead give (λx.xx)(II) →β (λx.xx)I →β II. The left-to-right orientation is specific to the λ-calculus and may not be appropriate for other term rewriting systems, as for example the first-order TRS containing the unique rewriting rule f (x, a) → x. The abstract theory of standardization then replaces the left-to-right order with an abstract order ≺, capturing what we call the action principle. The Action Principle. Let us introduce two crucial concepts. Firstly, reduction of a redex A may directly act on another redex B (i.e. duplicate/erase it). For example in λ-calculus, if t = (λx.xx)(II) →β (II)(II), then reduction of the leftmost redex A in t duplicates the redex B = II. Secondly, reduction of a redex A may indirectly act on a redex B by 1) creating a new redex C that may directly (or indirectly act) on (a residual of) B, or 2) changing the set of redexes that can act on B or on which B can act. An example of the first case: if t = (λx.x(II))M →β M (II), where M = λx.xx, then reduction of the leftmost redex A in t indirectly acts on the redex B = II by creating the redex M (II) which can duplicate (the residual of) B. An example of the second case will be given at the end of Section 8. Standard derivations are defined abstractly according to the action principle: for every redex A, reduction of A forbids future reductions of redexes which may have acted (directly or indirectly) on A before. The nesting order ≺ essentially has to induce this principle by capturing as much action as possible (we will see that ≺ has to capture direct action, while in general it might capture only some cases of indirect action). The abstract theory of standardization re-organizes derivations according to the action principle, relying on some axioms about the interaction between the nesting order and residuals. Then, whenever the axioms are satisfied, the standardization theorem follows: an abstract reasoning proves that ≺-ordered derivations are complete [19, 30, 32]. Total and Partial Orders. The left-to-right order has a fundamental property, it is a total order, i.e. given two coinitial different re-

dexes A and B, then either A ≺ B or B ≺ A. In such a case the abstract theory is quite simple. Total orders have a limited descriptive power, though. Consider a head-normal form t = xuv. The left-to-right order forces the redexes in u to be reduced before those in v. However, it is clear that u and v cannot interact in any way, and consequently they could be reduced in parallel even if this parallelism is not captured by the left-to-right order. In other words, the left-to-right order captures more than the action principle. Standardization can then be refined by switching to a partial order. For instance, the partial tree order ≺tree , where A ≺tree B if B is a sub-term of A (so that A and B are unrelated if B is to the right of A), captures the parallelism of redexes in t and admits a standardization theorem [30, 32]. The abstract theory of standardization for partial orders is more sophisticated, so for the moment we stay with total orders and shall return to partial orders in Section 7. In the rest of this section we introduce the necessary notions to deal with the abstract standardization theorem for total orders. In Section 6 we will adapt the left-to-right order to the λlsub -calculus and obtain a left-to-right standardization theorem. From Section 7 to the end of the paper, we will motivate and study a relaxed variant of this order, introducing the framework for partial orders and prove a more general standardization theorem for the λ∼ lsub -calculus. The Abstract Theory. In this paper we resort to the abstract framework developed by Gonthier, L´evy, and Melli`es in [19], but we adopt the more general formulation given by Melli`es in his PhD thesis [32], as the axioms in [19] will not work when we shall later relax the left-to-right order. The framework is based on Abstract Rewrite Systems (ARS), a general formalism encompassing first and higher-order rewriting, plus a residual relation h i and a partial order ≺ on redexes, verifying some axioms. The axioms are divided into two groups: The basic axioms, which guarantee a wellbehaved theory of residuals, and the standardization axioms, which concern the interaction of the order with the residual relation. To formally define the axioms we introduce the following notion. An Abstract Rewrite System (ARS) is a tuple of the form (O, R, Src( ), Tgt( ), h i , ≺ ) where O is called the set of objects, R is called the set of redexes , Src( ) and Tgt( ) are functions from redexes to objects that we call source and target functions (resp.), h i is a family of binary relations indexed by the set of redexes that we call the residual relation and ≺ is a partial order on redexes. We say that two redexes A and B are coinitial if Src(A) = t = Src(B) for some term t. Note that the λlsub calculus may be seen as an ARS where O is the set of terms T defined in Section 2, whereas the λ∼ lsub -calculus is an ARS where O is the set of ∼-equivalence classes generated by T modulo the graphical equivalence ∼. The basic axioms are5 : • Autoerasure (AE). For any redex A, AhAi = ∅. • Finite residuals (FR). Let A, B be coinitial redexes. Then the

set {C | AhBiC} is finite. • Uniqueness of ancestors (UA). Let A, B, C be coinitial

redexes. Then, BhAiB 0 and ChAiC 0 and B 0 = C 0 imply B = C.

• Finite Developments (FD). Let A be a set of coinitial re-

dexes. Then any development of A terminates. • Semantic Orthogonality (SO). Let A, B be coinitial re-

dexes. Then Tgt(BhAi) = Tgt(AhBi) and the relations hA; BhAii and hB; AhBii are exactly the same, where A; BhAi 5 In

[32] Autoerasure is called A, Finite residuals is called B, Uniqueness of ancestors is called D, and Semantic Orthogonality is called PERM.

is the derivation that contracts A and then develops BhAi; likewise for B; AhBi (cf. end of Sec. 3).

The next proposition proves the semantical orthogonality property for λlsub , that is expressed as a form of local confluence for the labeled system. Again we resort to well-labeled terms.

We consider two standardization axioms: • Linearity. Let A and B be coinitial redexes s.t. A  B. Then 0

0

∃!B s.t. BhAiB . • Context-freeness. Let A, B, C be coinitial redexes s.t. BhAiB 0

and ChAiC 0 . If A ⊀ C then (B ≺ C ⇔ B 0 ≺ C 0 ).

The linearity axiom captures direct action: if A does not nest B then it cannot directly act (i.e. duplicate/erase) on B, and so B has exactly one residual after A. The context-freeness axiom forbids a form of indirect action of the second kind: whenever A cannot act on C (i.e. A ⊀ C) then it cannot grant or remove the power to act on C to any other coinitial redex. A derivation d : t  u is said to be obtained from a derivation e : t  u by a standardizing permutation, written e d (noted d∠e in [32]), if d is obtained from e by swapping two consecutive redexes which form an inversion w.r.t. ≺ in d; more precisely, e d if e = f ; B; A0 ; g and d = f ; A; h; g, and A ≺ B, where AhBiA0 and h develops BhAi. We also say that d is more standard than e. The classic notion of L´evy’s permutation equivalence on derivations, adapted to total orders, can be seen as the equivalence generated by standardization, indeed d : t  u is permutation equivalent to e : t  u, written d ≡ e, iff −1 ∗ d( ∪ ) e. In the sequel we write ≡≺ when we wish to emphasize the underlying order ≺. A derivation d is standard if it is a -normal form. The standardization theorem then follows by specializing Thm. 4.7 in [32] to total orders: T HEOREM 1 (Abstract Total Standardization). Consider any ARS equipped with a total order ≺ and satisfying the basic and the standardization axioms. Then for any derivation d : t  u there exists a standard derivation e : t  u such that d ∗ e.

6.

The Left-to-Right Standardization Theorem

In this section we prove a standardization theorem for the λlsub calculus relative to a total order. This result is an extension of the left-to-right standardization theorem for λ-calculus. The Left-to-Right Order. Given two redexes A and B in t we say that A is left-to-right nesting or on the left of B, written A ≺L B, if the anchor of A is to the left of the anchor of B (looking at t as a string of symbols). Clearly, ≺L is a total order so that A ⊀L B and A 6= B imply B ≺L A. In order to prove standardization for the λlsub -calculus by means of Theorem 1 we need to verify the basic and the standardization axioms. Basic Axioms. The first three basic axioms are trivially true. By using (well-)labeled terms to trace residuals we can prove the finite development axiom. P ROPOSITION 1 (FD). Let t ∈ T and let A ⊆ Red(t). Then any λlsub -development of A terminates. Proof. Consider any t ∈ T and lift every redex in A ⊆ Red(t) with a different label belonging to some arbitrary set L. It is clear that the resulting term is a well-labeled term. let us consider S Now, α the labeled reduction relation →L := α∈L →. To prove the (FD) property it is sufficient to show that the reduction relation →L terminates on well-labeled terms. Termination is proved by means of a measure that strictly decreases with every reduction step (similar to that one used in the proof of Lemma 2 in [6]).

P ROPOSITION 2 (SO). The λlsub -calculus endowed with the leftto-right order satisfies Semantic Orthogonality. Proof. The proof uses well-labeled terms to trace residuals in such a way that axiom (SO) can be reformulated as follows: γ α The reduction relations → and → locally commute, i.e. if γ α t, u1 , u2 ∈ TWL , t → u1 and t → u2 then there exists v s.t. γ α u1  v and u2  v. This alternative statement can be proved by induction on the γ α relations → and →. Standardization Axioms. Totality of the order ≺L provides very simple proofs of these axioms: P ROPOSITION 3. The λlsub -calculus endowed with the left-to-right order satisfies Linearity and Context-freeness. Proof. Linearity. By totality of ≺L , we have to show that if B ≺L A in t then ∃!B 0 s.t. BhAiB 0 . Now, if A is a db-redex this is obvious, as no redex is duplicated/erased by a db-step. If A is a {gc, ls}-redex then it can only act on redexes whose anchor is in its box, i.e. on redexes on its right, and thus not on B. Context-freeness. If A ⊀L C then C ≺L A. Assume B ≺L C (and so B ≺L C ≺L A). Then, A is on the right of both B and C. It is easily seen that A can only change the order between redexes on its right; consequently B 0 ≺L C 0 . The other direction is by contraposition. Assume B ⊀L C, that is C ≺L B. We have to prove that B 0 ⊀L C 0 , i.e. C 0 ≺L B 0 . There are two cases. If C ≺L B ≺L A then we reason as in the previous direction, getting C 0 ≺L B 0 . Otherwise, we have C ≺L A ≺L B. Now, the only case that is not immediate is when A is a ls-step. It is enough to observe that a ls-step can only move the redexes in its box at most where the step itself was; hence, B 0 can at most be where A was (while the position of C is left unchanged), and so C 0 ≺L B 0 . We can then conclude with our first standardization theorem: C OROLLARY 1 (Left-to-right Standardization for λlsub ). If t λlsub u then there is a ≺L -standard λlsub -derivation from t to u. Proof. It follows from Theorem 1, whose hypothesis are given by Propositions 2, 1, and 3 (the first three basic axioms are immediately seen to hold).

7.

Towards Equational Standardization

Proof-Nets. The linear substitution calculus has been designed to mimic the representation of λ-calculus in linear logic proofnets [18], where β-reduction is decomposed into small steps. The relationship between the two formalisms occurs at the static and the dynamic levels: every term can be mapped to a proof-net, and every proof-net can be mapped to an ∼-equivalence class of terms, as defined in Section 2. Moreover, there is a bijection φ between the redexes of a term t and the redexes of its corresponding proof-net P Nt which induces a strong bisimulation between terms and proofnets: if t →λlsub u by reducing a redex A, then P Nt →P N P Nu by reducing φ(A), and if P Nt →P N R then there exists a term u s.t. t → u and R = P Nu . The graphical equivalence ∼ introduced in Section 2 then inherits a remarkably strong property: it is a strong bisimulation between λlsub and itself, i.e. t ∼ u → v implies that ∃ r s.t. t → r ∼ v (the proof is similar to that of the structural λ-calculus [6]). It, moreover,

induces a bijection of redexes, and so it is possible to mimic derivations via ∼ as follows: given a derivation d : t →n u and a term t0 ∼ t we can unambiguously refer to the projection d0 : t0 →n u0 (with u0 ∼ u) of d on t0 . Since d and d0 essentially reduce the same redexes at each step, one expects any reasonable notion of standardization to apply without distinction to both derivations in the sense that either both are standard or none of them is. This would imply, in particular, that our standardization theorem for λlsub (Corollary 1) also applies to proof-nets. Unfortunately, the left-to-right order does not meet this requirement. Indeed, a left-to-right derivation for t[x/u][y/v] (where y ∈ / fv(u)) does not project to a left-toright derivation for t[y/v][x/u], obtained by applying the equation t[x/u][y/v] ∼CS t[x/u][y/v]. Relaxing the Order. We are therefore going to relax the total left-to-right order ≺L to a partial order ≺B that will be stable by ∼. The definition of ≺B shall be guided by the action principle. Because of the linearity axiom, it is mandatory that ≺B captures direct action between redexes. For that, a simple diagrammatic intuition, due to Klop [26] and then explored by Melli`es [30], turns out to be extremely helpful. The idea relies on the analysis of local confluence diagrams. Whenever a redex is duplicated (resp. erased), then the standard derivation should be the longest (resp. shortest) side of the diagram. Consider for example the diagram in Fig.1-a. The standard way to get from the source to the sink of the diagram is the longest (i.e. down-below) side, because the lsredex acts on (i.e. nests) the redexes in s 6 . The standard derivation associated to the diagram in Fig.1-b —which is an erasing case— is instead the shortest side, because the erasing redex acts on the redexes in s. The previous two cases are just reformulations of similar cases in λ-calculus, and amount to what can be described as nesting as subterms. The novelty of λlsub is that direct action (and then nesting of redexes) can also happen at a distance. Consider now the example of the diagram in Fig.1-c. The duplicated ls-redex on y is not syntactically contained in the acting ls-redex on x. Worse, the same diagram applies to terms like (x[x/y]yz)[y/z], where [x/y] and [y/z] are no longer next to each other. According to the action principle, our order has to impose that the ls-redex on x nests the ls-redex on y so that the standard side of the diagram is the longest one. Diagram in Fig.1-d is the version at a distance of the erasing diagram, requiring the same notion of nesting at a distance. All these intuitions lead to the partial order of the next section, that will be used in Section 8 to show standardization of the λ∼ lsub -calculus.

8.

The Box Standardization Theorem

We now generalize the notions introduced in Section 5 to the partial box order, and then prove the standardization theorem for the λ∼ lsub -calculus with respect to this order. The Box Order. Let A, B ∈ Red(t). Then, • A immediately boxes B, noted A ≺1B B if the anchor of B

(i.e. the variable possibly carrying a label) is in the box of A, i.e. if the pattern of A is any of (λx.t)Lu, C[[x]][x/u] or t[x/u], then the anchor of B appears in u. • A boxes B, noted A ≺B B if A(≺1B )+ B (we use A B B for

A(≺1B )∗ B);

• A and B are disjoint, noted A k B, if A B B and B B A. 6 Remark

that otherwise one would lose completeness, as there would not be any standard derivation from C[[x]][x/s] to the term C[[s0 ]][x/s], which is the intermediate term in the sequence C[[x]][x/s] →→ C[[s0 ]][x/s0 ]

Note that A ≺B B implies A ≺L B. Additionally, note the transitive closure in the definition of ≺B —unnecessary for ≺L —which impacts on the proofs of the standardization axioms for ≺B . The key property of the box order is that it is stable by the equivalence ∼. For example, for t[x/u][y/v] with y ∈ / fv(u) the redexes in u and the redexes in v are not related by ≺B , so that ≺B is stable by the permuting axiom t[y/v][x/u] ∼CS t[x/u][y/v] (where y ∈ / fv(u) & x ∈ / fv(v)). More precisely, given s ∼ t, the bijection between Red(s) and Red(t) defined in Section 4 is order-preserving. To show this property it is sufficient to remark that symbols inside boxes never go in/out these boxes by means of the equivalence relation. Thus, we get: L EMMA 4 (Preservation of the Box Order by Equivalence). Let t, u ∈ T s.t. t ∼φ u, where φ is the bijection specified in Lemma 2. Then, φ commutes with ≺B , i.e. A ≺B B iff φ(A) ≺B φ(B). Several remarks on ≺B are in order: 1. Disjoint redexes may superpose: A k B does not necessarily imply that A and B are syntactically disjoint. Examples: the redexes Aα and Bβ are disjoint but 1) syntactically superposed in (xα xβ )[x/y], and 2) syntactically nested in (λz α .xβ [x/z])y. However, disjoint redexes always strongly locally commute in γ α the following sense: if t0 → t1 and t0 → t2 then there exists γ α t3 s.t. t1 → t3 and t2 → t3 . Note that this is just a particular case of axiom (SO) where the diagram can be closed by using just one reduction step from ti to t3 . 2. Indirect action: the box order fails to capture indirect action, in the sense that A k B implies that A cannot directly act on B but it can still indirectly act on it (and viceversa). For example, in the following derivation Aα k Bβ and Aα creates a redex that can act on Bβ : α

xα [x/λy.y]((λz β .z)u) →ls (λy.y)[x/λy.y]((λz β .z)u) This apparently odd fact—that is not specific to the box order— will not forbid the standardization theorem. Its consequences, and an easy way to deal with them, will be discussed in Section 10. Note that by definition the box order is the minimum standardization order, in the sense that it is the transitive closure of the relation capturing direct action only. 3. The order on λ-terms: in [30] (pp. 74-75) Melli`es considers three orders on λ-terms, the left-to-right order plus two refinements called the tree and the argument order. When restricted to λ-terms, our order coincides with the argument order. 4. Linear logic interpretation: we explained that there are two kinds of nesting in λlsub , namely, subterm nesting and nesting at a distance. In the definition of the box order they are both captured by the notion of immediately boxes. In terms of proofnets, however, they have different interpretations, despite they are both related to the concept of exponential box7 . Standardization Up to Square Equivalence. A consequence of switching to partial orders is that the notion of standard derivation has to be refined. In fact, partial orders force to work modulo the exchanges of disjoint redexes, even to simply define what is an ordered (i.e. standard) sequence; this is why abstract standardization is a form of rewriting modulo. Standardizing permutations are defined as in Section 5. However, to deal with disjoint redexes and adequately represent their 7 A subterm nests B when B is contained in the !-box of A, while A nests B at a distance when the cut corresponding to B crosses an auxiliary conclusion of the box of A.

C[[x]][x/s]

C[[x]][x/s0 ]

a)

t[x/s]

t[x/s0 ]

b) C[[s]][x/s]

C[[s0 ]][x/s0 ]

x[x/y][y/z]

c)

x[x0 /z][y/z]

d) y[x/y][y/z]

t

x[x0 /y][y/z]

x[x/z][y/z]

z[x/z][y/z]

x[y/z]

Figure 1. Some standardization diagrams. parallelism induced by the partial order, a new concept is necessary. A derivation d is said to be obtained from a derivation e by square permutation, written d♦1 e, if d = f ; A; B 0 ; g and e = f ; B; A0 ; g and A k B, where AhBiA0 and BhAiB 0 . We write ♦ for the equivalence relation generated by ♦1 , and call it square equivalence. We use ♦ for the relation modulo ♦ and we generalize the ∗ permutation equivalence relation ≡≺ as ( ♦ ∪ −1 ♦ ) . A derivation d is standard if it is a -normal form modulo ♦. The standardization theorem (Thm. 4.7 in [32]) then follows: T HEOREM 2 (Abstract Partial Standardization). Consider any ARS equipped with a partial order that enjoys the basic and the standardization axioms. Then for every derivation d there exists a standard derivation e s.t. d ∗♦ e. Results. Our goal is to prove a standardization theorem for λ∼ lsub relative to ≺B . The proof consists in first obtaining the theorem for ∼ λlsub and then lifting it to λlsub . The basic axioms do not mention the order, and thus they still hold for λlsub . The standardization axioms are proved by the following proposition: P ROPOSITION 4. The λlsub -calculus endowed with the box order ≺B satisfies Linearity and Context-freeness. Proof. Linearity is easy, by just remarking that a redex B can be duplicated or erased by A only if its anchor is in the box of A, case in which A ≺B B. Context-freeness requires a detailed study of the interaction between the box order ≺B and the reduction relation. In particular the proof is involved due to the transitive clause defining the box order, and it is omitted for lack of space. Then, the previous proposition and Theorem 2 give: C OROLLARY 2 (Box Standardization for λlsub ). If t λlsub u then there exists a ≺B -standard λlsub -derivation from t to u. In order to lift the previous result to λ∼ lsub we use the results on equivalence classes developed in Section 4. λ∼ lsub -calculus

P ROPOSITION 5. The endowed with the box order ≺B satisfies the basic and the standardization axioms. Proof. By Lemma 3 and Lemma 4 the notion of residual and the box order lift to ∼-equivalence classes preserving their properties. Moreover, the FD axiom can be shown exactly as done for λlsub in Proposition 1, by means of a measure that strictly decreases with every reduction step and remains equal for every pair of equivalent pairs. Therefore, all axioms hold for λ∼ lsub and we can conclude.

λlsub λlsub λ∼ lsub

Redex Order Total, left-to-right (Sec. 6) Partial, box (Sec. 8) Partial, box (Sec. 8)

Existence Thm. 1 Cor. 2 Cor. 3

Uniqueness Thm. 3 Thm. 4 Thm. 5

Figure 2. Summary of results on standardization Variation on the Context-Freeness Axiom. We use in this paper Context-freeness as it appears in Melli`es’s thesis [32]. In GLM’s theory [19], however, the axiom appears in a stronger, symmetric form which does not hold for λlsub . Indeed, • Strong context-freeness. Let A, B, C be coinitial redexes s.t.

BhAiB 0 and ChAiC 0 . If A ⊀ C then ((B ≺ C ⇔ B 0 ≺ C 0 ) and (C ≺ B ⇔ C 0 ≺ B 0 )).

Consider t = (λxα .y γ [y/x])(z β [z/u]), where Aα k Cγ , Cγ k Bβ , and Aα ≺B Bβ . The reduction step of the redex Aα yields the term y γ [y/x][x/(z β [z/u]], where Cγ0 ≺B Bβ0 , contradicting the strong form of the axiom (but not the weaker one we use) and providing an example of the second kind of indirect action, as Aα changes who can act on (the residual of) Bβ .

9.

Uniqueness

The standardization results obtained up to now concern the existence of a standard derivation. In this section the theorems are strengthened by proving uniqueness of such derivations. We first discuss the simple case of the left-to-right order, and then provide an original proof of uniqueness (modulo) for the box order. The axiomatic theory in Mellies’ thesis provides uniqueness of standard derivations when two further axioms, Enclave and Stability, hold (Theorem 4.5 in [32]). Axiom Enclave has two parts. Let A, B, B 0 be coinitial redexes s.t. BhAiB 0 . 1. Creation: If B ≺ A and A creates a redex C, then B 0 ≺ C. 2. Nesting: Let C, C 0 be redexes. If B ≺ A ≺ C and ChAiC 0 , then B 0 ≺ C 0 . In terms of the action principle Enclave forbids yet another form of indirect action: if B can directly act on A then A cannot indirectly act on B. Consider the creation part: if C ≺ B 0 or C k B 0 then C may act on B 0 , and so A would indirectly act on B ; similarly for the nesting part. P ROPOSITION 6. The λlsub -calculus endowed with the left-to-right order ≺L satisfies Enclave.

C OROLLARY 3 (Box Standardization for λ∼ u lsub ). If t λ∼ lsub then there is a ≺B -standard λ∼ lsub -derivation from t to u.

Proof. Creation: a simple inspection of the cases of creation (Section 3) shows that a redex A can create a redex C only on its right or at most where it was, so that C cannot nest any redex that was on the left of A. Nesting: similarly, it is easily seen that A can only move redexes on its right and at most where it was.

The next section will strengthen the result by showing uniqueness (modulo ♦) of the obtained standard derivation. We conclude this section with a remark.

In the case of a total standardization order the axiom Stability disappears, because its statement (see [32]) assumes two ≺-disjoint redexes. Thus, by applying Melli`es’ theorem we obtain:

Proposition 5 allows to apply Theorem 2 again and finally obtain our nonstandard, equational standardization theorem.

T HEOREM 3 (Uniqueness for λlsub ). If t λlsub u then there exists a unique ≺L -standard λlsub -derivation from t to u. Switching to partial orders, uniqueness is necessarily relaxed to uniqueness modulo ♦ (as standard derivations are defined up to ♦). Interestingly, for the partial box order both points of Enclave fail for λlsub . For creation consider the step: α

s = ((λxβ .x)(y[z α /z 0 ]))[z 0 /u] → ((λxβ .x)y)[z 0 /u] = t Let us call Aα and Bβ the two labeled redexes in s, and Bβ0 (resp. C) the residual of Bβ (resp. the created gc-redex on z 0 ) in t. We have Bβ ≺B Aα but Bβ0 6≺B C. For nesting it is enough to consider a redex C inside u in the counter-example for creation. So the box order does not capture the indirect action expressed by Enclave, and Mellies’ axiomatics cannot provide uniqueness modulo ♦ for λ∼ lsub . However, we can obtain it via another argument. In particular, our alternative proof shows that Enclave (together with Stability) is a sufficient but by no means necessary condition for uniqueness. We first show uniqueness modulo ♦ for λlsub , and then lift this result to λ∼ lsub . T HEOREM 4 (Uniqueness Modulo for λlsub ). If t λlsub u then there exists a ≺B -standard λlsub -derivation from t to u that is unique modulo ♦. Proof. (Sketch) Let e be the ≺B -standard λlsub -derivation given by Corollary 2 and f be the unique ≺L -standard derivation given by Corollary 1. We prove that e♦f , from which the statement follows. Consider the leftmost contracted redex C in e = B1 ; . . . ; Bn (i.e. the leftmost redex in {A ∈ Red(t) | AhB1 ; . . . ; Bi iBi+1 , 0 ≤ i < n}) and let e0 be C; e1 ; e2 where e1 = (B1 ; . . . ; Bi )hCi and ChB1 ; . . . ; Bi iBi+1 and e2 = Bi+2 ; . . . ; Bn . It is not difficult to prove, given that e is ≺B -standard, that e0 ♦e, |e1 | = i and so |e1 ; e2 | = |e| − 1, where |e| denotes the number of steps in e. By induction hypothesis we obtain a ≺L -standard derivation f 0 s.t. f 0 ♦(e1 ; e2 ). Therefore C; f 0 is also ≺L -standard and moreover (C; f 0 )♦(C; e1 ; e2 )♦e. Thm. 3 implies C; f 0 = f . Note that the proof does not depend concretely on λ∼ lsub , but only on the fact that ≺B can be embedded in a total order admitting a standardization theorem, which is a fully abstract argument. By exploiting again the results on equivalence classes, we obtain the strongest result of the paper: u then T HEOREM 5 (Uniqueness Modulo for λ∼ lsub ). If t λ∼ lsub there exists a ≺B -standard λ∼ lsub -derivation from t to u that is unique modulo ♦. Proof. By Lemma 3 and Theorem 4 using the stability of the ≺B -order by the equivalence ∼ given by Lemma 4.

10.

External Redexes, Coinductively

When the nesting order ≺ is total, standardization is relatively easy, because a derivation d : t  u may be standardized by simply selecting the minimum redex A among the redexes in t that are reduced in d and then repeating the process for the residual of this derivation after A. However, when the order is partial—as our box order, and more generally in Gonthier-Levy-Melli`es’ approach— there may be many ≺-minimal redexes among the redexes in t that are reduced in d; and randomly selecting one of them does not necessarily produce a standard derivation. This is due to the fact that the partial box order—as it is usually the case with partial orders—fails to properly capture indirect action. Indeed, even if two minimal redexes A and B are necessarily disjoint, A may create a redex which will nest (a residual of) B. We illustrate this situation in the simpler setting of the λcalculus using the box order (called argument order by Melli`es

in [30]). Let I α stand for λxα .x and Aα for I α I (and similarly for Bβ ). Consider the derivation: (I α I) (I β I)

β

→β

(I α I) I

α

→β

→β

II

I

Note that both Aα and Bβ are minimal in the initial term, and the derivation picks at every step a minimal redex. However, the derivation d is not standard. This can be seen by permuting Aα and Bβ , which yields the following ♦-equivalent derivation, where the two last steps form an inversion for the box order: (I α I) (I β I)

α

→β I (I β I)

β

→β I I

→β

I

A standardizing permutation swapping them produces the following standard derivation: (I α I) (I β I)

α

→β I (I β I)

β

→β (I β I)

→β

I

This example shows that selecting mimimal redexes does not necessarily give standard derivations when the order is partial. A similar example in λlsub is obtained by considering the derivations of xα [x/λy.y]((λz β .z)u). The solution to this problem is to select an external redex [8, 10, 19, 21, 28, 32, 38, 39], i.e. a minimal one on which no other redex can indirectly act. The definition of external redex for a derivation in GLM’s theory is given via an extraction process. In particular, the definition mentions the nesting order only indirectly. Alternatively, external redexes can be defined coinductively as persistently minimal redexes, as hinted in [38], i.e. the minimal redexes whose (unique) residual after any other redex is still persistently minimal. We first recall the definition of external redex from [32], that requires two preliminary definitions. A redex A traverses a coinitial d derivation d becoming B, written A 7−→ B, iff: 

• For d = , A 7−→ B iff B = A. C;e

e

• For d = C; e, A 7−→ B iff C 6 A and A0 7−→ B, where 0

AhCiA . A redex A in t can be extracted from a derivation d : t  u, written A x d, if there exist d1 , d2 s.t. d = d1 ; A0 ; d2 and d1 A 7−→ A0 . A redex A in t is external for d : t  u if A ∈ Ext ≺ (d) := {B | ∀e ≡≺ d . B x e}. The following result corresponds to Lemma 4.36 in [32]. L EMMA 5 (External Gives Standard). Consider any ARS equipped with a partial order ≺ that enjoys the basic and the standardization axioms. If d = A1 ; . . . ; An and Ai ∈ Ext ≺ (Ai ; . . . ; An ) (1 ≤ i ≤ n), then d is ≺-standard. External redexes generalize leftmost redexes in λ-calculus, whose key properties are 1) no other redex can act on it, and 2) its unique residual after any other redex is still the leftmost redex. This suggests to define external redexes coinductively as follows. Let d : t  u be a derivation. The set of starting redexes of d is d1 := {B | ∃e s.t. d ≡≺ B; e}. A redex A in t is ≺-external for d if d is not empty and: 1. Minimality: A is minimal in d1 , and 2. Persistency: whenever d ≡≺ B; e and AhBiA0 (A0 is unique by minimality), then A0 is ≺-external in e. The next two technical lemmas are used to relate the two notions of externality. Their proofs are easy: L EMMA 6. Let A be ≺-external for d. Then: 1. A x d, and 2. If e ≡≺ d then e1 = d1 and A is ≺-external for e. e

L EMMA 7. Let A x d, i.e. d = e; A0 ; f and A 7−→ A0 . Then:

1. There exists g s.t. d ≡≺ A; g. 2. If d = B; d0 (with B 6= A) then B  A and if AhBiA00 then A00 x d0 . We conclude the section with the equivalence of the two notions of external redex. P ROPOSITION 7. A is ≺-external for d iff A ∈ Ext ≺ (d). Proof. ⇒) Let e ≡≺ d. Lemma 6.2 implies that A is ≺-external for e, and Lemma 6.1 gives A x e, i.e. A ∈ Ext ≺ (d). ⇐) By coinduction on the definition of ≺-external. A ∈ Ext ≺ (d) implies A x d so that Lemma 7.1 gives A ∈ d1 . Let B ∈ d1 so that d ≡≺ B; e and A x B; e. If B 6= A then Lemma 7.2 gives B  A, that implies A minimal in d1 , and A00 x e if AhBiA00 . Thus, A00 ∈ Ext ≺ (e). By the coinductive hypothesis A00 is ≺external for e, and thus A is ≺-external for d.

P ROPOSITION 8 (Weak Linear Head Reduction is Standard). 1. Every term t ∈ T has at most one →W redex, and if it does then it is the leftmost redex of t. 2. →W -derivations are ≺L -standard (and thus also ≺B -standard). Proof. 1) By induction on t. 2) By Lemma 5 and Theorem 6. Linear Head Reduction is Standard. The head strategy for λlsub historically arose as a special proof-nets strategy8 [29]. Given the behavioral equivalence between λlsub and proof-nets, it can be easily expressed in our setting. For that, let us introduce the set of head contexts, that are generated by the grammar H ::=  | λx.H | H t | H[x/t]. Linear head reduction (LHR) →H is defined as the closure under head contexts of the rewriting rules {7→db , 7→Hls }, where 7→Hls is the following variation of the rewriting rule 7→ls : H[[x]][x/u] 7→Hls H[[u]][x/u]

11.

Applications

In this section we apply the new characterization of external redexes to obtain a normalization theorem, and to prove that (weak) linear head reduction is standard. A Normalizing Strategy for λlsub and λ∼ lsub . Using the coinductive reformulation of external redexes, we can now provide an easy proof that the leftmost strategy, which always reduces the leftmost redex, is normalizing for λlsub and λ∼ lsub , i.e. it reaches a normal form, if any. Let us say that a redex A is universally ≺-external, i.e. external with respect to any reduction step (and thus wrt any derivation), when the following holds: 1. Universal minimality: A is ≺-minimal in Red(t). 2. Universal persistency: for any B ∈ Red(t), if AhBiA0 then A0 is universally ≺-external. T HEOREM 6 (Normalization). 1. The leftmost redex is universally ≺L -external λlsub . 2. The leftmost strategy is normalizing for λlsub and λ∼ lsub . Proof. 1) By coinduction. Left-to-right order: the leftmost redex is ≺L -minimum and by the Enclave axiom for ≺L (Proposition 6) its residual after any other redex is still minimum and thus leftmost. We conclude using the coinductive hypothesis. 2) For λlsub it follows by Theorem 5.2 in Mellies’ thesis [32] (p. 137, formulating abstractly an argument by Huet and L´evy [22]), stating that any strategy reducing ≺L -external redexes is normalizing. For λ∼ lsub , let t be a term having an λ∼ lsub -normal form. Since ∼ can be postponed (cfr. Lemma 3) and it is the identity on normal forms, then t has also a normal form in λlsub . The leftmost strategy λlsub normalizes t. Since λlsub ⊆ λ∼ lsub , then the leftmost strategy also λ∼ lsub -normalizes t. Weak Linear Head Reduction is Standard. The leftmost strategy captures a relevant strategy in the theory of linear logic, the weak (i.e. not under abstractions) variant of linear head reduction. To introduce such a notion let us first define weak head contexts by the grammar W :=  | W t | W [x/t]. Weak linear head reduction (WLHR) →W is defined as the closure under weak head contexts of the rewriting rules {7→db , 7→Wls }, where 7→Wls is the following variation on 7→ls : W [[x]][x/u] 7→Wls W [[u]][x/u] Alternatively, →W can be defined as the rewriting relation reducing only the {dB, ls}-redexes whose anchor is in a weak head context. This notion of reduction is deterministic and tightly related to the π-calculus [3] and Krivine Abstract Machine [7, 14].

Alternatively, →H can be defined as the rewriting relation reducing only the {dB, ls}-redexes whose anchor is inside a head context. Historically, linear head reduction has been defined on ordinary λ-terms (i.e. without explicit substitutions) [14, 29] by using a notion of virtual redex (equivalent to a head-redex up to σ-equivalence [36]). The alternative approach used here, already in use in [2, 3, 5], improves the original presentation in several aspects: there is no need to work with virtual redexes, there is a one-to-one correspondence between LHR in proof-nets and LHR in λlsub , and LHR can be seen as a strategy of λlsub although it is not a strategy of β-reduction. Moreover, this presentation of LHR admits a factorization theorem, and can be easily generalized to take place inside arguments of terms [2]. Linear head reduction is another motivation for considering the partial box order on redexes, as we now explain. A crucial point of our definition is that that →H —in contrast to →W —is nondeterministic, for instance we have both (λx.y[y/w])z →H (λx.w[y/w])z and (λx.y[y/w])z →H y[y/w][x/z]. This fact is not a drawback, rather a plus, as it faithfully mimicks the parallelism of cut-elimination in proof-nets. A simple case analysis shows that LHR enjoys the diamond property, i.e. any two steps commute and no duplication/erasure is involved. Therefore, the nondeterminism is harmless. In particular, all maximal LHR derivations (if any) have the same length. Concerning standardization, however, not all LHR derivations are standard with respect to the left-to-right order ≺L , consider: (λx.y[y/w])z →H (λx.w[y/w])z →H w[y/w][x/z] This fact is disappointing because the nondeterminism of LHR is only apparent, and so one would like to consider LHR sequences as standard, without having to re-organize them. The box order turns LHR into a standard strategy, giving to the presentation of LHR with explicit substitutions a solid status. T HEOREM 7 (Linear Head Reduction is Standard). 1. Linear head redexes are universally ≺B -external. 2. Linear head reduction is ≺B -standard. Proof. 1) By coinduction on the definition of universally ≺external. Universal minimality: the anchor of →H -redexes is out of all boxes, so they can never be nested by another redex. Universal persistency: it is easily seen that no redex can move the anchor of a →H -redex inside a box. So the residual of a →H -redex is a →H -redex and we conclude by the coinductive hypothesis. 2) A 8 The

one reducing only cuts out of all !-boxes that do not involve the auxiliary conclusion of any box.

universally external redex is easily seen to be external for every coinitial derivation. Then we conclude applying Lemma 5.

12.

Conclusions

We study standardization for the linear substitution calculus, a calculus with explicit substitutions, that is not syntactically orthogonal and that it is equipped with an equational theory that makes it isomorphic to linear logic proof-nets. Our main result is a standardization theorem, nonstandard because it is based on a partial rather than a total order, it lifts to equivalence classes (i.e. proof-nets), and it provides a notion of standard derivation which departs from the one by levels in the linear logic literature. Along the way, we provided other results: 1) a theory of residuals lifting to equivalence classes; 2) a simple left-to-right standardization theorem; 3) a coinductive characterization of the notion of external redex; 4) a normalization theorem; 5) a simple proof that (weak) linear head reduction is standard. Last, we believe that a further contribution of this paper is the fine analysis of Gonthier, L´evy, and Melli`es’ axiomatic framework, which gives new intuitions on their complex notions.

Acknowledgments We are grateful to Paul-Andr´e Melli`es for fruitful discussions. This work was partially funded by the French-Argentinian Laboratory in Computer Science INFINIS (www.infinis.org) and by the Qatar National Research Fund under grant NPRP 09-1107-1-168.

References [1] M. Abadi, L. Cardelli, P. L. Curien, and J.-J. L´evy. Explicit substitutions. Journal of Functional Programming, 4(1):375–416, 1991. [2] B. Accattoli. An abstract factorization theorem for explicit substitutions. In RTA, pages 6–21, 2012. [3] B. Accattoli. Evaluating functions as processes. In TERMGRAPH, pages 41–55, 2013. [4] B. Accattoli. Jumping around the box: graphical and operational studies on λ-calculus and Linear Logic. PhD thesis, La Sapienza University of Rome, february 2011. [5] B. Accattoli and U. Dal Lago. On the invariance of the unitary cost model for head reduction. In RTA, pages 22–37, 2012. [6] B. Accattoli and D. Kesner. The structural λ-calculus. In CSL, pages 381–395, 2010. [7] B. Accattoli, P. Barenbaum, and D. Mazza. Distilling abstract machines. Submitted, 2013. https://sites.google.com/site/ beniaminoaccattoli/machines.pdf?attredirects=0. [8] H. P. Barendregt, R. Kennaway, J. W. Klop, and M. R. Sleep. Needed reduction and spine strategies for the lambda calculus. Information and Computation, 75(3):191–231, 1987. [9] R. Bloo and K. Rose. Preservation of strong normalization in named lambda calculi with explicit substitution and garbage collection. In Computing Science in the Netherlands, pages 62–72. Netherlands Computer Science Research Foundation, 1995. [10] G. Boudol. Computational semantics of term rewriting systems. In Algebraic methods in semantics, pages 169–236. Cambridge University Press, 1986. [11] H. S. Bruggink. Equivalence of reductions in higher-order rewriting. PhD thesis, Utrecht University, 2008. [12] D. Clark and R. Kennaway. Some properties of non-orthogonal term graph rewriting systems. In SEGRAGRA, volume 2 of ENTCS, pages 36–45, 1995. [13] H. Curry and R. Feys. Combinatory Logic. Number Vol. 1 in Studies in logic and the foundations of mathematics. North-Holland, 1958. [14] V. Danos and L. Regnier. Head linear reduction, 2003. //iml.univ-mrs.fr/~regnier/articles/pam.ps.gz.

http:

[15] V. Danos, H. Herbelin, and L. Regnier. Game semantics & abstract machines. In LICS, pages 394–405, 1996. [16] D. de Carvalho, M. Pagani, and L. Tortora de Falco. A semantic measure of the execution time in linear logic. Theor. Comput. Sci., 412(20):1884–1902, 2011. [17] T. Ehrhard and L. Regnier. B¨ohm trees, krivine’s machine and the taylor expansion of lambda-terms. In CiE, pages 186–197, 2006. [18] J.-Y. Girard. Linear logic. Theoretical Computer Science, 50(1):1– 101, 1987. [19] G. Gonthier, J.-J. L´evy, and P.-A. Melli`es. An abstract standardisation theorem. In LICS, pages 72–81, 1992. [20] G. Huet. Residual theory in λ-calculus: A formal development. Journal of Functional Programming, 4(3):371–394, 1994. [21] G. Huet and J.-J. L´evy. Computations in orthogonal rewriting systems, I and II. In Computational Logic - Essays in Honor of Alan Robinson, pages 395–414, 1991. [22] G. Huet and J.-J. L´evy. Call by Need computations in non-ambiguous linear term rewriting systems. Technical Report 359, INRIA, 1979. [23] D. Kesner and S. Lengrand. Resource operators for lambda-calculus. Information and Computation, 205(4):419–473, 2007. ´ Conch´uir. Milner’s lambda calculus with partial [24] D. Kesner and S. O substitutions, 2008. http://www.pps.univ-paris-diderot.fr/ ~kesner/papers/shortpartial.pdf. [25] Z. Khasidashvili and J. R. W. Glauert. Discrete normalization and standardization in deterministic residual structures. In ALP, pages 135–149, 1996. [26] J. W. Klop. Combinatory Reduction Systems. Phd thesis, Utrecht University, 1980. [27] J.-J. L´evy. R´eductions correctes et optimales dans le lambda-calcul. Th´ese d’Etat, Univ. Paris VII, France, 1978. [28] L. Maranget. Optimal derivations in weak lambda-calculi and in orthogonal terms rewriting systems. In POPL, pages 255–269, 1991. [29] G. Mascari and M. Pedicini. Head linear reduction and pure proof net extraction. Theoretical Computer Science, 135(1):111–137, 1994. [30] P.-A. Melli`es. Axiomatic rewriting theory I: A diagrammatic standardization theorem. In Processes, Terms and Cycles: Steps on the Road to Infinity, volume 3838 of LNCS, pages 554–638. Springer, 2005. [31] P.-A. Melli`es. Axiomatic rewriting theory VI: Residual theory revisited. In RTA, pages 24–50, 2002. [32] P.-A. Melli`es. Description Abstraite de syst`eme de r´ee´ criture. PhD thesis, Paris 7 University, 1996. [33] R. Milner. Local bigraphs and confluence: Two conjectures. ENTCS, 175(3):65–73, 2007. [34] L. Paolini and S. Ronchi Della Rocca. Parametric parameter passing lambda-calculus. Information and Computation, 189(1):87–106, 2004. [35] G. D. Plotkin. Call-by-name, call-by-value and the lambda-calculus. Theoretical Computer Science, 1(2):125–159, 1975. [36] L. Regnier. Une e´ quivalence sur les lambda-termes. Theoretical Computer Science, 2(126):281–292, 1994. [37] M. Takahashi. Parallel reductions in λ-calculus. Inf. Comput., 118(1): 120–127, 1995. [38] Terese. Term Rewriting Systems, volume 55 of Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, 2003. [39] V. van Oostrom. Normalisation in weakly orthogonal rewriting. In RTA, pages 60–74, 1999. [40] V. van Oostrom and R. C. de Vrijer. Four equivalent equivalences of reductions. ENTCS, 70(6):21–61, 2002. [41] H. Xi. Upper bounds for standardizations and an application. Journal of Symbolic Logic, 64(1):291–303, 1999.

A Nonstandard Standardization Theorem

used to prove a left-to-right standardization theorem for the cal- culus with ES .... affect the final result nor the length of evaluation sequences (tech- nically, LHR ...

277KB Sizes 1 Downloads 352 Views

Recommend Documents

A Nonstandard Standardization Theorem
Rσ(k). → s with respect to an order ≺ (typically the left-to-right order). ... Reduce the leftmost redex at each step ... Dynamically: small-step operational semantics.

A Nonstandard Counterpart of DNR
Definition M0 ⊂d M1 iff M0 ⊂ω M1 and. (∀A∈SM1. )(∃f∈SM0. )[M1 |=f is dnr(A)]. Recall the following theorem holds,. Given any inf. rec. binary tree T and f:dnr ...

Map-closure: a general purpose mechanism for nonstandard ...
Oct 2, 2012 - The only data types supported are Booleans, reals, pairs, and procedures. ..... the ?ow-analysis techniques used in our compiler. Section.

Nonstandard Numerical Integrations of A Lotka-Volterra System 1 ...
Keywords: Lotka-Voltera model, predator and prey system, nonstandard in- tegration ... also show that solutions form a closed trajectories in (y, x) and (y, z) phase .... System Design, Kohala Coast-Island of Hawai'i, Hawai'i, USA, August 22-.

Map-closure: a general purpose mechanism for nonstandard ...
Oct 2, 2012 - The disclosed system provides a functional programming. G“ 0;' F /44 ... shop on Implementation and Application of Functional Languages.

A Model of Innovation, Standardization, and Imitation
the role of the factor intensity of high-tech inputs (e.g., skilled labor).8 ... mestic savings in the North. Then the trade account is balanced at all times owing.

A STRUCTURE THEOREM FOR RATIONALIZABILITY ...
under which rti (ai) is a best reply for ti and margΘXT−i. (πti,rti (ai)) = κti . Define a mapping φti,rti (ai),m : Θ* → Θ* between the payoff functions by setting. (A.5).

A STRUCTURE THEOREM FOR RATIONALIZABILITY IN ... - STICERD
We show that in any game that is continuous at infinity, if a plan of action ai is rationalizable ... Following Chen, we will use the notation customary in incomplete ...

A STRUCTURE THEOREM FOR RATIONALIZABILITY IN ... - STICERD
particular, there, we have extensively discussed the meaning of perturbing interim ..... assumption that Bi (h), the set of moves each period, is finite restricts the ...

Elements of Nonstandard Algebraic Geometry
techniques of nonstandard mathematics. Contents. 1 Introduction. 2. 2 List of Notation ..... the collection {Af,g,U }x∈U,f∈p,g /∈p has finite intersection property.

A Theorem on Orthology Centers
Sep 15, 2004 - bx x+z . In the notations of John H. Conway, the pedal A∗ of Oa on BC has homogeneous barycentric coordinates (0 : uSC + a2v : uSB + a2w).

Nuclear Powerplant Standardization Light.pdf
Washington Public Power Supply System. James F. Mallay. Electric Power Research Institute. David Okrent. University of California, Los Angeles. Oswald F.

Comparison Theorem
part), l'Hôpital's rule, and some other tools and the geometric intuition can be illustrated .... Ui(t) := 1. √fi(t0). Ji(t). (3.9) for i = 1, 2. Therefore, by the Jacobi equations and the ... Then define a map ϕ from the set of vector fields alo

Maximum Power Transfer Theorem
from the power source to the load is when the resistance ... Function generator on the Velleman oscilloscope that is used in a ... Th . http://www.vellemanusa.com ...

Squeeze Theorem Exercises.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Squeeze ...

WEDDERBURN'S FACTORIZATION THEOREM ... - Semantic Scholar
May 25, 2001 - Nrd|N : N −→ Z(N) is well defined, where Z(N) = F .... Let D1 = C((x1)) and define σ1 : D1 → D1 by the rule σ1(x1) = −x1. Now ... dia Math. Sci.

Nonstandard counterparts of several weak axioms
Ss: range of Xs,Ys,..., subsets of N. S ... Vs = (Ms,Ss;0s,1s,. ...... ERNA. J. Symbolic Logic 73 (2):689–710, 2008. H. Jerome Keisler, Nonstandard arithmetic and ...

Läuchli's Completeness Theorem from a Topos ... - Springer Link
Feb 6, 2008 - We believe that the topos theoretic tools available ... formation and λD-abstraction relative to a domain D ∈ D. .... to check if there is a map Z6.

A utility representation theorem with weaker continuity ...
Sep 10, 2009 - ... of the Japan Society for the Promotion of Science (JSPS) and financial ... In conjunction with the independence axiom, Herstein and Milnor [7] ...