Computations in Commutative Algebra

7 downloads 0 Views 234KB Size Report
Università degli Studi di Genova. A.M. Bigatti. CoCoA. Sapporo 2018. 1 / 18 ... and also y2−6x = (3x) · (y−2)+(1) · (−3xy+y2) is in 〈g1,g2〉. Question: ideal ...
Computational Commutative Algebra

Lecture 1: Introduction to Gröbner bases Anna Maria Bigatti Università degli Studi di Genova A.M. Bigatti

CoCoA

Sapporo 2018

1 / 18

Ideals and ideal membership We start from the very beginning... Definition 1 (ideal) Let P be a (commutative) ring and F = {g1 , . . . , gs } ⊂ P. The ideal generated by F is hg1 , . . . , gs i = {h1 g1 + · · · + hs gs | hi ∈ P} Example 2 Let g1 = y −2, g2 = −3xy +y 2 in P = Q[x, y , z] then

3xy −6x = (3x) · (y −2) + (0) · (−3xy +y 2 ) is in hg1 , g2 i

and also y 2 −6x = (3x) · (y −2) + (1) · (−3xy +y 2 ) is in hg1 , g2 i Question: ideal membership Let f ∈ P. Can we determine whether or not f ∈ hg1 , . . . , gs i? A.M. Bigatti

CoCoA

Sapporo 2018

2 / 18

Univariate polynomials: ideal membership A Euclidean domain is a PID (principal ideal domain), i.e. for any ideal we may find a single element generating it. The main tool is the Euclidean division: given f and g 6= 0, compute q and r such that f = q · g + r with r = 0 or deg(r )< deg(g). Example 3 f = x 4 + 2x 3 + x + 1 and g = 2x 2 + 1 . Compute the monomial m such that f −mg is 0 or has degree < deg(f ): r1 = f − 21 x 2 · g = 2x 3 − 12 x 2 + x + 1 keep repeating until result is 0 or has degree < deg(g). r2 = r1 − x · g = − 21 x 2 + 1 r3 = r2 + 14 · g = 45 (This happens in a finite number of steps. Why?) In conclusion f = ( 12 x 2 + x − 14 ) · g + 54 .

(unique!)

The remainder is not 0, therefore f is not in the ideal hgi. A.M. Bigatti

CoCoA

Sapporo 2018

3 / 18

Univariate polynomials: ideal membership Question: If we are given two (or more) generators? The ideal hg1 , g2 i is generated by gcd(g1 , g2 ). The Euclidean algorithm computes the gcd greatest common divisor of two elements in Euclidean domains, such as Q[x]. Example 4 In Q[x]: g = 5x 2 − 23 x ∈ (x 2 +x, x 3 )? x2

x 3 = (x) ·(x 2 + x)+(−x 2 ) + x = (−1)· (−x 2 ) + (x) −x 2 = (−x)· (x) + (0)

So we have hx 2 +x, x 3 i = hgcd(x 2 +x, x 3 )i = hxi In conclusion: f = 5x 2 − 32 x is a multiple of x, therefore f ∈ hx 2 +x, x 3 i A.M. Bigatti

CoCoA

Sapporo 2018

4 / 18

Multivariate linear polynomials: Gaussian reduction The Gaussian reduction provides a nice basis for a subspace of a vector-space. We need to choose an ordering: for example x1 > x2 > x3 > x4 > 1 Example 5   −3x1 −2x2 +x3 −3x4 −2  x1 +3x2 +2x3 −2x4 −1 −x2 −3x4 −2   2x1 −3x1 −2x2 +x3 −3x4 −2 7 −→  + 73 x3 −3x4 − 35  3 x2 3x3 −8x4 −5  17 11  x1 − 21 x4 − 21 20   −→ x2 + 29 21 x4 + 21 8 x3 − 3 x4 − 53

original generators

row echelon form

fully reduced

A linear polynomial is in the Q-subspace if and only if it reduces to 0. A.M. Bigatti

CoCoA

Sapporo 2018

5 / 18

Multivariate polynomials: Gröbner bases

Let K be a field. For an ideal I in K [x1 , . . . , xn ] we do not have the properties of elements in Euclidean domain (−→ unique Euclidean division) ideal in PID (−→ single generator) subspace in vector-space (−→ linearly independent “basis”) but we can construct a Gröbner basis of I which have some similarly nice properties. (the only problem is that they may be BIG!) First we need to generalize some of the basic concepts we have seen.

A.M. Bigatti

CoCoA

Sapporo 2018

6 / 18

Monoid Orderings and leading term of a polynomial We sort univariate polynomials by degree, e.g. 2x 3 − 4x 2 + 1 We sort linear polynomials “alphabetically”, e.g. 3x − 5y + 1 Definition 6 (monoid ordering) A monoid ordering σ on T, is a total ordering with this property: for two power-products t1 , t2 ∈ T if t1 >σ t2 then t · t1 >σ t · t2 for all t ∈ T. Example 7 if x >σ y >σ z >σ 1 then xy >σ y 2 >σ yz >σ y −→ we write f = 3xy + 4y 2 − yz + 2y and LTσ (f ) = xy if y >σ x >σ 1 >σ z then y 2 >σ xy >σ y >σ yz −→ we write f = 4y 2 + 3xy + 2y − yz and LTσ (f ) = y 2 A.M. Bigatti

CoCoA

Sapporo 2018

7 / 18

Term-orderings: Lex and DegLex Definition 8 (Term-ordering) A term-ordering is a monoid ordering on T such that t > 1 for all t ∈ T \ {1} Example 9 No term-ordering would sort like this xy + x 2 + y 2 because: if x > y > 1 we have x 2 > xy (mult by x) and xy > y 2 (mult by y ) if y > x > 1 we have y 2 > xy (mult by y ) and xy > x 2 (mult by x) Example 10 Question: if x > y > 1 is x > y 2 ? The term-ordering property, with x > y > 1, is not enough to answer: x 2 > xy > x > y 2 > y > 1 for σ = Lex check exp of x first x 2 > xy > y 2 > x > y > 1 for σ = DegLex check deg first A.M. Bigatti

CoCoA

Sapporo 2018

8 / 18

Term-orderings: DegRevLex Humans prefer Lex and DegLex, but the default term-ordering in CoCoA is DegRevLex as for most Computer Algebra systems, because usually gives “nicer” Gröbner bases

Definition 11 (Lex, RevLex) Lex: t has higher power of “x” =⇒ t is bigger RevLex: t has higher power of “z” =⇒ t is smaller RevLex, without “Deg”, is not a term-ordering because z < 1. Example 12 Question: if x Lex: RevLex: DegLex: DegRevLex: A.M. Bigatti

> y > z > 1 is xz > y 2 ? check exp of x first x 3 z + x 2 − xz check exp of z first +x 2 − y 4 check deg first x 3z − y 4 check deg first −y 4 + x 3 z CoCoA

−y 4 −xz + x 3 z +x 2 − xz +x 2 − xz Sapporo 2018

9 / 18

CoCoA demo

How to use these orderings in CoCoA: (See Bigatti1.cocoa5)

A.M. Bigatti

CoCoA

Sapporo 2018

10 / 18

CoCoA demo

How to use these orderings in CoCoA: (See Bigatti1.cocoa5)

A.M. Bigatti

CoCoA

Sapporo 2018

10 / 18

Division Algorithm: reducers Now we generalize the Euclidean division to multivariate polynomials: Definition 13 (reducer) g is a reducer for f if LTσ (g) divides LTσ (f ). g

f reduces to r via g, we write f −→ r LMσ (f ) if g is a reducer for f , and f = LMσ(g) ·g+r Example 14 In Q[x, y , z] let g = x 2 − 1, so LTσ (g) = x 2 (for all term-orderings σ!) DegRevLex: g is not a reducer for f1 = −xy 2 + x 2 z + 2 DegLex: g is a reducer for f2 = x 2 z − xy 2 + 2 and g

f2 −→ r = x 2 z − xy 2 + 2 −

x 2z x2

· (x 2 − 1) = −xy 2 + z + 2

LT(r ) = −xy 2 =⇒ r is not reducible by g. A.M. Bigatti

CoCoA

Sapporo 2018

11 / 18

Division Algorithm: remainder Now we also generalize the Gaussian reduction: Definition 15 (remainder) gi

gi

gi

gi

3 1 2 k r is a remainder of f by L = {g1 , . . . , gs }, if f −→ r1 −→ r2 −→ . . . −→ r and r = 0 or not reducible by any element in L (or, by full reduction, no term in r is divisible by any leading term in L).

Problem: This remainder is not unique :-( Example 16 Let σ = Lex. Let g1 = xy − 1, g2 = x 2 − 1, f = x 2 y , f = x · (xy − 1) + 0 · (x 2 − 1) + x f = 0 · (xy − 1) + y · (x 2 − 1) + y Let’s make it unique! ;-) A.M. Bigatti

CoCoA

Sapporo 2018

12 / 18

Division Algorithm: normal remainder Definition 17 (Division Algorithm) At every step choose the first reducer in the list L. The remainder is then called the normal remainder, NRσ (f , L). Example 18 Let σ = DegRevLex. Let g1 = xy − 1, g2 = x 2 − 1, f = x 2 y 2 + x 2 y + xy 2 + x 2 , Compute q1 , q2 and r such that f = q1 g1 + q2 g2 + r where no term in r is divisible by LT(g1 ) nor LT(g2 ). (See Bigatti1.cocoa5) Example 19 Problem: unique, but useless :-( Let g1 = x 2 + y , g2 = x 2 − y , and f = 2y = g1 − g2 ∈ hg1 , g2 i. But NRσ (f , {g1 , g2 }) = f 6= 0 A.M. Bigatti

CoCoA

Sapporo 2018

13 / 18

Division Algorithm: normal remainder Definition 17 (Division Algorithm) At every step choose the first reducer in the list L. The remainder is then called the normal remainder, NRσ (f , L). Example 18 Let σ = DegRevLex. Let g1 = xy − 1, g2 = x 2 − 1, f = x 2 y 2 + x 2 y + xy 2 + x 2 , Compute q1 , q2 and r such that f = q1 g1 + q2 g2 + r where no term in r is divisible by LT(g1 ) nor LT(g2 ). (See Bigatti1.cocoa5) Example 19 Problem: unique, but useless :-( Let g1 = x 2 + y , g2 = x 2 − y , and f = 2y = g1 − g2 ∈ hg1 , g2 i. But NRσ (f , {g1 , g2 }) = f 6= 0 A.M. Bigatti

CoCoA

Sapporo 2018

13 / 18

Gröbner basis Definition 20 (Gröbner basis) Let P = K [x1 , . . . , xn ] and σ a term-ordering. A set of polynomials G ⊆ P is a σ-Gröbner basis if for all polynomials f ∈ P we have f is in the ideal hGi ⇐⇒ NR(f , G) = 0

.... do they exist?

Yes! :-)

.... can we compute them?

Yes! :-)

Buchberger’s Algorithm

One more definition! :-( A.M. Bigatti

CoCoA

Sapporo 2018

14 / 18

S-polynomial The key of Buchberger’s Algorithm is computing S-polynomials: Definition 21 (S-polynomial) (Fix σ) Given f and g in P, let `= lcm(LT (f ), LT(g)) and spoly(f , g) =

` ` ·f − ·g LM(f ) LM(g)

Example 22 Let f = xy − 1 and g = 3x 2 − 1. Then `= lcm(xy , x 2 ) = x 2 y , and spoly(f , g) =

x 2y x 2y (xy − 1) − (3x 2 − 1) xy 3x 2

= x(xy − 1) − y3 (3x 2 − 1) = x 2 y − x − x 2 y + A.M. Bigatti

CoCoA

y 3

Sapporo 2018

15 / 18

Buchberger’s Algorithm Here is a general description of Buchberger’s Algorithm for computing a Gröbner basis of the ideal hf1 , . . . , fs i 1

2

gens = {f1 , . . . , fr } the input generators GB = ∅ the output GBasis pairs = ∅ the pairs to process While gens 6= ∅ and pairs 6= ∅ do 1

2 3 3

pick f ∈ gens (...and remove it from gens) or pick a pair (gi , gj ) ∈ pairs (...and remove it from pairs) and let f = spoly(gi , gj ) compute g := NR(f , GB) if g 6= 0 add the pairs {(g, gi ) | gi ∈ GB} to pairs, and g to GB.

return GB.

This algorithm returns a Gröbner basis whatever choice we make in (2.1) and remainder we compute in (2.2). A.M. Bigatti

CoCoA

Sapporo 2018

16 / 18

Examples

Example 23 (See Bigatti1.cocoa5)

A.M. Bigatti

CoCoA

Sapporo 2018

17 / 18

Examples

Example 23 (See Bigatti1.cocoa5)

A.M. Bigatti

CoCoA

Sapporo 2018

17 / 18

Ideal membership Recall from the beginning: Question: ideal membership Let P = K [x1 , . . . , xn ] and f ∈ P. Can we determine whether or not f ∈ hg1 , . . . , gs i? Answer: yes!! Choose any term-ordering σ. Compute G, a σ-Gröbner basis of I. Then f is in the ideal I ⇐⇒ NR(f , G) = 0 Example 24 (See Bigatti1.cocoa5)

A.M. Bigatti

CoCoA

Sapporo 2018

18 / 18

Ideal membership Recall from the beginning: Question: ideal membership Let P = K [x1 , . . . , xn ] and f ∈ P. Can we determine whether or not f ∈ hg1 , . . . , gs i? Answer: yes!! Choose any term-ordering σ. Compute G, a σ-Gröbner basis of I. Then f is in the ideal I ⇐⇒ NR(f , G) = 0 Example 24 (See Bigatti1.cocoa5)

A.M. Bigatti

CoCoA

Sapporo 2018

18 / 18