Identities in unitriangular and gossip monoids

We establish a criterion for a semigroup identity to hold in the monoid of $n \times n$ upper unitriangular matrices with entries in a commutative semiring $S$. This criterion is combinatorial modulo the arithmetic of the multiplicative identity element of $S$. In the case where $S$ is idempotent, the generated variety is the variety $\mathbf{J_{n-1}}$, which by a result of Volkov is generated by any one of: the monoid of unitriangular Boolean matrices, the monoid $R_n$ of all reflexive relations on an $n$ element set, or the Catalan monoid $C_n$. We propose $S$-matrix analogues of these latter two monoids in the case where $S$ is an idempotent semiring whose multiplicative identity element is the `top' element with respect to the natural partial order on $S$, and show that each generates $\mathbf{J_{n-1}}$. As a consequence we obtain a complete solution to the finite basis problem for lossy gossip monoids.


Introduction
The finite basis problem for semigroups asks: which semigroups have an equational theory admitting a finite basis of identities? Such semigroups are called finitely based. In contrast to the situation for finite groups [8], it has long been known that there exist finite semigroups which are non-finitely based [9], and there is a rich literature studying the finite basis problem from viewpoint of finite semigroups (see the survey [13]). As observed by Volkov [15], infinite semigroups are far less frequently studied in the context of the finite basis problem, due to the fact that many natural infinite semigroups are in some sense 'too big' to allow for the kind of universal coincidences demanded by identities. For example, if S is a commutative semiring into which the semiring of natural numbers can be embedded, then for n > 1 the monoid of all n×n (upper triangular) matrices over S satisfies no non-trivial identities, since the free monoid of rank 2 embeds into all such semigroups (see [15] for example). The finite basis problem is increasingly studied for families of infinite semigroups of combinatorial interest for which identities are known to exist, with complete results available for one-relator semigroups [10] and Kauffman monoids [1], and several recent partial results for various semigroups of upper triangular matrices with restrictions on the size of the matrices and the entries permitted on the diagonals [3,4,15,16].
In this work we consider the identities satisfied by several families of matrix semigroups, beginning with upper triangular matrices with entries 1 in a commutative semiring. In Section 2 we show how the analysis of [5] may be generalised to the setting of commutative semirings S to provide necessary and sufficient conditions for a semigroup identity to hold in the monoid of n × n upper triangular matrices with entries in S. This result is then applied in Section 3 to establish a criterion for a semigroup identity to hold in the submonoid of n × n upper unitriangular matrices, showing that the generated variety depends only upon the isomorphism type of the subsemiring generated by the multipllicative identity element of S. In the case where S is an idempotent semiring our result together with a result of Volkov [14] yields that the generated variety is J n−1 , that is, the variety of semigroups generated by the monoids of height n − 1 in Simon's hierarchy of finite J -trivial monoids [11]. In Sections 4 we introduce the submonoid R n (S) of the full matrix monoid over an interval semiring S, and show that this generates the same variety as its finite (Boolean) counterpart, the reflexive monoid. In Section 5 we consider several monoids related to the Catalan monoid, including the so-called lossy gossip monoid G n (that is, the monoid generated by all "metric" matrices in the full matrix monoid over the tropical semiring [2]). By [14] this common variety is once again seen to be J n−1 . Since the variety J n−1 is known to be finitely based for n ≤ 4, and non-finitely based otherwise, this settles the finite basis problem for the above mentioned families of monoids.
We conclude this introduction by briefly recalling the necessary definitions, notation and background.
Semigroup identities. We write N 0 and N respectively for the natural numbers with and without 0. If Σ is a finite alphabet, then Σ + will denote the free semigroup on Σ, that is, the set of finite, non-empty words over Σ under the operation of concatenation. Likewise, Σ * will denote the free monoid on Σ. Thus Σ * = Σ + ∪ {1} where 1 denotes the empty word. For w ∈ Σ + and s ∈ Σ we write |w| for the length of w and |w| s for the number of occurrences of the letter s in w. For 1 ≤ i ≤ |w| we write w i to denote the ith letter of w. The content of w is the map Σ → N 0 , s → |w| s .
Recall that a (semigroup) identity is a pair of words, usually written "u = v", in the free semigroup Σ + on an alphabet Σ. The identity is said to be balanced if |u| a = |v| a for all a ∈ Σ. We say that the identity holds in a semigroup U (or that U satisfies the identity) if every morphism from Σ + to U maps u and v to the same element of U . If a morphism maps u and v to the same element we say that it satisfies the given identity in U ; otherwise it falsifies it. We write Id(U ) to denote the set of all identities satisfied by the semigroup U .
Semirings. Let S be a commutative semiring with additive identity 0 S and multiplicative identity 1 S . We say that S is idempotent if a + a = a for all a ∈ S. Examples include the Boolean semiring B = {0, 1} in which the only undetermined operation is defined by 1 + 1 = 1, and the tropical semifield (R ∪ {−∞}, ⊕, ⊗), where a ⊕ b = max(a, b) and a ⊗ b = a + b, and in which −∞ is the 'zero' element, and 0 is the 'one'. There is a natural partial order on every idempotent semiring S given by a ≤ b if and only if a + b = b; it is clear from definition that a + b ≥ a, b for all a, b ∈ S. Thus 0 S is the least element of S with respect to this order. Moreover, if a ≤ b in S, then cad ≤ cbd and a + c ≤ b + c for all c, d ∈ S.
We say that a commutative semiring S is an interval semiring if S is idempotent, and 1 S is the greatest element of S with respect to the natural partial order on S. Examples of interval semirings include: the Boolean semiring B; the semiring I = ([0, 1], ·, ⊕) with usual multiplication of numbers and addition given by taking the maximum; the semiring (R ≤0 ∪ {−∞}, ⊗, ⊕) with multiplication given by usual addition of numbers and addition given by taking the maximum; any distributive lattice L with addition ∨ and multiplication ∧.
Matrix semigroups. It is easy to see that the set of all n×n matrices with entries in S forms a monoid under the matrix multiplication induced from the operations in S. We denote this semigroup by M n (S) and write U T n (S) to denote the subsemigroup of M n (S) consisting of the upper-triangular matrices in M n (S) whose entries below the main diagonal are zero. We also write U n (S) to denote the semigroup of unitriangular matrices, namely those elements of U T n (S) whose diagonal entries are all equal to 1 S .
In the case where S is an idempotent semiring we define a partial order on M n (S) by A B if and only if A i,j ≤ B i,j for all i and j. It is easy to see that matrix multiplication respects the partial order (i.e. M n (S) is an ordered monoid). Indeed, for A, B, C ∈ M n (S) with A B, for all i, j we have Polynomials. By a formal polynomial in variables from a set X we mean an element of the commutative polynomial semiring S[X], that is, a finite formal sum in which each term is a formal product of a non-zero coefficient from S and formal powers of finitely many of the variables of X, considered up to the commutative and distributive laws in S. If S is idempotent, we consider the summation up to idempotency of addition.
Each formal polynomial naturally defines a function from S X to S, by interpreting all formal products and formal sums as products and sums within S. Two distinct formal polynomials may define the same function. For example, x ⊗2 ⊕x⊕1 and x ⊗2 ⊕1 are distinct formal tropical polynomials defining the same function, since x can never exceed both x ⊗2 and 1. We say that two formal polynomials are functionally equivalent over S if they represent the same function from S X to S.

The identities of triangular matrices
We begin by providing a generalisation of [5,Theorem 5.1] to the setting of commutative semirings.
Let [n] = {1, 2, . . . , n}. By a k-vertex walk (or walk of vertex length k) in [n] we mean a k-tuple (v 1 , . . . , v k ) such that v 1 ≤ v 2 ≤ · · · ≤ v k . A k-vertex path (or path of vertex length k) is a k-vertex walk in which consecutive vertices (and hence all vertices) are distinct.
Let w be a word over the alphabet Σ. For 0 ≤ p < q ≤ |w| + 1 and s ∈ Σ we define β w s (p, q) = |{i ∈ N | p < i < q, w i = s}| to be the number of occurrences of s lying strictly between w p and w q . For each u ∈ Σ * with |u| ≤ n − 1 and each (|u| + 1)-vertex path ρ = (ρ 0 , ρ 1 , . . . , ρ |u| ) in [n], we define a formal polynomial (over an arbitrary, but fixed, commutative semiring S) having variables x(s, i) for each letter s ∈ Σ and vertex i ∈ [n] as follows: where the sum ranges over all 0 = α 0 < α 1 < · · · < α |u| < α |u|+1 = |w| + 1 such that w α k = u k for k = 1, . . . , |u|. Thus it is easy to see that f w u,ρ = 0 S if and only if u is a scattered subword of w of length equal to the path ρ. Note that taking u to be the empty word forces ρ = (ρ 0 ) for some ρ 0 ∈ [n] and hence f w u,ρ = s∈Σ x(s, ρ 0 ) |w|s is a monomial completely determined by the content of w.
Lemma 2.1. Let S be a commutative semiring, and let φ : Then for any word w ∈ Σ + and vertices i, j ∈ [n] we have

where [n]
|u| i,j denotes the set of all (|u| + 1)-vertex paths from i to j in [n]. Proof. We follow the proof given in [5].
Let i and j be vertices. Using the definition of the functions f w u,ρ , the value given to x and the distributivity of multiplication over addition, the right-hand-side of (1) is equal to Notice that we are summing over all possible words u of length less than n, and then over all scattered subwords of w equal to u. Thus, we are simply summing over all scattered subwords of w of length less than n, so the above is equal to: Now to each term in the above sum, defined by a choice of α i 's and a ρ ∈ [n] l i,j , we can associate a (|w| + 1)-vertex walk (σ 0 = i, . . . , σ |w| = j) in [n] whose underlying path is ρ and which transitions to vertex ρ k after α k steps. Clearly every (|w| + 1)-vertex walk from i to j arises exactly once in this way, and so we are summing over all such walks. In each term, the first bracket gives a factor φ(w q ) σ q−1 ,σq when q = α k for some k, while from the definition of the functions β w s , the second bracket gives a factor φ(w q ) σ q−1 ,σq for each q not of this form. Thus, the above is simply equal to: where the sum is taken over all (|w| + 1)-vertex walks (i = σ 0 , σ 1 , . . . , σ |w| = j) in [n]. But by the definition of multiplication in U T n (S), this is easily seen to be equal to φ( Let f w u denote the polynomial f w u,ρ with ρ = (1, 2, . . . , |u| + 1) in variables x(s, i), with s ∈ Σ and 1 ≤ i ≤ |u| + 1. We are now ready to prove the main theorem of this section.
for some word u ∈ Σ + of length at most n − 1 and x ∈ S Σ×[n] . Define a morphism φ : Σ + → U T n (S) by φ(s) p,p = x(s, p) ∈ S, for all p ∈ [n] and s ∈ Σ; and Then by Lemma 2.1, , and so the morphism φ falsifies the identity in U T n (S).
Conversely, suppose that f w u and f v u are functionally equivalent over S for all u ∈ Σ * of length at most n − 1. Noting that for any path ρ of vertex length |u|, the polynomials f w u,ρ and f w u differ only in the labelling of their variables, it is then easy to see that f w u,ρ and f v u,ρ are functionally equivalent for all pairs u, ρ with u ∈ Σ * of length at most n − 1, and ρ a path of vertex length |u| + 1 through [n].
It suffices to show that the identity w = v is satisfied by every morphism φ : Σ + → U T n (S), so let φ be such a morphism and define Lemma 2.3. Let S be a semiring whose multiplicative monoid contains an element α generating a free submonoid of rank 1, and let w, v ∈ Σ + .
(i) The polynomials f w 1 and f v 1 are functionally equivalent if and only if w and v have the same content.
Proof. (i) By definition, f w 1 is the monomial s∈Σ x(s, 1) |w|s , and it is clear that w and v have the same content if and only if the formal polynomials f w 1 and f v 1 are identical. In particular, if the content of the two words agree, then these polynomials are functionally equivalent. Suppose then that f w 1 and f v 1 are functionally equivalent. Setting x(s, 1) = α and x(t, 1) = 1 S for all t = s then yields α |w|s = α |v|s , and hence |w| s = |v| s . Repeating this argument for each s ∈ Σ yields that the two words have the same content.
(ii) It suffices to show that if f w a is functionally equivalent to f v a for all a ∈ Σ, then the content of the two words must be equal. Evaluating the polynomials f w a and f v a at x(a, 1) = α and x(z, i) = 1 S for all other choices of z, i yields α i , and hence |w| a = |v| a . Repeating this argument for each a ∈ Σ gives that the two words have the same content.
Under the hypothesis of the previous lemma, we note that identities must be balanced.
Corollary 2.4. Let S be a semiring whose multiplicative monoid contains a free submonoid of rank 1. Any non-trivial semigroup identity satisfied by U T n (S) or M n (S) must be balanced.
Under the stronger hypothesese of the Lemma 2.3 (ii), we may reduce the number of polynomials to be checked by 1.
Corollary 2.5. Let S be a semiring whose multiplicative monoid contains an element α generating a free submonoid of rank 1, and suppose that the partial sums j i=1 α i for j ∈ N are pairwise distinct. The identity w = v over alphabet Σ is satisfied in U T n (S) if and only if for every u ∈ Σ + with 1 ≤ |u| ≤ n − 1 the polynomials f w u and f v u are functionally equivalent.

The identities of unitriangular matrices
Say that the scattered multiplicity of u ∈ Σ + in w ∈ Σ + is the number of distinct ways in which u occurs as a scattered subword of w, and denote this by m w u ∈ N 0 . For m ∈ N 0 write ⌊m⌋ S := m j=1 1 S .
Theorem 3.1. Let S be a commutative semiring. The identity w = v over alphabet Σ is satisfied in U n (S) if and only if ⌊m w u ⌋ S = ⌊m v u ⌋ S for each word u ∈ Σ + of length at most n − 1.
Proof. Let φ : Σ + → U n (S) be a morphism. Since every element of the image of φ has all diagonal entries equal to 1 S it follows from Lemma 2.1 and the definition of the polynomials f w u,ρ that for all 1 ≤ i < j ≤ n, we have where m w u denotes the scattered multiplicity of u in w. Since these multiplicities account for the only part of the formula which directly depends upon w, it is then clear that if each of the equalities ⌊m w u ⌋ S = ⌊m v u ⌋ S holds, then we must have w = v in U n (S). Now suppose w = v is satsified in U n (S) and let u be a word of length l < n with scattered multiplicities m w u and m v u in w and v respectively. Consider the morphism φ : Σ + → U n (S) defined by φ(s) p,p = 1 S , for all p ∈ [n] and s ∈ Σ; and Notice that Lemma 2.1 then yields ⌊m w Proof. If 1 S and 1 T generate isomorphic semirings, then for all j, k ∈ N 0 we have ⌊j⌋ S = ⌊k⌋ S if and only if ⌊j⌋ T = ⌊k⌋ T . It then follows immediately from Theorem 3.1 that U n (S) and U n (T ) satisfy exactly the same semigroup identities. Conversely, if U n (S) and U n (T ) satisfy the same identities, it follows that for all words w, v, u ∈ Σ + we must have ⌊m w u ⌋ S = ⌊m v u ⌋ S if and only if ⌊m w u ⌋ T = ⌊m v u ⌋ T . Consideration of all pairs of words w = a j , v = a k with respect to the fixed word u = a of length 1 allows us to determine all relations of the form ⌊j⌋ R = ⌊k⌋ R for j, k ∈ N and R = S, T . Since the same set of relations holds for R = S and R = T , it follows that 1 S and 1 T generate isomorphic semirings. Proof. If S is idempotent then it is easy to see that The previous results generalise a result of Volkov [14], who proved that w = v is a semigroup identity for U n (B) if and only if w and v have the same scattered subwords of length at most n − 1. Since the results of that paper also show that the unitriangular Boolean matrices U n (B), the monoid R n of reflexive binary relations on a set of cardinality n, and the Catalan monoid C n all satisfy exactly the same set of identities, we get the following immediate corollary.
Corollary 3.4. Let S be an idempotent semiring. The semigroup U n (S) satisfies exactly the same semigroup identities as the semigroup of reflexive relations R n or the Catalan monoid C n .
The monoid U n (S) can be viewed as an oversemigroup of U n (B) allowing for entries over the idempotent semiring S, and so it is natural to ask if there are analogous extensions of R n and C n . We note that there is an obvious Boolean matrix representation of R n , formed by sending a relation R to the Boolean matrix whose i, jth entry is 1 if and only if i and j are related by R. In the following section we shall consider a natural analogue of R n consisting of matrices over a semiring S with diagonal entries all equal to the multiplicative identity of S. It is clear that, in general, the set of all such matrices need not form a semigroup (e.g. over the tropical semiring such matrices are not closed under multiplication). We shall therefore restrict our attention to a particular class of idempotent semirings.

Generalised reflexive monoids
where I n denotes the identity matrix of M n (S). (In particular, V is J -trivial and so every regular element of V is idempotent.) Proof. (i) Suppose that A = U (1)X(1)U (2) · · · U (L)X(L)U (L + 1) and B = X(1) · · · X(L). Since every element of V has only ones on its diagonal, for all i, j ∈ [n] this gives where the sum ranges over all choices of ρ i ∈ [n], with ρ 0 = i and ρ 2L+1 = j. Since a + b ≥ a, b for all a, b ∈ S, it follows that by restricting the choices for the ρ i we will obtain a partial sum that must be less than or equal to A i,j . In particular, we have where the sum ranges over all choices of ρ i ∈ [n], with ρ 0 = i and ρ L = j. Since all diagonal entries of elements of V are equal to 1 S , this gives where the sum ranges over all choices of ρ i ∈ [n], with ρ 0 = i and ρ L = j. By the definition of matrix multiplication, the latter is equal to B i,j . Thus for all i, j ∈ [n] we have A i,j ≥ B i,j , and hence B A.
(ii) It follows immediately from part (i) that the powers are non-decreasing. In particular, if AJ B in V then there exist P, Q, X, Y ∈ V with A = P BQ and B = XAY . Now by part (i) this gives A B and B A, and hence A = B. Recalling that an element A ∈ V is regular if and only if it is D-related to an idempotent, it follows immediately that A is regular if and only if it is idempotent.
From now on let S be an interval semiring and define It is easily verified that R n (S) is a semigroup satisfying the conditions of Lemma 4.1. Let Z be the element of R n (S) given by Z i,j = 1 S for all i and j. Then it is easy to see that I n A Z for all A ∈ R n (S), with AZ = Z = ZA. In the case where S = B, it is clear that R n (B) is isomorphic to the monoid R n of reflexive binary relations on a set of cardinality n.
Let ρ := (ρ 0 , . . . , ρ L ) be an L + 1-tuple of elements from [n]. We shall say that ρ is a block chain of length L + 1 if ρ has the form:  (i) If A = X(1) · · · X(L) in R n (S), then for all i, j ∈ [n] we have where the sum ranges over all block chains ρ := (ρ 0 , . . . , ρ L ) with ρ 0 = i and ρ L = j. (ii) For all A ∈ R n (S) and all N ≥ n − 1 we have A N = A n−1 .
(In particular, A n−1 is idempotent and R n (S) is aperiodic.) Proof. (i) Let A = X(1) · · · X(L) in R n (S). Then, by the definition of matrix multiplication, where the sum ranges over all L + 1-tuples ρ := (ρ 0 , . . . , ρ L ), with ρ k ∈ [n] and ρ 0 = i, ρ L = j. Let ρ be such a tuple, and suppose that ρ is not a block chain. Then for some s, t with s + 1 < t we must have ρ s = ρ s+1 and ρ s = ρ t . Consider the tuple ρ ′ := (ρ ′ 0 , . . . , ρ ′ L ) obtained from ρ by replacing each ρ k with s < k < t by ρ s . Since each diagonal entry is equal to 1 S and 1 S ≥ a for all a ∈ S, it is easy to see that: By repeated application of the above argument, it is clear that X(1) σ 0 ,σ 1 X(2) σ 1 ,σ 2 · · · X(L) σ L−1 ,σ L ≥ X(1) ρ 0 ,ρ 1 X(2) ρ 1 ,ρ 2 · · · X(L) ρ L−1 ,ρ L , for some block chain σ. Since a ≤ b in S if and only if a + b = b, it follows from the previous observation that taking the sum over all block chains must give the same result as taking the sum over all tuples. Thus where the sum ranges over all block chains ρ := (ρ 0 , . . . , ρ L ) with ρ 0 = i and ρ L = j.
(ii) Let A ∈ R n (S) and N ∈ N. Then by part (i) where the sum ranges over all N + 1-tuples of the form ρ := (i, . . . , i, i 1 , . . . , i 1 , . . . , i k . . . , i k , j . . . , j), where i, i 1 , . . . , i k , j are distinct elements of [n]. Moreover, for such an N +1tuple ρ, the fact that the diagonal entries of A are all equal to 1 S means that the corresponding term of the summation is equal to Thus for each N ≥ n − 1 we see that every term occurring in the summation above also occurs as a term in the corresponding summation for A n−1 , and hence A N A n−1 . On the other hand, by Lemma 4.1, we know that A n−1 A N for all N ≥ n − 1. Thus we may conclude that A n−1 = A N for all N ≥ n − 1. In particular, (Recall that a semigroup V is aperiodic if for every a ∈ V there exists a positive integer m such that a m+1 = a m .) We note that in the case where R n (S) is finite, the fact that R n (S) is aperiodic follows directly from Lemma 4.1, since every finite H-trivial semigroup is aperiodic. For infinite semigroups, J -triviality is not sufficient to deduce aperiodicity (for example, the semigroup of natural numbers under addition is an infinite J -trivial semigroup which is clearly not aperiodic). Proof. Noting that U n (S) ⊆ R n (S), it suffices to show that if w and v have the same scattered subwords of length at most n − 1, then w = v holds in R n (S).
Let φ : Σ + → R n (S) be a morphism and let w = w 1 · · · w q ∈ Σ + . By Lemma 4.2 for each i, j ∈ [n] we have where the sum ranges over all block chains ρ of total length q + 1, with first entry i and last entry j. To each choice of t = (t 0 , t 1 , . . . , t p , t p+1 ) with 0 = t 0 < t 1 < · · · < t p < t p+1 = q + 1 and p ≤ n − 1 we may associate the set B i,j t of all block chains of the form: It is easy to see that the set of all block chains of total length q + 1 with first entry i and last entry j is the disjoint union of the sets B i,j t . Thus the summation above can be viewed as summing over all block chains in B i,j t for all choices 0 = t 0 < t 1 < · · · < t p < t p+1 = q + 1. Fix t and consider the term of the summation corresponding to the block chain The fact that all diagonal entries are equal to 1 S means that the corresponding term is equal to It is then clear that the above expression depends only upon the choice of scattered subword u = w t 1 · · · w tp of w of length p ≤ n − 1, and the intermediate vertices i 1 , . . . , i p−1 . Since addition in S is idempotent, we may therefore conclude that where the sum ranges over all scattered subwords u of w of length at most n − 1, and over all choices of distinct i 0 , . . . , i p ∈ [n] with i 0 = i and i p = j. It then follows that if w and v contain the same scattered subwords of length at most n − 1 then φ(w) = φ(v).

Catalan monoids and gossip
The Catalan monoid C n [12] is the monoid given by the presentation with generators e 1 , . . . , e n−1 and relations e i e i = e i , e i e j = e j e i e i e i+1 e i = e i+1 e i e i+1 = e i e i+1 (2) for all appropriate i, j with |i − j| > 1. The name comes from the fact that Proof. Since each D(i) is a convex upper unitriangular matrix, these matrices clearly generate a submonoid of C U n . Suppose then that A ∈ C U n . Let m i = max{j : It is straightforward to verify that if F (i) i,j = 1 if and only if i ≤ j ≤ m i , and similarly for all k > i, we have F (k) i,j = 1 if and only if i = j. Thus the (i, j)th coordinate of B := F (n − 1) · · · F (i) is non-zero if and only if i ≤ j ≤ m i . Let M = BF (i−1) · · · F (1). We claim A = M . Since M B, it is clear from the observations above that M i,j ≥ B i,j = 1 for all i ≤ j ≤ m i . Since M is clearly upper triangular, it remains to show that M i,j = 0 for all j > m i . To see this, notice that the right action of D(k) on any Boolean matrix X results in the matrix obtained from X by taking the Boolean sum of columns k and k + 1. By definition, all factors D(k) occurring in F (j) satisfy j ≤ k ≤ m j − 1. For j < i the only factors D(k) occurring in F (j) therefore satisfy j ≤ k ≤ m j − 1 ≤ m i − 1. This means that M is obtained from the matrix B by the right action of some collection of matrices D(k) with k ≤ m i − 1, and hence columns j > m i of M and B agree.
It is straightforward to verify that the matrices D(i) satisfy the relations (2). Since the elements of C U n are in one to one correspondence with the Dyck paths from (0, 0) to (n, n), we see that |C U n | = |C n |, and so these two monoids must be isomorphic.
Let E(i) denote the product D(i)D(i) T ∈ Conv n . The double Catalan monoid DC n of Mazorchuk and Steinberg [7] is the submonoid of Conv n generated by the matrices E 1 , . . . , E n−1 . Define U : DC n → C U n to be the map sending a matrix to its upper profile, namely U (A) i,j = A i,j if i ≤ j and U (A) i,j = 0 otherwise. Lemma 5.2. The map U : DC n → C U n is a surjective monoid homomorphism.
Proof. Let A, B ∈ DC n . By definition U (AB) i,j = (AB) i,j if i ≤ j and 0 otherwise. Thus the non-zero entries occur in positions i ≤ j for which there exists k with A i,k = B k,j = 1. Note that if there exists such a k with k < i, then by the convexity of B we must have A i,i = B i,j = 1, whilst if there exists such a k with k > j, then by the convexity of A we must have A i,j = B j,j = 1. The non-zero entries of U (AB) therefore occur in positions i, j for which there exists i ≤ k ≤ j with A i,k = B k,j = 1, and it is easy to see that these coincide with the non-zero entries of U (A)U (B). Now let A ∈ DC n . By definition we may write A = E i 1 · · · E im for some 1 ≤ i 1 , . . . , i m ≤ n. Applying the morphism U then yields and the result follows from Lemma 5.1. Now let D(i, j) denote the n × n Boolean matrix with 1's on the diagonal and a single off-diagonal 1 in position (i, j), and let E(i, j) = D(i, j)D(j, i).
The gossip monoid [2,6] is the submonoid of M n (B) generated by the set {E(i, j) : 1 ≤ i < j ≤ n}. The one directional gossip monoid G n is the submonoid of M n (B) generated by the set {D(i, j) : 1 ≤ i = j ≤ n}. It is clear from the definition that G n is a submonoid of G n . Moreover, since E(i) = E(i, i + 1) we see that the double Catalan monoid is a submonoid of G n . The names 'one-directional gossip monoid' and 'gossip monoid' come from the following interpretation of the matrices D(i, j) and E(i, j). Consider a group of n people, each with a unique piece of information or 'gossip' they would like to spread. It is clear that we can record the state of knowledge amongst the n people at any given time by means of a Boolean matrix, putting a 1 in the (i, j)th position if and only if person j has learned the piece of gossip originally known only to person i. The right action of the matrix D(i, j) on M n (B) then corresponds to a one-way communication from person i to person j, in which person i recounts to person j all of the gossip that they know. The right action of the matrix E(i, j) on M n (B) corresponds to a two-way communication between person i and person j, at the end of which both parties have learned the sum total of gossip known to either i or j. The double Catalan monoid can therefore be thought of as an algebraic model of gossip in a network in which person i can communicate only with their nearest neighbours, i − 1 and i + 1.
Proposition 5.3. Let n ∈ N. The gossip monoid G n , the one-directional gossip monoidḠ n , and the double Catalan monoid DC n , all satisfy the same set of identities as the reflexive monoid R n .
Proof. It is clear from the above definitions that DC n ⊆ G n ⊆ G n ⊆ R n . Thus Id(DC n ) ⊇ Id(G n ) ⊇ Id(G n ) ⊇ Id(R n ). By Lemma 5.2, there is a surjective monoid homomorphism from U : DC n → C U n , from which it follows that Id(C U n ) ⊇ Id(DC n ). The result then follows from the fact that R n and C n satisfy the same identities [14]. Now let S be an interval semiring and for each s ∈ S define: D(i, j; s) to be the matrix with 1's on the diagonal and a single off-diagonal entry s in position (i, j); and E(i, j; s) = D(i, j; s)D(j, i; s). Then we may define monoids: Since S is an interval semiring, we note that each is a submonoid of R n (S).
Proposition 5.4. Let S be an interval semiring. The monoids C U n (S), DC n (S), G n (S) and G n (S) satisfy the same identities as the monoid R n (S).
Proof. It is clear from the definitions that DC n ⊆ DC n (S) ⊆ G n (S) ⊆ G n (S) ⊆ R n (S) and C U n ⊆ C U n (S) ⊆ R n (S).
Thus by Proposition 5.4 and Theorem 4.3 we deduce that each of these monoids satisfies the same set of identities.
In the case where S is the subsemiring [0, +∞] of the (min-plus) tropical semiring, it is straightforward to verify that the monoid G n (S) is precisely the lossy gossip monoid G n of [2].
Corollary 5.5. The lossy gossip monoid is finitely based for n ≤ 4 and non-finitely based otherwise.