Gr\"obner-Shirshov bases and their calculation

In this survey, we formulate the Gr\"{o}bner-Shirshov bases theory for associative algebras and Lie algebras. Some new Composition-Diamond lemmas and applications are mentioned.


Introduction
In this survey we review the method of Gröbner-Shirshov 1 (GS for short) bases for different classes of linear universal algebras, together with an overview of calculation of these bases in a variety of specific cases.
A. I. Shirshov (also spelled A. I.Širšov) in his pioneering work ( [207], 1962) posed the following fundamental question: How to find a linear basis of a Lie algebra defined by generators and relations?
He gave an infinite algorithm to solve this problem using a new notion of the composition (later the 's-polynomial' in Buchberger's terminology [65,66]) of two Lie polynomials and a new notion of completion of a set of Lie polynomials (adding nontrivial compositions; the critical pair/completion (cpc-) algorithm in the later terminology of Knuth and Bendix [138] and Buchberger [67,68]).
Shirshov's algorithm goes as follows. Consider a set S ⊂ Lie(X) of Lie polynomials in the free algebra k X on X over a field k (the algebra of non-commutative polynomials on X over k). Denote by S ′ the superset of S obtained by adding all non-trivial Lie compositions ('Lie s-polynomials') of the elements of S. The problem of triviality of a Lie polynomial modulo a finite (or recursive) set S can be solved algorithmically using Shirshov's Lie reduction algorithm from his previous paper [203], 1958. In general, an infinite sequence S ⊆ S ′ ⊆ S ′′ ⊆ · · · ⊆ S (n) ⊆ . . . of Lie multi-compositions arises. The union S c of this sequence has the property that every Lie composition of elements of S c is trivial modulo S c . This is what is now called a Lie GS basis.
Then a new 'Composition-Diamond lemma 2 for Lie algebras' (Lemma 3 in [207]) implies that the set Irr(S c ) of all S c -irreducible (or S c -reduced) basic Lie monomials [u] in X is a linear basis of the Lie algebra Lie(X|S) generated by X with defining relations S. Here a basic Lie monomial means a Lie monomial in a special linear basis of the free Lie algebra Lie(X) ⊂ k X , known as the Lyndon-Shirshov (LS for short) basis (Shirshov [207] and Chen-Fox-Lyndon [72], see below). An LS monomial [u] is called S cirreducible (or S c -reduced) whenever u, the associative support of [u], avoids the words for all s ∈ S, wheres is the maximal word of s as an associative polynomial (in the deg-lex ordering). To be more precise, Shirshov used his reduction algorithm at each step S, S ′ , S ′′ , . . . . Then we have a direct system S → S ′ → S ′′ → . . . and S c = lim −→ S (n) is what is now called a minimal GS basis (a minimal GS basis is not unique, but a reduced GS basis is, see below). As a result, Shirshov's algorithm gives a solution to the above problem for Lie algebras.
Shirshov's algorithm, dealing with the word problem, is an infinite algorithm like the Knuth-Bendix algorithm [138], 1970 dealing with the identity problem for every variety of universal algebras 3 . The initial data for the Knuth-Bendix algorithm is the defining identities of a variety. The output of the algorithm, if any, is a 'Knuth-Bendix basis' of identities of the variety in the class of all universal algebras of a given signature (not a GS basis of defining relations, say, of a Lie algebra).
Shirshov's algorithm gives linear bases and algorithmic decidability of the word problem for one-relation Lie algebras [207], (recursive) linear bases for Lie algebras with (finite) homogeneous defining relations [207], and linear bases for free products of Lie algebras with known linear bases [208]. He also proved the Freiheitssatz (freeness theorem) for Lie algebras [207] (for every one-relation Lie algebra Lie(X|f ), the subalgebra X\{x i 0 } , where x i 0 appears in f , is a free Lie algebra). The Shirshov problem [207] of the decidability of the word problem for Lie algebras was solved negatively in [21]. More generally, it was proved [21] that some recursively presented Lie algebras with undecidable word problem can be embedded into finitely presented Lie algebras (with undecidable word problem). It is a weak analogue of the Higman embedding theorem for groups [115]. The problem [21] whether an analogue of the Higman embedding theorem is valid for Lie algebras is still open. For associative algebras a similar problem [21] was solved positively by V. Y. Belyaev [10]. A simple example of a Lie algebra with undecidable word problem was given by G. P. Kukin [142].
Actually, a similar algorithm for associative algebras is implicit in Shirshov's paper [207]. The reason is that he treats Lie(X) as the subspace of Lie polynomials in the free associative algebra k X . Then to define a Lie composition f, g w of two Lie polynomials relative to an associative word w = lcm(f ,ḡ), he defines firstly the associative composition (noncommutative 's-polynomial') (f, g) w = f b − ag, with a, b ∈ X * . Then he inserts some brackets f, g w = [f b]f − [ag]ḡ by applying his special bracketing lemma of [203]. We can obtain S c for every S ⊂ k X in the same way as for Lie polynomials and in the same way as for Lie algebras ('CD-lemma for associative algebras') to infer that Irr(S c ) is a linear basis of the associative algebra k X|S generated by X with defining relations S. All proofs are similar to those in [207] but much easier.
Moreover, the cases of semigroups and groups presented by generators and defining relations are just special cases of associative algebras via semigroup and group algebras. To summarize, Shirshov's algorithm gives linear bases and normal forms of elements of every Lie algebra, associative algebra, semigroup or group presented by generators and defining relations! The algorithm works in many cases (see below).
The theory of Gröbner bases and Buchberger's algorithm were initiated by B. Buchberger (Thesis [65] 1965, paper [66] 1970) for commutative associative algebras. Buchberger's algorithm is a finite algorithm for finitely generated commutative algebras. It is one of the most useful and famous algorithms in modern computer science.
Shirshov's paper [207] was in the spirit of the program of A. G. Kurosh (1908Kurosh ( -1972 to study non-associative (relatively) free algebras and free products of algebras, initiated in Kurosh's paper [143], 1947. In that paper he proved non-associative analogs of the Nielsen-Schreier and Kurosh theorems for groups. It took quite a few years to clarify the situation for Lie algebras in Shirshov's papers [200], 1953 and [207], 1962 closely related to his theory of GS bases. It is important to note that Kurosh's program quite unexpectedly led to Shirshov's theory of GS bases for Lie and associative algebras [207].
A step in Kurosh's program was made by his student A. I. Zhukov in his Ph.D. Thesis [226], 1950. He algorithmically solved the word problem for non-associative algebras. In a sense, it was the beginning of the theory of GS bases for non-associative algebras. The main difference with the future approach of Shirshov is that Zhukov did not use a linear ordering of nonassociative monomials. Instead he chose an arbirary monomial of maximal degree as the 'leading' monomial of a polynomial. Also, for non-associative algebras there is no 'composition of intersection' ('s-polynomial'). In this sense it cannot be a model for Lie and associative algebras 4 .
A. I. Shirshov, also a student of Kurosh's, defended his Candidate of Sciences Thesis [199] at Moscow State University in 1953. His thesis together with the paper that followed [203], 1958 may be viewed as a background for his later method of GS bases. In the thesis, he proved the free subalgebra theorem for free Lie algebras (now known as Shirshov-Witt theorem, see also Witt [218], 1956) using the elimination process rediscovered by Lazard [150], 1960. He used the elimination process later [203], 1958 as a general method to prove the properties of regular (LS) words, including an algorithm of (special) bracketing of an LS word (with a fixed LS subword). The latter algorithm is of some importance in his theory of GS bases for Lie algebras (particularly in the definition of the composition of two Lie polynomials).
However, instead of ordering by the degree function (Hall words), he used an arbirary linear ordering of non-associative monomials satisfying ((u)(v)) > (v).
For example, in his Thesis [199], 1953 he used the ordering by the content of monomials (the content of, say, the monomial (u) = ((x 2 x 1 )((x 2 x 1 )x 1 )) is the vector (x 2 , x 2 , x 1 , x 1 , x 1 )). Actually, the content u of (u) may be viewed as a commutative associative word that equals u in the free commutative semigroup. Two contents are compared lexicographically (a proper prefix of a content is greater than the content). 5 It must be pointed out that A. I. Malcev ) inspired Shirshov's works very much. Malcev was an official opponent (referee) of his (second) Doctor of Sciences Dissertation at MSU in 1958. The first author, L. A. Bokut, remembers this event at the Science Council Meeting, chaired by A. N. Kolmogorov, and Malcev's words "Shirshov's dissertation is a brilliant one!". Malcev and Shirshov worked together at the present Sobolev Institute of Mathematics in Novosibirsk since 1959 until Malcev's sudden death at 1967, and have been friends despite the age difference. Malcev headed the Algebra and Logic Department (by the way, the first author is a member of the departement since 1960) and Shirshov was the first deputy director of the institute (whose director was S. L. Sobolev). In those years, Malcev was interested in the theory of algorithms of mathematical logic and algorithmic problems of model theory. Thus, Shirshov had an additional motivation to work on algorithmic problems for Lie algebras. Both Maltsev and Kurosh were delighted with Shirshov's results of [207]. Malcev successfully nominated the paper for an award of the Presidium of the Siberian Branch of the Academy of Sciences (Sobolev and Malcev were the only Presidium members from the Institute of Mathematics at the time).
If we use the lexicographic ordering, (u) ≻ (v) if u ≻ v lexicographically (with the condition u ≻ uv, v = 1), then we obtain the LS basis. 6 For example, for the alphabet x 1 , x 2 with x 2 ≻ x 1 we obtain basic Lyndon-Shirshov monomials by induction: and so on. They are exactly all Shirshov regular (LS) Lie monomials and their associative supports are exactly all Shirshov regular words with a oneto-one correspondence between two sets given by the Shirshov elimination (bracketing) algorithm for (associative) words.
Let us recall that an elementary step of Shirshov's elimination algorithm is to join the minimal letter of a word to previous ones by bracketing and to continue this process with the lexicographic ordering of the new alphabet. For example, suppose that x 2 ≻ x 1 . Then we have the succession of bracketings By the way, the second series of partial bracketings illustrates Shirshov's factorization theorem [203] of 1958 that every word is a non-decreasing product of LS words (it is often mistakenly called Lyndon's theorem, see [12]).
The Shirshov special bracketing [203] goes as follows. Let us give as an example the special bracketing of the LS word w = x 2 The Shirshov special bracketing is In general, if w = aub then the Shirshov standard bracketing gives [w] = [a[uc]d], where b = cd. Now, c = c 1 · · · c t , each c i is an LS-word, and c 1 · · · c t in the lex ordering (Shirshov's factorization theorem). Then we must change the bracketing of [uc]: The main property of [w] u is that [w] u is a monic associative polynomial with the maximal monomial w; hence, [w] u = w.
Actually, Shirshov [207], 1962 needed a 'double' relative bracketing of a regular word with two disjoint LS subwords. Then he implicitly used the following property: every LS subword of c = c 1 · · · c t as above is a subword of some c i for 1 ≤ i ≤ t.
Once again, if we formally omit all Lie brackets in Shirshov's paper [207] then essentially the same algorithm and essentially the same CD-lemma (with the same but much simpler proof) yield a linear basis for associative algebra presented by generators and defining relations. The differences are the following: • no need to use LS monomials and LS words, since the set X * is a linear basis of the free associative algebra k X ; • the definition of associative composition for monic polynomials f and g, are much simpler than the definition of Lie composition for monic Lie polynomials f and g, • The definition of elimination of the leading words of an associative monic polynomial s is straightforward: asb → a(r s )b whenever s = s − r s and a, b ∈ X * . However, for Lie polynomials, it is much more involved and uses the Shirshov special bracketing: We can formulate the main idea of Shirshov's proof as follows. Consider a complete set S of monic Lie polynomials (all compositions are trivial). If w = a 1s1 b 1 = a 2s2 b 2 , where w, a i , b i ∈ X * and w is an LS word, while s 1 , s 2 ∈ S, then the Lie monomials [a 1 s 1 b 1 ] s 1 and [a 2 s 2 b 2 ] s 2 are equal modulo the smaller Lie monomials in Id(S): where α i ∈ k, s i ∈ S and (a i s i b i ) = a isi b i < w. Below we call a Lie polynomial (asb) a Lie normal S-word provided that (asb) = asb. This is precisely where he used the notion of composition and other notions and properties mentioned above.
It is much easier to prove an analogue of this property for associative algebras (as well as commutative associative algebras): given a complete monic set S in k X (k[X]), for w = a 1s1 b 1 = a 2s2 b 2 with a i , b i ∈ X * and s 1 , s 2 ∈ S we have Summarizing, we can say with confidence that the work (Shirshov [207]) implicitly contains the CD-lemma for associative algebras as a simple exercise that requires no new ideas. The first author, L. A. Bokut, can confirm that Shirshov clearly understood this and told him that "the case of associative algebras is the same". The lemma was formulated explicitly in Bokut [22], 1976 (with a reference to Shirshov's paper [207]), Bergman [11], 1978, and Mora [171], 1986.
Let us emphasize once again that the CD-Lemma for associative algebras applies to every semigroup P = sgp X|S , and in particular to every group, by way of the semigroup algebra kP over a field k. The latter algebra has the same generators and defining relations as P , or kP = k X|S . Every composition of the binomials u 1 − v 1 and u 2 − v 2 is a binomial u − v. As a result, applying Shirshov's algorithm to a set of semigroup relations S gives rise to a complete set of semigroup relations S c . The S c -irreducible words in X constitute the set of normal forms of the elements of P .
Before we go any further, let us give some well-known examples of algebra, group, and semigroup presentations by generators and defining relations together with linear bases, normal forms, and GS bases for them (if known). Consider a field k and a commutative ring or commutative k-algebra K.
• The Grassman algebra over K is The set of defining relations is a GS basis with respect to the deg-lex ordering. A K-basis is • The Clifford algebra over K is where (a ij ) is an n × n symmetric matrix over K. The set of defining relations is a GS basis with respect to the deg-lex ordering. A K-basis is {x i 1 · · · x in |x i j ∈ X, j = 1, . . . , n, n ≥ 0, i 1 < · · · < i n }.
• The universal enveloping algebra of a Lie algebra L is If L is a free K-module with a well-ordered K-basis then the set of defining relations is a GS basis of U K (L). The PBW theorem follows: U K (L) is a free K-module with a K-basis, as for polynomials, . . , n, n ≥ 0}.
• A. Kandri-Rody and V. Weispfenning [122] invented an important class of (noncommutative polynomial) 'algebras of solvable type', which includes universal enveloping algebras. An algebra of solvable type is Here p ij is a noncommutative polynomial with all terms less than x i x j . They created a theory of GS bases for every algebra of this class; thus, they found a linear basis of every quotient of R.
• A general presentation U k (L) = k X|S (−) of a universal enveloping algebra over a field k, where L = Lie(X|S) with S ⊂ Lie(X) ⊂ k X and S (−) is S as a set of associative polynomials. The PBW theorem in a form of Shirshov's theorem. The following conditions are equivalent: (i) the set S is a Lie GS basis; (ii) the set S (−) is a GS basis for k X ; (iii) a linear basis for U k (L) consists of words u 1 u 2 · · · u n , where u i are S-irreducible LS words with u 1 u 2 · · · u n (in the lexordering) 7 , see [56,57]; (iv) a linear basis for L consists of the S-irreducible LS Lie monomials [u] in X; (v) a linear basis for U k (L) consists of the polynomials u = [u 1 ] · · · [u n ], where u 1 · · · u n in the lex ordering, n ≥ 0, and each [u i ] is an S-irreducible non-associative LS word in X.
• Free Lie algebras Lie K (X) over K. M. Hall, A. I. Shirshov, and R. Lyndon provided different linear K-bases for a free Lie algebra (the Hall-Shirshov series of bases, in particular, the Hall basis, the Lyndon-Shirshov basis, the basis compatible with the free solvable (polynilpotent) Lie algebra) [194], see also [15]. Two anticommutative GS bases of Lie K (X) were found in [34,37], which yields the Hall and Lyndon-Shirshov linear bases respectively.
• The Lie k-algebras presented by Chevalley generators and defining relations of types A n , B n , C n , D n , G 2 , F 4 , E 6 , E 7 , and E 8 . Serre's theorem provides linear bases and multiplication tables for these algebras (they are finite dimensional simple Lie algebras over k). Lie GS bases for these algebras are found in [49,50,51].
• The Coxeter group for a given Coxeter matrix M = (m ij ). J. Tits [210] (see also [14]) algorithmically solved the word problem for Coxeter groups. Finite Coxeter groups are presented by 'finite' Coxeter matrices A n , B n , D n , G 2 , F 4 , E 6 , E 7 , E 8 , H 3 , and H 4 . Coxeter's theorem provides normal forms and Cayley tables (these are finite groups generated by reflections). GS bases for finite Coxeter groups are found in [58].
• The Iwahory-Hecke (Hecke) algebras H over K differ from the group algebras K(W ) of Coxeter groups in that instead of Two K-bases for H are known; one is natural, and the other is the Kazhdan-Lusztig canonical basis [155]. The GS bases for the Iwahory-Hecke algebras are known for the finite Coxeter matrices. A deep connection of the Iwahory-Hecke algebras of type A n and braid groups (as well as link invariants) was found by V. F. R. Jones [116].
• Affine Kac-Moody algebras [117]. The Kac-Gabber theorem provides linear bases for these algebras under the symmetrizability condition on the Cartan matrix. Using this result, E. N. Poroshenko found the GS bases of these algebras [178,179,180].
• Elliptic algebras (B. Feigin, A. Odesskii) These are associative algebras presented by n generators and n(n − 1)/2 homogeneous quadratic relations for which the dimensions of the graded components are the same as for the polynomial algebra in n variables. The first example of this type was Sklyanin algebra (1982) generated by x 1 , x 2 , and x 3 with the defining relations [x 3 , [175]. GS bases are not known.
• Leavitt path algebras. GS bases for these algebras are found in A. Alahmedi et al [2] and applied by the same authors to determine the structure of the Leavitt path algebras of polynomial growth in [3].
• Artin braid group Br n . The Markov-Artin theorem provides the normal form and semi-direct structure of the group in the Burau generators. Other normal forms of Br n were obtained by Garside, Birman-Ko-Lee, and Adjan-Thurston. GS bases for Br n in the Artin-Burau, Artin-Garside, Birman-Ko-Lee, and Adjan-Thurston generators were found in [23,24,25,89] respectively.
• Artin-Tits groups. They differ from Coxeter groups in the absence of the relations s 2 i = 1. Normal forms are known in the spherical case, see E. Brieskorn, K. Saito [64]. GS bases are not known except for braid groups (the Artin-Tits groups of type A n ).
• Markov's construction of semigroups with unsolvable isomorphism problem and Markov properties. The GS basis for the construction is not known.
• Plactic monoids. A theorem due to Richardson, Schensted, and Knuth provides a normal form of the elements of these monoids (see M. Lothaire [152]). New approaches to plactic monoids via GS bases in the alphabets of row and column generators are found in [29].
• The groups of quotients of the multiplicative semigroups of power series rings with topological quadratic relations of the type k x, y, z, t|xy = zt embeddable (without the zero element) into groups but in general not embeddable into division algebras (settling a problem of Malcev). The relative standard normal forms of these groups found in [19,20] are the reduced words for what was later called a relative GS basis [59].
At the heart of the GS method for a class of linear algebras lies a CDlemma for a free object of the class. For the cases above, the free objects are the free associative algebra k X , the doubly free associative k[Y ]-algebra k[Y ] X , the free Lie algebra Lie(X), and the doubly free Lie k[Y ]-algebra Lie k[Y ] (X). For the tensor product of two associative algebras we need to use the tensor product of two free algebras, k X ⊗ k Y . We can view every semiring as a double semigroup with two associative products · and •. So, the CD-lemma for semirings is the CD-lemma for the semiring algebra of the free semiring Rig(X). The CD-lemma for modules is the CD-lemma for the doubly free module Mod k Y (X), a free module over a free associative algebra. The CD-lemma for small categories is the CD-lemma for the 'free partial kalgebra' kC X generated by an oriented graph X (a sequence z 1 z 2 · · · z n , where z i ∈ X, is a partial word in X iff it is a path; a partial polynomial is a linear combination of partial words with the same source and target).
All CD-lemmas have essentially the same statement. Consider a class V of linear universal algebras, a free algebra V(X) in V, and a well-ordered k-basis of terms N(X) of V(X). A subset S ⊂ V(X) is called a GS basis if every composition of the elements of S is trivial (vanishes upon the elimination of the leading termss for s ∈ S). Then the following conditions are equivalent: (ii) If f ∈ Id(S) then the leading termf contains the subterms for some s ∈ S.
(iii) The set of S-irreducible terms is a linear basis for the V-algebra V X|S generated by X with defining relations S.
In some cases ((n−) conformal algebras, dialgebras), conditions (i) and (ii) are not equivalent. To be more precise, in those cases we have (i) ⇒ (ii) ⇔ (iii).
Typical compositions are compositions of intersection and inclusion. Shirshov [206,207] avoided inclusion composition. He suggested instead that a GS basis must be minimal (the leading words do not contain each other as subwords). In some cases, new compositions must be defined, for example, the composition of left (right) multiplication. Also, sometimes we need to combine all these compositions. We present here a new approach to the definition of a composition, based on the concept of the least common multiple lcm(u, v) of two terms u and v.
Almost all CD-lemmas require the new notion of a 'normal S-term'. A term (asb) in {X, Ω}, where s ∈ S, with only one occurrence of s is called a normal S-term whenever (asb) = (a(s)b). Given S ⊂ k X , every S-word (that is, an S-term) is a normal S-word. Given S ⊂ Lie(X), every Lie S-monomial (Lie S-term) is a linear combination of normal Lie S-terms (Shirshov [207]).
One of the two key lemmas asserts that if S is complete under compositions of multiplication then every element of the ideal generated by S is a linear combination of normal S-terms. Another key lemma says that if S is a GS basis and the leading words of two normal S-terms are the same then these terms are the same modulo lower normal S-terms. As we mentioned above, Shirshov proved these results [207] for Lie(X) (there are no compositions of multiplication for Lie and associative algebras).
The paper is organized as follows. Section 2 is for associative algebras, Section 3 is for semigroups and groups, Section 4 is for Lie algebras, and the short Section 5 is for Ω-algebras and operads 8 .
To conclude this introduction, we give some information about the work of Shirshov; for more on this, see the book [209]. A. I. Shirshov (1921Shirshov ( -1981) was a famous Russian mathematician. His name is associated with notions and results on the Gröbner-Shirshov bases, the Composition-Diamond lemma, the Shirshov-Witt theorem, the Lazard-Shirshov elimination, the Shirshov height theorem, Lyndon-Shirshov words, Lyndon-Shirshov basis (in a free Lie algebra), the Hall-Shirshov series of bases, the Cohn-Shirshov theorem for Jordan algebras, Shirshov's theorem on the Kurosh problem, and the Shirshov factorization theorem. Shirshov's ideas were used by his students Efim Zelmanov to solve the restricted Burnside problem and Aleksander Kemer to solve the Specht problem.
We thank P. S. Kolesnikov, Yongshan Chen and Yu Li for valuable comments and help in writing some parts of the survey.

Digression on the history of Lyndon-Shirshov bases and Lyndon-Shirshov words
Lyndon [156], 1954, defined standard words, which are the same as Shirshov's regular words [203], 1958. Unfortunately, the papers (Lyndon [156]) and (Chen-Fox-Lyndon [72], 1958) were practically unknown before 1983. As a result, at that time almost all authors (except four who used the names Shirshov and Chen-Fox-Lyndon, see below) refer to the basis and words as Shirshov regular basis and words, cf. for instance [8,9,96,188,212,224]. To the best of our knowledge, none of the authors mentioned Lyndon's paper [156] as a source of 'Lyndon words' before 1983(!). In the following papers the authors mentioned both (Chen-Fox-Lyndon [72]) and (Shirshov [203]) as a source of 'Lyndon-Shirshov basis' and 'Lyndon-Shirshov words': 8 The first definitions of the symmetric operad were given by A. G. Kurosh's student V. A. Artamonov under the name 'clone of multilinear operations' in 1969, see A. G. Kurosh [144] and V. A. Artamonov [4], cf. J. Lambek (1969) [146] and P. May (1972) [162].

Gröbner-Shirshov bases for associative algebras
In this section we give a proof of Shirshov's CD-lemma for associative algebras and Buchberger's theorem for commutative algebras. Also, we give the Eisenbud-Peeva-Sturmfels lifting theorem, the CD-lemmas for modules (following S.-J. Kang and K.-H. Lee [124] and E. S. Chibrikov [90]), the PBW theorem and the PBW theorem in Shirshov's form, the CD-lemma for categories, the CD-lemma for associative algebras over commutative algebras and the Rosso-Yamane theorem for U q (A n ).

Composition-Diamond lemma for associative algebras
Let k be a field, k X be the free associative algebra over k generated by X and X * be the free monoid generated by X, where the empty word is the identity, denoted by 1. Denote the length (degree) of a word w ∈ X * by |w| 9 From [12]: "A famous theorem concerning Lyndon words asserts that any word w can be factorized in a unique way as a non-increasing product of Lyndon words, i.e. written w = x 1 x 2 . . . x n with x 1 ≥ x 2 ≥ · · · ≥ x n . This theorem has imprecise origin. It is usually credited to Chen-Fox-Lyndon, following the paper of Schützenberger [197] in which it appears as an example of factorization of free monoids. Actually, as pointed out to one of us by D. Knuth in 2004, the reference [72] does not contain explicitly this statement." or deg(w). Suppose that X * is a well-ordered set. Take f ∈ k X with the leading wordf and f = αf − r f , where 0 = α ∈ k and r f <f . We call f monic if α = 1.
A well-ordering > on X * is called a monomial ordering whenever it is compatible with the multiplication of words, that is, for all u, v ∈ X * we have A standard example of monomial ordering on X * is the deg-lex ordering, in which two words are compared first by the degree and then lexicographically, where X is a well-ordered set. Fix a monomial ordering < on X * and take two monic polynomials f and g in k X . There are two kinds of compositions: (ii) If w =f = aḡb for some a, b ∈ X * then the polynomial (f, g) w = f −agb is called the inclusion composition of f and g with respect to w.
Then (f, g) w < w and (f, g) w lies in the ideal Id{f, g} of k X generated by f and g.
In the composition (f, g) w , we call w an ambiguity (or the least common multiple lcm(f ,ḡ), see below).
Consider S ⊂ k X such that very s ∈ S is monic. Take h ∈ k X and w ∈ X * . Then h is called trivial modulo (S, w), denoted by The elements asb, a, b ∈ X * , and s ∈ S are called S-words. A monic set S ⊂ k X is called a GS basis in k X with respect to the monomial ordering < if every composition of polynomials in S is trivial modulo S and the corresponding w.
A set S is called a minimal GS basis in k X if S is a GS basis in k X avoiding inclusion compositions; that is, given f, g ∈ S with f = g, we have f = agb for all a, b ∈ X * . Put The elements of Irr(S) are called S-irreducible or S-reduced.
The following lemma is key for proving the CD-lemma for associative algebras.
Proof. There are three cases to consider. Case 1. Assume that the subwordss 1 ands 2 of w are disjoint, say, |a 2 | ≥ |a 1 | + |s 1 |. Then, a 2 = a 1s1 c and b 1 = cs 2 b 2 for some c ∈ X * , and so w 1 = a 1s1 cs 2 b 2 . Now, Since s 2 − s 2 <s 2 and s 1 − s 1 <s 1 , we conclude that Case 2. Assume that the subwords 1 of w containss 2 as a subword. Then s 1 = as 2 b with a 2 = a 1 a and b 2 = bb 1 , that is, w = a 1 as 2 bb 1 for some S-word as 2 b. We have The triviality of compositions implies that a 1 s 1 b 1 ≡ a 2 s 2 b 2 mod (S, w).
Case 3. Assume that the subwordss 1 ands 2 of w have a nonempty intersection. We may assume that a 2 = a 1 a and b 1 = bb 2 with w =s 1 b = as 2 and |w| < |s 1 | + |s 2 |. Then, as in Case 2, we have where α i , β j ∈ k, u i ∈ Irr(S), and a j s j b j are S-words. So, Irr(S) is a set of linear generators of the algebra f ∈ k X|S .
Theorem 2.3 (The CD-lemma for associative algebras) Choose a monomial ordering < on X * . Consider a monic set S ⊂ k X and the ideal Id(S) of k X generated by S. The following statements are equivalent: (ii) f ∈ Id(S) ⇒f = asb for some s ∈ S and a, b ∈ X * .
Proof. (i)⇒(ii). Assume that S is a GS basis and take 0 = f ∈ Id(S).
Induct on w 1 and l to show that f = asb for some s ∈ S and a, b ∈ X * . To be more precise, induct on (w 1 , l) with the lex ordering of the pairs.
A new exposition of the proof of Theorem 2.3 (CD-lemma for associative algebras).
Let us start with the concepts of non-unique common multiple and least common multiple of two words u, v ∈ X * . A common multiple cm(u, v) means that cm(u, v) = a 1 ub 1 = a 2 vb 2 for some a i , b i ∈ X * . Then lcm(u, v) means that some cm(u, v) contains some lcm(u, v) as a subword: cm(u, v) = c · lcm(u, v) · d with c, d ∈ X * , where u and v are the same subwords in both sides. To be precise, lcm(u, v) ∈ {ucv, c ∈ X * (a trivial lcm(u, v)); u = avb, a, b ∈ X * (an inclusion lcm(u, v)); ub = av, a, b ∈ X * , |ub| < |u| + |v| (an intersection lcm(u, v))}.
The only difference with the previous definition of composition is that we include the case of trivial lcm(f ,ḡ). However, in this case the composition is trivial, It is clear that if a 1f b 1 = a 2ḡ b 2 then, up to the ordering of f and g, This implies Lemma 2.1. The main claim (i)⇒(ii) of Theorem 2.3 follows from Lemma 2.1.
Shirshov algorithm. If a monic subset S ⊂ k X is not a GS basis then we can add to S all nontrivial compositions, making them monic. Iterating this process, we eventually obtain a GS basis S c that contains S and generates the same ideal, Id(S c ) = Id(S). This S c is called the GS completion of S. Using the reduction algorithm (elimination of the leading words of polynomials), we may obtain a minimal GS basis S c or a reduced GS basis.
The following theorem gives a linear basis for the ideal Id(S) provided that S ⊂ k X is a GS basis.
Theorem 2.4 If S ⊂ k X is a Gröbner-Shirshov basis then, given u ∈ X * \ Irr(S), by Lemma 2.2 there exists u ∈ kIrr(S) with u < u (if u = 0) such that u − u ∈ Id(S) and the set {u − u|u ∈ X * \ Irr(S)} is a linear basis for the ideal Id(S) of k X .
Proof. Take 0 = f ∈ Id(S). Then by the CD-lemma for associative algebras, f = a 1 s 1 b 1 = u 1 for some s 1 ∈ S and a 1 , b 1 ∈ X * , which implies that where α 1 is the coefficient of the leading term of f and u 1 < u 1 or u 1 = 0. Then f 1 ∈ Id(S) and f 1 <f . By induction onf , the set {u− u|u ∈ X * \Irr(S)} generates Id(S) as a linear space. It is clear that {u − u|u ∈ X * \ Irr(S)} is a linearly independent set. Theorem 2.5 Choose a monomial ordering > on X * . For every ideal I of k X there exists a unique reduced Gröbner-Shirshov basis S for I.
Proof. Clearly, a Gröbner-Shirshov basis S ⊂ k X for the ideal I = Id(S) exists; for example, we may take S = I. By Theorem 2.3, we may assume that the leading terms of the elements of S are distinct. Given g ∈ S, put For every f ∈ Id(S) we show that there exists an s 1 ∈ S 1 such that In fact, Theorem 2.3 implies that f = a ′h b ′ for some a ′ , b ′ ∈ X * and h ∈ S. Suppose that h ∈ S \ S 1 . Then we have h ∈ ∪ g∈S ∆ g , say, h ∈ ∆ g . Therefore, h = g and h = aḡb for some a, b ∈ X * . We claim thath >ḡ. Otherwise,h <ḡ. It follows thath = aḡb > ahb and so we have the infinite descending chainh which contradicts the assumption that > is a well ordering. Suppose that g ∈ S 1 . Then, by the argument above, there exists g 1 ∈ S such that g ∈ ∆ g 1 and g > g 1 . Since > is a well ordering, there must exist Put By induction on f , we know that f ∈ Id(S 1 ), and hence I = Id(S 1 ). Moreover, Theorem 2.3 implies that S 1 is clearly a minimal GS basis for the ideal Id(S).
Assume that S is a minimal GS basis for I. For every s ∈ S we have s = s ′ + s ′′ , where supp(s ′ ) ⊆ Irr(S \ {s}) and s ′′ ∈ Id(S \ {s}). Since S is a minimal GS basis, it follows that s = s ′ for every s ∈ S.
We claim that S 2 = {s ′ |s ∈ S} is a reduced GS basis for I. In fact, it is clear that Take two reduced GS bases S and R for the ideal I. By Theorem 2.3, for every s ∈ S, s = arb, r = cs 1 d for some a, b, c, d ∈ X * , r ∈ R, and s 1 ∈ S, and hence s = acs 1 db. Sincē s ∈ supp(s) ⊆ Irr(S\{s}), we have s = s 1 . It follows that a = b = c = d = 1, and so s = r. If s = r then 0 = s − r ∈ I = Id(S) = Id(R). By Theorem 2.3, s − r = a 1 r 1 b 1 = c 1 s 2 d 1 for some a 1 , b 1 , c 1 , d 1 ∈ X * with r 1 , s 2 < s = r. This means that s 2 ∈ S \ {s} and r 1 ∈ R \ {r}. Noting that s − r ∈ supp(s) ∪ supp(r), This shows that s = r, and then S ⊆ R. Similarly, R ⊆ S. Remark 1. In fact, a reduced GS basis is unique (up to the ordering) in all possible cases below.
Remark 2. Both associative and Lie CD-lemmas are valid when we replace the base field k by an arbitrary commutative ring K with identity because we assume that all GS bases consist of monic polynomials. For example, consider a Lie algebra L over K which is a free K-module with a wellordered K-basis {a i |i ∈ I}. With the deg-lex ordering on {a i |i ∈ I} * , the universal enveloping associative algebra U K (L) has a (monic) GS basis where α t ij ∈ K and [a i , a j ] = α t ij a t in L, and the CD-lemma for associative algebras over K implies that L ⊂ U K (L) and In fact, for the same reason, all CD-lemmas in this survey are valid if we replace the base field k by an arbitrary commutative ring K with identity. If this is the case then claim (iii) in the CD-lemma should read: K(X|S) is a free K-module with a K-basis Irr(S). But in the general case, Shirshov's algorithm fails: if S is a monic set then S ′ , the set obtained by adding to S all non-trivial compositions, is not a monic set in general, and the algorithm may stop with no result.

Gröbner bases for commutative algebras and their lifting to Gröbner-Shirshov bases
Consider the free commutative associative algebra k[X]. Given a well order- is a linear basis for k[X].
Choose a monomial ordering < on [X]. Take two monic polynomials f and g in k[X] such that w = lcm(f ,ḡ) =f a =ḡb for some a, b ∈ [X] with |f | + |ḡ| > |w| (so,f andḡ are not coprime in [X]). Then (f, g) w = f a − gb is called the s-polynomial of f and g.
A monic subset S ⊆ k[X] is called a Gröbner basis with respect to the monomial ordering < whenever all s-polynomials of two arbitrary polynomials in S are trivial modulo S.
An argument similar to the proof of the CD-lemma for associative algebras justifies the following theorem due to B. Buchberger.
Proof. Denote by lcm(u, v) be the usual (unique) least common multiple of two commutative words u, v ∈ [X]: The s-polynomial of two monic polynomials f and g is An analogue of Lemma 2.1 is valid for k[X] because if a 1s1 = a 2s2 for two monic polynomials s 1 and s 2 then Eisenbud, Peeva, and Sturmfels constructed [99] a GS basis in k X by lifting a commutative Gröbner basis for k[X] and adding all commutators. Write X = {x 1 , x 2 , . . . , x n } and put Consider the natural map γ : k X → k[X] carrying x i to x i and the lexicographic splitting of γ, which is defined as the k-linear map where l i ≥ 0, using an arbitrary monomial ordering on [X].
Following [99], define an ordering on X * using the ordering x 1 < x 2 < · · · < x n as follows: given u, v ∈ X * , put It is easy to check that this is a monomial ordering on X * and δ(s) = δ(s) Consider an arbitrary ideal L of k[X] generated by monomials. Given Theorem 2.8 ( [99]) Consider the orderings on [X] and X * defined above. If S is a minimal Gröbner basis in k[X] then S ′ = {δ(us)|s ∈ S, u ∈ U L (s)}∪ S 1 is a minimal Gröbner-Shirshov basis in k X , where L is the monomial ideal of k[X] generated byS.
Jointly with Bokut, Chen, and Chen [30], we generalized this result to lifting a GS basis Recall that for a prime number p the Gauss ordering on the natural numbers is described as s ≤ p t whenever t s ≡ 0 mod p. Let ≤ 0 = ≤ be the usual ordering on the natural numbers. A monomial ideal L of k[X] is called p-Borel-fixed whenever it satisfies the following condition: for each monomial generator m of L, if m is divisible by x t j but no higher power of x j then (x i /x j ) s m ∈ L for all i < j and s ≤ p t.
Thus, we have the following Eisenbud-Peeva-Sturmfels lifting theorem.  (ii) If L is p-Borel-fixed for some p then J has a finite Gröbner-Shirshov basis.
Proof. Assume that L is p-Borel-fixed for some p. Take a generator m = is a finite set, and the result follows from Theorem 2.8. In particular, if p = 0 then U L (m) = 1.
In characteristic p ≥ 0 observe that if the field k is infinite then after a generic change of variables L is p-Borel-fixed. Then Theorems 2.8 and 2.9 imply

Composition-Diamond lemma for modules
Consider S, T ⊂ k X and f , g ∈ k X . Kang and Lee define [123] the composition of f and g as follows.
(c) The composition (f, g) w is called right-justified whenever w = f = ag for some a ∈ X * .
, and t j ∈ T with a i s i b i < w and c j t j < w for all i and j, then we call f − g trivial with respect to S and T and write f ≡ g mod (S, T ; w). Definition 2.12 ( [123,124]) A pair (S, T ) of monic subsets of k X is called a GS pair if S is closed under composition, T is closed under rightjustified composition with respect to S, and given f ∈ S, g ∈ T , and w ∈ X * such that if (f, g) w is defined, we have (f, g) w ≡ 0 mod (S, T ; w). In this case, say that (S, T ) is a GS pair for the A- Theorem 2.13 (Kang and Lee [123,124], the CD-lemma for cyclic modules) Consider a pair (S, T ) of monic subsets of k X , the associative algebra A = k X|S defined by S, and the left cyclic Applications of Theorem 2.13 appeared in [125,126,127]. Take two sets X and Y and consider the free left k X -module Mod k X Y with k X -basis Y . Then Mod k X Y = ⊕ y∈Y k X y is called a doublefree module. We now define the GS basis in Mod k X Y . Choose a monomial ordering < on X * , and a well-ordering < on Y . Put X * Y = {uy|u ∈ X * , y ∈ Y } and define an ordering < on X * Y as follows: for any w 1 = u 1 y 1 , Given S ⊂ Mod k X Y with all s ∈ S monic, define composition in S to be only inclusion composition, which means thatf = aḡ for some a ∈ X * , where f, g ∈ S.
and a i s i <f , then this composition is called trivial modulo (S,f ).
Theorem 2.14 (Chibrikov [90], see also [78], the CD-lemma for modules) Consider a non-empty set S ⊂ mod k X Y with all s ∈ S monic and choose an ordering < on X * Y as before. The following statements are equivalent: (ii) If 0 = f ∈ k X S then f = as for some a ∈ X * and s ∈ S.
Outline of the proof. Take u ∈ X * Y and express it as u = u X y u with u X ∈ X * and y u ∈ Y . Put where y u = y v . Up to the order of u and v, we have cm(u, v) = c · lcm(u, v).
The composition of two monic elements f, g ∈ Mod k X (Y ) is If a 1s1 = a 2s2 for monic s 1 and s 2 then a 1 s 1 − a 2 s 2 = c · (s 1 , s 2 ) lcm(s 1 ,s 2 ) . This gives an analogue of Lemma 2.1 for modules and the implication (i)⇒(ii) of Theorem 2.14.
Given S ⊂ k X , put A = k X|S . We can regard every left A-module A M as a k X -module in a natural way: Theorem 2.15 Given a submodule I of Mod k X Y and a monomial ordering < on X * Y as above, there exists a unique reduced Gröbner-Shirshov basis S for I. Proof: Take a reduced Gröbner-Shirshov basis S of I as a k Xsubmodule of the cyclic k X -module. Then I is a free left k X -module with a k X -basis S.
As an application of the CD-lemma for modules, we give GS bases for the Verma modules over the Lie algebras of coefficients of free Lie conformal algebras. We find linear bases for these modules.
Let B be a set of symbols. Take the constant locality function N : and consider the Lie algebra L = Lie(X|S) over a field k of characteristic 0 generated by X with the relations ]. It is well-known that these elements generate a free Lie conformal algebra C with data (B, N) (see [194]). Moreover, the coefficient algebra of C is just L.
Suppose that B is linearly ordered. Define an ordering on X as a(m) < b(n) ⇔ m < n or (m = n and a < b).
We use the deg-lex ordering on X * . It is clear that the leading term of each polynomial in S is b(n)a(m) with n − m > N or (n − m = N and (b > a or (b = a and N is odd))).
The following lemma is essentially from [194].
with a i ∈ B and n i ∈ Z such that for every 1 ≤ i < k we have An L-module M is called restricted if for all a ∈ C and v ∈ M there is some integer T such that a(n)v = 0 for n ≥ T .
An L-module M is called a highest weight module whenever it is generated over L by a single element m ∈ M satisfying L + m = 0, where L + is the subspace of L generated by {a(n)|a ∈ C, n ≥ 0}. In this case m is called a highest weight vector.
Let us now construct a universal highest weight module V over L, which is often called the Verma module. Take the trivial 1-dimensional L + -module kI v generated by I v ; hence, a(n)I v = 0 for all a ∈ B, n ≥ 0. Clearly, Then V has the structure of the highest weight module over L with the action given by multiplication on U(L)/U(L)L + and a highest weight vector I ∈ U(L). In addition, V = U(L)/U(L)L + is the universal enveloping vertex algebra of C and the embedding ϕ : C → V is given by a → a(−1)I (see also [194]).
It follows that S ′ is a Gröbner-Shirshov basis. Now, the result follows from the CD-lemma for modules.

Composition-Diamond lemma for categories
Denote by X an oriented multi-graph. A path a n → a n−1 → · · · → a 1 → a 0 , n ≥ 0, in X with edges x n , . . . , x 2 , x 1 is a partial word u = x 1 x 2 · · · x n on X with source a n and target a 0 . Denote by C(X) the free category generated by X (the set of all partial words (paths) on X with partial multiplication, the free 'partial path monoid' on X). A well-ordering on C(X) is called monomial whenever it is compatible with partial multiplication. A polynomial f ∈ kC(X) is a linear combination of partial words with the same source and target. Then kC(X) is the partial path algebra on X (the free associative partial path algebra generated by X).
Given S ⊂ kC(X), denote by Id(S) the minimal subset of kC(X) that includes S and is closed under the partial operations of addition and multiplication. The elements of Id(S) are of the form α i a i s i b i with α i ∈ k, a i , b i ∈ C(X), and s i ∈ S, and all S-words have the same source and target.
Both inclusion and intersection compositions are possible. With these differences, the statement and proof of the CD-lemma are the same as for the free associative algebra.
Theorem 2.20 ([36], the CD-lemma for categories) Consider a nonempty set S ⊂ kC(X) of monic polynomials and a monomial ordering < on C(X). Denote by Id(S) the ideal of kC(X) generated by S. The following statements are equivalent: (i) The set S is a Gröbner-Shirshov basis in kC(X).
(ii) f ∈ Id(S) ⇒f = asb for some s ∈ S and a, b ∈ C(X).
(iii) the set Irr(S) = {u ∈ C(X)|u = asb a, b ∈ C(X), s ∈ S} is a linear basis for kC(X)/Id(S), which is denoted by kC(X|S).
Outline of the proof. Define w = lcm(u, v), u, v ∈ C(X) and the general composition (f, g) w for f, g ∈ kC(X) and w = lcm(f ,ḡ) by the same formulas as above. Under the conditions of the analogue of Lemma 2.1, we again have defined for i = 0, 1, . . . q (and for q > 0 in the case of ε i ) by Take the oriented multi-graph X = (V (X), E(X)) with Consider the relation S ⊆ C(X) × C(X) consisting of: This yields a presentation ∆ = C(X|S) of the simplex category ∆. Order now C(X) as follows.
The cyclic category is defined by generators and relations as follows, see [104]. Take the oriented (multi) graph Consider the relation S ⊆ C(Y ) × C(Y ) consisting of: The category C(Y |S) is called the cyclic category and denoted by Λ.
Define an ordering on C(Y ) as follows.
Firstly, for t i p , t j q ∈ {t q |q ≥ 0} * put (t p ) i > (t q ) j iff i > j or (i = j and p > q).
Fourthly, for ε i p , ε j q ∈ {ε i p , |p ∈ Z + , 0 ≤ i ≤ p}, ε i p > ε j q iff p > q or (p = q and i < j). Finally It is also easy to verify that ≻ 2 is a monomial ordering on C(Y ) which extends ≻ 1 . Then we have Theorem 2.23 ( [36]) Consider Y and S defined as the above. Put ρ 4 : t q ε 0 q = ε q q and ρ 5 : t q η 0 q = η q q t 2 q+1 . Then (1) With the ordering ≻ 2 on C(Y ), the set S ∪{ρ 4 , ρ 5 } is a Gröbner-Shirshov basis for the cyclic category C(Y |S).
(2) Every morphism µ : [q] → [p] of the cyclic category Λ = C(Y |S) has a unique expression of the form

Composition-Diamond lemma for associative algebras over commutative algebras
Given two well-ordered sets X and Y , put and denote by kN the k-space spanned by N. Define the multiplication of words as This makes kN an algebra isomorphic to the tensor product k[X] ⊗ k Y , called a 'double free associative algebra'. It is a free object in the category of all associative algebras over all commutative algebras (over k): every associative algebra K A over a commutative algebra K is isomorphic to k[X] ⊗ k Y /Id(S) as a k-algebra and a k[X]-algebra. Choose a monomial ordering > on N. The following definitions of compositions and the GS basis are taken from [170].
Take two monic polynomials f and g in k[X] ⊗ k Y and denote by L the least common multiple off X andḡ X .
Overlap. Assume that a non-empty beginning ofḡ Y is a non-empty ending off Y , say, 3. External. Take a (possibly empty) associative word c 0 ∈ Y * . In the case that the greatest common divisor off X andḡ X is non-empty and both f Y andḡ Y are non-empty, put w = Lf Y c 0ḡ Y and define the composition ⊗ k Y is called a GS basis whenever all compositions of elements of S, say (f, g) w , are trivial modulo (S, w): Theorem 2.24 228], the CD-lemma for associative algebras over commutative algebras) Consider a monic subset S ⊆ k[X]⊗ k Y and a monomial ordering < on N. The following statements are equivalent: (ii) For every element f ∈ Id(S), the monomialf containss as its subword for some s ∈ S.
(iii) The set Irr(S) = {w ∈ N|w = asb, a, b ∈ N, s ∈ S} is a linear basis for the quotient k[X] ⊗ k Y .
Outline of the proof. For that is, w is a trivial least common multiple relative to both X-words and Ywords. This implies the analog of Lemma 2.1 and the claim (i)⇒(ii) in Theorem 2.24. We apply this lemma in Section 4.3.

PBW-theorem for Lie algebras
Consider a Lie algebra (L, [ ]) over a field k with a well-ordered linear basis Theorem 2.25 (PBW Theorem) In the above notation and with the deg-lex ordering on X * , the set S (−) is a Gröbner-Shirshov basis of k X . Then by the CD-lemma for associative algebras, the set Irr(S (−) ) consists of the elements and constitutes a linear basis of U(L).   (iii) A linear basis of U(L) consists of the words u = u 1 · · · u n , where u 1 · · · u n in the lex ordering, n ≥ 0, and every u i is an S (−) -irreducible associative Lyndon-Shirshov word in X.
(iv) A linear basis of L is the set of all S-irreducible Lyndon-Shirshov Lie monomials [u] in X.
(v) A linear basis of U(L) consists of the polynomials u = [u 1 ] · · · [u n ], where u 1 · · · u n in the lex ordering, n ≥ 0, and every [u i ] is an S-irreducible non-associative Lyndon-Shirshov word in X.
The PBW theorem, Theorem 4.10, the CD-lemmas for associative and Lie algebras, Shirshov's factorization theorem, and property (VIII) of Section 4.2 imply that every LS-subword of u is a subword of some u i .
L. Makar-Limanov gave [158] an interesting form of the PBW theorem for a finite dimensional Lie algebra.

Drinfeld-Jimbo algebra U q (A), Kac-Moody envelop-
ing algebra U (A), and the PBW basis of U q (A N ) Take an integral symmetrizable N × N Cartan matrix A = (a ij ). Hence, a ii = 2, a ij ≤ 0 for i = j, and there exists a diagonal matrix D with diagonal entries d i , which are nonzero integers, such that the product DA is symmetric. Fix a nonzero element q of k with q 4d i = 1 for all i. Then the Drinfeld-Jimbo quantum enveloping algebra is  Corollary 2.28 (Rosso [195], Yamane [220]) For every symmetrizable Cartan matrix A we have the triangular decomposition Similar results are valid for the Kac-Moody Lie algebras g(A) and their universal enveloping algebras where S + , S − are the same as for U q (A),

The PBW theorem in Shirshov's form implies
Corollary 2.30 (Kac [117]) For every symmetrizable Cartan matrix A, we have the triangular decomposition [179,180] found GS bases for the Kac-Moody algebras of types A n , B n , C n , and D n . He used the available linear bases of the algebras [117].
Consider the set S + consisting of Jimbo's relations: It is easy to see that U + q (A N ) = k X| S + . A direct proof [86] shows that S + is a GS basis for k X| S + = U + q (A N ) ( [55]). The proof is different from the argument of L. A. Bokut and P. Malcolmson [55]. This yields Theorem 2.31 ([55]) In the above notation and with the deg-lex ordering Corollary 2.32 ( [195,220]) For q 8 = 1, a linear basis of U q (A n ) consists of y m 1 n 1 · · · y m l n l h s 1 1 · · · h s N N x i 1 j 1 · · · x i k j k with (m 1 , n 1 ) ≤ · · · ≤ (m l , n l ), (i 1 , j 1 ) ≤ · · · ≤ (i k , j k ), k, l ≥ 0 and s t ∈ Z.

Gröbner-Shirshov bases for groups and semigroups
In this section we apply the method of GS bases for braid groups in different sets of generators, Chinese monoids, free inverse semigroups, and plactic monoids in two sets of generators (row words and column words).
Given a set X consider S ⊆ X * ×X * the congruence ρ(S) on X * generated by S, the quotient semigroup A = sgp X|S = X * /ρ(S), and the semigroup algebra k(X * /ρ(S)). Identifying the set {u = v|(u, v) ∈ S} with S, it is easy to see that σ : k X|S → k(X * /ρ(S)), is an algebra isomorphism.

The Shirshov completion S c of S consists of semigroup relations, S
Then Irr(S c ) is a linear basis of k X|S , and so σ(Irr(S c )) is a linear basis of k(X * /ρ(S)). This shows that Irr(S c ) consists precisely of the normal forms of the elements of the semigroup sgp X|S .
Therefore, in order to find the normal forms of the semigroup sgp X|S , it suffices to find a GS basis S c in k X|S . In particular, consider the group |i ∈ I} and F (X) is the free group on a set X. Then G has a presentation

Gröbner-Shirshov bases for braid groups
Consider the Artin braid group B n of type A n−1 (Artin [5]). We have

Braid groups in the Artin-Burau generators
Assume that X = Y∪Z with Y * and Z well-ordered and that the ordering on Y * is monomial. Then every word in X has the form u = u 0 z 1 u 1 · · · z k u k , where k ≥ 0, u i ∈ Y * , and z i ∈ Z. Define the inverse weight of the word u ∈ X * as inwt(u) = (k, u k , z k , · · · , u 1 , z 1 , u 0 ) and the inverse weight lexicographic ordering as Call this ordering the inverse tower ordering for short. Clearly, it is a monomial ordering on X * . When X = Y∪Z, Y = T∪U, and Y * is endowed with the inverse tower ordering, define the inverse tower ordering on X * with respect to the presentation X = (T∪U)∪Z. In general, for X = (· · · (X (n)∪ X (n−1) )∪ · · · )∪X (0) with X (n) -words equipped with a monomial ordering we can define the inverse tower ordering of X-words.
Introduce a new set of generators for the braid group B n , called the Artin-Burau generators. Put generates B n as a semigroup.
where δ = ±1; s j,k s ε k,l = {s ε k,l , s j,l s k,l }s j,k , s −1 j,k s ε j,l = {s ε j,l , s −1 k,l s −1 j,l }s −1 j,k , (9) s j,k s ε j,l = {s ε j,l , s k,l }s j,k , where i < j < k < l and ε = ±1; where j < i < k < l or i < k < j < l, and ε, δ = ±1. It is claimed in [25] that some compositions are trivial. Processing all compositions explicitly, [82] supported the claim. where all f j for 2 ≤ j ≤ n are free irreducible words in {s ij , i < j}.
Corollary 3.5 The S-irreducible normal form of each word of B n+1 coincides with its Garside normal form [103].
Corollary 3.6 (Garside [103]) The semigroup B + n+1 of positive braids can be embedded into a group.
Instead of σ ij , we write simply (i, j) or (j, i). We also set where t j = t j+1 , 1 ≤ j ≤ m − 1. In this notation, we can write the defining relations of B n as (t 3 , t 2 , t 1 ) = (t 2 , t 1 , t 3 ) = (t 1 , t 3 , t 2 ) for t 3 > t 2 > t 1 , (k, l)(i, j) = (i, j)(k, l) for k > l, i > j, k > i, , where n ≥ t 2 > t 1 ≥ 1, a positive word in (k, l) satisfying t 2 ≥ k > l ≥ t 1 . We can use any capital Latin letter with indices instead of V , and appropriate indices (for instance, t 3 and t 0 with t 3 > t 0 ) instead of t 2 and t 1 . Use also the following equalities in B n :

Theorem 3.7 ([24]) A Gröbner-Shirshov basis of the braid group B n in the
Birman-Ko-Lee generators consists of the following relations: where V [k,l] means, as above, a word in (i, j) satisfying k ≥ i > j ≥ l, t > t 3 , and t 2 > s.
There are two corollaries.

Braid groups in the Adjan-Thurston generators
The symmetric group S n+1 has the presentation A. Bokut and L.-S. Shiao [58] found the normal form for S n+1 in the following statement: the set N = {s 1i 1 s 2i 2 · · · s nin | i j ≤ j + 1} is a Gröbner-Shirshov normal form for S n+1 in the generators s i = (i, i + 1) relative to the deg-lex ordering, where s ji = s j s j−1 · · · s i for j ≥ i and s jj+1 = 1.

Gröbner-Shirshov basis for the Chinese monoid
The Chinese monoid CH(X, <) over a well-ordered set (X, <) has the presentation CH(X) = sgp X|S , where X = {x i |i ∈ I} and S consists of the relations Denote by Λ the set consistsing of the words on X of the form u n = w 1 w 2 · · · w n with n ≥ 0, where · · · w n = (x n x 1 ) t n1 (x n x 2 ) t n2 · · · (x n x n−1 ) t n(n−1) x tnn n for x i ∈ X with x 1 < x 2 < · · · < x n , and all exponents are non-negative.

Gröbner-Shirshov basis for free inverse semigroup
Consider a semigroup S. An element s ∈ S is called an inverse of t ∈ S whenever sts = s and tst = t. An inverse semigroup is a semigroup in which every element t has a unique inverse, denoted by t −1 .
Given a set X, put X −1 = {x −1 |x ∈ X}. On assuming that X ∩X −1 = ∅, denote X ∪ X −1 by Y . Define the formal inverses of the elements of Y * as is the free inverse semigroup (with identity) generated by X.
Introduce the notions of a formal idempotent, a (prime) canonical idempotent, and an ordered (prime) canonical idempotent in Y * . Assume that < is a well-ordering on Y .
(i) The empty word 1 is an idempotent.
(ii) If h is an idempotent and x ∈ Y then x −1 hx is both an idempotent and a prime idempotent.
(iv) An idempotent w ∈ Y * is called canonical whenever w avoids subwords of the form x −1 exf x −1 , where x ∈ Y , both e and f are idempotents.
(v) A canonical idempotent w ∈ Y * is called ordered if every subword e = e 1 e 2 · · · e m of w with m > 2 and e i being idempotents satisfies fir(e 1 ) < fir(e 2 ) < · · · < fir(e m ), where fir(u) is the first letter of u ∈ Y * . • ef − f e, where e and f are ordered prime canonical idempotents with ef > f e; where m ≥ 0, u 1 , · · · , u m−1 = 1 and u 0 u 1 · · · u m avoids subwords of the form yy −1 for y ∈ Y , while e 1 , · · · , e m are ordered canonical idempotents such that the first (respectively last) letter of e i , for 1 ≤ i ≤ m is not equal to the first (respectively last) letter of u i (respectively u i−1 ).
The above normal form is analogous to the semi-normal forms of Poliakova and Schein [176], 2005.

Approaches to plactic monoids via Gröbner-Shirshov bases in row and column generators
Consider the set X = {x 1 , . . . , x n } of n elements with the ordering x 1 < · · · < x n . M. P. Schützenberger called P n = sgp X|T a plactic monoid (see also M. Lothaire [153], Chapter 5), where T consists of the Knuth relations A nondecreasing word R ∈ X * is called a row and a strictly decreasing word C ∈ X * is called a column; for example, x 1 x 1 x 3 x 5 x 5 x 5 x 6 is a row and x 6 x 4 x 2 x 1 is a column.
For two rows R, S ∈ A * say that R dominates S whenever |R| ≤ |S| and every letter of R is greater than the corresponding letter of S, where |R| is the length of R.
A (semistandard) Young tableau on A (see [147]) is a word w = R 1 R 2 · · · R t in U * such that R i dominates R i+1 for all i = 1, . . . , t − 1. For example, is a Young tableau.
A. J. Cain, R. Gray, and A. Malheiro [69] use the Schensted-Knuth normal form (the set of (semistandard) Young tableaux) to prove that the multiplication table of column words, uv = u ′ v ′ , forms a finite GS basis of the finitely generated plactic monoid. Here the Young tableaux u ′ v ′ is the output of the column Schensted algorithm applied to uv, but u ′ v ′ is not made explicit.
In this section we give new explicit formulas for the multiplication tables of row and column words. In addition, we give independent proofs that the resulting sets of relations are GS bases in row and column generators respectively. This yields two new approaches to plactic monoids via their GS bases.
Denote by U the set of all rows in X * and order U * as follows. Given R = (r 1 , r 2 , . . . , r n ) ∈ U, define the length |R| = r 1 + · · · + r n of R in X * .
Then W · Z = W ′ · Z ′ in P n = sgp X|T and W ′ · Z ′ is a Young tableau on X, which could have only one row, that is, Z ′ = (0, 0, . . . , 0). Moreover, We should emphasize that ( * ) gives explicitly the product of two rows obtained by the Schensted row algorithm.
Jointly with our students Weiping Chen and Jing Li we proved [29], independently of Knuth's normal form theorem [137], that Γ is a GS basis of the plactic monoid algebra in row generators with respect to the deg-lex ordering. In particular, this yields a new proof of Knuth's theorem.
where φ stands for some lowercase symbol defined above and Φ stands for the corresponding uppercase symbol.
for n ≥ p ≥ 2 and n ≥ q ≥ 1. Then W ′ , Z ′ ∈ V and W · Z = W ′ · Z ′ in P n = sgp X|T , and W ′ · Z ′ is a Young tableau on X. Moreover, Eq. ( * * ) gives explicitly the product of two columns obtained by the Schensted column algorithm.
Jointly with our students Weiping Chen and Jing Li we proved [29], independently of Knuth's normal form theorem [137], that Λ is a GS basis of the plactic monoid algebra in column generators with respect to the deg-lex ordering. In particular, this yields another new proof of Knuth's theorem. Previously Cain, Gray, and Malheiro [69] established the same result using Knuth's theorem, and they did not find Λ explicitly.
Remark: All results of [29] are valid for every plactic monoid, not necessarily finitely generated.

Gröbner-Shirshov bases for Lie algebras
In this section we first give a different approach to the LS basis and the Hall basis of a free Lie algebra by using Shirshov's CD-lemma for anticommutative algebras. Then, using the LS basis, we construct the classical theory of GS bases for Lie algebras over a field. Finally, we mention GS bases for Lie algebras over a commutative algebra and give some interesting applications.

Lyndon-Shirshov basis and Lyndon-Shirshov words in anti-commutative algebras
A linear space A equipped with a bilinear product x · y is called an anticommutative algebra if it satisfies the identity x 2 = 0, and so x · y = −y · x for every x, y ∈ A. Take a well-ordered set X and denote by X * * the set of all non-associative words. Define three orderings ≻ lex , > deg−lex , and > n−deg−lex (non-associative deg-lex) on X * * . For (u), (v) ∈ X * * put iff one of the following holds: (a) u 1 u 2 > v 1 v 2 in the lex ordering; ) iff one of the following holds: (a) u 1 u 2 > v 1 v 2 in the deg-lex ordering; • (u) > n−deg−lex (v) iff one of the following holds: Define regular words (u) ∈ X * * by induction on |(u)|: ) is regular if both (u 1 ) and (u 2 ) are regular and (u 1 ) ≻ lex (u 2 ). Denote (u) by [u] whenever (u) is regular. The set N(X) of all regular words on X constitutes a linear basis of the free anti-commutative algebra AC(X) on X.
The following result gives an alternative approach to the definition of LS words as the radicals of associative supports u of the normal words [u].    Define the subset S 1 the free anti-commutative algebra AC(X) as It is easy to prove that the free Lie algebra admits a presentation as an anti-commutative algebra: Lie(X) = AC(X)/Id(S 1 ).
The next result gives an alternating approach to the definition of the LS basis of a free Lie algebra Lie(X) as a set of irreducible non-associative words for an anti-commutative GS basis in AC(X).

Composition-Diamond lemma for Lie algebras over a field
We start with some concepts and results from the literature concerning the theory of GS bases for the free Lie algebra Lie(X) generated by X over a field k. Take a well-ordered set X = {x i |i ∈ I} with x i > x t whenever i > t, for all i, t ∈ I. Given u = x i 1 x i 2 · · · x im ∈ X * , define the length (or degree) of u to be m and denote it by |u| = m or deg(u) = m, put fir(u) = x i 1 , and introduce Order the new alphabet X ′ (u) as follows: where r i > β, define the Shirshov elimination We use two linear orderings on X * : (ii) the deg-lex ordering: u > v if |u| > |v| or |u| = |v| and u ≻ v.
Remark In commutative algebras, the lex ordering is understood to be the lex-deg ordering with the condition v > 1 for v = 1.
We regard Lie(X) as the Lie subalgebra of the free associative algebra k X generated by X with the Lie bracket [u, v] = uv − vu. Below we prove that Lie(X) is the free Lie algebra generated by X for every commutative ring k (Shirshov [203]). For a field, this follows from the PBW theorem because the free Lie algebra Lie(X) = Lie(X|∅) has the universal enveloping associative algebra k X = k X|∅ .
Given f ∈ k X , denote byf the leading word of f with respect to the deg-lex ordering and write f = αff − r f with αf ∈ k.
(II) (Shirshov's key property of ALSWs) A word u is an ALSW in X * if and only if u ′ is an ALSW in (X ′ (u)) * .
Properties (I) and (II) enable us to prove the properties of ALSWs and NLSWs (see below) by induction on length.
Actually, if we apply to w the algorithm of joining the minimal letter to the previous word using the Lie product, w → w ′ → w ′′ → · · · , then after finitely many steps we obtain w (VIII) If an associative word w is represented as in (VII) and v is a LS subword of w then v is a subword of one of the words c 1 , c 2 , . . . , c n .
(IX) If u 1 u 2 and u 2 u 3 are ALSWs then so is u 1 u 2 u 3 provided that u 2 = 1. (X) If w = uv is an ALSW and v is its longest proper ALSW ending, then u is an ALSW as well (Chen-Fox-Lyndon [72], Shirshov [204]). Definition 4.6 (down-to-up bracketing of ALSW, Shirshov [203]) For an ALSW w, there is the down-to-up bracketing w → w ′ → w ′′ → · · · → w (k) = [w], where each time we join the minimal letter of the previous word using Lie multiplication. To be more precise, we use the induction .  (ii) if (w) = ((u)(v)) then both (u) and (v) are NLSWs (then (IV) implies that u ≻ v); Denote the set of all NLSWs on X by NLSW (X).
(XIV) The set NLSW (X) is linearly independent in Lie(X) ⊂ k X for every commutative ring k.
(XV) NLSW (X) is a set of linear generators in every Lie algebra generated by X over an arbitrary commutative ring k.
(XVI) Lie(X) ⊂ k X is the free Lie algebra over the commutative ring k with the k-basis NLSW (X).
Outline of the proof. Put x β = min(w).
and ux m β is an ALSW. Claim (i) follows from (II) by induction on length. The same applies to claim (iii).
(XVIII) (Shirshov's Lie elimination of the leading word) Take two monic Lie polynomials f and s withf = asb for some a, b ∈ X * . Then f 1 = f −[asb]s is a Lie polynomial with smaller leading word, and sof 1 <f .
(XIX) (Shirshov's double special bracketing) Assume that w = aubvc with w, u, v ∈ ALSW (X  Here k can be an arbitrary commutative ring. Definition 4.9 Consider S ⊂ Lie(X) with all s ∈ S monic. Take a, b ∈ X * and s ∈ S. If asb is an ALSW then we call [asb]s = [asb]s| [s] →s a special normal S-word (or a special normal s-word), where [asb]s is defined in (XVII) (ii). A Lie S-word (asb) is called a normal S-word whenever (asb) = asb. Every special normal s-word is a normal s-word by (XVII) (iii).
For f, g ∈ S there are two kinds of Lie compositions: (i) If w =f = aḡb for some a, b ∈ X * then the polynomial f, g w = f − [agb]ḡ is called the inclusion composition of f and g with respect to w.
(ii) If w is a word satisfying w =f b = aḡ for some a, b ∈ X * with deg(f) + deg(ḡ) > deg(w) then the polynomial f, g w = [f b]f − [ag]ḡ is called the intersection composition of f and g with respect to w, and w is an ALSW by (IX).
Given a Lie polynomial h and w ∈ X * , say that h is trivial modulo (S, w) and write h ≡ Lie 0 mod(S, w) whenever A set S is called a GS basis in Lie(X) if every composition (f, g) w of polynomials f and g in S is trivial modulo S and w.
(XXI) If s ∈ Lie(X) is monic and (asb) is a normal S-word then (asb) = asb + i α i a i sb i , where a i sb i < asb.
A proof of (XXI) follows from the CD-lemma for associative algebras since {s} is an associative GS basis by (IV).
Proof. If f, g w and (f, g) w are intersection compositions, where w =f b = aḡ, then (XIII) and (XVII) yield In the case of inclusion compositions we arrive at the same conclusion. Proof. Observe that, by definition, for any f, g ∈ S the composition lies in Lie(X) if and only if it lies k X . Assume that S is a GS basis in Lie(X). Then we can express every composition f, g w as f, g w = w. Therefore, (XXII) yields (f, g) w ≡ ass 0 mod (S, w). Thus, S is a GS basis in k X .
Conversely, assume that S is a GS basis in k X . Then the CD-lemma for associative algebras implies that f, g w = asb < w for some a, b ∈ X * and s ∈ S. Then h = f, g w − α[asb]s ∈ Id ass (S) is a Lie polynomial and h < f, g w . Induction on f, g w yields f, g w ≡ Lie 0 mod (S, w). (ii) If f ∈ Id(S) thenf = asb for some s ∈ S and a, b ∈ X * . Proof. (i)⇒(ii). Denote by Id ass (S) and Id Lie (S) the ideals of k X and Lie(X) generated by S respectively. Since Id Lie (S) ⊆ Id ass (S), Theorem 4.10 and the CD-lemma for associative algebras imply the claim.
(ii)⇒(iii). Suppose that . Then all α i must vanish. Otherwise we may assume that α 1 = 0. Then α i [u i ] = u 1 and (ii) implies that [u 1 ] ∈ Irr(S), which is a contradiction. On the other hand, by the next property (XXIII), Irr(S) generates Lie(X|S) as a linear space.
The next property is similar to Lemma 2.2.
(XXIII) Given S ⊂ Lie(X), we can express every f ∈ Lie(X) as (XXIV) Given a normal s-word (asb), take w = asb. Then (asb) ≡ [asb]s mod (s, w). It follows that h ≡ Lie 0 mod (S, w) is equivalent to h = Proof. Observe that for every monic Lie polynomial s, the set {s} is a GS basis in Lie(X). Then (XVIII) and the CD-lemma for Lie algebras yield (asb) ≡ [asb]s mod (s, w).
Denote by [w] u,v the Shirshov double special bracketing of w in the case that w is a trivial lcm(u, v), by [w] u and [w] v the Shrishov special bracketings of w if w is an inclusion or intersection lcm respectively. Then we can define a general Lie composition for monic Lie polynomials f and g withf = u and g = v as if w is a trivial lcm(u, v) (it is 0 mod ({f, g}, w)), and if w is an inclusion or intersection lcm(u, v). If S ⊂ Lie(X) ⊂ k X is a Lie GS basis then S is an associative GS basis. This follows from property (XVII) (iii) and justifies the claim (i)⇒(ii) of Theorem 4.11.
Outline of the proof. We have w 1 = cwd and w = lcm(s 1 ,s 2 ). Shirshov's (double) special bracketing lemma yields The ALSW w includes u =s 1 and v =s 2 as subwords, and so there is a bracketing Now it is enough to prove that two normal Lie s-words with the same leading associative words, say w 1 , are equal mod (s, w 1 ): f = (asb) − [asb] ≡ Lie 0 mod (s, w 1 ) provided thatf < w 1 .
Since f ∈ Id ass (s), we havef = c 1s d 1 by the CD-lemma for associative algebras with one Lie polynomial relation s. Then f − α[c 1 sd 1 ]s is a Lie polynomial with the leading associative word smaller than w 1 . Induction on w 1 finishes the proof.

Gröbner-Shirshov basis for the Drinfeld-Kohno Lie algebra
In this section we give a GS basis for the Drinfeld-Kohno Lie algebra L n .

Definition 4.13
Fix an integer n > 2. The Drinfeld-Kohno Lie algebra L n over Z is defined by generators t ij = t ji for distinct indices 1 ≤ i, j ≤ n − 1 satisfying the relations [t ij t kl ] = 0 and [t ij (t ik + t jk )] = 0 for distinct i, j, k, and l. Therefore, we have the presentation L n = Lie Z (T |S), where T = {t ij | 1 ≤ i < j ≤ n − 1} and S consists of the following relations: Order T by setting t ij < t kl if either i < k or i = k and j < l. Let < be the deg-lex ordering on T * .

Kukin's example of a Lie algebra with undecidable word problem
A. A. Markov [161], E. Post [182], A. Turing [211], P. S. Novikov [173], and W. W. Boone [60] constructed finitely presented semigroups and groups with undecidable word problem. For groups this also follows from Higman's theorem [115] asserting that every recursively presented group embeds into a finitely presented group. A weak analogue of Higman's theorem for Lie algebras was proved in [21], which was enough for the existence of a finitely presented Lie algebra with undecidable word problem. In this section we give Kukin's construction [142] of a Lie algebra A P for every semigroup P such that if P has undecidable word problem then so does A P . Given a semigroup P = sgp x, y|u i = v i , i ∈ I , consider the Lie algebra (3) ⌊zu i ⌋ = ⌊zv i ⌋, i ∈ I.
Here, ⌊zu⌋ stands for the left normed bracketing. Putx >ŷ > z > x > y and denote by > the deg-lex ordering on the set {x,ŷ, x, y, z} * . Denote by ρ the congruence on {x, y} * generated by Proof: For every u ∈ {x, y} * , we can show that ⌊zu⌋ = zu by induction on |u|. All possible compositions in S 1 are the intersection compositions of (2) and (3 ′ ), and the inclusion compositions of (3 ′ ) and (3 ′ ).
Thus, S 1 = {(1), (2), (3 ′ )} is a GS basis in Lie(x,ŷ, x, y, z). Proof: Assume that u = v in the semigroup P . Without loss of generality we may assume that u = au 1 b and v = av 1 b for some a, b ∈ {x, y} * and (u 1 , v 1 ) ∈ ρ. For every r ∈ {x, y} relations (1) where for every Moreover, (3 ′ ) holds in A P . Suppose that ⌊zu⌋ = ⌊zv⌋ in the Lie algebra A P . Then both ⌊zu⌋ and ⌊zv⌋ have the same normal form in A P . Since S 1 is a GS basis in A P , we can reduce both ⌊zu⌋ and ⌊zv⌋ to the same normal form ⌊zc⌋ for some c ∈ {x, y} * using only relations (3 ′ ). This implies that u = c = v in P .
By the corollary, if the semigroup P has undecidable word problem then so does the Lie algebra A P .

Composition-Diamond lemma for Lie algebras over commutative algebras
For a well-ordered set X = {x i |i ∈ I}, consider the free Lie algebra Lie(X) ⊂ k X with the Lie bracket [u, v] = uv − vu. Given a well-ordered set Y = {y j |j ∈ J}, the free commutative monoid Denote the deg-lex orderings on [Y ] and X * by > Y and > X . Define an ordering > on [Y ]X * as follows: for u, v ∈ [Y ]X * , put We can express every element and u 1 ∈ ALSW (X). The polynomial f is called monic (or k-monic) if the coefficient off is equal to 1, that is, α 1 = 1. The notion of k[Y ]-monic polynomials is introduced similarly: α 1 = 1 and β 1 = 1.
Recall that every ALSW w admits a unique bracketing such that [w] is a NLSW.
Consider a monic subset S ⊂ Lie k[Y ] (X). Given a non-associative word (u) on X with a fixed occurrence of some x i and s ∈ S, call (u) x i →s an S-word. Define |u| to be the s-length of (u) x i →s . Every S-word is of the form (asb) with a, b ∈ X * and s ∈ S. If as X b ∈ ALSW (X) then we have the special bracketing [as X b]sX of as X b relative tos X . Refer to [asb]s = [as X b]sX | [s X ] →s as a special normal s-word (or special normal S-word).
An S-word (u) = (asb) is a normal s-word, denoted by ⌊u⌋ s , whenever (asb) X = as X b. The following condition is sufficient.
(i) The s-length of (u) is 1, that is, (u) = s; Take two monic polynomials f and g in Lie k[Y ] (X) and put L = lcm(f Y ,ḡ Y ).
There are four kinds of compositions.
C 1 : Inclusion composition. Iff X = aḡ X b for some a, b ∈ X * , then C 2 : Intersection composition. Iff X = aa 0 andḡ X = a 0 b with a, b, a 0 = 1 then C 4 : Multiplication composition. Iff Y = 1 then for every special normal fword [af b]f with a, b ∈ X * we have  (ii) If f ∈ Id(S) thenf = asb ∈ T A for some s ∈ S and a, b ∈ [Y ]X * . Here Outline of the proof.
In accordance with lcm(u, v), six general compositions are possible.
Denote by [w X ] u X ,v X the Shirshov double special bracketing of w X whenever w X is a X-trivial lcm(u X , v X ), by [w X ] u X and [w X ] v X the Shirshov special bracketings of w X whenever w X is a lcm of X-inclusion or X-intersection respectively.
Define general Lie compositions for k-monic Lie polynomials f and g with f = u andḡ = v as  For every Lie algebra L = Lie K (X|S) over the commutative algebra where S (−) is just S with all commutators [uv] replaced with uv − vu, is the universal enveloping associative algebra of L. A Lie algebra L over a commutative algebra K is called special whenever it embeds into its universal enveloping associative algebra. Otherwise it is called non-special.
Similar though much longer computations show that Λ 3 = 0 in L 3 and Λ 5 = 0 in L 5 . Thus, we have     ) Every finitely or countably generated Lie K-algebra embeds into a two-generated Lie K-algebra, where K is an arbitrary commutative k-algebra.
(b) if (v) = ((v 1 )(v 2 )) then (v 2 ) ≤ (w). Denote (u) by [u] whenever (u) is a good word. Denote by W the set of all good words in the alphabet X and by RS X the free right-symmetric algebra over a field k generated by X. Then W forms a linear basis of RS X , see [198]. D. Kozybaev, L. Makar-Limanov, and U. Umirbaev [141] proved that the deg-lex ordering on W is monomial.
Given a set S ⊂ RS X of monic polynomials and s ∈ S, an S-word (u) s is called a normal S-word whenever (u)s = (asb) is a good word.
Take f, g ∈ S, [w] ∈ W , and a, b ∈ X * . Then there are two kinds of compositions.  Theorem 5.1 ([35], the CD-lemma for pre-Lie algebras) Consider a nonempty set S ⊂ RS X of monic polynomials and the ordering < defined above. The following statements are equivalent: (i) The set S is a Gröbner-Shirshov basis in RS X .
(ii) If f ∈ Id(S) thenf = [asb] for some s ∈ S and a, b ∈ X * , where [asb] is a normal S-word.
(iii) The set Irr(S) = {[u] ∈ W |[u] = [asb] a, b ∈ X * , s ∈ S and [asb] is a normal S-word} is a linear basis of the algebra RS X|S = RS X /Id(S).
As an application, we have a GS basis for the universal enveloping pre-Lie algebra of a Lie algebra.    [198]) A Lie algebra L embeds into its universal enveloping pre-Lie algebra U(L) as a subalgebra of U(L) (−) .

CD-lemma for operads
Following Dotsenko and Khoroshkin ( [98], Proposition 3), linear bases for a symmetric operad and a shuffle operad are the same provided both of them are defined by the same generators and defining relations. It means that we need CD-lemma for shuffle operads only (and we define a GS basis for a symmetric operad as a GS basis of the corresponding shuffle operad).
We express the elements of the free shuffle operad using planar trees.
i |i ∈ I n } is the set of n-ary operations. Call a planar tree with n leaves decorated whenever the leaves are labeled by [n] = {1, 2, 3, . . . , n} for n ∈ N and every vertex is labeled by an element of V .
A decorated tree is called a tree monomial whenever for each vertex the minimal value on the leaves of the left subtree is always less than that of the right subtree.
The set T is freely generated by V with the shuffle composition. Denote by F V = kT the k-linear space spanned by T . This space with the shuffle compositions • i,σ is called the free shuffle operad.
Take a homogeneous subset S of F V . For s ∈ S, define an S-word u| s as before.
Assume that T is equipped with a monomial ordering. Then each S-word is a normal S-word.
For example, the following ordering > on T is monomial, see Proposition 5 of [98].
Every α = α(x 1 , . . . , x n ) ∈ F V (n) has a unique expression Assume that V is a well-ordered set and use the deg-lex ordering on V * . Take the order on the permutations in reverse lexicographic order: i > j if and only if i is less than j as numbers. Now, given α, β ∈ T , define α > β ⇔ wt(α) > wt(β) lexicographically.
An element of F V is called homogeneous whenever all tree monomials occurring in this element with nonzero coefficients have the same arity degree (but not necessarily the same operation degree).
For two tree monomials α and β, say that α is divisible by β whenever there exists a subtree of the underlying tree of α for which the corresponding tree monomial α ′ is equal to α.
A tree monomial γ is called a common multiple of two tree monomials α and β whenever it is divisible by both α and β. A common multiple γ of two tree monomials α and β is called a least common multiple and denoted by γ = lcm(α, β) whenever |α| + |β| > |γ|, where |δ| = n for δ ∈ F V (n).
Take two monic homogeneous elements f and g of F V . Iff andḡ have a least common multiple w then (f, g) w = wf →f − wḡ →g . Theorem 5.4 ([98], the CD-lemma for shuffle operads) In the above notation, consider a nonempty set S ⊂ F V of monic homogeneous elements and a monomial ordering < on T . The following statements are equivalent: (i) The set S is a Gröbner-Shirshov basis in F V .
(ii) If f ∈ Id(S) thenf = u|s for some S-word u| s .
(iii) The set Irr(S) = {u ∈ T |u = v|s for all S-word v| s } is a k-linear basis of F V /Id(S).
As applications, the authors of [98] calculate Gröbner-Shirshov bases for some well-known operads: the operad Lie of Lie algebras, the operad As of associative algebras, and the operad PreLie of pre-Lie algebras.