The Lambek calculus  was introduced for describing natural language syntax by means of type-logical (categorial) grammars. Further research on type-logical grammar showed that the original system proposed by Lambek appears to be insufficient to cover intrinsic linguistic phenomena, and so various extensions and modifications of the Lambek calculus were introduced (see, for example, books by Morrill , Moot and Retoré  and others). One of these extensions is the Lambek calculus with brackets introduced by Moortgat . While the original Lambek calculus is fully associative, brackets block associativity in specified situations, thus disallowing derivations of ungrammatical phrases like “the girl whom John loves Mary and Pete loves” (see  for a more detailed analysis).
The original Lambek grammars generate precisely context-free languages, as shown by Pentus . For the Lambek calculus extended with brackets, the context-free upper bound was claimed by Jäger . Unfortunately, Jäger’s argument relied upon a lemma by Versmissen , which was afterwards shown to be incorrect .
Recently, however, Kanazawa  returned to this question and presented a new proof, based on a insightful combination of Jäger’s ideas and the original Pentus’ approach. Kanazawa proved this result for two versions of the Lambek calculus with brackets: not allowing empty antecedents (we denote it by ) and allowing them ().
The third variant of the calculus, , is obtained from by adding the multiplicative unit constant, . As noticed by Kanazawa , Pentus-style reasoning is not applicable to the case with the unit constant (even without brackets). In Pentus’ proof, the target context-free grammar rules are essentially all derivable sequents of a bounded size. For and , the set of these sequents is finite; however, the measure of size used by Pentus ignores occurrences of , thus this set of sequents becomes infinite, and doesn’t yield a context-free grammar. A workaround for this issue (in the case without brackets) was presented by Kuznetsov : the unit constant gets eliminated by a faithful translation of the calculus with the unit into the original system. The same problem for the case with brackets (i.e., whether -grammars generate precisely context-free languages) was left as an open question in .
In this paper, we extend the construction from  to an embedding of into . Thus, we show that -grammars generate the same class of languages as -grammars—and, due to Kanazawa , it is the class of context-free languages.
The translation of to also has an algorithmic application. While the original Lambek calculus, and, therefore, the Lambek calculus with brackets is NP-complete (Pentus ), for sequents of bounded formula complexity and bracket nesting depth Kanovich et al. , extending Pentus , present a polynomial-time algorithm for deciding derivability in . Our translation generalises this algorithm from to .
2 The Calculi and
The syntax of the Lambek calculus with brackets is a bit more involved than a standard sequential calculus. Formulae of are recursively built from variables () using three binary connectives, (left division), (right division), (product) and two unary ones, and . The binary connectives come from the original Lambek calculus ; as one can easily see, the system defined below is a conservative extension of the version of the Lambek calculus which allows empty antecedents . The unary connectives operate brackets that are used to introduce controlled non-associativity. Sequents of are expressions of the form , where is a formula and is a meta-formula. Meta-formulae are built from formulae using comma (,) and brackets ([…]). By definition, comma is associative, and the empty meta-formula is the unit object w.r.t. comma: and are both considered graphically equal to . By we denote a meta-formula with a designated occurrence of a sub-meta-formula .
Axioms and rules of are as follows.
Adding the unit constant, , with the following rules of inference (cf. ),
yields the calculus .
The cut rule of the following form is admissible .
Admissibility of cut allows replacing a subformula with an equivalent one preserving derivability.
3 Translating to
In this section we present a translation of formulae that eliminates the unit constant.
Informally, we replace each occurrence of by , where is a fresh variable. For classical propositional logic, this would be sufficient, since there is equivalent to the “true” constant. In order to make this construction work for the substructural system , however, we also need to add some extra ’s, depending on the polarity of specific subformula.
Formally, we define two translations, and , by joint induction:
For metaformulae, we define only :
For any -sequent that has no occurrences of , is derivable in iff is derivable in .
In order to make the proof more convenient, we first reformulate : remove and replace some of the other rules with the following ones (here and further means ).
All other rules are left intact.
Let’s call the new calculus .
A sequent is derivable in iff it is derivable in .
Since the new -rules become the original rules of when , for the “if” part it is sufficient to show that is admissible in , i.e., that if is derivable in , then so is .
Proceed by induction on derivation. Let’s denote , , and (except for the designated part that is affected by the rule) in the rules of as the context. Consider the last rule that derives .
If this designated occurrence of is inside the context of the last rule that derives , then we can trace it upwards to the premise (one of the premises) of the rule, replace by there (the sequent is still derivable by induction hypothesis), and then apply the rule. In other words, in this case the two rules are exchangeable, and we can propagate the rule upwards. For , , , , , , , and this is the only possible situation: a possible place for inserting is always in the context.
If is an axiom of the form , namely, , then is either or ; both are again instances of . The case is handled in the same way. For the case, the only interesting situation is when is added outside the brackets (the case when it is added into the context , was already considered); in this situation the extra again gets absorbed by the rule. The case is dual.
For the “only if” part, just notice that each -rule can be represented as a consequent application of the corresponding rule of and then times (or times for ). ∎
Proof of Theorem 1.
The “only if” part: let be derivable in . Then by Lemma 2 it is derivable in . We need to show that is derivable in . Proceed by induction on the derivation of in . Applications of rules without are translated into “as is.” The transforms into , which is derivable in ; becomes , which is also derivable. Finally, and are translated as follows:
The “if” part is easier: if is derivable in , then it is also derivable in . Substitute for (substituting formulae for variables—but not for the unit constant!—preserves derivability). Since is a fresh variable, the substitution affects only the combinations introduced by and , and it is easy to see that for any formula after this substitution and become equivalent to . Thus, transforms to a sequent equivalent to , therefore the latter one is derivable in . ∎
The first application of Theorem 1 is the characterisation of the class of languages generated by -grammars.
Let be a finite alphabet. An -grammar over is a triple , where is an -formula (called the target formula), and is a finite relation between letters and -formulae. Jäger  gives two definitions of a word being accepted by such a grammar. The word is s-accepted, if there exist such formulae that ( and the sequent is derivable in . The word is t-accepted, if, again, there exist such that , and there also exists a multiformula such that is derivable and is obtained from by erasing and (i.e., it is the yield of the treelike bracketed structure ). The language t-generated (resp., s-generated) by the grammars defined as the set of all t-accepted (resp., s-accepted) words.
Theorem 1 immediately yields the following corollary:
The class of languages t-generated (resp., s-generated) by -grammars, coincides with the class of languages t-generated (resp., s-generated) by -grammars.
For the inclusion in the non-trivial direction, apply to all formulae associated to letters of by , and to the target formula . ∎
In combination with Kanazawa’s result that -grammars t-generate exactly the class of context-free languages, this gives a solution for the question left open in : -grammars also t-generate exactly all context-free languages. We conjecture that our construction also works for the multimodal version of , solving the second open question from . The question about the class of s-generated languages appears to be still open, though much less interesting from the linguistic point of view.
The second application is a fast algorithm for deciding derivability in . While the full Lambek calculus is NP-complete , Pentus in  introduces a depth parameter (in the product-free case it is just the Horn depth of and ) and presents an algorithm that works in polynomial time w.r.t. and (where is the length of the input sequent). Kanovich et al.  generalise this algorithm to , adding the third parameter, , which is the nesting depth of , , and . The running time of this algorithm is bounded by a polynom of , , and (if there are brackets, absorbs ). Since and alter these parameters only linearly, Theorem 1 yields an algorithm also for
with the same running time estimation:
There exists an algorithm that decides derivability in with running time bounded by a polynom of , , and .
The author was much inspired by recent and older works of Makoto Kanazawa (to which this note is a modest addition). The author is also grateful to Lev Beklemishev, Max Kanovich, Glyn Morrill, Vivek Nigam, Mati Pentus, and Andre Scedrov for in-depth discussions and exchange of ideas in a very warm, friendly, and collaborative atmosphere.
-  M. Fadda, G. Morrill. The Lambek calculus with brackets. In: Language and Grammar: Studies in Mathematical Linguistics and Natural Language, CSLI Publications, Stanford, 2005, 113–128.
-  G. Jäger. On the generative capacity of multi-modal categorial grammars. Research on Language and Computation 1(1), 2003, 105–125.
-  M. Kanazawa. On the recognising power of the Lambek calculus with brackets. arXiv preprint 1709.07695, 2017.
-  M. Kanovich, S. Kuznetsov, G. Morrill, A. Scedrov. A polynomial time algorithm for the Lambek calculus with brackets of bounded order. In: 2nd International Conference on Formal Structures for Computation and Deduction (FSCD 2017). Leibniz International Proceedings in Informatics (LIPIcs), vol. 84, Schloss Dagstuhl—Leibniz-Zentrum für Informatik, 2017, 22:1–22:17.
-  S. Kuznetsov. Lambek grammars with the unit. In: Formal Grammar 2010 and 2011, Lecture Notes in Computer Science, vol. 7395, Springer, 2012, 262–266.
-  J. Lambek. The mathematics of sentence structure. American Mathematical Monthly 65, 1958, 154–170.
-  J. Lambek. On the calculus of syntactic types. In: Structure of Language and Its Mathematical Aspects. Proc. Symp. Appl. Math., AMS, Providence, RI, 1961, 166–178.
-  J. Lambek. Deductive systems and categories II: Standard constructions and closed categories. In: Category Theory, Homology Theory, and Their Applications I. Lecture Notes in Mathematics, vol. 86, Springer, 1969, 76–122.
-  M. Moortgat. Multimodal linguistic inference. Journal of Logic, Language, and Information 5(3–4), 1996, 349–385.
-  R. Moot, C. Retoré. The logic of categorial grammars: a deductive account of natural language syntax and semantics. Springer, 2012.
-  G. V. Morrill. Categorial grammar: logical syntax, semantics, and processing. Oxford University Press, 2011.
-  M. Pentus. Lambek grammars are context-free. In: Logic in Computer Science (LICS), 1993, 430–433.
-  M. Pentus. Lambek calculus is NP-complete. Theoretical Computer Science 357(1–3), 2006, 186–201.
-  M. Pentus. A polynomial-time algorithm for Lambek grammars of bounded order. Linguistic Analysis 36(1–4), 2010, 447–471.
-  K. Versmissen. Grammatical composition: modes, models, modalities. PhD Thesis, OTS Utrecht, 1996.