Making first order linear logic a generating grammar

It is known that different categorial grammars have surface representation in a fragment of first order multiplicative linear logic (MLL1). We show that the fragment of interest is equivalent to the recently introduced extended tensor type calculus (ETTC). ETTC is a calculus of specific typed terms, which represent tuples of strings, more precisely bipartite graphs decorated with strings. Types are derived from linear logic formulas, and rules correspond to concrete operations on these string-labeled graphs, so that they can be conveniently visualized. This provides the above mentioned fragment of MLL1 that is relevant for language modeling not only with some alternative syntax and intuitive geometric representation, but also with an intrinsic deductive system, which has been absent. In this work we consider a non-trivial notationally enriched variation of the previously introduced ETTC, which allows more concise and transparent computations. We present both a cut-free sequent calculus and a natural deduction formalism.

It has been known for a while that different grammatical formalisms, such as those just mentioned, have surface representation in the familiar first order multiplicative intuitionistic linear logic (MILL1), which provides them in this way with some common ground.In the seminal work [MP01] it was shown that LC translates into MILL1 as a conservative fragment; later similar representations were obtained for other systems [Moo14a], [Moo14b] (however, in the case of displacement calculus, the representation is not conservative, see [Moo15]).This applies equally well to the classical setting of first order multiplicative linear logic (MLL1), which is a conservative extension of MILL1 anyway.(a) MLL1 language ||p|| (l,r) = p(l, r) for p ∈ Prop, ||B/A|| (l,r) = ∀x||A|| (r,x) ⊸ ||B|| (l,x) , ||A • B|| (l,r) = ∃x||A|| (l,x) ⊗ ||B|| (x,r) , ||A\B|| (l,r) = ∀x||A|| (x,l) ⊸ ||B|| (x,r) .A 1 , . . ., A n ⊢ LC B ⇐⇒ ||A 1 || (c 0 ,c 1 ) , . . ., ||A n || (c n−1 ,cn) ⊢ MILL1 ||B|| (c 0 ,cn) .Language and sequent calculus of first order multiplicative linear logic (MLL1) are shown in Figures 1a, 1b.We are given a set Pred + of positive predicate symbols with assigned arities and a set Var of variables.The sets Pred − and Pred of negative and of all predicate symbols respectively are defined.The sets of first order atomic, respectively, linear multiplicative formulas are denoted as At, respectively, Fm.Connectives ⊗ and `are called respectively tensor (also times) and cotensor (also par).Linear negation (.) is not a connective, but is definable by induction on formula construction, as in Figure 1a.Note that, somewhat non-traditionally, we follow the convention that negation flips tensor/cotensor factors, typical for noncommutative systems.This does not change the logic (the formulas A⊗B and B ⊗A are provably equivalent), but is more consistent with our intended geometric interpretation.
A context Γ is a finite multiset of formulas, and a sequent is an expression of the form ⊢ Γ, where Γ is a context.The set of free variables of Γ is denoted as F V (Γ).In this work we will consider several systems of sequent calculus, and, in order to avoid confusion, we will sometimes use abbreviations like ⊢ MLL1 Γ to say that the sequent ⊢ Γ is derivable in MLL1, similarly for other systems.We also emphasize that a commutative system like MLL1 can be given an alternative ordered formulation, where contexts are defined as finite First order multiplicative intuitionistic logic (MILL1) is the fragment of MLL1 restricted to sequents of the form ⊢ B, A 1 , . . ., A n , written in MILL1 in a two-sided form as A 1 , . . ., A n ⊢ B, where A 1 , . . ., A n , B are multiplicative intuitionistic formulas, which means constructed using only positive predicate symbols, quantifiers, tensor and linear implication defined by A ⊸ B = A `B. (Note that we can define linear implication differently as A ⊸ B = B `A and get an equivalent system.) The language of Lambek calculus (LC), i.e. noncommutative multiplicative intuitionistic linear logic, is summarised in Figure 1c.Noncommutative tensor is denoted as •, and the two directed implications caused by noncommutativity are denoted as slashes.Formulas of LC are often called types.A context in LC is, by definition, a sequence of types, and a sequent is an expression of the form Γ ⊢ F , where Γ is a context and F is a type.In LC there is no analogue of the Exchange rule or "unordered" formulation, i.e. the system is genuinely noncommutative.We will not reproduce the rules which can be found, for example, in [Lam58].
Given a finite alphabet T of terminal symbols, a Lambek grammar G (over T ) is a pair G = (Lex , S), where Lex , the lexicon is a finite set of lexical entries, which are expressions t : A, where t ∈ T and A is a type, and S is a selected atomic type.The language L(G) of G is the set of words where t 1 . . .t n stands for the concatenation of strings t 1 , . . ., t n .More details on categorial grammars can be found in [MR12].
Given two variables l, r, the first order translation ||F || (l,r) of an LC formula F parameterized by l, r is shown in Figure 1d (LC propositional symbols are treated as binary predicate symbols).This provides a conservative embedding of LC into MILL1 [MP01].
Let a finite alphabet T of terminal symbols be given.Assume for convenience that our first order language contains two special variables (or constants) l, r.Definition 3.1.Given a terminal alphabet T , a MILL1 lexical entry (over T ) is a pair (w, A), where w ∈ T * is nonempty, and A is a MILL1 formula with one occurrence of l and one occurrence of r and no other free variables.For the formula A occurring in a lexical entry we will write A A MILL1 grammar G (over T ) is a pair (Lex , s), where Lex is a finite set of MILL1 lexical entries, and s is a binary predicate symbol.The language L(G) generated by G or, simply, the language of G is defined by It seems clear that, under such a definition, Lambek grammars translate precisely to MILL1 grammars generating the same language (compare (3.1) with (2.1)).
It has been shown [Moo14a], [Moo14b] that MILL1 allows representing more complex systems such as displacement calculus, abstract categorial grammars, hybrid type-logical grammars.This suggests that the above definition should be generalized to allow more complex lexical entries, corresponding to word tuples rather than just words.(To the author's knowledge, no explicit definition of a MILL1 grammar has been given in the literature, but this concept is implicit in the above cited works).Now let us isolate the fragment of first order logic that is actually used in translations of linguistic systems.
we say that first k occurrences x 1 , . . ., x k in the atomic formula p(x 1 , . . ., x n ) are left occurrences or have left polarity, and x k+1 , . . ., x n are right occurrences, with right polarity.
For a variable occurrence x in a compound formula in a linguistically marked language F we define the polarity of x in F by induction.If F = A□B, where □ ∈ {⊗, `}, and x occurs in A, respectively B, then the polarity of x in F is the same as the polarity of x in A, respectively B. If F = QxA, where Q ∈ {∀, ∃}, then the polarity of a variable occurrence x in F is the same as the polarity of x in A, If Γ = A 1 , . . ., A n is a context, and x is a variable occurrence in A i for some i ∈ {1, . . ., n}, then the polarity of x in the context Γ and in the sequent ⊢ Γ is the same as the polarity of x in A i .For a MILL1 sequent Γ ⊢ F , the polarity of its variable occurrences is determined by the translation to MLL1.Definition 3.3.Given a linguistically marked MLL1 language, a formula, context or sequent is linguistically marked if every quantifier binds exactly one left and one right variable occurrence.An MLL1 derivation π is linguistically marked if all sequents occurring in π are linguistically marked.
A linguistically marked formula or context is linguistically well-formed if, furthermore, it has at most one left and at most one right occurrence of any free variable.A linguistically marked sequent is linguistically well-formed if each of its free variables has exactly one left and one right occurrence.A MILL1 grammar is well-formed if the formula in every lexical entry is linguistically well-formed with l and r occurring with left and right polarity respectively.Proposition 3.4.Any cut-free derivation of a linguistically marked MLL1 sequent is linguistically marked.□ Evidently, if we understand MILL1 as a fragment of MLL1, then the translation of LC in Figure 1d has precisely the linguistically well-formed fragment as its target (with v(p) = (1, 1) for all p ∈ Pred ), and Lambek grammars translate to linguistically well-formed ones.Similar observations apply to translations in [Moo14a], [Moo14b].
However, the standard sequent calculus formulation of MLL1 is not intrinsic to the linguistic fragment.For an illustration, a basic LC derivable sequent A, B ⊢ A • B translates to MILL1 as A(c 0 , c 1 ), B(c 1 , c 2 ) ⊢ ∃xA(c 0 , x) ⊗ B(x, c 2 ).The latter, obviously, is derivable in MLL1 by the (∃) rule applied to the sequent A(c 0 , c 1 ), B(c 1 , c 2 ) ⊢ A(c 0 , c 1 ) ⊗ B(c 1 , c 2 ), which itself is not in the linguistic fragment.Thus, in order to derive a linguistically wellformed sequent in MLL1 we have to use "linguistically ill-formed" ones at intermediate steps.
Our goal is to provide the linguistic fragment with an intrinsic deductive system.
⊢ Basically, occurrence nets are rudiments of proof-nets.To each cut-free linguistically marked derivation π with conclusion ⊢ Γ we will assign an occurrence net σ(π), which is an occurrence net of ⊢ Γ. (Note that for a linguistically well-formed sequent there is only one occurrence net possible.)Definition 3.6.The occurrence net σ(π) of a cut-free linguistically marked derivation π is constructed by induction on π.
• If π is the axiom ⊢ X, X, where X = p(e 1 , . . ., e n ), the net is defined by matching each occurrence e i in X with the occurrence e i in X = p(e n , . . ., e 1 ).• If π is obtained from a derivation π ′ by the (`) rule, then σ(π) = σ(π ′ ).
• If π is obtained from some π ′ by the (∀) rule applied to a formula A ′ = A[ v /x] and introducing the formula ∀xA, then σ(π) = σ(π ′ ) \ {(v l , v r )}, where v l , v r are the two occurrences of v in A ′ .(The variable v has no free occurrences in the premise other than those in A ′ , and, since all sequents are linguistically marked, there must be precisely one left and one right occurrence of v in and introducing the formula ∃xA, there are two cases depending on σ(π ′ ).Let v l and v r be, respectively, the left and the right occurrence of v in A ′ corresponding to the two occurrences of x in A bound by the existential quantifier. - (If we see occurrence nets geometrically as bipartite graphs, then the (`) rule does not change the graphs, the (⊗) rule takes the disjoint union of two graphs.The (∀) rule erases the link corresponding to the two occurrences that become bound by the universal quantifier.The (∃) rule has two cases: it erases a link in the first case and glues two links into one in the second case.An example for the second case of the (∃) rule is shown in Figure 2.) In what follows we will use a number of times the operation of replacing a free variable occurrence in an expression with another variable.So we introduce some notation generalizing familiar notation for substitution.Let Φ be a context or a formula, let x be a free variable occurrence in Φ and v ∈ Var .Then Φ[ v /x] is the expression obtained from Φ by replacing x with v.We will also use the notation Φ[ for iterated substitutions, where it is assumed implicitly that x 1 , . . ., x n are pairwise distinct occurrences, so that the substitutions commute with each other.
Finally, we will use for an induction parameter the size of a cut-free derivation defined in the following natural way.If the derivation π is an axiom then the size size(π) of π is 1.If π is obtained from a derivation π ′ by a single-premise rule then size(π) = size(π ′ ) + 1.If π is obtained from derivations π 1 , π 2 by a two-premise rule then size(π) = size(π 1 ) + size(π 2 ) + 1.
Proposition 3.7.If Γ, Γ ′ are linguistically marked contexts differing from each other only by renaming bound variables and the sequent ⊢ Γ is MLL1 derivable with a cut-free derivation π, then ⊢ Γ ′ is derivable with a cut-free derivation π ′ of the same size and with the same occurrence net, size(π Proof.Induction on π. Proposition 3.8.Let π be a linguistically marked cut-free MLL1 derivation with conclusion ⊢ Γ, and assume that (e l , e r ) ∈ σ(π).Let v ∈ Var be such that e l , e r are not in the scope of a quantifier Qv, Q ∈ {∀, ∃}, and let Γ = Γ[ v /e l , v /er].Then ⊢ Γ is derivable in MLL1 with a linguistically marked cut-free derivation π of the same size as π.Moreover, if v l , v r are occurrences of v in Γ replacing, respectively, the occurrences e l , e r in Γ, then σ( π) = (σ(π) \ {(e l , e r )}) ∪ {(v l , v r )}.
This means that Γ ′ contains some formula A, while Γ contains the formula ∃xA ′ , where A = A ′ [ e //x], and the occurrences e ′ l , e ′ r of e in A that correspond to the two occurrences of x in A ′ are linked in σ(π ′ ) to, respectively, e r , e l , i.e. (e l , e ′ r ), (e ′ l , e r ) ∈ σ(π ′ ).Note that Then Γ is obtained from Θ by replacing B with A. Moreover, the sequent ⊢ Γ is derivable from ⊢ Θ by the (∃) rule.It follows that, if the occurrences e ′ l , e r , e l , e ′ r in Γ ′ are not in the scope of a quantifier Qv, Q ∈ {∀, ∃}, then, by the induction hypothesis (applied twice), we have that ⊢ MLL1 Θ, hence ⊢ MLL1 Γ.However, the above condition may fail, and then we cannot apply the induction hypothesis directly.Therefore, in a general case, we need some more work.
By renaming bound variables if necessary, we can obtain from Γ ′ a linguistically marked context Γ ′′ such that the occurrences e ′ l , e r , e l , e ′ r are not in the scope of a quantifier Qv, Q ∈ {∀, ∃}.By the preceding proposition the sequent ⊢ Γ ′′ is derivable with a cut-free derivation π ′′ , where size(π . Now the induction hypothesis can be applied for sure and the sequent ⊢ Θ ′′ is derivable with a linguistically marked cut-free derivation ρ, and size(ρ) = size(π ′′ ) = size(π ′ ).Moreover, r are the occurrences of v in Θ ′′ replacing, respectively, the occurrences e ′ l , e r , e l , e ′ r in Γ ′′ .Let A ′′ be the formula in Γ ′′ corresponding to A in Γ ′ , and B ′′ be the formula in Θ ′′ obtained from 3) may differ from B only by renaming bound variables.Let Θ be the context obtained from Θ ′′ by replacing B ′′ with B. Then Θ and Γ, as well, may differ only by renaming bound variables.But ⊢ Θ is derivable from ⊢ Θ ′′ by the (∃) rule, i.e. the derivation ρ of ⊢ Θ is obtained from ρ by attaching the (∃) rule.Since size(ρ) = size(π ′ ), it follows that size( ρ) = size(π), and the occurrence net σ( ρ) is computed from (3.4).Applying Proposition 3.7 once more, we obtain the desired result.

Linguistic derivations.
Definition 3.9.Let ⊢ Γ be a linguistically well-formed MLL1 sequent containing a formula A and let s, t ∈ V ar, s ̸ = t, have, respectively, a left and a right free occurrences in A, denoted as s l and t r .Let s r be the unique right occurrence of s in Γ, and t l be the unique left occurrence of t.Let x, v ∈ Var be such that x does not occur in A freely, and s r , t l do not occur in Γ in the scope of a quantifier Qv, v ∈ {∀, ∃}.
An example of the (∃ ′ ) rule is the following where the valency v(a) = (1, 1).In the notation of the above definition, the sequents in (3.5) have the following structure: where we also indicated the formula A in the context Γ that corresponds to the formula A in the context Γ. Proposition 3.10.If ⊢ Γ is an MLL1 derivable linguistically well-formed sequent and the sequent ⊢ Γ is obtained from ⊢ Γ by the (∃ ′ ) rule, then ⊢ Γ is linguistically well-formed and MLL1 derivable.
Proof.Let the notation be as in the definition above.By Proposition 3.4 any cut-free derivation π of ⊢ Γ is linguistically marked so it has an occurrence net σ(π).Moreover, since ⊢ Γ is linguistically well-formed, there are only two occurrences of s and t in Γ, which implies (s l , s r ), (t l , t r ) ∈ σ(π).
By renaming, if necessary, bound variables of A we can obtain from Γ a linguistically wellformed context Θ such that s l , t r in Θ are not in the scope of a quantifier Qv, Q ∈ {∀, ∃}.By Proposition 3.7, the sequent ⊢ Θ is cut-free derivable with a linguistically marked derivation ρ such that σ(ρ) = σ(π), i.e. (s l , s r ), (t l , t r ) ∈ σ(ρ).It follows from Proposition 3.8 that Let B be the formula in Θ corresponding to A in Γ and B ′ be the formula in Θ ′ corresponding to B in Θ.Finally, let v l , v ′ r , v ′ l , v r be the occurrences of v in Θ ′ replacing the occurrences t l , t r , s l , s r in Θ respectively, and let . It follows from the definition that the formulas B and A, where A is the formula in Γ corresponding to A ′ in Γ ′ , may differ only by renaming bound variables.Let Θ be obtained from Θ ′ by replacing B ′ with B. Then the sequent ⊢ Θ is derivable from ⊢ Θ ′ by the (∃) rule.But Θ, again, may differ from Γ only by renaming bound variables, and the statement follows from Proposition 3.7.That ⊢ Γ is linguistically well-formed is obvious from counting free left and right occurrences.
Note that on the level of occurrence nets, seen as bipartite graphs, the (∃ ′ ) rule does the same gluing as (∃); only vertex labels are changed.Definition 3.11.Derivations of linguistically well-formed sequents using rules of MLL1 and the (∃ ′ ) rule and involving only linguistically well-formed sequents are linguistic derivations.Lemma 3.12.Any cut-free MLL1 derivation π of a linguistically well-formed sequent ⊢ Γ translates to a linguistic derivation.
Proof.By Proposition 3.4 the derivation π is linguistically marked.We use induction on size(π).
The main case is when the last step in π is the (∃) rule applied to a cut-free linguistically marked derivation π ′ of some non-linguistically well-formed ⊢ Γ ′ .This means that Γ ′ has four free occurrences of some free variable v (two of which are renamed when the quantifier is introduced in Γ).Let v ′ l , v ′ r be, respectively, the left and the right occurrences of v in Γ ′ that become bound in Γ, and let v l , v r be, respectively, the remaining left and right occurrence of v in Γ ′ (inherited by Γ).We have that Γ ′ contains a formula A in which v ′ l , v ′ r are located and Γ is obtained from Γ ′ by replacing A with the formula , then, by Proposition 3.8, the sequent ⊢ Γ ′′ , where ] and e ∈ Var is fresh, is derivable with the derivation of the same size as π ′ .But ⊢ Γ is equally well derivable from ⊢ Γ ′′ by the (∃) rule, and the statement follows from the induction hypothesis.Otherwise we have Then ⊢ Γ ′′ is, again by Proposition 3.8, derivable with a derivation of the same size as π ′ .But ⊢ Γ can be obtained from ⊢ Γ ′′ by the (∃ ′ ) rule, and the statement follows.
Thus, adding the (∃ ′ ) rule, we obtain a kind of intrinsic deductive system for the linguistically well-formed fragment.It might seem though that the usual syntax of first order sequent calculus is not very natural for such a system.It is not even clear how to write the (∃ ′ ) rule in the sequent calculus format concisely.Arguably, some other representation might be desirable.

Tensor type calculus
We assume that we are given an infinite set Ind of indices.They will be used in all kinds of syntactic objects (terms, types, typing judgements) that we consider.Indices will have upper or lower occurrences, which may be free or bound.(The exact meaning of free and bound occurrences for different syntactic objects will be defined below.)Following the practice of first order logic, we will write e [ i /j] , respectively e [ i /j] , for the expression obtained from e by replacing the upper, respectively lower, free occurrence(s) of the index j with i, implicitly stating by this notation that the substituted occurrences of i are free in the resulted expression.We will write I • (e) and I • (e) for the sets of upper and lower indices of e respectively, and I(e) for the pair (I • (e), I • (e)); similarly, F I(e) = (F I • (e), F I • (e)) for sets of free indices.
For pairs of index sets W i = (U i , V i ), i = 1, 2, we write binary operations componentwise, e.g.
4.1.Tensor terms.Definition 4.1.Given an alphabet T of terminal symbols, tensor terms (over T ) are the elements of the free commutative monoid (written multiplicatively with the unit denoted as 1) generated by the sets satisfying the constraint that any index has at most one lower and one upper occurrence.Generating set (4.1) elements of the form [w] j i are elementary regular tensor terms and those of the form [w] are elementary singular tensor terms.
(The adjective "tensor" will often be omitted in the following.)It follows from the definition, that an index in a term cannot occur more than twice.Definition 4.2.An index occurring in a term t is free in t if it occurs in t exactly once.An index occurring in t twice (once as an upper one and once as a lower one) is bound in t.A term is β-reduced if it has no bound indices.Terms t, t ′ that can be obtained from each other by renaming bound indices are α-equivalent, t ≡ α t ′ .Definition 4.3.β-Reduction of tensor terms is generated by the relations where ϵ denotes the empty word.Terms related by β-reduction are β-equivalent, notation: t ≡ β s.
The meaning of β-reduction will be discussed shortly in Section 4.1.1.It is easy to see that free indices are invariant under β-equivalence and that any term is β-equivalent to a β-reduced one.Note also that α-equivalent terms are automatically β-equivalent, because their β-reduced forms coincide.Definition 4.4.A β-reduced term is regular if it is the product of elementary regular terms.A general tensor term is regular if it is β-equivalent to a β-reduced regular term.A tensor term that is not regular is singular.
The elementary term [ϵ] j i is denoted as δ j i , more generally, we write δ i 1 ...i k j 1 ...j k for the term When all indices i 1 , . . ., i k , j 1 , . . ., j k are pairwise distinct, the term δ i 1 ...i k j 1 ...j k is called Kronecker delta.11:11 i j A term t is lexical if it is regular and not β-equivalent to some term of the form δ i j • t ′ with (i, j) ∈ F I(t).
Multiplication by Kronecker deltas amounts to renaming indices: if t is a term with (i, j) ∈ F I(t) and (i For the case of i = j, we have from (4.2) that δ i i ≡ β 1.As for lexical terms they can be equivalently characterized as β-equivalent to regular β-reduced ones of the form [ where all w 1 , . . ., w k are nonempty.
4.1.1.Geometric representation.We think of regular terms as bipartite graphs having indices as vertices and edges labeled with words, the direction of edges being from lower indices to upper ones.A regular term [w] j i , i ̸ = j, corresponds to a single edge from i to j labeled with w, the product of two terms without common indices is the disjoint union of the corresponding graphs, and a term with repeated indices corresponds to the graph obtained by gluing edges along matching vertices.The unit 1 corresponds to the empty graph.As for singular terms, such as [w] i i , they correspond to closed loops (with no vertices) labeled with cyclic words (this explains the last relation in (4.2)).These arise when edges are glued cyclically.Singular terms are pathological, but we need them for consistency of definitions.Note however our convention that when there are no labels, loops evaporate (δ i i ≡ β 1), so that the singularity does not arise.The correspondence between terms and edge-labeled graphs is illustrated in Figure 3.We emphasize that this geometric representation is an invariant of β-equivalence.
Finally, we note that a Kronecker delta is a bipartite graph with no edge labels, and a lexical term, vice versa, is a graph whose every edge has a nonempty label.
(We also remark that in the system introduced in [Sla21b], which preceded this work, empty loops were not factored out.This was adequate for problems considered there.)4.1.2.Remarks on binding and multiplication.We emphasize that binding in terms is global, not restricted to some "scope".If t is a subterm (a factor) in a term s and t has a bound index i, then i is bound everywhere in s.In particular, if t and t ′ both have a bound index i then the expression tt ′ simply is not a term (it has four occurrences of i).In general, because term multiplication is only partially defined (concretely, the expression ts is a term if I(t) ⊥ I(s)), we have to be careful when commuting multiplication with β-or α-equivalence.It can be that t ≡ β t ′ , but for some term s the product ts is well-defined, while t ′ s is not a term at all because of index collisions.
As a compensation, multiplication of terms is strictly associative whenever defined: if (ts)k is a term then t(sk) is also a term and the two are strictly equal.Also, if t → β t ′ , s → β s ′ , k → β k ′ and the expression tsk is a term then t ′ s ′ k ′ is also a term and tsk → β t ′ s ′ k ′ .Passing to equivalence classes we have the following: if t ≡ β t ′ , s ≡ β s ′ , k ≡ β k ′ and both p i 1 ,...,in j 1 ,...,jm = p jm,...,j 1 in,...,i 1 .
A (On the other hand, one could argue that some amount of non-associativity, in the case of linguistic applications, might be an advantage rather than a drawback.Such an observation might suggest possible directions for refinements and modifications for the system introduced in this paper.)4.2.Tensor formulas and types.Definition 4.5.Given a set Lit + of positive literals, where every element p ∈ Lit + is assigned a valency v(p) ∈ N 2 , the set Fm of tensor pseudoformulas is built according to the grammar in Figure 4, where Lit − and Lit are, respectively, the set of negative literals and of all literals.The convention for negative literals is that v(p) = (m, n) if v(p) = (n, m).The set At is the set atomic pseudoformulas.Duality (.) is not a connective or operator, but is definable.The symbols ∇, △ are binding operators.They bind indices exactly in the same way as quantifiers bind variables.The operator Q ∈ {∇, △} in front of an expression Q i j A has A as its scope and binds all lower occurrences of i, respectively, upper occurrences of j in A that are not already bound by some other operator.Definition 4.6.A pseudoformula A is well-formed when any index has at most one free upper and one free lower occurrence in A, and every binding operator binds exactly one lower and one upper index occurrence.A well-formed pseudoformula A is a tensor formula or a pseudotype.
Note that definitions of free and bound indices for tensor terms and tensor formulas are different.In particular, unlike terms, general tensor formulas (that are not tensor types) may have repeated free indices (i.e. an index may have both an upper and a lower free occurrence).Also, unlike the case of terms, binding in tensor formulas is local, visible only in the scope of a binding operator.
Tensor formulas that can be obtained from each other by renaming bound indices are α-equivalent.The set of atomic types (i.e.coming from atomic pseudoformulas) is denoted as At.
Definition 4.7.A tensor pseudotype context Γ, or, simply, a tensor context is a finite multiset of pseudotypes such that for any two distinct A, B ∈ Γ we have that F I(A) An ordered tensor context Γ is defined identically with the difference that Γ is a sequence rather than a multiset.Again, in a pseudotype context an index can have two free occurrences, once as a lower one and once as an upper one.For example the expression a i , a i is a legitimate pseudotype context, but not a type context.

Sequents and typing judgements.
Definition 4.8.A pseudotyping judgement Σ is an expression of the form t :: Γ, where Γ is a tensor context and t is a tensor term such that When Γ is a type (not just pseudotype) context, we say that Σ is a tensor typing judgement.
A tensor sequent is an expression of the form ⊢ Σ, where Σ is a pseudotyping judgement.An ordered pseudotyping judgement and ordered tensor sequent are defined identically with the difference that the tensor context should be ordered.(In the paper [Sla21b] preceding this work we used a slightly different notation for tensor sequents with the term to the left of the turnstile.) Spelling out defining relation (4.3): if we erase from Σ all bound indices of Γ, then every remaining index has exactly one upper and one lower occurrence.When Σ is a tensor typing judgement, we have F I(t) = F I(Γ) † , i.e. every index occurring in Σ freely has exactly one free occurrence in Γ and one in t.In this case we read Σ as "t has type Γ".A pseudotyping judgement is not a genuine typing judgement if there are repeated free indices in the tensor context (i.e.some index in the tensor context has both an upper and a lower free occurrence).When t = 1 we write the judgement Σ simply as Γ.When Γ consists of a single formula F , we write Σ as t : F .When t is β-reduced or lexical we say that Σ is, respectively, β-reduced or lexical.
The ordered and unordered contexts and sequents correspond to two possible formulations of sequent calculus.We will generally use the unordered version, but for geometric representation of tensor sequents and sequent rules we need to consider explicit Exchange rule.The definitions below apply to both versions.Definition 4.9.If t, t ′ are terms with t ≡ β t ′ then the pseudotyping judgements t :: Γ and t ′ :: Γ are β-equivalent, t :: Γ ≡ β t ′ :: Γ.
α-Equivalence of pseudo-typing judgements is generated by the following: η-Expansion of pseudo-typing judgements is the transitive closure of the relation defined by Tensor sequents ⊢ Σ, ⊢ Σ ′ are, respectively α-, β-or η-equivalent iff Σ and Σ ′ are.
η-Expansion removes from the tensor context free index repetitions by renaming them and, simultaneously, adds Kronecker deltas to the term as a compensation.Typing judgements have no repeated free indices in the tensor context and are, thus, η-long in the sense that they cannot be η-expanded.A general pseudotyping judgement could be thought as a shorthand notation for its η-expansion; the sequent ⊢ a i , a i "morally" is a short for ⊢ δ j i :: a i , a j .Lexical pseudotyping judgements, on the contrary, are η-reduced in the sense that they are not η-expansions of anything, for having no Kronecker deltas in the term.Lexical typing judgements, at once η-long and η-reduced, will have natural interpretation as nonlogical axioms.It is easy to see that any pseudotyping judgement has (many αβ-equivalent) η-long and η-reduced forms.If tensor terms can be thought as edge-labeled graphs, then ordered pseudotyping judgements or tensor sequents correspond to particular pictorial representations of these graphs.Especially natural the representation is for genuine typing judgements, so we discuss it first.Let Σ = t :: Γ, where t is β-reduced, be an ordered typing judgement, i.e. such that F I(t) = F I(Γ) † .(When the term is not β-reduced, we replace it with its β-reduced form.)We interpret free indices of Γ as vertices.For a pictorial representation we equip the set of vertices with a particular ordering corresponding to their positioning in Γ. Say, indices occurring in the same formula are ordered from left to right, from top to bottom (first come the upper indices, then come the lower ones), and the whole set of free indices occurring in Γ is ordered lexicographically according to the ordering of formulas in Γ, i.e. indices occurring in A come before indices occurring in B if A comes before B in Γ.We depict them aligned, say, horizontally in this order.
The edge-labeled graph on these vertices is constructed as follows.Free indices in Γ are in bijection with free indices/vertices of t and we connect them with labeled edges corresponding to factors of t.That is, for any index µ ∈ F I • (Γ) we have that µ ∈ F I • (t) and there is unique ν ∈ F I • (t) such that t has the form t = [w] ν µ t ′ , so that t, seen as a graph, contains and edge from µ to ν labeled with the word w.It follows that ν ∈ F I • (Γ), and we draw an edge from µ to ν with the label w.In this way every index/vertex in F I(Γ) becomes adjacent to a (unique) edge.
The constructed graph is a specific geometric representation of the graph corresponding to t, the representation being induced by a particular ordering of vertices.Note that the direction of edges is from upper indices of Γ to lower ones (upper indices of Γ correspond to lower indices of t and vice versa).Also, note that bound indices of Γ are not in the picture.
When Σ = t :: Γ is only a pseudo-typing judgement, i.e. there are repeated free indices in Γ, we treat it as a short expression for its η-long expansion t ′ :: Γ ′ .Any pair of repeated free index occurrences in Γ corresponds to a Kronecker delta, i.e. an edge in t ′ , connecting two distinct vertices and carrying no label.In this case, for geometric representation of Σ, we take as vertices the set of free index occurrences rather than indices in Γ and order them in the same way a above.In the picture, we connect every pair of repeated free indices/vertices 11:15 of Γ with an edge carrying no label and directed from the upper occurrence to the lower one.The prescription for the remaining indices has already been described.An example of a concrete pseudotyping judgement representation is given in Figure 5.
Observe that αβη-equivalent pseudo-typing judgements or sequents have identical geometric representation (up to vertex labeling).Usually it is convenient to erase indices from the picture, avoiding notational clutter.For example, the pseudotyping judgement µl , c km is an η-expansion of the latter.Also, we note that lexical typing judgements correspond to pictures where every edge has a non-empty label.

Sequent calculus.
4.4.1.Rules.We defined tensor sequents in order to define tensor grammars, which generate languages from a given lexicon of typing judgements.But at first, we introduce the underlying purely logical system of extended tensor type calculus (ETTC).(The title "extended", introduced in [Sla21b], refers to usage of binding operators, which extend plain types of MLL.)The system of ETTC, being cut-free, does not use any non-logical axioms and is independent from terminal alphabets.
Our default formulation involves unordered tensor sequents.For geometric representation of the rules one needs an ordered formulation with the explicit rule for exchange; this will be discussed in the next subsection.
Definition 4.10.The system of extended tensor type calculus (ETTC) is given by the rules in Figure 6a, where sequents are unordered, and it is assumed that all expressions are well-formed, i.e. there are no forbidden index repetitions and upper occurrences match lower ones.
The requirement that all expressions in Figure 6a must be well-formed is not to be overlooked.It imposes severe restrictions on the rule premises.These are spelled out in Figure 6b (recall our shorthand notation for pairs of sets introduced in the beginning of this section).
Proposition 4.11.The rules in Figure 6a transform well-formed tensor sequents to wellformed tensor sequents iff the premises satisfy the conditions in Figure 6b. Proof.
• (αη → ), (αη → ): Sufficiency is obvious.The rule adds two matching occurrences of the fresh index j, and one free occurrence of i in the tensor context gets moved to the term without changing the polarity.Let us check necessity.For definiteness, consider the (αη → ) rule, the other case being identical.There are two possibilities for the term in the conclusion of the rule to be well-formed.Either i ∈ F I • (t), i ̸ ∈ I • (t) or i ̸ ∈ |I(t)|.If the first possibility holds, then it must be that i ∈ F I • (Γ) for the premise to be well-formed.Assume that the second possibility holds.Then it must be that i ∈ F I • (Γ [ j /i] ) = F I • (Γ) for the conclusion of the rule to be well-formed.But i ∈ F I • (Γ) and i ̸ ∈ |I(t)| implies, again, i ∈ F I • (Γ) or the premise is not well-formed.Thus, in both cases the condition i ∈ F I • (Γ) must hold.
Consider the second condition, j ̸ ∈ |I(t)| ∪ |F I(Γ)|.We note that the conclusion of the rule has a free upper occurrence of j located in the tensor context (the one replacing i in  ) and an occurrence of j in the term located in the factor δ i j .If j ∈ |F I(Γ)| then there is a third occurrence of j in the conclusion located in the tensor context, and if j ∈ |I(t)| then there is a third occurrence of j in the conclusion located in the term.In both cases the conclusion is not well-formed.
• (⊗) : Sufficiency is very easy.We also need to check that all conditions are indeed necessary.
Consider, for example, the first one that |I(t)| ∩ |I(s)| = ∅.Assume, for a contradiction, that i ∈ |I(t)| ∩ |I(s)|.For the term ts in the conclusion to be well-formed, it must be that i occurs in t and in s freely (without repetitions) and with opposite polarities.It follows that i also has free occurrences in the contexts Γ, A and B, Θ, otherwise the premises of the rule are not well-formed pseudo-typing judgements.But then the conclusion of the rule is not well-formed, because (i, i) ∈ I(ts) ∩ F I(Γ, A ⊗ B, Θ).The other conditions are obtained similarly.• (Cut): Similar to the (⊗) case.
• (∇), (△): The condition is necessary simply for the formula in the conclusion to be well-formed.For sufficiency we observe that there are also an upper and a lower free occurrence of µ and ν respectively in the premise, and a simple analysis shows that indices in the conclusion match correctly.
4.4.2.Geometric meaning.In order to give geometric representation of the ETTC rules we need to consider ordered sequents and enrich the system with the rule of exchange ⊢ t :: Γ, A, B, Θ ⊢ t :: Γ, B, A, Θ (Ex).
Clearly, this results in an equivalent formulation.Then, using geometric representation of tensor sequents, the rules of ETTC can be illustrated as in Figure 7.The identity/structure group {(Id), (Cut), (Ex))} is schematically illustrated in Figure 7a.As for the multiplicative group, the (⊗) rule puts two graphs together in the disjoint union and 11:17 Finally, the (△) rule glues together two indices/vertices, and the (∇) rule is applicable only in the case when the corresponding indices/vertices are connected with an edge carrying no label.Then this edge is erased from the picture completely (the information about the erased edge is stored in the introduced type).This is illustrated in Figures 7b, 7c (the lines of dots denote that there might be other vertices around).4.4.3.Towards first order translation.We will discuss the exact relationship of ETTC with the linguistic fragment of MLL1 in due course, but the outline of their correspondence is the following.Indices in tensor formulas correspond to variables in predicate formulas, with upper/lower polarities of indices corresponding to left/right polarities of variables.Multiplicative connectives translate to themselves, while the binding operators ∇/△ of ETTC correspond to the ∀/∃ quantifiers in the linguistic fragment.A quantifier in the linguistic fragment binds exactly two variable occurrences of opposite polarities.These two bound occurrences in a predicate formula translate to two different indices bound by the corresponding operator in the tensor formula: ∀xA(x, x) translates to ∇ i j A j i .Tensor sequents may also contain terms, and these do not translate to the first order language directly.However, we note that Kronecker deltas behave much like (some rudimentary versions of) equalities to the left of the turnstile.Typically, the tensor sequent ⊢ δ i 1 ...i k j 1 ...j k :: Γ could be thought intuitively as the sequent j 1 = i 1 , . . ., j k = i k ⊢ Γ in a first order language with equality.At least, the (αη) rules are consistent with such an interpretation.And the (≡ β ) rule, in the absence of terminal symbols, amounts to the equivalences δ i j δ j k ≡ β δ i k and δ i i ≡ β 1, which, basically correspond to transitivity and 11:21 Let a side cut be between sequents ⊢ Σ 1 , ⊢ Σ 2 of the forms ⊢ t :: ∇ µ ν B, Φ, A, ⊢ s :: A, Θ respectively, where ⊢ Σ 1 is obtained by the (∇ ≡α ) rule from the sequent ⊢ Σ 0 of the form ⊢ δ i j t :: B The transformation of derivations is shown in Figure 11a, where in order to avoid possibility of forbidden index repetitions, we use Proposition 5.3 and replace the derivation of ⊢ Σ 0 with a derivation with the same size and an α-equivalent conclusion obtained from Σ 0 by renaming i, j with fresh indices.The induction parameter N for the new derivation is smaller at least by 1.
The grammar, obviously, is an extension of a one adapted from LC.However, the lexical entry for "who", which allows medial extraction, is not a translation from LC, as is manifested by the binding operator in the type.Using the implicational notation, the above lexical entry can be written as [who] i j : (np\np)/△ u t ((np u t ) ⊸ s)).It might be entertaining to reproduce the derivation in the geometric language.7. Correspondence with first order logic 7.1.Translating formulas.Given a linguistically marked first order language, we identify predicate symbols with literals of the same valencies and define the η-reduced and η-long translations, denoted respectively as ||.|| and ||.|| η→ , of linguistically well-formed formulas and contexts to tensor formulas and contexts.For the η-reduced translation we identify first order variables with indices, left occurrences with upper ones and right occurrences with lower ones.For the η-long translation, on the other hand, we identify free variable occurrences 11:31  with indices, so that for each x ∈ Var there are two indices x l , x r ∈ Ind , corresponding to its left and right occurrence respectively.
Definition 7.1.The η-long translation of linguistically well-formed MLL1 formulas, contexts and sequents to ETTC is given in Figure 18a.The η-reduced translation of linguistically well-formed MLL1 formulas, contexts and sequents to ETTC is defined up to α-equivalence of tensor formulas and is given in Figure 18b, where it is assumed that the indices u, v in the translation of quantified formulas are such that they result in well-defined expressions.
The need to choose bound indices u, v in the η-reduced translation of quantifiers makes the latter translation ambiguous.However, different choices of indices result in α-equivalent tensor formulas, which are provably equivalent in ETTC.