1 Introduction

Commutative bipotent semirings appear naturally in many areas of mathematics; for example, the boolean semiring has important applications in computer science [4], while tropical and related semirings have found applications in areas as diverse as algebraic geometry, geometric group theory, automata and formal languages, and combinatorial optimization and control theory [1, 2, 10]. Many of the problems which arise naturally in these areas involve finite systems of linear (over the semiring) equations and can therefore be formulated in terms of matrix operations; understanding the structure of matrix algebra over these semirings is thus vital for applications, and much recent research has been devoted to this topic. An additional motivation comes from abstract semigroup theory, where there is increasing evidence [5,6,7] that tropical and related semirings are natural carriers for representations of important classes of semigroups and monoids which, due to their structural properties, do not admit faithful finite dimensional representations over fields.

In this paper, we focus on two algebraic finiteness conditions for semigroups of matrices over bipotent semirings: weak permutability and permutability. A semigroup S is called weakly permutable if there exists a \(k \ge 2\) such for any \(s_1,\dots ,s_k \in S\) there exist permutations \(\sigma \ne \tau \) of \(\{1,\dots ,k\}\) such that \(s_{\sigma (1)}s_{\sigma (2)}\ldots s_{\sigma (k)} = s_{\tau (1)}s_{\tau (2)}\ldots s_{\tau (k)}\). A semigroup S is called permutable (or sometimes strongly permutable) if there exists a \(k \ge 2\) such for any \(s_1,\dots ,s_k \in S\) there exists a permutation \(\sigma \) of \(\{1,\dots ,k\}\) such that \(s_{\sigma (1)}s_{\sigma (2)}\ldots s_{\sigma (k)} = s_{1}s_{2}\ldots s_{k}\). We note here a few key facts about these properties; for a comprehensive introduction the reader is directed to [11,  Chapter 19]. Notice that every strongly permutable semigroup S is weakly permutable by taking \(\tau \) to be the identity permutation. Every finite semigroup is clearly strongly permutable, as is every commutative semigroup. Indeed, weak and strong permutability may be thought of as very weak commutativity conditions. It is easy to see that if a semigroup S is weakly [strongly] permutable then every subsemigroup of S and every homomorphic image of S is also weakly [strongly] permutable. Permutability conditions are of interest in general because of connections with polynomial identities in semigroup algebras [11,  Chapter 19], and are lent additional importance in these particular semigroups by interest in representations over semirings: any permutability condition satisfied by matrix semigroups poses an obstruction to faithfully representing semigroups not satisfying the condition.

We begin, in Sect. 2, by establishing some structural results about commutative bipotent semirings which will be useful in our subsequent analysis. These include a simple classification of the monogenic examples, which may be of independent interest.

In Sect. 3 we proceed to look at weak permutability, proving that every full matrix semigroup, and hence every matrix semigroup, over a commutative bipotent semiring is weakly permutable. This fact was first stated by d’Alessandro and Pasku [3] but there is an error (described below) in their proof.

In Sect. 4 we turn our attention to (strong) permutability. If the semiring has an element of infinite multiplicative order (or more generally, elements of unbounded multiplicative order) we prove (Theorem 4.6) that the full matrix semigroup and upper triangular matrix semigroups are not strongly permutable in any dimension greater than 1. This applies in particular to the tropical and many related semirings. On the other hand, semirings with bounded multiplicative order exhibit a range of behaviours, with apparently similar semirings sometimes differing quite dramatically. Matrix semigroups over chain semirings, which are multiplicatively as well as additively idempotent, are strongly permutable in all dimensions (Corollary 4.10).

Section 5 is devoted to the class of truncated tropical semirings, where it transpires that the full matrix semigroups can be strongly permutable in all dimensions (Theorem 5.3), only in dimension 1 (Corollary 5.2) or, interestingly, only in dimensions 1 and 2 (Theorem 5.7). Similar results are obtained for the monoids of upper triangular and upper unitriangular matrices. In the course of our study we describe all isomorphisms between truncated tropical semirings.

Throughout this paper we write \(\mathbb {N}\) for the set of natural numbers excluding 0. For \(n \in \mathbb {N}\) we write [n] for the discrete interval \(\mathbb {N} \cap [1,n]\), and \(\mathcal {S}_n\) for the symmetric group on the set [n].

2 Commutative bipotent semirings

For our purposes a semiring S is a non-empty set with two binary operations—addition and multiplication—such that both operations are associative, addition is commutative, and multiplication distributes over addition on both sides. A semiring is called commutative if the multiplication is commutative and bipotent if \(x + y\) is always either x or y. A bipotent semiring admits a natural linear order defined by \(x \le y\) if and only if \(x+y = y\), and the distributive laws mean exactly that multiplication respects this order, giving rise to a totally ordered semigroup. Conversely, every totally ordered semigroup gives rise to a bipotent semiring, by taking the semigroup operation as multiplication and defining the sum to be maximum with respect to the order. Bipotent semirings are thus, at one level, the same thing as totally ordered semigroups, but the two viewpoints lead naturally to rather different questions; in particular the semiring viewpoint leads to the study of linear algebra and matrices. Our main interest is in commutative bipotent semirings, although some of our results will extend to the non-commutative case.

Some authors insist that a semiring should have a zero (that is an element which is a multiplicative zero and an additive identity) and/or a (multiplicative) identity element, but most of our results will not require these. In fact it is easy to see that any commutative bipotent semiring S without a zero element can have one “adjoined”, that is, can be embedded in a commutative bipotent semiring with one extra element 0 which is a zero. We write \(S^0\) for this semiring; if S already has a zero element then we define \(S^0 = S\) and use 0 to denote the zero element of S. On the other hand, the corresponding statement is not true for identity elements:

Proposition 2.1

There exists a commutative bipotent semiring S without identity which cannot be embedded in any bipotent semiring with identity.

Proof

Let \(S = \{ a , b , c \}\) be the commutative bipotent semiring such that \(c \ge b \ge a\), all elements are multiplicatively idempotent, and all non-idempotent products are b. It is straightforward to verify that the given operations respect the associative and distributive laws. Now suppose we can embed S in a bipotent semiring with identity 1, and consider where 1 lies in the order. If \(1 > b\), then \(a(1+b) = a1 = a\), but by the distributive law \(a(1+b) = a1 + ab = a+b = b\) giving a contradiction. On the other hand, if \(1 < b\), then \(c(1+b) = cb = b\), but similarly by the distributive law \(c(1+b) = c1 + cb = c+b = c\), giving a contradiction. Thus, we cannot embed S into a bipotent semiring with identity. \(\square \)

Notwithstanding the impossibility in general of adjoining an identity element, it is sometimes convenient to introduce “the identity” as a purely notational device. If S is a commutative semiring without identity, we define \(S^1\) to be \(S \cup \lbrace 1 \rbrace \) where 1 is a new symbol, and define \(1x=x\) for all x and \(1+1 = 1\) and also (where S has a 0) \(1+0 = 1\), but leave other sums involving 1 undefined. We caution that this structure is not a semiring, since addition is only partially defined. Again, if S already has an identity we set \(S^1 = S\) and use 1 to denote the existing identity. We write \(S^{01}\) for \((S^0)^1\).

A subsemiring is a subset closed under addition and multiplication; note that even if S has zero and/or identity elements, subsemirings are not required to contain them. If \(a \in S\) then we write \(\langle a \rangle \) for the (monogenic) subsemiring of S generated by a (that is, the intersection of all subsemirings containing a). If S is bipotent then \(\langle a \rangle \) coincides with the multiplicative subsemigroup of S generated by a, in other words, the set of positive powers of a. The (multiplicative) order of a is defined to be the cardinality of the set of positive powers of a, which when S is bipotent is the cardinality of \(\langle a \rangle \).

We will consider in particular the following examples of commutative bipotent semirings; some of these merit study due to external applications, some arise naturally in the general theory, and others are included to illustrate the full range of possible behaviours:

  • The tropical (or max-plus) semifield \(\mathbb {T}\) consists of the real numbers augmented with \(-\infty \), with maximum as its addition and addition as its multiplication; it has applications in numerous areas including biology [1], control theory [2] and algebraic geometry [10]. The tropical semifield admits isomorphic manifestations as the min-plus semifield (the real numbers augmented with \(+\infty \) under minimum and classical addition) and the max-times semifield (the non-negative real numbers under maximum and classical multiplication).

  • The tropical natural number semiring \(\mathbb {N}_\mathrm {max}\) is the subsemiring of \(\mathbb {T}\) consisting of natural numbers; it has applications in areas such as formal language theory and automata theory [9].

  • The tropical negative natural number semiring \((-\mathbb {N})_\mathrm {max}\) is the subsemiring of \(\mathbb {T}\) consisting of the negative integers. (It is isomorphic to the natural numbers under minimum and classical addition.)

  • For \(x, y \in \mathbb {R}\) with \(0 \le x < y\) the truncated tropical semiring \(\mathbb {T}_{[x,y]}\) consists of the real interval [xy] augmented with 0 and \(-\infty \) with operations maximum and y-truncated addition given by \(ab = \min (a+b, y)\) where \(+\) here denotes classical addition.

  • For \(k \in \mathbb {N}\) the truncated tropical natural number semiring \([k]_\mathrm {max}\) consists of the set \([k] = \lbrace 1, \dots , k \rbrace \) with operations defined as in \(\mathbb {T}_{[1,k]}\).

  • For \(k \in \mathbb {N}\) the truncated tropical negative natural number semiring \([-k]_\mathrm {max}\) consists of the set \(\lbrace -k, \dots , -1 \rbrace \) with operations maximum and \((-k)\)-truncated addition given by \(a \cdot b = \max (a+b,-k)\). (Note that \([-1]_{\max }\) and \([1]_{\max }\) are both trivial and therefore isomorphic to each other.)

  • Any linearly ordered set admits the structure of a commutative bipotent semiring, with maximum as addition and minimum as multiplication. We call these chain semirings. A prominent example is the 2-element chain semiring, the boolean semifield, which is isomorphic to the semiring with two elements True and False with operations “and” and “or”, and has natural applications in logic and computer science [4].

For any semiring S and \(n \in \mathbb {N}\), the set of \(n \times n\) matrices over S forms a semiring under matrix multiplication and addition induced from S in the usual way. Note that \(M_n(S)\) will typically be neither commutative nor bipotent (even when S is both). Our main interest here is in the multiplicative semigroup of \(M_n(S)\). We also define \(UT_n(S)\) to be the subsemiring of \(M_n(S^0)\) consisting of matrices with 0 below the main diagonal and elements from S on and above the main diagonal. We write \(U_n(S)\) for the semiring of matrices over \(S^{01}\) which have 0 below the main diagonal, 1 on the main diagonal and elements from S above the main diagonal; note that even if the 1 is adjoined the partial addition in \(S^{01}\) is defined for sufficiently many values to enable matrix addition and multiplication on this set. Again, our principal interest is in the structure of \(UT_n(S)\) and \(U_n(S)\) as multiplicative semigroups. Note that \(M_1(S) = UT_1(S)\) is isomorphic to the multiplicative semigroup of S, while \(U_1(S)\) is the trivial monoid and \(U_2(S)\) is isomorphic to the additive semigroup of S.

Lemma 2.2

Let S be a bipotent semiring. If an element \(x \in S\) has finite multiplicative order (that is, has finitely many distinct powers) then it has period 1 (that is, \(x^k = x^{k+1}\) for some \(k \in \mathbb {N}\)).

Proof

Let \(x \in S\) have finite multiplicative order. Then there exist \(r, m \in \mathbb {N}\) such that \(x^m = x^{m+r}\). If \(r=1\) we are done, so assume \(r>1\). As S is bipotent we have that the sum \(x^m + \dots + x^{m+r-1} = x^k\) for some k between m and \(m+r-1\). But now by distributivity and commutativity of addition,

$$\begin{aligned} x^{k+1}&= \ x(x^m + \dots + x^{m+r-2} + x^{m+r-1}) \\&= x^{m+1} + \dots + x^{m+r-1} + x^m \\&= x^k. \quad \square \end{aligned}$$

The following lemma describes all the possible bipotent semirings generated by a single element:

Lemma 2.3

Let S be a bipotent semiring. If \(a \in S\) and \(\langle a \rangle \) is the monogenic subsemiring generated by a, then

We remark that the four cases above are comprehensive but not quite mutually exclusive: in the case that a has order 1 we have \(a = a^2\) and \(\langle a \rangle \) is isomorphic to both \([1]_{\max }\) and \([-1]_{\max }\).

Proof

First suppose \(a \le a^2\). Define a map

$$\begin{aligned} \phi \ : \ \mathbb {N}_\mathrm {max}\rightarrow \langle a \rangle , \ \ n \mapsto a^n. \end{aligned}$$

This map is surjective (because of our observation that, in a bipotent semiring, \(\langle a \rangle \) coincides with the multiplicative semigroup generated by a) and preserves multiplication because of basic properties of powers. Now let \(n, m \in \mathbb {N}\) and suppose without loss of generality that \(n \ge m\). Since \(a \le a^2\) we have \(a^k \le a^{k+1}\) for all k (because the total order is compatible with multiplication) and hence \(a^m \le a^n\) (because \(m \le n\) and the order is transitive). Therefore

$$\begin{aligned} \phi (\max (n,m)) \ = \ \phi (n) \ = \ a^n \ = \ a^n + a^m \ = \ \phi (n) + \phi (m). \end{aligned}$$

If a has infinite order then \(\phi \) is injective, and we have shown that it is an isomorphism from \(\mathbb {N}_\mathrm {max}\) to \(\langle a \rangle \).

If a has finite order k then let \(\varphi \) be the restriction of \(\phi \) to the subset [k]. Clearly \(\varphi \) is a bijection. Since the semiring addition (in other words, the order) on \([k]_\mathrm {max}\) is the restriction of that on \(\mathbb {N}_\mathrm {max}\), the fact that \(\varphi \) preserves semiring addition follows from the fact that \(\phi \) does. Now let \(n, m \in \mathbb {N}\) and suppose without loss of generality that \(n \ge m\). Then

$$\begin{aligned} \varphi (nm) \ = \ a^{n + m} \ = \ a^n a^m \ = \ \varphi (n) \varphi (m) \end{aligned}$$

for all \(n, m \in \mathbb {N}\). The first equality here holds because if \(n+ m \ge k\) then \(a^{n+m} = a^k\), as a has period 1 by Lemma 2.2. Hence, \(\varphi \) is an isomorphism between \([k]_\mathrm {max}\) and \(\langle a \rangle \).

Similarly if \(a^2 \le a\) then we define

$$\begin{aligned} \psi \ : \ (-\mathbb {N})_\mathrm {max}\rightarrow \langle a \rangle , \ \ n \mapsto a^{-n}. \end{aligned}$$

Again \(\psi \) is surjective. This time for negative integers \(n \ge m\) we use \(a^2 \le a\) to deduce that \(a^{-m} \le a^{-n}\) so

$$\begin{aligned} \psi (\max (n,m)) = \psi (n) = a^{-n} = a^{-n} + a^{-m} = \psi (n) + \psi (m). \end{aligned}$$

and \(\psi \) preserves semiring addition. If a has infinite order then \(\psi \) is injective and preserves the semiring multiplication, so it is an isomorphism between \((-\mathbb {N})_\mathrm {max}\) and \(\langle a \rangle \). If a has finite order k then an entirely similar argument to that above shows that the restriction of \(\psi \) to \(-[k]\) is an isomorphism between \([-k]_\mathrm {max}\) and \(\langle a \rangle \). \(\square \)

3 Weak permutability

In this section we briefly consider weak permutability, showing that any semigroup of matrices over a commutative bipotent semiring always has this property. This result was first stated by d’Allesandro and Pasku [3], but Taylor [12] identified an error in their proof. The error and its consequences are discussed below. Our proof is, nonetheless, inspired by their method.

Proposition 3.1

Let S be a commutative bipotent semiring. Then \(M_n(S)\) is weakly permutable for all \(n \in \mathbb {N}\).

Proof

Fix \(n \in \mathbb {N}\). Let \(\Gamma _n\) denote the complete directed graph (with loops) on the set [n]. We identify edges in \(\Gamma _n\) with pairs in \([n] \times [n]\) in the obvious way; in particular we will index the entries of \(n \times n\) matrices by edges in \(\Gamma _n\).

Let \(\Pi \) denote the set of \(n \times n\) matrices whose entries are edges from \(\Gamma _n\) (that is, pairs from \([n] \times [n]\)). Let \(c = \vert \Pi \vert = n^{2n^2}\). Choose k large enough that \(k! > c^k\).

Consider a finite sequence of k matrices of size \(n \times n\) over the semiring S, say \(M_1, \dots , M_k\). For a permutation \(\sigma \) in the symmetric group \(\mathcal {S}_k\), write

$$\begin{aligned} M_\sigma \ = \ M_{\sigma (1)} M_{\sigma (2)} M_{\sigma (3)} \ldots M_{\sigma (k)}. \end{aligned}$$

We must show that there are distinct permutations \(\sigma , \tau \in \mathcal {S}_k\) with \(M_\sigma = M_\tau \).

We define a function \(\pi : \mathcal {S}_k \rightarrow \Pi ^{[k]}\) (where \(\Pi ^{[k]}\) denotes the set of functions from [k] to \(\Pi \)) as follows. For each \(\sigma \in \mathcal {S}_k\) and each \(x, y \in [n]\), consider the (xy) entry of the matrix \(M_\sigma \). It follows from the definition of matrix multiplication and the fact S is bipotent that there is at least one path \(p_1, \dots , p_k\) of length k from x to y in \(\Gamma _n\) such that this entry is given by

$$\begin{aligned} {(M_\sigma )}_{x,y} \ = \ {(M_{\sigma (1)})}_{p_1} {(M_{\sigma (2)})}_{p_2} \ldots {(M_{\sigma (k)})}_{p_k}. \end{aligned}$$
(1)

Choose any such path, and for each \(i \in [k]\) define the (xy) entry of \(\left( \pi (\sigma ) \right) (i)\) to be the edge \(p_{\sigma ^{-1}(i)}\) (that is, the edge indexing the entry of \(M_i\) which contributes in the computation of the (xy) entry of \(M_\sigma \)). Thus reordering the terms in (1) we have

$$\begin{aligned} (M_\sigma )_{x,y} = (M_1)_{\left( \pi (\sigma ) \right) (1)_{x,y}} (M_2)_{\left( \pi (\sigma ) \right) (2)_{x,y}} \ldots (M_k)_{\left( \pi (\sigma ) \right) (k)_{x,y}} \end{aligned}$$

But this means that \(M_\sigma \) is a function of \(\pi (\sigma )\).

The domain \(\mathcal {S}_k\) of \(\pi \) has cardinality k! while the codomain \(\Pi ^{[k]}\) of \(\pi \) has cardinality . Since k was chosen such that \(k! > c^k\) there must be distinct permutations \(\sigma , \tau \in \mathcal {S}_k\) such that \(\pi (\sigma ) = \pi (\tau )\), which by the previous paragraph means that \(M_\sigma = M_\tau \). \(\square \)

The mistake in [3] lies in the proof of the first part of [3,  Proposition 3], where k is taken to be the smallest integer such that \(\alpha k^\beta < k!\). The problem is that k was discussed prior to this point, and in fact played an implicit role in the definition of the set \(\mathcal {C}\), the cardinality of which was in turn used to define \(\alpha \) and \(\beta \). Thus, one is not necessarily free to choose k at this point without also changing \(\alpha \) and \(\beta \). The claim that one may choose k with \(\alpha k^\beta < k!\) implicitly assumes \(\alpha \) and \(\beta \) to be constant, when in reality they are functions of k and there is no immediate reason to suppose that \(\alpha k^\beta \) grows more slowly than k!.

We discuss briefly the impact upon the correctness of other results in [3]. The second part of [3,  Proposition 3] (which establishes the very important result that finitely generated semigroups of tropical matrices have polynomial growth) is correct, even though the proof ostensibly employs the same argument as the first part; the erroneous section of the argument is not required in this part, and the values of \(\alpha \) and \(\beta \) (and hence also of \(\delta \) and \(\gamma \)) here are independent of k so that the growth bound obtained really is polynomial in k. [3,  Proposition 4] is claimed to be proved by “a slight generalisation” of the (erroneous) proof of [3,  Proposition 3]; we believe a variation on the above proof technique can be used to establish this result, but we do not do this here as it is (not being concerned with bipotent semirings) rather outside the scope of the present paper. The statement of [3,  Proposition 5] is true: the main proof given relies on [3,  Proposition 4] and is therefore incomplete, but the alternative proof via Gromov’s polynomial growth theorem, outlined in [3,  Remark 3], is valid.

4 Strong permutability

In this section we turn our attention to the stronger version of permutability. We shall need the following result, which is trivial where the semiring S has a zero element but requires slightly more work when it does not. First, recall that for a product of k matrices \(M_1\ldots M_k\) and a permutation \(\sigma \in \mathcal {S}_k\), we write \(M_\sigma = M_{\sigma (1)}\ldots M_{\sigma (k)}\).

Proposition 4.1

Let S be a commutative bipotent semiring. If \(M_n(S)\) is strongly permutable then \(M_m(S)\) is strongly permutable for all \(m < n\). If \(UT_n(S)\) is strongly permutable then \(UT_m(S)\) is strongly permutable for all \(m < n\).

Proof

Consider first the case of full matrix semigroups. Suppose false for a contradiction; then there is an \(m < n\) such that for every \(k \in \mathbb {N}\) there exist \(m \times m\) matrices \(M_1, \dots , M_k\) such that \(M_\sigma \ne M_e\) for any non-trivial permutation \(\sigma \). Fix k and let \(M_1, \dots , M_k\) be as given. Let z be the smallest (with respect to the order on the semiring) entry of any matrix \(M_i\). For each i let \(N_i\) be the \(n \times n\) matrix obtained by taking \(M_i\) and adjoining \(n-m\) rows at the bottom and \(n-m\) columns at the right in which every entry is z.

Now consider the xy entry of a product \(N_{i_1}\ldots N_{i_k}\) for \(x,y \le m\). As S is bipotent this entry is equal to the maximum (with respect to the order in the semiring) across sequences \(x = x_0, x_1, \dots , x_k = y\) of the term:

$$\begin{aligned} \prod _{j=1}^{k}{(N_{i_j})}_{x_{j-1},x_j}. \end{aligned}$$

If in such a sequence we have \(x_j > m\) for some \(1 \le j < k\), then \((N_{i_j})_{x_{j-1},m} \ge z = (N_{i_j})_{x_{j-1},x_j}\) and \((N_{i_{j+1}})_{m,x_{j+1}} \ge z = (N_{i_{j+1}})_{x_j,x_{j+1}}\) by definition, so we may replace \(x_j\) by m in the sequence without reducing the resulting term. Thus, we may assume the above maximum is attained for a sequence with \(x_j \le m\) for all j, and it follows that the top-left \(m \times m\) submatrix of the product is the product of the corresponding submatrices in the factors, in other words, the corresponding product of the \(M_i\)s. In particular, for any permutation \(\sigma \) the top-left \(m \times m\) submatrix of \(N_\sigma \) is exactly \(M_\sigma \). Thus, \(N_\sigma \ne N_e\) for any non-trivial permutation \(\sigma \), which since k was chosen arbitrarily contradicts the assumption that \(M_n(S)\) is permutable.

For the upper triangular case, there exists a surjective homomorphism from \(UT_n(S)\) to \(UT_m(S)\) for \(m < n\) by only considering the first m rows and columns. Hence if \(UT_n(S)\) is permutable then \(UT_m(S)\) is permutable for all \(m < n\). \(\square \)

Our next objective is to show that matrix semigroups over a (not necessarily commutative) bipotent semiring with elements of infinite multiplicative order (or more generally, unbounded multiplicative order) are not, in general, permutable. A key tool is a result of Okniński [11,  Chapter 19, Lemma 22], stating that a finitely generated inverse semigroup with infinitely many idempotents cannot be permutable. In particular this means that the bicyclic monoid is not permutable. This will combine with a representation of the bicyclic monoid by tropical matrices, due to Izhakian and Margolis [6], to yield non-permutability results for tropical matrix monoids, and then with our classification of the monogenic bipotent semirings (Lemma 2.3) to obtain non-permutability results for matrix monoids over semirings with elements of infinite order. Some elementary model theory extends these results to semirings with unbounded order.

Theorem 4.2

\(M_n(\mathbb {N}_\mathrm {max}), \ M_n((-\mathbb {N})_\mathrm {max}), UT_n(\mathbb {N}_\mathrm {max})\) and \(UT_n((-\mathbb {N})_\mathrm {max})\) are not strongly permutable for \(n \ge 2\).

Proof

Let \(\mathcal {B}= \langle p,q \ : \ pq = 1 \rangle \) be the bicyclic monoid. Recall that every element of \(\mathcal {B}\) can be written as \(q^ip^j\) for some \(i,j \in \mathbb {N}\cup \{0\}\). By [6] there is a semigroup embedding of \(\mathcal {B}\) into \(UT_2(\mathbb {T})\) given by

$$\begin{aligned} \rho : \mathcal {B}\rightarrow UT_2(\mathbb {T}), \quad q^ip^j \mapsto \begin{pmatrix} i - j &{} i+j \\ -\infty &{} j-i \end{pmatrix}. \end{aligned}$$

Since the bicyclic monoid is not permutable [11,  Chapter 19, Lemma 22] and subsemigroups of permutable semigroups are permutable, we deduce that \(UT_2(\mathbb {T})\) is not permutable. Indeed further, for every k there are upper triangular matrices \(M_1, \dots , M_k\) whose diagonal and above-diagonal entries are integers, with the property that \(M_\sigma \ne M_e\) for every non-trivial permutation \(\sigma \in \mathcal {S}_k\).

If we fix an integer \(\lambda \) strictly less then every integer appearing in these matrices, then the tropically scaled matrices \((-\lambda ) M_1, \dots , (-\lambda ) M_k\) clearly also have this property. Replacing the \(-\infty \) entry of these matrices with the zero element of \(\mathbb {N}_\mathrm {max}^0\) yields a sequences of matrices to show that \(UT_2(\mathbb {N}_\mathrm {max})\) is not strongly permutable. Similarly, tropically scaling \(M_1, \dots , M_k\) by the negative of an integer greater than every entry yields a sequence of matrices for each k showing that \(UT_2((-\mathbb {N})_\mathrm {max})\) is not strongly permutable.

It remains to establish the claims for full matrix semigroups. (Note that, since the semirings here lack zero elements, we do not have a natural embedding of each upper triangular matrix semigroup into the corresponding full matrix semigroup which would allow us to immediately deduce the remaining claims.)

Let \(k > 1\) and \(M_1, \dots , M_k\) be as above. Choose a very large \(\mu \in \mathbb {N}\), and let \(N_1, \dots , N_k \in M_n(\mathbb {N}_\mathrm {max})\) be obtained from \(M_1, \dots , M_k\) by scaling tropically by \(\mu \), and replacing the \(-\infty \) below the diagonal with 1. Now consider the product \(N_\sigma \) for some \(\sigma \in \mathcal {S}_k\), and in particular the computation of the (xy) entry for some \((x,y) \ne (2,1)\). A simple calculation shows that, provided \(\mu \) was chosen large enough, the terms which do not feature the (2,1) entry of any \(N_i\) will all exceed those which do, from which it follows that \((N_\sigma )_{x,y} = k \mu + (M_\sigma )_{x,y}\). Thus, we conclude that \(N_\sigma \ne N_e\). Since k and \(\sigma \) were arbitrary, this means that \(M_n(\mathbb {N}_\mathrm {max})\) is not strongly permutable.

Finally, tropically scaling the matrices \(N_1, \dots , N_k\) by a sufficiently negative integer gives a sequence to show that \(M_n((-\mathbb {N})_\mathrm {max})\) is not strong permutable \(\square \)

Lemma 4.3

\(U_n(\mathbb {N}_\mathrm {max})\) is strongly permutable if and only if \(n \le 2\).

Proof

Recall that \(U_1(\mathbb {N}_\mathrm {max})\) is trivial while \(U_2(\mathbb {N}_\mathrm {max})\) is isomorphic to the (commutative) additive semigroup of the semiring, so both are strongly permutable. There exists a surjective morphism from \(U_n(\mathbb {N}_\mathrm {max})\) to \(U_3(\mathbb {N}_\mathrm {max})\) for all \(n \ge 3\) by mapping to each matrix to its top-left corner 3 by 3 submatrix, so it suffices to show that \(U_3(\mathbb {N}_\mathrm {max})\) is not strongly permutable.

So, we define the sequence of matrices \(B_1, B_2, \dots , B_m\) by

$$\begin{aligned} B_i = \begin{pmatrix} 0 &{} i &{} m \\ -\infty &{} 0 &{} m + 1 -i \\ -\infty &{} -\infty &{} 0 \end{pmatrix} \end{aligned}$$

(Note that technically speaking \(-\infty , 0 \notin \mathbb {N}_\mathrm {max}\); the “\(-\infty \)” and “0” featured here are technically the zero and identity elements adjoined in \((\mathbb {N}_\mathrm {max})^{01}\) which is used in the definition of the unitriangular matrix semigroup \(U_3(\mathbb {N}_\mathrm {max})\), but because this is essentially the same as the subsemiring \(\mathbb {N}_\mathrm {max}\cup \lbrace 0, -\infty \rbrace \) of \(\mathbb {T}\) it is clearer to denote them in this way.) A simple inductive argument shows that for each k,

$$\begin{aligned} \prod _{i=1}^k B_i = \begin{pmatrix} 0 &{} k &{} m \\ -\infty &{} 0 &{} m \\ -\infty &{} -\infty &{} 0 \end{pmatrix} \end{aligned}$$

Now, suppose \(\sigma \in \mathcal {S}_m\) is such that \(B_\sigma := \prod _{i=1}^m B_{\sigma (i)} = \prod _{i=1}^m B_i\). By the definition of matrix multiplication, for any \(j < k\) we must have

$$\begin{aligned} m \ = \ (B_\sigma )_{1,3} \ \ge \ (B_{\sigma (j)})_{1,2} + (B_{\sigma (k)})_{2,3} \ = \ \sigma (j) + m+1 -\sigma (k) \end{aligned}$$

and hence \(\sigma (j) < \sigma (k)\). Since \(\sigma \) is a permutation, this can only happen if \(\sigma \) is the identity permutation. Further, as m was arbitrary no non-trivial permutations preserve this product for any \(m \in \mathbb {N}\), so \(U_3(\mathbb {N}_\mathrm {max})\) is not strongly permutable. \(\square \)

Lemma 4.4

\(U_n((-\mathbb {N})_\mathrm {max})\) is strongly permutable if and only if \(n \le 3\).

Proof

Much as in the previous proof, \(U_1((-\mathbb {N})_\mathrm {max})\) is the trivial monoid while \(U_2((-\mathbb {N})_\mathrm {max})\) is isomorphic to the (commutative) additive semigroup of the semiring, so both are clearly strongly permutable, and there is a surjective morphism from \(U_n((-\mathbb {N})_\mathrm {max})\) to \(U_3((-\mathbb {N})_\mathrm {max})\) for all \(n \ge 3\), so it suffices to show that \(U_3((-\mathbb {N})_\mathrm {max})\) is not strongly permutable.

To this end we define the sequence of matrices \(C_1, \dots , C_m\) given by

$$\begin{aligned} C_i = \begin{pmatrix} 0 &{} i-m-1 &{} -m - 2 \\ -\infty &{} 0 &{} -i \\ -\infty &{} -\infty &{} 0 \end{pmatrix} \end{aligned}$$

Once again, the \(-\infty \) and 0 here are formally speaking the zero and identity elements in \(((-\mathbb {N})_\mathrm {max})^{01}\). The product of the first k such matrices is inductively seen to be

$$\begin{aligned} \prod _{i=1}^k C_i = \begin{pmatrix} 0 &{} k-m-1 &{} -m-2 \\ -\infty &{} 0 &{} -1 \\ -\infty &{} -\infty &{} 0 \end{pmatrix} \end{aligned}$$

Now, if \(\sigma \in \mathcal {S}_m\) is such that \(C_\sigma := \prod _{i=1}^m C_{\sigma (i)} = \prod _{i=1}^m C_i\) then for any \(j < k\),

$$\begin{aligned} (C_\sigma )_{1,3} \ = \ -m-2 \ \ge \ (C_{\sigma (j)})_{1,2} + (C_{\sigma (k)})_{2,3} \ = \ \sigma (j) - m - 1 - \sigma (k) \end{aligned}$$

so that \(\sigma (j) < \sigma (k)\). Since \(\sigma \) is a permutation, this can only happen if \(\sigma \) is the identity permutation. Further, as m was arbitrary no non-trivial permutations preserve this product for any \(m \in \mathbb {N}\), so \(U_3((-\mathbb {N})_\mathrm {max})\) is not strongly permutable. \(\square \)

Lemma 4.5

Let S be a (not necessarily commutative) bipotent semiring. If S has an element of infinite multiplicative order, then \(M_n(S)\) and \(UT_n(S)\) are not strongly permutable for \(n \ge 2\) and \(U_{n}(S)\) is not strongly permutable if and only if \(n \ge 3\).

Proof

Suppose \(a \in S\) has infinite order. Then by Lemma 2.3 we have that subsemiring generated by a is isomorphic \(\mathbb {N}_\mathrm {max}\) or \((-\mathbb {N})_\mathrm {max}\). Hence, \(M_n(S)\) contains an embedded copy either of \(M_n(\mathbb {N}_\mathrm {max})\) or of \(M_n((-\mathbb {N})_\mathrm {max})\); since neither of these are permutable for \(n \ge 2\) by Theorem 4.2, \(M_n(S)\) is not permutable for \(n \ge 2\). Similarly, \(UT_n(S)\) is not permutable for \(n \ge 2\) using Theorem 4.2 and \(U_{n}(S)\) is not permutable if and only if \(n \ge 3\) using Lemmas 4.3 and 4.4.

A bipotent semiring (even a commutative one) may have elements of unbounded finite order, without having an element of infinite order. For example, we shall see below that the truncated tropical semiring \(\mathbb {T}_{[0,1]}\) is such a semiring. Some basic model theory allows us to extend the above result to this case; we direct the reader unfamiliar with model theoretic techniques to for example [8].

Theorem 4.6

Let S be a (not necessarily commutative) bipotent semiring with elements of unbounded multiplicative order (that is, such that for all \(k \in \mathbb {N}\) there exists an \(x \in S\) such that x has multiplicative order greater than k). Then the semigroups \(M_n(S)\) and \(UT_n(S)\) are not strongly permutable for \(n \ge 2\). The semigroup \(U_{n}(S)\) is not strongly permutable if and only if \(n \ge 3\).

Proof

Consider the set of first-order sentences in the language of semirings:

$$\begin{aligned} L \ = \ \lbrace x^m \ne x^n \mid m, n \in \mathbb {N}, m \ne n \rbrace \end{aligned}$$

where x is a variable and \(x^m\) is shorthand for the product of m copies of x. Since S has elements of unbounded order, L is finitely satisfiable (every finite subset of L holds for some \(x \in S\)) which means that L is a 1-type of S.

By realisability of types (see for example [8,  Lemma 23.6]) there exists an elementary extension of S (a structure containing S and satisfying exactly the same first-order theory) in which L is satisfiable, that is, in which there is an element x satisfying all of the sentences in L. Let T be such a structure and \(x \in T\) such an element. The axioms for a bipotent semiring are clearly all expressible as first-order sentences, so the structure T is itself a bipotent semiring. Moreover, since x satisfies all sentences in L, x is an element of infinite order, and so by Lemma 4.5 we deduce that \(M_n(T)\) is not permutable.

Now suppose for a contradiction that \(M_n(S)\) was permutable. This means there exists an m such that

$$\begin{aligned} \forall X_1,\dots ,X_m \in M_2(S), \bigvee _{\sigma \in \mathcal {S}_m \setminus \{1_m\}} X_1\ldots X_m = X_{\sigma (1)}\ldots X_{\sigma (m)}. \end{aligned}$$

Since matrix multiplication is first-order definable in the language of semirings, this can clearly be re-expressed as a first-order sentence over S, featuring \(m n^2\) universally quantified scalar variables corresponding to the entries of the m matrices. But T is elementary equivalent to S, so this sentence also holds in T, which contradicts the fact that \(M_n(T)\) is not permutable.

Near-identical arguments show that \(UT_n(S)\) is not permutable for \(n \ge 2\) and that \(U_{n}(S)\) is not permutable for \(n \ge 3\). Finally, recall that \(U_1(S)\) is trivial while \(U_2(S)\) is isomorphic to the additive semigroup of S, which is always commutative and hence strongly permutable. \(\square \)

Recall that \(M_1(S) = UT_1(S)\) is isomorphic to the multiplicative semigroup of the semiring S. This may be permutable (for example when the semiring is commutative) or non-permutable (for example when S is a non-commutative free monoid with a bipotent addition given by the shortlex total ordering).

Corollary 4.7

Let S be a commutative bipotent semiring with unbounded order. Then \(M_n(S)\) (and \(UT_n(S)\)) are strongly permutable if and only if \(n = 1\).

Recall that a semifield is a commutative semiring, possibly without zero, where the non-zero elements form a group with multiplication. In the case of semifields, we can now give an explicit description of when the matrix semigroups are permutable.

Corollary 4.8

Let S be a bipotent semifield. Then \(M_n(S)\) and \(UT_n(S)\) are permutable for \(n \ge 2\) (and \(U_{n}(S)\) is permutable for \(n \ge 3\)) if and only if S is the 2-element boolean semifield.

Proof

Since S is a bipotent semiring we have that every element has infinite order or period 1 by Lemma 2.2. However S is a semifield, so the non-zero elements form a group with multiplication so the only possible elements of period 1 are the identity and the zero if there is one. Thus, non-identity, non-zero elements are of infinite order. Therefore if S is not the 2-element boolean semifield, it must have an element of infinite order and thus by Theorem 4.6 (or Lemma 4.5), \(M_n(S)\) and \(UT_n(S)\) are not permutable for \(n \ge 2\) and \(U_{n}(S)\) is not permutable for \(n \ge 3\). If \(\mathbb {B}\) is the 2-element boolean semifield then \(M_n(\mathbb {B}), UT_n(\mathbb {B})\), and \(U_n(\mathbb {B})\) are finite and hence permutable for all \(n \in \mathbb {N}\). \(\square \)

Theorem 4.9

Suppose S is a (not necessarily commutative or bipotent) semiring with the following property: for every finite subset X, there exists a homomorphism to a finite semiring of order bounded by a function in the size of X such that each element of X occupies its own singleton kernel class. Then \(M_n(S)\) is permutable for all \(n \in \mathbb {N}\).

Proof

Let k be such that for every subset X of S with \(\vert X \vert = n^2\), there is a homomorphism from S to a finite semiring of size at most k such that each element of X occupies its own kernel class. Let \(m = k^{n^2} +1\), and suppose

$$\begin{aligned} \Sigma = A_1A_2 \ldots A_m = \begin{pmatrix} x_{1,1} &{} \dots &{} x_{1,n} \\ \vdots &{} \ddots &{} \vdots \\ x_{n,1} &{} \dots &{} x_{n,n} \end{pmatrix} \end{aligned}$$

By assumption we may choose a semiring homomorphism \(\phi \) mapping S into a semiring F of cardinality at most k, such that each \(x_{i,j}\) occupies its own kernel class. From this semiring homomorphism, we define a semigroup homomorphism \(\psi \) mapping \(M_n(S)\) into \(M_n(F)\) where

$$\begin{aligned} {(\psi (A))}_{i,j} = \phi (A_{i,j}) \text { for all } i,j. \end{aligned}$$

Notice that, since the entries of \(\Sigma \) each occupy their own \(\phi \)-kernel class, \(\Sigma \) occupies its own \(\psi \)-kernel class. Since F has cardinality at most k, \(M_n(F)\) has cardinality at most \(k^{n^2} < m\), so there must exist distinct i and j with \(\psi (A_i) = \psi (A_j)\). Let \(\sigma \in \mathcal {S}_m\) be the transposition swapping i and j. Then clearly

$$\begin{aligned} \psi (A_{\sigma (1)} \dots A_{\sigma (m)}) = \psi (A_{\sigma (1)}) \dots \psi (A_{\sigma (m)}) = \psi (A_1) \dots \psi (A_m) = \psi (\Sigma ), \end{aligned}$$

which since \(\Sigma \) occupies its own \(\psi \)-kernel class means that

$$\begin{aligned} A_{\sigma (1)} \dots A_{\sigma (m)} \ = \ \Sigma \ = \ A_1 \dots A_m, \end{aligned}$$

as required to show that \(M_n(S)\) is permutable. \(\square \)

Recall that we say a binary relation \(\cong \) on a semiring is a congruence if \(\cong \) is an equivalence relation and if \(a \cong b\) and \(c \cong d\) together imply that \(ac \cong bd\) and \(a+c \cong b+d\).

Corollary 4.10

Let S be a chain semiring (that is, a totally ordered set with operations maximum and minimum). Then \(M_n(S)\) is permutable for all \(n \in \mathbb {N}\).

Proof

Let \(X = \lbrace x_1, \dots , x_k \rbrace \) be a finite subset of S. Define a binary relation \(\equiv \) on S by \(a \equiv b\) if and only if a and b either (i) are equal or (ii) are not in X and lie above exactly the same elements of X. Recalling that S is totally ordered, it is easy to see that \(\equiv \) is an equivalence relation with at most \(2 \vert X \vert + 1\) classes (being the singleton sets containing elements of X, and the open order intervals above, below and between elements of X), in which each element of X occupies its own equivalence class. Further, it can be readily seen that \(\equiv \) is a congruence. Hence, by the usual first isomorphism theorem, the natural morphism \(S \rightarrow S / \equiv \) satisfies the conditions of Theorem 4.9. \(\square \)

5 Truncated tropical semirings

In this section we shall illustrate some of the “wilder” behaviour which is possible in commutative bipotent semirings, by studying truncated tropical semirings. To avoid confusion with classical operations, which we shall also need, we use the symbols \(\oplus \) and \(\otimes \) for the denote the addition (maximum) and multiplication (truncated addition) operations in a truncated tropical semiring. The symbol \(+\) and juxtaposition will be used for standard arithmetic addition and multiplication of real numbers, respectively. We begin by observing that there are a number of isomorphisms between semirings in this class:

Theorem 5.1

Let \(y > x \ge 0\). Then

$$\begin{aligned} \mathbb {T}_{[x,y]} \cong {\left\{ \begin{array}{ll} \mathbb {T}_{[0,1]} &{}\text { if } x = 0; \\ \mathbb {T}_{[1,2]} &{}\text { if } x> 0 \text { and } y \le 2x; \\ \mathbb {T}_{[1,2.5]} &{}\text { if } x> 0 \text { and } 2x< y < 3x; \\ \mathbb {T}_{[1,\frac{y}{x}]} &{}\text { if } x > 0 \text { and } y \ge 3x. \end{array}\right. } \end{aligned}$$

The semirings \(\mathbb {T}_{[0,1]}, \mathbb {T}_{[1,2]}, \mathbb {T}_{[1,2.5]}\) and \(\mathbb {T}_{[1,y]}\) for \(y \ge 3\) are pairwise non-isomorphic.

Proof

If \(x=0\), we define the map \(\phi : \mathbb {T}_{[0,y]} \rightarrow \mathbb {T}_{[0,1]}\) by

$$\begin{aligned} \phi (-\infty ) = -\infty \text { and } \phi (z) = \frac{z}{y} \text { for } z \in [0,y]. \end{aligned}$$

As classical multiplication distributes over classical addition, and the fact that \(y>0\) implies that \(\phi \) is order preserving, it can be easily seen that \(\phi \) is an isomorphism.

If \(x >0\) and \(y \le 2x\), we define the map \(\phi : \mathbb {T}_{[x,y]} \rightarrow \mathbb {T}_{[1,2]}\) by

$$\begin{aligned} \phi (-\infty ) = -\infty , \ \phi (0)= 0, \text { and } \phi (z) = \frac{z-x}{y-x} + 1 \text { for } z \in [x,y]. \end{aligned}$$

Now, for \(a,b \in [x,y]\), we have that

$$\begin{aligned} \phi (a) \otimes \phi (b) = \min \left( \frac{a-x}{y-x} + 1 + \frac{b-x}{y-x} + 1,2\right) = 2 = \phi (a \otimes b) \end{aligned}$$

as \(a,b \ge x\). Moreover, as \(y-x>0\), \(\phi \) is order preserving. Hence, it can be easily seen that \(\phi \) is an isomorphism.

If \(x > 0\) and \(2x< y < 3x\), we define a piecewise linear map \(\phi : \mathbb {T}_{[x,y]} \rightarrow \mathbb {T}_{[1,2.5]}\) by

$$\begin{aligned} \phi (z) = {\left\{ \begin{array}{ll} \frac{z-2x}{2(y-2x)} +2 &{}\text {if } 2x \le z \le y\\ \frac{z-(y-x)}{2(3x-y)} + 1.5 &{}\text {if } y-x< z < 2x \\ \frac{z-x}{2(y-2x)} +1 &{}\text {if } x \le z \le y-x \\ 0 &{}\text {if } z = 0\\ -\infty &{}\text {if } z = -\infty \end{array}\right. }\end{aligned}$$

Now, for \(a \in [y-x,y]\) and \(b \in [x,y]\), we have that

$$\begin{aligned} \phi (a) \otimes \phi (b) = 2.5 = \phi (y) = \phi (a \otimes b) \end{aligned}$$

as \(\phi (a) \ge 1.5\) and \(\phi (b) \ge 1\). Finally, if \(a,b \in [x,y-x]\) then

$$\begin{aligned} \phi (a) \otimes \phi (b)&= \min \left( \frac{a-x}{2(y-2x)} +1 + \frac{b-x}{2(y-2x)} +1,2.5\right) \\&= \min \left( \frac{(a+b)-2x}{2(y-2x)}+2,\frac{y-2x}{2(y-2x)} +2\right) \\&= \frac{\min (a+b,y)-2x}{2(y-2x)}+2 \\&= \phi (a \otimes b) \end{aligned}$$

as \(a \otimes b \ge 2x\). Moreover, as \(y-2x>0\) and \(3x -y > 0\) this implies that \(\phi \) is order preserving, and hence it can be easily seen that \(\phi \) is an isomorphism.

If \(x > 0\) and \(y>3\) then we define a map \(\phi \) from \(\mathbb {T}_{[x,y]}\) to \(\mathbb {T}_{[1,\frac{y}{x}]}\) by

$$\begin{aligned} \phi (-\infty ) = -\infty , \ \phi (0)= 0, \text { and } \phi (z) = \frac{z}{x} \text { for } z \in [x,y]. \end{aligned}$$

As classical multiplication distributes over classical addition, and that \(x >0\) implies that \(\phi \) is order preserving, it can be easily seen that \(\phi \) is an isomorphism.

For non-isomorphism we have to show that \(\mathbb {T}_{[0,1]},\mathbb {T}_{[1,2]},\mathbb {T}_{[1,2.5]}\) and \(\mathbb {T}_{[1,y]}\) for \(y \ge 3\) are pairwise non-isomorphic. We can see that \(\mathbb {T}_{[0,1]}\) is not isomorphic to any of the others, as it is the only one with unbounded multiplicative order. Similarly, \(\mathbb {T}_{[1,y]}\) has no elements of multiplicative order 3 if and only if \(y \le 2\) so \(\mathbb {T}_{[1,2]}\) is not isomorphic to the others. For \(\mathbb {T}_{[1,2.5]}\), note that \(\mathbb {T}_{[1,y]}\) has no elements of multiplicative order 4 if and only if \(y \le 3\), so \(\mathbb {T}_{[1,2.5]}\) can not be isomorphic to any of the others apart from perhaps \(\mathbb {T}_{[1,3]}\).

For a contradiction, suppose that \(\mathbb {T}_{[1,2.5]}\) is isomorphic to \(\mathbb {T}_{[1,3]}\) and let \(\phi : \mathbb {T}_{[1,2.5]} \rightarrow \mathbb {T}_{[1,3]}\) be an isomorphism. As \(\phi \) is order-preserving, we have that \(\phi (1) = 1\) and \(\phi (2.5) = 3\). Similarly, as \(\phi \) preserves the semiring multiplication, we can conclude that

$$\begin{aligned} \phi (2) = \phi (1) \otimes \phi (1) = 2 \text { and } \phi (1.5) \otimes 1 = \phi (1.5) \otimes \phi (1) =\phi (2.5) = 3 \end{aligned}$$

and hence \(\phi (1.5) \ge 2 = \phi (2)\) contradicting that \(\phi \) is order-preserving. Hence, \(\mathbb {T}_{[1,3]}\) and \(\mathbb {T}_{[1,2.5]}\) are not isomorphic.

Finally, suppose \(z > y \ge 3\) and suppose for a contradiction that there is an isomorphism \(\phi : \mathbb {T}_{[1,y]} \rightarrow \mathbb {T}_{[1,z]}\). From the fact that \(\phi \) is a morphism and the definition of multiplication in the two semirings, we have \(\phi (a+b) = \phi (a)+\phi (b)\) for all ab with \(a+b \le y\), and \(\phi (1) = 1\). Hence, \(\phi (2) = \phi (1+1) = \phi (1) + \phi (1) = 2\), and for \(1 \le x \le y-1\),

$$\begin{aligned} \phi (x) = \phi (x + 1 - 1) = \phi (x + 1) - \phi (1) = \phi \left( \frac{x+1}{2}\right) + \phi \left( \frac{x+1}{2}\right) -1 \end{aligned}$$

A simple inductive argument using this fact shows that \(\phi (1 + 2^{-n}) = 1+ 2^{-n}\) for all \(n \in \mathbb {N}\cup \lbrace 0 \rbrace \). Indeed, the base case is the fact that \(\phi (2) = 2\), while if the claim holds for some n then taking \(x = 1+2^{-n}\) we have \(\frac{x+1}{2} = 1+2^{-(n+1)}\). Hence by the above \(\phi (1+2^{-n} )= 2 \phi (1+2^{-(n+1)})-1\), so \(\phi (1+2^{-(n+1)}) = \frac{1}{2} (\phi (1+2^{-n})+1) = \frac{1}{2}(1+2^{-n} + 1) = 1+2^{-(n+1)}\) and the claim holds for \(n+1\).

Note that for any ab with \(a+b \le 1\) if \(\phi (1+a) = 1+a\) and \(\phi (1+b) = 1+b\) then \(\phi (1+a+b) = \phi (1+a) + \phi (1+b) - \phi (1) = 1+a+b\). By another simple induction, we deduce that \(\phi \) fixes all finite sums of negative powers of 2 (in other words, all dyadic rationals) in the interval [1, 2]. Since the dyadic rationals are dense in the order, it follows that \(\phi \) fixes everything in the interval [1, 2].

Finally, since \(\phi \) preserves the multiplication in \(\mathbb {T}_{[1,y]}\) and \(y < z\), it preserves all finite sums which sum to y or less. Since every element in [1, y] is a finite sum of values in [1, 2], it follows that \(\phi \) is the identity function on [1, y]. Since it is surjective, this means that \(y=z\). \(\square \)

Next we observe that, as a consequence of our earlier results, there are examples of such semirings for which matrix semigroups are not permutable in any rank greater than 1:

Corollary 5.2

The semigroup \(M_n(\mathbb {T}_{[0,1]})\) is permutable if and only if \(n = 1\).

Proof

The semigroup \(M_1(\mathbb {T}_{[0,1]})\) is commutative and therefore strongly permutable. For \(n > 1\), it is easy to see that \(\mathbb {T}_{[0,1]}\) has elements of unbounded multiplicative order (indeed, for any \(j \in \mathbb {N}\) the element 1/j has order j), so \(M_n(\mathbb {T}_{[0,1]})\) is not strongly permutable by Theorem 4.6. \(\square \)

By Theorem 5.1, we can now always take truncated tropical semirings to be either of the form \(\mathbb {T}_{[0,1]}\) or \(\mathbb {T}_{[1,z]}\). Corollary 5.2 gives a full description of when the matrix semigroups \(M_n(\mathbb {T}_{[0,1]})\) are permutable, so we now focus on matrix semigroups of form \(M_n(\mathbb {T}_{[1,z]})\) for some \(z > 1\).

Theorem 5.3

\(M_n(\mathbb {T}_{[1,2]})\) is strongly permutable for all \(n \in \mathbb {N}\).

Proof

We shall show that \(\mathbb {T}_{[1,2]}\) satisfies the hypothesis of Theorem 4.9. Let \(X = \lbrace x_1, \dots , x_k \rbrace \) be a finite subset of \(\mathbb {T}_{[1,2]}\) and \(X' = X \cup \{0,-\infty \}\). Define a binary relation \(\equiv \) on \(\mathbb {T}_{[1,2]}\) by \(a \equiv b\) if and only if a and b either (i) are equal or (ii) are not in \(X'\) and lie above exactly the same elements of \(X'\). It is easy to see that \(\equiv \) is an equivalence relation with at most \(2\vert X \vert + 3\) classes, in which each element of X occupies its own equivalence class.

We must now show that \(\equiv \) is a congruence. As \(\mathbb {T}_{[1,2]}\) is commutative, we only have to show that \(\equiv \) is a left congruence. Let \(x \equiv y\). Clearly, if \(a = 0\) or \(-\infty \), we have that \(a \otimes x \equiv a \otimes y\) and \(a \oplus x \equiv a \oplus y\). Moreover, if \(x = y\), we have that \(a \otimes x \equiv a \otimes y\) and \(a \oplus x \equiv a \oplus y\). Hence, as \(0,-\infty \in X'\), we can assume that \(a,x,y \ge 1\), and thus \(a \otimes x = 2 = a \otimes y\).

Further, if \(a \ge x,y\) or \(a \le x,y\), then clearly \(a \oplus x \equiv a \oplus y\). On the other hand, if a lies between x and y in the order then a, x, y, \(a \oplus x\) and \(a \oplus y\) all lie above exactly the same elements of \(X'\), giving that \(a \oplus x \equiv a \oplus y\). Thus we conclude that \(\equiv \) is a congruence.

Hence, by the usual first isomorphism theorem, the natural morphism \(\mathbb {T}_{[1,2]} \rightarrow \mathbb {T}_{[1,2]} / \equiv \) satisfies the conditions of Theorem 4.9, and \(M_n(\mathbb {T}_{[1,2]})\) is strongly permutable for all \(n \in \mathbb {N}\). \(\square \)

The rest of this section treats the remaining truncated tropical semirings, that is, those of the form \(\mathbb {T}_{[1,z]}\) with \(z > 2\). These will give examples of semirings S such that \(M_2(S)\) is strongly permutable, but \(M_n(S)\) is not strongly permutable for all \(n > 2\). We use the notation \(\left\lceil z \right\rceil \) to denote the smallest integer greater than or equal to \(z \in \mathbb {R}\). We shall say that a semigroup S is k-permutable if for every \(s_1,\dots ,s_k \in S\) there exists a non-trivial permutation \(\sigma \in \mathcal {S}_k\) such that \(s_{\sigma (1)}s_{\sigma (2)}\ldots s_{\sigma (k)} = s_1s_2\ldots s_k\).

Lemma 5.4

For \(z > 2\), let S and \(S'\) be subsemigroups of \(M_2(\mathbb {T}_{[1,z]})\) given by

$$\begin{aligned}S = \left\{ \begin{pmatrix} 0 &{} a \\ -\infty &{} b \end{pmatrix} : a,b \in \mathbb {T}_{[1,z]} \right\} \text{ and } S' = \left\{ \begin{pmatrix} 0 &{} -\infty \\ a &{} b \end{pmatrix} : a,b \in \mathbb {T}_{[1,z]} \right\} . \end{aligned}$$

Then S and \(S'\) are both \((2\left\lceil z \right\rceil +5)\)-permutable.

Proof

Transposing matrices is a semigroup anti-isomorphism between S and \(S'\), so it suffices to prove that S is \((2\left\lceil z \right\rceil +5)\)-permutable.

Let \(m = 2\left\lceil z \right\rceil +5\) and let \(X_1, \dots , X_m \in S\). If \((X_t)_{2,2}= -\infty \) for any \(t>2\) then, as \(X_t\) is a right zero of S, we have that \(X_1X_2\ldots X_m = X_2X_1\ldots X_m\). Thus we may assume \((X_t)_{2,2} \ne -\infty \) for all \(t > 2\).

If \((X_t)_{1,2},(X_{t+1})_{1,2} = -\infty \) for some \(t < m\) then as diagonal matrices commute, we have \(X_1\ldots X_tX_{t+1} \ldots X_m = X_1\ldots X_{t+1}X_{t} \ldots X_m\). Therefore, we may assume either \((X_2)_{1,2} \ne -\infty \) or \((X_3)_{1,2} \ne -\infty \). Combined with the assumption from the previous paragraph, this implies we may assume that \((X_1\ldots X_m)_{1,2} \ne -\infty \).

If \((X_t)_{2,2},(X_{t+1})_{2,2} = 0\) for some \(t < m\) then, because \(2 \times 2\) unitriangular matrices commute, we have \(X_1\ldots X_tX_{t+1} \ldots X_m = X_1\ldots X_{t+1}X_{t} \ldots X_m\). Hence, we may assume that among every pair of every two consecutive matrices (except perhaps the first three) there is a matrix \(X_t\) with \((X_t)_{2,2} \ge 1\). Since \(m = 2\left\lceil z \right\rceil +5\) this means we have \((X_1 \ldots X_{m-2})_{1,2} = z\) and \((X_1 \ldots X_{m-2})_{2,2} = z\) or \(-\infty \). In both of these cases \(X_1 \ldots X_{m-2}\) acts as a left zero for all matrices M with \(M_{2,2} \ne -\infty \). But we assumed \((X_t)_{2,2} \ne -\infty \) for \(t > 2\), so we have

$$\begin{aligned} X_1 \ldots X_m = X_1 \ldots X_{m-2} X_{m-1} X_m = X_1 \ldots X_{m-2} X_m X_{m-1}. \end{aligned}$$

Thus S, and hence also \(S'\), is \((2\left\lceil z \right\rceil +5)\)-permutable. \(\square \)

Lemma 5.5

Let \(A_0 \in M_2(\mathbb {T}_{[1,z]})\) and m be the minimum finite entry of \(A_0\) (or \(m = z\) if \(A_0\) if all entries are \(-\infty \)). Let \(k \ge 17(16\left\lceil z \right\rceil + 45)\). Then for all \(A_1, \dots , A_k \in M_2(\mathbb {T}_{[1,z]})\), either

$$\begin{aligned} (A_0A_1 \ldots A_k)_{i,j} \ne m \text{ for } \text{ all } i,j \end{aligned}$$

or there exists a non-trivial \(\sigma \in \mathcal {S}_k\) such that

$$\begin{aligned} A_0A_1A_2\ldots A_k = A_0A_{\sigma (1)}A_{\sigma (2)}\ldots A_{\sigma (k)} \end{aligned}$$

Proof

Consider a product \(A_0 A_1 \dots A_k\). If the product does not contain an m we are done. Moreover, as \(M_2(\mathbb {T}_{[x,z]}\setminus \{0\})\) is an ideal of \(M_2(\mathbb {T}_{[1,z]})\) for all \(x \in [1,z]\), we may suppose every truncated product \(A_0 A_1 \dots A_p\) with \(p < k\) has at least one entry equal to m.

By the pigeon hole principle there exists a sequence of indices \(0 \le i_0< \dots < i_n \le k\) where \(n = \left\lceil \frac{k}{4} \right\rceil -1 \) such that each product matrix \(A_0A_1\ldots A_{i_j}\) has m in the same position. If this is the (1,2) or the (2,1) position then note that swapping the rows of \(A_0\) swaps the rows of the product \(A_0A_1 \ldots A_t\) for all \(t \le k\). Therefore if \(\sigma \) is a permutation that does not change the product, then \(\sigma \) will also preserve the product obtained by swapping \(A_0\)’s rows. Hence, we can assume that the m’s are in the (1,1) or (2,2) position. Moreover, by relabelling the rows and columns if necessary, we can assume without loss of generality that \(A_0A_1\ldots A_{i_j}\) has m in the (1,1) position for all \(0 \le j \le n\).

Now consider the matrices defined by

$$\begin{aligned} B = A_0\ldots A_{i_0} \text { and } B_j = A_{i_{j-1}+1}\ldots A_{i_j} \end{aligned}$$

for \(1 \le j \le n\). Any permutation of this sequence which does not change the product clearly yields a permutation of the original sequence which does not change the product, so it is enough to seek a non-trivial permutation of this sequence. We define the truncated products \(\Sigma _t := BB_1 \ldots B_t\) for \(0 \le t \le n\).

First we consider any matrices \(B_i\) whose entries are all either 0 or \(-\infty \). There are only 16 distinct matrices of this form, so if more than 16 of the \(B_i\)s have this form then the same matrix would appear twice in the sequence, resulting in a non-trivial permutation that preserves the product. Otherwise, since \(n = \left\lceil \frac{k}{4} \right\rceil -1 > 17(4\left\lceil z \right\rceil +11)\) the \(B_i\)s contain a subsequence of \(4 \left\lceil z \right\rceil +11\) consecutive matrices not of this form, say \(B_p, \dots , B_q\) where \(q-p = 4 \left\lceil z \right\rceil +10\).

We now define five subsets of \(M_2(\mathbb {T}_{[1,z]})\):

$$\begin{aligned} S&= \left\{ \begin{pmatrix} 0 &{} a \\ -\infty &{} b \end{pmatrix} : a,b \in \mathbb {T}_{[1,z]} \right\} ,&S'= \left\{ \begin{pmatrix} 0 &{} -\infty \\ a &{} b \end{pmatrix} : a,b \in \mathbb {T}_{[1,z]} \right\} , \\ T&= \left\{ \begin{pmatrix} 0 &{} a \\ 0 &{} b \end{pmatrix} : a,b \in \mathbb {T}_{[1,z]}\right\} ,&U = \left\{ \begin{pmatrix} -\infty &{} a \\ 0 &{} b \end{pmatrix} : a,b \in \mathbb {T}_{[1,z]} \right\} , \\ V&= \left\{ \begin{pmatrix} 0 &{} c \\ a &{} b \end{pmatrix} : a,b,c \in \mathbb {T}_{[1,z]}\right\} . \end{aligned}$$

We shall show that the sequence of \(B_i\)s contains \(2\left\lceil z \right\rceil +5\) consecutive matrices either all in S or all in \(S'\). From this it will follow by Lemma 5.4 that there is a permutation of the sequence which preserves the product, as required.

Note that \(S,S',T \subseteq V\). For \(p \le t \le q-1\), we have that \((\Sigma _t)_{1,1} = (\Sigma _{t+1})_{1,1} = m\). So, if \((\Sigma _t)_{1,2} = -\infty \), then in order to ensure \((\Sigma _t B_{t+1})_{1,1} = (\Sigma _{t+1})_{1,1} = m\) we must have \((B_{t+1})_{1,1} = 0\), that is, \(B_{t+1} \in V\). Similarly, if \((\Sigma _t)_{1,2} = m\), then \(B_{t+1} \in S, T\) or U. Otherwise, \((\Sigma _t)_{1,2} > m\) and we have that \(B_{t+1} \in S\).

If the matrices \(B_p, \dots , B_{p+2\left\lceil z \right\rceil +4}\) are all in \(S'\) then we are done. Otherwise, choose t with \(p \le t \le p+2\left\lceil z \right\rceil +4\) such that \(B_t \notin S'\). Since \((\Sigma _{t-1})_{1,1} = m\) and \(\Sigma _t = \Sigma _{t-1} B_t\), this means that \((\Sigma _{t})_{1,2} \ne -\infty \).

Now because \((\Sigma _t)_{11},(\Sigma _t)_{1,2} \ge m\) and \(B_{t+1}\) lies in S, T or U with (because of the assumption that the entries of \(B_{t+1}\) are not all 0 and \(-\infty \)) either \((B_{t+1})_{1,2} \ge 1\) or \((B_{t+1})_{2,2} \ge 1\), we have that \((\Sigma _{t+1})_{1,2} > m\) and of course by definition we have \((\Sigma _{t+1})_{1,1} \ge m\). Continuing by induction we deduce that \((\Sigma _{i})_{1,2} > m\) for all i with \(t+1 \le i \le q\). By the remarks in the last paragraph but one, this means that \(B_j \in S\) for all \(t+2 \le j \le q\), which means the matrices \(B_{t+2}, \dots , B_{t+1+2\left\lceil z \right\rceil +5}\) are all in S, as required. \(\square \)

Theorem 5.6

Let \(z > 2\). Then \(M_2(\mathbb {T}_{[1,z]})\) is strongly permutable.

Proof

Consider a product of matrices \(A_1\ldots A_n\) for \(n \ge 17(4\left\lceil z \right\rceil +1)(16\left\lceil z \right\rceil +45)\) and let \(m_t\) be the smallest finite entry in the product of the first t matrices \(\Sigma _t = A_1\ldots A_t\). (If all entries of \(\Sigma _t\) are \(-\infty \), we define \(m_t = z\)). Note that \(m_1 \le \dots \le m_n\) as \(M_2(\mathbb {T}_{[x,z]}\setminus \{0\})\) is an ideal of \(M_2(\mathbb {T}_{[1,z]})\) for all \(x \in [1,z]\). Further, let \(k_1,\dots , k_s\) be all the values such that \(m_{k_{j}-1} < m_{k_j}\). For a contradiction, suppose that there does not exist a non-trivial permutation \(\sigma \in \mathcal {S}_n\) such that \(A_1\ldots A_n = A_{\sigma (1)} \ldots A_{\sigma (n)}\). Then, by Lemma 5.5, we have that \(s > 1\) and that \(k_j - k_{j-1} < 17(16\left\lceil z \right\rceil +45)\) for all j as there is no permutation preserving the product \(A_1\ldots A_n\) by assumption. For any \(1 \le j \le s-4\), consider the five values \(m_{k_j}< m_{k_{j+1}}< m_{k_{j+2}}< m_{k_{j+3}} < m_{k_{j+4}}\) and suppose \(m_{k_{j+4}} \ne z\) . It is easy to see that each of these five values is either an entry of the matrix \(\Sigma _{k_j}\), or else exceeds \(m_{k_j}\) by at least 1. Since there are not five distinct entries in \(\Sigma _{k_j}\) we must therefore have \(m_{k_{j+4}} \ge m_{k_j}+1\). Thus as \(0 \le m_{t} \le z\) for all t, we have that \(s \le 4\left\lceil z \right\rceil + 1\). So as \(n > 17(4\left\lceil z \right\rceil +1)(16\left\lceil z \right\rceil +45)\) we have that \(k_j - k_{j-1} \ge 17(16\left\lceil z \right\rceil +45)\) for some \(2 \le j \le s\), giving a contradiction. Therefore, \(M_2(\mathbb {T}_{[1,2]})\) is strongly permutable. \(\square \)

Theorem 5.7

Let \(z > 2\). Then \(M_n(\mathbb {T}_{[1,z]})\) is strongly permutable if and only if \(n \le 2\).

Proof

The direct implication is Theorem 5.6. For the converse implication it suffices by Proposition 4.1 to show that \(M_3(\mathbb {T}_{[1,z]})\) is not permutable. We do this by a variation of the method used to prove Lemma 4.3 above.

Choose \(\varepsilon \) with \(0< \varepsilon < z-2\). For a fixed m, we define a sequence of matrices \(B_1,B_2,\dots ,B_m\) by

$$\begin{aligned} B_i = \begin{pmatrix} 0 &{} 1 + \frac{i}{m}\varepsilon &{} 2 + \varepsilon \\ -\infty &{} 0 &{} 1+ \varepsilon - \frac{i-1}{m}\varepsilon \\ -\infty &{} -\infty &{} 0 \end{pmatrix} \end{aligned}$$

By induction the product of the first k such matrices is given by

$$\begin{aligned} \prod _{i=1}^k B_i = \begin{pmatrix} 0 &{} 1 + \frac{k}{m}\varepsilon &{} 2 + \varepsilon \\ -\infty &{} 0 &{} 1 + \varepsilon \\ -\infty &{} -\infty &{} 0 \end{pmatrix} \end{aligned}$$

Now, suppose \(\sigma \in \mathcal {S}_m\) is such that \(B_\sigma := \prod _{i=1}^m B_{\sigma (i)} = \prod _{i=1}^m B_i\). By the definition of matrix multiplication, for any \(j < k\) we must have

$$\begin{aligned} 2+ \varepsilon \ = \ (B_\sigma )_{1,3} \ \ge \ (B_{\sigma (j)})_{1,2} + (B_{\sigma (k)})_{2,3} \ = \ 2 + \varepsilon + \frac{\varepsilon }{m} (\sigma (j) - \sigma (k) + 1) \end{aligned}$$

and hence \(\sigma (j) < \sigma (k)\). Since \(\sigma \) is a permutation this means \(\sigma \) is the identity permutation. Further, as m was arbitrary \(M_3(\mathbb {T}_{[1,z]})\) is not permutable, so together with the previous theorem we get that \(M_n(\mathbb {T}_{[1,z]})\) is permutable if and only if \(n < 3\). \(\square \)