1 Introduction

An additive mapping \(D:S\rightarrow S\) of a ring S, i.e., an endomorphism of \((S,+)\), is called a reverse derivation if \(d(xy) = d(y)x+yd(x)\) is valid for all \(x,y\in S\). Such derivations were introduced by Herstein [7] and used to study of commutativity of rings. Later, such derivations (and their generalizations) were used analyze certain various types of rings and algebras (rings with involutions [3], semiprime rings [18], Malcev algebras [4], Lie algebras [8], Lie superalgebras [12] and others). Recently, Aboubakr and Gonzalez [1] generalized the notion of reverse derivation to generalized reverse derivation defined as an additive mapping \(D:S\rightarrow S\) such that \(D(xy)=D(y)x+yd(x)\) holds for all \(x,y\in S\), where d is a reverse derivation of S. We will denote such derivation by D or by (Dd).

In the last decade, there have been many articles devoted to the derivations of various kinds of semirings having some applications to the theory of automata, formal languages, optimization theory, theoretical computer science and other branches of applied mathematics (see for example [5, 6]). A central role in these studies play commutative or almost commutative semirings such as, for example, MA-semirings introduced in [10]. Of the many important semirings we will only mention the semiring \((R_{\mathrm{min}},\oplus ,\odot )\), where \(R_\mathrm{min}={\mathbb {R}}\cup \{\infty \}\), \(a\oplus b=\min \{a,b\}\), and \(a\odot b=a+b\), which was successfully applied to optimization problems on graphs and has become a standard tool in hundreds of papers on optimization. A school of Russian mathematicians was create a whole new probability theory based on semirings, called idempotent analysis (see, for example, [13, 14]), giving interesting applications in quantum physics, which have become of interest to those computer scientists interested in the problems of quantum computation.

In [9, 10, 16] (also [15, 17]), it is shown that although the results for semirings are quite similar to those previously given to rings, we need to use completely different methods in the proofs. Obviously, results proved for semirings are valid for rings but the part of results proved for rings cannot be true (also after some modifications) for semirings.

In this article we will show how the properties of generalized reverse derivations force the commutativity of some prime and semiprime additively inverse semirings.

2 Preliminaries and Auxiliary Results

By a semiring \((S,+,\cdot )\) we mean a nonempty set S equipped with two binary operations \(+\) and \(\cdot \) (called addition and multiplication) such that the multiplication is distributive with respect to the addition, \((S,+)\) is a semigroup with neutral element 0, and \((S,\cdot )\) is a semigroup with zero 0, i.e., \(0a=a0=0\) for all \(a\in S\). If a semigroup \((S,\cdot )\) is commutative, the we say that a semiring S is commutative.

A semiring S is an additively inverse (shortly: inverse), if for every \(a\in S\) there exists a uniquely determined element \(a'\in S\) such that

$$\begin{aligned} a+a'+a=a \ \ \ \mathrm{and} \ \ \ a'+a+a'=a'. \end{aligned}$$

Then, according to [11], for all \(a,b\in S\), we have

$$\begin{aligned} (ab)'=a'b=ab', \ \ (a+b)'=b'+a', \ \ a'b'=ab, \ \ (a')'=a, \ \ 0'=0. \end{aligned}$$

Also the following implication is valid

$$\begin{aligned} a+b=0 \ \ \ implies \ \ \ b=a' \ \ and \ \ a+a'=0. \end{aligned}$$
(2.1)

An additively inverse semiring S with commutative addition satisfying for all \(a\in S\) the Bandelt and Petrich condition \(A_2\) (cf. [2]):

$$\begin{aligned} a+a'\in Z(S), \end{aligned}$$

where Z(S) is the center of S, is called an MA-semiring (cf. [10]). An MA-semiring S is proper if for some \(a\in S\) we have \(a+a'\ne 0\), i.e., if S is not a ring.

An important role in investigations of such semirings plays the commutator \([a,b]=ab+b'a\). Recall that a semiring S is prime if \(aSb = 0\) implies that \(a=0\) or \(b=0\).

An additive mapping, i.e., an endomorphism of a semigroup \((S,+)\), is called centralizing on A if \([[D(x),x],y]=0\) for all \(x\in A\) and \(y\in S\). In a special case where \([D(x),x]=0\) (or equivalently, \(D(x)x=xD(x)\)) for all \(x\in A\), we say that the mapping f is commuting on A.

Now we list several simple facts that will be useful later.

Lemma 2.1

In any additively inverse semiring

(i):

\([x,y]'=[x,y']=[x',y]=[y,x]\),

(ii):

\([x',y']=[x,y]\),

(iii):

\([x,yx]=[x,y]x\),

(iv):

\([x,y]=0\) implies \(xy=yx\),

(v):

\(d(x')=d(x)'\) for any additive mapping d.

We will also use the following Jacobi identities

$$\begin{aligned}{}[xy,z]=x[y,z]+[x,z]y \ \ \ \mathrm{and} \ \ \ [x,yz]=y[x,z]+[x,y]z, \end{aligned}$$
(2.2)

valid in any MA-semiring. The proof one can find in [10].

3 Derivations on Prime MA-Semirings

We start with two auxiliary results that will be used later.

Lemma 3.1

If a non-zero reverse derivation d is commuting on a prime MA-semiring S, then \(d(z)\in Z(S)\) for \(z\in Z(S)\).

Proof

Indeed, \([d(u),ux]=0\) for \(u=zv\), where \(z\in Z(S)\) and \(v\in S\), implies \([d(zy),y]z=0\). So, \([d(zy),y]xz=0\) for all \(x,y\in S\), which means that \(0=[d(zy),y]=[d(y),y]z+[yd(z),y]=y[d(z),y]\). From this, applying primeness we get \([d(z),y]=0\). \(\square \)

Proposition 3.2

Let S be a prime MA-semiring with a generalized reverse derivation (Dd). Then any element \(a\in S\) such that \(d(a)\ne 0\) and \([D(u),a]=0\) for all \(u\in S\) lies in the center of S.

Proof

Let \(d(a)\ne 0\) for some fixed \(a\in S\). Then, by the assumption and (2.2), we have \(0=[D(au),a]=u[d(a),a]+[u,a]d(a)\). Whence, for \(u=vu\) we obtain \(v(u[d(a),a]+[u,a]d(a))+[v,a]ud(a)=0\). This implies \([v,a]Sd(a)=0\). Since \(d(a)\ne 0\), \([v,a]=0\) for all \(v\in S\). Hence, \(a\in Z(S)\). \(\square \)

We will now show how generalized reverse derivation enforces the commutativity of MA-semirings.

Theorem 3.3

A prime MA-semiring S with a non-zero generalized reverse derivation (Dd) such that \(D([x,y])=0\) for all \(x,y\in S\) is commutative.

Proof

Case 1: \(d=0.\) Then \(D(xy)=D(y)x\) for all \(x,y\in S\). So, by the assumption, we have \(0=D([x,y])=D(y)x+D(x)y'\) for all \(x,y\in S\). This, for \(x=zw\) and \(y=[u,v]\), gives \(0=D(w)z[u,v]'\). Thus, \(D(w)S[v,u]=0\), by Lemma 2.1. Since S is prime and \(D\ne 0\), the last implies \([v,u]=0\). Hence, S is commutative.

Case 2: \(d\ne 0\). From \(D([x,y])=0\) for \(x=z[u,v]\) and \(y=[u,v]\), we deduce

$$\begin{aligned}{}[u,v]d([z,[u,v]])=0. \end{aligned}$$
(3.1)

This for \(z=x[u,v]\) gives

$$\begin{aligned}{}[u,v]d([u,v])[x,[u,v]]+[u,v][u,v]d([x,[u,v]])=0, \end{aligned}$$

whence, by (3.1), we obtain \([u,v]d([u,v])[x,[u,v]]=0.\)

From this, putting \(x=wz\) and using the first Jacobi identity (2.2), we obtain \([u,v]d([u,v])w[z,[u,v]]=0,\) i.e., \([u,v]d([u,v])S[z,[u,v]]=0\) for all \(u,w,z\in S\). Since S is prime, the last implies that

$$\begin{aligned}{}[u,v]d([u,v])=0 \ \ \ \ \ \mathrm{or} \ \ \ \ \ [z,[u,v]]=0. \end{aligned}$$
(3.2)

Observe that (3.1) for \(z=x\), after application of Lemma 2.1, gives

$$\begin{aligned}{}[u,v]^2d(x)+[u,v]d(x)'[u,v]+[u,v]xd([u,v])'=0. \end{aligned}$$
(3.3)

Putting \(x=z[u,v]\) in (3.3) and applying the first identity of (3.2), we obtain

$$\begin{aligned}{}[u,v]^2d([u,v]z) + [u,v]d(z[u,v])'[u,v] = 0, \end{aligned}$$

since \([u,v]d([z[u,v])=[u,v]d([u,v]z)\), by (3.1). Thus,

$$\begin{aligned}{}[u,v]^2d(z)[u,v]\!+\![u,v]^2 zd([u,v])\!+\![u,v]d([u,v])'z[u,v]+[u,v]^2d(z)'[u,v]\!=\!0, \end{aligned}$$

which by (2.1) gives \([u,v]^2d(z)[u,v]+[u,v]^2d(z)'[u,v]=0.\) And consequently, \([u,v]^2 zd([u,v])+[u,v]d([u,v])'z[u,v]=0.\) From this, by the first identity of (3.2), we deduce \([u,v]^2 zd([u,v])=0\), i.e., \([u,v]^2Sd([u,v])=0\) for all \(u,v,z\in S\). But S is prime, so \([u,v]^2=0\) or \(d([u,v])=0\) for all \(u,v\in S.\)

Since by the assumption \(d\ne 0\), the second case is impossible. So, must be \([u,v]^2=0\) for all \(u,v\in S\). Then (3.3) is equivalent to

$$\begin{aligned}{}[u,v]d(x)[u,v]+[u,v]xd([u,v])=0. \end{aligned}$$
(3.4)

By hypothesis, \(D([[u,v],x])=0\) for all \(u,v,x\in S\). Thus, by Lemma 2.1,

$$\begin{aligned} 0=D([u,v]x + x'[u,v])=D(x)[u,v] + xd([u,v]) + D([u,v])x' + [u,v]d(x)'. \end{aligned}$$

Hence,

$$\begin{aligned} D(x)[u,v] + xd([u,v]) + [u,v]d(x)'=0. \end{aligned}$$

Multiply this equation by [uv], we obtain

$$\begin{aligned} xd([u,v])[u,v]+[u,v]d(x)'[u,v]=0. \end{aligned}$$
(3.5)

In this case, we have \([u,v]d([u,v]) = 0\).

By adding d([uv])[uv] to the first identity of (3.2), we obtain

$$\begin{aligned} d([u,v])[u,v]+[u,v]d([u,v])=d([u,v])[u,v]. \end{aligned}$$

But \([u,v]^2=0\), so

$$\begin{aligned} 0=d([u,v]^2)=d([u,v])[u,v]+[u,v]d([u,v])=d([u,v])[u,v]. \end{aligned}$$

Therefore (3.5) reduces to \([u,v]d(x)'[u,v] = 0\), which together with (3.4) gives \([u,v]xd([u,v])=0\) for all \(u,v,x\in S\). Since S is prime, we have \([u,v]=0\) or \(d([u,v])=0\). If \([u,v]=0\), then obviously S is commutative. If \(d([u,v])=0\) for all \(u,v\in S,\) then also

$$\begin{aligned} 0=d([u,vu])=d([u,v]u)=d(u)[u,v]+ud([u,v])=d(u)[u,v], \end{aligned}$$

whence, putting \(v=zv\) and using (2.2), we obtain \(d(u)z[u,v]=0\). Thus, \(d(u)=0\) or \([u,v]=0\). But by the assumption \(d\ne 0\), so \([u,v]=0\) for all \(u,v\in S\). Hence, S is commutative. Thus, the first identity of (3.2) always implies the commutativity of S.

Now let us consider the second identity of (3.2). Replace in this identity u by xv we obtain

$$\begin{aligned} 0=[z,[x,v]v]{\mathop {=}\limits ^{(5)}}[x,v][z,v]+[z,[x,v]]v{\mathop {=}\limits ^{(7)}}[x,v][z,v]. \end{aligned}$$

This, by (2.2), for \(z=zy\) gives

$$\begin{aligned} 0=[x,v][zy,v]=[x,v]z[y,v]+[x,v][z,v]y=[x,v]z[v,y], \end{aligned}$$

so \([x,v]S[v,y]=0\) for all \(x,y,v\in S\). This implies the commutativity of S and completes the proof. \(\square \)

Theorem 3.4

A prime MA-semiring S with a non-zero generalized reverse derivation (Dd) such that \(d(z)\ne 0\) for some \(z\in Z(S)\) and \(D(uv+vu)=0\) for all \(u,v\in S\), is commutative.

Proof

According to the assumption, we have

$$\begin{aligned} 0=D(uv+vu)=D(v)u+vd(u)+D(u)v+ud(v), \end{aligned}$$
(3.6)

which for \(v=uv\) gives \((D(v)u+vd(u)+ud(v))u+2uvd(u)+D(u)uv=0\). This, by (3.6) and (2.1), implies \(D(u)'vu+2uvd(u)+D(u)uv=0\). Thus, \(D(u)[u,v]+2uvd(u)=0.\) From this, putting \(v=vd(u)\) and applying the second Jacobi identity, we obtain \(D(u)v[u,d(u)]=0\). Since S is prime and D is non-zero, for all \(u\in S\) must be \([u,d(u)]=0\). Whence, replacing u by \(u+v\), we obtain

$$\begin{aligned}{}[u,d(v)]+[v,d(u)]=0. \end{aligned}$$
(3.7)

This for \(v=yz\), where \(y\in S\), \(z\in Z(S)\) such that \(d(z)\ne 0\), after application of Lemma 3.1 and (3.7) gives \(d(z)[u,y]=0\). So, we have \(d(z)S[u,y]=0\) for all \(u,y\in S\). Hence, S is commutative. \(\square \)

Theorem 3.5

A prime MA-semiring S with a non-zero generalized reverse derivation (Dd) such that \([D([u,v]),w]=0\) for all \(u,v,w\in S\) and \(d(z)\ne 0\) for some \(z\in Z(S)\), is commutative.

Proof

Let \(z\in Z(S)\) be such that \(d(z)\ne 0\). Then, \(d(z)\in Z(S)\) and by the assumption,

$$\begin{aligned} \begin{array}{rl} 0&{}=[D([u,zv]),w]=[D(z[u,v]),w]=[D([u,v])z,w]+[[u,v]d(z),w]\\ &{}=[D([u,v]),w]z+[[u,v],w]d(z)=[[u,v],w]d(z), \end{array} \end{aligned}$$

which implies \([[u,v],w]=0\), because S is prime.

In particular, \(0=[[u,uv],w]=[u[u,v],w]=[u,w][u,v]\). From this, replacing w by uw and applying the second Jacobi identity, we deduce \([u,v]w[u,v]=0\). This proves the commutativity of S. \(\square \)

Corollary 3.6

A proper prime MA-semiring with a non-zero generalized reverse derivation D satisfying the identity \([[D(u),v],w]=0\) is commutative.

Proof

By Lemma 2.1, \([[D(u),v],w]=0\) means that \([D(u),v]w=w[D(u),v]\). Thus, for all \(u,v,w\in S\), we have

$$\begin{aligned} 0=[[D(u),D(u)v],w]=[D(u)[D(u),v],w]=[D(u),w][D(u),v]. \end{aligned}$$

From this, as in the previous proof, we obtain \([D(u),v]S[D(u),v]=0\), which implies \([D(u),v]=0\). Therefore, \(D(u)\in Z(S)\) and \([D([x,y]),v]=0\) for all \(x,y,v\in S\). Obviously, \(Z(S)\ne \{0\}\) since in the opposite case will be \(D(u)=0\) for all \(u\in S\) which contradicts our assumption about D.

Note that \([D([x,y]),v]=0\) implies \(D([x,y])(v+v')=0\), and in the consequence \(D([x,y])S(v+v')=0\). But S is prime and proper, so \(D([x,y])=0\) and S is commutative by Theorem 3.3. \(\square \)

Theorem 3.7

If a 2-torsion free prime MA-semiring has a non-zero generalized reverse derivation D satisfying the identity

$$\begin{aligned}{}[D(u)v+vD(u),w]=0, \end{aligned}$$
(3.8)

then it is commutative.

Proof

If \(Z(S)=\{0\}\), then for all \(u,v\in S\) we have

$$\begin{aligned} D(u)v+vD(u)=0. \end{aligned}$$
(3.9)

Whence, by (2.1), we deduce \(D(u)'v=vD(u)\). Replacing in (3.9) v by wv and using the last fact, we obtain \([D(u),w]v=0\). Therefore, for all \(u,v,w\in S\), we have \([D(u),w]v[D(u),w]=0\). This implies \([D(u),w]=0\). Thus, \(D(u)\in Z(S)=\{0\}\), which is a contradiction.

So, there is a non-zero element \(z\in Z(S)\). For this z, we have

$$\begin{aligned} 0=[D(u)z+zD(u),w]=[2D(u),w]z=2[D(u),v]z. \end{aligned}$$

Consequently, \([D(u),v]=0\) for all \(u,v\in S\) because S is 2-torsion free and prime. So, \(D(u)\in Z(S)\) for each \(u\in S\). Thus, (3.8) implies \(2D(u)[v,w]=0\), whence by primeness of S, we deduce the commutativity of S. \(\square \)

Proposition 3.8

If a generalized reverse derivation (Dd) defined on a prime MA-semiring S satisfies the identity \(d(u)D(v)+uv=0\), then d is commuting. Moreover, if d is surjective, then S is commutative.

Proof

If \(d=0\) then obviously it is commuting. Let \(d\ne 0\). Then, according to the assumption, \(d(u)D(uv)+uuv=0\) is valid for all \(u,v\in S\). This implies

$$\begin{aligned} d(u)vd(u)+u[u,v]=0. \end{aligned}$$
(3.10)

Thus, \(d(u)vd(u)u+u[u,v]u=0\) and \(u[u,v]=d(u)vd(u)'\), by (2.1). Moreover, replacing in (3.10) v by vu, we obtain \(d(u)vud(u)+u[u,v]u=0\) which together with two previous identities gives \(d(u)v[u,d(u)]=0\). Hence, \([u,d(u)]=0\) because \(d\ne 0\). If d is surjective, then obviously S is commutative. \(\square \)

Note that in the above proposition the identity \(d(u)D(v)+uv=0\) can be replaced by \(d(u)D(v)+vu=0\).

Theorem 3.9

If a prime MA-semiring S has a surjective generalized reverse derivation D associated with a non-zero reverse derivation d satisfying the identity

$$\begin{aligned} D(u)d(v)+d(v)D(u)=0, \end{aligned}$$
(3.11)

then S is commutative.

Proof

From (3.11), for \(v=D(u)v\), after reduction, we obtain

$$\begin{aligned} D(u)vd(D(u))+vd(D(u))D(u)=0. \end{aligned}$$

Now, putting \(v=vw\) and using \(d(v)D(u)=D(u)'d(v)\) (it is a consequence of (3.11) and (2.1)) we get \([D(u),vw]d(D(u))=0\), whence, by the Jacobi identity, we deduce \([D(u),v]wd(D(u))+v[D(u),w]d(D(u))=0\). Again, replacing v by zv and using the Jacobi identity, we conclude that \([D(u),z]vwd(D(u))=0\) for all \(u,v,w,z\in S\). Since S is prime, the last means that \([D(u),z]=0\) or \(wd(D(u))=0\).

Because D is surjective and \(d\ne 0\), the second case is impossible, so \([D(u),z]=0\). This shows that S is commutative. \(\square \)

Theorem 3.10

Let D be a generalized reverse deviation associated with a non-zero reverse derivation d defined on a prime MA-semiring S. If D satisfies the identity \(D(uv)+uD(v)'=0\), then S is commutative.

Proof

Applying (2.1) to \(D(uv)+uD(v)'=0\) we obtain \(D(uv)=uD(v)\). Hence, \(D(uvz)+uD(vz)'=0\). This gives

$$\begin{aligned} D(z)uv+zd(v)u+zvd(u)+uvD(z)'=0. \end{aligned}$$

Since \(D(uv\cdot z)=D(u\cdot vz)\) we also have

$$\begin{aligned} D(z)vu+zd(v)u+vzd(u)+uvD(z)'=0. \end{aligned}$$

These two identities together with (2.1) imply

$$\begin{aligned} D(z)uv+zvd(u)+D(z)v'u+v'zd(u)=0. \end{aligned}$$

Hence, \(D(z)[u,v]+[z,v]d(u)=0\).

Replacing z by uz, using the Jacobi identity (2.2) and \(D(uv)=uD(v)\), we obtain \(uD(z)[u,v]+u[z,v]d(u)+[u,v]zd(u)=0\), which is reduced to \([u,v]vd(u)=0\). This implies \([u,v]=0\) because \(d\ne 0\). Hence, S is commutative. \(\square \)

We end this note by the following result on semiprime MA-semirings.

Theorem 3.11

If a semiprime MA-semiring S has generalized reverse derivations (Dd) and (Ff) (not necessarily different) such that \(D(uv)+F(uv)+vu=0\) for all \(u,v\in S\), then S is commutative.

Proof

By the assumption, \(D(uvw)+F(uvw)+vwu=0\) for all \(u,v,w\in S\). Thus, \(D(vw)u+vwd(u)+F(vw)u+vwf(u)+vwu=0\). Since by the assumption and (2.1), \(D(vw)+F(vw)=w'v\), we can reduce the last identity to

$$\begin{aligned} vwd(u)+vwf(u)+[v,w]u=0. \end{aligned}$$

This for \(v=vz\) gives

$$\begin{aligned} vzwd(u)+vzwf(u)+[vz,w]u=0. \end{aligned}$$

Similarly, for \(w=zw\) we obtain

$$\begin{aligned} vzwd(u)+vzwf(u)+[v,zw]u=0. \end{aligned}$$

These two identities together with (2.1) imply \( [vz,w]u+[v,zw]'u=0. \) Hence, \(([vz,w]+[v,zw]')u=0\), and consequently \([vz,w]+[v,zw]'=0\), because S is semiprime. The last expression, by the Jacobi identities, can be rewritten in the form

$$\begin{aligned} vw(z+z')v+vw(z+z')+wvz+(z+z')vw+z'wv=0. \end{aligned}$$

But \(z+z'\in Z(S)\) and \(z+z'+z=z\), so this identity can be reduced to \( vw(z+z')+wvz+z'wv=0, \) whence, after transformations, we obtain \(v(w+w')z+wvz+z'wv=0.\) Since \(w+w'\in Z(S)\) and \(w+w'+w=w\), the last means that

$$\begin{aligned}{}[wv,z]=0. \end{aligned}$$

In particular, for \(v=xy\) we get \(0=[wxy,z]=w[xy,z]+[w,z]xy=[w,z]xy.\) So, \([w,z]xS[w,z]x=0\). Thus, \([w,z]x=0\), which similarly as before, implies \([w,z]=0\). Therefore S is commutative. \(\square \)

Theorem 3.12

If on a semiprime MA-semiring S there is a generalized reverse derivation (Dd) satisfying the identity

\(D(u)D(v)+uv=0\) or \(D(u)D(v)+u'v=0\),

then it is commutative.

Proof

The first identity, by (2.1), implies \(D(u)D(v)=uv'\). Thus, for \(v=zw\), it can be reduced to \(D(u)wd(z)+u[z,w]=0\). Whence, putting \(w=xw\) and applying (2.2), we obtain \(D(u)xwd(z)+ux[z,w]+u[z,x]w=0.\) Similarly, for \(u=xu\) we get \(D(u)xwd(z)+ud(x)wd(z)+xu[z,w]=0\). Comparing these two expressions, in view of (2.1), we obtain

$$\begin{aligned}{}[u,x][z,w]+u[z,x]w+u'd(x)wd(z)=0. \end{aligned}$$
(3.12)

This, for \(u=zu\), gives

$$\begin{aligned} z[u,x][z,w]+[z,x]u[z,w]+zu[z,x]w+zu'd(x)wd(z)=0. \end{aligned}$$

Now, multiplying from the left (3.12) by z and using the above expression, we obtain \([z,x]u[z,w]=0\). Since it is valid for all \(x,u,z,w\in S\), we also have \([z,w]u[z,w]=0\), which by semiprimeness of S, implies the commutativity of S.

For \(D(u)D(v)+u'v=0\) the proof is analogous. \(\square \)