Graver Bases and Universal Gr\"obner Bases for Linear Codes

Two correspondences have been provided that associate any linear code over a finite field with a binomial ideal. In this paper, algorithms for computing their Graver bases and universal Gr\"obner bases are given. To this end, a connection between these binomial ideals and toric ideals will be established.


Introduction
In applications requiring the reliable transmission of digital data over a noisy channel, the importance of error-correcting code is well established.Linear codes form a particularly nice instance of such codes since they are linear subspaces of finite-dimensional vector spaces over a finite field.Gröbner bases, on the other hand, have originally been introduced by Buchberger for the algorithmic solution of some fundamental problems in commutative algebra [4] and turned out to be a crucial concept for further advancements in the field of computer algebra.Recently, it has been emphasized that a linear code of a finite field with a prime number of elements can be described by a binomial ideal given as a sum of a toric ideal and a non-prime ideal [3,15] and thus a direct link between the two prospering subjects of linear codes and Gröbner bases was provided.This ideal will here be referred to as the code ideal.This approach has then been generalized in [12] to linear codes over of any finite field by providing yet another correspondence, which will here be referred to as the generalized code ideal.These correspondences provided new insights into the algebraic structure of linear codes [11] and allowed the application of slightly modified results from the rich theory of toric ideals [8].Notably, it yielded a complete decoding method using a particular Gröbner basis and so led to interest in computing the Gröbner basis w.r.t. a graded order [3,13].Particularly such an order, however, turned out to be costly to compute.An alternative, that is though not less costly, is to compute the universal Gröbner basis or even a the Graver basis, which is besides that also interesting since it holds the set of all minimal support codewords [11].In this paper, we will address the problem of computing the Graver basis and the universal Gröbner basis for the code ideal and the generalized code ideal.In particular, we will extend methods used for accomplishing this task for toric ideals as expounded in [17,Chapter 7] and provide a new method for computing the Graver basis for the (generalized) code ideal.The essential ideas for achieving this for the code ideal stem from [11,Remark 1 and 3].This paper is organized as follows.Section 2 introduces all required notions and definitions.In the second part of this section we define the code ideal and the generalized code ideal.In section 3 we show how both ideals can be computed from certain toric ideals by simply substituting several variables.The main results concerning the computation of the Graver basis are given in Section 4. Finally, in Section 5, we give an algorithm for computing the universal Gröbner basis from the Graver basis for the generalized code ideal similar to [17,Algorithm 7.6].Additionally, we provide a sufficent condition for primitive binomials not to belong to the universal Gröbner basis and show that in case of a finite field with characteristic two the universal Gröbner basis can directly be constructed from the Graver basis.

Toric Ideals, Gröbner Bases and Graver Bases
Write K[x] = K[x 1 , . . ., x n ] for the commutative polynomial ring in n indeterminates over an arbitrary field K and denote the monomials in K[x] by We assume familiarity with the basic definitions and notions of monomial orders and Gröbner bases as expounded for instance in [1,5].For a given ideal I ⊂ K[x] and a monomial order ≻ we shall denote the leading ideal of I w.r.t.≻ by lt ≻ (I) and the (uniquely determined) reduced Gröbner basis for I w.r.t.≻ by G ≻ (I).For a given ideal I only finitely many different reduced Gröbner bases exist and their union is called the universal Gröbner basis for I and will be denoted by U(I) [16,17,20].If for two different monomial orders ≻ and ≻ ′ holds lt ≻ (I) = lt ≻ ′ (I), then G ≻ (I) = G ≻ ′ (I) [9].Introducing the notion of weight vectors this result can be further generalized.For any ω ∈ R n and any polynomial f = c i x ui ∈ K[x] define the initial form lt ω (f ) to be the sum of all terms c i x ui in f such that the inner product ω • u i is maximal.For an ideal I define then its leading ideal associated to ω to be Note that unlike to leading ideals w.r.t. a monomial order this ideal is not necessarily generated by monomials.For a non-negative weight vector ω ∈ R n + and a monomial order ≻ the new term order ≻ ω is defined by ordering monomials first by their ω-degree and breaking ties with ≻, i.e., For is a polynomial consisting of two terms, i.e., a binomial is of the form c α x α − c β x β , where α, β ∈ N n 0 and c α , c β ∈ K are non-zero.A binomial is pure if the involved monomials are relatively prime.A binomial ideal is an ideal generated by binomials.
Toric ideals form a specific class of binomial ideals and can be defined in several ways.A particularly easy one is to define them by means of integer matrices.For a matrix A ∈ Z d×n denote the toric ideal associated to A as I A and define it as [2] Each element u ∈ Z n can be uniquely written as u = u + − u − where u + , u − have disjoint support and their entries are non-negative.Based on this, the toric ideal I A can also be expressed as [17] Another important fact about toric ideals is that [17] The binomials in the generating set (4) are pure, i.e., the greatest common divisor of the terms x u + and x u − in the binomial x u + − x u − is 1.Indeed, all binomials considered here will be pure and henceforth we will omit the preceding term pure.
A binomial The set of all primitive binomials in I A is denoted by Gr(A) and called the Graver basis.Extending these notions to binomial ideals, we denote the Graver basis of a binomial ideal I by Gr(I).In [17] it has been shown that for every matrix A ∈ Z d×n holds where U(A) = U(I A ).For any matrix A ∈ Z d×n the associated Lawrence lifting Λ(A) is defined to be There is a close relation between the toric ideals associated to A and Λ(A).To be more precise, if we consider I A as an ideal of K[x 1 , . . ., x n ] = K[x] and I Λ(A) as an ideal of K[x, y 1 , . . ., y n ] = K[x, y], then In [17] the author demonstrated how the Graver basis of I A can be computed from the ideal I Λ(A) , which drew on the result

Linear Codes and Binomials Ideals
Let F q denote the finite field with q elements.A linear code C of length n and dimension k over F q is the image of a one-to-one linear mapping from F k q to F n q .
Such a code C is called an [n, k] code whose elements are called codewords and in algebraic coding, the codewords are always written as row vectors.
A generator matrix for an [n, k] code C is a k × n matrix G over F q whose rows form a basis of C. A generator matrix in reduced echelon form G = (I k | M ), where I k denotes the k × k identity matrix, is said to be in standard form.
A parity check matrix H for an [n, k] code C is an (n − k) × n matrix over F q such that a word c ∈ F n q belongs to C if and only if cH T = 0 [10,19].The support of a word u ∈ F n , denoted by supp(u), is the subset of n = {1, . . ., n} given by all indices i ∈ n with u i = 0.
For a given [n, k] code C over a finite field F p , where p is a prime number, define in K[x] = K[x 1 , . . ., x n ] with K being an arbitrary field the associated code ideal as a sum of binomial ideals where and Note that unlike to toric ideals the exponent vectors in this case are interpreted as row vectors.Additionally, in terms of the ideal I p , the exponent of any monomial can be treated as a vector in F n p because for any 1 ≤ i ≤ n and 0 ≤ r ≤ p − 1, and thus by induction for any integer m ≥ 0, Although the code ideal is not toric, it resembles a toric ideal in some respects.Similar to toric ideals the code ideal is generated by pure binomials x u − x u ′ , where u − u ′ belongs to the kernel of H.The binomial x u − x u ′ ∈ I(C) is said to correspond to the codeword u − u ′ .However, note that in contrast to the integral case, there is no unique way of writing u = u + − u − .For example, the word (1, 1, 0) in F 3 2 can be written as (1, 1, 0) = (0, 1, 0) − (1, 0, 0) or (1, 1, 0) = (1, 0, 0) − (0, 1, 0).Thus, different binomials may correspond to the same codeword.Note that the reduced Gröbner basis w.r.t. the lexicographic (lex) ordering with x 1 ≻ x 2 ≻ . . .≻ x n can be directly read off from a generator matrix in standard form [14].More specifically, let G be a standard generator matrix for C with row vectors g i = e i − m i , where e i denotes the ith unit vector, 1 ≤ i ≤ k.Then the reduced Gröbner basis G ≻ (I(C)) w.r.t. the lex ordering is given by Another ideal associated to a linear code was provided in [12].Let C be an [n, k] code over the field F q with char (F q ) = p and [F q : F p ] = r and let α be a primitive element of F q , i.e., F q = 0, α, α 2 , . . ., α q−2 , α q−1 = 1 .The crossing map : F n q → Z n(q−1) is defined as a = (a 1 , . . ., a n ) = (α j1 , . . ., α jn ) → (e j1 , . . ., e jn ), where e i is the ith unit vector of length q − 1, 1 ≤ i ≤ q − 1, and each zero coordinate is mapped to the zero vector of length q − 1.The associated mapping : Z n(q−1) → F n q is given as Note that the mapping is the left inverse of the crossing map , i.e., • is the identity on F n q , but it is not the right inverse.Put x j = (x j1 , x j2 , . . ., x j,q−1 ), 1 ≤ j ≤ n, and x = (x 1 , . . ., x n ).Define the generalized code ideal associated to the code C as 3 Deriving Code Ideals from Toric Ideals In this section, the generalized code ideal I + (C) will be related to a toric ideal.
For the code ideal I(C) such a connection has already been shown [11,Remark 1].We recall the result for the code ideal.To this end, define for a prime number p and a matrix A ∈ F m×n p the extended integer matrix where △A is an integer m × n-matrix such that A = △A ⊗ Z F p .

Proposition 3.1 ([7]
).The code ideal I(C) associated to an [n, k] code C over F p with parity check matrix H ∈ F n−k×n p can be expressend as where I H(p) ⊂ K[x, y] is the toric ideal associated to the integer matrix H(p).
We will derive a result similar to this proposition.First we consider linear codes over prime fields.For a prime number p and a matrix H ∈ F m×n p define the extended integer matrix where △H is composed of n block matrices of size m × (p − 1), Remark 3.2.The matrix △H as defined above is not unique.However, the matrices △H j can always be chosen such that all their entries are taken from the set {0, 1, . . ., p − 1}.The matrix △H can be regarded a blown-up version of H whose column vectors have been extended by their α s -multiples for each 1 ≤ s ≤ p−1.The motivation behind this definition is to account for the crossing map : F n q → Z n(p−1) which maps α j1 , . . ., α jn to (e j1 , . . ., e jn ).To give an example, the monomial x i,j1 x i,j2 x i,j3 stands for the word α j1 + α j2 + α j3 e i .
Proposition 3.4.Let C be an [n, k] code over F p with parity check matrix H.The generalized code ideal I + (C) can obtained from the toric ideal I △H(p) as follows Proof.Since both ideals are binomials, it suffices to consider only binomials.For any a, b and a ′ , b ′ in Z n(p−1) the following are equivalent Note that Inserting the identity into eq.( 20) The generalized code ideal I + (C) is generated by We construct the matrix △H(3) according to ( 16)-( 18) and consider the toric ideal Obviously, this procedure cannot be applied directly to codes over F q with q = p r and r > 1 because calculations in this field does not amount to modulo calculations in Z.In order to obtain a result similar to Prop.3.4, however, we can exploit the fact that each element in F q can be written as a vector in F r p whose components can then be treated as elements in F p and thus allow modulo calculations.
Let F q be a finite field with char (F q ) = p and [F q : F p ] = r.For 1 ≤ i ≤ r denote by π i : F q → F p the projection F q ∋ α ℓ = r j=1 a j α j → a i ∈ F p (w.r.t. to the basis {α, . . ., α r−1 , α r = 1}) and let it act componentwise on vectors in F s q for s ∈ N. Clearly, a = r i=1 π i (a)α i for all a ∈ F q .For a prime power q = p r and a matrix H ∈ F m×n q define the extended matrix where △H is composed of n block matrices of size rm × (q − 1), such that and where π i acts componentwise for each 1 ≤ i ≤ r.
Remark 3.6.This definition (23)-( 25) is in accordance with ( 16)-( 18) since for r = 1 both coincide.The major difference between them is that here the matrix is blown-up w.r.t. the columns vectors as well as the row vectors.
Example 3.7.Let q = 9 = 3 2 and choose the root of x 2 + x + 2 to be the primitive element α (the resulting additive table and representation of the elements of F 9 as vectors in F 2 3 can be found in Table 1 in the appendix).Consider the matrix We construct the integer matrix △H(9) according to (23)-(25).To this end, we compute Hence, we obtain
Then for certain a ′ , b ′ ∈ Z n(q−1) holds But △H(c 1 , . . ., c n ) T ≡ 0 mod p holds if and only if for all 1 ≤ s ≤ r and 1 On the other hand, And this last expression vanishes if and only if equation ( 27) is true.
Example 3.9.Consider the [3,2] code C over F 4 with parity check matrix Take as the primitive element α the root of the binary polynomial Similar to the idea above we replace each entry h ij in the parity check matrix by the row vector h ij α, α 2 , α 3 and write the result in terms of the basis {1, α}, From this we construct The reduced Gröbner basis w.r.We substitute y → 1 and compute the reduced Gröbner basis of the resulting ideal 33 − 1 In order to see that this indeed coincides with the generalized code ideal I + (C), note that a generator matrix in standard form is given by G = α 3 0 α 2 0 α 3 α .

♦ 4 Computing the Graver Basis
In [11,Remark 3] it has been pointed out that the Graver basis for the code ideal can be computed as an elimination ideal of the Z-kernel of the matrix where H ⊗ Z F p is a parity check matrix for the corresponding code.Based on this idea we develop a method for computing the Graver basis for the code ideal different from the one proposed in [11].
Recall that for a Lawrence type matrix Λ(A) the following sets coincide [17] • the Graver basis • the universal Gröbner basis • the reduced Gröbner basis w.r.t.any monomial order and • any minimal generating set up to scalar multiples.
Together with (8) this result yields a method for computing the Graver basis of the toric ideal I A .The key point for the proof of the equality of the above sets is that every pure binomial in the toric ideal I Λ(A) is of the form x a y b − x b y a .

The Graver basis for the code ideal
For a matrix H ∈ Z m×n define the p-Lawrence lifting of H to be and consider the toric ideal I Λ(H)p in the ring K[x, y, z] where x = (x 1 , . . ., x n ), y = (y 1 , . . ., y n ), z = (z 1 , . . ., z m ).Furthermore, define the ideal Proposition 4.1.The ideal I Λ(H) is a binomial ideal and all pure binomials in I Λ(H) are of the form x u y v − x v y u , where u − v ∈ ker p (H).
Proof.If {g 1 , . . ., g k } is a generating set for I Λ(H)p , then clearly {g ′ 1 , . . ., g ′ k }, where g ′ i (x, y) = g i (x, y, 1) for 1 ≤ i ≤ k, generates the ideal I Λ(H) .Since I Λ(H)p is generated by binomials, so is I Λ(H) .In order to obtain the second claim, consider a binomial The following equivalencies hold, This gives the result.
Proposition 4.2.For a binomial ideal in K[x, y] in which every binomial is of the form x a y b − x b y a , the Graver basis, the universal Gröbner basis and the reduced Gröbner basis w.r.t.any monomial order coincide.
Proof.The Graver basis is a Gröbner basis w.r.t. to any monomial order because it contains the universal Gröbner basis.We fix an arbitrary monomial order and claim that it is also the reduced Gröbner basis.Indeed, if there were binomials x a y b − x b y a and x c y d − x d y c in Gr(I) with x a y b and x c y d being the leading terms and such that x a y b divides x c y d , then x b y a would divide x d y c , which is a contradiction to x a y b − x b y a being a primitive binomial.By the same argument no other term in a primitive binomial is divisible by a leading term of a primitive binomial.This proves the claim.Since G ≻ (I) = Gr(I) for any monomial order ≻, we see that the inclusions G ≻ (I) ⊆ U(I) ⊆ Gr(I) are in fact equalities.
Based on these results we give an algorithm for computing the Graver basis, which is summarized in Alg. 1.The correctness of this algorithm is a direct consequence of Prop.4.1 and 4.2 and the following connection between the Graver basis of the ideals I Λ(H) and I(C):

The Graver basis for the generalized code ideal
The connection of the generalized code ideal with a toric ideal (cf.Prop.3.4 and 3.8) allows us to derive a similar method for computing the Graver basis for the generalized code ideal.To this end, define the p-Lawrence lifting of △H(q) to be Λ (△H(q)) p = △H 0 pI rm I n(q−1) I n(q−1) 0 ∈ Z rm+n(q−1)×rm+2n(q−1) .(31) We consider the toric ideal I Λ(△H(q)) p associated to this matrix in the polynomial ring K[x 1 , . . ., x n , y 1 , . . ., y n , z 1 , z 2 , . . ., z rm ], where x i = (x i1 , x i2 , . . ., x i,q−1 ) and y i = (y i1 , y i2 , . . ., y i,q−1 ) for 1 ≤ i ≤ n and define the ideal Proposition 4.3.The ideal I Λ(△H(q)) is a binomial ideal and all pure binomials in this ideal are of the form x u y v − x v y u , where u − v ∈ ker q (H).
Proof.A pure binomial x u + y v + − x u − y v − belongs to the ideal I Λ(△H(q)) if and only if there exists a c ∈ Z rm such that (u, v, c) ∈ ker Z (Λ(H(q)) p ).By definition (31), (u, v, c) ∈ ker Z (Λ(H(q)) p ) is equivalent to Hence, the considered binomial is of the form x u + y u − − x u − y u + .In the proof of Prop.3.8 it has been shown that . And then again by Prop.3.8, the binomial x u + − x u − belongs to the generalized code ideal I + (C), where C is the linear code over F q with parity check matrix H.In other words, u − v ∈ ker q (H).Input: Matrix H ∈ F n−k×n q and a prime power p r = q Output: Graver basis for the generalized code ideal I + (C) associated to the [n, k] code C over F q with parity check matrix H 1: is given as 2 1 1 2 2 1 0 0 0 0 0 0 3 Then the toric ideal associated to this matrix can be computed via the elimination ideal

♦
The p-Lawrence lifting of △H(q) and Prop.4.3 suggest an algorithm for computing the Graver basis for the generalized code ideal, which is essentially the same as for the ordinary code ideal.This is given in Alg. 2.
Example 4.5.Revisit Ex. 3.9.We construct the matrix and computing the Graver basis for I + (C) according to Alg. 2 shows that it consists of 135 binomials.♦ Remark 4.6.If x u − x u ′ is a primitive binomial for a certain binomial ideal, then clearly x u ′ − x u is also primitive.The Graver basis provided by the Alg. 1 and 2, however, contains all primitive binomial only up to scalar multiples.In other words, it will contain either 5 Computing the Universal Gröbner Basis Lemma 5.1.Let I be a binomial ideal in K[x] and let x u − x u ′ be a binomial in I.If there is a binomial does not belong to any reduced Gröbner basis for I + (C).
Proof.Let ≻ be any monomial order and lt ≻ x u − x u ′ = x u .Let x v − x v ′ be a binomial in I such that both terms divide x u .Either x v or x v ′ is the leading monomial w.r.t.≻.But as both are proper divisors of x u , x u − x u ′ cannot belong to the reduced Gröbner basis w.r.t.≻.Analogously, let x v − x v ′ be a binomial in I such that both terms divide x u ′ .By the same argument as above, x u ′ cannot be a standard monomial w.r.t.≻.
Then the first case applies and x u − x u ′ cannot belong to the reduced Gröbner basis w.r.t.≻.
Proposition 5.2.The universal Gröbner basis for the generalized code ideal associated to a linear code over a finite field with characteristic two consists of exactly all those primitive binomials whose involved terms are both unequal to 1 with the exception of the binomials of the form x 2 ij − 1.
Proof.Let C be a [n, k] code over a field F q with characteristic 2. Note that all binomials can be considered squarefree because be a primitive binomial.Let x ij be a divisor of x c and write ij − 1 and we see that x c ′ − x ij belongs to I + (C).But as x c ′ and x ij are both proper divisor of x c , the binomial x c − 1 cannot belong to the universal Gröbner basis according to Lem. 5.1.Let x u −x u ′ ∈ I + (C) be a primitive binomial with u, u ′ = 0 and put deg(x u ) =: s and deg(x u ′ ) =: t and assume that s ≥ t (see Prop. 5.10).Assume this binomial does not belong to the universal Gröbner basis and hence not to any reduced Gröbner basis.Let ≻ be a monomial order that orders and that compares the monomials in {x ij | ij ∈ supp(u) ∪ supp(u ′ )} by their ω-degree, where ω ij = 1 for ij ∈ supp(u) and ω ij = s−1 t for ij ∈ supp(u ′ ).For this order, Since the considered binomial lies in the ideal I + (C) it must be reduced to zero on division by the reduced Gröbner basis G ≻ (I(C)) w.r.t.≻ and so there must be a pure binomial x v − x v ′ ∈ G ≻ (I(C)) such that x v | x u and whose leading term w.r.t.≻ is x v .Clearly, supp(v) ∩ supp(v ′ ) = ∅ and supp(v) ⊂ supp(u) and by the chosen monomial order, supp(v ′ ) ⊆ supp(u) ∪ supp(u ′ ).But supp(v ′ ) ⊂ supp(u ′ ) since this would contradict the primitiveness of the binomial x u − x u ′ .Additionally, supp(v ′ ) ⊂ supp(u) because otherwise the binomial would also contradict the primitiveness.In other words, the monomial x v ′ must involve variables from x u as well as ) is a partition of supp(u)∪supp(u ′ ).Indeed, write x v ′ as a product of monomials x u1 and x u2 such that supp(u 1 ) ⊂ supp(u), supp(u 2 ) ⊂ supp(u ′ ).Then x u1 (x v − x u1+u2 ) ≡ x u1+v − x u2 mod I + (C) belongs to I + (C) and x u1+v | x u and x u2 | x u ′ .Since the binomial x u − x u ′ is primitive, this is a contradiction unless x u1+v = x u and x u2 = x u ′ .This proves the claim.On the whole, Since deg(x u ) = s there must be an integer i ≥ 1 such that deg(x u1 ) = s − i and deg(x u2 ) = i.But then shows that lt ≻ (x v − x v ′ ) = x v ′ , which is a contradiction.Hence, the binomial x u − x u ′ has to belong to the universal Gröbner basis.

♦
For a linear code over a finite field with characteristic 2, Prop.5.2 provides an easy way to obtain the universal Gröbner from the Graver basis for the associated generalized code ideal.For a finite field with characteristic greater than 2 this does not apply.Fortunately, the same method as in [17] for computing the universal Gröbner basis of a toric ideal from its Graver basis can be applied to code ideals.To this end, for a given non-negative weight vector ω ∈ R n(q−1) + and an ideal I, denote by G ω (I) the reduced Gröbner basis for I w.r.t.≻ ω , where ≻ is any fixed tie breaking monomial order.For u, u ′ ∈ N n(q−1) 0 define the cone Remark 5.4.The cone C[u, u ′ ] defined in (33) is essentially the same as in [17].
Here, however, we restricted it to the positive orthant since this is sufficient for our purposes.
Suppose x u − x u ′ belongs to the universal Gröbner basis of I + (C).Then there is a monomial order ≻ such that x u − x u ′ ∈ G ≻ (I + (C)) with x u being the leading monomial and thus x u ′ being a standard monomial.According to Lem. 5.5 one can find a weight vector ω ∈ R n(q−1) For u ∈ N n(q−1) 0 and a linear code C define the set as well as the set For a proof see [17].In [17] the author pointed out that the set M(v) can be computed from the Graver basis.To see this, note that ω ∈ M(u) implies and hence, we see that a monomial x u does not belong to the leading ideal lt ω (I + (C)) if and only if for every primitive binomial is open, we see that M(u) is described by all such strict inequalities.This yields the following alternative description of the set M(v) Similar to [17, Corollary 7.9, Proof of Theorem 7.8] we show that if x u − x u ′ belongs to the universal Gröbner basis for I + (C), then so does x u ′ −x u .Although this is true for toric ideals and binomial ideals associated to integer lattice [17,18], it does not hold for binomial ideals in general as the following example demonstrates.
Example 5.8.Consider the binomial ideal The reduced Gröbner basis w.r.t. the lex order with x ≻ y is given by the set {xy − y 2 , x 2 − y 2 }.Hence, xy − y 2 with belongs to the universal Gröbner basis of I. Suppose y 2 − xy also belongs to the universal Gröbner basis and thus to some reduced Gröbner basis G ≻ (I) with y 2 ≻ xy.Pick any weight vector ω = (ω 1 , ω 2 ) ∈ R 2 + that represents ≻.Clearly, ω 2 > ω 1 and thus, xy ≻ x 2 .But as xy − x 2 ∈ I, xy cannot be a standard monomial, which is a contradiction to our assumption that y 2 − xy belongs to any reduced Gröbner basis.♦ Lemma 5.9.A primitive binomial x u − x u ′ in I + (C) belongs to the universal Gröbner basis if there is a non-negative vector ω ∈ R n(q−1) Proof.Suppose such a vector ω ∈ R n(q−1) + exists.Claim that ω ∈ ij∈supp(u) M(u − e ij ).Indeed, if for any ij ∈ supp(u), ω / ∈ M(u − e ij ), then there has to be a v ∈ Co(u − e ij ) \ {u − e ij } such that ω • (u − e ij ) ≥ ω • v.This implies which is clearly a contradiction.This proves the claim.If additionally ω • u ′ < ω • u, then by (35), ω ∈ M(u ′ ) and the result then follows by Prop.5.6 and by Lem.5.7.Finally, we consider the case ω • u ′ = ω • u.Let ≻ be any monomial order such that {x ij | ij ∈ supp(u)} ≻ {x ij | ij ∈ supp(u ′ )}.Then x u ≻ ω x u ′ and by the above argument x u is a minimal generator in lt ≻ω (I + (C)).Hence, if x u ′ is a standard monomial w.r.t.≻ ω , then x u − x u ′ ∈ G ≻ω (I + (C)).And since ω • u ′ < ω • v for all v ∈ Co(u) \ {u, u ′ }, the monomial x u ′ is standard.Proposition 5.10.If the binomial x u − x u ′ with u, u ′ = 0 belongs to the universal Gröbner basis for a generalized code ideal, then the binomial x u ′ − x u also belongs to the universal Gröbner basis.
Alg. 3 provides a method for computing the universal Gröbner basis of a generalized code ideal from its Graver basis based on the similar algorithm for toric ideals [17,Algorithm 7.6].The correctness of Alg. 3 follows from Prop.5.6, Lem.5.7 and eq.( 38).The proposed algorithm makes use of the following subroutines: • swap(a, b) swaps the values of the variables a and b.
• addRow(A, a) applied to an integer matrix A ∈ Z m,n and a row vector a ∈ Z m returns the matrix A extended by a.
yields H (a − b) T = 0.So we see that (a − b) ∈ C and thus, x a − x b ∈ I + (C).Conversely, let x a − x b ∈ I + (C).By the same arguments as above we conclude that there must be a c ∈ Z n−k such that △H(a − b) T = pc T .And then the binomial x a y c + − x b y c − belongs to I △H(p) .Example 3.5.Consider the [4, 2] code C over F 3 (with primitive element α = 2) with generator and parity check matrices