This paper extends the known commutation of Taylor expansion and normalization from pure lambda calculus to algebraic lambda calculus with non-determinism, introducing resource vectors and a generalized notion of B"ohm trees.
Contribution
It introduces a reduction on resource vectors and generalizes B"ohm trees to handle non-deterministic algebraic lambda calculus, ensuring normalization commutes with Taylor expansion.
Findings
01
Taylor expansion and normalization commute for a broad class of algebraic lambda terms.
02
Resource vectors effectively model the dynamics of beta-reduction in non-deterministic settings.
03
A new generalized notion of B"ohm trees is proposed for algebraic lambda calculus.
Abstract
It has been known since Ehrhard and Regnier's seminal work on the Taylor expansion of λ-terms that this operation commutes with normalization: the expansion of a λ-term is always normalizable and its normal form is the expansion of the B\"ohm tree of the term. We generalize this result to the non-uniform setting of the algebraic λ-calculus, i.e. λ-calculus extended with linear combinations of terms. This requires us to tackle two difficulties: foremost is the fact that Ehrhard and Regnier's techniques rely heavily on the uniform, deterministic nature of the ordinary λ-calculus, and thus cannot be adapted; second is the absence of any satisfactory generic extension of the notion of B\"ohm tree in presence of quantitative non-determinism, which is reflected by the fact that the Taylor expansion of an algebraic λ-term is not always…
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Formal Methods in Verification · Polynomial and algebraic computation
*Theory of computation Denotational semantics; *
Theory of computation Lambda calculus;
Theory of computation Linear logic;
\titlecomment
An extended abstract [Vau17] of this paper, focused on the
translation of parallel β-reduction steps through Taylor expansion, appeared
in the proceedings of CSL 2017.
Normalizing the Taylor expansion of non-deterministic λ-terms,
via parallel reduction of resource vectors
Lionel Vaux
Aix Marseille Univ, CNRS, Centrale Marseille, I2M, Marseille, France
It has been known since Ehrhard and Regnier’s seminal work
on the Taylor expansion of λ-terms that this operation
commutes with normalization: the expansion of a λ-term
is always normalizable and its normal form is the expansion
of the Böhm tree of the term.
We generalize this result to the non-uniform setting of the
algebraic λ-calculus, i.e., λ-calculus extended with linear
combinations of terms. This requires us to tackle two difficulties:
foremost is the fact that Ehrhard and Regnier’s techniques rely heavily on
the uniform, deterministic nature of the ordinary λ-calculus, and thus cannot
be adapted; second is the absence of any satisfactory generic extension of
the notion of Böhm tree in presence of quantitative non-determinism, which is
reflected by the fact that the Taylor expansion of an algebraic λ-term is not
always normalizable.
Our solution is to provide a fine grained study of the dynamics of
β-reduction under Taylor expansion, by introducing a notion of reduction on
resource vectors, i.e. infinite linear combinations of resource λ-terms.
The latter form the multilinear fragment of the differential λ-calculus, and
resource vectors are the target of the Taylor expansion of λ-terms.
We show the reduction of resource vectors contains the image of any β-reduction
step, from which we deduce that Taylor expansion and normalization commute on
the nose.
We moreover identify a class of algebraic λ-terms, encompassing both normalizable
algebraic λ-terms and arbitrary ordinary λ-terms: the expansion of these is
always normalizable, which guides the definition of a generalization of Böhm
trees to this setting.
This work was supported by
French ANR projects Coquas (number ANR-12-JS02-0006)
and Récré (number ANR-11-BS02-0010),
as well as the French-Italian Groupement de Recherche International on Linear Logic.
1. Introduction
Quantitative semantics was first proposed by Girard [Gir88]
as an alternative to domains and continuous functionals, for defining
denotational models of λ-calculi with a natural interpretation of
non-determinism: a type is given by a collection of “atomic states”; a term
of type A is then represented by a vector (i.e. a possibly infinite formal linear
combination) of states. The main matter is the treatment of the
function space: the construction requires the interpretation of function terms to be analytic, i.e. defined by power series.
This interpretation of λ-terms was at the origin of linear
logic: the application of an analytic map to its argument boils down to the
linear application of its power series (seen as a matrix) to the vector of
powers of the argument; similarly, linear logic decomposes the
application of λ-calculus into the
linear cut rule and the promotion operator. Indeed, the seminal model of linear
logic, namely coherence spaces and stable/linear functions, was introduced as a
qualitative version of quantitative semantics [Gir86, especially Appendix C].
Dealing with power series, quantitative semantics must account for infinite
sums. The interpretations of terms in Girard’s original model can be seen as a special case of Joyal’s analytic
functors [Joy86]: in particular, coefficients are sets
and infinite sums are given by coproducts. This allows to give a semantics to fixed
point operators and to the pure, untyped λ-calculus. On the other hand, it does
not provide a natural way to deal with weighted (e.g., probabilistic)
non-determinism, where coefficients are taken in an external semiring of
scalars.
In the early 2000’s, Ehrhard introduced an alternative presentation of
quantitative semantics [Ehr05], limited to a typed setting, but where
types can be interpreted as particular vector spaces, or more generally
semimodules over an arbitrary fixed semiring; called finiteness spaces,
these are moreover equipped with a linear topology, allowing to interpret
linear logic proofs as linear and continuous maps, in a standard sense.
In this setting, the formal operation of differentiation of power series
recovers its usual meaning of linear approximation of a function, and morphisms
in the induced model of λ-calculus are subject to Taylor expansion:
the application φ(α) of the
analytic function φ to the vector α boils down to the sum
∑n∈Nn!1(∂xn∂nφ)x=0⋅αn
where (∂xn∂nφ)x=0
is the n-th derivative of φ computed at [math],
which is an n-linear map, and αn is the n-th tensor power of α.
Ehrhard and Regnier gave a computational meaning to such derivatives by
introducing linearized variants of application and substitution in the λ-calculus,
which led to the differential λ-calculus [ER03],
and then the resource λ-calculus [ER08] —
the latter retains iterated derivatives at zero as the only form of application.
They were then able to recast the above Taylor expansion formula in a syntactic,
untyped setting: to every λ-term M, they associate a vector τ(M) of
resource λ-terms, i.e. terms of the resource λ-calculus.
The Taylor expansion of a λ-term can be seen as an intermediate, infinite
object, between the term and its denotation in quantitative semantics. Indeed,
resource terms still retain a dynamics, if a very simple, finitary one: the size of
terms is strictly decreasing under reduction. Furthermore, normal resource terms are
in close relationship with the atomic states of quantitative semantics of the
pure λ-calculus (or equivalently with the elements of a reflexive object in the
relational model [BEM07]; or with normal type derivations in a
non-idempotent intersection type system [dC08]), so that the normal
form of τ(M) can be considered as the denotation of M, which allows
for a very generic description of quantitative semantics.
Other approaches to quantitative semantics generally impose a constraint on the
computational model a priori. For instance, the model of finiteness
spaces [Ehr05] is, by design, limited to strongly normalizing
computation. Another example is that of probabilistic coherence spaces
[DE11], a model of untyped λ-calculi extended with probabilistic
choice, rather than arbitrary weighted superpositions.
Alternatively, one can interpret non-deterministic extensions of PCF
[LMMP13, Lai16], provided the semiring of scalars has
all infinite sums. By contrast, the “normalization of
Taylor expansion” approach is more canonical, as it does not rely on a
restriction on the scalars, nor on the terms to be interpreted.
Of course, there is a price attached to such canonicity:
in general, the normal form of a vector of resource
λ-terms is not well defined, because we may have to consider infinite sums of
scalars.
Ehrhard and Regnier were nonetheless able to prove that the Taylor expansion
τ(M) of a pure λ-term is always normalizable [ER08]. This
can be seen as a new proof of the fact that Girard’s quantitative semantics of pure
λ-terms uses finite cardinals only [Has96].
They moreover established that this normal form is exactly the Taylor expansion
of the Böhm tree BT(M) of M [ER06] (BT(M) is the
possibly infinite tree obtained by hereditarily applying the head reduction
strategy in M).
Both results rely heavily on the uniformity property of the pure λ-calculus:
all the resource terms in τ(M) follow a single syntactic tree pattern.
This is a bit disappointing since quantitative semantics
was introduced as a model of non-determinism,
which is ruled out by uniformity.
Actually, the Taylor expansion operator extends naturally to the algebraic
λ-calculus [Vau09]: a generic, non-uniform extension of
λ-calculus, augmenting the syntax with formal finite linear
combinations of terms. Then it is not difficult to find terms whose
Taylor expansion is not normalizable.
Nonetheless, interpreting types as finiteness spaces of resource terms,
Ehrhard [Ehr10] proved by a reducibility technique that
the Taylor expansion of algebraic λ-terms typed in a variant of system F is
always normalizable.
1.1. Main results
In the present paper, we generalize Ehrhard’s result and show that all weakly
normalizable algebraic λ-terms have a normalizable Taylor expansion (Theorem
7, p.7).111
We had already obtained such a result for strongly normalizable λ-terms
in a previous work with Pagani and Tasson [PTV16]: there, we
further proved that the finiteness structure on resource λ-terms could be
refined to characterize exactly the strong normalizability property in a
λ-calculus with finite formal sums of terms.
Here we rely on a much coarser notion of finiteness: see subsection
8.1.
We moreover relate the normal form of the expansion of a term with the
normal form of the term itself, both in a computational sense (i.e. the
irreducible form obtained after a sequence of reductions) and in a more
denotational sense, via an analogue of the notion of Böhm tree:
Taylor expansion does commute with normalization, in both those senses
(Theorem 8, p.8;
Theorem 9, p.9).
When restricted to pure λ-terms, Theorem 9
provides a new proof, not relying on uniformity, that the normal form of
τ(M) is isomorphic to BT(M).
In their full extent, our results provide a generalization of the notion of
non-deterministic Böhm tree [dLP95] in a weighted,
quantitative setting.
Let us stress that neither Ehrhard’s work [Ehr10] nor our own
previous work with Pagani and Tasson [PTV16] addressed the
commutation of normalization and Taylor expansion. Indeed, in the absence of
uniformity, the techniques used by Ehrhard and Regnier
[ER08, ER06] are no longer available, and we had to design another
approach.222
It is in fact possible to refine Ehrhard and Regnier’s approach, via
the introduction of a rigid variant of Taylor expansion
[TAO17], which can then be adapted to the non-deterministic
setting.
This allows to describe the coefficients in the normal form of Taylor
expansion, like in the uniform case, and then prove that Taylor expansion
commutes with the computation of Böhm trees.
It does not solve the problem of possible divergence, though, and one has to
assume the semiring of coefficients is complete, i.e. that all sums converge.
See Subsection 1.3 on related work for more details.
Our solution is to introduce a notion of reduction on resource vectors,
so that: (i) this reduction contains the translation of any β-reduction step
(Lemma 7.10, p.7.10);
(ii) normalizability (and the value of the normal form) of resource vectors is
preserved under reduction (Lemma 8.4,
p.8.4). This approach turns out to be quite
delicate, and its development led us to two technical contributions that we
deem important enough to be noted here:
•
the notion of reduction structure (subsection
5.3) that allows to control the families of resource
terms simultaneously involved in the reduction of a resource vector:
in particular this provides a novel, modular mean to circumvent the
inconsistency of β-reduction in presence of negative coefficients
(a typical deficiency of the algebraic λ-calculus [Vau09]);
•
our analysis of the effect of parallel reduction on the size of resource
λ-terms (Section 6): this constitutes the technical core
of our approach, and it plays a crucial rôle in establishing key additional
properties such as confluence (Lemma 6.26,
p.6.26, and Corollary
6.46,
p.6.46) and conservativity
(Lemma 7.24,
p.7.24, and
Lemma 8.33,
p.8.33).
1.2. Structure of the paper
The paper begins with a few mathematical preliminaries, in section
2: we recall some definitions
about semirings and semimodules (Subsection 2.1), if only to fix
notations and vocabulary; we also provide a very brief review of finiteness
spaces (Subsection 2.2),
then detail the particular case of
linear-continuous maps defined by summable families of vectors (subsection
2.3), the latter notion pervading the paper.
In Section 3 we review the syntax and the reduction
relation of the resource λ-calculus, as introduced by Ehrhard and Regnier
[ER08]. The subject is quite standard now, and the only new
material we provide is about minor and unsurprising combinatorial properties of
multilinear substitution.
Section 4 contains our first notable contribution: after
recalling the Taylor expansion construction, we prove that it is compatible
with substitution. This result is related with the functoriality of promotion
in quantitative denotational models and the proof technique is quite similar.
In the passing, we recall the syntax of the algebraic λ-calculus and briefly
discuss the issues raised by the contextual extension of β-reduction in
presence of linear combinations of terms, as evidenced by previous work
[Vau07, AD08, Vau09, etc.].
In Section 5, we discuss the possible extensions
of the reduction of the resource λ-calculus to resource vectors, i.e. infinite
linear combinations of resource terms, and identify two main issues. First, in
order to simulate β-reduction, we
are led to consider the parallel reduction of resource terms in resource
vectors, which is not always well defined. Indeed, a single resource term
might have unboundedly many antecedents by parallel reduction, hence this
process might generate infinite sums of coefficients: we refer to this
phenomenon as the size collapse of parallel resource reduction
(Subsection 5.2).
Second, similarly to the case of the algebraic λ-calculus, the induced
equational theory might become trivial, due the interplay between coefficients
in vectors and the reduction relation.
To address the latter problem we introduce the notion of reduction structure
(Subsection 5.3) which allows us to modularly restrict
the set of resource terms involved in a reduction: later in the paper, we will
identify reduction structures ensuring the consistency of the reduction of
resource vectors (Subsection 8.4).
In Section 6, we introduce successive restrictions of the
parallel reduction of resource vectors, in order to avoid the abovementioned
size collapse. We first observe that, to bound the size of a term as a
function of the size of any of its reducts, it is sufficient to bound the
length of chains of immediately nested fired redexes in a single parallel
reduction step (Subsection 6.1).
This condition does not allow us to close a pair of reductions to a common
reduct, because it is not stable under unions of fired redexes. We thus tighten
it to bounding the length of all chains of (not necessarily immediately) nested
fired redexes (Subsection 6.2): this enables us to
obtain a strong confluence result, under a mild hypothesis on the semiring.
An even more demanding condition is to require the fired redexes as well
as the substituted variables to occur at a bounded depth (subsection
6.3): then we can define a maximal parallel reduction
step for each bound, which entails strong confluence without any additional hypothesis.
Finally, we consider reduction structures involving resource terms of bounded
height (Subsection 6.4): when restricting to such a
bounded reduction structure, the strongest of the above three conditions
is automatically verified.
We then show, in Section 7, that the translation
of β-reduction through Taylor expansion fits into this setting: the height of
the resource terms involved in a Taylor expansion is bounded by that of the
original algebraic λ-term, and every β-reduction step is an instance of the
previously introduced parallel reduction of resource vectors. As a consequence
of our strongest confluence result, we moreover obtain that any reduction step
from the Taylor expansion of a λ-term can be extended into the translation of a
parallel β-reduction step.
We turn our attention to normalization in Section 8.
We first show that normalizable resource vectors are stable under reduction.
We moreover establish that their normal form is obtained as the limit of the
parallel left reduction strategy (Subsection 8.1).
Then we introduce Taylor normalizable algebraic λ-terms as those having a
normalizable Taylor expansion, and deduce from the previous results that they
are stable under β-reduction (Subsection 8.2):
in particular, the normal form of Taylor expansion does define a denotational
semantics for that class of terms.
Then we establish that normalizable terms are Taylor normalizable (subsection
8.3): it follows that normalization and Taylor
expansion commute on the nose.
We conclude with Section 9, showing how our techniques
can be applied to the class of hereditarily determinable terms, that we
introduce ad-hoc: those include pure λ-terms as well as normalizable
algebraic λ-terms as a particular case, and we show that all
hereditarily determinable terms are Taylor normalizable and the
coefficients of the normal form are given by a sequence of approximants, close
to the Böhm tree construction.
1.3. Related and future work
Besides the seminal work by Ehrhard and Regnier [ER08, ER06] in
the pure case, we have already cited previous approaches to the normalizability
of Taylor expansion based on finiteness conditions [Ehr10, PTV16].
A natural question to ask is how our generic notion of normal form of Taylor
expansion compares with previously introduced notions of denotation in non-deterministic
settings: non-deterministic Böhm trees [dLP95],
probabilistic Böhm trees [Lev16], weighted relational models
[DE11, LMMP13, Lai16], etc.
The very statement of such a question raises several difficulties, prompting
further lines of research.
One first obstacle is the fact that, by contrast with the uniform case of the
ordinary λ-calculus, the Taylor expansion operator is not injective on
algebraic λ-terms (see Subsection 4.5), not even on the
partial normal forms that we use to introduce the approximants in section
9. This is to be related with the quotient that the
non-deterministic Böhm trees of de’Liguoro and Piperno
[dLP95] must undergo in order to capture observational
equivalence. On the other hand, to our knowledge, finding
sufficient conditions on the semiring of scalars ensuring that the Taylor
expansion becomes injective is still an open question.
Also, we define normalizable vectors based on the notion of summability: a sum
of vectors converges when it is componentwise finite i.e., for each component,
only finitely many vectors have a non-zero coefficient (see subsection
2.3). If more information is available on scalars,
namely if the semiring of scalars is complete in some topological or
order-theoretic sense, it becomes possible to normalize the Taylor expansion of
all terms.
Indeed, Tsukada, Asada and Ong have recently established [TAO17] the
commutation between computing Böhm trees and Taylor expansion with
coefficients taken in the complete semiring of positive reals [0,+∞]
where all sums converge.
Let us precise that they do not consider weighted non-determinism, only formal
binary sums of terms, and that the notion of Böhm tree they consider is a very
syntactic one, similar to the partial normal forms we introduce in section
9.
Their approach is based on a precise description of the relationship
between the coefficients of resource terms in the expansion of a term and those in
the expansion of its Böhm-tree, using a rigid Taylor expansion as an
intermediate step: this avoids the ambiguity between the sums of coefficients
generated by redundancies in the expansion and those representing
non-deterministic superpositions.
Tsukada, Asada and Ong’s work can thus be considered as a refinement of Ehrhard
and Regnier’s method, that they are moreover able to generalize to the
non-deterministic case provided the semiring of scalars is complete.
By contrast, our approach is focused on β-reduction and identifies a class of
algebraic λ-terms for which the normalization of Taylor expansion converges
independently from the topology on scalars.
It seems only natural to investigate the connections between both approaches,
in particular to tackle the case of weighted non-determinism in a complete
semiring, as a first step towards the treatment of probabilistic or quantum
superposition, as also suggested by the conclusion of their paper.
In the probabilistic setting, though, the Böhm tree
construction [Lev16] relies on both the topological properties of
real numbers and the restriction to discrete probability subdistributions.
Relying on this, Dal Lago and Leventis have recently shown
[DLL19] that the sum defining the normal form
of Taylor expansion of an arbitrary probabilistic λ-term always converges with
finite coefficients, and that this normal form is the Taylor expansion of its
probabilistic Böhm tree, in the non-extensional sense [Lev16, section
4.2.1].
To get a better understanding of the shape of Taylor
expansions of probabilistic λ-terms and their stability under reduction, a possible
first step is to investigate probabilistic coherence spaces
[DE11] on resource λ-terms: these would be the analogue, in the probabilistic setting, of
the finiteness structures ensuring the summability of normal forms in the
non-deterministic setting (see Subsection 8.3).
Apart from relating our version of quantitative semantics with pre-existing
notions of denotation for non-deterministic λ-calculi, we plan to investigate
possible applications to other proof theoretic or computational frameworks:
namely, linear logic proof nets [Gir87] and infinitary λ-calculus
[KKSdV97].
The Taylor expansion of λ-terms can be generalized to linear logic proof nets:
the case of linear logic can even be considered as being more primitive, as it
is directly related with the structure of those denotational models that
validate the Taylor expansion formula [Ehr16].
Proof nets, however, do not enjoy the uniformity property of λ-terms:
no general coherence relation is satisfied by the elements of the Taylor expansion of a
proof net [Tas09, section V.4.1]. This can be related with the
non-injectivity of coherence semantics [TdF03].
In particular, it is really unclear how Ehrhard and Regnier’s methods, or even
Tsukada, Asada and Ong’s could be transposed to this setting.
By contrast, our recent work with Chouquet [CA18]
shows that our study of reduction under Taylor expansion can be adapted to
proof nets.
It is also quite easy to extend the Taylor expansion operator to infinite
λ-terms, at least for those of Λ001, where only the argument
position of applications is treated coinductively.
For infinite λ-terms, it is no longer the case that the support of Taylor
expansion involves resource λ-terms of bounded height only.
Fortunately, we can still rely on the results of subsection
6.2, where we only require a bound on the nesting of
fired redexes: this should allow us to give a counterpart, through Taylor
expansion, of the strongly converging reduction sequences of infinite λ-terms.
More speculatively, another possible outcome is a characterization of
hereditarily head normalizable terms via their Taylor expansion, adapting our
previous work on normalizability with Pagani and Tasson [PTV16].
2. Technical preliminaries
We write:
•
N for the semiring of natural numbers;
•
P(X) for the powerset of a set X: X∈P(X) iff X⊆X;
•
#X for the cardinal of a finite set X;
•
\ocX for the set of finite multisets of elements of X;
•
[x1,…,xn]∈\ocX for the
multiset with elements x1,…,xn∈X
(taking repetitions into account),
and then #[x1,…,xn]=n for its
cardinality;
•
∏i∈IXi and ∑i∈IXi respectively
for the product and sum of a family (Xi)i∈I of sets:
in particular ∑i∈IXi=⋃i∈I{i}×Xi;
•
XI=∏i∈IX for the set of applications from I to X or,
equivalently, for the set of I indexed families of
elements of X.
Throughout the paper we will be led to consider various categories of sets and
elements associated with a single base set X: elements of X, subsets of
X, finite multisets of elements of X, etc. In order to help keeping
track of those categories, we generally adopt the following typographic
conventions:
•
we use small latin letters for
the elements of X, say a,b,c∈X;
•
for subsets of X, we use
cursive capitals, say A,B,C∈P(X);
•
for sets of subsets of X, we use
Fraktur capitals, say A,B,C⊆P(X);
•
for (possibly infinite) linear combinations of elements of X, we use
small greek letters, say α,β,γ∈SX,
where S denotes some set of scalar coefficients;
•
we transpose all of the above conventions to the
set \ocX of finite multisets by overlining:
e.g., we write a=[a1,…,an]∈\ocX,
A⊆\ocX or α∈S\ocX.
In the remaining of this section, we introduce basic mathematical content that
will be used throughout the paper.
2.1. Semirings and semimodules
A semiring333
The terminology of semirings is much less well established
than that of rings, and one can find various non equivalent
definitions depending on the presence of units or on commutativity
requirements. Following Golan’s terminology [Gol13],
our semirings are commutative semirings, which is required
here because we consider multilinear applications between
modules.
S is the data of a carrier set S, together
with commutative monoids (S,+S,0S)
and (S,⋅S,1S) such that
the multiplicative structure distributes over the additive one, i.e. for all a,b,c∈S,
a⋅S0S=0S and
a⋅S(b+Sc)=a⋅Sb+Sa⋅Sc.
We will in general abuse notation and identify S with its carrier set S.
We will moreover omit the subscripts on symbols +, ⋅, [math] and 1, and
denote multiplication by concatenation: ab=a⋅b.
We also use standard notations for finite sums and products in S, e.g.∑i=1nai=a1+⋯+an.
For any semiring S, there is a unique semiring morphism (in the obvious
sense) from N to S: to n∈N we associate the sum
∑i=1n1∈S that we also write n∈S, although this morphism
is not necessarily injective. Consider for instance the semiring B
of booleans, with B={0,1}, +B=max and ⋅B=×.
We finish this subsection by recalling the definitions of
semimodules and their morphisms.
A (left) S-semimoduleM is the data of a commutative
monoid (M,0M,+M) together with an
external product .M:S×M→M
subject to the following identities:
[TABLE]
for all a,b∈S and m,n∈M.
Again, we will in general abuse notation and identify M with its carrier set M,
and omit the subscripts on symbols +, . and [math].
Let M and N be S-semimodules.
We say ϕ:M→N is linear if
[TABLE]
for all m1,…,mn∈M and all a1,…,an∈S.
If moreover M1,…,Mn are S-semimodules,
we say ψ:M1×⋯×Mn→N is n-linear
if it is linear in each component.
Given a set X, SX is
the semimodule of formal linear combinations of elements of X:
a vectorξ∈SX is nothing but an X-indexed
family of scalars (ξx)x∈X, that we may
also denote by ∑x∈Xξx.x.
The support∣ξ∣ of a vector ξ∈SX is the set of elements
of X having a non-zero coefficient in ξ:
[TABLE]
We write S[X] for the set of vectors with finite support:
[TABLE]
In particular S[X] is the semimodule freely generated by X,
and is a subsemimodule of SX.
2.2. Finiteness spaces
A finiteness space [Ehr05] is a subsemimodule of SX
obtained by imposing a restriction on the support of vectors, as follows.
If X is a set, we call structure on X any set S⊆P(X),
and then the dual structure is
[TABLE]
A relational finiteness space is a pair (X,F),
where X is a set (the web of the finiteness space) and
F⊆P(X) is a structure on X
such that F=F⊥⊥: F is then called
a finiteness structure, and we say X⊆X
is finitary in (X,F) iff X∈F.
The finiteness space generated by (X,F),
denoted by S⟨X,F⟩,
or simply S⟨F⟩,
is then the set of vectors on X with finitary support:
ξ∈S⟨F⟩ iff ∣ξ∣∈F.
By this definition, if ξ∈S⟨F⟩ and
ξ′∈S⟨F⊥⟩ then the sum ∑x∈Xξxξx′ involves
finitely many nonzero summands.
Finitary subsets are downwards closed for
inclusion, and finite unions of finitary subsets are finitary,
hence S⟨X,F⟩ is a subsemimodule of SX.
Moreover, the least (resp. greatest) finiteness structure
on X is the set Pf(X) of finite subsets of X (resp. the powerset P(X)),
generating the finiteness space S[X] (resp. SX).
We do not describe the whole category of finiteness spaces and linear-continuous
maps here. In particular we do not recall the details of the linear topology induced
on S⟨X,F⟩ by F: the reader
may refer to Ehrhard’s original paper [Ehr05] or his survey presentation of
differential linear logic [Ehr16].
In the following, we focus on a very particular case, where the
finiteness structure on base types is trivial (i.e. there is no restriction on the
support of vectors):
linear-continuous maps are then univocally generated by summable functions.
We started with the general notion of finiteness space
nonetheless, because it provides a good background for the general spirit of
our contributions: we are interested in infinite objects restricted so that,
componentwise, all our constructions involve finite sums only.
Also, the semimodule of normalizable resource vectors introduced in section
8 is easier to work with once its finiteness space
structure is exposed.
2.3. Summable functions
Let ξ=(ξi)i∈I∈(SX)I be a family of vectors:
write ξi=∑x∈Xξi,x.x.
We say ξ is summable
if, for all x∈X,
{i∈I;x∈∣ξi∣} is finite.
In this case, we define the sum ∑ξ=∑i∈Iξi∈SX
in the obvious, pointwise way:444
The reader can check that the family ξ is summable iff
the support set
{(i,x)∈I×X;ξi,x=0}
is finitary
in the relational arrow finiteness space (I×X,P(I)⊸P(X))
as defined by Ehrhard [Ehr05, see in particular Lemma 3].
Then ∑ξ is the result of applying the matrix (ξi,x)i∈I,x∈X
to the vector (1)i∈I∈S⟨P(I)⟩=SI.
[TABLE]
Of course, any finite family of vectors is summable and, fixing an index set
I and a base set X, summable families in (SX)I form an
S-semimodule, with operations defined pointwise.
Moreover, if (ξi)i∈I∈(SX)I is summable,
then it follows from the inclusion
∣ai.ξi∣⊆∣ξi∣ that (ai.ξi)i∈I
is also summable for any family of scalars (ai)i∈I∈SI.
Whenever the n-ary function
f:X1×⋯×Xn→SY
(i.e. the family
(f(x1,…,xn))(x1,…,xn)∈X1×⋯×Xn)
is summable,
we can thus define its extension⟨f⟩:SX1×⋯×SXn→SY
by
[TABLE]
Note that we can consider f:X→SY as a Y×X matrix:
fy,x=f(x)y. Then if f is summable and ξ∈SX,
⟨f⟩(ξ) is nothing but the application of the matrix
f to the column ξ: the summability hypothesis ensures that
this is well defined.
It turns out that the linear extensions of summable functions
are exactly the linear-continuous maps, defined as follows:
Definition \thethm.
Let φ:SX1×⋯×SXn→SY.
We say φ is n-linear-continuous if, for all
summable families
ξ1=(ξ1,i)i∈I1∈(SX1)I1,…,ξn=(ξn,i)i∈In∈(SXn)In,
the family
(φ(ξ1,i1,…,ξn,in))(i1,…,in)∈I1×⋯×In is summable and,
for all families of scalars,
a1=(a1,i)i∈I1∈SI1,…,an=(an,i)i∈In∈SIn,
we have
[TABLE]
Lemma \thethm.
If φ:SX1×⋯×SXn→SY
is n-linear-continuous then its restriction
φ↾X1×⋯×Xn
is a summable n-ary function and
φ=⟨φ↾X1×⋯×Xn⟩.
Conversely, if f:X1×⋯×Xn→SY is
a summable n-ary function then ⟨f⟩ is n-linear-continuous.
Proof.
It is possible to derive both implications from general results
on finiteness spaces.555
One might check that a map
φ:SX1×⋯×SXn→SY
is n-linear-continuous in the sense of Definition 2.3
iff it is n-linear and continuous in the sense of the linear topology of
finiteness spaces, observing that the topology on SX=S⟨P(X)⟩ is the product topology (S being
endowed with the discrete topology) [Ehr05, Section 3].
Moreover, n-ary summable functions f:X1×⋯×Xn→SY
are the elements of the finiteness space
S⟨P(X1)⊗⋯⊗P(Xn)⊸P(Y)⟩.
As a general fact, the
linear-continuous maps S⟨F⟩→S⟨G⟩ are exactly
the linear extensions of vectors in S⟨F⊸G⟩.
But linear-continuous maps from a tensor product of
finiteness spaces correspond with multilinear-hypocontinuous maps
[Ehr05, Section 3]
rather than the more restrictive multilinear-continuous maps.
In the very simple setting of summable functions, though, both notions
coincide, since SX is always locally linearly compact
[Ehr05, Proposition 15].
We also sketch a direct proof.
The first implication follows directly from the definitions, observing
that each diagonal family of vectors (x)x∈Xi is obviously summable.
For the converse:
let ξ1=(ξ1,i)i∈I1∈(SX1)I1,…,ξn=(ξn,i)i∈In∈(SXn)In
be summable families.
We first prove that the family
[TABLE]
is summable. Fix y∈Y.
If y∈∣ξ1,i1,x1⋯ξn,in,xn.f(x1,…,xn)∣ then in particular
y∈∣f(x1,…,xn)∣: since f is summable, there are finitely many
such tuples (x1,…,xn)∈X1×⋯×Xn.
For each such tuple (x1,…,xn) and each k∈{1,…,n},
since ξk is summable, there are finitely many ik’s such that
ξk,ik,xk=0. The necessary equation then follows from the
associativity of sums.
∎
From now on, we will identify summable functions with their
multilinear-continuous extensions. Moreover, it should be clear that
multilinear-continuous maps compose.
3. The resource λ-calculus
In this section, we recall the syntax and reduction of the resource λ-calculus,
that was introduced by Ehrhard and Regnier [ER08] as the
multilinear fragment of the differential λ-calculus [ER03].
The syntax is very similar to that of Boudol’s resource λ-calculus
[Bou93] but the intended meaning (multilinear approximations of
λ-terms) as well as the dynamics is fundamentally different.
We also recall the definitions of the multilinear counterparts of term substitution:
partial differentiation and multilinear substitution.
In the passing, we introduce various quantities on resource λ-terms (size,
height, and number and maximum depth of occurrences of a variable) and we state
basic results that will be used throughout the paper.
Finally, we present the dynamics of the calculus: resource reduction and
normalization.
3.1. Resource expressions
In the remaining of the paper, we suppose an infinite, countable set
V of variables is fixed: we use small letters x,y,z to denote
variables.
We define the sets Δ of resource terms
and \ocΔ of resource monomials by mutual induction as follows:666
We use a self explanatory if not standard variant of BNF notation
for introducing syntactic objects:
\ocΔ∋s,t,u,v,w::=[]∣[s]⋅t
means that we define the set \ocΔ of resource monomials
as that inductively generated by the empty monomial, and
addition of a term to a monomial, and that we will denote resource monomials
using overlined letters among s,t,u,v,w, possibly with
sub- and superscripts.
[TABLE]
Terms are considered up to α-equivalence and monomials up to permutativity:
we write [t1,…,tn] for [t1]⋅(⋯⋅([tn]⋅[]))
and equate [t1,…,tn] with [tf(1),…,tf(n)] for all
permutation f of {1,…,n},
so that resource monomials coincide with finite multisets of resource terms.777
Resource monomials are often called bags, bunches or poly-terms in the
literature, but we prefer to strengthen the analogy with power series here.
We will then write s⋅t for the multiset union of s and t,
and #[s1,…,sn]:=n.
We call resource expression any resource term or resource monomial
and write (\oc)Δ for either Δ or \ocΔ:
whenever we use this notation several times in the same context,
all occurrences consistently denote the same set. When we make a definition
or a proof by induction on resource expressions, we actually use a mutual induction
on resource terms and monomials.
Definition \thethm.
We define by induction over a resource expression
e∈(\oc)Δ, its sizes(e)∈N
and its heighth(e)∈N:
[TABLE]
It should be clear that, for all e∈(\oc)Δ,
h(e)≤s(e). Also observe that s(s)>0 and h(s)>0 for
all s∈Δ, and s(s)≥#s for all s∈\ocΔ.
In the application case, we chose not to increment the height of the function:
this is not crucial but it will allow to simplify some of our
computations in Section 6. In particular,
in the case of a redex we have
h(⟨λxs⟩t)=1+max{h(s),h(t)}.
For all resource expression e, we write
fv(e) for the set of its free variables.
In the remaining of the paper, we will often have to prove that
some set E⊆(\oc)Δ is finite:
we will generally use the fact that E is finite
iff both {s(e);e∈E} and fv(E):=⋃e∈Efv(e)
are finite.
Besides the size and height of an expression,
we will also need finer grained information on
occurrences of variables, providing a quantitative counterpart to the
set of free variables:
Definition \thethm.
We define by induction over resource expressions
the number nx(e)∈N
of occurrences and the set dx(e)∈N of
occurrence depths of a variable x in e∈(\oc)Δ:
[TABLE]
and
[TABLE]
We then write mdx(e):=maxdx(e)
for the maximal depth of occurrences of x in e.
Again, it should be clear that
nx(e)≤s(e) and mdx(e)≤h(e).
Moreover,
x∈fv(e) iff nx(e)=0 iff dx(e)=∅ iff mdx(e)=0.
3.2. Partial derivatives
In the resource λ-calculus, the substitution e[s/x] of a term s for a variable x in e admits a
linear counterpart: this operator was initially introduced in the differential
λ-calculus [ER03] in the form of a partial differentiation operation,
reflecting the interpretation of λ-terms as analytic maps in quantitative
semantics.
Partial differentiation enforces the introduction of formal finite sums of
resource expressions: these are the actual objects of the resource λ-calculus,
and in particular the dynamics will act on finite sums of terms rather than on
simple resource terms (see Subsection 3.4).
We extend all syntactic constructs to finite sums of resource expressions
by linearity: if σ=∑i=1nsi∈N[Δ]
and τ=∑j=1ptj∈N[\ocΔ],
we set λxσ:=∑i=1nλxsi,
⟨σ⟩τ:=∑i=1n∑j=1p⟨si⟩tj
and [σ]⋅τ:=∑i=1n∑j=1p[si]⋅tj.
This linearity of syntactic constructs will be generalized to vectors
of resource expressions in the next section.
For now, up to linearity, it is already possible to consider the substitution
e[σ/x] of a finite sum of terms σ for a variable term x in an
expression e: in particular e[0/x]=0 whenever x∈fv(e).
This is in turn extended to sums by linearity: ϵ[σ/x]=∑i=1nei[σ/x] when ϵ=∑i=1nei. Observe that this is not
linear in σ, because x may occur several times in e:
for instance, with a monomial of degree 2,
[x,x][t+u/x]=[t,t]+[t,u]+[u,t]+[u,u].
Partial differentiation is then defined as follows:
Definition \thethm.
For all u∈Δ and x∈V,
we define the partial derivative∂x∂e⋅u∈N[(\oc)Δ]
of e∈(\oc)Δ, by induction on e:
[TABLE]
Partial differentiation is extended to
finite sums of expressions by bilinearity: if
ϵ=∑i=1nei∈N[(\oc)Δ] and
σ=∑j=1psj∈N[Δ],
we set
If moreover y∈fv(t), we obtain a version of Schwarz’s theorem on
the symmetry of second derivatives:
[TABLE]
If x∈fv(si) for all i∈{1,…,n}, we write
[TABLE]
More generally, we write
[TABLE]
for any y∈⋃i=1nfv(si)∪(fv(e)∖{x}): it should
be clear that this definition does not depend on the choice of such a variable y.
By the previous lemma,
[TABLE]
for any permutation f of {1,…,n} and we will thus write
[TABLE]
whenever s=[s1,…,sn].
An alternative, more direct presentation of iterated partial derivatives
is as follows.
Suppose nx(e)=m, and write x1,…,xm for the occurrences of x in e.
Then:
[TABLE]
More formally, we obtain:
Lemma \thethm.
*For all monomial u=[u1,…,un]∈\ocΔ and all variable
x∈V:888
In this definition and in the remaining of the paper, we say a tuple
(I1,…,In)∈P(I)n is a partition of I
if I=⋃i=1nIk, and the Ik’s are pairwise disjoint.
We do not require the Ik’s to be nonempty. Hence a partition of I
into a n-tuple is uniquely defined by a function from I to {1,…,n}.
*
[TABLE]
where uI denotes [ui1,…,uip]
whenever I={i1,…,ip} with p=#I.
Proof.
Easy, by induction on n.
∎
Lemma \thethm.
For all e∈(\oc)Δ, s∈\ocΔ, x=y∈V
and e′∈∂xn∂ne⋅s with n=#s,
moreover assuming that x∈fv(s):
Each result is easily established by induction on e,
using the previous lemma to enable the induction.
∎
3.3. Multilinear substitution
Recall that Taylor expansion involves iterated derivatives at [math].
If n=#s and x∈fv(s) we write
[TABLE]
Observe that by Lemma 3.2: if n>nx(e) then ∂xn∂ne⋅s=0;
and if n<nx(e) then x∈fv(e′) for all e′∈∂xn∂ne⋅s,
and then e′[0/x]=0.
In other words,
[TABLE]
We say ∂xe⋅s is the n-linear substitution
of s for x in e.
More generally, we write
[TABLE]
for any y∈fv(s)∪(fv(e)∖x) and it should again
be clear that this definition does not depend of the choice of such a y.
By a straightforward application of Lemma 3.2, we obtain:
Lemma \thethm.
For all e∈(\oc)Δ, s∈\ocΔ, x=y∈V
and e′∈∣∂xe⋅s∣, assuming x∈fv(s):
If → is a reduction relation, we will write →? (resp.
→+; →∗) for its reflexive (resp. transitive; reflexive and
transitive) closure.
In the resource λ-calculus, a redex is a term of the form
⟨λxt⟩u∈Δ and its reduct is
∂xt⋅u∈N[Δ].
The resource reduction →∂ is then the contextual closure
of this reduction step on finite sums of resource expressions. More precisely:
Definition \thethm.
We define the resource reduction relation
→∂⊆(\oc)Δ×N[(\oc)Δ]
inductively as follows:
•
⟨λxs⟩t→∂∂xs⋅t for all s∈Δ
and t∈\ocΔ;
•
λxs→∂λxσ′ as soon as s→∂σ′;
•
⟨s⟩t→∂⟨σ′⟩t as soon as s→∂σ′;
•
⟨s⟩t→∂⟨s⟩τ′ as soon as t→∂τ′;
•
[s]⋅t→∂[σ′]⋅t as soon as s→∂σ′.
We extend this reduction to finite sums of resource expressions:
write ϵ→∂ϵ′ if ϵ=∑i=0nei and ϵ′=∑i=0nϵi′
with e0→∂ϵ0′ and, for all i∈{1,…,n},
ei→∂?ϵi′.
Observe that we allow for parallel reduction of any nonzero number of summands in a finite sum.
This reduction is particularly well behaved. In particular, it is confluent in a strong sense:
Lemma \thethm.
For all ϵ,ϵ0,ϵ1∈N[(\oc)Δ],
if ϵ→∂ϵ0 and ϵ→∂ϵ1 then
there is ϵ′∈N[(\oc)Δ] such
that ϵ0→∂?ϵ′ and ϵ1→∂?ϵ′.
Proof.
The proof follows a well-trodden path for proving confluence.
One first proves by induction on s that if s→∂σ′
then ∂xs⋅t→∂?∂xσ′⋅t,
and if t→∂τ′
then ∂xs⋅t→∂?∂xs⋅τ′.
Note that the reflexive closure is made necessary by
the possibility that ∂xs⋅t=0,
and the transitive closure is not needed because
there is no duplication of the redexes of t in the
summands of the multilinear substitution ∂xs⋅t.
One then proves that if e→∂ϵ0 and e→∂ϵ1 then
there is ϵ′∈N[(\oc)Δ] such
that ϵ0→∂?ϵ′ and ϵ1→∂?ϵ′.
The proof is straightforward, by induction on the pair of reductions
e→∂ϵ0 and e→∂ϵ1, using the previous
result in case e is a redex which is reduced in
ϵ0 but not in ϵ1 (or vice versa).
∎
In other words, →∂? enjoys the diamond property.999
This strong confluence result was not mentioned
in Ehrhard and Regnier’s papers about resource λ-calculus
[ER08, ER06] but they established
a very similar result for differential nets [ER05, Section 4]:
Lemma 3.4 can be understood as a
reformulation of the latter in the setting of resource calculus.
Moreover, the effect of reduction on the size of terms is very regular.
First introduce some useful notation:
write e≻∂e′ if e→∂ϵ′ with e′∈∣ϵ′∣.
Lemma \thethm.
Let e≻∂e′.
Then fv(e′)=fv(e), and s(e′)+2≤s(e)≤2s(e′)+2.
Proof.
By induction on the reduction e→∂ϵ′ with e′∈∣ϵ′∣.
The inductive contextuality cases are easy,
and we only detail the base case, i.e.e=⟨λxt⟩u
and ϵ′=∂xt⋅u.
Write n=nx(t).
The result then follows from Lemma 3.3, observing that
s(e′)=s(t)+s(u)−n=s(e)−2−n and n≤s(u)≤s(e′).
∎
We will write ≥∂ (resp. >∂) for ≻∂∗
(resp. ≻∂+).
Observe that e≥∂e′ (resp. e>∂e′)
iff there is ϵ′∈N[(\oc)Δ] such that
e′∈∣ϵ′∣ and e→∂∗ϵ′ (resp. e→∂+ϵ′).
Moreover, {e′;e≥∂e′} is always finite and
>∂ defines a well-founded strict partial order.
A direct consequence is that →∂ always converges
to a unique normal form:
Lemma \thethm.
The reduction →∂ is confluent and strongly normalizing.
Moreover, for all ϵ∈N[(\oc)Δ], the set {ϵ′;ϵ→∂∗ϵ′}
is finite.
Proof.
Confluence is a consequence of Lemma 3.4.
By Lemma 3.4,
the transitive closure ≻∂+
is a well-founded strict partial order.
Observe that the elements of N[(\oc)Δ]
can be considered as finite multisets of resource expressions:
then →∂+ is included in the multiset ordering induced by
≻∂+, and
it follows that →∂+ defines a well-founded strict partial order
on N[(\oc)Δ], i.e.→∂ is strongly
normalizing.
The final property follows from strong normalizability applying König’s lemma
to the tree of possible reductions, observing that each ϵ has finitely
many →∂-reducts.
∎
If ϵ∈N[(\oc)Δ], we then write NF(ϵ) for the
unique sum of normal resource expressions such that ϵ→∂∗NF(ϵ).
A consequence of the previous lemma is that any reduction discipline
reaches this normal form:
Corollary \thethm.
Let →⊆N[(\oc)Δ]×N[(\oc)Δ]
be such that →⊆→∂∗. Moreover assume
that, for all non normal ϵ∈N[(\oc)Δ]
there is ϵ′=ϵ such that ϵ→ϵ′.
Then ϵ→∗NF(ϵ) for all ϵ∈N[(\oc)Δ].
4. Vectors of resource expressions and Taylor expansion of algebraic λ-terms
4.1. Resource vectors
A vector σ=∑s∈Δσs.s of
resource terms will be called a term vector whenever its set of free
variables fv(σ):=⋃s∈∣σ∣fv(s) is finite. Similarly,
we will call monomial vector any vector of resource monomials
whose set of free variables is finite.
We will abuse notation and write SΔ for the set of term vectors and
S\ocΔ for the set of monomial vectors.101010
The restriction to vectors with finitely many free variables is purely technical.
For instance, it allows us to assume that a sum of abstractions
σ=∑i∈Iλxisi can always use a common abstracted
variable: σ=∑i∈Iλx(si[x/xi]), with
x∈∪i∈Ifv(λxisi).
Working without this restriction would
only lead to more contorted statements and tedious bookkeeping:
consider, e.g., what would happen to the definition of the substitution of a term vector for a
variable (Definition 4.3),
especially the abstraction case.
A resource vector will be any of a term vector or a monomial vector,
and we will write S(\oc)Δ for either SΔ or S\ocΔ:
as for resource expressions, whenever we use this notation several times in the same context,
all occurrences consistently denote the same set.
The syntactic constructs are extended to resource vectors by linearity:
for all σ∈SΔ and σ,τ∈S\ocΔ, we set
[TABLE]
This poses no problem for finite vectors: e.g., if ∣σ∣
is finite then finitely many of the vectors σs.λxs are non-zero,
hence the sum is finite. In the general case, however,
we actually need to prove that the above sums are well defined:
the constructors of the calculus define summable functions,
which thus extend to multilinear-continuous maps.111111
The one-to-one correspondence between summable n-ary
functions and multilinear-continuous maps was established
for semimodules of the form SX, i.e. the semimodules
of all vectors on a fixed set. Due to the restriction we put on free
variables, S(\oc)Δ is not of this form: it should rather
be written ⋃V∈Pf(V)S(\oc)ΔV
where (\oc)ΔV:={e∈(\oc)Δ;fv(e)⊆V}.
So when we say a function is multilinear-continuous on S(\oc)Δ,
we actually mean that its restriction to each S(\oc)ΔV with
V∈Pf(V) is multilinear-continuous.
In the present case, keeping this precision implicit is quite innocuous,
but we will be more careful when considering the restriction to bounded vectors
in Subsection 6.4, and to normalizable vectors in
Section 8.
Lemma \thethm.
The following families of vectors are summable:
[TABLE]
Proof.
The proof is direct, but we detail it if only to make the requirements explicit.
For all u∈Δ there is at most one s such that
u∈∣λxs∣ (in which case u=λxs) and at most one pair (s,t) such that
u∈⟨s⟩t (in which case u=⟨s⟩t).
For all u∈\ocΔ there is at most one s such that
u∈∣[s]∣ (in which case u=[s]),
and there are finitely many s and t such that
u∈s⋅t
(those such that u=s⋅t).
∎
For each term vector σ, we then write σn for the monomial vector
[TABLE]
4.2. Partial differentiation of resource vectors.
We can extend partial derivatives to vectors by linear-continuity
(recall that, via the unique semiring morphism from N to S, we
can consider that N[(\oc)Δ]⊆S(\oc)Δ).
Lemma \thethm.
The function
[TABLE]
is summable.
Proof.
Let e′∈(\oc)Δ and assume that
e′∈∂xn∂ne⋅s with #s=n.
By Lemma 3.2, fv(e)⊆fv(e′)∪{x},
fv(s)⊆fv(e′), s(e)≤s(e′) and s(s)≤s(e′):
e′ being fixed, there are finitely many (e,s) satisfying these constraints.
∎
The characterization of iterated partial derivatives given in Lemma
3.2 extends directly to resource vectors, by
the linear-continuity of syntactic constructs and partial derivatives.
For instance, given term vectors σ,ρ1,…,ρn∈SΔ and a
monomial vector τ∈S\ocΔ, we obtain:
[TABLE]
Now we can consider iterated differentiation along a fixed term vector ρ:
∂xn∂nϵ⋅ρn. We obtain:
Lemma \thethm.
For all σ,τ1,…,τn,ρ∈SΔ and
all τ∈S\ocΔ,
[TABLE]
Proof.
First recall that, if k=∑i=1nki,
the multinomial coefficient[k1,…,knk]:=∏i=1nki!k!
is nothing but the number of partitions of {1,…,k} into n sets
I1,…,In such that #Ij=kj for 1≤j≤n
[DLMF, §26.4].
Then both results derive directly from Lemma 3.2.
∎
4.3. Substitutions
Since ∣∂xe⋅s∣⊆∂xn∂ne⋅s,
multilinear substitution also defines a summable binary function
and we will write
[TABLE]
By contrast with partial derivatives, the usual substitution is not linear, so
the substitution of resource vectors must be defined directly.
Definition \thethm.
We define by induction over resource expressions
the substitutione[σ/x]∈S(\oc)Δ of
σ∈SΔ for a variable x in e∈(\oc)Δ:
[TABLE]
Lemma \thethm.
For all e∈(\oc)Δ, x∈V and σ∈SΔ:
•
if σ∈Δ then e[σ/x]∈Δ;
•
if σ∈S[Δ] then e[σ/x]∈S[(\oc)Δ];
•
if x∈fv(e) then e[σ/x]=e;
•
if x∈fv(e) then e[0/x]=0;
•
for all e′∈∣e[σ/x]∣,
fv(e)∖{x}⊆fv(e′)⊆(fv(e)∖{x})∪fv(σ)
and s(e′)≥s(e).
Proof.
Each statement follows easily by induction on e.
∎
A consequence of the last item is that the function
[TABLE]
is summable: we thus write
[TABLE]
4.4. Promotion
Observe that the family (σn)n∈N
is summable because the supports ∣σn∣ for n∈N are
pairwise disjoint.
We then define the promotion of σ as
σ\oc:=∑n∈Nn!1.σn.
For this definition to make sense, we need inverses of natural numbers to be available:
we say Shas fractions if every n∈N∖{0}
admits a multiplicative inverse in S.
This inverse is necessarily unique and we write it n1.
Observe that S has fractions iff there is a semiring morphism
from the semiring Q+ of non-negative rational numbers
to S, and then this morphism is unique, but not necessarily injective:
consider the semiring B of booleans.
Semifields, i.e. commutative semirings in which every non-zero element
admits an inverse, obviously have fractions:
Q+ and B are actually semifields.
In the following, we will keep this requirement implicit:
whenever we use quotients by natural numbers,
it means we assume S has fractions.
Lemma \thethm.
For all σ and τ∈SΔ,
σ\oc[τ/x]=(σ[τ/x])\oc.
Proof.
By the linear-continuity of
ϵ↦ϵ[σ/x], it is sufficient
to prove that
[TABLE]
which follows from the n-linear-continuity of
(σ1,…,σn)↦[σ1,…,σn]
and the definition of substitution.
∎
Lemma \thethm.
The following identities hold:
[TABLE]
Proof.
Since each syntactic constructor is multilinear-continuous,
it is sufficient to consider the case of ∂xe⋅ρ\oc
for a resource expression e∈(\oc)Δ.
First observe that, if k=nx(e) then
∂xe⋅ρ\oc=k!1.∂xk∂ke⋅ρk.
In particular the case of variables is straightforward.
The case of abstractions follows directly, since
∂xk∂kλxs⋅ρk=λx(∂xk∂ks⋅ρk).
If e=⟨s⟩t, write l=nx(s) and m=nx(t).
It follows from Lemma 4.2 that
∂xe⋅ρk=[l,mk].⟨∂xs⋅ρl⟩∂xt⋅ρm
and then
k!1.∂xe⋅ρk=⟨l!1.∂xs⋅ρl⟩m!1.∂xt⋅ρm.
Similarly, if e=[t1,…,tn],
write ki=nx(ti) for all i∈{1,…,n}.
It follows from Lemma 4.2 that
∂xe⋅ρk=[k1,…,knk].[∂xt1⋅ρk1,…,∂xtn⋅ρkn]
and then
k!1.∂xe⋅ρk=[k1!1∂xt1⋅ρk1,…,kn!1∂xtn⋅ρkn].
∎
Lemma \thethm.
For all ϵ∈S(\oc)Δ an σ∈SΔ,
[TABLE]
Proof.
By the linear-continuity of
ϵ↦∂xϵ⋅σ\oc and
ϵ↦ϵ[σ/x],
it is sufficient to show that
[TABLE]
for all resource expression e.
The proof is then by induction on e,
using the previous Lemma in each case.
∎
which can be seen as a counterpart of the functoriality
of promotion in linear logic.
To our knowledge it is the first published proof of such a result
for resource vectors. This will enable us to prove the
commutation of Taylor expansion and substitution
(Lemma 4.5), another unsurprising
yet non-trivial result.
4.5. Taylor expansion of algebraic λ-terms
Since resource vectors form a module, there is no reason to restrict the source
language of Taylor expansion to the pure λ-calculus: we can consider formal
finite linear combinations of λ-terms.
We will thus consider the terms given by the following grammar:
[TABLE]
where a ranges in S.121212We follow Krivine’s convention [Kri90],
by writing (M)N for the application of term M to term N.
We more generally write (M)N1⋯Nk for (⋯(M)N1⋯)Nk.
Moreover, among term constructors, we give sums the lowest priority so that
(M)N+P should be read as ((M)N)+P rather than (M)(N+P).
For now, terms are considered up to the usual α-equivalence only:
the null term [math], scalar multiplication a.M and sum of terms
M+N are purely syntactic constructs.
Definition \thethm.
We define the Taylor expansionτ(M)∈S(\oc)Δ
of a term M∈ΣS inductively as follows:
Let us insist on the fact that, despite its very simple and unsurprising
statement, the previous lemma relies on the entire technical development
of the previous subsections. Again, to our knowledge, it
is the first proof that Taylor expansion commutes with substitution, in an
untyped and non-uniform setting, without any additional assumption.
By contrast, one can forget everything about the semiring of coefficients
and consider only the support of Taylor expansion.
Recall that B denotes the semiring of booleans.
Then we can consider that
B(\oc)Δ=P((\oc)Δ)
and write, e.g., λxS={λxs;s∈S} for all set S of
resource terms.
Definition \thethm.
The Taylor supportT(M)⊆Δ
of M∈ΣS is defined inductively as follows:131313
One might be tempted to make an exception in
case a=0 and set T(0.M)=∅
but this would only complicate the definition and further developments
for little benefit: what about T(a.M+b.M)
(resp. T(a.b.M)) in a semiring where
a=0, b=0 and a+b=0 (resp. ab=0)?
If we try and cope with those too,
we are led to make T invariant under the equations
of S-module, which is precisely what we want to avoid here:
see the case of τ in the remaining of the present section.
[TABLE]
It should be clear that ∣τ(M)∣⊆T(M),
but the inclusion might be strict,
if only because T(0.M)=T(M).
By contrast with the technicality of the previous subsection,
the following qualitative analogue of Lemma 4.5
is easily established:
Lemma \thethm.
For all M,N∈ΣS, and all variable x,
[TABLE]
Proof.
The qualitative version of Lemma
4.4
is straightforward.
The result follows by induction on M.
∎
The restriction of T to the set Λ of pure λ-terms
was used by Ehrhard and Regnier [ER08]
in their study of Taylor expansion. They showed
that if M∈Λ then T(M) is uniform:
all the resource terms in T(M) have
the same outermost syntactic construct and this property is preserved
inductively on subterms. They moreover proved that τ(M), and in fact M itself, is
entirely characterized by T(M): in this case,
τ(M)=∑s∈T(M)m(s)1s
where m(s) is an integer coefficient depending only on s.
Of course this property fails in the non uniform setting of ΣS.
Now, let us consider the equivalence induced on terms by Taylor expansion:
write M≃τN if τ(M)=τ(N).
Lemma \thethm.
The following equations hold:
[TABLE]
Moreover, ≃τ is compatible with syntactic constructs:
if M≃τM′ then λxM≃τλxM′, (M)N≃τ(M′)N, (N)M≃τ(N)M′, a.M≃τa.M′, M+N≃τM′+N and N+M≃τN+M′.
Proof.
Up to Taylor expansion, these equations reflect the
fact that S(\oc)Δ forms a semimodule (first three lines), and
that all the constructions used in the definition
of τ are multilinear-continuous, except for promotion
(last two lines). Compatibility
follows from the inductive definition of τ.
∎
Let us write ≃v for the least compatible equivalence relation containing
the equations of the previous lemma, and call vector λ-terms the elements
of the quotient ΣS/≃v: these are the terms of the previously studied
algebraic λ-calculus [Vau09, Alb14].141414
In those previous works, the elements of ΣS/≃v were called
algebraic λ-terms, but here we reserve this name for another, simpler,
notion.
It is clear that ΣS/≃v forms a S-semimodule.
In fact, one can show [Vau09] that ΣS/≃v
is freely generated by the ≃v-equivalence classes of base terms, i.e. those described by the following grammar:
[TABLE]
Hence we could write ΣS/≃v=S[ΣSb/≃v].
Notice however that Taylor expansion is not injective on vector λ-terms in general.
Example \thethm.
We can consider that
ΣB/≃v=Pf(ΣBb/≃v)
and τ(M)⊆Δ for all M∈ΣB.
It is then easy to check that,
e.g., τ((x)∅)⊆τ((x)x),
hence (x)∅+B(x)x≃τ(x)x.151515
This discrepancy is also present in the non-deterministic Böhm trees of
de’Liguoro and Piperno [dLP95]: in that qualitative
setting, they can solve it by introducing a preorder on trees based on set
inclusion. They moreover show that this preorder coincides with that
induced by a well chosen domain theoretic model, as well as with the
observational preorder associated with must-solvability. This preorder
should be related with that induced by
the inclusion of normal forms of Taylor expansions (which are always defined
since we then work with support sets rather than general vectors).
This contrasts with the case of pure λ-terms, for which τ is always injective:
in this case, it is in fact sufficient to look at the linear resource terms
in supports of Taylor expansions.
Fact 1**.**
For all M,N∈Λ,
ℓ(M)∈∣τ(N)∣ iff M=N,
where ℓ is defined inductively
as follows:
[TABLE]
To our knowledge, finding sufficient conditions on S ensuring that
τ becomes injective on ΣS/≃v is still an open question.
Observe moreover that the S-semimodule structure of ΣS/≃v gets in the way when
we want to study β-reduction and normalization: it is well known
[Vau07, AD08, Vau09] that β-reduction in a semimodule of terms is
inconsistent in presence of negative coefficients.
Example 4.1**.**
Consider δM:=λx(M+(x)x) and ∞M:=(δM)δM.
Observe that ∞Mβ-reduces to M+∞M. Suppose S is a ring.
Then any congruence ≃ on ΣS containing β-reduction
and the equations of S-module is inconsistent:
0≃∞M+(−1).∞M≃(M+∞M)+(−1).∞M≃M.
The problem is of course the identity 0≃∞M+(−1).∞M. Another difficulty is that,
if S has fractions then, up to S-semimodule equations, one can
split a single β-reduction step into infinitely many fractional steps: if
M→βM′ then
[TABLE]
It is not our purpose here to explore the various possible fixes to the
rewriting theory of β-reduction on vector λ-terms.
We rather refer the reader to the literature on algebraic λ-calculi
[Vau09, AD08, Alb14, DC11] for various proposals.
Our focus being on Taylor expansion, we propose to consider vector λ-terms as
intermediate objects: the reduction relation induced on resource vectors by β-reduction
through Taylor expansion contains β-reduction on vector terms — which is mainly
useful to understand what may go wrong.
We still need to introduce some form of quotient in the syntax, though, if only
to allow formal sums to retain a computational meaning: otherwise, for
instance, no β-redex can be fired in (λxM+λxN)P; and more
generally there are β-normal terms whose Taylor expansion is not normal,
and conversely (consider, e.g., (λx0)P).
Write ΛS for the quotient of ΣS by the least compatible
equivalence ≃+ containing the following six equations:
[TABLE]
We call algebraic λ-terms the elements of ΛS.
We will abuse notation and denote an algebraic λ-term by
any of its representatives.
Observe that T(M) is preserved under ≃+ so
it is well defined on algebraic terms, although not on vector terms.
Fact 2**.**
An algebraic λ-term M is β-normal (i.e. each of its representatives is
β-normal) iff T(M) contains only normal resource terms.
We do not claim that ≃+ is minimal with the above property
(for this, the bottom three equations are sufficient) but it
is quite natural for anyone familiar with the decomposition of λ-calculus
in linear logic, as it reflects the linearity of λ-abstraction
and the function position in an application. Moreover it retains the two-level
structure of vector λ-terms, seen as sums of base terms.
It is indeed a routine exercise to show that orienting the defining equations of ≃+
from left to right defines a confluent and terminating rewriting system. We
call canonical terms the normal forms of this system, which we can describe as
follows. The sets ΣSc of canonical terms and ΣSs of simple
canonical terms are mutually generated by the following grammars:
[TABLE]
so that each algebraic term M admits a unique canonical ≃+-representative.
In the remaining of this paper we will systematically identify algebraic
terms with their canonical representatives and keep ≃+ implicit.
Moreover, we write ΛSs for the set of simple algebraic λ-terms, i.e. those that admit a simple canonical representative.
Fact 3**.**
Every simple term S∈ΛSs is of one of the following two forms:
•
S=λx1⋯λxn(x)M1⋯Mk: S is a head normal form;
•
S=λx1⋯λxn(λxT)M0⋯Mk:
(λxT)M0 is the head redex of S.
So each algebraic λ-term can be considered as a formal linear combination
of head normal forms and head reducible simple terms, which will structure
the notions of weak solvability and hereditarily determinable terms in section
9.
5. On the reduction of resource vectors
Observe that
[TABLE]
and
[TABLE]
In order to simulate β-reduction through Taylor expansion we might be
tempted to consider the reduction given by
ϵ→ϵ′ as soon as ϵ=∑i∈Iai.ei
and ϵ′=∑i∈Iai.ϵi′ with ei→∂ϵi′ for all i∈I.161616
We must of course require that ⋃i∈Ifv(ei) is finite
but, again, we will keep such requirements implicit in the following.
Observe indeed that, as soon as (ai.ei)i∈I∈(\oc)Δ
is summable (i.e. for all e∈(\oc)Δ, there are finitely many
i∈I such that ai=0 and ei=e),
the family (ai.ϵi′)i∈I is summable too:
if e′∈∣ai.ϵi′∣ then ai=0 and e′∈∣ϵi′∣
hence by Lemma 3.4,
fv(ei)=fv(e′) and s(ei)≤2s(e′)+2;
e′ being fixed, there are thus finitely many possible values for ei hence for i.
So we do not need any additional condition for this reduction step to be well defined.
This reduction, however, is not suitable for simulating β-reduction
because whenever the reduced β-redex is
not in linear position, we need to reduce arbitrarily many
resource redexes.
Example 5.1**.**
Observe that
[TABLE]
and
[TABLE]
Then the reduction from [⟨λxx⟩zk1,…,⟨λxx⟩zkn]
to zn if each ki=1 (resp. to [math] if one ki=1) requires firing n
independent redexes (resp. one of those n redexes).
5.1. Parallel resource reduction
One possible fix would be to replace →∂ with →∂∗ in the above definition,
i.e. set ϵ→ϵ′ as soon as ϵ=∑i∈Iai.ei
and ϵ′=∑i∈Iai.ϵi′ with ei→∂∗ϵi′ for all i∈I,
but then the study of the reduction subsumes that of
normalization, which we treat in Section 8, and this relies
on the possibility to simulate β-reduction steps.
A reasonable middle ground is to consider a parallel variant ⇒∂ of
→∂, where any number of redexes can be reduced simultaneously in one
step. The parallelism involved in the translation of a β-reduction step is
actually quite constrained: like in the previous example, the redexes that need
to be reduced in the Taylor expansion are always pairwise independent and no
nesting is involved. However, in order to prove the confluence of the reduction
on resource vectors, or its conservativity w.r.t. β-reduction, it is much more
convenient to work with a fully parallel reduction relation, both on algebraic
λ-terms and on resource vectors. Indeed, parallel reduction relations generally
allow, e.g., to close confluence diagrams in one step or to define a maximal
parallel reduction step: the relevance of this technical choice will be made
clear all through Section 6.
Definition 5.2**.**
We define parallel resource reduction⇒∂⊆(\oc)Δ×N[(\oc)Δ]
inductively as follows:
•
x⇒∂x;
•
⟨λxs⟩t⇒∂∂xσ′⋅τ′
as soon as s⇒∂σ′ and t⇒∂τ′;
•
λxs⇒∂λxσ′ as soon as s⇒∂σ′;
•
⟨s⟩t⇒∂⟨σ′⟩τ′ as soon as s⇒∂σ′ and t⇒∂τ′;
•
[s1,…,sn]⇒∂[σ1′,…,σn′] as soon as si⇒∂σi′ for each i∈{1,…,n}.
We extend this reduction to sums of resource expressions by linearity:
ϵ⇒∂ϵ′ if ϵ=∑i=1nei and ϵ′=∑i=1nϵi′
with ei⇒∂ϵi′ for all i∈{1,…,n}.
It should be clear that →∂⊆⇒∂⊂→∂∗,
Moreover observe that, because all term constructors are linear, the reduction
rules extend naturally to finite sums of resource expressions:
for instance, λxσ⇒∂λxσ′ as
soon as σ⇒∂σ′.
We will prove in Sections 6 and 7
that this solution is indeed a good one:
parallel resource reduction is strongly confluent, and there is a way
to extend it to resource vectors so that not only the resulting
reduction is strongly confluent and allows to simulate β-reduction, but
any reduction step from the Taylor expansion of an algebraic term
can be completed into a parallel β-reduction step.
There are two pitfalls with this approach, though.
5.2. Size collapse
First, parallel reduction ⇒∂ (like iterated reduction →∂∗) lacks the
combinatorial regularity properties of →∂ given by Lemma 3.4:
write e∂e′ if e⇒∂ϵ′ with e′∈∣ϵ′∣;
e′∈(\oc)Δ being fixed, there is no bound on the size of the
⇒∂-antecedents of e′, i.e. those e∈(\oc)Δ such that
e∂e′.
Example 5.3**.**
Fix s∈Δ.
Consider the sequences u(s) and v(s) of resource terms given by:
[TABLE]
Observe that for all n∈N, un+1(s)→∂un(s) and vn+1(s)→∂vn(s),
and more generally, for all n′≤n, un(s)⇒∂un′(s) and vn(s)⇒∂vn′(s).
In particular un(s)⇒∂s and vn(s)⇒∂s for all n∈N.
Reducing all resource expressions in a resource vector simultaneously is thus no longer
possible in general: consider, e.g., ∑n∈Nun(x).
As a consequence, when we introduce a reduction relation on resource vectors
by extending a reduction relation on resource expressions
as above, we must in general impose the summability of the family of reducts
as a side condition:
Definition 5.4**.**
Fix an arbitrary relation
→⊆(\oc)Δ×N[(\oc)Δ].
For all ϵ,ϵ′∈S(\oc)Δ,
we write ϵ→ϵ′
whenever there exist families (ai)i∈I∈SI,
(ei)i∈I∈(\oc)ΔI
and (ϵi′)i∈I∈N[(\oc)Δ]I
such that:
•
(ei)i∈I is summable and ϵ=∑i∈Iai.ei;
•
(ϵi′)i∈I is summable and ϵ′=∑i∈Iai.ϵi′;
•
for all i∈I, ei→?ϵi′.
The necessity of such a side condition forbids confluence. Indeed:
Example 5.5**.**
Let σ=∑nun(vn(x)). Then σ⇒∂∑un(x) and σ⇒∂∑vn(x),
but since the only common reduct of up(x) and vq(x) is x, there is no
way171717
In fact, this argument is only valid if S is zerosumfree
(i.e. if a+b=0∈S entails a=b=0; see below, in particular Lemma 5.7),
for instance if S=N:
we rely on the fact that if ∑i∈Iai.si=∑n∈Nun(x) then
for all i∈I such that ai=0, there is n∈N such that si=un(x).
to close this pair of reductions: (x)n∈N is not summable.
These considerations lead us to study the combinatorics of parallel resource reduction
more closely: in Section 6, we introduce successive variants
of parallel reduction, based on restrictions on the nesting of fired redexes,
and provide bounds for the size of antecedents of a resource expression.
We moreover consider sufficient conditions for these restrictions
to be preserved under reduction.
We then observe in Section 7 that, when applied to
Taylor expansions, parallel reduction is automatically of the most restricted
form, which allows us to provide uniform bounds and obtain the desired
confluence and simulation properties.
5.3. Reduction structures
The other, a priori unrelated pitfall is the fact that the reduction can interact
badly with the semimodule structure of S(\oc)Δ: we can reproduce
Example 4.1 in S(\oc)Δ through Taylor
expansion (see the discussion in Section 7.1,
p.7.1).
Even more simply, we can use the terms of Example 5.3:
Example 5.6**.**
Let s∈Δ and σ=∑n∈Nun+1(s)∈SΔ.
Assuming S is a ring:
0=σ+(−1).σ⇒∂∑n∈Nun(s)+(−1).σ=s.
Of course, this kind of issue does not arise when the semiring of coefficients is zerosumfree:
recall that S is zerosumfree if a+b=0 implies a=b=0, which holds for
all semirings of non-negative numbers, as well as for booleans.
This prevents interferences between reductions and the semimodule structure:
Lemma 5.7**.**
Assume S is zerosumfree and fix a relation
→⊆(\oc)Δ×N[(\oc)Δ].
If ϵ→ϵ′ then, for all e′∈∣ϵ′∣ there exists
e∈∣ϵ∣ and ϵ0∈N[(\oc)Δ]
such that e→?ϵ0 and e′∈∣ϵ0∣.
Proof 5.8**.**
Assume ϵ=∑i∈Iai.ei
and ϵ′=∑i∈Iai.ϵi′ with ei→?ϵi′ for all i∈I.
If e′∈∣ϵ′∣ then there is i∈I such that
e′∈∣ai.ϵi′∣ hence ai=0 and e′∈∣ϵi′∣.
Then, since S is zerosumfree, ei∈∣ϵ∣.
Various alternative approaches to get rid of this
restriction in the setting of the algebraic λ-calculus
can be adapted to the reduction of resource vectors:
we refer the reader to the literature on algebraic λ-calculi
[Vau09, AD08, Alb14, DC11] for several proposals.
The linear-continuity of the resource λ-calculus allows us to propose a novel
approach: consider possible restrictions on
the families of resource expressions simultaneously reduced in a
→-step.
Definition 5.9**.**
We call resource support any set E⊆(\oc)Δ of
resource expressions such that fv(E)=⋃e∈Efv(e) is finite.
Then a resource structure is any set
E⊆P((\oc)Δ) of resource supports such that:
•
E contains all finite resource supports;
•
E is closed under finite unions;
•
E is downwards closed for inclusion.
The maximal resource structure is (\oc)Ffv:={E⊆(\oc)Δ;fv(E) is finite}, which is also
a finiteness structure [Ehr10]. Observe that any
finiteness structure F⊆(\oc)Ffv is a resource structure:
all three additional conditions are automatically satisfied.
Definition 5.10**.**
Fix a relation
→⊆(\oc)Δ×N[(\oc)Δ].
For all resource support E, we write →E for
⇀E where ⇀E
denotes →∩(E×N[(\oc)Δ]).
For all resource structure E, we then write →E
for ⋃E∈E→E.
We have
→E⊆→∩(SE×S(\oc)Δ),
but in general the reverse inclusion holds only if S is zerosumfree:
in this latter case ϵ⇒∂ϵ′ iff ϵ⇒∂∣ϵ∣ϵ′.
Definition 5.11**.**
We call →-reduction structure any resource structure E such that
if E∈E then ⋃{∣ϵ′∣;e∈E and e→?ϵ′}∈E.
We will consider some particular choices of reduction structure in the following,
but the point is that our approach is completely generic.
The results of Section 7 will imply
that if S⊆P(SΔ) is a ⇒∂-reduction structure
containing ∣τ(M)∣ then one can translate
any ⇒β-reduction sequence from M
into a ⇒∂S-reduction sequence from τ(M).
Additional properties such as the confluence of ⇒∂S,
its conservativity over ⇒β, or its compatibility with
normalization will depend on additional conditions on S.
6. Taming the size collapse of parallel resource reduction
In this section, we study successive families of restrictions of the parallel
resource reduction ⇒∂. Our purpose is to enforce some control on the
size collapse induced by ⇒∂, so as to obtain a confluent restriction of
⇒∂, all the while retaining enough parallelism to simulate parallel
β-reduction on algebraic λ-terms, ideally in a conservative way.
First observe that parallel resource reduction itself is strongly confluent as expected:
following a classic argument, we define F(e) as the
result of firing all redexes in e and then, whenever e⇒∂ϵ′,
we have ϵ′⇒∂F(e). Formally:
Definition 6.1**.**
For all e∈(\oc)Δ we define
the full parallel reductF(e) of e by induction on e as follows:
[TABLE]
Then if ϵ=∑i=1nei∈N[(\oc)Δ],
we set F(ϵ)=∑i=1nF(ei).
Lemma 6.2**.**
For all ϵ,ϵ′∈N[(\oc)Δ],
if ϵ⇒∂ϵ′ then ϵ′⇒∂F(ϵ).
Proof 6.3**.**
Follows directly from the definitions.
In general, however, if we fix e′∈(\oc)Δ then there is no
bound on those e∈(\oc)Δ such that e′∈∣F(e)∣,
so we cannot extend F on S(\oc)Δ, nor generalize Lemma
6.2 to ⇒∂.
Indeed, we have shown that ⇒∂ is not even confluent.
In order to understand what restrictions are necessary to recover confluence,
we first provide a close inspection of the combinatorial effect of
⇒∂ on the size of resource expressions: we show in subsection
6.1 that bounding the length of chains
of immediately nested fired redexes is enough to bound the size of
⇒∂-antecedents of a fixed resource expression.
In order to close a pair of reductions e⇒∂ϵ′ and e⇒∂ϵ′′,
we have to reduce at least the residuals in ϵ′ of the redexes fired
in the reduction e⇒∂ϵ′′ (and vice versa). So we want the above
bounds to be stable under taking the unions of sets of redexes in a term:
it is not the case if we consider chains of immediately nested redexes.
In Subsection 6.2, we extend the boundedness condition
to all chains of nested fired redexes and introduce the family
(⇒(b))b∈N of boundedly nested parallel reductions.
We then show that this family enjoys a kind of diamond property (Lemma
6.21), which can then be extended to
⇒(∂)=⋃b∈N⇒(b).
We must require that S enjoys an additional additive splitting property (see
Definition 6.23), in order to
“align” the ⇒(b)-reductions involved in both sides of a pair
of ⇒(b)-reductions from the same resource vector
(see the proof of Lemma 6.26).
To get rid of the additive splitting hypothesis we must further restrict
resource reduction so as to recover a notion of full reduct at bounded depth.
It is not sufficient to bound the depth of fired redexes because this is not
stable under reduction.
In Subsection 6.3, we rather introduce
the parallel reduction ⇒⌊d⌋ where
substituted variables occur at depth at most d.
We then show that
⇒⌊∂⌋=⋃d∈N⇒⌊d⌋
is strongly confluent by proving that any ⇒⌊d⌋-step from ϵ
can be followed by a ⇒⌊d′⌋-reduction to F⌊d⌋(ϵ),
where F⌊d⌋(ϵ) is obtained by firing all redexes in ϵ for which
the bound variables occur at depth at most d, and d′ depends only on d.
Finally, we consider resource vectors of bounded height: these contain the
Taylor expansions of algebraic λ-terms. We show that all the above restrictions
actually coincide with ⇒∂ on bounded resource vectors. In this particular
case, we can actually extend F by linear-continuity and
obtain a proof of the diamond property for ⇒∂.181818
Note that, although they involve increasing constraints on parallel
reduction, Subsections 6.1 to 6.3
are essentially pairwise independent.
Moreover, we obtain the diamond property for ⇒∂ on bounded resource
vectors as a consequence of the results of Subsection 6.3,
but it could as well be proved directly, using similar techniques
(see Footnote 21, p.21).
So, the reader who only wants the proofs necessary for the main results of
the paper can skip Subsections 6.1 and 6.2;
the reader who is not interested in checking proofs can also skip subsection
6.3.
We chose to present the successive families of restrictions anyway, because
their construction provides a precise understanding of the combinatorics of
parallel resource reduction, and of the various ingredients involved in
designing a strongly confluent version of ⇒∂: we start by avoiding
the size collapse by putting a restriction on families of redexes that can be
fired in parallel; then we ensure that this restriction is stable under
reduction.
This understanding plays a key rôle in enabling the generalization of our
approach to linear logic proof nets or infinitary λ-calculus:
with Chouquet, we have recently established that our restrictions on
the nesting of redexes, as well as their preservation under reduction, can be
adapted to the setting of proof nets [CA18];
and preliminary work on infinitary λ-calculus indicates that it could be amenable
to the technique of Subsection 6.2, whereas
it does not make sense to restrict the depth of substituted variables in this setting.
At this point of the discussion, it is worth noting that, if we extend
a relation →⊆(\oc)Δ×N[(\oc)Δ]
to a binary relation on finite sums of resource expressions so that
ϵ→ϵ′ iff ϵ=∑i=1nei and ϵ′=∑i=1nϵi′
with ei→ϵi′ for all i∈{1,…,n}, then
for all →-reduction structure E and all
resource vectors ϵ,ϵ′∈S(\oc)Δ, we have
ϵ→Eϵ′ iff there exist a set I of indices,
a resource support E∈E,
a family (ai)i∈I∈SI of scalars
and families (ϵi)i∈I∈N[E]I
and (ϵi′)i∈I∈N[(\oc)Δ]I
such that:
•
(ϵi)i∈I is summable and ϵ=∑i∈Iai.ϵi;
•
(ϵi′)i∈I is summable and ϵ′=∑i∈Iai.ϵi′;
•
for all i∈I, ϵi→ϵi′.
We will use this fact for confluence proofs: ⇒∂ and its variants are
all of this form.
6.1. Bounded chains of redexes
Definition 6.4**.**
We define a family of relations ⇒(m∣k)⊆(\oc)Δ×N[(\oc)Δ]
for m≤k∈N inductively as follows:
•
x⇒(m∣k)x for all m≤k∈N;
•
λxs⇒(m∣k)λxσ′ if m≤k and s⇒(m1∣k)σ′ for some m1≤k;
•
⟨s⟩t⇒(m∣k)⟨σ′⟩τ′ if m≤k,
s⇒(m1∣k)σ′ and t⇒(m2∣k)τ′
for some m1≤k and m2≤k;
•
[s1,…,sr]⇒(m∣k)[σ1′,…,σr′]
if si⇒(m∣k)σi′ for all i∈{1,…,r};
•
⟨λxs⟩t⇒(m∣k)∂xσ′⋅τ′ if
0<m≤k, s⇒(m−1∣k)σ′ and t⇒(m−1∣k)τ′.
Intuitively, we have e⇒(m∣k)ϵ′ iff e⇒∂ϵ′ and
that reduction fires chains of redexes of length at most k,
those starting at top level being of length at most m.
In particular, it should be clear that if e⇒(m∣k)ϵ′
then e⇒∂ϵ′, and e⇒(m′∣k′)ϵ′ as soon as m≤m′≤k′ and k≤k′.
Moreover, e⇒∂ϵ′ iff e⇒(h(e)∣h(e))ϵ′.
Definition 6.5**.**
We define gbk(l,m)∈N for all k,l,m∈N,
by induction on the lexicographically ordered pair (l,m):
[TABLE]
We then write gbk(l):=gbk(l,k).
For all k,l,m∈N, the following identities follow straightforwardly
from the definition and will be used throughout this subsection:
[TABLE]
Lemma 6.6**.**
For all k,l,l′,m∈N, gbk(l+l′,m)≥gbk(l,m)+gbk(l′,m).
Proof 6.7**.**
By induction on l′.
The case l′=0 is direct.
Assume the result holds for l′, we prove it for l′+1:
For all k,k′,l,l′,m,m′∈N
if k≤k′, l≤l′ and m≤m′, then:
[TABLE]
Proof 6.12**.**
We prove the monotonicity of gbk(l,m) in m, l and then k, separately.
First, if m≤m′ then
gbk(l,m)=4mgbk(l,0)≤4m′gbk(l,0)=gbk(l,m′).
By Lemma 6.6, if l≤l′,
gbk(l′,m)≥gbk(l,m)+gbk(l′−l,m)≥gbk(l,m).
Finally, we prove that if k≤k′ then gbk(l,m)≤gbk′(l,m)
by induction on the lexicographically ordered pair (l,m):
[TABLE]
Write e(m∣k)e′ if e⇒(m∣k)ϵ′ with e′∈∣ϵ′∣.
Lemma 6.13**.**
If e(m∣k)e′ then
s(e)≤gbk(s(e′),m).
Proof 6.14**.**
By induction on the reduction e⇒(m∣k)ϵ′ such that e′∈ϵ′.
If e=x=ϵ′ then e′=x and s(e)=1=gb0(1,0)≤gbk(s(e′),m).
If e=λxs, ϵ′=λxσ′, m≤k and s⇒(m1∣k)σ′ with m1≤k,
then e′=λxs′ with s(m1∣k)s′. We obtain:
[TABLE]
If e=⟨s⟩t,
ϵ′=⟨σ′⟩τ′,
m≤k,
s⇒(m1∣k)σ′ and
t⇒(m2∣k)τ′
with mi≤k for all i∈{1,2},
then e′=⟨s′⟩t′ with
s(m1∣k)s′
and t(m2∣k)t′.
We obtain:
[TABLE]
If e=[s1,…,sr],
ϵ′=[σ1′,…,σr′] and
si⇒(m∣k)σi′
for all i∈{1,…,r},
then e′=[s1′,…,sr′]
with si(m∣k)si′
for all i∈{1,…,r}.
We obtain:
[TABLE]
If e=⟨λxs⟩t,
ϵ′=∂xσ′⋅τ′,
0<m≤k, s⇒(m−1∣k)σ′ and
t⇒(m−1∣k)τ′,
then there are s′∈∣σ′∣ and
t′∈τ′ such that
e′∈∂xs′⋅t′.
In particular, s(m−1∣k)s′
and t(m−1∣k)t′
and we obtain:
[TABLE]
As a direct consequence, for all m≤k∈N, for all summable family
(ei)i∈I and all family (ϵi′)i∈I such that
ei⇒(m∣k)ϵi′ for all i∈I, (ϵi′)i∈I
is also summable: we can thus drop the side condition in the definition of
⇒(m∣k).
Observe however that those reduction relations are not stable under taking the
unions of fired redexes in families of reduction steps: using, e.g.,
the terms un(s) from Example 5.3,
for all n∈N, we have u2n(s)⇒(1∣1)un(s) by
firing all redexes at even depth,
u2n(s)⇒(0∣1)un(s) by
firing all redexes at odd depth,
and u2n(s)⇒(2n∣2n)s by firing both families,
but there is obviously no k∈N such that
u2n(s)⇒(k∣k)s uniformly for all n∈N.
Although we can close the induced critical pair
∑n∈Nu2n(s)⇒(0∣1)∑n∈Nun(s)
and
∑n∈Nu2n(s)⇒(1∣1)∑n∈Nun(s)
trivially in this case, this phenomenon is an obstacle to confluence:
Example 6.15**.**
Fix s∈Δ and
consider the sequence w(s) of resource terms given by
w0(s)=s and:
[TABLE]
Then for all n∈N, w2n(s)⇒(1∣1)un(s),
w2n+1(s)⇒(0∣1)un(s), w2n(s)⇒(0∣1)vn(s),
and w2n+1(s)⇒(1∣1)vn(s).
Then for instance
[TABLE]
but we know from Example 5.5 that this pair
of reductions cannot be closed in general.
6.2. Boundedly nested redexes
From the previous subsection, it follows that
bounding the length of chains of immediately nested redexes allows to tame
the size collapse of resource expressions under reduction,
but we need to further restrict this notion
in order to keep it stable under unions of fired redex sets.
A natural answer is to require a bound on the depth of the nesting of
fired redexes, regardless of the distance between them:
Definition 6.16**.**
We define a family of relations (⇒(b))b∈N
inductively as follows:
•
x⇒(b)x for all b∈N;
•
λxs⇒(b)λxσ′ if s⇒(b)σ′;
•
⟨s⟩t⇒(b)⟨σ′⟩τ′
if s⇒(b)σ′ and t⇒(b)τ′;
•
[s1,…,sr]⇒(b)[σ1′,…,σr′]
if si⇒(b)σi′ for all i∈{1,…,r};
•
⟨λxs⟩t⇒(b)∂xσ′⋅τ′
if b≥1, s⇒(b−1)σ′ and t⇒(b−1)τ′.
Intuitively, we have e⇒(b)ϵ′ iff e⇒∂ϵ′ and
every branch of e (seen as a rooted tree) crosses at most b fired redexes.
In particular it should be clear that if e⇒(b)ϵ′
then e⇒(b∣b)ϵ′, and moreover e⇒(b′)ϵ′
for all b′≥b.
Moreover observe that e⇒(h(e))ϵ′ whenever e⇒∂ϵ′, hence
⇒∂=⋃b∈N⇒(b).
Write e(b)e′ if e⇒(b)ϵ′ with e′∈∣ϵ′∣.
If e(b)e′, then e(b∣b)e′ and we
thus know that s(e)≤gbb(s(e′)).
In this special case, we can in fact provide a much better bound:
Lemma 6.17**.**
If e(b)e′ then s(e)≤4bs(e′).
Proof 6.18**.**
By induction on the reduction e⇒(b)ϵ′
such that e′∈∣ϵ′∣.
If e=x=ϵ′ then e′=x and s(e)=1≤4b=4bs(e′).
If e=λxs and ϵ′=λxσ′ with s⇒(b)σ′,
then e′=λxs′ with s(b)s′.
By induction hypothesis, s(s)≤4bs(s′).
Then
s(e)=s(s)+1≤4bs(s′)+1≤4b(s(s′)+1)=4bs(e′).
If e=⟨s⟩t, ϵ′=⟨σ′⟩τ′,
s⇒(b)σ′ and t⇒(b)τ′,
then e′=⟨s′⟩t′ with
s(b)s′ and t(b)t′.
By induction hypothesis, s(s)≤4bs(s′) and
s(t)≤4bs(t′).
Then
s(e)=s(s)+s(t)+1≤4bs(s′)+4bs(t′)+1≤4b(s(s′)+s(t′)+1)=4bs(e′).
If e=[s1,…,sr],
ϵ′=[σ1′,…,σr′] and
si⇒(b)σi′
for all i∈{1,…,r},
then e′=[s1′,…,sr′]
with si(b)si′
for all i∈{1,…,r}.
By induction hypothesis,
s(si)≤4bs(si′)
for all i∈{1,…,r} and then
s(e)=∑i=1rs(si)≤∑i=1r4bs(si′)=4bs(e′).
If e=⟨λxs⟩t,
ϵ′=∂xσ′⋅τ′, b>0,
s⇒(b−1)σ′ and
t⇒(b−1)τ′,
then there are s′∈∣σ′∣ and
t′∈τ′ such that
e′∈∂xs′⋅t′.
In particular, s(b−1)s′
and t(b−1)t′ and,
by induction hypothesis,
s(s)≤4b−1s(s′) and
s(t)≤4b−1s(t′).
Writing n=nx(s′)=#t′,
we have:
[TABLE]
Like for parallel reduction (Definition 5.2),
we extend each ⇒(b) to sums of resource expressions by linearity:
ϵ⇒(b)ϵ′ if ϵ=∑i=1nei and ϵ′=∑i=1nϵi′
with ei⇒(b)ϵi′ for all i∈{1,…,n}.
Again, because all term constructors are linear, the reduction rules extend
naturally to finite sums of resource expressions:
for instance,⟨λxσ⟩τ⇒(b)∂xσ′⋅τ′
as soon as b≥1, σ⇒(b−1)σ′ and τ⇒(b−1)τ′.
The relations ⇒(b) are then stable under unions of
families of fired redexes, avoiding pitfalls such as that of Example
6.15.
Lemma 6.19**.**
If e⇒(b0)ϵ′ and u⇒(b1)υ′ then
∂xe⋅u⇒(b0+b1)∂xϵ′⋅υ′.
Proof 6.20**.**
Write u=[u1,…,un]. Then we can
write υ′=[υ1′,…,υn′]
with ui⇒(b1)υ′i
for all i∈{1,…,n}.
Recall that whenever
I={i1,…,ik}⊆{1,…,n} with #I=k,
we write uI=[ui1,…,uik]
and υ′I=[υi1′,…,υik′].
The proof is by induction on the reduction e⇒(b0)ϵ′.
If e=y=ϵ′ then:
•
if y=x and n=1 then
∂xe⋅u=u1⇒(b1)υ1′=∂xϵ′⋅υ′′;
•
if y=x and u=[] then
∂xe⋅u=y⇒(0)y=∂xϵ′⋅υ′;
•
otherwise,
∂xe⋅u=0⇒(0)0=∂xϵ′⋅υ′.
If e=λys (choosing y=x and y∈fv(u)),
ϵ′=λyσ′ and s⇒(b0)σ′ then, by induction hypothesis,
∂xs⋅u⇒(b0+b1)∂xσ′⋅υ′.
We obtain:
∂xe⋅u=λy(∂xs⋅u)⇒(b0+b1)λy(∂xσ′⋅υ′)=∂xϵ′⋅υ′.
If e=⟨s⟩t, ϵ′=⟨σ′⟩τ′,
s⇒(b0)σ′ and
t⇒(b0)τ′ then,
by induction hypothesis,
∂xs⋅uI⇒(b0+b1)∂xσ′⋅υ′I and
∂xt⋅uI⇒(b0+b1)∂xτ′⋅υ′I,
for all I⊆{1,…,n}.
We obtain:
[TABLE]
If e=[s1,…,sr], ϵ′=[σ1′,…,σr′]
and si⇒(b0)σi′ for all i∈{1,…,r} then,
by induction hypothesis,
∂xsi⋅uI⇒(b0+b1)∂xσi′⋅υ′I
for all i∈{1,…,r} and all I⊆{1,…,n}.
We obtain:
[TABLE]
If e=⟨λys⟩t
(choosing y=x and y∈fv(t)∪fv(u)),
ϵ′=∂yσ′⋅τ′, b0≥1,
s⇒(b0−1)σ′ and t⇒(b0−1)τ′ then,
by induction hypothesis,
∂xs⋅uI⇒(b0+b1−1)∂xσ′⋅υ′I and
∂xt⋅uI⇒(b0+b1−1)∂xτ′⋅υ′I,
for all I⊆{1,…,n}.
We obtain:
Let K be a finite set, and assume ϵ⇒(bk)ϵk′ for all k∈K.
Then, setting b=∑k∈Kbk, there is ϵ′′ such that
ϵk′⇒(2bkb)ϵ′′ for all k∈K.
Proof 6.22**.**
By the linearity of the definition of reduction on finite sums,
it is sufficient to address the case of ϵ=e∈(\oc)Δ.
The proof is then by induction on the family of reductions
e⇒(bk)ϵk′.
If e=x=ϵk′ for all k∈K, then we set ϵ′′=x.
If e=λxs, and ϵk′=λxσk′ with
s⇒(bk)σk′ for all k∈K then,
by induction hypothesis, we have σ′′ such that
σk′⇒(2bkb)σ′′ for all k∈K,
and then we set ϵ′′=λxσ′′.
If e=[s1,…,sr] and ϵk′=[σ1,k′,…,σr,k′]
with sj⇒(bk)σj,k′ for all j∈{1,…,r} and k∈K then,
by induction hypothesis, we have σj′′ such that
σj,k′⇒(2bkb)σj′′
for all j∈{1,…,r} and k∈K, and then we set
ϵ′′=[σ1′′,…,σr′′].
Finally, assume K=K0+K1, e=⟨λxs⟩t and:
•
for all k∈K0, ϵk′=⟨λxσk′⟩τ′k
with s⇒(bk)σk′ and t⇒(bk)τ′k;
•
for all k∈K1, bk≥1 and ϵk′=∂xσk′⋅τ′k
with s⇒(bk−1)σk′ and t⇒(bk−1)τ′k.
Write b′=b−#K1.
By induction hypothesis, there are σ′′ and τ′′ such that,
for all k∈K0, σk′⇒(2bkb′)σ′′
and τ′k⇒(2bkb′)τ′′, and
for all k∈K1, \sigma^{\prime}_{k}\mathrel{{\Rightarrow_{{\bigl{(}2^{\scriptstyle(b_{k}-1)}b^{\prime}\bigr{)}}}}}\sigma^{\prime\prime}
and \overline{\tau^{\prime}}_{k}\mathrel{{\Rightarrow_{{\bigl{(}2^{\scriptstyle(b_{k}-1)}b^{\prime}\bigr{)}}}}}\overline{\tau^{\prime\prime}}.
If K1=∅ then b=b′ and we set ϵ′′=⟨λxσ′′⟩τ′′:
we obtain ϵk′⇒(2bkb)ϵ′′, for all k∈K=K0.
Otherwise, b>b′ and we set ϵ′′=∂xσ′′⋅τ′′ so that:
•
for all k∈K0,
ϵk′=⟨λxσk′⟩τ′k⇒(2bkb′+1)σk′
with 2bkb′+1≤2bkb;
•
for all k∈K1,
by the previous lemma,
ϵk′=∂xσk′⋅τ′k⇒(2bkb′)σk′
and 2bkb′<2bkb.
We already know ⇒∂ is not confluent,
and the counter examples we provided actually
show that no single ⇒(b) is confluent either.
Setting191919
Our notation is somehow abusive as ⇒(∂)
is not of the form described in
Definition 5.10:
there should not be any ambiguity as we have not
defined any relation ⇒(∂).
Similarly, we may also write
⇒(∂)E for
⋃b∈N⇒(b)E
in the following.
[TABLE]
however, we will obtain a strongly confluent reduction relation, under the assumption
that S has the following additive splitting property:202020
The additive splitting property was previously used by Carraro, Ehrhard and
Salibra [CES10, Car11] in their study of linear logic
exponentials with infinite multiplicities. There is no clear connection
between that work and our present contributions, though.
Definition 6.23**.**
We say S has the additive splitting property if:
whenever a1+a2=b1+b2∈S, there exists
c1,1,c1,2,c2,1,c2,2∈S such that
ai=ci,1+ci,2 and bj=c1,j+c2,j for i,j∈{1,2}.
This property is satisfied by any ring, but also by
the usual semirings of non-negative numbers (N,
Q+, etc.) as well as booleans.
We will in fact rely on the following generalization of the property to finite
families of finite sums of any size:
Lemma 6.24**.**
Assume S has the additive splitting property.
Let a∈S, J1,…,Jn be finite sets and,
for all i∈{1,…,n},
let (bi,j)j∈Ji∈SJi be a family
such that a=∑j∈Jibi,j.
Write J=J1×⋯×Jn and,
for all i∈{1,…,n}, write Ji′=J1×⋯×Ji−1×Ji+1×⋯×Jn.
Whenever ′=(j1,…,ji−1,ji+1,…,jn)∈Ji′
and ji∈Ji, write ′⋅iji=(j1,…,jn)∈J.
Then there exists a family (c)∈SJ
such that, for all i∈{1,…,n} and all j∈Ji,
bi,j=∑′∈Ji′c′⋅ij.
Proof 6.25**.**
By induction on n, and then on #Jn for n>0,
using the binary additive splitting property to enable the induction.
Lemma 6.26**.**
Assume S has the additive splitting property
and fix a ⇒∂-reduction structure E.
For all finite set K and all reductions ϵ⇒(∂)Eϵk′ for k∈K,
there is ϵ′′ such that ϵk′⇒(∂)Eϵ′′ for all k∈K.
Proof 6.27**.**
For all k∈K, there are bk∈N,
a resource support Ek∈E,
a set Ik of indices,
a family (ak,i)i∈Ik of scalars,
and summable families (ek,i)i∈Ik∈EkIk and
(ϵk,i′)i∈Ik∈N[(\oc)Δ]Ik such that
ϵ=∑i∈Ikak,i.ek,i,
ϵk′=∑i∈Ikak,i.ϵk,i′
and ek,i⇒(bk)ϵk,i′ for all i∈Ik.
Write E={ek,i;k∈K,i∈Ik}: since
E⊆⋃k∈KEk and E is a resource structure,
we have E∈E. Write E′=⋃{ϵk,i′;k∈K,i∈Ik}:
since E is a reduction structure, we also have E′∈E.
Now fix e∈(\oc)Δ and write a=ϵe.
For all k∈K, the set Ie,k={ik∈Ik;ek,ik=e}
is finite, and then ∑ik∈Ie,kak,ik=a.
Write Ie=∏k∈KIe,k and, for all k∈K,
Kk′=K∖{k} and
Ie,k′=∏l∈Kk′Ie,l.
If =(il)l∈Kk′∈Ie,k′
and ik∈Ie,k, write ⋅kik=(ik)k∈K∈Ie.
By Lemma 6.24,
we obtain a family of scalars (ae,′)∈Ie
such that, for all k∈K and all ik∈Ie,k,
ak,ik=∑∈Ie,k′ae,⋅kik′.
Moreover, a=∑∈Ieae,′.
Since each Ie is finite, the family
(e)e∈(\oc)Δ,∈Ie is summable.
Moreover, if we fix k∈K and ik∈Ik,
there are finitely many e∈(\oc)Δ and ∈Ie,k′
such that ⋅kik∈Ie:
indeed in this case e=ek,ik.
Since (ϵk,ik′)ik∈Ik is summable too,
it follows that (ϵk,ik′)e∈(\oc)Δ,∈Ie is summable.
By associativity, we obtain
[TABLE]
and
[TABLE]
for all k∈K.
Write b=∑k∈Kbk.
For all e∈(\oc)Δ and all =(ik)k∈K∈Ie,
we have e⇒(bk)ϵk,ik′ for all k∈K hence
Lemma 6.21 gives
ϵe,′′∈N[(\oc)Δ]
such that ϵk,ik′⇒(2bkb)ϵe,′′ for all k∈K.
Moreover, for all k∈K and e′′∈(\oc)Δ,
if e′′∈ϵe,′′ then there is e′∈ϵk,ik′
such that e′(2bkb)e′′, and then e(bk)e′:
it follows that s(e)≤4bk+2bkbs(e′′) and fv(e)=fv(e′′).
Since each Ie is finite, there are finitely many pairs
(e,)∈∑e∈(\oc)ΔIe
such that e′′∈ϵe,′′.
Hence the family (ϵe,′′)e∈(\oc)Δ,∈Ie
is summable. Recall moreover that ϵk,ik′∈N[E′] for all k∈K and ik∈Ik:
we obtain
[TABLE]
for all k∈K, which concludes the proof.
6.3. Bounded depth of substitution
In the previous subsection, we relied on the additive splitting property
to establish the confluence of ⇒(∂): this is because there
is no maximal way to ⇒(b)-reduce a resource vector,
hence we must track precisely the different redexes that are fired
in each reduction of a critical pair.
We can get rid of this hypothesis by considering a more uniform bound
on reductions. A first intuition would be to bound the depth at
which redexes are fired, but as with ⇒(m∣k) this boundedness
condition is not preserved in residuals: rather, we have to bound
the depth at which variables are substituted.
First recall from Definition 3.1 that mdx(s)=maxdx(s) is the maximum depth of an occurrence of x in
s. Then:
Definition 6.28**.**
We define a family of relations (⇒⌊d⌋)d∈N
inductively as follows:
•
e⇒⌊0⌋e for all e∈(\oc)Δ;
•
x⇒⌊d+1⌋x for all x∈V;
•
λxs⇒⌊d+1⌋λxσ′ if s⇒⌊d⌋σ′;
•
⟨s⟩t⇒⌊d+1⌋⟨σ′⟩τ′
if s⇒⌊d+1⌋σ′ and t⇒⌊d⌋τ′;
•
[s1,…,sr]⇒⌊d+1⌋[σ1′,…,σr′]
if si⇒⌊d+1⌋σi′ for all i∈{1,…,r};
•
⟨λxs⟩t⇒⌊d+1⌋∂xσ′⋅τ′
if mdx(s)≤d,
s⇒⌊d⌋σ′ and t⇒⌊d⌋τ′.
It should be clear that if e⇒⌊d⌋ϵ′
then e⇒(d)ϵ′, and moreover e⇒⌊d′⌋ϵ′
for all d′≥d. We also have e⇒⌊h(e)⌋ϵ′
as soon as e⇒∂ϵ′.
Definition 6.29**.**
For all e∈(\oc)Δ we define
the full parallel reduct F⌊d⌋(e) at substitution depth d of e by induction on the pair (d,e) as follows:
[TABLE]
Then if ϵ=∑i=1nei∈N[(\oc)Δ],
we set F⌊d⌋(ϵ):=∑i=1nF⌊d⌋(ei).
Lemma 6.30**.**
For all e∈(\oc)Δ, e⇒⌊d⌋F⌊d⌋(e).
Proof 6.31**.**
By a straightforward induction on d then on e.
It follows that e⇒(d)F⌊d⌋(e), hence if e′∈F⌊d⌋(e) then s(e)≤4ds(e′).
In particular F⌊d⌋ defines a linear-continuous function on S(\oc)Δ.
Lemma 6.32**.**
If e⇒⌊d0⌋ϵ′,
u⇒⌊d1⌋υ′
and d≥max({d0}∪{dx+d1−1;dx∈dx(e)}) then
∂xe⋅u⇒⌊d⌋∂xϵ′⋅υ′.
Proof 6.33**.**
Write n=#u, u=[u1,…,un]
and υ′=[υ1′,…,υn′] so that
ui⇒⌊d1⌋υi′ for i∈{1,…,n}.
The proof is by induction on the reduction e⇒⌊d0⌋ϵ′.
We treat the cases d0=0 and d0>0 uniformly by a further induction on e,
setting d0′=max{0,d0−1}.
If d0=d0′+1, e=⟨λys⟩t
and ϵ′=∂yσ′⋅τ′
with y∈{x}∪fv(t)∪fv(u),
mdy(s)≤d0′,
s⇒⌊d0′⌋σ′ and
t⇒⌊d0′⌋τ′,
then we have
[TABLE]
and
[TABLE]
Observe that d>0 and d−1≥max{d0′}∪{dx′+d1−1;dx′∈dx(s)∪dx(t)}.
By induction hypothesis,
we obtain ∂xs⋅uI⇒⌊d−1⌋∂xσ′⋅υI′
and ∂xt⋅uJ⇒⌊d−1⌋∂xτ′⋅υJ′,
and we conclude since mdy(∂xs⋅uI)=mdy(s)≤d0′≤d−1.
If e=y=ϵ′, with y=x, then ∂xe⋅u=∂xϵ′⋅υ′=y
and we conclude directly by the definition of ⇒⌊d⌋.
If e=x=ϵ′, then dx(e)={1} hence d≥d1 and we conclude since
∂xe⋅u=u, ∂xϵ′⋅υ′=υ′
and u⇒⌊d1⌋υ′.
If e=λys and ϵ′=λyσ′ with y∈{x}∪fv(u)
and s⇒⌊d0′⌋σ′, then
write d′=max{d0′}∪{dx′+d1−1;dx′∈dx(s)}.
By induction hypothesis,
we obtain ∂xs⋅u⇒⌊d′⌋∂xσ′⋅υ′.
Observe that either d=d′+1 or d=d′=0 (in that latter case,
∂xs⋅u=∂xσ′⋅υ′),
and then we conclude since
∂xe⋅u=λy(∂xs⋅u)
and
∂xϵ′⋅υ′=λy(∂xσ′⋅υ′).
If e=⟨s⟩t
and ϵ′=⟨σ′⟩τ′, with
s⇒⌊d0⌋σ′ and
t⇒⌊d0′⌋τ′,
then we have
[TABLE]
and
[TABLE]
Write d′=max{d0′}∪{dx′+d1−1;dx′∈dx(t)}.
By induction hypothesis,
we obtain ∂xs⋅uI⇒⌊d⌋∂xσ′⋅υI′
and ∂xt⋅uJ⇒⌊d′⌋∂xτ′⋅υJ′.
Then we conclude observing that d=d′+1 or d=d′=0 (in that latter case,
∂xs⋅uI=∂xσ′⋅υI′ and
∂xt⋅uJ=∂xτ′⋅uJ′).
If e=[s1,…,sk]
and ϵ′=[σ1′,…,σk′], with
si⇒⌊d0⌋σi′ for i∈{1,…,k},
then we have
[TABLE]
and
[TABLE]
By induction hypothesis, we obtain
[TABLE]
for all partition (I1,…,Ik) of {1,…,n} and we conclude.
Lemma 6.34**.**
If e⇒⌊d⌋ϵ′ and e′∈∣ϵ′∣
then mdx(e′)≤2dmax{d,mdx(e)}.
Proof 6.35**.**
By induction on the reduction e⇒⌊d⌋ϵ′.
If d=0, then e′=ϵ′=e and the result is trivial.
For the other inductive cases, write d=d′+1.
If e=⟨λys⟩t
and ϵ′=∂yσ′⋅τ′ with
mdy(s)≤d′,
s⇒⌊d′⌋σ′ and t⇒⌊d′⌋τ′,
choosing y∈{x}∪fv(t),
then e^{\prime}\in{\bigl{|}\partial_{y}s^{\prime}\cdot\overline{t}^{\prime}\bigr{|}} with
s′∈∣σ′∣ and t′∈∣τ′∣.
By induction hypothesis, mdz(s′)≤2d′max{d′,mdz(s)}
and mdz(t′)≤2d′max{d′,mdz(t)}
for any z∈V.
By Lemma 3.3,
[TABLE]
If e=λys and ϵ′=λyσ′ with
s⇒⌊d′⌋σ′,
choosing y=x,
then e′=λxs′ with
s′∈∣σ′∣.
By induction hypothesis, mdx(s′)≤2d′max{d′,mdx(s)}.
Then mdx(e′)≤mdx(s′)+1≤2d′max{d′,mdx(s)}+1≤2dmax{d,mdx(s)}≤2dmax{d,mdx(e)}.
If e=⟨s⟩t and ϵ′=⟨σ′⟩τ′ with
s⇒⌊d⌋σ′ and t⇒⌊d′⌋τ′,
then e′=⟨s′⟩t′ with
s′∈∣σ′∣ and t′∈∣τ′∣.
By induction hypothesis, mdx(s′)≤2dmax{d,mdx(s)}
and mdx(t′)≤2d′max{d′,mdx(t)}.
Then:
[TABLE]
If e=[s1,…,sk]
and ϵ′=[σ1′,…,σk′], with
si⇒⌊d⌋σi′ for all i∈{1,…,k},
then e′=[s1′,…,sk′]
with si′∈∣σi′∣ for all i∈{1,…,k}.
By induction hypothesis, for all i∈{1,…,k},
mdx(si′)≤2dmax{d,mdx(si)},
hence
[TABLE]
Lemma 6.36**.**
If e⇒⌊d⌋ϵ′ then
ϵ′⇒⌊2dd⌋F⌊d⌋(e).
Proof 6.37**.**
By induction on the reduction e⇒⌊d⌋ϵ′.
If d=0, then ϵ′=e and the result follows from Lemma 6.30.
For the other inductive cases, set d=d′+1.
If e=⟨λxs⟩t
and ϵ′=∂xσ′⋅τ′
with mdx(s)≤d′,
s⇒⌊d′⌋σ′ and
t⇒⌊d′⌋τ′
then by induction hypothesis,
we have σ′⇒⌊2d′d′⌋F⌊d′⌋(s)
and τ′⇒⌊2d′d′⌋F⌊d′⌋(t).
By the previous lemma,
we moreover have mdx(σ′)≤2d′max{d′,mdx(s)}=2d′d′.
It follows that 2dd≥2d′d′ and 2dd≥mdx(σ′)+2d′d′−1
hence we can apply Lemma 6.32
to obtain
ϵ′⇒⌊2dd⌋∂xF⌊d′⌋(s)⋅F⌊d′⌋(t)=F⌊d⌋(e).
If e=λys and ϵ′=λyσ′ with
s⇒⌊d′⌋σ′,
then by induction hypothesis,
σ′⇒⌊2d′d′⌋F⌊d′⌋(s),
hence
ϵ′⇒⌊2d′d′+1⌋λxF⌊d′⌋(s)=F⌊d⌋(e)
and we conclude since 2d′d′+1≤2dd.
If e=⟨s⟩t and ϵ′=⟨σ′⟩τ′ with
s⇒⌊d⌋σ′ and t⇒⌊d′⌋τ′,
there are two subcases:
•
If moreover s=λxu and mdx(u)≤d′ then
σ′=λxυ′ with
u⇒⌊d′⌋υ′.
Then by induction hypothesis,
υ′⇒⌊2d′d′⌋F⌊d′⌋(u),
and
τ′⇒⌊2d′d′⌋F⌊d′⌋(t).
By the previous lemma,
we moreover have mdx(υ′)≤2d′max{d′,mdx(u)}=2d′d′,
hence
ϵ′=⟨λxυ′⟩τ′⇒⌊2d′d′+1⌋∂xF⌊d′⌋(u)⋅F⌊d′⌋(t)=F⌊d⌋(e),
and we conclude since 2d′d′+1≤2dd.
•
Otherwise s is not an abstraction or s=λxu with mdx(u)>d′.
By induction hypothesis,
σ′⇒⌊2dd⌋F⌊d⌋(σ′),
and
τ′⇒⌊2d′d′⌋F⌊d′⌋(t).
Since 2d′d′<2dd, we obtain
τ′⇒⌊2dd−1⌋F⌊d′⌋(t)
and then
ϵ′⇒⌊2dd⌋⟨F⌊d⌋(s)⟩F⌊d′⌋(t)=F⌊d⌋(e).
If e=[s1,…,sk]
and ϵ′=[σ1′,…,σk′], with
si⇒⌊d⌋σi′ for all i∈{1,…,k},
then by induction hypothesis, for all i∈{1,…,k},
σi′⇒⌊2dd⌋F⌊d⌋(si) and we conclude directly.
Lemma 6.38**.**
For all ⇒∂-reduction structure E,
if ϵ⇒⌊d⌋Eϵ′
then ϵ′⇒⌊2dd⌋EF⌊d⌋(ϵ′).
Proof 6.39**.**
Assume there is E∈E, summable families
(ei)i∈I∈EI and
(ϵi′)i∈IN[(\oc)Δ]I,
and a family of scalars
(ai)i∈I
such that ϵ=∑i∈Iai.ei,
ϵ′=∑i∈Iai.ϵi′
and ei⇒⌊d⌋ϵi′ for all i∈I.
Write E′=⋃i∈I∣ϵi′∣:
since E is a reduction structure,
we obtain E′∈E.
The family (F⌊d⌋(ei))i∈I is summable,
and by the previous lemma, ϵi′⇒⌊2dd⌋F⌊d⌋(ei)
for all i∈I.
We conclude
that ϵ′⇒⌊2dd⌋∑i∈Iai.F⌊d⌋(ei)=F⌊d⌋(ϵ).
Similarly to ⇒(∂), we set
[TABLE]
and we obtain:
Corollary 6.40**.**
For all ⇒∂-reduction structure E
and all ϵ,ϵ1′,…,ϵn′∈S(\oc)Δ such that
ϵ⇒⌊∂⌋Eϵi′ for i∈{1,…,n},
there exists d∈N such that
ϵi′⇒⌊∂⌋EF⌊d⌋(ϵ) for i∈{1,…,n}.
6.4. Parallel reduction of resource vectors of bounded height
Recall that we have e⇒∂ϵ′ iff e⇒(h(e)∣h(e))ϵ′
iff e⇒(h(e))ϵ′ iff e⇒⌊h(e)⌋ϵ′.
Definition 6.41**.**
We say a resource vector ϵ∈S(\oc)Δ is bounded if {h(e);e∈∣ϵ∣} is finite.
We then write h(ϵ)=max{h(e);e∈∣ϵ∣}.
If E⊆(\oc)Δ, we also write
h(E):={h(e);e∈E}
and then
[TABLE]
which is a resource structure (see Definition 5.9).
Indeed, (\oc)B⊆(\oc)Ffv,
and if we write
[TABLE]
for all h∈N and all V⊆V,
we have
(\oc)B={(\oc)Δh,V;h∈N and V∈Pf(V)}⊥⊥:
this is a consequence of a generic transport lemma [TV16].
The semimodule of bounded resource vectors is then S⟨(\oc)B⟩.
Lemma 6.42**.**
For all h∈N and V∈Pf(V),
(F(e))e∈(\oc)Δh,V is summable.
Moreover, for all ϵ∈S⟨(\oc)B⟩, we have
∣ϵ∣⊆(\oc)Δh(ϵ),fv(ϵ) and then,
setting F(ϵ):=∑e∈∣ϵ∣ϵe.F(e),
we obtain ϵ⇒∂∣ϵ∣F(ϵ).
Proof 6.43**.**
Follows from Lemmas 6.30 and 6.17
using the fact that, if h(e)≤h then F(e)=F⌊h⌋(e).
If S is zerosumfree, we have:
ϵ⇒∂ϵ′ iff ϵ⇒⌊h(ϵ)⌋ϵ′ as soon as ϵ is bounded.
More generally, without any assumption on S,
we have
ϵ⇒∂(\oc)Δh,Vϵ′
iff ϵ⇒⌊h⌋(\oc)Δh,Vϵ′.
We can moreover show that bounded vectors are stable under ⇒∂(\oc)B:
Lemma 6.44**.**
If e∂e′ then h(e′)≤2h(e)h(e).
Proof 6.45**.**
The proof is by induction on the reduction e⇒∂ϵ′ such that e′∈∣ϵ′∣,
and is very similar to that of Lemma 6.34.
We detail only the base case.
If e=⟨λxs⟩t
and ϵ′=∂xσ′⋅τ′ with
s⇒∂σ′ and t⇒∂τ′.
Then e′∈∂xs′⋅t′ with
s′∈∣σ′∣ and t′∈∣τ′∣.
By induction, h(s′)≤2h(s)h(s)
and h(t′)≤2h(t)h(t).
By Lemma 3.2,
[TABLE]
It follows that (\oc)B is a ⇒∂-reduction structure:
since ⇒∂(\oc)B coincides with ⇒⌊∂⌋(\oc)B,
Corollary 6.40 entails that
⇒∂(\oc)B is strongly confluent.
We can even refine this result following Lemma 6.42.
First, let us call bounded reduction structure any ⇒∂-reduction
structure E such that E⊆(\oc)B.
Then Lemma 6.38 entails:
Corollary 6.46**.**
For all bounded reduction structure E,
and all reduction ϵ⇒∂Eϵ′,
ϵ′⇒∂EF(ϵ).
It should moreover be clear that τ(M) is bounded for all M∈ΛS.
In the next section, we show that ⇒∂(\oc)B allows to simulate
parallel β-reduction via Taylor expansion.212121
Observe that it is possible to establish Corollary
6.46 quite directly, following the
proof of Lemma 6.38, and using only Lemma
6.44 and a variant of Lemma
6.17 (replacing b with h(e)).
This is the path adopted in the extended abstract
[Vau17] presented at CSL 2017.
7. Simulating β-reduction under Taylor expansion
From now on, for all M,N∈ΛS, we write
M⇒∂N if τ(M)⇒∂τ(N).
More generally, for all M∈ΛS and all σ∈S(\oc)Δ,
we write M⇒∂σ (resp. σ⇒∂M) if τ(M)⇒∂σ
(resp. σ⇒∂τ(M)).
We will show in Subsection 7.1 that
M⇒∂N as soon as M⇒βN
where ⇒β is the parallel β-reduction defined as follows:
Definition 7.1**.**
We define parallel β-reduction on algebraic terms
⇒β⊆ΛS×ΛS
by the following inductive rules:
•
x⇒βx;
•
if S⇒βM′ then λxS⇒βλxM′;
•
if S⇒βM′ and N⇒βN′ then
(S)N⇒β(M′)N′;
•
if S⇒βM′ and N⇒βN′ then
(λxS)N⇒βM′[N′/x];
•
0⇒β0;
•
if M⇒βM′ then a.M⇒βa.M′;
•
if M⇒βM′ and N⇒βN′ then M+N⇒βM′+N′.
In particular, if 1∈S admits an opposite element −1∈S
then ⇒∂(\oc)B is degenerate. Indeed, we can consider ⇒β up to
the equality of vector λ-terms by setting M⇒βN if
there are M′≃vM and N′≃vN such that M′⇒βN′.
Since ≃τ subsumes ≃v, the results of Subsection 7.1
will imply that M⇒∂(\oc)BN as soon as M⇒βN.
If −1∈S, we have M⇒β∗N
for all M,N∈ΛS by Example 4.1,
hence M⇒∂(\oc)B∗N.
Using reduction structures, we will nonetheless be able to define a consistent
reduction relation containing β-reduction, but restricted to
those algebraic λ-terms that have a normalizable Taylor expansion, in the
sense to be defined in Section 8.
On the other hand, even assuming S is zerosumfree,
Taylor expansions are not stable under ⇒∂:
if M⇒∂Bσ′, we know from the previous
section that σ′ is bounded and M⇒⌊∂⌋σ′,
but there is no reason why σ′ would be the Taylor expansion of
an algebraic λ-term.
We do know, however, that σ′⇒∂BF(τ(M)), which
will allow us to obtain a weak conservativity result w.r.t. parallel β-reduction:
for all reduction M⇒∂B∗σ′
there is a reduction M⇒β∗M′
such that σ′⇒∂B∗M′, i.e. any ⇒∂B-reduction sequence from a Taylor expansion can be completed into a
parallel β-reduction sequence (Subsection 7.2).
Restricted to normalizable pure λ-terms, this will enable us to obtain an actual
conservativity result.
7.1. Simulation of parallel β-reduction
We show that ⇒∂(\oc)B allows to simulate ⇒β
on S(\oc)Δ, without any particular assumption
on S.
Lemma 7.2**.**
If σ⇒∂Sσ′ and
τ⇒∂Tτ′ then
⟨λxσ⟩τ⇒∂⟨λxS⟩T∂xσ′⋅τ′.
Proof 7.3**.**
Assume there are summable families
(si)i∈I,
(σi′)i∈I,
(tj)j∈J and
(τj′)j∈J,
and families of scalars
(ai)i∈I∈SI and (bj)j∈J∈TJ
such that:
•
σ=∑i∈Iai.si,
σ′=∑i∈Iai.σi′
and si⇒∂σi′ for all i∈I;
•
τ=∑j∈Jbj.tj,
τ′=∑j∈Jbj.τj′,
and tj∈T and tj⇒∂τj′ for all j∈J.
By multilinear-continuity, the families
(⟨λxsi⟩tj)i∈I,j∈J
and
(∂xσi′⋅τj′)i∈I,j∈J
are summable,
⟨λxσ⟩τ=∑i∈I,j∈Jaibj.⟨λxsi⟩tj
and
∂xσ′⋅τ′=∑i∈I,j∈Jaibj.∂xσi′⋅τj′.
It is then sufficient to observe that
⟨λxsi⟩tj⇒∂∂xσi′⋅τj′
for all (i,j)∈I×J.
The additional requirement on resource supports is straightforwardly satisfied, since
⟨λxsi⟩tj∈⟨λxS⟩T for all (i,j)∈I×J.
Lemma 7.4**.**
If σ⇒∂Sσ′ then
λxσ⇒∂λxSλxσ′.
If moreover
τ⇒∂Tτ′ then
⟨σ⟩τ⇒∂⟨S⟩T⟨σ′⟩τ′.
Proof 7.5**.**
Similarly to the previous lemma, each result follows from the
multilinear-continuity of syntactic operators, and the contextuality of
⇒∂.
Lemma 7.6**.**
If σ⇒∂Sσ′ then
σ\oc⇒∂S\ocσ′\oc.
Proof 7.7**.**
Assume there are summable families
(si)i∈I and
(σi′)i∈I,
and a family of scalars
(ai)i∈I
such that σ=∑i∈Iai.si,
σ′=∑i∈Iai.σi′
and si⇒∂σi′ for all i∈I.
Then by multilinear-continuity of the monomial construction,
for all n∈N,
the families
([si1,…,sin])i1,…,in∈I
and
([σi1′,…,σin′])i1,…,in∈I
are summable, and
[TABLE]
and
[TABLE]
Since the supports of the monomial vectors σn (resp. σ′n)
for n∈N are pairwise disjoint,
we obtain that the families
([si1,…,sin])n∈Ni1,…,in∈I
and
([σi1′,…,σin′])n∈Ni1,…,in∈I
are summable,
and
[TABLE]
and
[TABLE]
which concludes the proof since each
[si1,…,sin]⇒∂[σi1′,…,σin′].
Lemma 7.8**.**
If ϵ⇒∂Eϵ′ and φ⇒∂Fφ′ then
a.ϵ⇒∂Ea.ϵ′ and ϵ+φ⇒∂E∪Fϵ′+φ′.
Proof 7.9**.**
Follows directly from the definitions, using the fact that
summable families form a S-semimodule.
Lemma 7.10**.**
If M⇒βM′
then M⇒∂T(M)M′.
Proof 7.11**.**
By induction on the reduction M⇒βM′
using Lemmas 7.2 to 7.6
in the cases of reduction from a simple term,
and Lemma 7.8
in the case of reduction from an algebraic term.
Recalling that T(M)∈B we obtain:
Corollary 7.12**.**
If M⇒βM′
then M⇒∂BM′.
Observe that these results hold on Taylor supports as well,
which will be useful in the treatment of Taylor normalizable
terms in Section 8:
Lemma 7.13**.**
If M⇒βM′
then T(M)⇒∂T(M)T(M′)
in BΔ.
Proof 7.14**.**
The proof is again by induction on the reduction M⇒βM′ using Lemmas
7.2 to Lemma 7.8
in BΔ.
7.2. Conservativity
Definition 7.15**.**
We define the full parallel reduct of simple terms and algebraic terms
inductively as follows:
[TABLE]
As can be expected, we have
M′⇒βF(M)
as soon as
M⇒βM′.
In this subsection, we will show that a similar property holds
for ⇒∂(\oc)B.
Recall that, by Lemma 6.42,
the full reduction operator F on resource expressions
extends to bounded resource vectors.
We obtain:
Lemma 7.16**.**
For all bounded σ0∈SΔ, τ∈S\ocΔ, ϵ,φ∈S(\oc)Δ,
[TABLE]
Proof 7.17**.**
The proofs of those identities are basically the same as those of Lemmas
7.2 to 7.8,
the necessary summability conditions following from Lemma
6.42.
Lemma 7.18**.**
For all M∈ΛS,
F(τ(M))=τ(F(M)).
Proof 7.19**.**
We know that τ(M) is bounded.
The identity is then proved by induction on simple terms and algebraic terms,
using the previous lemma in each case.
Lemma 7.20**.**
For all bounded term reduction structure S
and all M∈ΛS,
if M⇒∂Sσ′ then σ′⇒∂SF(M).
Proof 7.21**.**
By Corollary 6.46,
σ′⇒∂SF(τ(M))
and we conclude by the previous lemma.
This result can then be generalized to sequences of ⇒∂-reductions.
Lemma 7.22**.**
For all bounded term reduction structure S
and all M∈ΛS,
if M⇒∂Snσ′
then σ′⇒∂SnFn(M).
Proof 7.23**.**
By induction on n. The case n=0 is trivial, and the inductive case follows
from the previous lemma and strong confluence of ⇒∂S:
if M⇒∂Snσ′⇒∂Sτ
then by induction hypothesis σ′⇒∂SnFn(M),
hence by strong confluence, there exists τ′ such that
τ⇒∂Snτ′ and
Fn(M)⇒∂Sτ′;
by the previous lemma,
τ′⇒∂Fn+1(M).
We have thus obtained some weak kind of conservativity of ⇒∂B w.r.t.
β-reduction, but it is not very satisfactory: the same result would hold
for the tautological relation
S⟨B⟩×S⟨B⟩,
which is indeed the same as ⇒∂B if 1 has an opposite
element in S.
Even when S is zerosumfree, the converse to Lemma
7.10 cannot hold in general if only because there can
be distinct β-normal forms M≃vN such that M≃τN (see Example
4.5).
Under this hypothesis, we can nonetheless obtain an actual conservativity
result on normalizable pure λ-terms as follows.
We write ≃β for the symmetric, reflexive and transitive closure of
⇒β.
Similarly, if E is a reduction structure, we write ≃∂E for the
equivalence on S⟨E⟩ induced by ⇒∂E.
Lemma 7.24**.**
Assume S is zerosumfree.
Let M,N∈Λ be such that M is normalizable.
Then M≃∂BN iff M≃βN.
Proof 7.25**.**
Corollary 6.46 entails that,
if E is a bounded reduction structure, then
ϵ≃∂Eϵ′ iff ϵ⇒∂E∗Fn(ϵ′) for some n∈N.
Now assume M∈ΛS is normalizable and
write NF(M) for its normal form:
in particular M⇒∂B∗NF(M), by
Corollary 7.12.
If M≃∂BN, we thus have
NF(M)≃∂BN, hence
NF(M)⇒∂B∗Fn(N)
for some n∈N.
In particular, if S is zerosumfree, we obtain
NF(M)≃τFn(N).
If moreover M,N∈Λ, we deduce M≃βN by the injectivity
of τ on Λ.
The next section will allow us to establish a similar conservativity result,
without any assumption on S, at the cost of restricting the reduction
relation to normalizable resource vectors.
8. Normalizing Taylor expansions
Previous works on the normalization of Taylor expansions were restricted
a priori, to a strict subsystem of the algebraic λ-calculus:
the typed setting of an extension
of system F to the algebraic λ-calculus [Ehr10];
•
a λ-calculus extended with formal finite sums,
rather than linear combinations [PTV16, TAO17].
In all these, pathological terms were avoided, e.g. those involved
in the inconsistency Example 4.1.
Moreover observe that the very notion of normalizability is not compatible with
≃v, and in particular the identity 0≃v0.M: those previous works
circumvented this incompatibility, either by imposing normalizability
via typing, or by excluding the formation of the term 0.M.
Our approach is substantially different.
We introduce a notion of normalizability on resource vectors such that:
•
both pure λ-terms and normalizable algebraic λ-terms
(in particular typed algebraic λ-terms and normalizable λ-terms with sums)
have a normalizable Taylor expansion;
•
the restriction of ⇒∂ to normalizable resource vectors
is a consistent extension of both β-reduction on pure λ-terms and
normalization on algebraic λ-terms, without any assumption on the
underlying semiring of scalars.
8.1. Normalizable resource vectors
We say ϵ∈S(\oc)Δ is normalizable whenever the family
(NF(e))e∈∣ϵ∣
is summable. In this case, we write
NF(ϵ):=∑e∈(\oc)Δϵe.NF(e).
Normalizable vectors form a finiteness space.
Recall indeed from Subsection 3.1
that e≥∂e′ iff e→∂∗ϵ′ with e′∈∣ϵ′∣.
If e∈(\oc)Δ, we write
↑e:={e′∈(\oc)Δ;e′≥∂e}.
Then ϵ is normalizable iff
for each normal resource expression e, ∣ϵ∣∩↑e is finite:
writing (\oc)\mathcal{N}={\left\{e\in(\oc)\Delta\mathrel{;}\text{e is normal}\right\}}
and (\oc)N={↑e;e∈(\oc)N}⊥∩(\oc)Ffv,
we obtain that S⟨(\oc)N⟩ is the set of normalizable resource vectors.
Observe that NF is defined on all S⟨(\oc)N⟩
but is guaranteed to be linear-continuous only when restricted to
subsemimodules of the form SE with E∈(\oc)N.
For our study of hereditarily determinable terms in Section 9,
it will be useful to decompose (\oc)N into a decreasing sequence
of finiteness structures.
Definition 8.1**.**
We define the monomial depthd(e)∈N of a
resource expression e∈(\oc)Δ as follows:
[TABLE]
We write (\oc)Nd={e∈(\oc)N;d(e)≤d}
so that (\oc)N=⋃d∈N(\oc)Nd.
We then write (\oc)Nd={↑e;e∈(\oc)Nd}⊥∩(\oc)Ffv
so that (\oc)N=⋂d∈N(\oc)Nd.
Each finiteness structure (\oc)Nd is moreover a reduction structure
for any reduction relation contained in →∂∗
(and so is (\oc)N). Indeed,
writing ↓e={e′∈(\oc)Δ;e≥∂e′}
and ↓E=⋃e∈E↓e, we obtain:
Lemma 8.2**.**
If E∈(\oc)Nd then
↓E∈(\oc)Nd.
Proof 8.3**.**
Let e′′∈(\oc)Nd and
e′∈↓E∩↑e′′.
Necessarily, there is e∈E such that e≥∂e′.
Then e∈E∩↑e′′:
since E∈(\oc)Nd, there are finitely many values for e
hence for e′ by Lemma 3.4.
It follows that normalizable vectors are stable under reduction:
Lemma 8.4**.**
If ϵ⇒∂(\oc)Nϵ′
then ϵ′∈S⟨(\oc)N⟩
and NF(ϵ)=NF(ϵ′).
Proof 8.5**.**
Assume there exists E∈(\oc)N and families (ai)i∈I∈SI,
(ei)i∈I∈(\oc)ΔI
and (ϵi′)i∈I∈N[(\oc)Δ]I
such that:
•
(ei)i∈I is summable and ϵ=∑i∈Iai.ei;
•
(ϵi′)i∈I is summable and ϵ′=∑i∈Iai.ϵi′;
•
for all i∈I, ei∈E and ei⇒∂ϵi′.
We obtain that E′:=⋃i∈I∣ϵi′∣∈(\oc)N
by Lemma 8.2,
hence ϵ′∈S⟨(\oc)N⟩ since ∣ϵ′∣⊆E′.
Then, by the linear-continuity of
NF on SE′,
[TABLE]
As a direct consequence, we obtain that ≃∂(\oc)N is consistent,
without any additional condition on the semiring S:
Corollary 8.6**.**
If ϵ≃∂(\oc)Nϵ′
(in particular ϵ,ϵ′∈S⟨(\oc)N⟩)
then NF(ϵ)=NF(ϵ′).
We can moreover show that the normal form of a Taylor normalizable
term is obtained as the limit of the parallel left reduction strategy.
Let us first precise the kind of convergence we consider.
With the notations of Subsection 2.3, we say a sequence
ξ=(ξn)n∈N∈(SX)N
of vectors converges to ξ′ if, for all x∈X there exists
nx∈N such that, for all n≥nx, ξn,x=ξx′.
In other words we consider the product topology on SX,
S being endowed with the discrete topology.
Similarly to the notion of summability,
this notion of convergence coincides with that induced
by the linear topology on SX associated
with the maximal finiteness structure P(X) on X:
in this particular case, a base of neighbourhoods of [math] is given by the sets
{ξ∈SX;∣ξ∣∩X′=∅}
for X′∈P(X)⊥=Pf(X),
or equivalently by the the sets
{ξ∈SX;x∈∣ξ∣}
for x∈X.
The parallel left reduction strategy on resource vectors is defined as follows.
Definition 8.7**.**
We define the left reduct of a resource expression inductively as follows:
[TABLE]
This is extended to finite sums of resource expressions by linearity:
L(∑i=1nei)=∑i=1nL(ei).
Lemma 8.8**.**
For all resource expression e∈(\oc)Δ,
e⇒(1)L(e).
Proof 8.9**.**
Easy by induction on e.
In particular NF(e)=NF(L(e)) for all e∈(\oc)Δ.
By Lemma 6.17, we moreover obtain
that if e′∈∣L(e)∣ then
s(e)≤4s(e′) and fv(e)=fv(e′).
As a consequence
(L(e))e∈(\oc)Δ is summable.
For all ϵ∈S(\oc)Δ, we set
[TABLE]
and obtain a linear-continuous map on resource vectors.
For all ϵ∈S(\oc)Δ, we write ϵ↾(\oc)N
for the projection of ϵ on normal resource expressions:
ϵ↾(\oc)N:=∑e∈(\oc)Nϵe.e∈S(\oc)N.
We obtain:
Theorem 8.9**.**
For all normalizable resource vector ϵ∈S⟨(\oc)N⟩,
(Lk(ϵ)↾(\oc)N)k∈N
converges to NF(ϵ) in S(\oc)N.
Proof 8.10**.**
Fix e′∈N.
Since ∣ϵ∣∈(\oc)N,
E:=∣ϵ∣∩↑e′ is finite.
Let k′ be such that Lk′(e) is normal
for all e∈E.
Then NF(ϵ)e′=∑e∈∣ϵ∣ϵe.NF(e)e′=∑e∈Eϵe.NF(e)e′=∑e∈Eϵe.Lk′(e)e′.
Moreover, by the linear-continuity of Lk
on resource vectors,
(Lk(ϵ)↾(\oc)N)e′=Lk(ϵ)e′=∑e∈Δϵe.Lk(e)e′=∑e∈Eϵe.Lk(e)e′=∑e∈Eϵe.Lk′(e)e′.
Observe that the projection on normal expressions is essential:
Example 8.11**.**
Consider the looping term Ω:=(λx(x)x)λx(x)x:
one can check that NF(τ(Ω))=τ(Ω)↾N=0,
but it will follow from the results of subsection
8.2 that Lk(τ(Ω))=τ(Ω)=0 for all k∈N.
Analyzing this phenomenon was fundamental in the characterization of strongly
normalizable λ-terms by a finiteness structure on resource terms,
obtained by Pagani, Tasson and the author [PTV16].
8.2. Taylor normalizable terms
It is possible to transfer some of the good properties of reduction on
normalizable vectors to those algebraic λ-terms that have a normalizable Taylor
expansion.
More precisely, we say M∈ΛS is Taylor normalizable if
T(M)∈(\oc)N.
Then:
Lemma 8.12**.**
Assume M,M′∈ΛS are such that M⇒βM′.
Then M is Taylor normalizable iff M′ is Taylor normalizable.
Proof 8.13**.**
First observe that by Lemma 7.13,
we have T(M)⇒∂T(M)T(M′) in
BΔ.
Moreover observe that B⟨N⟩ is nothing but
N.
Assume M is Taylor normalizable, i.e.T(M)∈N:
by Lemma 8.4, T(M′)∈B⟨N⟩,
i.e.M′ is Taylor normalizable.
Conversely, assume M′ is Taylor normalizable and
let s′′∈N and S:=T(M)∩↑s′′:
we prove S is finite.
Fix an enumeration (sk)k∈K∈SK of S:
S={sk;k∈K}.
Since T(M)⇒∂T(M)T(M′), we have
T(M)={ti;i∈I} and
T(M′)=⋃i∈I∣τi′∣ with ti⇒∂τi′ for all i∈I.
Now for all k∈K, there exists i∈I such that
sk=ti. Since sk≥∂s′′, τi′=0
and we can fix sk′∈∣τi′∣⊆T(M′)
such that sk∂sk′≥∂s′′.
Since T(M′)∈N, the set {sk′;k∈K} is finite.
Then S⊆{s∈Δ;k∈K, s(h(M))sk′}
which is finite by Lemma 6.17.
The consistency of β-reduction on Taylor normalizable terms follows.
Theorem 8.13**.**
Assume M,M′∈ΛS are such that M≃βM′.
Then M is Taylor normalizable iff M′ is Taylor normalizable,
and in this case NF(τ(M))=NF(τ(M′)).222222
In the standard terminology of denotational semantics,
Theorem 5 expresses
the soundness of NF(τ(⋅)) on
Taylor normalizable terms.
Proof 8.14**.**
The first part is a direct corollary of Lemma 8.12.
By Lemma 7.10, it follows that
M≃∂(\oc)NM′, and then we conclude by Corollary
8.6.
In other words, when restricted to Taylor normalizable terms,
the normal form of Taylor expansion is a valid notion of denotation.
Remark that, in general, it is not possible to generalize this result to those
terms M such that τ(M) is normalizable because of the interaction
with coefficients:
consider, e.g., 0≃τ(I)∞x+(−1).(I)∞x⇒β∞x+(−1).(I)∞x, and observe that
τ(∞x+(−1).(I)∞x)∈S⟨N⟩.
Definition 8.15**.**
We define the left reduct of an algebraic λ-term inductively as follows:
[TABLE]
Observe that this definition is exhaustive by Fact
3.
It should be clear that M⇒βL(M) for all term M,
and that L(M)=M when M is in normal form
(although the converse may not hold).
Now we can establish that L commutes with Taylor expansion.
Lemma 8.16**.**
For all σ∈SΔ, L(σ\oc)=L(σ)\oc.
Proof 8.17**.**
First observe that by the definition of L and
the linear-continuity of both L and the monomial construction,
for all σ1,…,σn∈SΔ, we have
L([σ1,…,σk])=[L(σ1),…,L(σk)].
In particular, L(σk)=L(σ)k.
We deduce that
L(σ\oc)=L(∑k∈Nk!1.σk)=∑k∈Nk!1.L(σ)k=L(σ)\oc, by the linear-continuity of L.
Lemma 8.18**.**
For all M∈ΛS, L(τ(M))=τ(L(M)).
Proof 8.19**.**
By induction on the definition of L(M):
in addition to the inductive hypothesis
and the linear-continuity of L, we use
Lemma 8.16 in the case of a head variable,
and Lemmas 4.4,
4.5 and
8.16
in the case of a head β-redex.
For all Taylor normalizable term M,
the sequence of normal resource vectors
(τ(Lk(M))↾N)k∈N
converges to NF(τ(M)) in SN.
This property is very much akin to the fact that the Böhm tree BT(M) of
a pure λ-term M is obtained as the limit (in an order theoretic sense)
of normal form approximants of the left reducts of M.
This analogy will be made explicit in Section 9.
Before that, we apply our results to normalizable algebraic λ-terms.
8.3. Taylor expansion and normalization commute on the nose
By a general standardization argument, we can show that parallel reduction is a
normalization strategy:
Lemma 8.20**.**
An algebraic λ-term M is normalizable iff there exists k∈N,
such that Lk(M)=NF(M).
Proof 8.21**.**
Recall that we consider algebraic λ-terms up to ≃+ only.
Then one can for instance use the general standardization technique
developed by Leventis for a slightly different presentation of the calculus
[Lev16].
A direct consequence is that M normalizes iff the judgement M⇓
can be derived inductively by the following rules:232323
Moreover, it seems natural to conjecture that if M⇓ then M (or,
rather, its ≃v-class) is normalizable in the sense of Alberti
[Alb14], and then the obtained normal forms are the same (up to
≃v).
In the remaining of this subsection, we prove that normalizable algebraic
λ-terms are Taylor normalizable, using a reducibility technique:
like in Ehrhard’s work for the typed case [Ehr10], or
our previous work for the strongly normalizable case [PTV16],
(\oc)N is the analogue of a reducibility candidate.
We prove each key property (Lemmas 8.22
to 8.29)
using the family of structures (\oc)Nd
rather than (\oc)N directly: this will be useful in section
9, while
the corresponding results for (\oc)N are immediately derived from those.
Lemma 8.22**.**
If S∈Nd then λxS∈Nd.
Proof 8.23**.**
Let t′∈Nd and t∈(λxS)∩↑t′.
Necessarily, t=λxs and t′=λxs′ with s∈S∩↑s′
which is finite by assumption.
Lemma 8.24**.**
If S∈Nd then
S\oc∈\ocNd+1.
Proof 8.25**.**
Let t′∈\ocNd+1 and t∈S\oc∩↑t′.
Write n=#t′.
Without loss of generality, we can write
t=[t1,…,tn] and
t′=[t1′,…,tn′] so that
ti≥∂ti′ and ti′∈Nd, for all i∈{1,…,n}.
Since t∈S\oc, each ti∈S.
Since S∈Nd, ti′ being fixed, there are finitely
many possible values for each ti.
Lemma 8.26**.**
If T1,…,Tn∈\ocNd then
⟨x⟩T1⋯Tn∈Nd.
Proof 8.27**.**
Let t′∈Nd and
t∈(⟨x⟩T1⋯Tn)∩↑t′.
Necessarily, t=⟨x⟩t1⋯tn and t′=⟨x⟩t1′⋯tn′
and, for each i∈{1,…,n}, ti∈Ti, ti≥∂ti′ and
ti′∈\ocNd: since Ti∈\ocNd,
there are finitely many possible values for each ti.
Corollary 8.28**.**
If T1,…,Tn∈Nd then
⟨x⟩T1\oc⋯Tn\oc∈Nd+1.
Lemma 8.29**.**
If
⟨∂xS⋅T0⟩T1⋯Tn∈Nd
then
⟨λxS⟩T0T1⋯Tn∈Nd.
Proof 8.30**.**
Let u′∈Nd,
and let u∈(⟨λxS⟩T0T1⋯Tn)∩↑u′.
In other words, u′∈∣NF(u)∣ and we can write
u=⟨λxs⟩t0t1⋯tn
with s∈∣S∣ and ti∈Ti for i∈{0,…,n}.
Write v=⟨∂xs⋅t0⟩t1⋯tn:
Corollary 3.4 entails
v≥∂u′, hence
we have v∈(⟨∂xS⋅T0⟩T1⋯Tn)∩↑u′.
By assumption, there are finitely many possible values for v.
Then, v being fixed, by Lemma 3.4,
we have fv(u)=fv(v) and s(u)≤2s(v)+2, hence
there are finitely many possible values for u.
Theorem 8.30**.**
If M is normalizable, then T(M)∈N,
and τ(M)∈S⟨N⟩.
Proof 8.31**.**
By induction on the derivation of M⇓:
Lemma 8.22,
Corollary 8.28 and
Lemma 8.29
respectively entail the translation
of the first three inductive rules through Taylor expansion.
The other three follow from the fact that N
is a resource structure (because it is a finiteness structure).
It remains to prove that in this case, τ(NF(M)) is indeed
the normal form of τ(M).
Theorem 8.31**.**
If M is normalizable, then NF(τ(M))=τ(NF(M)).
Proof 8.32**.**
By Theorem 7, M is Taylor normalizable.
Then Theorem 5 entails
NF(τ(M))=NF(τ(NF(M)))=τ(NF(M)).
8.4. Conservativity
The restriction to normalizable vectors allows us to prove
an analogue of Lemma 7.24,
without any assumption on the semiring of scalars.
Lemma 8.33**.**
Let M,N∈Λ be normalizable.
Then M≃∂NN iff M≃βN.
Proof 8.34**.**
Assume M≃∂NN.
By Corollary 8.6,
we have NF(τ(M))=NF(τ(M′)).
By Theorem 8,
we obtain NF(M)≃τNF(M′).
Since M and N are pure λ-terms,
we deduce NF(M)=NF(N)
from the injectivity of τ on Λ.
The reverse direction is similar to Theorem
5
and does not depend on M and N being pure λ-terms:
apply Lemmas 7.10,
8.4 and
8.12
to the reduction path from M to N
We can adapt this result to non-normalizing pure λ-terms
thanks to previous work by Ehrhard and Regnier:242424
We could as well rely on Theorem 9,
to be proved in the next section.
For all pure λ-term M∈Λ,
T(M)∈N
and NF(τ(M))=τ(BT(M))
where BT(M) denotes the Böhm tree of M.
Here Böhm tree is to be understood as generalized normal form for left β-reduction.
In particular it does not involve η-expansion. More formally,
the Böhm tree of a λ-term is the possibly infinite tree obtained
coinductively as follows:
•
if M is head normalizable and its head normal form is
λx1⋯λxn(x)N1⋯Nk
then BT(M):=λx1⋯λxn(x)BT(N1)⋯BT(Nk)
•
otherwise BT(M):=⊥, where ⊥ is a constant
representing unsolvability.
Taylor expansion can be generalized to Böhm trees [ER06], setting in
particular τ(⊥)=0: this is still injective.
Lemma 8.35**.**
If M,N∈Λ and M≃∂NN
then BT(M)=BT(N).
Proof 8.36**.**
By Corollary 8.6,
we have NF(τ(M))=NF(τ(M′)).
By Theorem 8.34,
we obtain τ(BT(M))=τ(BT(N)).
We conclude since τ is injective on Böhm trees.
In the next and final section, we prove a generalization of
Theorem 8.34 to
the non-uniform setting
which is made possible by the results
we have achieved so far.
9. Normal form of Taylor expansion, façon Böhm trees
The Böhm tree construction is often introduced as the limit of an increasing sequence
(BTd(M))d∈N of finite normal form approximants,
aka finite Böhm trees, where BTd(M) is defined inductively as
follows:
•
BT0(M)=⊥;
•
if M is head normalizable and its head normal form is
λx1⋯λxn(x)N1⋯Nk
then BTd+1(M):=λx1⋯λxn(x)BTd(N1)⋯BTd(Nk)
•
otherwise BTd+1(M):=⊥;
and the order on Böhm trees is the contextual closure of the inequality ⊥≤M for all M.
In this final section of our paper, we show that the normal form of
Taylor expansion operator generalizes this construction to the class
of hereditarily determinable terms: these encompass both all pure λ-terms and
all normalizable algebraic λ-terms, but exclude terms such as ∞x, that
produce unbounded sums of head normal forms. More precisely, we show that any
hereditarily determinable term M is Taylor normalizable, and moreover admits
a sequence of approximants (NAd(M))d∈N, such that
each NAd(M) is an algebraic λ-term in normal form, and the
sequence of normal term vectors (τ(NAd(M)))d∈N
converges to NF(τ(M)).
The results in this section should not hide the fact that the more fundamental
notion is that of Taylor normalizable term, which arises naturally by combining
Taylor expansion with the normalization of resource terms, subject to a
summability condition. We believe this approach is quite robust, and may be
adapted modularly following both parameters: to other systems admitting Taylor
expansion; and to variants of summability, possibly associated with topological
conditions of the semiring of scalars.
By contrast, the definition of hereditarily determinable terms is essentially
ad-hoc.
Its only purpose is to allow us to generalize Theorem
8.34 and support our claim that:
the normal form of Taylor expansion extends the notion of Böhm tree
to the non-uniform setting.
9.1. Taylor unsolvability
In the ordinary λ-calculus, head normalizable terms are exactly those with a
non trivial Böhm tree. This is reflected via Taylor expansion: it is easy to check that
NF(τ(M))=0 iff M has no head normal form.
In the non uniform setting, a similar result holds, although
we need to be more careful about the interplay between reduction and coefficients.
Definition 9.1**.**
We say an algebraic λ-term M (resp. simple term S)
is weakly solvable if the judgement M⇓w
can be derived inductively by the following rules:
It should be clear that, if M is a pure λ-term, M⇓w iff M is
head normalizable. In the general case, we show that M⇓w
iff normalizing the Taylor expansion of M yields a non trivial result.
More formally:
Definition 9.2**.**
We say an algebraic λ-term M∈ΛS is Taylor unsolvable
and write M⇑ if NF(s)=0 for all s∈T(M).
In particular, if M⇑ then τ(M)∈S⟨N⟩
and NF(τ(M))=0: indeed,
∣τ(M)∣⊆T(M).
Beware that the reverse implication does not hold in general.
We can then show that M⇓w iff M is Taylor solvable
(Lemmas 9.3 and 9.5).
Lemma 9.3**.**
If there exists s∈T(M) such that NF(s)=0
then M⇓w.
Proof 9.4**.**
We prove by induction on k∈N then on M∈ΛS
that if Lk(s) contains a normal resource term
and s∈T(M) then M⇓w.
If M=(x)M1⋯Mn we conclude directly.
If M=λxT then s=λxt with t∈T(T):
necessarily Lk(t) contains a normal resource term
and by induction hypothesis we obtain T⇓w hence
M⇓w.
If M=(λxT)M0M1⋯Mn
then s=⟨λxt⟩s0s1⋯sn
with t∈T(T) and si∈T(Mi)\oc for
i∈{0,…,n}. Necessarily k>0 and there is
s′∈∣L(s)∣=∣⟨∂xt⋅s0⟩s1⋯sn∣
such that Lk−1(s′)
contains a normal resource term. By Lemma 4.5,
s′∈T((T[M0/x])M1⋯Mn):
we obtain (T[M0/x])M1⋯Mn⇓w
by induction hypothesis, and then M⇓w.
If M=a.N, M=N+P or M=P+N with s∈T(N)
then we obtain N⇓w by induction hypothesis,
and then M⇓w.
Lemma 9.5**.**
If M⇓w, then there exists s∈T(M) such that
NF(s)=0.
Proof 9.6**.**
By induction on the derivation of M⇓w.
If M=(x)M1⋯Mn,
set s=⟨x⟩[]⋯[] (x applied n times
to the empty monomial): s∈T(M) and s is normal.
If M=λxT with T⇓w: by induction hypothesis, we obtain
t∈T(T) with NF(t)=0 and set s=λxt.
If M=λxTM0M1⋯Mn and M′=(T[M0/x])M1⋯Mn
with M′⇓w, the induction hypothesis gives
s′∈T(M′) such that NF(s′)=0.
By Lemma 4.5, there exist t∈T(T)
and ui∈T(Mi)\oc for i∈{0,…,n} such that
s′∈∣⟨∂xt⋅u0⟩u1⋯un∣.
We then set s=⟨λxt⟩u0⋯un.
If M=a.N, M=N+P or M=P+N with N⇓w: the induction hypothesis
gives s∈T(N)⊆T(M) with NF(s)=0
directly.
Taylor unsolvable terms are thus exactly those that are not weakly solvable.252525
If we restrict to non-deterministic λ-terms
(i.e. only add a sum operator to the usual λ-term constructs)
then we obtain M⇑ iff NF(T(M))=∅,
which states the adequacy of NF(T(⋅)) for
the observational equivalence associated with may-style head normalization.
They are moreover stable under ≃β:
Lemma 9.7**.**
If M⇒βM′ then M⇑ iff M′⇑.
Proof 9.8**.**
If E⊆(\oc)Δ,
we write NF(E):=⋃{∣NF(e)∣;e∈E}.
We leave as an exercise to the reader the proof that
NF(T(M))=NF(T(M′))
as soon as M⇒βM′: this is the analogue of Lemma
8.4 on Taylor supports
(in particular there is no summability condition, and scalars
play absolutely no rôle).
9.2. Hereditarily determinable terms
The Böhm tree construction is based on the fact that, for a pure λ-term M,
either M is unsolvable, or it reduces to a head normal form; and then the
same holds for the arguments of the head variable.
We will be able to follow a similar construction for the class of hereditarily
determinable terms: intuitively, a simple term is in determinate form if it is
either unsolvable or a head normal form; and a term is hereditarily
determinable if it reduces to a sum of determinate forms, and this holds
hereditarily in the arguments of head variables. Formally:
Definition 9.9**.**
Let M∈ΛS be an algebraic λ-term.
We say M is d-determinable if the judgement M⇓d
can be derived inductively from the following rules:
We say M is hereditarily determinable and write M⇓ω
if M⇓d for all d∈N.
We say M is in d-determinate form and write Mdfd
if M⇓d is derivable from the above rules excluding the
last one.
It should be clear that M⇓ implies M⇓ω.
Observing that M⇑ for all unsolvable pure λ-terms (i.e. those pure λ-terms having no head normal form), we moreover obtain
M⇓ω for all M∈Λ.
We can already prove that hereditarily determinable terms are Taylor normalizable:262626
Observe that this fails if we replace T(M) with
∣τ(M)∣ in the definition of M⇑:
write I:=λxx and
consider, e.g., M=(λx(I)(x+(−1).∞y))∞y
which head-reduces to (I)(∞y+(−1).∞y)≃τ(I)0,
with (I)0⇑ but of course τ(M)∈N0.
The very same problem would occur if we were to consider terms up to ≃v.
Lemma 9.10**.**
If M⇓d then T(M)∈Nd.
If moreover M⇓ω then T(M)∈N.
Proof 9.11**.**
The second fact follows directly from the first one,
which we prove by induction on the derivation of M⇓d:
we use the definition of M⇑ for the base case,
and rely on Lemma 8.22,
Corollary 8.28,
Lemma 8.29,
or the fact that Nd is a resource structure
to establish the induction in the other cases.
On the other hand, there are Taylor normalizable terms that do not follow this
pattern: intuitively, hereditarily determinable terms rule out any
representation of an infinite sum of head normal forms,
whereas Taylor normalizability allows to represent an infinite sum of normal forms
as long as their Taylor expansions are pairwise disjoint.
More formally:
Example 9.12**.**
Write s0:=λxx,
and sn+1:=λxsn.
Let Mstep=λyλzz+λyλzλx(y)yz and then
Mloop=(Mstep)Mstepλxx.
Write u=λyλzz and
vn,k=λyλzλx⟨y⟩ynzk so that
T(Mstep)={u}∪{vn,k;n,k∈N}.
Let s∈T(Mloop) be such that NF(s)=0:
a simple inspection shows that either s=⟨u⟩[][s0]
and then NF(s)=s0,
or s=⟨vn,1⟩[v0,1,…,vn−1,1,u][s0]
and then NF(s)=sn+1.
It follows that Mloop is Taylor normalizable.
On the other hand, observe that L2(Mloop)=λxx+λxMloop, which is not 1-determinate:
hence no L2k(Mloop) is 1-determinate and
it will follow from Lemma 9.15
that Mloop is not 1-determinable.
Hence hereditarily determinable terms form a strict subclass of Taylor
normalizable terms, containing both pure λ-terms and normalizable algebraic
λ-terms.
For each level d∈N, the class of d-determinable terms (resp. of
d-determinate terms) is moreover stable under left reduction:
Lemma 9.13**.**
If M⇓d (resp. Mdfd)
then L(M)⇓d (resp. L(M)dfd).
Proof 9.14**.**
We give the proof for d-determinable terms,
by induction on the derivation of M⇓d:
the case of d-determinate terms is similar, except
that we do not consider head redexes.
If d=0 the result is direct. Otherwise, write d=d′+1.
If M⇑ then L(M)⇑
by Lemma 9.7,
and we conclude directly.
If M=λxS with S⇓d: by induction hypothesis
L(S)⇓d, and then
λxL(S)⇓d.
If M=(x)M1⋯Mn
with Mi⇓d′ for i∈{1,…,n}:
by induction hypothesis L(Mi)⇓d′
for i∈{1,…,n}, and then
(x)L(M1)⋯L(Mn)⇓d.
If M=(λxS)M0M1⋯Mn
with (S[M0/x])M1⋯Mn⇓d
then we conclude directly since
L(M)=(S[M0/x])M1⋯Mn.
If M=a.N with N⇓d: by induction hypothesis
L(N)⇓d, and then
a.L(N)⇓d.
If M=N+P with N⇓d and P⇓d: by induction hypothesis
L(N)⇓d and L(P)⇓d,
and then L(N)+L(P)⇓d.
Now we can formally prove that applying the parallel left reduction strategy to
d-determinable terms does reach d-determinate forms.
Lemma 9.15**.**
If M⇓d then there exists k∈N
such that Lk(M)dfd.
Proof 9.16**.**
By induction on the derivation of M⇓d.
If d=0 or M⇑, then Mdfd.
If M=λxS with S⇓d:
by induction hypothesis, we have k∈N such that
Lk(S)dfd
and then
Lk(M)=λxLk(S) hence Lk(M)dfd.
If M=(x)M1⋯Mn with d>0 and Mi⇓d−1 for each i∈{1,…,n}:
by induction hypothesis, we obtain ki∈N such that
Lki(Mi)dfd−1
for each i∈{1,…,n}. Let k=max{ki;1≤i≤n}:
by Lemma 9.13, we also have
Lk(Mi)dfd−1 for all i∈{1,…,n}.
Since
Lk(M)=Lk((x)M1⋯Mn)=(x)Lk(M1)⋯Lk(Mn) we conclude that
Lk(M)dfd.
If M=(λxS)M0M1⋯Mn
with (S[M0/x])M1⋯Mn⇓d:
by induction hypothesis, we have k0∈N such that
Lk0((S[M0/x])M1⋯Mn)dfd.
It is then sufficient to observe that
L(M)=(S[M0/x])M1⋯Mn
and set k=k0+1.
If M=a.N with N⇓d:
by induction hypothesis, we have k∈N such that
Lk(S)dfd
and then
Lk(M)=a.Lk(S) hence Lk(M)dfd.
If M=N+P with N⇓d and P⇓d:
by induction hypothesis, we have k0,k1∈N such that
Lk0(N)dfd
and
Lk1(P)dfd
and then, setting k=max(k0,k1),
Lk(M)=Lk(N)+Lk(P) hence Lk(M)dfd by the previous lemma.
9.3. Approximants of the normal form of Taylor expansion
Now we introduce the analogue of finite Böhm trees for hereditarily
determinable terms:
Definition 9.17**.**
If M⇓d then we define the
normal d-approximantNAd(M) of M inductively as follows:
NAd(M):=0 if d=0 or M⇑, and
[TABLE]
otherwise.
First observe that d approximants are stable under parallel left reduction:
Lemma 9.18**.**
If M⇓d then NAd(M)=NAd(L(M)).
Proof 9.19**.**
Recall indeed that, by Lemma 9.13,
L(M)⇓d so that NAd(L(M))
is well defined.
The proof is then straightforward, by induction on M⇓d.
We do not prove here that d-determinable terms and the associated
d-approximants are stable under arbitrary reduction:
if M⇓d and M⇒βM′ then M′⇓d
and then NAd(M)=NAd(M′).
We believe it is a very solid conjecture, but it would require us to develop
a full standardization argument: in our non-deterministic setting, this is
known to be tedious at best [Alb14, Lev16].
Since we introduced hereditarily determinable terms ad-hoc, only to be
able to define normal d-approximants, we feel that the general
study of their computational behaviour is not worth the effort.
Our next step is to show that if M is in d+1 determinate form,
then τ(M)↾Nd depends only on NAd+1(M).
Lemma 9.20**.**
If Mdfd+1
then, for all s∈Nd, τ(M)s=τ(NAd+1(M))s.
Proof 9.21**.**
By induction on the derivation of Mdfd+1,
writing M′=NAd+1(M).
If M⇑ then M′=0 and
τ(M)s=0 for all s∈N,
hence the result holds.
If M=λxT with Tdfd+1 then
M′=λxNAd+1(T)
and we can assume s=λxt:
otherwise τ(M)s=0=τ(M′)s.
Then t∈Nd and by induction hypothesis
τ(M)s=τ(T)t=τ(NAd+1(T))t=τ(M′)s.
If M=(x)N1⋯Nn with Nidfd
for all i∈{1,…,n} then
M′=(x)N1′⋯Nn′ with Ni′=NAd(Ni)
and we can assume s=⟨x⟩t1⋯tn:
otherwise τ(M)s=0=τ(M′)s.
If d=0, s∈N0, hence n=0 and then M=x=M′.
Otherwise write d=d′+1. For each i∈{1,…,n},
ti⊆Nd′.
By induction hypothesis we obtain
τ(Ni)u=τ(Ni′)u
for all u∈ti: it follows that
τ(Ni)ti\oc=τ(Ni′)ti\oc
by the definition of promotion. Then
τ(M)s=∏i=1nτ(Ni)ti=∏i=1nτ(Ni′)ti=τ(M′)s.
If M=a.N with Ndfd+1 then
τ(M)s=a.τ(N)s=a.τ(NAd+1(N))s=τ(M′)s by induction hypothesis.
Similarly, if M=N+P with Ndfd+1 and Pdfd+1 then
τ(M)s=τ(N)s+τ(P)s=τ(NAd+1(N))s+τ(NAd+1(P))s=τ(M′)s
by induction hypothesis.
We obtain our final theorem:
Theorem 9.21**.**
For all hereditarily determinable term M,
the sequence
(τ(NAd(M)))d∈N
of normal vectors
converges to NF(τ(M)) in SN.
Proof 9.22**.**
First observe that each
τ(NAd(M))∈SN, because
NAd(M) is in normal form. Let s∈N
and fix d≥d(s)+1:
by Lemmas 9.13,
9.15 and
9.18,
there exists k0∈N such that
Lk(M)dfd and NAd(Lk(M))=NAd(M)
whenever k≥k0.
By Lemma 9.20, we moreover have
τ(NAd(M))s=τ(NAd(Lk(M)))s=τ(Lk(M))s.
It follows that τ(NAd(M))s=NF(τ(M))s,
by Theorem 6.
Since this holds for any d≥d(s)+1, we have just proved that
(τ(NAd(M))s)d∈N converges to NF(τ(M))s,
for the discrete topology.
In the case of pure λ-terms, by identifying [math] with the unsolvable Böhm tree
⊥, it should be clear that the sequence (NAd(M))d∈N is nothing but the increasing sequence of finite
approximants of BT(M): Theorem 9 is thus
a proper generalization of Theorem 8.34
of which it provides a new proof.
Bibliography40
The reference list from the paper itself. Each links out to its DOI / PubMed record.
1[AD 08] Pablo Arrighi and Gilles Dowek. Linear-algebraic lambda-calculus: higher-order, encodings, and confluence. In Andrei Voronkov, editor, Rewriting Techniques and Applications, 19th International Conference, RTA 2008, Hagenberg, Austria, July 15-17, 2008, Proceedings , volume 5117 of Lecture Notes in Computer Science , pages 17–31. Springer, 2008.
2[Alb 14] Michele Alberti. On operational properties of quantitative extensions of λ 𝜆 \lambda -calculus . Ph D thesis, Aix Marseille Université ; Università di Bologna, December 2014.
3[BEM 07] Antonio Bucciarelli, Thomas Ehrhard, and Giulio Manzonetto. Not enough points is enough. In Computer Science Logic , volume 4646 of Lecture Notes in Computer Science , pages 298–312. Springer Berlin, 2007.
4[Bou 93] Gérard Boudol. The lambda-calculus with multiplicities (abstract). In CONCUR ’93: Proceedings of the 4th International Conference on Concurrency Theory , pages 1–6, London, UK, 1993. Springer-Verlag.
5[CA 18] Jules Chouquet and Lionel Vaux Auclair. An application of parallel cut elimination in unit-free multiplicative linear logic to the taylor expansion of proof nets. In Dan R. Ghica and Achim Jung, editors, 27th EACSL Annual Conference on Computer Science Logic, CSL 2018, September 4-7, 2018, Birmingham, UK , volume 119 of LIP Ics , pages 15:1–15:17. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 2018.
6[Car 11] Alberto Carraro. Models and theories of pure and resource lambda calculas . Ph D thesis, 2011. Thèse de doctorat dirigée par Salibra, Antonino et Bucciarelli, Antonio Informatique Paris 7 2011.
7[CES 10] Alberto Carraro, Thomas Ehrhard, and Antonino Salibra. Exponentials with infinite multiplicities. In Anuj Dawar and Helmut Veith, editors, Computer Science Logic, 24th International Workshop, CSL 2010, 19th Annual Conference of the EACSL, Brno, Czech Republic, August 23-27, 2010. Proceedings , volume 6247 of Lecture Notes in Computer Science , pages 170–184. Springer, 2010.
8[d C 08] Daniel de Carvalho. Execution time of lambda-terms via denotational semantics and intersection types. Technical report, 2008. Rapport de recherche INRIA n° 6638.