# Geometry of Resource Interaction - A Minimalist Approach

Marco Solieri

<figure><img src="image_1.png" /></figure>

## To cite this version:

Marco Solieri. Geometry of Resource Interaction - A Minimalist Approach. Electronic Proceedings in Theoretical Computer Science, 2015, Proceedings Third International Workshop on Linearity - Vienna, Austria, 13th July, 2015, pp.79-94. 10.4204/EPTCS.176.7. hal-01091754

HAL Id: hal-01091754

https://sorbonne-paris-nord.hal.science/hal-01091754

Submitted on 30 Mar 2015

HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

<figure><img src="image_2.png" /></figure>
# Geometry of Resource Interaction – A Minimalist Approach

Marco Solieri *†

Université Paris 13, Sorbonne Paris Cité – Laboratoire d'Informatique de Paris-Nord, CNRS – Villetaneuse, France
Università di Bologna – Dipartimento di Informatica, Scienza e Ingegneria, INRIA – Bologna, Italy

ms@xt3.it

The Resource $\lambda$-calculus is a variation of the $\lambda$-calculus where arguments can be superposed and must be linearly used. Hence it is a model for linear and non-deterministic programming languages, and the target language of Taylor-Ehrhard expansion of $\lambda$-terms. In a strictly typed restriction of the Resource $\lambda$-calculus, we study the notion of path persistence, and we define a Geometry of Interaction that characterises it, is invariant under reduction, and counts addends in normal forms.

## Introduction

**Geometry of Interaction** The dynamics of $\beta$-reduction or cut elimination can be described in a purely geometric way —studying paths in the graphs that represent terms or proofs, and looking at those which are persistent, i.e. that have a residual path in any reduct. The quest for an effective semantical characterisation of persistence separately produced three notions of paths: legality, formulated by topological conditions about symmetries on some cycles [2]; consistency, expressed similarly to a token-machine execution [10] and developed to study the optimal reduction; and regularity, defined by a dynamic algebra [9, 5]. The notions are equivalent [1], and their common core idea —describing computation by local and asynchronous conditions on routing of paths— inspired the design of efficient parallel abstract machines [11, 13, for instance]. More recently, the Geometry of Interaction (GoI) approach has been fruitfully employed for semantical investigations which characterised quantitative properties of programs, mainly the complexity of their execution time [3].

**Taylor-Ehrhard expansion of $\lambda$-terms and the Resource Calculus** Linear Logic's decomposition of the intuitionistic implication unveiled the relation between the algebraic concept of linearity to the computational property of a function argument to be used exactly once. Such a decomposition was then applied not only at the level of types, but also at the level of terms, in particular extending the $\lambda$-calculus with differential constructors and linear combinations of ordinary terms [6]. These constructions allow to consider the complete Taylor expansion of a term, i.e. the infinite series of all the approximations of the reduction of a term, which was thus shown to commute with computation of Böhm trees. The ideal target language for the expansion was isolated as the Resource $\lambda$-calculus (RC), which is a promotion-free restriction of the Differential $\lambda$-calculus [7]. Taylor-Ehrhard expansion originated various investigations on quantitative semantics, using the concept of power series for describing program evaluation, and has been applied in various non-standard models of computation, e.g. [4, 12, for instance].

**Aim and results** How can the two aforementioned semantics approaches interact? What is the relation between the GoI's execution formula and the expansion of $\beta$-reduction? We present the first steps

<footnote>*The author is deeply grateful to Michele Pagani and Stefano Guerrini for their advice.</footnote>

<footnote>†Partially supported by the ANR project ANR-2010-BLAN-021301 LOGOI.</footnote>
towards this direction. After having concisely introduced RC (§1), we consider the Resource Interaction Nets (RINs), that are the type-restricted translation of resource terms into Differential Interaction Nets (§2). We then study the appropriate notion of paths (§3), extending the notion of persistence to paths in RINs dealing with the fact that the reduct of a term *t* is a sum of nets *t*₁ + ... + *t*ₙ. In particular, we observe that every path of *t*ᵢ has to be a residual of some path in *t*, and that the reduction strongly normalises. Thus, we say a path of *t* to be persistent whenever it has a residual in at least one of the addends of the reduct of *t*. Restricting the calculus to the constant type, whose only inhabitant is the value ⋆, we have *t* → ⋆ + ... + ⋆. Now there is only one persistent path of ⋆, the trivial one, therefore we prove that persistent paths of *t* are as many as persistent paths of its normal form (Theorem 1). Furthermore, we define a suitable GoI for RC, in order to characterise persistence (§4). We define the notion of regularity by τΩ*, an appropriate variant of the Dynamic Algebra, where exponentials (! and ?) become a sort of *n*-ary multiplicatives (resp. ⊗ and ⊙), whose premises are not ordered. Morally, they are the sum of the multiplicatives we obtain by considering all the *n*! permutations of their premises. We show our algebra is invariant under reduction (Theorem 3), from which we obtain the equivalence of persistence to regularity (Theorem 2) and also that the number of addends in a normal form is equal to the number of regular paths (Corollary 1).

**Related works** In a very closely related work by De Falco [8], a GoI construction for DINs is formulated. Besides the similarities in the technical setting of DINs, our formulation turns out to be simpler and more effective, mainly thanks to: (1) the restriction to closed and ground-typed resource nets, (2) the associative syntax we adopted for exponential links, and (3) the stronger notion of path we use. The first simplifies the shape of paths being persistent, because it implies that they are palindrome—they go from the root to the ⋆ and back to the root— and unique in every normal net/term. The second simplifies the management of the exponential links, because it ensures associativity and delimits their dynamics in only one pair of links, while in [8] this property was completely lost and the system more verbose. De Falco uses binary exponential links and introduces a syntactical embedding of the sum in nets by mean of binary links of named sums, and then recover associativity with an equivalence on nets. Compared to ours, their choice results in a drastically more complex GoI construction, even though the paper hints at the extensibility with promotion (corresponding to the full Differential λ-calculus) or even additives. The third ingredient allows us to consider full reduction, i.e. including the annihilating rule, while in [8] a “weak” variant is studied, where this kind of redexes are frozen, and the GoI only characterises the corresponding notion of “weak-persistence”. Indeed, we restrict to paths that cross every exponential in the net (we prove it is always true, in case of persistence), thus whenever *t* → 0 a path necessarily crosses the annihilating redex, and the dynamic algebra is able to detect it.

# 1 Resource calculus

The Resource Calculus is, on one hand, a linear and thus finitary restriction of the λ-calculus: an argument [s] must be used by an application *t*[s] exactly once, i.e. it cannot be duplicated nor erased, so every reduction enjoys strong normalisation. On the other hand, it adds non-determinism to the λ-calculus, because the argument is a finite multiset of ordinary terms. The reduct is then defined as the superposition of all the possible ways of substituting each of the arguments, i.e. a sum. When arguments provided to a function are insufficient or excess the function's request, i.e. the number of variable occurrences, then the computation is deadlocked and the application reduces to 0. We shall omit the “resource” qualification in the terminology.
**Definition 1 (Syntax).** Let $\mathbb{V}$ be the grammar of a denumerable set of variable symbols $x,y,z,\dots$. Then, the set $\Delta$ of the *simple terms* and the set $\Delta!$ of *simple polyterms* are inductively and mutually generated by the following grammars.

$$ (1) \quad \text{Simple terms: } \mathbb{M} ::= \star | \mathbb{V} | \lambda \mathbb{V}. \mathbb{M} | \mathbb{M} \mathbb{B} \qquad \text{Simple polyterms: } \mathbb{B} ::= 1 | [\mathbb{M}] | \mathbb{B} \cdot \mathbb{B} $$

Where: $\star$ is the constant dummy value, brackets delimit multisets, $\cdot$ is the multiset union (associative and commutative), 1 is the empty multiset (neutral element of $\cdot$). So that $([x] \cdot 1) \cdot [y] = [x,y]$. Simple terms are denoted by the lowercase letters of the latin alphabet around $t$, polyterms in uppercase letters around $T$. The set $\mathbb{N}\langle\Delta\rangle$ of terms (resp. the set $\mathbb{N}\langle\Delta!\rangle$ of polyterms) is the set of finite formal sums of simple terms (resp. polyterms) over the semiring $\mathbb{N}$ of natural numbers. We also assume all syntactic constructors of simple terms and polyterms to be extended to sums by (bi-) linearity. E.g. $(\lambda x.(2x+y))[z+4u]$ is a notational convention for $2(\lambda x.x)[z] + 8(\lambda x.x)[u] + (\lambda x.y)[z] + 4(\lambda x.y)[u]$.

**Definition 2 (Reduction).** A redex is a simple term in the form: $(\lambda x.s)T$. Let the free occurrences of $x$ in $s$ be $\{x_1, \dots, x_m\}$. The *reduction* is the relation $\rightarrow$ between polyterms obtained by the context closure and the linear extension to sum of the following elementary reduction rule.

$$ (2) \qquad (\lambda x.s) [t_1, \dots, t_n] \rightarrow \begin{cases} \sum_{\sigma_n \in S_n} s \{t_1/x_{\sigma_n(1)}, \dots, t_n/x_{\sigma_n(n)}\} & \text{if } n = m \\ 0 & \text{if } n \neq m \end{cases} $$

Where $S_n$ denotes the set of permutations of the first $n$ naturals, and $\{t/x\}$ is the usual capture-avoiding substitution. If $t \to^* t' \nrightarrow$, where $\to^*$ is the reflexive transitive closure of $\to$, we write $\text{NF}(t) = t'$.

**Example 1.** Let $I = I' = \lambda x.x$ and also let $t = \lambda f.f_1[f_2[\star]]$. Then $t[I, I'] \rightarrow f_1[f_2[\star]]\{I/f_1, I'/f_2\} + f_1[f_2[\star]]\{I/f_2, I'/f_1\}$ that is $I[I'[\star]] + I'[I[\star]]$, normalising to $I'[\star] + I[\star] \rightarrow 2\star$. Note also a case of annihilation in $t[I] \rightarrow 0$. Finally, observe that if $s = (\lambda x.\star)T \rightarrow \star$ then $T$ must be 1 (otherwise $s \rightarrow 0$).

# 2 Resource nets

A resource net is a graphical representation of a typed term by means of a syntax borrowed from Linear Logic proof nets, where *n*-ary ? links have a symmetrical dual. The exponential modality is however deprived of promotion, so that it merely represents superposition of proofs and contexts.

## 2.1 Pre-nets

**Definition 3 (Links).** Given a denumerable set of symbols called *vertices*, a *link* is a triple $(P,K,C)$, where: $P$ is a sequence of vertices, called *premises*; $K$ is a kind, i.e. an element in the set $\{\star, \to, \to_0, !, ?\}$; $C$ is a singleton of a vertex, called *conclusion*, disjoint from $P$. A link $l = ((u_1, \dots, u_n), \kappa, \{v\})$ will be denoted as $\langle u_1, \dots, u_n (\kappa) v \rangle$, or depicted as in Figure 1. The *polarity* of a vertex associated by a link is an element in $\{\text{in}, \text{out}\}$ and we say they are opposite, and the *arity* of a link is the length of its premises' sequence; both are determined by the link's kind, as shown in Figure 1. When $v \in P(l) \cup C(l)$ for some vertex $v$ and link $l$, we write that $v$ is linked by $l$, or $v \in l$. The exponential links ! and ? whose arity is 0 are respectively called co-weakening and weakening. In the graphical representations, vertices of a link shall be placed following the usual convention for graphs of $\lambda$-calculus (outs on the top, and ins on the bottom); the arrow line shall be used to distinguish the conclusion of a link.
<table><caption>**Figure 1** Links: kind, arity and polarity associated to vertices.</caption><thead><tr><th>v<sup>out</sup></th><th>v<sup>out</sup></th><th>u<sub>2</sub><sup>out</sup></th><th>v<sup>out</sup></th><th>u<sub>1</sub><sup>out</sup></th><th>u<sub>1</sub><sup>in</sup></th><th>u<sub>1</sub><sup>in</sup></th><th>u<sub>n</sub><sup>out</sup></th><th>u<sub>n</sub><sup>in</sup></th></tr></thead><tbody><tr><td>★</td><td>u<sub>2</sub><sup>out</sup></td><td>u<sub>1</sub><sup>in</sup></td><td>u<sub>1</sub><sup>in</sup></td><td>u<sub>1</sub><sup>in</sup></td><td>u<sub>n</sub><sup>in</sup></td><td>u<sub>n</sub><sup>in</sup></td><td>u<sub>1</sub><sup>in</sup> ... u<sub>n</sub><sup>in</sup></td><td>?</td></tr></tbody></table>

**Definition 4 (Types).** A type, or formula, is a word of the grammar given by $T ::= \star | \mathbb{E} \to T$ and $\mathbb{E} ::= !T$, where $\star$ is the only ground type. A typing function $\mathcal{T}$ is a map from vertices to types such that, if $A, B$ are types, then $\mathcal{T}$ respects the following constraints. Constant: $\langle (\star) \star \rangle$. Linear implications: $\langle A, B (\to) A \to B \rangle$ and $\langle A, B (\not\to) A \to B \rangle$. Exponentials: $\langle A, \dots, A (!) !A \rangle$ and $\langle A, \dots, A (?) !A \rangle$.

**Definition 5 (Pre-nets).** A simple pre-net $\mathcal{G}$ is a triple $(V, L, \mathcal{T})$, where $V$ is a set of vertices, $L$ is a set of links and $\mathcal{T}$ a typing function on $V$, such that for every vertex $v \in V$ the followings holds:

1. there are at least one and at most two links $l, l'$ such that $l \ni v \in l'$, and when there is only $l$, then $v$ is called a *conclusion of* $\mathcal{G}$;

2. the set $C(\mathcal{G})$ of conclusions is non empty and when it is the singleton $v$, then $\mathcal{G}$ is called *closed* and $v$ must be out;

3. if $l \ni v \in l'$, then $l, l'$ associate opposite polarities to $v$.

We shall write $V(\mathcal{G})$ to denote the set $V \in \mathcal{G}$. The type of a pre-net $\mathcal{G}$ is the type $T$ associated to its only out conclusion, so we write $\mathcal{G} : T$. The *interface* of a simple pre-net $\mathcal{G}$ is the set $I(\mathcal{G})$ of all ordered pairs $(T, \mathcal{P})$ such that for all $v \in C(\mathcal{G})$, $v$ is of type $T$ and has polarity $\mathcal{P}$. A general pre-net is a linear combination of simple pre-nets $\mathcal{G}_1 + \dots + \mathcal{G}_n$, where for any $1 \le i, j \le n$, we have: $V(\mathcal{G}_i) \cap V(\mathcal{G}_j) = \emptyset$ and $I(\mathcal{G}_i) = I(\mathcal{G}_{i+1})$. We shall simply use 0 to denote each of the empty sums of pre-nets having the same interface $I$, for every interface $I$.

## 2.2 Term translation and net reduction

As the usual translation of the $\lambda$-calculus into MELL proof nets, the $\to$-link is used for translating $\lambda$-abstraction, the $\not\to$-link for application, and the $?\text{-link}$ for contracting together all the occurrences of the same variable. In addition, we use $!\text{-link}$ for polyterm and formal sum of nets for... formal sum of terms.

**Definition 6 (Term translation).** Given a simple term $t$, the translation $[[t]]$ is a pre-net having one out conclusion and a possibly empty set of in conclusions. The translation is defined in Figure 2 where: the final step only adds a $?\text{-link}$ on every occurrence of a free variable $x$, for all free variables of $t$; and the actual work is performed by the $[[t]]$, by induction on the syntax of $t$. Moreover a sum of simple terms is translated to the sum of their translation, i.e.: $[[t_1 + \dots + t_k]] = [[t_1]] + \dots + [[t_k]]$.

Note that a net translation is always defined for simple terms while it is not for general terms, because of possible incompatibility in the interfaces of translated addends.

**Definition 7 (Resource permutations).** Given a simple pre-net $\mathcal{G}$, a *resource permutation* $\sigma_{\mathcal{G}}$ is a total function from the set of $!\text{-links in } \mathcal{N}$ to $\bigcup_n S_n$ such that if a link $l$ has arity $m$, then $\sigma_{\mathcal{N}}(l)$ is an element $\sigma_m$ of $S_m$. We shall also write $\sigma_l$ for $\sigma_{\mathcal{G}}(l)$ and denote the set of resource permutation of $\mathcal{G}$ as $S_{\mathcal{G}}$.
<figure><img src="image_3.png" /><figcaption>**Figure 3** Cut elimination rules: linear implication, and exponential.</figcaption></figure>

<figure><img src="image_4.png" /></figure>

**Definition 8** (Resource net reduction). The redex of a cut $w$ in a simple pre-net is the pair of links having $w$ as conclusion. The simple reduction $\rightarrow$ is the graph-rewriting relation from simple pre-nets to pre-nets defined by the following elementary reduction steps, also depicted in Figure 3, omitting contexts.

$$ (3) \qquad \mathcal{G}, \langle u, v(-\circ)w \rangle, \langle u', v'(-\circ)w \rangle \rightarrow \mathcal{G}[v \equiv v', u \equiv u'] $$

$$ (4) \qquad \mathcal{G}, \langle v_1, \dots, v_n (!)w \rangle, \langle u_1, \dots, u_m (?)w \rangle \rightarrow \begin{cases} \sum_{\sigma_n \in S_n} \mathcal{G}_{\sigma_n}[v_1 \equiv u_{\sigma_n(1)}, \dots, v_n \equiv u_{\sigma_n(n)}] & \text{if } n=m \\ 0 & \text{if } n \neq m \end{cases} $$

Where $\mathcal{G}[v \equiv u]$ denotes the $i$-th copy of the pre-net $\mathcal{G}$, where the vertices $v, u$ have been equated. In such a case, we say then there is a simple reduction step $\rho: \mathcal{G} \rightarrow \mathcal{S}$, where $\mathcal{S}$ is a sum of simple pre-nets and is also written as $\rho(\mathcal{G})$. The reduction is the extension of the simple reduction to formal sums of simple pre-nets: if $\mathcal{G} \rightarrow \mathcal{S}$, then $\mathcal{G} + \mathcal{S}' \rightarrow \mathcal{S} + \mathcal{S}'$. If $\mathcal{G} \rightarrow * \mathcal{S}' \nrightarrow$, we write $\text{NF}(\mathcal{G}) = \mathcal{S}'$.

**Definition 9** (Resource interaction nets). Let $t \in \Delta$ and $[[t]] \rightarrow * \mathcal{S}$, for a sum $\mathcal{S} = N_1 + \dots + N_n$, where each $N_i$ is a pre-net. Then $N_i$ is called a simple resource interaction net and $\mathcal{S}$ a resource interaction net. From now on we shall again avoid to repeat the “resource interaction” naming of nets.

We recall that the net reduction can simulate the term reduction and strongly normalises.

**Example 2.** Consider $\delta = \lambda x.x[x]$ and notice $[[\delta]]$ is not a pre-net, because a typing function on the structure of vertices and links does not exist. Recall the terms $I$ and $t$ from Example 1 and look at Figure 4. On the left extremity: $[[I]]$ is closed and $[[I]]: !\star -\circ \star$. On the middle left: $N: \star$ is not a translation of a term, but it is a net, because $[[t[x,y]]] \rightarrow N$ by eliminating a linear implication cut. Also, $N$ is not a closed net, because it has three conclusions: $v_1, z_1, z_2$. On the right side: an exponential reduction step involving index permutation, that rewrite $N$ into a sum of two normal simple nets. Observe the reduct
is equal to $[x[y[\star]] + y[x[\star]]]$. Consider $[\lambda f.f_1[f_2[\star]]][I,I]]$, that is a closed net of type $\star$, and observe
the reduct $\mathcal{M}$ of the only linear implication cut that is depicted in Figure 5. The normalisation requires:
one exponential step (on the left), two linear implication steps (on the right), and finally four exponential
steps (not showed) to reach the net $\langle(\star)v_1 \equiv v_8\rangle + \langle(\star)v'_1 \equiv v_8\rangle = [[\star+\star]]$.

# 3 Paths

## 3.1 Definitions

We introduce some basic definitions about the paths, where the most notable characterise the paths where
the computation is visible (straightness) in its entirety (maximality and comprehensiveness). This last
notion is the only substantial difference with respect to the classic notion of path as formulated in [5]. A
superficial technical difference is the choice of using concatenation instead of composition as the basic
relation on paths.

**Definition 10 (Path).** Given a simple net $\mathcal{N}$, two vertices $u, w \in \mathcal{N}$ are *linked*, or connected, if there is a link $l \in \mathcal{N}$ s.t. $u, w \in l$. A path $\pi = (v_1, \dots, v_n)$ with $n > 0$ in $\mathcal{N}$ is a sequence of vertices s.t. for all $i < n$, the vertices $v_i, v_{i+1}$ are connected. We call $\pi$ *trivial* if its length is 1; we say $\pi$ *unitary* if it is 2, so that there is only one link crossed by $\pi$.

Moreover, if $\pi$ crosses consecutively the same link $l$ more than once, then $\pi$ is called *bouncing*. If $l$ is not a $\star$-link and $\pi$ crosses $l$ through $v, v'$ such that $v, v' \in C(l)$ or $v, v' \in P(l)$, then $\pi$ is *twisting*. When $\pi$ is both non-bouncing and non-twisting, $\pi$ is *straight*. Moreover, $\pi$ is *maximal* if there is no other path $\pi' \in \mathcal{N}$ s.t. $\pi \sqsubseteq \pi'$, where $\sqsubseteq$ is the prefix order on sequences. Also, $\pi$ is *comprehensive* when it crosses all the premises of all the exponential links. Finally if $\pi$ is both straight and maximal, then $\pi$ is an *execution path*. In a net $\mathcal{S}$, we denote with $E(\mathcal{S})$ (or with $E^+(\mathcal{S})$) the set of execution paths (respectively also comprehensive) in some simple $\mathcal{N}$ addend of $\mathcal{S}$.

Given two paths $\pi, \pi'$ we denote the reversal of $\pi$ as $\pi^{-}$, while the concatenation of $\pi'$ to $\pi$ as $\pi::\pi'$.

We can now concretely aim to define a proper notion of path persistence, that intuitively means
“having a residual”, so first we inspect and define the action of residual of path. The case of linear
implication is straightforward, because the rewriting is local and we only have to ensure that a path
does not partially belong to a redex. The case of exponential, instead, is rather more delicate, because

<figure><img src="image_5.png" /><figcaption>**Figure 4** Example: nets and reduction.</figcaption></figure>
<figure><img src="image_6.png" /><figcaption>**Figure 5** Example: nets reduction. Rightmost reduction is made of four steps, two on each addend.</figcaption></figure>

the rewriting is global: a simple net rewrites to a sum of simple nets, hence a path may be duplicated in several addends or destroyed. Which addends contain the residual(s) of a given crossing? The net reduction consists of the sum of all the permutation of the indices of the !-links (cf. **Definition 8**), thus each addend contains all and only the paths that respect the addend's own permutation, for any crossing of the redex. If a path $\pi$ is persistent, then, there must be a permutation such that $\pi$ always crosses the redex respecting the correspondences fixed by the permutation.

**Definition 11** (Path residual). Given a net $\mathcal{N}$ and a reduction $\rho$ on a redex $R \in \mathcal{N}$, we say a path $\pi \in \mathcal{N}$ is long enough for $R$ when neither its first nor its last vertex is the cut of $R$. In such a case, we can express $\pi$ by isolating every crossing of $R$, that is a maximal sub-sequence of $\pi$ entirely contained in $R$ as: $\pi = \pi_0 :: \chi_1 :: \pi_1 :: \dots :: \chi_k :: \pi_k$, where for any $0 \le l \le k$, the subpath $\chi_l$ is a crossing for $R$. This last is called the *redex crossing form* (RCF) of $\pi$ for $R$.

The *path reduction* is a function from paths in $\mathcal{N}$ to sums of paths in $\rho(\mathcal{N})$. The residual of $\pi$, written $\rho(\pi)$, is defined according to the reduction rule used by $\rho$ and by extension of the case of $\rho(\chi_l)$.

1. Linear implication cut. If $\chi_l$ is as in **Equation 3**, then $\rho(\chi_l)$ is defined as follows.

$$ (5) \qquad \rho((v, w, u)) = (v) $$

$$ (7) \qquad \rho((v, w, u')) = 0 $$

$$ (6) \qquad \rho((v', w, u')) = (v') $$

$$ (8) \qquad \rho((v', w, u)) = 0 $$

The residual of the whole $\pi$ is defined as:

$$ (9) \qquad \rho(\pi) = \begin{cases} \pi_0 :: \rho(\chi_1) :: \pi_1 :: \dots :: \rho(\chi_k) :: \pi_k & \text{if for any } i, \rho(\chi_i) \neq 0 \\ 0 & \text{otherwise} \end{cases} $$

2. Exponential cut. Let $\chi_l$ be as in **Equation 4** and $\sigma_n \in S_n$. First, we define the residual of $\chi_l$ with respect to $\sigma_n$, for every pair of indices $0 \le i \le n$, and $0 \le j \le m$:

$$ (10) \qquad \rho^{\sigma_n}(v_i, w, u_j) = \begin{cases} (v_j) & \text{if } n = m, \text{ and } \sigma_n(i) = j \\ 0 & \text{if } n \neq m, \text{ or } \sigma_n(i) \neq j \end{cases} $$
Now, similarly to Equation 9, we can define the residual of the path $\pi$ with respect to $\sigma_n$:

$$ (11) \qquad \rho^{\sigma_n}(\pi) = \begin{cases} \pi_0 :: \rho^{\sigma_n}(\chi_1) :: \pi_1 :: \dots :: \rho^{\sigma_n}(\chi_k) :: \pi_k & \text{if for any } l, \rho^{\sigma_n}(\chi_l) \neq 0 \\ 0 & \text{otherwise} \end{cases} $$

Finally, we can define the residual of $\pi$ as the sum of all the residuals, for any $\sigma_n$:

$$ (12) \qquad \rho(\pi) = \sum_{\sigma_n \in S_n} \rho^{\sigma_n}(\pi) $$

If $\rho(\pi) \neq 0$, then $\pi$ is persistent to $\rho$. If, for every reduction sequence $\rho = (\rho_1, \dots, \rho_m)$, and for every $1 \le i \le m$, the path $\pi$ is persistent to $\rho_i$, then $\pi$ is persistent.

**Example 3.** Recall the nets discussed in Example 2 and let $\rho(\mathcal{N}) = \mathcal{N} \to \mathcal{N}_l + \mathcal{N}_r$, respectively be the left and the right addend of Figure 4. Look at the net $\mathcal{N}$ and notice the paths $(v_1, v_4)$ and $(v_1, v_2, v_1)$ are not straight – the former is twisting, while the latter is bouncing. Consider the net $[[I]]$ and the path $\phi = (w_1, w_2, w_3)$. It is straight and also maximal. Indeed, $E([[[I]])] = \{\phi, \phi^-\}$. What about $E(\mathcal{N})$? If we start from $v_1$ we find two paths seeking for the head variable: $\pi_1 = (v_1, v_2, v_3, z_1)$ and $\pi_2 = (v_1, v_2, v_3, z_2)$. Both are straight and persistent, since: $\text{NF}(\pi_1) = \pi_{1r} = (v_1, v_2 \equiv z_1)$ and $\text{NF}(\pi_2) = \pi_{2l} = (v_1, v_2 \equiv z_2)$. On the other hand they are not comprehensive, since they do not cross $v_4$ nor $v_7$. Remark also $\pi_1, \pi_2$ cross the exponential redex differently, and they do not belong to the same addend of the reduct, for $\pi_{1r} \in \mathcal{N}_r$, while $\pi_{2l} \in \mathcal{N}_l$. If otherwise we begin with $z_1$, which morally represents a free variable, the walk searches for the term that is going to substitute it. $\pi_3 = (z_1, v_3, v_2, v_4, v_5, v_6, v_3, z_1)$ is not persistent, because crosses the same redex twice, each of those belongs to a distinct permutation. Morally $\pi_3$ is trying to use the same variable as the function of both the applications.

## 3.2 Results

A persistent execution path travels through every vertex of a net that either belongs to the normal form of the net, or is eliminated by the normalisation. Since RINs represent a linear calculus without erasing, we show that comprehensiveness of paths is a natural property for execution paths. Moreover RINs have no duplication, despite what sum creation looks like, so we can also show that the exponential reduction rule indeed partitions persistent execution paths among the addends it creates —its action is a bijection.

**Lemma 1.** In a closed simple net $\mathcal{N}$, the conclusion of an exponential link is either the first premise of a linear implication link, or a cut with another exponential link.

*Proof.* Given Definition 9 of nets, we proceed by induction on the length of the reduction sequence $\rho: [[I]] \to^* \mathcal{S}$, for some term $t$ and net $\mathcal{S}$.

1. **Base.** Suppose $|\rho| = 0$. Thesis holds for $[[\cdot]]$, by immediate verification of Definition 6.

2. **Step.** Suppose $|\rho| > 0$. Let $l = \langle v_1, \dots, v_n (?/!) v \rangle$ be an exponential link in $\mathcal{N}$ and suppose $\rho = \rho'\rho''$, for some reduction sequence $\rho''$ where the thesis holds by inductive hypothesis (IH), for some reduction step $\rho'$ that is of our interest.

(a) If $\rho'$ does not affect $l$, then IH is trivially preserved.

(b) If $\rho'$ is a linear implication step involving $l$, then, by IH, the redex has to contain $\langle v, u (-\infty) w \rangle$ and $\langle v', u' (-\infty) w \rangle$ (if $l$ is negative), or by $\langle v', u' (-\infty) w \rangle$ and $\langle v, u (-\infty) w \rangle$ (if $l$ is positive). In both cases, observe now that, by definition of nets, and in particular by Definition 5 and 4, $v'$ must be the conclusion of an exponential link $l'$ dual to $l$. Therefore in the reduct of $\rho'$, $v \equiv v'$ will be the conclusion of $l'$ (i.e. an exponential cut).
(c) If $\rho'$ is an exponential implication step involving $l$, then notice that, by IH, $v$ has to be the reduced cut. In such a case $l$ is erased, either with, or without, the whole net $\mathcal{N}$, (depending on whether the arity mismatches or not), hence preserving the thesis. $\square$

**Lemma 2.** For any term $t$ such that $\llbracket t \rrbracket : \star$, any persistent path $\pi \in E(\llbracket t \rrbracket)$ is comprehensive.

*Proof.* We shall prove a stronger thesis: given a persistent path $\pi \in E(\llbracket t \rrbracket)$, a vertex $v \notin \pi$ if and only if there exists a (co-)weakening $l$ such that $v \in C(l)$.

* The “if” direction of the thesis follows from a mere observation of the **Definition 10** of execution paths. If $\pi$ includes a conclusion of a (co-)weakening, then $\pi$ is necessarily bouncing or non-maximal, in both cases contradicting the hypothesis that $\pi$ is an execution path.

* In order to prove the “only if” part of the thesis, let us first recall that, by **Definition 9**, a simple net is either a translation of a term, or an addend in its reduct. We now go by induction on a sequence $\rho$ of expansion (or an anti-sequence of reduction) from a normal form $\mathcal{S}$ back to a simple net $\mathcal{N} = \llbracket t \rrbracket$, for some term $t$. If $\mathcal{S} = 0$ there is nothing to prove, so we shall assume it to be non-zero.

1. **Base.** Suppose $|\rho| = 0$. Then $\mathcal{S} = \mathcal{N} = \llbracket t \rrbracket$. Therefore $t = \star$, because the only closed term whose translation is normal with respect to net reduction is $\star$. Then $\mathcal{N} = \langle (\star) v \rangle$, and $E(\mathcal{N}) = \{(v, v)\}$.

2. **Step.** Suppose $|\rho| > 0$. Let $\rho: \mathcal{N} \to \mathcal{S}'$ and $\mathcal{S}' \to *\mathcal{S}$. We then distinguish two sub-cases depending on the rule employed by $\rho$.

(a) **Linear implication cut.** Suppose $\mathcal{N}'$ to be an addend of $\mathcal{S}'$ containing the vertices $v, u$, and the expansion step to be the following, where the $v_1, v_2, u_1, u_2, w$ are introduced.

$$ \mathcal{N}' \leftarrow \mathcal{N}', \langle u_1, v_1 (-\circ) w \rangle, \langle u_2, v_2 (-\circ) w \rangle $$

Now $v$ cannot be the conclusion of a (co-)weakening, as established by **Lemma 1**. Hence, by inductive hypothesis (IH), $v \in \pi$ and it is enough to observe, by **Definition 11**, item 1, that also $v_1, v_2 \in \rho^{-1}(\pi)$. Let's now discuss $u$.

i. If $u \notin \pi$, then, because of **Lemma 1**, $u$ must be an exponential redex containing a weakening. So, first we clearly have $u_1 \notin \rho^{-1}(\pi)$. Moreover, we also have that $u_2 \notin \rho^{-1}(\pi)$ because $u_2$ must be the conclusion of a co-weakening. Otherwise $u$ would be a net-neutralisation redex, which contradicts the persistence hypothesis we have for $\pi$. In such a case, the expansion is admissible, and we can verify both $u_1, u_2 \notin \rho^{-1}(\pi)$.

ii. Otherwise $u \in \pi$. Then again by inspection of **Definition 11** and 1, we verify that $u_1, u_2 \in \rho^{-1}(\pi)$.

(b) **Exponential cut.** If the expansion affect 0 addends, $\pi$ is unaffected, hence IH is trivially preserved. Otherwise, let $\rho$ be as follows.

$$ \sum_{\sigma_n \in S_n} \mathcal{N}_C[v_1 \equiv u_{\sigma_n(1)}, \dots, v_n \equiv u_{\sigma_n(n)}] \\ \uparrow \\ \mathcal{N}', \langle v_1, \dots, v_n (!) w \rangle, \langle u_1, \dots, u_n (?) w \rangle $$

For any $1 \le i, j \le n$, the vertices $v_i, u_j$ cannot be the conclusion of some (co-)weakening (cf. **Lemma 1**). Thus, by IH, for any $1 \le i', j' \le n$ such that $\rho(v_{i'})$, $\rho(u_{j'}) \in \pi$, we also have $v_{i'}, u_{j'} \in \rho^{-1}(\pi)$.
☐

**Theorem 1.** For any closed $[[t]] : \star, every reduction step $\rho$ induces a bijection between persistent paths in $E(\mathcal{N})$ and persistent paths $E(\rho(\mathcal{N}))$.

*Proof.* Let $\pi \in E(\mathcal{N})$ be persistent, and suppose its RCF is $\pi_0 :: \chi_1 :: \pi_1 :: \dots :: \chi_k :: \pi_k$. There are two reduction rules possibly used by $\rho$.

1. *Linear implication cut.* Because of the persistence of $\pi$ to $\rho$, and by the definition given by Equation 9, we have $\chi_l \neq 0$, for all $0 \le l \le k$, and $\rho(\pi) = \pi_0 :: \rho(\chi_1) :: \pi_1 :: \dots :: \rho(\chi_k) :: \pi_k$. By an inspection of the definition of crossing path reduction, we first notice that, for each of the four possible extrema of $\chi_l$, there is a unique reduct that corresponds to a particular direction (from in to out, or vice versa) of one of the two cut vertices in $\mathcal{N}'$: $v$, and $v'$. Namely, let $\rho$ be as in Equation 3. Then, the bijection is given as follows:

(a) $\chi_l = (v, w, u)$ if and only if $\rho(\chi_l) = v$ from in to out;

(b) $\chi_l = (v', w, u')$ if and only if $\rho(\chi_l) = v'$ from out to in;

(c) $\chi_l = (u, w, v)$ if and only if $\rho(\chi_l) = v$ from out to in;

(d) $\chi_l = (u', w, v')$ if and only if $\rho(\chi_l) = v'$ from in to out.

Such a bijection holds between $\chi_l$ and $\rho(\chi_l)$, so we also have a bijection between $\pi$ and $\rho(\pi)$.

2. *Exponential cut.* Suppose the redex $R$ being as in Equation 4. Because of the persistence of $\pi$ to $\rho$, and by the definition given by Equation 11 and 12, it must be the case that $n = m$ and that there exist a permutation $\sigma_n \in S_n$ such that for all $0 \le l \le k$, we have $\rho^{\sigma_n}(\chi_l) \neq 0$. Moreover, by Lemma 2, $\pi$ is comprehensive, therefore $\sigma_n$ is unique and for any other $\sigma'_n$, we have $\rho^{\sigma'_n}(\pi) = 0$. Let $\chi_l$ be as in Equation 10, and observe it must be also the case that $\sigma_n(i) = j$ so that $\rho^{\sigma_n}(v_i, w, u_j) = (v_{\sigma_n(i)} \equiv u_j)$. We then obtained a one-to-one relation between $\pi$ and $\rho(\pi)$. ☐

# 4 Execution

## 4.1 Definitions

We are ready to formulate the GoI construction for RINs. We followed the spirit of the formulation for the case of MELL as formulated in [5], but we characterise our resource exponentials, which have no promotion, as a sort of superposition of n-ary multiplicatives. We define a weight assignment for paths, so that the execution of a net is the sum of the weights of any execution path within it, and we formulate a Dynamic Algebra $\tau\mathcal{L}^*$ on weights representing the computation. A crossing of an exponential link is weighted spanning over the space of permutations of the indices of link's premises, and exponential weights interact exactly as multiplicatives weights, i.e. by nullification or neutralisation.

**Definition 12 (Dynamic Algebra).** The $\tau\mathcal{L}^*$ algebra is defined over symbols in $\{0, 1, p, q, e_n, \star\}$, where $n$ is a natural number. A word of its alphabet, called *weight*, is generated by an unary *inversion* operator $(\cdot)^*$ and a binary *concatenation* operator with infix implicit notation. The concatenation operator is a monoid, whose identity element is 1, and whose absorbing element is 0 (cf. Figure 6a). Moreover, the inversion operator is idempotent and involutive for concatenation (cf. Figure 7a), and satisfies the neutralisation and two annihilation equations in Figure 8a.
<table><caption>**Figure 9** The $\mathfrak{t}\mathfrak{L}^*$ algebra.</caption><thead><tr><th>(a) Monoid rules.</th><th>(a) Inversion rules.</th><th>(a) Computation rules.</th></tr></thead><tbody><tr><td>(13) a(bc) = (ab)c</td><td>(16) (a<sup>*</sup>)<sup>*</sup> = a</td><td>(18) aa<sup>*</sup> = 1</td></tr><tr><td>(14) a1 = 1a = a</td><td>(17) (ab)<sup>*</sup> = b<sup>*</sup>a<sup>*</sup></td><td>(19) qp<sup>*</sup> = pq<sup>*</sup> = 0</td></tr><tr><td>(15) a0 = 0a = 0</td><td></td><td>(20) e<sub>i</sub>e<sub>j≠i</sub><sup>*</sup> = 0</td></tr></tbody></table>

**Definition 13** (Weighting). The *permuted base weighting* is a map $w$ from a unitary straight path $\pi \in \mathcal{N}$ and a resource permutation $\sigma_{\mathcal{N}}$ to a weight of $\mathfrak{t}\mathfrak{L}^*$, written as $w^{\sigma_{\mathcal{N}}}(\pi)$.

$$ (21) \qquad w^{\sigma_{\mathcal{N}}}((u,v)) = \begin{cases} \star & \text{if there is } \langle(\star)u \rangle \text{ and } u = v \\ p & \text{if there is } \langle u,w(-\circ)v \rangle \text{ or } \langle u,w(-\circ)v \rangle \\ q & \text{if there is } \langle w,u(-\circ)v \rangle \text{ or } \langle w,u(-\circ)v \rangle \\ e_i & \text{if there is } \langle u_1, \dots, u_i, \dots, u_n(?)v \rangle \text{ and } u_i = u \\ e_{\sigma_r(i)} & \text{if there is } r = \langle u_1, \dots, u_i, \dots, u_n(!)v \rangle \text{ and } u_i = u \\ (w^{\sigma_{\mathcal{N}}}(v,u))^* & \text{otherwise.} \end{cases} $$

Straightness of the unitary path $\pi$ implies that $\pi$ goes either: (i) from a premise vertex to a conclusion one, i.e. crossing a link in one of the five possible ways that are covered by the first five clauses; (ii) vice versa, from a conclusion vertex to a premise one, covered by the last clause.

The *permuted weighting* is the lifting of the permuted base weighting to generic straight paths, and the *path weighting* is the sum of all the permuted weights of a path, for any resource permutation:

$$ (22) \qquad w^{\sigma_{\mathcal{N}}}(v) = 1 \qquad w^{\sigma_{\mathcal{N}}}((u,v) :: \pi) = w^{\sigma_{\mathcal{N}}}(u,v)w^{\sigma_{\mathcal{N}}}(\pi) \qquad w(\pi) = \sum_{\sigma_{\mathcal{N}} \in S_{\mathcal{N}}} w^{\sigma_{\mathcal{N}}}(\pi). $$

**Definition 14** (Execution). A path $\pi$ is *regular* if $w(\pi) \neq 0$. The *execution* of a net $\mathcal{S}$, is defined as:

$$ (23) \qquad \mathfrak{E}(\mathcal{N}) = \sum_{\pi \in E^+(\mathcal{N})} w(\pi). $$

**Example 4.** Consider the again the closed net $\mathcal{M}$, whose reduction has been discussed in previous Example 2, and that is depicted in the leftmost extremity of Figure 5. To have an idea of the execution of $\mathcal{M}$ and of the behaviour of the algebra, let us consider an execution comprehensive path, one of the persistent two, and compute its weight. Given that the path is palindromic, i.e. has the form $\pi :: \pi^{-}$, we will consider only its first half, that goes from the root of the term to the constant. Moreover we will break lines when a path invert its polarity direction, i.e. if it walks from in to out or viceversa.

$$ \begin{array}{l} \sum_{\sigma_2 \in S_2} q e_1 e_{\sigma(2)}^* q^* e_1. \\ p e_{\sigma(2)} e_1^*. \\ p^* e_1^* q e_2 e_{\sigma(1)}^* q^* e_1. \\ p e_{\sigma(1)} e_2^*. \\ p^* e_1^* \star \end{array} $$
On the path: reduce it using the exponential rule. On the weight: apply Equation 20 and then 15 on the addend s.t. $\sigma_2 = (2, 1)$, apply Equation 18 and then 14 on the one s.t. $\sigma_2 = (1, 2)$.

$$ 
\begin{aligned}
\rightarrow & (v_1, v_2 \equiv w_1, w_2, w_3, &&= v \Sigma^* q q^* e_1 \cdot \\
& w_1 \equiv v_2, && p \cdot \\
& v_4, v_5, v_6 \equiv z_1, z_2, z_3, && p^* e_1^* q q^* e_1 \cdot \\
& z_1 \equiv v_6, && p \cdot \\
& v_7, v_8) + && p^* e_1^* \star + \\
& 0 && 0
\end{aligned}
$$

Forget zeros on both side. On the path: reduce it using the leftmost linear implication rule. On the weight: apply Equation 18 and then 14.

$$ 
\begin{aligned}
\rightarrow & (v_1 \equiv w_2, w_3 \equiv v_4, v_5, v_6 \equiv z_1, z_2, z_3, &&= v \Sigma^* e_1^* q q^* e_1 \cdot \\
& z_1 \equiv v_6, && p \cdot \\
& v_7, v_8) && p^* e_1^* \star
\end{aligned}
$$

On the path: reduce it using the linear implication rule. On the weight: apply Equation 18 and then 14.

$$ \rightarrow (v_1 \equiv w_2, w_3 \equiv v_4, v_5 \equiv z_2, z_3 \equiv v_7, v_8) = v \Sigma^* e_1 e_1^* e_1 e_1^* \star $$

On the path: reduce it twice using exponential rules. On the weight: apply Equation 18 and then 14, and repeat.

$$ 
\begin{aligned}
\rightarrow & (v_1 \equiv w_2 \equiv v_5 \equiv z_2, z_3 \equiv v_7, v_8) &&= v \Sigma^* e_1 e_1^* \star \\
\rightarrow & (v_1 \equiv w_2 \equiv v_5 \equiv z_2 \equiv v_8) &&= v \Sigma^* \star
\end{aligned}
$$

Therefore the persistent path turns out to be regular. Even more, along the reduction we managed to apply, for each step, some $v \Sigma^*$ equations so that weight of every reduct is equal to the manipulated weight. The next two theorems shall generalise these two facts.

## 4.2 Results

The $v\Sigma^*$ algebra introduced so far accurately computes path reduction. We prove the equivalence between regularity and persistence, and show execution is invariant by reduction. Not only the GoI is a suitable semantic for ground typed RINs, but also possess quantitative-awareness, since, for any term, the cardinality of execution paths that are regular is equal to those of addends of its normal form.

**Lemma 3.** For any closed simple net $\mathcal{N} : \star$, any reduction step $\rho$, and any path $\pi \in E^+(\mathcal{N})$:

* $\rho(\pi) \neq 0$, and $w(\pi) = v \Sigma^* w(\rho(\pi))$; or

* $\rho(\pi) = 0$, and $w(\pi) = v \Sigma^* 0$.

*Proof.* Let $\pi \in E(\mathcal{N})$ and recall it has to be long enough for $\rho$, for it is maximal. Suppose the RCF of $\pi$ w.r.t. the redex $R$ of $\rho$ is $\pi_0 :: \chi_1 :: \pi_1 :: \dots :: \chi_k :: \pi_k$. We proceed by a case analysis of the reduction rule used by $\rho$.
1. Linear implication cut elimination. Let $R$ be as in Equation 3. We distinguish two sub-cases, depending on the nullity of $\rho(\pi)$.

(a) Suppose $\rho(\pi) = 0$. Then by item 1 of Definition 11, in particular Equation 9, there must exist $0 \le l \le k$, such that $\rho(\chi_l) = 0$. Hence it must be the case that $\chi_l$ is either as in Equation 7, or as in Equation 8.

i. Suppose $\chi_l = (v, w, u')$. Then $\rho(\chi_l) = 0$, and $w(\chi_l) = pq^* = \tau\Sigma^* 0$.

ii. Suppose $\chi_l = (v', w, u')$. Then $\rho(\chi_l) = 0$, and $w(\chi_l) = qp^* = \tau\Sigma^* 0$.

By definition of weighting (Eq. 22) and using the Equation 15, we conclude $w(\pi) = \tau\Sigma^* 0$.

(b) Suppose $\rho(\pi) \neq 0$. Then, again by definition given in Equation 9 for any $0 \le l \le k$, $\rho(\chi_l) \neq 0$. Hence it must be the case that $\chi_l$ is either as in Equation 5, or as in 6.

i. Suppose $\chi_l = (v, w, u)$. Then $\rho(\chi_l) = (v' \equiv u')$, and $w(\chi_l) = pp^* = \tau\Sigma^* 1$.

ii. Suppose $\chi_l = (v', w, u')$. Then $\rho(\chi_l) = (v' \equiv u')$, and $w(\chi_l) = qq^* = \tau\Sigma^* 1$.

Now, applying this fact on the definition given by Equation 9, and using Equation 14 we conclude.

$$ 
\begin{align*}
w(\pi) &= \sum_{\sigma_N \in S_N} w^{\sigma_N}(\pi_0) w^{\sigma_N}(\chi_1) w^{\sigma_N}(\pi_1) \dots w^{\sigma_N}(\chi_k) w^{\sigma_N}(\pi_k) \\
&= \sum_{\sigma_N \in S_N} w^{\sigma_N}(\pi_0) w^{\sigma_N}(\pi_1) \dots w^{\sigma_N}(\pi_k) \\
&= w(\rho(\pi))
\end{align*}
$$

2. Exponential cut elimination. Let $R$ be as in Equation 4, and let $r$ be the !-link involved in. We distinguish two sub-cases, depending on the nullity of $\rho(\pi)$.

(a) Suppose $\rho(\pi) = 0$. Then by item 2 of Definition 11, in particular Equation 12, there are only two possible causes.

i. Arity mismatch, i.e. when $n \neq m$, where $n, m$ are the arities of the two links. Because of the hypothesis of comprehensiveness of $\pi$, it must be the case that $k \ge \max(n, m)$. Then, whatever permutation $\sigma_n \in S_n$ we choose for the premises of the !-link in $R$, there always exists a crossing $\chi_l$, for some $0 \le l \le k$, such that $\chi_l = (u_{\sigma_n(i)}, w, v_j)$ and $\sigma_n(i) \neq j$.

ii. Permutation incoherence, i.e. when $n = m$, but for any $\sigma_n \in S_n$ there exists a crossing $\chi_l \subseteq \pi$ such that $\sigma_n(i) \neq j$. This morally happens when $\pi$ tries to use more than once a resource, travelling from the same premise of the ?-link to two different premises of the corresponding !-link.

Thus, in both cases there is a “wrong” crossing $\chi_l \subset \pi$ such that, for any $\sigma_N$, we have $w^{\sigma_N}(\chi_l) = e_{\sigma_N, r(i)} e_j^*$ where $\sigma_n(i) \neq j$. Hence, by Equation 20, $w^{\sigma_N}(\chi_l) = 0$. By definition of weighting (Eq. 22) and using the Equation 15, we conclude $w(\pi) = \tau\Sigma^* 0$.

(b) Suppose $\rho(\pi) \neq 0$. Again by definition of path reduction, it must be the case that $n = m$, and that there exist a $\sigma_n'' \in S_n$ such that for all $0 \le l \le k$ we have $\rho^{\sigma_n'}(\chi_l) \neq 0$. In particular, let $\chi_l$ be as in Equation 10, and observe it must be also the case that $\sigma_n'(i) = j$, which allows $\rho^{\sigma_n'}(v_i, w, u_j) = (v_{\sigma_n(i)} \equiv u_j)$. Moreover, by the comprehensiveness hypothesis for $\pi$, $\sigma_n$ has to be unique, so that for any other $\sigma_n''$, we have $\rho^{\sigma_n''}(\pi) = 0$. So, accordingly to this, let us split resource permutations $S_N$ into $S'_N \cup S''_N$, where the former is the set of those such that for any $\sigma_N' \in S'_N$, $\sigma_N'(r) = \sigma_n'$, while, symmetrically, the latter contains those such that for
any $\sigma''_N \in S''_N$, $\sigma'_N(r) \neq \sigma'_n$. Hence, by Definition 13 we obtain

$$ 
\begin{aligned}
\mathfrak{w}(\pi) &= \sum_{\sigma'_N \in S'_N} \mathfrak{w}^{\sigma'_N}(\pi) + \sum_{\sigma''_N \in S''_N} \mathfrak{w}^{\sigma''_N}(\pi) \\
&= \sum_{\sigma'_N \in S'_N} \mathfrak{w}^{\sigma'_N}(\pi_0) \mathfrak{w}^{\sigma'_N}(\chi_1) \mathfrak{w}^{\sigma'_N}(\pi_1) \dots \mathfrak{w}^{\sigma'_N}(\chi_k) \mathfrak{w}^{\sigma'_N}(\pi_k) + \\
&\qquad \sum_{\sigma''_N \in S''_N} \mathfrak{w}^{\sigma''_N}(\pi_0) \mathfrak{w}^{\sigma''_N}(\chi_1) \mathfrak{w}^{\sigma''_N}(\pi_1) \dots \mathfrak{w}^{\sigma''_N}(\chi_k) \mathfrak{w}^{\sigma''_N}(\pi_k).
\end{aligned}
$$

In the leftmost series, by Equation 18, $\mathfrak{w}^{\sigma'_N}(\chi_l) = e_{\sigma'_N(r)(i)}e_j^* = 1$. While in the rightmost, by Equation 20, $\mathfrak{w}^{\sigma''_N}(\chi_l) = e_{\sigma''_N(r)(i)}e_j^* = 0$, so it neutralises to 0. Therefore we concluded:

$$ 
\begin{aligned}
&= \varepsilon\mathfrak{L}^* \sum_{\sigma'_N \in S'_N} \mathfrak{w}^{\sigma'_N}(\pi_0) \mathfrak{w}^{\sigma'_N}(\pi_1) \dots \mathfrak{w}^{\sigma'_N}(\pi_k) \\
&= \mathfrak{w}(\rho(\pi)).
\end{aligned}
$$

**Lemma 4.** For any closed simple net $\mathcal{N} : \star$, any reduction sequence $\rho$, and any path $\pi \in E^+(\mathcal{N})$:

* $\rho(\pi) \neq 0$, and $\mathfrak{w}(\pi) = \varepsilon\mathfrak{L}^* \mathfrak{w}(\rho(\pi))$; or

* $\rho(\pi) = 0$, and $\mathfrak{w}(\pi) = \varepsilon\mathfrak{L}^* 0$.

*Proof.* A straightforward induction on the length $n$ of the sequence $\rho$.

1. Base. Suppose $n = 0$. Trivially, $\rho(\pi) = \pi$, so $\mathfrak{w}(\rho(\pi)) = \mathfrak{w}(\pi)$.

2. Step. Suppose $n > 0$. Let $\rho = \rho'\rho''$, with $\rho'$ a single step, $\rho''$ a sequence.

(a) If both $\rho'(\pi) \neq 0$ and $\rho''(\rho'(\pi)) \neq 0$, then, by Definition 11 of path reduction, $\rho''(\rho'(\pi)) = \rho(\pi)$. In this case, by previous Lemma 3, $\mathfrak{w}(\rho'(\pi)) = \varepsilon\mathfrak{L}^* \mathfrak{w}(\rho''(\rho'(\pi)))$. But, by inductive hypothesis we have that $\mathfrak{w}(\pi) = \varepsilon\mathfrak{L}^* \mathfrak{w}(\rho'(\pi))$ so we conclude.

(b) Otherwise $\rho'(\pi)$ or $\rho''(\rho'(\pi))$ are zero.

i. If $\rho'(\pi) = 0$, then by definition of path reduction, $\rho(\pi) = \rho''(\rho'(\pi)) = 0$. But by inductive hypothesis, $\mathfrak{w}(\pi) = \varepsilon\mathfrak{L}^* 0$, that is our thesis.

ii. Otherwise $\rho'(\pi) \neq 0$ while $\rho''(\rho'(\pi)) = 0$. Then $\rho(\pi) = 0$ and, again by previous Lemma 3, $\mathfrak{w}(\rho'(\pi)) = \varepsilon\mathfrak{L}^* 0$. Hence, the thesis.

**Theorem 2.** For any closed net $\mathcal{S} : \star$, a path $\pi \in E^+(\mathcal{S})$ is persistent if and only if $\pi$ is regular.

*Proof.* Immediate from Lemma 4.

**Theorem 3.** For any closed net $\mathcal{S} : \star$ and any reduction sequence $\rho$, $\mathfrak{E}\mathfrak{r}(\mathcal{S}) = \varepsilon\mathfrak{L}^* \mathfrak{E}\mathfrak{r}(\rho(\mathcal{S}))$.

*Proof.* Consider a pair $\pi, \rho(\pi)$ of paths respectively belonging to $E^+(\mathcal{S}), E^+(\rho(\mathcal{S}))$. Recall that, thanks to Theorem 1, there is a bijection between the two, so it does not matter which we choose first.

1. If $\pi, \rho(\pi)$ are not persistent, there is nothing left to prove, for their weights are both 0, as proven by Lemma 4, and consequently they are neutral with respect to both $\mathfrak{E}\mathfrak{r}(\mathcal{S}), \mathfrak{E}\mathfrak{r}(\rho(\mathcal{S}))$.
2. Otherwise $\pi, \rho(\pi)$ are persistent, so they both are regular. Moreover, once again by Lemma 4, $\mathfrak{w}(\pi) = \mathfrak{w}(\rho(\pi))$. Hence the thesis. $\square$

**Corollary 1.** For any term $[t] : \star$, regular paths in $[t]$ are as many as (non-zero) addends in NF($t$).

*Proof.* By definition of the calculus and of its nets syntax, $\mathrm{NF}(t) = n\star$, for some natural number $n$. Clearly, $E^+([\star])$ contains a unique path, bouncing on the unique vertex of $[\star]$. Then $|E^+([\mathrm{NF}(t)])| = n$. But from last Theorem 3, $\mathfrak{E}([t]) = \mathfrak{E}(\mathrm{NF}(t))$, therefore the thesis. $\square$

Conclusion

**Summary** We studied the notion of path persistence in a restriction of the Resource Calculus (RC) showing that, in spite of the non-determinism, the reduction induces a bijection between paths. We defined a proper Geometry of Interaction construction that: characterises persistence by an algebra of weights, which are non-deterministically assigned to paths; is invariant under reduction; accurately counts addends of normal forms. In the restricted setting where we are placed, the formulation is considerably simpler and stronger with respect to similar works.

**Further research** Future investigations may easily extend the minimalist formulation from RC to a PCF-like resource calculus, where the restriction to ground types remains innocuous although allowing a real-programming-language-class expressivity. Directions of ongoing investigation by the author includes the study of the connection between Taylor-Ehrhard expansion and GoI, exploiting the resource construction hereby presented. This could offer a technique to represent approximations of infinite, but still meaningful, paths in a $\lambda$-term, as in the spirit of Böhm trees. Indeed, paths, expansion and Böhm trees, they all intimately share a particular strategy of computation, that is the head reduction. Lastly, a deep study of paths in presence of both superposition and duplication, i.e. in the full differential $\lambda$-calculus, is still missing. In such a case, the shape of persistent crossings of an exponential redex does not necessarily respect the definition we gave by mean of fixed permutations, because different copies of the redex may want different resource assignments.

References

[1] Andrea Asperti, Vincent Danos, Cosimo Laneve & Laurent Regnier (1994): *Paths in the lambda-calculus*. In: *Logic in Computer Science, 1994. LICS'94. Proceedings.*, Symposium on, IEEE, pp. 426–436, doi:10.1109/LICS.1994.316048.

[2] Andrea Asperti & Cosimo Laneve (1995): *Paths, computations and labels in the lambda-calculus*. Theoretical Computer Science 142(2), pp. 277–297, doi:10.1016/0304-3975(94)00279-7.

[3] Ugo Dal Lago (2009): *Context semantics, linear logic, and computational complexity*. ACM Transactions on Computational Logic (TOCL) 10(4), pp. 25:1–25:32, doi:10.1145/1555746.1555749.

[4] Vincent Danos & Thomas Ehrhard (2011): *Probabilistic coherence spaces as a model of higher-order probabilistic computation*. Information and Computation 209(6), pp. 966–991, doi:10.1016/j.ic.2011.02.001.

[5] Vincent Danos & Laurent Regnier (1995): *Proof-nets and the Hilbert space*. In Jean-Yves Girard, Yves Lafont & Laurent Regnier, editors: *Advances in Linear Logic*, Cambridge University Press, pp. 307–328, doi:10.1017/CBO9780511629150.016.

[6] Thomas Ehrhard & Laurent Regnier (2003): *The differential lambda-calculus*. Theoretical Computer Science 309(1), pp. 1–41, doi:10.1016/S0304-3975(03)00392-X.
[7] Thomas Ehrhard & Laurent Regnier (2006): *Böhm Trees, Krivine's Machine and the Taylor Expansion of Lambda-Terms*. In: *Arnold Beckmann, Ulrich Berger, Benedikt Löwe & JohnV. Tucker, editors: Logical Approaches to Computational Barriers, Lecture Notes in Computer Science* 3988, Springer Berlin Heidelberg, pp. 186–197, doi:10.1007/11780342_20.

[8] Marc de Falco (2008): *The geometry of interaction of differential interaction nets*. In: *Logic in Computer Science, 2008. LICS'08. 23rd Annual IEEE Symposium on*, IEEE, pp. 465–475, doi:10.1109/LICS.2008.23.

[9] Jean-Yves Girard (1989): *Geometry of interaction I: Interpretation of System F. Studies in Logic and the Foundations of Mathematics* 127, pp. 221–260, doi:10.1016/S0049-237X(08)70271-4.

[10] Georges Gonthier, Martijn Abadi & Jean-Jacques Lévy (1992): *The geometry of optimal lambda reduction*. In: *Proceedings of the 19th ACM SIGPLAN SIGACT symposium on Principles of programming languages, POPL '92*, ACM, pp. 15–26, doi:10.1145/143165.143172.

[11] Ian Mackie (1995): *The geometry of interaction machine*. In: *POPL 95 Proceedings of the 22nd ACM SIGPLAN SIGACT symposium on Principles of programming languages*, ACM, pp. 198–208, doi:10.1145/199448.199483.

[12] Michele Pagani, Peter Selinger & Benoit Valiron (2014): *Applying Quantitative Semantics to Higher-Order Quantum Computing*. In P. Sewell, editor: *The 41st Annual ACM SIGPLAN SIGACT Symposium on Principles of Programming Languages, POPL14, San Diego, USA, ACM, doi:10.1145/2535838.2535879*.

[13] Jorge Sousa Pinto (2001): *Parallel Implementation Models for the Lambda-Calculus Using the Geometry of Interaction*. In Samson Abramsky, editor: *Typed Lambda Calculi and Applications, Lecture Notes in Computer Science* 2044, Springer Berlin Heidelberg, pp. 385–399, doi:10.1007/3-540-45413-6_30.