A sequent calculus for a semi-associative law
Noam Zeilberger



This article is an extended version of a paper presented at FSCD 2017 <cit.>.
The most significant difference is the inclusion of the proof for the lattice property via the coherence theorem, which was raised as an open problem in the FSCD version.
Various aspects of the presentation are also improved, with additional discussion of recent related work as well as some historical remarks.


N. Zeilberger]Noam Zeilberger

School of Computer Science

University of Birmingham


UK
zeilbern@cs.bham.ac.uk


We introduce a sequent calculus with a simple restriction of Lambek's product rules that precisely captures the classical Tamari order, i.e., the partial order on fully-bracketed words (equivalently, binary trees) induced by a semi-associative law (equivalently, right rotation).
We establish a focusing property for this sequent calculus (a strengthening of cut-elimination), which yields the following coherence theorem: every valid entailment in the Tamari order has exactly one focused derivation.
We then describe two main applications of the coherence theorem, including: 1. A new proof of the lattice property for the Tamari order, and 2. A new proof of the Tutte–Chapoton formula for the number of intervals in the Tamari lattice n.


A sequent calculus for a semi-associative law
    [
    
=============================================








§ INTRODUCTION





 §.§ The Tamari order, Tamari lattices and associahedra



Suppose you are given a pair of binary trees A and B and the following problem:
transform A into B using only right rotations.
Recall that a right rotation is an operation acting locally on a pair of internal nodes of a binary tree, rearranging them like so:

    < g r a p h i c s >
      ⟶  
        < g r a p h i c s >

Solving this problem amounts to showing that A ≤ B in the Tamari order.
Originally introduced by Dov Tamari for motivations in algebra <cit.>, this is the ordering on well-formed monomials (or “fully-bracketed words”) induced by postulating that the multiplication operation A B obeys a semi-associative law[Clearly, one has to make an arbitrary choice in orienting associativity from left-to-right or right-to-left.
The literature is inconsistent about this, but since the two possible orders are strictly dual it does not make much difference. ]

    (A B) C ≤ A (B C)

and is monotonic in each argument:

    A_1 B_1 ≤ A_2 B_2A_1 ≤ A_2     B_1 ≤ B_2

For example, the word (p   (q r)) s is below the word p   (q   (r   s)) in the Tamari order:

    < g r a p h i c s >
      ⟶  
        < g r a p h i c s >
      ⟶  
        < g r a p h i c s >

The letters p,q,… are just placeholders and what really matters is the underlying shape of the bracketings, which is what justifies the above description in terms of unlabelled binary trees.
Since such trees are enumerated by the ubiquitous Catalan numbers (there are n = 2nn/(n+1) distinct binary trees with n internal nodes), which also count many other isomorphic families of objects, the Tamari order has many other equivalent formulations as well, such as on strings of balanced parentheses <cit.>, triangulations of a polygon <cit.>,  or Dyck paths <cit.>.

For any fixed natural number n, the n unlabelled Catalan objects of that size form a lattice under the Tamari order, which is called the Tamari lattice n.
For example, the left half of Figure <ref> shows the Hasse diagram of 3, which has the shape of a pentagon (readers familiar with category theory may recognize this as “Mac Lane's pentagon” <cit.>).

More generally, a fascinating property of the Tamari order is that each lattice n generates via its Hasse diagram the underlying graph of an (n-1)-dimensional polytope known as an associahedron <cit.>.



 §.§ A Lambekian analysis of the Tamari order



We will introduce and study a surprisingly elementary presentation of the Tamari order as a sequent calculus in the spirit of Lambek <cit.>.
The calculus consists of just one left rule and one right rule:

    [ L]A B,ΔCA,B,ΔC    [ R]Γ,ΔA BΓA   ΔB

together with two structural rules:

    [id]AA    [cut]Γ,Θ,ΔBΘA   Γ,A,ΔB

Here, the letters A, B, and C again range over fully-bracketed words, although we will henceforth refer to them as logical “formulas”, while the letters Γ, Δ, and Θ range over lists of formulas called contexts.

In fact, all of these rules come straight from Lambek <cit.>, except for the L rule which is a restriction of his left rule for products.
Lambek's original rule looked like this:

    [ L^]Γ,A B,ΔCΓ,A,B,ΔC

That is, Lambek's left rule allowed the formula A B to appear anywhere in the context, whereas our more restrictive rule L requires the formula to appear at the leftmost end of the context.
It turns out that this simple variation makes all the difference for capturing the Tamari order!

For example, here is a sequent derivation of the entailment
(p   (q r)) s ≤ p   (q   (r   s))
(we write L and R as short for L and R, and don't bother labelling instances of id):

    [L](p   (q r)) sp   (q   (r   s))[L]p   (q r),sp   (q   (r   s))[R]p, q r,sp   (q   (r   s))pp   [L]q r,sq (r s)[R]q,r,sq (r s)qq   [R]r,sr srr   ss

If we had full access to Lambek's original rule then we could also derive the converse entailment (which is false for Tamari):

    [L]p   (q   (r   s))(p   (q r)) s[L^]p, q   (r   s)(p   (q r)) s[L^]p, q, r   s(p   (q r)) s[R]p, q, r,s(p   (q r)) s[R]p, q,rp   (q r)pp   [R]q,rq rqq   rr   ss

But with the more restrictive rule we can't – the following soundness and completeness result will be established below.


AB is derivable using the rules L, R, id, and cut if and only if A ≤ B holds in the Tamari order.

As Lambek emphasized, the real power of a sequent calculus comes when it is combined with Gentzen's cut-elimination procedure <cit.>.
We will prove the following somewhat stronger form of cut-elimination:


If ΓA is derivable using the rules L, R, id, and cut, then it has a derivation using only L together with the following restricted forms of R and id: 

    [ R^]Γ^,ΔA BΓ^A   ΔB    [id^]pp

where Γ^ ranges over contexts that don't have a product C D at their leftmost end.

We refer to derivations constructed using only the rules L, R^, and id^ as focused derivations (the above derivation of 
(p   (q r)) s ≤ p   (q   (r   s))
is an example of a focused derivation)
because this stronger form of cut-elimination is precisely analogous to what in the literature on linear logic is called the focusing property for a sequent calculus <cit.>.
Now, a careful analysis of the rules L, R^, and id^ 
also confirms that 
any sequent ΓA has at most one focused derivation.
Combining this with Claims <ref> and <ref>, we can therefore conclude that

Every valid entailment in the Tamari order has exactly one focused derivation.

We will see that this powerful coherence theorem has several interesting applications.



 §.§ The surprising combinatorics of Tamari intervals, planar maps, and planar lambda terms



The original impetus for this work came from wanting to better understand an apparent link between the Tamari order and lambda calculus, which was inferred indirectly via their mutual connection to the combinatorics of embedded graphs.

About a dozen years ago, Fréderic Chapoton <cit.> proved the following surprising formula for the number of intervals in the Tamari lattice n:

    2(4n+1)!/(n+1)!(3n+2)!

Here, by an “interval” of a partially ordered set we just mean a valid entailment A ≤ B, which can also be thought of as the corresponding subposet of elements [A,B] = C | A ≤ C ≤ B.
For example, the lattice 3 contains 13 intervals, as we can easily check:



    < g r a p h i c s >



And at the next dimension, 4 contains exactly 68 intervals (exercise left to the reader!).

We will explain in Section <ref> how the aforementioned coherence theorem can be used to give a new and somewhat more systematic proof of Chapoton's formula for the number of intervals in n.
Chapoton mentions, though, that the formula itself did not come out of thin air, but rather was found by querying the On-Line Encyclopedia of Integer Sequences (OEIS) <cit.>.
Formula (<ref>) is included within entry https://oeis.org/A000260A000260 of the OEIS, and in fact it was derived over half a century ago by the graph theorist Bill Tutte for a seemingly unrelated family of objects: it counts the number of 3-connected, rooted planar triangulations[A rooted planar map is a connected graph embedded in the 2-sphere (or, alternatively, the plane), with one oriented edge chosen as the root. 
A (rooted planar) triangulation (dually, trivalent map) is a (rooted planar) map in which every face (dually, vertex) has degree three.
A map is said to be bridgeless (respectively, 3-connected) if it has no edge (respectively, pair of vertices) whose removal disconnects the underlying graph. (Cf. <cit.>.)] with 3(n+1) edges <cit.>.
Although Chapoton's proof of the correspondence was purely enumerative (going via generating functions), sparked by the observation, Bernardi and Bonichon <cit.> later found an explicit bijection between intervals of the Tamari order and triangulations.
Indeed, the same formula is also known to count bridgeless rooted planar maps with n edges <cit.>, and very recently, Fang <cit.> has presented bijections between these three families of objects.

Quite independently, a few years ago the author noticed another surprising combinatorial connection between unconstrained (i.e., not necessarily bridgeless) rooted planar maps and a certain natural fragment of lambda calculus, consisting of terms which are β-normal and “planar” in the sense that variables are used exactly once and in (a well-defined) order.
Like in Chapoton's case, this link was found through the OEIS, since the corresponding counting sequence was already known 
(sequence https://oeis.org/A000168A000168, and once again it was first computed by Tutte, who derived another simple formula for the number of rooted planar maps with n edges: 2(2n)!3^n/n!(n+2)!).
This curious observation lead to a paper with Alain Giorgetti <cit.>, where we gave an explicit (recursive) bijection between rooted planar maps and β-normal planar terms.
Later, in trying to better understand this connection and tie it to another independent connection found recently between linear lambda terms and (non-planar) trivalent maps <cit.>, the author noticed that the graph-theoretic condition of containing a bridge has a natural analogue in lambda calculus: it corresponds to the property of containing a closed subterm <cit.>.
In particular, it is not difficult to check that the bijection described in <cit.> restricts to a bijection between bridgeless rooted planar maps and β-normal planar terms with no closed subterms, and therefore that the same formula (<ref>) also enumerates such terms by size.

Since both the Tamari lattice and lambda calculus are apparently rich with connections to the combinatorics of maps, it is natural to ask
whether they are also more directly related to each other.
This was the original motivation for our proof-theoretic analysis of the Tamari order, and an explicit bijection between Tamari intervals and β-normal planar terms with no closed subterms was given in an earlier version of this paper <cit.>, relying in an essential way on the coherence theorem for its proof of correctness.
On the other hand, the meaningfulness of that bijection was not completely clear[The bijection in <cit.> is simple and easy to verify, but the issue is that there are two different ordering conventions one can plausibly use to define the planarity of a lambda term (referred to as LR-planarity and RL-planarity in <cit.>).
Although both conventions induce families of β-normal planar terms which are equinumerous with Tamari intervals, only one of the two conventions (namely, RL-planarity) is closed under β-reduction, and the bijection in <cit.> is based on the one that isn't (namely, LR-planarity).], and so it is omitted here in the hope that a more algebraic account will be forthcoming.
Even without this particular application, I believe that the sequent calculus is of intrinsic mathematical interest: Tamari lattices and related associahedra have been studied for over sixty years, so the fact that such an elementary and natural proof-theoretic characterization of semi-associativity has been seemingly overlooked is surprising.[And perhaps it is a bit of an accident of history: see Appendix <ref>!]
In addition to an alternate derivation of Chapoton's result, we will see that it leads to a new and more conceptual proof of the lattice property for n.



 §.§ Plan of the paper


In Section <ref> we establish all of the proof-theoretic properties claimed above, including soundness and completeness of the sequent calculus relative to the Tamari order, as well as the coherence theorem.
Then in Section <ref> we explain how the focusing property can be used to prove the lattice property for the Tamari order, and in Section <ref> we explain how the coherence theorem can be used to derive the Tutte–Chapoton formula for the number of intervals in the Tamari lattice n.
Appendix <ref> includes some brief historical remarks about Tamari and Lambek's overlapping work, and a surprising but unfortunately missed connection.




§ A SEQUENT CALCULUS FOR THE TAMARI ORDER





 §.§ Definitions and terminology



For reference, we recall here the definition of the sequent calculus introduced in Section <ref>, and clarify some notational conventions.
The four rules of the sequent calculus are:

    [ L]A B,ΔCA,B,ΔC    [ R]Γ,ΔA BΓA   ΔB


    [id]AA    [cut]Γ,Θ,ΔBΘA   Γ,A,ΔB

Uppercase Latin letters (A,B,…) range over formulas, corresponding to fully-bracketed words: 
we say that every formula is either atomic (ranged over by lowercase Latin letters p,q,…) or else non-atomic if it is a product (A B).
Uppercase Greek letters Γ,Δ,… range over contexts, corresponding to lists of formulas, with concatenation of contexts (which is of course a strictly associative operation) indicated by a comma.
We will often restrict to non-empty contexts (that is, to lists of length ≥ 1), although not always (the empty context is denoted Δ = ·).
Let us emphasize that as in Lambek's system <cit.> but in contrast to Gentzen's original sequent calculus <cit.>, there are no rules of weakening, contraction, or exchange, so the order and the number of occurrences of a formula within a context matters.

A sequent is a pair of a context Γ and a formula A.
Abstractly, a derivation is a tree (technically, a rooted planar tree with boundary) 
whose internal nodes are labelled by the names of rules and whose edges are labelled by sequents satisfying the constraints indicated by the given rule.
The conclusion of a derivation is the sequent labelling its outgoing root edge, while its premises are the sequents labelling any incoming leaf edges.
A derivation with no premises is said to be closed.
In addition to writing “ΓA” as a notation for sequents, sometimes we also use it as a shorthand to indicate that the given sequent is derivable using the above rules, in other words that there exists a closed derivation whose conclusion is that sequent (it will always be clear which of these two senses we mean).
Sometimes we will need to give an explicit name to a derivation with a given conclusion, in which case we write the name over the sequent arrow.

As in the introduction,
when constructing derivations we sometimes write L and R as shorthand for L and R, and usually don't bother labelling the instances of id and cut since they are always clear from context.

Finally, we introduce a few more specialized notions.
We define the frontier A of a formula A to be the ordered list of atoms occurring in A (with (A B) = (A,B) and p = p), and the frontier of a context Γ = A_1,…,A_n as the concatenation of the frontiers of its formulas (Γ = A_1,…,A_n).
If σ is an arbitrary function sending atoms to atoms (not necessarily injectively), we write σ A and σΓ for the evident actions on formulas and contexts defined by homomorphic extension.
The following properties are immediate by examination of the four sequent calculus rules.


Suppose that ΓA. Then


  * (Frontier preservation:) Γ = A.

  * (Relabelling:) σΓσ A for any function σ sending atoms to atoms.





 §.§ Completeness



Let A ≤ B denote the Tamari order on formulas, that is, the least preorder such that (A B) C ≤ A (B C) for all A, B, and C, and such that A_1 ≤ A_2 and B_1 ≤ B_2 implies A_1 B_1 ≤ A_2 B_2.

We begin by establishing completeness of the sequent calculus relative to the Tamari order, which is the easier direction.



If A ≤ B then AB.


We must show that the relation AB is reflexive and transitive, and that the multiplication operation satisfies a semi-associative law and is monotonic in each argument.
All of these properties are straightforward:


  * Reflexivity: immediate by id.

  * Transitivity: immediate by cut (with Γ = Δ = · and Θ a singleton).

  * Semi-associativity: 

    [L](A B) CA (B C)[L]A B,CA (B C)[R]A,B,CA (B C)AA   [R]B,CB CBB   CC


  * Monotonicity:
  
    [L]A_1 B_1A_2 B_2[R]A_1,B_1A_2 B_2A_1A_2   B_1B_2*






 §.§ Soundness



To prove soundness relative to the Tamari order, first we have to explain the interpretation of general sequents.
The basic idea is that we can interpret a non-empty context as a left-associated product.
Thus, a general sequent of the form

    A_0,A_1,…,A_nB

is interpreted as an entailment of the form

    (⋯(A_0 A_1)⋯) A_n ≤ B

in the Tamari order.
In terms of binary trees, the sequent can be visualized like so:

    [scale=0.6,thick, grow'=up,
        level 1/.style=level distance=1cm,
        level 2/.style=level distance=1cm,sibling distance=2cm,
        level 3/.style=level distance=1cm,sibling distance=2cm,
        level 4/.style=level distance=1cm,sibling distance=2cm]
        
            child  [fill] circle (4pt)
             child  [fill] circle (4pt)
                child  [fill] circle (4pt)
                  child  node A_0
                  child  node (a2) A_1
                child  node (an-1) A
              child  node (an) A_n;
         at ((a2)!0.45!(an) + (0.1,0.1)) 0⋱; 
      ⟶  [scale=0.6,thick, grow'=up,
        level 1/.style=level distance=1cm]
         child  node B;

That is, the context provides information about the left-branching spine of the tree which is below in the right rotation order.

Let - be the operation taking any non-empty context Γ to the formula Γ given by its left-associated product.
Recursively, - is defined by the following equations:

    A
    = A 
        Γ,A
    = Γ A

Critical to soundness of the sequent calculus will be the following property of - (expressing that it is an “oplax” homomorphism, in the terminology of monoidal functors):


Γ,Δ≤ΓΔ for all non-empty contexts Γ and Δ.


By induction on Δ.
The case of a singleton context Δ = A is immediate.
Otherwise, if Δ = (Δ',A), we reason as follows:

    Γ,Δ',A   = Γ,Δ' A    (by definition)
       ≤ (ΓΔ') A    (by the i.h. and monotonicity)
       ≤Γ (Δ' A)    (semi-associativity)
       
     = ΓΔ',A   (by definition)*


The operation - can also be equivalently described in terms of a right action AΔ of an arbitrary context on a formula, defined by the following equations:

    A·
    = A
        A(Δ,B)
    = (AΔ) B



Γ,Δ = ΓΔ for all non-empty Γ and arbitrary Δ.



If A ≤ A' then AΔ≤A'Δ.


Both properties are immediate by induction on Δ.
(In the case of Prop. <ref> we appeal to monotonicity of the operations - B.)


We are now ready to prove soundness.


If ΓA then Γ≤ A.


By induction on the (closed) derivation of ΓA.
There are four cases, corresponding to the four rules of the sequent calculus:


  * (Case L): The derivation ends in

    [ L]A B,ΔCA,B,ΔC

Since A B = A B = A,B, we have that A B,Δ = A BΔ = A,BΔ = A,B,Δ≤ C by the induction hypothesis.


  * (Case R): The derivation ends in

    [ R]Γ,ΔA BΓA   ΔB

By induction we have Γ≤ A and Δ≤ B.
But then Γ,Δ≤ΓΔ≤ A B
by oplaxity and monotonicity.

  * (Case id): Immediate by reflexivity.

  * (Case cut): The derivation ends in

    [cut]Γ,Θ,ΔBΘA   Γ,A,ΔB

We reason as follows:

    Γ,Θ,Δ   
    = Γ,ΘΔ   (right action)
       ≤(ΓΘ)Δ   (oplaxity + monotonicity)
       ≤(Γ A)Δ   (i.h. + monotonicity)
        
    = Γ,A,Δ   (right action)
       ≤ B                                                 (i.h.)*






 §.§ Focusing completeness



Cut-elimination theorems are a staple of proof theory, and often provide a rich source of information about a given logic.
In this section we will prove a focusing property for the sequent calculus, which is an even stronger form of cut-elimination originally formulated by Andreoli in the setting of linear logic <cit.>.


A context Γ is said to be reducible if its leftmost formula is non-atomic, and irreducible otherwise.
A sequent ΓA is said to be:


  * left-inverting if Γ is reducible;

  * right-focusing if Γ is irreducible and A is non-atomic;

  * atomic if Γ is irreducible and A is atomic.



Any sequent is either left-inverting, right-focusing, or atomic.


A closed derivation 𝒟 is said to be focused if left-inverting sequents only appear as the conclusions of L, right-focusing sequents only as the conclusions of R, and atomic sequents only as the conclusions of id.

We write “Γ^” to indicate that a context Γ is irreducible.

A closed derivation is focused if and only if it is constructed using only L and the following restricted forms of R and id (and no instances of cut):

    [ R^]Γ^,ΔA BΓ^A   ΔB    [id^]pp



One way to derive 
((p q) r) sp ((q r) s)
is by cutting together the two derivations

    [L]((p q) r) s(p (q r)) s[R](p q) r,s(p (q r)) s(p q) rp (q r)𝒮𝒜_p,q,r   ss    and    (p (q r)) sp ((q r) s)𝒮𝒜_p,q r,s

where 𝒮𝒜_A,B,C is the derivation of the semi-associative law (A B) CA (B C) from the proof of Theorem <ref>.
Clearly this is not a focused derivation (besides the cut rule, it also uses instances of R and id with a left-inverting conclusion).
However, it is possible to give a focused derivation of the same sequent:

    [L]((p q) r) sp ((q r) s)[L](p q) r,sp ((q r) s)[L]p q,r,sp ((q r) s)[R]p,q,r,sp ((q r) s)pp   [R]q,r,s(q r) s[R]q,rq rqq   rr   ss


In the below, we write “ΓA” as a shorthand notation to indicate that ΓA has a (closed) focused derivation, and “D : AB” to indicate that D is a particular focused derivation of AB.


If ΓA then ΓA.

To prove the focusing completeness theorem, it suffices to show that the cut rule as well as the unrestricted forms of id and R are all admissible for focused derivations, in the standard proof-theoretic sense that given focused derivations of their premises, we can obtain a focused derivation of their conclusion.
We begin by proving a focused deduction lemma (cf. <cit.>), which entails the admissibility of id, then show cut and R in turn.


If Γ^A implies Γ^,ΔB for all Γ^, then A,ΔB.
In particular, AA.


By induction on the formula A:


  * (Case A = p): Immediate by assumption, taking Γ^ = p and pp derived by id^.

  * (Case A = A_1 A_2): 
We assume that Γ^A_1 A_2 implies Γ^,ΔB for all Γ^, and we need to show that A_1 A_2,ΔB.
By composing with the L rule,

    [ L]A_1 A_2,ΔBA_1,A_2,ΔB

we reduce the problem to showing A_1,A_2,ΔB, and by the i.h. on A_1 it suffices to show that Γ_1^A_1 implies Γ^_1,A_2,ΔB for all contexts Γ^_1.
Let D_1 : Γ^_1A_1.
We can derive Γ^_1,A_2A_1 A_2 by

    D  =  [ R]Γ^_1,A_2A_1 A_2Γ^_1A_1D_1   A_2A_2D_2

where we apply the i.h. on A_2 to obtain D_2.
Finally, applying the assumption 
to D (with Γ^ = Γ^_1,A_2) we obtain the desired derivation of Γ_1^,A_2,ΔB.




If ΘA and Γ,A,ΔB then Γ,Θ,ΔB.



Let D : ΘA and E : Γ,A,ΔB.
We proceed by a lexicographic induction, first on the cut formula A and then on the pair of derivations (D,E) (i.e., at each inductive step of the proof, either A gets smaller, or it stays the same as one of D or E gets smaller while the other stays the same, cf. <cit.>).

In the case that A = p we can apply the frontier preservation property (Prop. <ref>) to deduce that Θ = p, so the cut is trivial and we just reuse the derivation E : Γ,p,ΔB.
Otherwise we have A = A_1 A_2 for some A_1,A_2, and we proceed by case-analyzing the root rule of E:


  * (Case id^): Impossible since A is non-atomic.

  * (Case R^): This case splits in two possibilities:


  * ∃Δ_1,Δ_2 such that Δ = Δ_1,Δ_2 and

    E  =  [ R]Γ^,A,Δ_1,Δ_2B_1 B_2Γ^,A,Δ_1B_1E_1   Δ_2B_2E_2


  * ∃Γ^_1,Γ_2 such that Γ^ =Γ^_1,Γ_2 and

    E  =  [ R]Γ^_1,Γ_2,A,ΔB_1 B_2Γ^_1B_1E_1   Γ_2,A,ΔB_2E_2


In the first case, we cut D with E_1 to obtain Γ^,Θ,Δ_1B_1, then recombine that with E_2 using R^ to obtain Γ^,Θ,Δ_1,Δ_2B_1 B_2.
The second case is similar.


  * (Case L): This case splits into two possibilities:


  * ∃ C_1,C_2,Γ' such that Γ = C_1 C_2,Γ' and

    E  =  [ L]C_1 C_2,Γ',A,ΔBC_1,C_2,Γ',A,ΔBE'

We cut D into E' and reapply the L rule.

  * Γ = · and

    E  =  [ L]A_1 A_2,ΔBA_1,A_2,ΔBE'

Now we need to analyze the root rule of D:


  * (Case L): ∃ C_1,C_2,Θ' s.t. Θ = C_1 C_2,Θ' and

    D  =  [ L]C_1 C_2,Θ'A_1 A_2C_1,C_2,Θ'A_1 A_2D'

We cut D' into E and reapply the L rule.

  * (Case id^): Impossible.

  * (Case R^): ∃Θ^_1,Θ_2 s.t. Θ^ = Θ^_1,Θ_2 and

    D  =  [ R]Θ^_1,Θ_2A_1 A_2Θ^_1A_1D_1   Θ_2A_2D_2

We cut both D_1 and D_2 into E' (the cuts are at smaller formulas so the order doesn't matter).








If ΓA and ΔB then Γ,ΔA B.


Let D : ΓA and E : ΔB.
We proceed by induction on D.
If Γ is irreducible then we directly apply R^.
Otherwise, D must be of the form 

    D  =  [ L]C_1 C_2,Γ'AC_1,C_2,Γ'AD'

so we apply the i.h. to D' with E, and reapply the L rule.


An arbitrary closed derivation can be turned into a focused one by starting at the top of the derivation tree and using the above lemmas
to interpret any instance of cut and of the unrestricted forms of id and R.

We mention here one simple application of the focusing completeness theorem.


Let σ be any function sending atoms to atoms.
Then ΓA if and only if Γ = A and σΓσ A.


The forward direction is Prop. <ref>(1).
For the backward direction we use induction on focused derivations, which is justified by Theorem <ref>.
The only interesting case is R^, where we can assume (Γ,Δ) = (A B) and σΓσ A (σΓ irreducible) and σΔσ B.
By Prop. <ref>(1) we have σΓ = σ A and σΔ = σ B, but then elementary properties of lists imply that Γ = A and Δ = B, from which ΓA (Γ irreducible) and ΔB follow by the induction hypothesis, hence Γ,ΔA B.

If we let σ = ↦ p be any constant relabelling function, then speaking in the language of the introduction, Proposition <ref> says that to check that two fully-bracketed words (a.k.a., formulas) are related, it suffices to check that their frontiers are equal and that the unlabelled binary trees describing their underlying multiplicative structure are related.
In other words, the restriction of the Tamari order to formulas A such that A = Ω, for any fixed frontier Ω of length n+1, defines a poset which is isomorphic to the poset n of unlabelled binary trees under the right rotation order (remember that a binary tree with n internal nodes has n+1 leaves).
Although this fact is intuitively obvious, trying to prove it directly by induction on general derivations in the sequent calculus fails, because in the case of the cut rule we cannot assume anything about the frontier of the cut formula A.



 §.§ The coherence theorem



We now come to our main result justifying the definition of the sequent calculus:


Every derivable sequent has exactly one focused derivation.

Coherence is a direct consequence of focusing completeness and the following lemma:


For any context Γ and formula A, there is at most one focused derivation of ΓA.


We proceed by a well-founded induction on sequents, which can be reduced to multiset induction as follows.
Define the size A of a formula A by
A B = 1+A+B
and p = 0.
(That is, A counts the number of multiplication operations occurring in A.)
Then any sequent A_1,…,A_nB induces a multiset of sizes
(_i=1^nA_i) ⊎B, 
and at each step of our induction this multiset will decrease in the multiset ordering.
There are three cases:


  * (A left-inverting sequent A B,ΔC): Any focused derivation must end in L, so we apply the i.h. to A,B,ΔC.

  * (A right-focusing sequent Γ^A B): Any focused derivation must end in R, and decide some splitting of the context into contiguous pieces Γ_1^ and Δ_2.
However, Γ_1^ and Δ_2 are uniquely determined by frontier preservation (Γ_1^ = A and Δ_2 = B) and the equation Γ^ = Γ^_1,Δ_2.
So, we apply the i.h. to Γ_1^A and Δ_2B.

  * (An atomic sequent Γ^p): The sequent has one focused derivation if Γ^ = p, and otherwise it has none.
  


By Theorem <ref> and Lemma <ref>.




 §.§ Notes and related work



The coherence theorem says in a sense that focused derivations provide a canonical representation for intervals of the Tamari order.
Although the representations are quite different, in this respect it is very roughly comparable to the “unicity of normal chains” that was established by Tamari and Friedman as part of their original proof of the lattice property of n <cit.>.
A natural question is whether the sequent calculus can be used to better understand and further simplify the proof of the lattice property: we turn to this question in Section <ref> below.

An easy observation is that one obtains the dual Tamari order (cf. Footnote <ref>) via a dual restriction of Lambek's original rules:

    [ L]Γ,A BCΓ,A,BC    [ R]Γ,ΔA BΓA   ΔB

These two forms of biased products cannot be combined naively, however, or one obtains a system without cut-elimination, as the following derivation shows:

    [cut]p q,rp (q r)[ L]p qp q[ R]p,qp qpp   qq   [ L]p q,rp (q r)p,q,rp (q r)⋮

On the other hand, the left-biased product A B can be naturally combined with Lambek's right division operation B/A,

    B/A,Γ,ΔCΓA   B,ΔC    ΓB/AΓ,AB

while the right-biased product A B can be naturally combined with left division A\ B.

    Γ,Δ,A\ BCΓ,BC   ΔA    ΔA\ BA,ΔB

To the best of my knowledge, these simple variations of Lambek's original rules have not appeared previously in the literature with a connection to the Tamari order.
Since circulating an earlier version of this paper <cit.>, however, I learned from Jason Reed that he briefly considered precisely these rules in an unpublished note on “queue logic” <cit.>.
Reed did not remark the link with semi-associativity, but rather was originally interested in the apparent failure of queue logic to satisfy Nuel Belnap's display property.

The sequent calculus can also be naturally extended with rules for a (left-biased) unit,

    [IL]I,ΔCΔC    [IR]·I

although there are some subtleties involving focusing.
For one, the naive statement of the coherence theorem fails, as shown by the following example (due to Tarmo Uustalu) of two different focused derivations of the same sequent:

    [ R]p,I,q(p I) q[ R]p,Ip Ipp   [IL]II[IR]·I   qq    [ R]p,I,q(p I) q[ R]pp Ipp   [IR]·I   [IL]I,qqqq

However, this does not rule out a less naive formulation of coherence.

The name for Theorem <ref> is inspired by the terminology from category theory and Mac Lane's coherence theorem for monoidal categories <cit.>.
Laplaza <cit.> extended Mac Lane's coherence theorem to the situation where there is no monoidal unit and the associator α_A,B,C : (A ⊗ B)⊗ C → A ⊗ (B ⊗ C) is only a natural transformation rather than an isomorphism – in other words, where the tensor product is only semi-associative.
Recently, Szlachányi has isolated the notion of a skew-monoidal category <cit.>, which combines such a semi-associative tensor product together with a unit I equipped with a pair of natural transformations I⊗ A → A and A → A ⊗ I satisfying some axioms.
Skew-monoidal categories have been investigated actively in the past few years, including questions of coherence <cit.> as well as their relation to the Tamari order <cit.>.
Indeed, in recent work independent of ours, Bourke and Lack have arrived at a very closely related multicategorical analysis of skew-monoidal categories <cit.>.
The reader familiar with the connection (pioneered by Lambek <cit.>) between multicategories and sequent calculus will recognize that the restricted rules L and R turn the sequent calculus into a “left-representable” multicategory, a natural variation of the well-known concept of a representable multicategory <cit.> considered in Bourke and Lack's paper <cit.>.

Interestingly, Lambek, who originally presented his “syntactic calculus” as a tool for mathematical linguistics, also introduced a fully non-associative version <cit.> (cf. <cit.>).
One may wonder whether there are any linguistic motivations for semi-associativity, as an intermediate between these two extremes.



§ A NEW PROOF FOR THE LATTICE PROPERTY OF THE TAMARI ORDER



In this section we explain how the focusing property can be used to give a new and more conceptual proof of Tamari's original observation that the posets n of fully-bracketed words over a fixed sequence of n+1 letters ordered by a semi-associative law
are actually lattices.[This observation was already made in Tamari's thesis <cit.>, but the first published proof appeared in a paper with his student Haya Friedman <cit.> (in a note at the end of the introduction to <cit.>, he mentions that this work was carried out by Friedman in 1958) and a simplified proof in a later paper with another student Samuel Huang <cit.>.
For more recent proofs, see <cit.>, <cit.> and <cit.>.]
We begin by extending the Tamari order to an ordering on contexts (i.e., to lists of fully-bracketed words).


The substitution order on contexts is the least relation Γ≤Θ such that:
(1) ΓA implies Γ≤ A; (2) ·≤·; and (3) if Γ_1 ≤Γ_2 and Θ_1 ≤Θ_2 then (Γ_1,Θ_1) ≤ (Γ_2,Θ_2). 

The substitution order generated by the sequent calculus corresponds to the standard notion of the free monoidal category generated by a (posetal) multicategory <cit.>, and is easily seen to be reflexive and transitive (inheriting these properties from id and cut), and equipped with a contravariant action on derivable sequents (corresponding to a “multi-cut” rule).


If Γ_1 ≤Γ_2 and Γ_2A then Γ_1A.

Now, let  stand for the poset of arbitrary formulas (= fully-bracketed words) under the Tamari order, and  for the poset of arbitrary contexts under the generated substitution order.
We write _Ω and _Ω to denote the restriction of these posets to a fixed frontier Ω.
As already remarked (Prop. <ref>), for any Ω of length n+1, _Ω is isomorphic to the poset n of unlabelled binary trees with n inner nodes under the right rotation order.
Similarly, for any Ω of length n+1, _Ω is isomorphic to a poset of “forests” of unlabelled binary trees with n+1 leaves, which we denote by n (note the different notation for the index, since we count inner nodes in trees but leaves in forests).

Our aim is to prove that all of the posets _Ω and _Ω (and hence n and n) are lattices.
The proof relies on two key observations:


  * The evident embedding i : n→n sending a binary tree with n internal nodes to the singleton forest with n+1 leaves forms the right end of an adjoint triple, with a left adjoint given by the left-associated product ϕ, which in turn has a further left adjoint corresponding to the maximal decomposition of a binary tree.
For completely general reasons, this allows us to reduce a join of trees to a join of forests.

  * Any forest with n+1 leaves divided among k trees implicitly contains a composition (i.e., ordered partition) of n+1 into k parts, inducing a (surjective) monotone function α : n→n from the poset of forests to the lattice of compositions ordered by refinement.
In particular, this will allow us to reduce a join of forests in n to a join of compositions in n≅ 2^n, together with joins of trees in m for m < n.



We say that an irreducible context Γ^ is a maximal decomposition of a formula A if Γ^A, and for any other Θ^, Θ^A implies Θ^≤Γ^.



If Γ^ is a maximal decomposition of A, then A,ΔB if and only if Γ^,ΔB.


The forward direction is by cutting with Γ^A, the backwards direction is by the deduction lemma (<ref>) and the universal property of Γ^.



Let A be the irreducible context defined inductively by
p = p 
and
A B = A,B.
Then A is a maximal decomposition of A.


We construct AA by induction on A, and check the universal property of A by induction on focused derivations of Θ^A.



A = A and Θ^ = Θ^ for all A and Θ^.

The maximal decomposition A of A is essentially the same as what Chapoton <cit.> calls the “décomposition maximale” of a binary tree, although note that the universal property expressed in Definition <ref> is also familiar from studies of focusing in other settings (cf. <cit.>).


The operations - and - induce an adjoint triple



 [hookrightarrow,"i"]r [bend left=75,""]r
     
 _+ [bend right]l[above]



where
_+ denotes the restriction of  to non-empty contexts, and i the evident embedding.
In other words, we have that

    Γ≤ AΓ≤ i[A]     and    A≤Θ A ≤Θ

for all Γ, A, and Θ.


The first part
(Γ≤ A if and only if Γ≤ i[A] := ΓA)
amounts to soundness and completeness of the sequent calculus, while the second part
(A≤Θ if and only if A ≤Θ)
follows from Propositions <ref>–<ref>.


Since the operations i, ϕ, and ψ are manifestly frontier-preserving, they restrict to adjoint triples between the posets _Ω and _Ω of formulas and contexts over any fixed (non-empty) frontier Ω.
In particular, they restrict to an adjoint triple between n and n.

Let us write A ∨_Ω B (respectively, Γ⊔_ΩΘ) to denote the join of two formulas (respectively, contexts) with the same frontier Ω, and _Ω (respectively, 0_Ω) to denote the least formula (respectively, context) with frontier Ω.
(Sometimes we will omit the index Ω when there is no ambiguity.)

The following equations hold (whenever the corresponding joins exist):

    A ∨_Ω B    = A⊔_ΩB
    _Ω   = 0_Ω



By Propositions <ref> and <ref>, since left adjoints preserve arbitrary joins.

Now, the existence of a least context is trivial to establish.


If A = Ω then ΩA.



If Θ = Ω then Ω≤Θ.


By induction.

In other words, we have that

    0_Ω = Ω.

This in turn implies by (<ref>) that the least formula is the “left comb” _Ω = Ω, which again is easy to verify.

The case of binary joins is more subtle, and as previewed above, we will make use of the fact that 
_Ω lives naturally over the lattice Ω of compositions of Ω ordered by refinement.
Recall that a composition of an integer n (into k parts) is a tuple of positive integers α = (n_1;…;n_k) such that n = n_1 + … + n_k (or equivalently, a surjective monotone function 𝐧→𝐤 from the ordinal 𝐧 = 1 < … < n to the ordinal 𝐤 = 1 < … < k).
Similarly, a composition of a list Ω is a list of non-empty blocks α = (Ω_1; …; Ω_k) such that Ω is the concatenation Ω_1,…,Ω_k.
Compositions form the morphisms of a category (isomorphic to the category of linearly ordered sets and surjective monotone functions), where a composition α = (Ω_1; …; Ω_k) can be composed with a composition β of its list of blocks [Ω_1],…,[Ω_k], to obtain another composition β∘α of Ω in which some consecutive blocks of α have been merged.
This in turn induces a partial order Ω on compositions of the same list Ω: α is said to refine another composition α' just in case α' = β∘α for some β.

The function 
(A_1,…,A_k) ↦ (A_1; …; A_k)
sending a context to the underlying composition of its frontier is monotone relative to the substitution ordering on contexts and the refinement ordering on compositions.

The lattice structure of Ω is easy to describe, with Ω≅ 2^n for any non-empty list Ω of length n+1.
(To see this one can think of the block notation for compositions as encoding n-ary bit vectors, with the comma `,' standing for 1 and the semicolon `;' for 0.)
But to compute the join of two contexts with the same frontier, we will also need the following more informative characterization of the join of compositions.


Any pair of compositions α and α' of Ω has a pushout consisting of a pair (β,β') satisfying β∘α = β' ∘α' = α⊔α', and such that for any other pair (γ, γ') satisfying γ∘α = γ' ∘α', there exists a unique δ such that γ = δ∘β and γ' = δ∘β'.


Let Γ and Θ be two contexts with the same frontier Γ = Θ = Ω, and let α_Γ and α_Θ be the corresponding compositions of Ω.
Then

    Γ⊔Θ = i[Γ_1∨Θ_1],…,i[Γ_k∨Θ_k]

(assuming the corresponding joins exist), 
where the compositions β_Γ = (Γ_1 ; … ; Γ_k) and β_Θ = (Θ_1 ; … ; Θ_k) of Γ and Θ are obtained as the pushout of α_Γ and α_Θ.

The proof of Lemma <ref> can be reduced to the following simpler cases.

If A = B and Γ = Θ then
(A,Γ) ⊔ (B,Θ)
=
(A ∨ B),(Γ⊔Θ).


We have to show that A,Γ≤Δ and B,Θ≤Δ if and only if 
(A∨ B), (Γ⊔Θ) ≤Δ.
The backward direction is immediate.
For the forward direction, by induction on Δ we can reduce to the case of a singleton context Δ = i[C].
So suppose that A,ΓC and B,ΘC.
By the properties of maximal decomposition, this implies that A,Γ≤C and B,Θ≤C.
But then we must have C = (Δ,Δ') for some Δ and Δ' such that A≤Δ and B≤Δ and Γ≤Δ' and Θ≤Δ', 
which in turn implies that 
A ∨ B,Γ⊔ΘC.


If Γ and Θ are such that α_Γ⊔α_Θ is the one-block composition (i.e., α_Γ and α_Θ are “relatively prime”), then Γ⊔Θ = i[Γ∨Θ].


We have to show that Γ≤Δ and Θ≤Δ if and only if 
i[Γ∨Θ] ≤Δ.
Again the backward direction is immediate.
In the forward direction, if both Γ≤Δ and Θ≤Δ, then Δ is necessarily a singleton Δ = i[C], by assumption that α_Γ and α_Θ are relatively prime.
But then Γ≤ C and Θ≤ C from the adjunction ϕ⊣ i, and hence 
Γ∨Θ≤ C.


By repeated application of Lemmas <ref> and <ref>, relying on the properties of the 
compositions β_Γ and β_Θ as the pushout of α_Γ and α_Θ.



The posets _Ω and _Ω are lattices, for all Ω.


We can use equations (<ref>), (<ref>), (<ref>), and (<ref>) to recursively compute the join of any (finite) collection of formulas or contexts over the same frontier, with a base case of p ∨ p = p for atomic formulas.
This recursion is well-founded because the maximal decomposition of a formula is irreducible, and irreducible contexts over the same frontier always share an atom as their first formula (i.e., we have that k ≥ 2 for the number of parts in (<ref>), whenever Γ^ = A and Δ^ = B are the maximal decompositions of non-atomic formulas).
Finally, by a standard construction, existence of joins also implies the existence meets, since _Ω and _Ω are finite.
(Alternatively, meets may be computed directly by dualizing the whole construction, starting from the sequent calculus for the dual Tamari order described in the second paragraph of Section <ref>.)



Let A = p((q(r((s t) u))) v) and B = (p (q r)) ((s t) (u v))
be two fully-bracketed words.
We illustrate the recursive computation of A ∨ B:

    [             round                 A                 A                 B                 B               A⊔B;                 1 p((q(r((st)u)))v)  p,(q(r((st)u)))v (p(qr))((st)(uv))     p,qr,(st)(uv)       p,A_2 ∨ B_2;                 2    (q(r((st)u)))v      q,r((st)u),v    (qr)((st)(uv))      q,r,(st)(uv)       q,A_3 ∨ B_3;                 3       (r((st)u))v       r, (st)u, v       r((st)(uv))       r, (st)(uv)       r,A_4 ∨ B_4;                 4          ((st)u)v           s,t,u,v          (st)(uv)            s,t,uv     s,t,A_5 ∨ B_5;                 5                uv               u,v                uv               u,v               u,v ]

We conclude that A ∨ B = (p (q (r ((s t) (u v))))).




§ COUNTING INTERVALS IN TAMARI LATTICES



In this section we explain how the coherence theorem can be used to derive Chapoton's result (mentioned in Section <ref>) that the number of intervals in n is given by Tutte's formula (<ref>).
We assume some basic familiarity with generating functions <cit.>.

To “count intervals” means to compute the cardinality of the set

    n = (A,B) ∈n×n| A ≤ B

as a function of n.
By the coherence theorem, the problem of counting intervals can be reduced to the problem of counting focused derivations, and since the latter are just special kinds of trees, this problem lends itself readily to being solved using generating functions.

Consider the formal power series L(z,x) and R(z,x) defined by

    L(z,x) = ∑_n,kℓ_n,k z^n x^k   and   R(z,x) = ∑_n,k r_n,k z^n x^k

where ℓ_n,k (respectively, r_n,k) is the number of focused derivations of sequents whose right-hand side is a formula of size n (over some arbitrary frontier) and whose left-hand side is a context (respectively, irreducible context) of length k.
We write L_1(z) to denote the coefficient of x^1 in L(z,x).

L_1(z) is the ordinary generating function counting intervals in n.


The coefficients ℓ_n,1 give the number of focused derivations of sequents of the form AB, where A = B = n, so ℓ_n,1 = |n|
by Theorem <ref>.


L and R satisfy the equations:

    L(z,x)    = x^-1(L(z,x) - x L_1(z)) + R(z,x) 
    
    R(z,x)    = z R(z,x)L(z,x) + x



The equations are derived directly from the inductive structure of focused derivations:


  * The first summand in (<ref>) corresponds to the contribution from the L rule, which transforms any A,B,ΓC into A B,ΓC.
The context in the premise must have length ≥ 2 which is why we subtract the xL_1(z) factor, and the context in the conclusion is one formula shorter which is why we divide by x.
The second summand is the contribution from irreducible contexts.

  * The first summand in (<ref>) corresponds to the contribution from the R^ rule, which transforms Γ^A and ΔB into Γ^,ΔA B: the length of the context in the conclusion is the sum of the lengths of Γ^ and Δ, while the size of A B is one plus the sum of the sizes of A and B, which is why we multiply R and L together and then by an extra factor of z.
The second summand is the contribution from id^ : pp.




L_1(z) = R(z,1).


This follows algebraically from (<ref>), but we can interpret it constructively as well.
The coefficient of z^n in R(z,1) is the formal sum ∑_k r_n,k, giving the number of focused derivations of sequents whose right-hand side is a formula of size n and whose left-hand side is an irreducible context of arbitrary length.
But by the existence of maximal decompositions (Props. <ref>–<ref>), we know that there is a 1-to-1 correspondence between derivable sequents of the form Γ^B and ones of the form AB.

After substituting L_1(z) = R(z,1) into (<ref>) and applying a bit of algebra, we obtain another formula for L in terms of a “discrete difference operator” acting on R:

    L(z,x) = xR(z,x) - R(z,1)/x-1

The recursive (or “functional”) equations (<ref>) and (<ref>) can be easily unrolled using computer algebra software to compute the first few dozen coefficients of R and L:

    R(z,x)    
     = x + x^2z + (x^2+2x^3)z^2 + (3x^2 + 5x^3 + 5x^4)z^3 + (13x^2 + 20x^3 + 21x^4 + 14x^5)z^4 + …
    
    
    
    L_1(z)    
     = R(z,1) = 1 + z + 3z^2 + 13z^3 + 68z^4 + 399z^5 + 2530z^6 + 16965 z^7 + …













|n| = 2(4n+1)!/(n+1)!(3n+2)!.


At this point we simply appeal to a paper of Cori and Schaeffer <cit.>, because equations (<ref>) and (<ref>) are a special case of the functional equations given there for the generating functions of description trees of type (a,b), where a = b = 1.
Cori and Schaeffer explain (see <cit.>)
how to solve these equations abstractly for R(z,1) using Brown and Tutte's “quadratic method”, and then how to derive the explicit formula above in the specific case that a = b = 1 via Lagrange inversion (essentially as the formula was originally derived by Tutte for planar triangulations).

Let's take a moment to discuss Chapoton's original proof of Theorem <ref>, which despite being obtained in a different way, we should emphasize has many commonalities with the one given here via the coherence theorem.
Chapoton likewise defines a two-variable generating function Φ(z,x) enumerating intervals in the Tamari lattices n, where the parameter z keeps track of n, and the parameter x keeps track of the number of segments along the left border of the tree at the lower end of the interval.[Or rather at the upper end, since Chapoton uses the dual ordering convention (cf. Footnote <ref>).]
By an extended combinatorial analysis, Chapoton derives the following equation for Φ:

    Φ(z,x) = x^2 z(1+Φ(z,x)/x)(1 + Φ(z,x) - Φ(z,1)/x-1)

He manipulates this equation and eventually solves for Φ(z,1) as the root of a certain polynomial, from which he derives Tutte's formula (<ref>), again by appeal to a different result in the paper by Cori and Schaeffer <cit.>.

If we give a bit of thought to these definitions, it is easy to see that the number of segments along the left border of a tree A is equal to the number of formulas in its maximal decomposition A – meaning that the generating function Φ(z,x) apparently contains exactly the same information as R(z,x)!
There is a small technicality, however, due to the fact that Chapoton only considers the n for n≥ 1.
In fact, the two generating functions are related by a small offset (corresponding to the coefficient of z^0 in R(z,x)):
Φ(z,x) = R(z,x) - x.
Indeed, it can be readily verified that equation (<ref>) follows from (<ref>) and (<ref>), applying the substitution R(z,x) = x + Φ(z,x).



§ ACKNOWLEDGMENT


I thank Wenjie Fang, Paul-André Melliès, Jason Reed, Gabriel Scherer, and Tarmo Uustalu for interesting conversations about this work, as well as the anonymous FSCD and LMCS reviewers for some helpful comments.
The visualization of 4 in Figure <ref> was created using the help of Brent Yorgey's Diagrams library for Haskell. 

plainurl







§ A MISSED CONNECTION



Tamari obtained his doctorate in 1951 from the University of Paris.[A fascinating account of Tamari's eventful life and scientific contributions appears in the first chapter of <cit.>, see “Dov Tamari (formerly Bernhard Teitler)” by Folkert Müller-Hoissen and Hans-Otto Walther.
That article is also the source from which I learned of Tamari's missed connection with Lambek (see Footnote 45 on page 18).]
His thesis <cit.> revisited the important problem in algebra (first solved by Malcev) of characterizing the conditions under which a semigroup is embeddable into a group, which Tamari showed can be reduced to the more elementary problem of determining when a partial binary operation[Somewhat disorientingly for modern readers such as the present author, in his thesis and early work Tamari referred to the algebraic structures consisting of sets equipped with a partial binary operation as “monoids”. (In later work <cit.> he referred to them as “bins”.)] is fully associative (that is, when all possible bracketings of a word have the same value).
(The thesis includes a description of the partial orders n with the claim that they are lattices, as well as graphical depictions of 3 and 4 as convex polytopes, although none of this made it into the abridged version published in BSMF <cit.>.)

Coincidentally, the embedding problem for semigroups was also studied around the same time by Lambek, who arrived at some related ideas <cit.>.
Well, it turns out that the two almost began a collaboration!
As Tamari recounts in <cit.>:[“In 1951, after his thesis <cit.> and after the publication of <cit.>, the author proposed to Lambek joint work, to highlight the preponderant role played by general associativity. Unfortunately, due to external circumstances, this work was never written.” (Own translation, citation numbers realigned with present bibliography.)]

En 1951, après sa thèse <cit.> et après la publication de <cit.>,
l'auteur a proposé à LAMBEK un travail commun, pour mettre en évidence le rôle prépondérant joué par l'associativité générale.
Malheureusement, par suite de circonstances extérieures, ce travail n'a jamais été écrit.

Disappointingly, Tamari does not elaborate any further.
But one is certainly lead to fantasize about what were the “circonstances extérieures” which prevented Lambek and Tamari from pursuing this collaboration, and what might have been the outcome if they had.
It seems quite likely that between Lambek's introduction of the associative and non-associative syntactic calculi, and Tamari's continued study of the lattices induced by a semi-associative law, the pair would have eventually noticed the simple sequent calculus which we have studied here.
What else might they have noticed?

