An algorithm for commutative semigroup algebras which are principal ideal rings I.M. Ara´ ujo, A.V. Kelarev and A. Solomon ´ Departamento de Matem´ atica, Universidade de Evora, ´ Rua Rom˜ ao Ramalho, 59, 7000-671 Evora, Portugal and ´ Centro de Algebra da Universidade de Lisboa Av. Prof. Gama Pinto, 2 1649-003 Lisboa, Portugal
[email protected] Mathematics & Physics, University of Tasmania, Private Bag 37, Hobart, Tasmania 7001, Australia
[email protected] Faculty of Information Technology University of Technology, Sydney Broadway, NSW 2007, Australia
[email protected]
1
Introduction
Associative and commutative algebras with identity have various well-known applications. In particular, many classical codes are ideals in commutative algebras (see [4], [12] for references). Computer storage, encoding and decoding algorithms simplify if all these codes have single generator polynomials. Thus it is of interest to determine when all ideals of an algebra are principal. In [5] Decruyenaere, Jespers and Wauters characterized commutative semigroup algebras with identity which are principal ideal rings. In the more general case of noncommutative algebras all principal ideal semigroup algebras have been described by Jespers and Okninski [9]. For preliminaries on semigroup rings and other related constructions we refer to [13] and [10]. In this paper we develop an algorithm which, given a presentation for a commutative semigroup S and the characteristic of a field k, decides whether the semigroup algebra k[S] is a principal ideal ring with identity. This builds 1
upon the work of Rosales, Garc´ıa-S´anchez and Garc´ıa-Garc´ıa ([15], [16]) who have developed a number of useful algorithms for computing with finitely presented commutative semigroups: most importantly an algorithm to compute the (necessarily finite) set of idempotents. Much of the remaining work depends on finding presentations for ideals, subgroups and quotients of finitely presented commutative semigroups. This draws on techniques developed by Ruˇskuc and others in [3] and [17] for finding presentations of subsemigroups. In practical terms, this work has evolved from an ongoing project involving two of the authors [1] to develop functionality within GAP [7] to compute with semigroups.
2
Background and Notation
Green’s relations are one of the standard tools for structural analysis of semigroups (see, for example, [8], [10], or [11]). In a commutative semigroup S, these relations all reduce to the single relation H, which is defined by aHb precisely when a and b divide each other; clearly the H-class containing an idempotent is precisely the maximal subgroup of S for which that idempotent is the identity. It is well known that a finitely generated abelian group decomposes as Zpk1 × · · · × Zpkmm × Zq , 1
for some primes pi . One of the standard algorithms of computational group theory (see [18]), computes (pk11 , . . . , pkmm , q) given a presentation for an abelian group. We refer to this algorithm as AbelianGroupDecomposition. For a Q prime p, denote by Yp the set {i | pi = p}. We refer to i∈Yp Zpki as the group’s i p-primary component, which is cyclic precisely when Y is a singleton. In parallel with AbelianGroupDecomposition is the algorithm IndependentGenerators which returns a sequence (g1 , . . . , gm , h1 , . . . , hq ) of elements of the group, where the element gi generates the i-th finite cyclic factor Zpki , and hi generates the i-th infinite cyclic factor. i
For a semigroup S we define the monoid S 1 to be equal to S if S has an identity, or to be equal to S with an identity adjoined otherwise. If S is a multiplicative semigroup with zero having no proper divisors of zero, then we denote by Sθ the semigroup obtained by removing the zero from S. Let M be a commutative monoid and H a subgroup of units. Denote by M/H the set {mH | m ∈ M }. It is a simple exercise to see that this is a monoid, and we refer to it as the quotient of M by H. Following [5] we 2
also say that M is an extension of H by M/H. Note: care must be taken to distinguish this construction from the Rees quotient by an ideal. If I is an ideal of S, a (not necessarily commutative) semigroup, then the Rees quotient of S by I, written S/I is the set S \ I ∪ {0} where the product of two elements in S \ I is defined to be 0 if their product in S lies in I.
2.1
Finitely generated commutative semigroups
Given an alphabet A, we denote by A+ the free semigroup on A and by A∗ the free monoid on A. Let S be a semigroup and let φ : A → S be any map. Then if the homomorphic extension of φ to A+ is surjective, we say that A generates the semigroup S under φ. In general, when A is a subset of S there is no mention of the map, and it will be taken to be the natural inclusion. Henceforth we consider only finitely generated commutative semigroups. Let (N, +), or just N, denote the semigroup whose elements are the natural numbers (including 0) and whose operation is addition. It is well known that the free commutative monoid on n generators is isomorphic to Nn and the free commutative semigroup on n generators is isomorphic to (Nn )θ = Nn \ {0} where the operation + is componentwise addition. We denote by bi the generator of (Nn )θ consisting of a vector with zero everywhere but in position i where there is a 1. The set {b1 , . . . , bn } is also called the standard basis for Nn . For an element u ∈ Nn we usually denote by ui its i-th entry. The set Nn inherits a partial order from the usual total order ≤ on N, namely u ≺ v if for each 1 ≤ i ≤ n, ui ≤ vi . Indeed, both Nn and (Nn )θ are join semilattices when one defines u ∨ v = (max(u1 , v1 ), . . . , max(un , vn )). It is clear that if u ≺ v then u + x ≺ v + x and u ∨ x ≺ v ∨P x both hold. Pn We n n alsoPconsider the P shortlex order on N defined by u ≤ v if i=1 ui < i=1 vi or ni=1 ui = ni=1 vi and ui < vi for the smallest i where the vectors differ. Clearly, shortlex is a total order which extends ≺. Suppose that A = {a1 , . . . , an } ⊆ S generates S. Then there is a canonical homomorphism · from (Nn )θ to S given by mn 1 m2 (m1 , . . . , mn ) 7→ (m1 , . . . , mn ) = am 1 a2 . . . an .
In view of this we define a commutative semigroup presentation to be an integer n together with a set ρ of pairs of elements of (Nn )θ . We say that P = hn | ρi is a presentation for the commutative semigroup S if S is generated by an alphabet A of size n, and the kernel of the canonical map from (Nn )θ to S described above is precisely the smallest congruence on (Nn )θ containing ρ. We refer to ρ as the set of relations of S and if x, y ∈ (Nn )θ are such that there exists (a, b) ∈ ρ ∪ ρ−1 with a ≺ x and y = x − a + b then we say that y is obtained from x by application of one relation from ρ. Also, two elements 3
x, y ∈ (Nn )θ satisfy x = y if and only if there exists a sequence x = α 1 , α2 , . . . , αh = y of elements αi ∈ (Nn )θ (1 ≤ i ≤ h) such that each αi is obtained from αi−1 by one application of one relation from ρ, and write x ∼P y (or x ∼ρ y). If furthermore each αi ≥ αi+1 then we write x →∗ y (or x → y if h = 2). Similarly we define a commutative monoid presentation by replacing (Nn )θ by Nn in the above discussion. Denote by hn | ρisgp a commutative semigroup presentation with n generators and relations ρ, and by hn | ρimon the corresponding commutative monoid presentation. When it is clear from the context which type of presentation we are dealing with, it will simply be denoted hn | ρi. It is important to note that in the sequel, for an arbitrary commutative semigroup S, the binary operation will generally be written multiplicatively, while the operation of the free commutative semigroup (Nn )θ , will be written additively. Further, the identity of the free commutative monoid will be denoted by 0 while the identity of a multiplicative monoid M will be denoted by 1M (or simply 1). Commutative semigroup and monoid presentations have some special properties. The following theorem may be found in any text on commutative semigroups, for example, [16]. Proposition 1 (Redei’s Theorem) Every congruence on (Nn )θ (resp. Nn ) is finitely generated, and therefore every finitely generated commutative semigroup (resp. monoid) is finitely presented. Let hn | ρi be a finite semigroup or monoid presentation. We say that hn | ρi is reduced if ρ is finite and, writing ρ = {(l1 , r1 ), . . . , (lm , rm )}, for all i ∈ [m], (a) ri < li ; (b) lj ⊀ li for all j 6= i; (c) lj ⊀ ri for all j 6= i; and for all standard basis elements bi and bj , (d) bi = bj implies i = j; (e) (bi , 0) ∈ / ρ for any standard basis element bi (this condition holds trivially for a semigroup presentation). We say that hn | ρisgp is confluent if for x, y ∈ (Nn )θ , x = y if and only if there exists an element z ∈ (Nn )θ such that x →∗ z and y →∗ z. Define confluence 4
correspondingly for commutative monoid presentations by replacing (Nn )θ with Nn . A commutative (semigroup or monoid) presentation is said to be canonical if it is both reduced and confluent. A canonical presentation determines an algorithm to solve the word problem in the semigroup or monoid it defines (see, for example, [16]).
3
Algorithms for finitely generated commutative semigroups
First, we recall a few well-known algorithms for semigroups and commutative semigroups needed for our main algorithm. The following appears in [16] as Algorithm 6.8 and Proposition 6.11. Proposition 2 (Knuth-Bendix rewriting process) There is a terminating algorithm which, given a presentation hn | ρisgp , produces a subset κ ⊆ (Nn )θ × (Nn )θ such that the semigroup presented by hn | ρisgp and the semigroup presented by hn | κisgp are isomorphic, and hn | κisgp is a canonical presentation. The same is valid for monoid presentations. Whenever a canonical presentation is required we will assume the use of this algorithm. Rosales et. al. [15] give an algorithm which, given a semigroup S defined by a presentation hn | ρi, determines a (necessarily finite) set E ⊂ Nn which maps bijectively onto the set of idempotents of S. We refer to this algorithm as Idempotents.
3.1
Finding the basis of an ideal
Let S be a commutative semigroup and let Z be a nonempty subset of S. Then the set product ZS 1 is the ideal of S generated by Z. The subset IZ of Nn consisting of vectors representing an element of ZS 1 is then an ideal of Nn . Let B denote the minimal elements of IZ under the partial order ≺ on Nn . By Dickson’s Lemma (see, for example, [2]) B is a finite set, and we refer to B as the basis of the ideal ZS 1 . Lemma 1 Let S be a commutative semigroup defined by a presentation hn | ρi and let X be a finite nonemptysubset of Nn . Then Algorithm 1 calculates the basis of XS 1 . Proof. Observe first, by a simple induction from Steps 8 and 9, that if b ∈ B∩Vk then b ∈ Vl for all l ≥ k for which Vl is defined, and also that each Vl consists of pairwise incomparable elements. 5
Algorithm 1 IdealBasis Calculate the basis of an ideal Input: S = hn | ρi, X a nonempty finite subset of Nn . We assume without loss of generality that the elements of X are pairwise incomparable under ≺. Output: B ⊂ Nn , the basis of XS 1 . 1: V0 ← ∅ 2: V1 ← X 3: i ← 1 4: while Vi 6= Vi−1 do 5: Vi+1 ← Vi 6: for all x ∈ Vi do 7: for all (a, b) ∈ ρ do 8: Vi+1 ← minimal elements of Vi+1 ∪ {(x ∨ a) − a + b} 9: Vi+1 ← minimal elements of Vi+1 ∪ {(x ∨ b) − b + a} 10: end for 11: end for 12: i←i+1 13: end while 14: return B = Vi Let u represent an arbitrary element of XS 1 . It is enough to show there is some k ∈ N and y ∈ Vk with y ≺ u for then there will be some l such that B ⊆ Vl , whence B = Vl . There is some x ∈ X and v ∈ Nn with x+v = u1 ∼ρ u2 ∼ρ u3 · · · ∼ρ uk = u, for some k ≥ 1, u1 , u2 , . . . , uk ∈ Nn . We will show by induction on k that y ≺ u for some y ∈ Vk . If k = 1 then since x + v = u, x ≺ u and putting y = x, we are done. Now suppose that k > 1. Since u = uk = uk−1 is in the ideal of S generated by X, by an inductive hypothesis we certainly have that there is some z ∈ Vk−1 with z ≺ uk−1 . If uk−1 is transformed into uk by an application of the relation (a, b) ∈ ρ ∪ ρ−1 , then uk = uk−1 − a + b. Steps 8 and 9 ensure that some divisor y of z ∨ a − a + b is an element of Vk . But since a, z ≺ uk−1 , we certainly have z ∨ a ≺ uk−1 , whence y ≺ z ∨ a − a + b ≺ uk−1 − a + b = uk as required.
3.2
Deciding whether a monoid is free monogenic
Throughout we assume that M is a commutative monoid defined by the canonical presentation hn | ρimon . Several known algorithms can decide whether a finitely presented monoid M is isomorphic to the free monogenic monoid N or cyclic group Z. For example, using the results of [6] and [20], Taitslin proved in [19] that the isomorphism 6
problem for finitely presented commutative semigroups is decidable, and has also developed a rather general algorithm which solves many problems for commutative semigroups. For convenience of the reader we include a shorter self-contained algorithm in this section. It assumes that IdealBasis(∅) = ∅. Algorithm 2 Determines whether a monoid M with canonical presentation hn | ρimon is the free monogenic monoid N. Input: M = hn | ρi Output: true if M is free monogenic, false otherwise. 1: {We start by finding a candidate to be the free generator.} 2: for all i = 1, . . . , n do 3: Bi ← IdealBasis({bj | j 6= i}) 4: end for 5: Y ← {bi | bi ∈ / Bi } 6: if | Y |6= 1 then 7: return false 8: else 9: renumber the generators so that Y = {b1 } 10: end if 11: {We then find out if all other generators are powers of b1 . If that is the case, then M is monogenic.} 12: for all j 6= 1 do 13: if ¬(∃ kj > 1) (kj b1 ∈ IdealBasis(bj ) ∧ kj b1 = bj ) then 14: return false 15: end if 16: end for 17: {We now know M is monogenic, and need to decide whether it is free.} 18: if Idempotents(M ) 6= {1M } then 19: return false 20: else 21: if b1 ∈ IdealBasis({2b1 }) then 22: return false 23: end if 24: else 25: return true 26: end if Note that since all bases of ideals are finite, only a finite number of verifications are required in step 13 of this algorithm. In order to prove correctness of Algorithm 2, we need the following two lemmas. Lemma 2 For each i = 1, . . . , n, let Bi denote IdealBasis({bj | j 6= i}), 7
and let Y = {bi | bi ∈ / Bi }. If M is free monogenic, then | Y |= 1 and M is generated by the unique element of Y . Proof. Suppose that M is free monogenic with free generator x. First it is shown that x = bk for some k ∈ [n]. Write x = a1 b1 + · · · + an bn , for some ai ∈ N, and notice that at least one of the ai is nonzero. Assume, without loss of generality that a1 > 0 and put a1 b1 = xα , and a2 b2 + · · · + an bn = xγ . Since the presentation is canonical, b1 6= 1M and therefore a1 b1 6= 1M for otherwise x would not generate M freely. From this we deduce that α is nonzero, which together with xα+γ = x, implies that α = 1 and γ = 0 giving a1 b1 = x. Write b1 = xβ1 . Then xβ1 a1 = x which, by the fact that x generates M freely, implies that β1 = a1 = 1, and b1 = x. Therefore in general, we may fix k with bk = x. We now show that bk ∈ Y (i.e. bk ∈ / Bk ). Since the presentation is canonical, no bj is the identity of M so that for each j 6= k, bj = xβj with βj > 1. If x were in the ideal generated by {bj | j 6= k} then for some m ∈ M , x = mxβj = xh for some h ≥ βj > 1, contradicting that x generates M freely. Therefore, x is not in the ideal generated by {bj | j 6= k}, which implies that bk ∈ / Bk . That is to say, bk ∈ Y . To complete the proof, it is enough to show for j 6= k, bj ∈ / Y . Fix some j 6= k. By definition, bk is in the ideal with basis Bj , but it also generates M , so that Bj is just the standard basis for Nn , whence bj ∈ Bj and bj ∈ / Y as required. Lemma 3 If M is free monogenic and b1 generates M then, for each j 6= 1, there is some kj > 1 such that kj b1 is an element of IdealBasis(bj ) and k j b1 = b j . Proof. Given that M is monogenic and freely generated by b1 , for each j 6= 1, there is some kj such that kj b1 = bj . Therefore, there is some h ≤ kj such that hb1 ∈ IdealBasis(bj ). If h < kj , then hb1 = bj lb1 = (kj + l)b1 for some l ≥ 0, contradicting that b1 is a free generator. Lemma 4 Algorithm 2 returns true if M is free monogenic and false otherwise. Proof. Suppose that M is free monogenic. Then by Lemma 2, | Y |= 1 so that Algorithm 2 certainly reaches line 11. By Lemma 3, the algorithm reaches line 17. Noting that a monogenic monoid is free if and only if its only idempotent is the identity and it is not the cyclic group, the algorithm returns true at line 25. 8
Conversely, suppose M is not free monogenic. If line 17 is not reached, then false is returned. If line 17 is reached, then M is monogenic and false will be returned, either at line 18 because the algorithm detects more than one idempotent, or at line 22 because it detects that the monoid is a cyclic group.
3.3
Determining whether a semigroup algebra has identity
There are many important classes of commutative algebras which all have identity elements. This is why many authors restrict their attention to treating only algebras with identity in their monographs. To illustrate here we only mention that, for example, every commutative algebra generated as an ideal by a finite set of idempotents has an identity element. In [14], Theorem 1.4, Ponizovskii shows that an algebra of the semigroup S has an identity element if and only if the following equality holds: [ S= eS. (1) e∈E(S)
(Note that this equality is independent of the field over which the algebra is formed.) We present an algorithm to determine whether the algebra of a semigroup S = hn | ρi has an identity element. Algorithm 3 Determines whether every generator is in the principal ideal of some idempotent Input: S = hn | ρi 1: E ← Idempotents(S) 2: B ← IdealBasis(E) 3: if bi ∈ / B for any i then 4: return false 5: else 6: return true 7: end if
Lemma 5 Given a presentation hn | ρi for a semigroup S, Algorithm 3 determines whether or not an algebra of S over a field has an identity element. Proof. In order to decide whether an algebra of S has an identity element, Algorithm 3 must verify that Equation 1 holds, which is clearly equivalent to checking that, for each i, bi ∈ eS, for some idempotent e. 9
It only remains to see that Algorithm 3 actually tests the latter. By Algorithm 1 we are able to calculate the basis B of the ideal in Nn of all vectors which represent elements of the form es for some idempotent e and s ∈ S. Then by minimality of bi , bi is in this ideal if and only if it is an element of B.
3.4
Deciding whether a semigroup has zero divisors
Proof of correctness of Algorithm 4 is straightforward and we omit it. Algorithm 4 ZeroDivisors Decide whether a semigroup has zero divisors Input: S = hn | ρi, a canonical presentation. Output: true if S has zero divisors, or false otherwise. 1: if S has no zero then 2: return false 3: end if 4: if all bi are nonzero then 5: return true 6: end if 7: {There exists a unique k such that ¯ bk = 0.} 8: if there is no relation of the form (u, v) or (v, u), where u does not contain bk , but v does contain bk then 9: return false 10: else 11: return true 12: end if
4
Presentations for commutative semigroups
Most of the calculations in our main algorithm involve computing ideals, subgroups and quotients of a semigroup. Here we show how to write down finite presentations for these objects.
4.1
Presentation for a maximal subgroup
Let M be a monoid defined by the presentation Q = hn | ρimon . Fix an idempotent e ∈ M and let G be the maximal subgroup of M containing e. Put Σ = {i ∈ [n] | ebi ∈ G} and NΣ = {w ∈ Nn | wi 6= 0 ⇒ i ∈ Σ}. Notice that NΣ ∼ = Nm where m = |Σ|, and denote by τ the obvious isomorphism from 10
NΣ to Nm . In particular denote by di the image of bi under τ , for i ∈ Σ; Nm is clearly generated by the di (i ∈ Σ). Lemma 6 If w ∈ Nn is such that w ∈ G then wi 6= 0 implies i ∈ Σ. Proof. Let w ∈ Nn be such that w ∈ G, and let i be such that wi 6= 0. Then w = w 0 + bi , with w 0 ∈ Nn . There is some z ∈ G such that zw = e, whence (zw 0 )(bi e) = e which shows that bi eHe. But since G is precisely the H-class containing e, we have bi e ∈ G. This shows that i ∈ Σ, as required. One consequence of the lemma above is that we may fix a word we ∈ NΣ such that we = e. Indeed, with notation as set out above, we have: Proposition 3 The maximal subgroup G containing e is a quotient of Nm under the semigroup homomorphism ψ : v 7→ τ −1 (v)e which extends the map di 7→ bi e, for i ∈ Σ. Proof. The homomorphism ψ clearly lands in eM . We show that its image is precisely G: s ∈ Im(ψ) ⇔ ⇔ ⇔ ⇔
s = τ −1 (v)e for some v ∈ Nm s = we for some w ∈ NΣ s = w + we for some w ∈ NΣ s∈G
by Lemma 6.
Theorem 1 The group G is defined by the following presentation P = hm | τ (u) = τ (v) ((u = v) ∈ ρ ∩ (NΣ × NΣ )), τ (we ) = 0imon .
(2) (3)
Proof. Let ψ be as defined in Proposition 3. To show that P defines G we now have to prove that x ∼P y if and only if ψ(x) = ψ(y). Suppose that x ∼P y. We have to show that τ −1 (x)e = τ −1 (y)e. There is an elementary sequence x = α1 , α2 , . . . , αk = y with respect to P and hence τ (we ) + x = τ (we ) + α1 , τ (we ) + α2 , . . . , τ (we ) + αk = τ (we ) + y is also an elementary sequence from τ (we ) + x to τ (we ) + y with respect to P with we + τ −1 (αj ) = eτ −1 (αj ) ∈ G (1 ≤ j ≤ k). If the relation applied to obtain αi from αi−1 is from (2) then clearly we + τ −1 (αi ) is obtained from we + τ −1 (αi−1 ) by applying a relation from Q. Otherwise, let us consider the case where αi is obtained from αi−1 by applying the relation τ (we ) = 0. Then it also 11
follows that τ −1 (αi−1 ) − we = τ −1 (αi ) (or τ −1 (αi ) − we = τ −1 (αi−1 )). Hence 2we + τ −1 (αi ) = we + τ −1 (αi−1 ) (or, similarly, 2we + τ −1 (αi−1 ) = we + τ −1 (αi )). The fact that we represents an idempotent in M implies we + τ −1 (αi ) ∼Q we + τ −1 (αi−1 ). Thus we + τ −1 (x) ∼Q we + τ −1 (y) and τ −1 (x)e = τ −1 (y)e as required. Conversely suppose that ψ(x) = ψ(y), and x = di1 + . . . + dik ∈ Nm , y = dj1 + . . . + djl ∈ Nm . Then ψ(x) = ψ(y) implies that ebi1 . . . ebik = ebj1 · · · ebjl , and therefore ebi1 . . . bik = ebj1 · · · bjl , because S is commutative and e is idempotent. Since we = e we then have w e b i1 . . . b ik = w e b j 1 · · · b j l , and hence w e + b i1 + · · · + b ik ∼ Q w e + b j 1 + · · · + b j l . Thus, there is an elementary sequence from we +bi1 +· · ·+bik to we +bj1 +· · ·+bjl with respect to Q. If some element w in this elementary sequence is not in / G which is a contradiction. Therefore all relations NΣ then, by Lemma 6, w ∈ used to obtain we + bj1 + · · · + bjl from we + bi1 + · · · + bik are in ρ ∩ (NΣ × NΣ ), and thus τ (we + bi1 + · · · + bik ) ∼P τ (we + bj1 + · · · + bjl ). But this means that τ (we ) + di1 + · · · + dik ∼P τ (we ) + dj1 + · · · + djl . Since τ (we ) = 0 is a relation in P then also 0 + d i1 + · · · + d ik ∼ P 0 + d j 1 + · · · + d j l , and therefore x = di1 + · · · + dik ∼P dj1 + · · · + djl = y.
4.2
Presentation for a Rees quotient
Let S be defined by the presentation Q = hn | ρi. Let E denote the set of idempotents of S, F a subset of E and e a maximal element of F . Denote by FcS the ideal generated by F \ {e}. Since F consists of idempotents, F S 1 = F S and FcS = (F \ {e})S. Let Te be the Rees quotient F S/FcS. We need to calculate this type of quotient in step 4 of our main algorithm, Algorithm 6. 12
Lemma 7 The semigroup Te is defined by the commutative monoid presentation P = hn + 1 | ρ, we = 0, bi + bn+1 = bn+1 (1 ≤ i ≤ n + 1), wf = bn+1 (f ∈ F \ {e})imon where wf ∈ Nn is such that wf = f ∈ E. Obviously, generator bn+1 represents the zero of Te . Proof. We define a (monoid) homomorphism ψ : Nn+1 → Te by extending the mapping bi 7→
ebi if i ≤ n and ebi ∈ / FcS 0Te otherwise.
We start by showing that ψ is onto. Take any α ∈ Te . If α = 0Te then ψ(bn+1 ) = α. If α 6= 0Te then α ∈ F S\FcS so that α = es for some s ∈ S, say s = w (w ∈ Nn ), yielding ψ(w) = ew = es as required. We now have to show that ψ(x) = ψ(y) if and only if x ∼P y. Suppose that x ∼P y by a single application of a relation of P. If this relation is in ρ or the relation is we = 0 then ex = ey and therefore ψ(x) = ψ(y). If the relation is bi + bn+1 = bn+1 or wf = bn+1 for f ∈ F \ {e} then ψ(x) = ψ(y) = 0Te . Now suppose that ψ(u) = ψ(v). Either ψ(u) = ψ(v) = 0Te or ψ(u), ψ(v) 6= 0 Te . Suppose ψ(u) = ψ(v) = 0Te . It is enough to show that u ∼P bn+1 . Then by symmetry, v ∼P bn+1 , and by transitivity u ∼P v. If u = bn+1 + z for z ∈ Nn+1 then clearly u ∼P bn+1 . Otherwise eu ∈ FcS and thus there exists f ∈ F \ {e} and u0 ∈ Nn such that we + u ∼ Q wf + u 0 . It then follows that we + u ∼P wf + u0 ∼P bn+1 . Finally, u = 0 + u ∼P we + u ∼P bn+1 . Now suppose that ψ(u), ψ(v) 6= 0Te . Notice that neither u nor v can be written as a sum of bn+1 + z, for otherwise u ∼P bn+1 , v ∼P bn+1 and ψ(u) = ψ(v) = 0Te . Now, eu = ev and hence we + u ∼Q we + v. Therefore also we + u ∼P we + v. Thus, we have u = 0 + u ∼P we + u ∼P we + v ∼P 0 + v = v, as required.
13
4.3
The quotient of a monoid by a group of units
Let hn | ρimon be a presentation for M , let M ∗ be its group of units, and let Mf∗ be the group of all units with finite order. In Algorithm 6, we need to compute the monoid M/Mf∗ . As explained in Section 4.1 we are able to compute a presentation P = hr | σimon for M ∗ and an isomorphism τ : NΣ → Nr , where τ −1 dictates the embedding from the group Nr /σ into M . Using IndependentGenerators we find the sequence (g1 , . . . , gm , h1 , . . . , hq ) of elements of Nr which represent the generators of the distinct cyclic components of M ∗ . We then have that {τ −1 (g1 ), . . . , τ −1 (gm )} ⊂ NΣ ⊆ Nn generate Mf∗ under the map ·. We show that: Lemma 8 The monoid M/Mf∗ = {sMf∗ | s ∈ M } is given by the presentation Q = hn | ρ, τ −1 (gi ) = 0 for 1 ≤ i ≤ mimon . Proof. Define ψ : {b1 , . . . , bn } → M/Mf∗ by bi 7→ bi Mf∗ , and extend homomora1 an phically. In particular, 0 7→ Mf∗ and (a1 , . . . , an ) 7→ b1 . . . bn Mf∗ . Clearly, ψ is onto. It remains to show that u ∼Q v if and only if ψ(u) = ψ(v). In the forward direction, the relations ρ certainly hold in M/Mf∗ since they hold in M . We only need to show that for all i, ψ(τ −1 (gi )) = ψ(0). But by definition τ −1 (gi ) ∈ Mf∗ , yielding ψ(τ −1 (gi )) = τ −1 (gi )Mf∗ = Mf∗ = ψ(0) as required. For the reverse implication, suppose that ψ(u) = ψ(v). Then in M , u = vh for some h ∈ Mf∗ . Writing h = τ −1 (gi1 ) . . . τ −1 (gik ) we have u ∼ρ v + τ −1 (gi1 ) + · · · + τ −1 (gik ). Using the relations τ −1 (gi ) = 0 we find u ∼Q v as required.
5
Identifying principal ideal rings
Given a finitely generated commutative semigroup S we may calculate the (finite) set E(S) of idempotents with the algorithm Idempotents of Rosales et al. [15]. The set of idempotents of a semigroup admits a partial order ≤E given by e ≤E f if ef = e. Under this partial order we may order the set of idempotents into a sequence (fi ) topologically, which is to say fi ≤E fj implies that i < j. If S has a zero, write this sequence f0 = 0, f1 , · · · , fN ; otherwise write it as f1 , . . . , fN (note that deciding whether S has a zero is a simple matter of searching through its idempotents). As described in [5], Proposition 1.2, a topologically ordered sequence of idempotents determines a sequence of ideals of S as follows: if 0 ∈ S, put S0 = 0, otherwise put S0 = ∅; knowing Si , put Si+1 = Si ∪ Sfi+1 . We refer to 14
this algorithm as IdealChain. Then each Rees quotient Si /Si−1 is a monoid with zero whose only nonzero idempotent is the identity. This monoid is clearly S{f0 , . . . , fi }/S{f0 , . . . , fi−1 } whose presentation is calculated in Section 4.2. Theorem 2.7 of [5] characterizes commutative semigroup algebras with identity which are principal ideal rings in terms of the existence of some chain of ideals S = SN ⊃ SN −1 ⊃ · · · ⊃ S0 . It is a scholium of the proof of this theorem that we may use the particular chain of ideals as constructed by algorithm IdealChain. We state the stronger form of this theorem: Proposition 4 Assume that |S| > 1. The semigroup algebra with identity k[S] is a principal ideal ring if and only if IdealChain(S), which we write S = Sn ⊃ · · · ⊃ S0 , is such that for all 1 ≤ i ≤ n one of the following conditions holds: (i) (Si /Si−1 )θ is a finite group G extended by an infinite cyclic monoid or group, and char(k) 6 ||G| when char(k) 6= 0; (ii) (Si /Si−1 )θ is a finite group with cyclic p-primary component when p = char(k) 6= 0; (iii) Si /Si−1 is a cyclic nilpotent extension of a finite group G, and if p = char(k) 6= 0 then p 6 ||G|. Based on the abstract description given in the proposition above we show: Theorem 2 Given a presentation for a commutative semigroup S and the characteristic of a field k, Algorithm 6 decides whether k[S] is a principal ideal ring with identity. Before we embark on a proof we need the following facts relating to cases (i) and (iii) above. Lemma 9 If M is an infinite cyclic monoid or group extension of a finite group, then it is an infinite cyclic monoid or group extension of Mf∗ , the finite subgroup of M consisting of all units of finite order. Proof. Suppose that M is an infinite cyclic monoid or group extension of a finite group. Then certainly there is some subgroup K ≤ Mf∗ such that M/K is isomorphic to N or Z. We show that if K 6= Mf∗ then M/K is not isomorphic to N or Z. Suppose to the contrary that a ∈ Mf∗ \ K, and that {a, a2 , . . . , am } are the distinct powers of a. Then {aK, a2 K, . . . , am K} is a finite subgroup of M/K of size at least 2, whereupon it is impossible for M/K to be N or Z.
15
Recall, a monoid is cyclic nilpotent if it has precisely two idempotents, 0 and 1, and an element s such that sn = 0 for some n > 0, and such that {1, s, s2 , . . . , sn−1 , 0} is the set of all the monoid’s elements. An argument almost identical to the proof of Lemma 9 gives us the following Lemma 10 If M is a cyclic nilpotent extension of a finite group, then M is a cyclic nilpotent extension of M ∗ . Algorithm 5 CheckCyclicNilpotent Decide whether a finite commutative monoid is cyclic nilpotent For nilpotence simply check that it has a single non-identity idempotent which is a zero for, and power of, all generators. To verify that it is cyclic, note that the nilpotent index of an element is no greater than the greatest index of any generator, and the question is decided by checking that one of the generators has index equal to the size of the monoid. Proof of Theorem 2. Suppose that k[S] is a principal ideal ring with identity. After ensuring that k[S] has an identity, we compute the topologically sorted sequence of idempotents of S. Fix some i – the index of the for loop. To see that the algorithm returns true it is enough to show that with M the Rees quotient Si /Si−1 of consecutive elements of IdealChain(S) (line 4), false is not returned and we commence the next iteration of the for loop through the command next. We know that M satisfies one of the three conditions of Proposition 4. Suppose that M satisfies condition (i). Then M is certainly infinite (which we can check by looking at its canonical presentation – see [16]) which brings us to line 32. Since Mθ is a semigroup, we calculate it and at line 38 we calculate the quotient T of Mθ by its group of units of finite order. If the characteristic of the field is p > 0 then we verify at line 39 that (Mθ )∗f has no elements of order p, which can be done with AbelianGroupDecomposition, because we know a generating set for (Mθ )∗f (see Section 4.3). By Lemma 9, S is isomorphic to N or Z (which we check – see Section 3.2), and we loop as required at line 43. In case M satisfies condition (ii), Mθ is a finite group, and we arrive at line 9. If the characteristic of the field is 0 loop at line 17, and if the characteristic is p > 0, then we loop precisely when p occurs at most once in the AbelianGroupDecomposition, which is the case as Mθ has cyclic p-primary component. S Finally, suppose that M satisfies condition (iii), so its set of elements is m∈M mH for some group H of units of M with H finite. Since M/H is cyclic nilpotent it is finite, and therefore there are only finitely many distinct mH with m ∈ M , whence M is also finite. Therefore we are at line 8. Setting G = M ∗ , we note that by Lemma 10, M/G is cyclic nilpotent. If |M | = |G| + 1 16
and the characteristic of the field is 0 we certainly loop; if it is p > 0, then since G has no elements of order p, p doesn’t occur in {p1 , . . . , pm } and we loop as required. On the other hand, if |M | > |G| + 1 then we arrive at step 21. Even if the characteristic of the field is p > 0 we know that G has no elements of order p, therefore p does not divide the order of G, and we arrive at line 24 where M/G is computed as described in Section 4.3 and verified to be cyclic nilpotent (Algorithm 5), and the algorithm loops. Conversely, given M = Si /Si−1 we show that in order to reach one of the next statements, M must satisfy one of the conditions of Proposition 4. Suppose that we loop at: • line12 then Mθ is a finite group, the characteristic of the field is p > 0, with at most one cyclic factor of p-power order, and we are in case (ii); • line 17 then Mθ is a finite group and the characteristic of the field is 0, and we are in case (ii); • line 25 then M is a cyclic nilpotent extension of a finite group and if the characteristic of the field is p > 0 then p is not a divisor of |G|, and we are in case (iii); • line 43 then Mθ is an extension of a finite group (Mθ )∗f by N or Z and if the characteristic of the field is p > 0 then p is not a divisor of |(Mθ )∗f |, and we are in case (i). In summary, we have shown that execution reaches a next statement precisely when Si /Si−1 satisfies one of conditions (i)–(iii) in Proposition 4, and hence the algorithm decides whether k[S] is a principal ideal ring with identity. ACKNOWLEDGEMENTS The first author was financially supported by the Sub-Programa Ciˆencia e Tecnologia do 2◦ Quadro Comunit´ario de Apoio (grant number BD/ 15623/98). ´ She also ackowledges the support of the Centro de Algebra da Universidade de Lisboa and of the Projecto Praxis 2/2.1/MAT/73/94. The last author received financial support from European Union ESPRIT grant number 24.969 and Canadian Network of Centres of Excellence MITACS project. Gratefully acknowledged is the hospitality of Professor J. E. Pin, LIAFA, CNRS and in particular Dr. D. Easdown, who was host to the first and last named authors while much of this work was carried out. All authors are grateful to the anonymous referee for serious corrections to the first version of this paper and many valuable comments. 17
Algorithm 6 Decides whether k[S] is a PIR with identity 1: Determine whether k[S] has an identity and return false if not – see Lemma 5. 2: Compute the topologically sorted sequence of idempotents f0 , f1 , . . . , fN as described in the beginning of Section 5. 3: for i ∈ {1, . . . , n} do 4: M ← S{f0 , . . . , fi }/S{f0, . . . , fi−1 } 5: G ← group of units of M {see Lemma 1} 6: (pk11 , . . . , pkmm , Nq ) ←AbelianGroupDecomposition(G) 7: if |M | < ∞ then 8: {we must be in case (ii) or (iii)} 9: if |M | = |G| + 1 then 10: if p = char(k) > 0 then 11: if p occurs at most once in {p1 , . . . , pm } then 12: next i 13: else 14: return false. 15: end if 16: else 17: next i 18: end if 19: else 20: {we are in case (iii)} 21: if p = char(k) > 0 and p||G| then 22: return false 23: else 24: if M/G is cyclic nilpotent then 25: next i 26: else 27: return false 28: end if 29: end if 30: end if 31: else 32: {M is infinite} 33: if M has zero divisors (see Section 3.4) then 34: return false 35: else 36: calculate Mθ 37: end if 38: T ← (Mθ )/(Mθ )∗f {see Section 4.3} 39: if p = char(k) > 0 and p | |(Mθ )∗f | then 40: return false 41: end if 42: if T is isomorphic to N or Z (see Section 3.2) then 43: next i 44: else 45: return false 46: end if 47: end if 48: end for 49: return true
18
References [1] I.M. Ara´ ujo and A. Solomon, Computing with semigroups in GAP—a tutorial, “Semigroups” (Braga, 1999), World Sci. Publishing, River Edge, NJ, 2000, 1–18. [2] T. Becker and V. Weispfenning, “Gr¨obner Bases, A Computational Approach to Commutative Algebra”, Springer-Verlag, New York, 1993. [3] C.M. Campbell, E.F. Robertson, N. Ruˇskuc and R.M. Thomas, Reidemeister-Schreier type rewriting for semigroups, Semigroup Forum 51 (1995), 47–62. [4] J. Cazaran and A.V. Kelarev, Generators and weights of polynomial codes, Arch. Math. (Basel) 69 (1997), 479–486. [5] F. Decruyenaere, E. Jespers and P. Wauters, On commutative principal ideal semigroup rings, Semigroup Forum 43 (1991), 367–377. [6] D.K. Faddeev, On the equivalence of systems of integral matrices, Izv. Akad. Nauk SSSR Ser. Mat. 30 (1966) 449–454. [7] The GAP Group, GAP – Groups, Algorithms and Programming, Version 4.2; http://www-gap.dcs.st-and.ac.uk/∼gap (Aachen, St Andrews, 2002). [8] P.A. Grillet, “Semigroups: an Introduction to the Structure Theory”, Marcel Dekker, New York, 1995. [9] E. Jespers, J. Okni´ nski, Semigroup algebras that are principal ideal rings, J. Algebra 183 (1996), 837–863. [10] A.V. Kelarev, “Ring Constructions and Applications”, World Scientific, 2002. [11] A.V. Kelarev, “Graph Algebras and Automata”, Marcel Dekker, 2003. [12] P. Landrock and O. Manz, Classical codes as ideals in group algebras, Des. Codes Cryptogr. 2 (1992), 273–285. [13] J. Okni´ nski, “Semigroup Algebras”, Marcel Dekker, New York, 1991. [14] J. S. Ponizovskii, Semigroup rings, Semigroup Forum 36 (1987), 1–46. [15] J.C. Rosales, P.A. Garc´ıa-S´anchez and J.I. Garc´ıa-Garc´ıa, Commutative ideal extensions of Abelian groups, Semigroup-Forum 62 (2001), 311–316.
19
[16] J.C. Rosales and P.A. Garc´ıa-S´anchez, “Finitely Generated Commutative Monoids”, Nova Science Publ., New York, 1999. [17] N. Ruˇskuc, Presentations for subgroups of monoids, J. Algebra 220 (1999)(1), 365-380. [18] C.C. Sims, “Computation with Finitely Presented Groups”, University Press, Cambridge, 1994. [19] M.A. Ta˘ıtslin, The isomorphism problem for commutative semigroups solved affirmatively, “Theory of Models and its Applications”, Kazakh. Gos. Univ., Alma-Ata, 1980, 75–81. [20] M.A. Ta˘ıtslin, The isomorphism problem for commutative semigroups, Mat. Sb. 93 (1974), 103–128.
20