Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko...

273
Computer Algebra Lecture Notes, Summer Term 2017 Janko B¨ ohm January 6, 2020

Transcript of Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko...

Page 1: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

Computer Algebra

Lecture Notes, Summer Term 2017

Janko Bohm

January 6, 2020

Page 2: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

Contents

1 Introduction 11.1 What is computer algebra and why should we do it? 11.2 Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.3 Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111.4 Symbolic Integration . . . . . . . . . . . . . . . . . . . . 151.5 Linear Algebra . . . . . . . . . . . . . . . . . . . . . . . 171.6 Algebraic Geometry . . . . . . . . . . . . . . . . . . . . 191.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

2 Ideals, Varieties and Standard Bases 292.1 Ideals and Varieties . . . . . . . . . . . . . . . . . . . . 292.2 Introduction to the Ideal Membership Problem and

Grobner Bases . . . . . . . . . . . . . . . . . . . . . . . 372.3 Monomial Orderings . . . . . . . . . . . . . . . . . . . . 422.4 Monomial Orderings and Localizations . . . . . . . . . 492.5 Division with Remainder and Standard Bases . . . . . 522.6 Computing Standard Bases . . . . . . . . . . . . . . . . 592.7 The Mora Weak Normal Form . . . . . . . . . . . . . . 642.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

3 Computing with Ideals & Algebraic Sets 733.1 Sums and Intersections of Ideals . . . . . . . . . . . . . 733.2 Elimination of Variables . . . . . . . . . . . . . . . . . . 763.3 Projection and Elimination . . . . . . . . . . . . . . . . 783.4 Polynomial Maps Between Algebraic Sets . . . . . . . 803.5 Rational Maps Between Varieties . . . . . . . . . . . . 853.6 Ideal Quotients . . . . . . . . . . . . . . . . . . . . . . . 933.7 Solving Algebraic Systems with a Finite Set of Solu-

tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 963.8 Projective Algebraic Sets and Graded Ideals . . . . . 993.9 Rational Maps of Projective Varieties . . . . . . . . . 1093.10 Highest Corner and Finite Determinacy . . . . . . . . 1253.11 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

1

Page 3: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

CONTENTS 2

4 Modules over principal ideal domains 1394.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 1394.2 The Elementary Divisor Algorithm . . . . . . . . . . . 1404.3 Modules and Presentations . . . . . . . . . . . . . . . . 1474.4 Finitely Generated Modules Over Principal Ideal Do-

mains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1544.5 Fundamental Theorem of Finitely Generated Abelian

Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1574.6 The Jordan Normal Form . . . . . . . . . . . . . . . . . 1584.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 162

5 Free Resolutions and Invariants 1655.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 1655.2 Free Resolutions . . . . . . . . . . . . . . . . . . . . . . 1665.3 Graded modules and the Hilbert function . . . . . . . 1685.4 Graded free resolutions . . . . . . . . . . . . . . . . . . 1715.5 Construction of the Hilbert polynomial . . . . . . . . 1725.6 Geometric and Algebraic Notions of Dimension . . . . 1775.7 Monomial orderings for modules . . . . . . . . . . . . . 1815.8 Division with remainder and Grobner bases for mod-

ules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1855.9 Computing Grobner bases of submodules . . . . . . . 1895.10 Buchberger’s criterion and computation of syzygy

modules . . . . . . . . . . . . . . . . . . . . . . . . . . . 1925.11 Computing free resolutions . . . . . . . . . . . . . . . . 1995.12 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 205

6 Computing with modules 2106.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 2106.2 Computing kernels . . . . . . . . . . . . . . . . . . . . . 2106.3 Computing subquotients . . . . . . . . . . . . . . . . . 2126.4 Hom and the Hilbert scheme . . . . . . . . . . . . . . . 2156.5 Computing Hom . . . . . . . . . . . . . . . . . . . . . . 2176.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 225

7 Primary decomposition 2277.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 2277.2 Irreducible decomposition of monomial ideals . . . . . 2277.3 Primary decomposition . . . . . . . . . . . . . . . . . . 2317.4 Algorithm for primary decomposition of monomial

ideals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2347.5 Uniqueness of primary decomposition . . . . . . . . . 2357.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

Page 4: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

CONTENTS 3

8 Normalization 2418.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 2418.2 Basics on normalization . . . . . . . . . . . . . . . . . . 2438.3 Finiteness of normalization . . . . . . . . . . . . . . . . 2478.4 Grauert-Remmert criterion . . . . . . . . . . . . . . . . 2488.5 Normalization algorithm . . . . . . . . . . . . . . . . . 2528.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 256

Page 5: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

List of Figures

1.1 Gaussian elimination for the intersection of two lines 21.2 Buchberger’s algorithm for the intersection of two

ellipses . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.3 Hyperboloids and double cone . . . . . . . . . . . . . . 51.4 Kummer quartic . . . . . . . . . . . . . . . . . . . . . . 51.5 Tetrahedron . . . . . . . . . . . . . . . . . . . . . . . . . 61.6 Togliatti quintic . . . . . . . . . . . . . . . . . . . . . . 61.7 Barth sextic . . . . . . . . . . . . . . . . . . . . . . . . . 71.8 Icosahedron . . . . . . . . . . . . . . . . . . . . . . . . . 71.9 Octahedron . . . . . . . . . . . . . . . . . . . . . . . . . 121.10 Generic point on octahedron. . . . . . . . . . . . . . . 131.11 Harmonic oscillator . . . . . . . . . . . . . . . . . . . . 161.12 Solution to the harmonic oscillator . . . . . . . . . . . 171.13 Graph of a rational function. . . . . . . . . . . . . . . . 201.14 Elliptic curve . . . . . . . . . . . . . . . . . . . . . . . . 211.15 Group structure on an elliptic curve. . . . . . . . . . . 221.16 Elliptic curve over F7 . . . . . . . . . . . . . . . . . . . 231.17 Icosahedron with numbering of the vertices. . . . . . . 27

2.1 Elliptical arc . . . . . . . . . . . . . . . . . . . . . . . . 302.2 Reducible affine algebraic set . . . . . . . . . . . . . . . 372.3 Twisted cubic . . . . . . . . . . . . . . . . . . . . . . . . 382.4 Surface containing the twisted cubic . . . . . . . . . . 382.5 A convex hull . . . . . . . . . . . . . . . . . . . . . . . . 472.6 DM

> for the ordering lp and the set M of monomialof degree ≤ 4 . . . . . . . . . . . . . . . . . . . . . . . . . 48

2.7 Grobner fan of the line. . . . . . . . . . . . . . . . . . . 492.8 Local properties of union of two lines . . . . . . . . . . 51

3.1 Four points as the intersection of two pairs of lines . 753.2 Projection of the twisted cubic . . . . . . . . . . . . . . 773.3 Projection of a hyperbola . . . . . . . . . . . . . . . . . 793.4 Whitney umbrella . . . . . . . . . . . . . . . . . . . . . 81

4

Page 6: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

LIST OF FIGURES i

3.5 Steiner surface over the reals . . . . . . . . . . . . . . . 833.6 Rational parametrization of the circle. . . . . . . . . . 883.7 Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 923.8 Ideal quotient . . . . . . . . . . . . . . . . . . . . . . . . 963.9 Projective space P2(R). . . . . . . . . . . . . . . . . . . 1013.10 Mapping A2(R) into P2(R) by stereographic projec-

tion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1033.11 Parabola x1 − x2

2 = 0 in A2(R). . . . . . . . . . . . . . . 1043.12 Projective parabola . . . . . . . . . . . . . . . . . . . . 1053.13 Projective parabola as a subset of the unit disc. . . . 1063.14 Degree 5 plane curve with three double points and

one triple point. . . . . . . . . . . . . . . . . . . . . . . 1213.15 Three curves in the linear system of quardrics through

the singular points of C. . . . . . . . . . . . . . . . . . 1243.16 Highest corner for the Jacobian ideal of f = x5+x2y2+

y6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1293.17 Curve with triple point . . . . . . . . . . . . . . . . . . 133

5.1 Hilbert function and Hilbert polynomial ofK[x0, x1, x2].1745.2 Hilbert function and Hilbert Polynomial of R(−2)⊕

R(−3) for R =K[x0, x1, x2]. . . . . . . . . . . . . . . . 175

6.1 Deformation of three lines into an elliptic curve (realpicture). . . . . . . . . . . . . . . . . . . . . . . . . . . . 211

6.2 A tangent to a conic . . . . . . . . . . . . . . . . . . . . 216

7.1 Primary decomposition with an embedded line . . . . 2387.2 Fat point on line . . . . . . . . . . . . . . . . . . . . . . 2397.3 Simplicial complex with three maximal faces. . . . . . 240

Page 7: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

List of Symbols

Sn Symmetric group on n symbols . . . . . . 5Z Integers . . . . . . . . . . . . . . . . . . . . 8gcd Greatest common divisor . . . . . . . . . . 8π(x) Density of prime numbers . . . . . . . . . 10Stab(j) Stabilizer of j . . . . . . . . . . . . . . . . . 11Gx Orbit of x under the action of G . . . . . 12LC(f) Lead coefficient of f , linear case . . . . . . 17L(f) Lead monomial of f , linear case . . . . . . 17spoly(f, g) S-pair of f and g, linear case . . . . . . . . 17An(K) Affine space of dimension n over the field

K . . . . . . . . . . . . . . . . . . . . . . . . 19V (f1, ..., fn) Affine algebraic set define by f1, ..., fn . . 19Γ(g) Graph of g . . . . . . . . . . . . . . . . . . . 19E(Q) Q-rational points of E . . . . . . . . . . . . 21Fp Finite field with p elements . . . . . . . . . 21F×p Prime residue class group of Fp . . . . . . 21

(cp) Legendre symbol . . . . . . . . . . . . . . . 23

(cn) Jacobi symbol . . . . . . . . . . . . . . . . . 24

Fn n-th Fermat prime . . . . . . . . . . . . . . 26⟨S⟩ Ideal generated by the set S . . . . . . . . 29I(S) Ideal of the set S . . . . . . . . . . . . . . . 30S Zariski closure of S . . . . . . . . . . . . . 30deg(f) Degree of the polynomial f , univariate case 33LC(f) Lead coefficient of f , univariate case . . . 33LT(f) Lead term of f , univariate case . . . . . . 33L(f) Lead monomial of f , univariate case . . . 33Spec(R/I) Spectrum of R/I . . . . . . . . . . . . . . . 34√

(I) Radical of I . . . . . . . . . . . . . . . . . . 35d(r) Euclidean norm of r . . . . . . . . . . . . . 39lp Lexicographical ordering . . . . . . . . . . 44dp Degree reverse lexicographical ordering . . 44ls Negative lexicographical ordering . . . . . 44L(f) Leading monomial of f . . . . . . . . . . . 45

ii

Page 8: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

LIST OF SYMBOLS iii

LC(f) Leading coefficient of f . . . . . . . . . . . 45LT(f) Leading term of f . . . . . . . . . . . . . . 45>w Weighted degree ordering with weight vec-

tor w . . . . . . . . . . . . . . . . . . . . . . 46D> Characteristic set of > . . . . . . . . . . . . 47convHull(D) Convex hull of D . . . . . . . . . . . . . . . 47inw(f) Initial term of f with respect to the weight

vector w . . . . . . . . . . . . . . . . . . . . 48L(G) Leading ideal of G with respect to a fixed

monomial ordering . . . . . . . . . . . . . . 53NF(−,G) Normal form modulo G . . . . . . . . . . . 54NF Normal form . . . . . . . . . . . . . . . . . 54NF(−,G) Normal form modulo G . . . . . . . . . . . 54NF Normal form . . . . . . . . . . . . . . . . . 54lcm Least common multiple . . . . . . . . . . . 59spoly(f, g) S-polynomial of f and g . . . . . . . . . . . 59Im Elimination ideal of I eliminating the first

m variables . . . . . . . . . . . . . . . . . . 78πm Projection forgetting the first m coordi-

nates . . . . . . . . . . . . . . . . . . . . . . 78im(ϕ) Image of ϕ . . . . . . . . . . . . . . . . . . . 80ker(f) Kernel of the ring homomorphism f . . . 84quot(R) Quotient field of R . . . . . . . . . . . . . . 89D(ϕ) Domain of definition of ϕ . . . . . . . . . . 89I ∶ J Ideal quotient of I by J . . . . . . . . . . . 93U1 ⊕ ...⊕Un Direct sum of the submodules Ui . . . . . 155pA Minimal polynomial of A . . . . . . . . . . 159χA Characteristic polynomial of A . . . . . . 159J (λ, e) Jordan block e × e with eigenvalue λ . . . 161L(v) Leading monomial of a vector v . . . . . . 183LC(v) Leading coefficient of a vector v . . . . . . 183LT(v) Leading term of a vector v . . . . . . . . . 183L(G) Leading module of G with respect to a

fixed monomial ordering . . . . . . . . . . 185NF(−,G) Normal form modulo G . . . . . . . . . . . 185NF Normal form . . . . . . . . . . . . . . . . . 185lcm Least common multiple of monomials in

a free module . . . . . . . . . . . . . . . . . 189spoly(f, g) S-polynomial of vectors f and g . . . . . . 189Syz(G) Syzygy module of G . . . . . . . . . . . . . 192SG Syzygy matrix of G . . . . . . . . . . . . . 192s(gi, gj) Syzygy induced by a successful Buchberger

test NF(spoly(gi, gj),G) = 0 . . . . . . . . 193

Page 9: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

LIST OF SYMBOLS iv

>G Schreyer ordering induced by > and G . . 193subquot(A,B) Subquotient with generators A and rela-

tions B . . . . . . . . . . . . . . . . . . . . . 212HomR(M,N) Module of R-homomorphisms M → N . . 215Hn Hilbert scheme of subschemes of Pn . . . . 216Hn,P Hilbert scheme of subschemes of Pn with

Hilbert polynomial P . . . . . . . . . . . . 216Ass(I) Associated primes of I . . . . . . . . . . . 237Min(I) Minimal associated primes of I . . . . . . 237I∆ Stanley-Reisner ideal of ∆ . . . . . . . . . 239A Normalization of Noetherian domain A . 241X Normalization of variety X . . . . . . . . . 241S−1A Localization of A with denominators in S 243AP Localization of A at a prime P . . . . . . 243N(A) Non-normal locus of A . . . . . . . . . . . 244V(J) Scheme theoretic vanishing locus of J . . 244I(Y ) Scheme theoretic zero ideal of Y . . . . . . 244CA Conductor of A . . . . . . . . . . . . . . . . 244Jac(I) Jacobian ideal of I . . . . . . . . . . . . . . 245Sing(A) Singular locus of A . . . . . . . . . . . . . . 245

Page 10: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

LIST OF SYMBOLS v

Page 11: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

1

Introduction

1.1 What is computer algebra and why

should we do it?

Computer algebra has two fundamental goals: Provide algorithmsfor computations with algebraic structures, like fields, vector spaces,rings, ideals, and modules to the computer. And use the algorithmsand their implementations to solve mathematical problems in the-ory and applications. Here, computations usually refer to exact,that is, symbolic ones. However, in some cases, numerical compu-tations can be helpful in obtaining exact results.

So why is it useful to implement algebra in the computer? Ofcourse, there are practical problems, that can be solved by com-puter algebra, for example, in cryptography, robotics, algebraicstatistics, computational biology, and physics. On the other hand,experiments with the computer allow you to get an insight into the-oretical problems and test conjectures. In many settings, you caneven obtain theoretical results by handling just a single special caseby computer. Let us say, we want to prove that the determinant ofthe matrix

At =⎛⎜⎝

t − 1 1 −1t t2 + 1 t + 1t t2 t + 2

⎞⎟⎠∈ C[t]3×3

is non-zero as a polynomial without computing it. For example,the determinant may be too complicated (which is of course notthe case in the example). However, it may be possible to computeAt0 for a fixed t0 ∈ C. Since substitution is a ring homomorphism,

1

Page 12: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

1. INTRODUCTION 2

it is sufficient to find one t0 such that detAt0 ≠ 0, for example,

detA0 = det⎛⎜⎝

−1 1 −10 1 10 0 2

⎞⎟⎠= −2

It follows that the determinant, as a continuous function, will benon-zero in an open neighbourhood of t0. In fact, we then knowthat it is non-zero for all but finitely many values of t, since 0 ≠detAt ∈ C[t] has only finitely many zeros. This means that thedeterminant is non-zero on an open set in the so called Zariskitopology, that is, on the complement of the zero set of a system ofpolynomial equations.

In the line of this example, our main focus will be on computa-tions in commutative algebra, specifically on all sorts of algorithmsconcerned with polynomial rings. Here, the fundamental buildingblock is Buchberger’s algorithm for computing Grobner bases,which generalizes Gaussian elimination. Recall that Gaussianelimination transforms multivariate linear systems of equations intorow echelon form

2x + y = 1x + 2y = −1

↦2x + y = 1

−3x = −3

(see Figure 1.1), from which we can read off the solution (x, y) =(1,−1).

Figure 1.1: Gaussian elimination for the intersection of two lines

Buchberger’s algorithm generalizes this idea to higher degreepolynomial equations, for example, it transforms

2x2 − xy + 2y2 − 2 = 02x2 − 3xy + 3y2 − 2 = 0

↦3y + 8x3 − 8x = 04x4 − 5x2 + 1 = 0

For most computations we will use the open source computer alge-bra system Singular [4], which is being developed at TU Kaisers-

Page 13: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

1. INTRODUCTION 3

lautern. Singular can be either downloaded or conveniently ac-cessed in an online interface.1

Example 1.1.1 We can do the above Grobner basis calculation inSingular by the following code:ring R=0,(y,x),lp;

ideal I = 2x2-xy+2y2-2, 2x2-3xy+3y2-2;

std(I);

[1]=4x4-5x2+1

[2]=3y+8x3-8x

The ring definition specifies the characteristic of the prime field (so0 corresponds to Q), the variables, and an ordering of the variables(lp). To make an analogy to Gaussian elimination, by the orderingyou can tell the system, in which order you want to eliminate thevariables (for example, if you want a right or left upper triangu-lar matrix as row echelon form). An ideal represents a system ofpolynomial equations, and std refers to the term standard basis,which, in the setup considered here, is synonymous to Grobner ba-sis. From the resulting system we can read off the four solutions(x, y) = (±1,0) , (±1

2 ,±1), see Figure 1.2.

Figure 1.2: Buchberger’s algorithm for the intersection of two el-lipses

Example 1.1.2 These plots can be generated in the general pur-pose (commercial) computer algebra system Maple [12] by the codewith(plots):

p1:=implicitplot(2*x^2-x*y+2*y^2-2,x=-2..2,y=-2..2):

p2:=implicitplot(2*x^2-3*x*y+3*y^2-2,x=-2..2,y=-2..2):

1See https://www.singular.uni-kl.de:8003/

Page 14: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

1. INTRODUCTION 4

display(p1,p2,view=[-2..2,-2..2],thickness=2);

p3:=implicitplot(4*x^4-5*x^2+1,x=-2..2,y=-2..2):

p4:=implicitplot(2*x^2-3*x*y+3*y^2-2,x=-2..2,y=-2..2):

display(p3,p4,view=[-2..2,-2..2],thickness=2);

As already done in these two plots, we will motivate the alge-braic concepts by connecting multivariate systems of polynomialequations to the geometry of their set of solutions, the associatedalgebraic variety. This connection is called algebraic geome-try, an important branch of mathematics and one of the key appli-cations of commutative algebra. Of course algebraic varieties canget much more interesting than 4 points. First of all, they canhave higher dimension, for example, the ellipses considered abovehave dimension 1 and are called curves. One algebraic equationin three variables will give you an example of what is called analgebraic surface, that is, a variety of dimension 2. We will learnabout an algebraic characterization of the dimension of an algebraicvariety using Grobner bases. Another interesting feature algebraicvarieties can have are singularities, which are points that do nothave a well-defined tangent plane. Considering as an example thehyperboloids Ht ⊂ R3 given

x2 + y2 − z2 + t = 0

varying with the parameter t ∈ R, the tangent plane at the point(x, y, z) is given by the affine space

(x, y, z) + ker(x, y,−z),

since (x, y,−z) is the normal vector of the surface at that point.So every point of Ht has a well-defined tangent plane, providedt ≠ 0. However, if t = 0, then (0,0,0) lies on the hyperboloid (whichnow becomes a double cone) and at this point the dimension of thekernel is not 2 but 3. So Ht is non-singular for t ≠ 0, but has asingularity at (0,0,0) for t = 0, see Figure 1.3. These plots weregenerated by the visualization tool Surfer [8], which provides aneasy-to-use graphical interface to the raytracing program Surf [6]for plotting algebraic surfaces in 3-space. It can also be called fromSingular.

Using this tool, also Figure 1.4 was generated, which shows theKummer quartic surface in 3-space, which has the maximumnumber 16 of isolated singularities, a surface given by polynomialof degree 4 in 3 variables can have.

If you look closely, you see that the configuration of singularitiesof the Kummer quartic is invariant under the symmetry group of the

Page 15: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

1. INTRODUCTION 5

Figure 1.3: Hyperboloids and double cone

Figure 1.4: Kummer quartic

tetrahedron (which is S4), see Figure 1.5. The Togliatti quinticshown in Figure 1.6 has the maximum number of 31 singularities,which a degree 5 surface can have and comes with the symmetryof a 5-gon. Again, the Barth sextic has the maximum number of65 singularities on a degree 6 surface, see Figure 1.7. It comes withthe symmetry of an icosahedron, see Figure 1.8.

Before turning to a short summary of the algebraic and geomet-ric foundations necessary for the things to come, we take a quicklook of what else is out there in computer algebra. This appe-tizer to computer algebra in number theory, group theory, calculusand algebraic geometry will hopefully stimulate the appetite at thebeginning of the meal.

Page 16: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

1. INTRODUCTION 6

Figure 1.5: Tetrahedron

Figure 1.6: Togliatti quintic

Page 17: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

1. INTRODUCTION 7

Figure 1.7: Barth sextic

Figure 1.8: Icosahedron

Page 18: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

1. INTRODUCTION 8

1.2 Numbers

One of the most important algorithms in mathematics is Euclideanalgorithm for finding the greatest common divisor. In a generalizedform, it will be present explicitly or implicitly in many algorithmswe will discuss later on. So let us invest a little bit of time in areminder on the remainder.

Lemma 1.2.1 (Division with remainder) For a, b ∈ Z, b ≠ 0,there are q, r ∈ Z with

a = b ⋅ q + r

and 0 ≤ r < ∣b∣.

Proof. Without loss of generality b > 0. The set

{w ∈ Z ∣ b ⋅w > a} ≠ ∅

has a smallest element w. Then set

q ∶= w − 1 r ∶= a − qb

Theorem 1.2.2 (Euclidean Algorithm) Suppose a1, a2 ∈ Z/ {0}.Successive division with remainder terminates

a1 = q1a2 + a3

aj = qjaj+1 + aj+2

an−2 = qn−2an−1 + an

an−1 = qn−1an + 0

andgcd (a1, a2) = an.

Reading the equations backwards

an = an−2 − qn−2an−1

a3 = a1 − q1a2

gives a representation

gcd (a1, a2) = x ⋅ a1 + y ⋅ a2

with x, y ∈ Z.

Page 19: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

1. INTRODUCTION 9

Proof. We have ∣ai+1∣ < ∣ai∣ for i ≥ 2 so after finitely many stepsai = 0. Then an divides an−1, hence also an−2 = qn−2an−1 + an andinductively an−2, . . . , a1. If t is a divisor of a1 and a2, then also ofa3, . . . , an.

Example 1.2.3 We compute the gcd of 36 and 15:

36 = 2 ⋅ 15 + 6

15 = 2 ⋅ 6 + 3

6 = 2 ⋅ 3 + 0

hence gcd (36,15) = 3. Furthermore, we can express gcd (36,15) asa Z linear combination of 36 and 15:

3 = 15 − 2 ⋅ 6 = 15 − 2 ⋅ (36 − 2 ⋅ 15) = 5 ⋅ 15 + (−2) ⋅ 36

Many other number theoretic concepts will show up later in amore general context, for example, factorization in the context ofprimary decomposition.

Definition 1.2.4 An element p ∈ Z>1 is called prime number, ifp = a ⋅ b, a, b ∈ Z≥1 implies a = 1 or b = 1.

Theorem 1.2.5 (Fundamental theorem of arithmetic) Everynumber n ∈ Z/ {0,1,−1} has a unique representation

n = ±1 ⋅ pr11 ⋅ ... ⋅ prrr

with prime factors p1 < ... < pr and ri ∈ N.

Algorithm 1.2.6 (Trial division) Let n ∈ Z be composite. Thesmallest prime factor p of n satisfies

p ≤m ∶= ⌊√n⌋ .

If we know all primes p ≤m, then we can test p ∣ n by division withremainder and, hence, factor n.

Algorithm 1.2.7 (Sieve of Eratosthenes) We can find all primenumbers smaller than n in the following way: Note all numbers from2 to n. Starting with p = 2, delete all a ⋅ p for a > 1, and continuewith the next largest number p which not has been deleted. Notethat p is prime, since it is not a multiple of smaller prime. Stop ifp >

√n.

Page 20: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

1. INTRODUCTION 10

We will discuss in Exercise 1.3 an analogue of this in the caseof univariate polynomials.

Example 1.2.8 We compute all primes ≤ 15

2 3 4 5 6 7 8 9 10 11 12 13 14 152 3 5 7 9 11 13 152 3 5 7 11 13

In the first step we delete all multiples of 2, in the second step allmultiples of 3. All remaining numbers are prime, since 5 >

√15.

One can even describe the distribution of the primes over allintegers:

Theorem 1.2.9 (Prime number theorem) For x ∈ R>0 let

π(x) = ∣{p ≤ x ∣ p ∈ N prime}∣

Then

limx→∞

π (x)x

ln(x)= 1

In Exercise 1.4 we will test the prime number theorem.Computer algebra in this spirit has many theoretical applica-

tions in number theory and algebraic geometry and practical appli-cations, for example, in coding theory or RSA public key crypto-graphy.

In general, number theory explores the properties of numbers,most importantly the interaction of addition and multiplication.This leads to many problems which are easy to formulate, buthighly non-trivial to solve. The most famous one is Fermat’s lasttheorem of 1637: There is no (non-trivial) integer solution of theequation

xn + yn = zn

for n ≥ 3. With the help of a computer one can test Fermat’s lasttheorem for very large n (using the theoretical result that you onlyhave to test it for so called irregular primes). Fermat’s last theoremwas finally proven in 1995 (by A. Wiles) after 350 years of work ofmany people, which led to many new concepts in mathematics. Oneof the leading systems in number theory is Pari/gp, see [15]. Itcan calculate, for example, with p-adic numbers, which have playedan important role in the proof of Fermat’s last theorem. Like we dowith power series, we consider two numbers as close to each other,if they differ by a high power of a prime.

Page 21: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

1. INTRODUCTION 11

Example 1.2.10 Using the prime p = 7 up to powers less than 5we calculate in Pari/gp the square root of 569:gp > n=569 + O(7^5)

%1 = 2 + 4*7 + 4*7^2 + 7^3 + O(7^5)

gp > sqrt(n)

%2 = 3 + 4*7 + 7^2 + 3*7^3 + 7^4 + O(7^5)

gp > factor((3 + 4*7 + 7^2 + 3*7^3 + 7^4)^2-569)

%2 = [7 5] [733 1]

so we observe, that

(3 + 4 ⋅ 7 + 72 + 3 ⋅ 73 + 74)2− 569 = 12 319 531 = 733 ⋅ 75.

Also Maple has very efficient implementations of algorithms innumber theory:

Example 1.2.11 Using Maple you can easily show, that the n-thFermat number Fn = 22n + 1 is prime for 0 ≤ n ≤ 4 and compositefor 5 ≤ n ≤ 8, for example:> ifactor((2^(2^6)+1))

274177 * 67280421310721

Using distributed computing one can take this a little bit further.However, it is unknown, whether there are more Fermat primesthan the 5 known ones. See also Exercise 1.4.

1.3 Groups

The concept of groups has important applications in almost everyfield of mathematics, including algebraic geometry and commuta-tive algebra. It allows us to describe symmetries in mathematicalobjects and problems, reducing a more complicated problem to asimpler one. From the practical point of view this can speed upcomputations.

Consider, for example, the symmetry group G of the octahedron(Figure 1.9), which contains all rotations, reflections, and rotoreflec-tions, which map the octahedron to itself. Numbering the vertices,we can identify any symmetry with an element of the symmetricgroup S6. For example, the rotation by 90 degrees along the axisthrough 1 and 6 is given by (2,3,4,5) ∈ S6 using cycle notation.

Let us say, we want to compute the stabilizers of the vertices ofthe octahedron, that is, the subgroups

Stab(j) = {σ ∈ G ∣ σ(j) = j} .

Page 22: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

1. INTRODUCTION 12

Figure 1.9: Octahedron

By the action of G, it is sufficient to determine Stab(1), since allstabilizers can be identified by conjugation of groups

Stab(j) = σ−1 Stab(1)σ,

where σ ∈ G with 1 = σ(j). So instead of 6 computations, by takingthe symmetry of the problem into account, we only have to do one.

To compute the group order of Stab(1), we use:

Theorem 1.3.1 (Orbit-counting theorem) Let G be a groupacting on a set X by

G ×X →X

(that is, ex = x and (g ○ h)x = g(hx) for all x ∈ X and g, h ∈ G).Fix x ∈X and write

Gx = {gx ∣ g ∈ G}

for the orbit of x and

Stab(x) = {g ∈ G ∣ gx = x} .

for the stabilizer of x. Then

∣G∣ = ∣Gx∣ ⋅ ∣Stab(x)∣ .

Hence

∣Stab(1)∣ =∣G∣

6,

and, if p is a point which does not lie on any symmetry plane oraxis,

∣G∣ = ∣Stab(p)∣ ⋅ ∣Gp∣ = 1 ⋅ (6 ⋅ 8) = 48,

Page 23: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

1. INTRODUCTION 13

Figure 1.10: Generic point on octahedron.

see Figure 1.10, so∣Stab(1)∣ = 8.

It is easy to guess elements of G and Stab(1), but how do we know,whether they really generate the respective groups, equivalently,that they generate groups of the correct order? We can leave thistedious calculation to the open source computer algebra systemGap [14], the leading software for group theory:

Example 1.3.2 We use Gap to prove that

Stab(1) = ⟨(2,3,4,5), (2,4)⟩

gap> Stab1:=Group((2,3,4,5),(2,4));;

gap> Size(Stab1);

8gap> Elements(Stab1);

[(),(3,5),(2,3)(4,5),(2,3,4,5),(2,4),(2,4)(3,5),

(2,5,4,3),(2,5)(3,4)]

In the same way, we can find generators of the whole symmetrygroup:gap> G:=Group((2,3,4,5),(1,3)(5,6));;

gap> Size(G);

48

HenceG = ⟨(2,3,4,5), (1,3)(5,6)⟩ .

See Exercise 1.5 for the symmetry group of the icosahedron.Gap implements algorithms for computing with subgroups of

symmetric groups. As we have seen, given a set of generators, it can

Page 24: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

1. INTRODUCTION 14

determine the group order, and the set of all elements. It can alsodetermine, whether two such groups are isomorphic, and specifyan isomorphism. Computing inside symmetric groups seems like arestriction, however, this is sufficient for many purposes, becauseof the following:

Theorem 1.3.3 (Cayley) Every group G is isomorphic to a sub-group of the group S (G) of bijections G→ G.

Proof. The action of G on itself induced by the group operation

G ×GÐ→ G

(g, h)↦ g ○ h

yields a group homomorphism

ϕ ∶ G → S (G)

g ↦ (G → Gh ↦ g ○ h

)

and sinceKer(ϕ) = {g ∈ G ∣ gh = h ∀h ∈ G} = {e}

ϕ is injective. So by the homomorphism theorem

G = G/Ker(ϕ) ≅ Im(ϕ) ⊂ S (G) .

For finite groups this just amounts to writing down the grouptable. For g ∈ G the bijection ϕ(g) maps the e-th row of the grouptable to the g-th row.

Example 1.3.4 For G = Z/3 = {0,1,2} with group table

+ 0 1 2

0 0 1 21 1 2 02 2 0 1

we haveϕ(1) = (0,1,2) ∈ S (G)

using cycle notation.

Page 25: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

1. INTRODUCTION 15

1.4 Symbolic Integration

In addition to the specialized systems like Singular, Gap andPari/gp, there are general purpose computer algebra systems likethe commercial systems Maple [12], and Mathematica [16], andthe open source systems Maxima [13], Reduce [10], and Axiom[2]. They are usually less powerful in the specific areas, but pro-vide a larger set of algorithms to manipulate symbolic expressions.Most noteably there is Risch’s algorithm for symbolic integra-tion of functions which are compositions of rational functions, ex-ponentials, logarithm, radicals, and trigonometric functions. It isbased on the theorem of Liouville, which uses the following defi-nitions: A differential field is field K with a differentiation mapK → K, f ↦ f ′, which satisfies the usual rules (f + g)′ = f ′ + g′

and (fg)′ = f ′g + fg′. Denote by Const(K) = {f ∈K ∣ f ′ = 0} itssubfield of constants. An elementary extension K ⊂ E is afield extension, which can be obtained by a sequence of extensions,which are either algebraic, exponential, that is, transcendental ofthe form F ⊂ F (g) with

g′ = g ⋅ f ′

for some f ∈ K , or logarithmic, that is, transcendental of theform F ⊂ F (g) with

g′ =f ′

f

for some f ∈K.

Theorem 1.4.1 (Liouville) Let K be a differential field with fieldof constants C = Const(K), and F ∈ K. If there is an elementaryextension K ⊂ E and G ∈ E with

G′ = F

then there are constants c1, . . . , cn ∈ C in an algebraic field extensionof C, and functions v ∈K, u1, . . . , un ∈K(c1, . . . , cn) such that

G = v +∑iai lnui.

This tells us, that if an elementary function has an elementaryintegral, then this integral can be written in the functions usedto write down the integrand and their logarithms. Based on thisobservation, Risch’s algorithm decides the existence of G, and com-putes G, if it exists. However note, that the only almost completeimplementation of Risch’s algorithm is that of Axiom.

Page 26: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

1. INTRODUCTION 16

Example 1.4.2 We have ∫ xndx = 1

n+1xn+1 provided n ≠ −1 and

∫1xdx = lnx. On the other hand, the function e−x

2does not have

an elementary integral.

Example 1.4.3 We compute the area A inside the ellipse

(x

a)

2

+ (y

b)

2

= 1

using Maple:F:=int(2*b/a*sqrt(a^2-x^2),x);

F:=b/a*sqrt(a^2-x^2)*x+a*b*arctan(x/sqrt(a^2-x^2))

and hence A = πab.

In this spirit, general purpose computer algebra systems areheavily used for solving differential equations and, hence are verypopular in physics (most noteably Reduce).

Example 1.4.4 Consider the damped harmonic oscillator describedby the ordinary differential equation (ODE)

x′′(t) = −a ⋅ x(t) − b ⋅ x′(t).

Here t is the time, x(t) the position, x′(t) the speed, and x′′(t) theacceleration of the object, see Figure 1.11.

Figure 1.11: Harmonic oscillator

Choosing the parameters a = 5 and b = 1, and the boundaryconditions x(0) = 1 (starting position) and x′(0) = 1 (starting speed)we solve this differential equation using Maple:ode := diff(x(t),t$2)+diff(x(t),t)+5*x(t);d2

dt2x(t) +ddtx(t) + 5 ⋅ x(t)

dsolve(ode);

x(t) = C1e− 1

2t sin(

√192 t) +C2e

− 12t cos(

√192 t)

f:=subs({ C1=1, C2=1},subs(%,x(t)));f ∶= e−

12t sin(

√192 t) + e−

12t cos(

√192 t)

plot(f,t=0..5);

The plot command will generate Figure 1.12 showing the solutionx(t).

Page 27: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

1. INTRODUCTION 17

–1

0

1

1 2 3 4 5

Figure 1.12: Solution to the harmonic oscillator

1.5 Linear Algebra

In addition to the Euclidean algorithm, the second key algorithmgeneralized by Buchberger’s algorithm is Gaussian reduction. Wecan reformulate Gaussian reduction on a homogeneous linear sys-tem of equations over a field K in the following way:

Algorithm 1.5.1 (Gauss) Consider non-zero homogeneous lin-ear polynomials f1, . . . , fn ∈ K[x1, . . . , xm]. Choose an ordering ofthe variables (without loss of generality x1 > x2 > ... > xm). DefineL(fi) as the largest monomial of fi and by LC(fi) its coefficient.

As long as there are fi and fj with L(fi) = L(fj) replace fj bythe S-pair

spoly(fi, fj) = LC(fi) ⋅ fj − LC(fj) ⋅ fi.

If fj = 0 then delete fj.Sort the set of fj by the size of L(fj).

This algorithm terminates with a row echelon form. If we re-duce the resulting polynomials by those with smaller lead monomi-als, and divide all polynomials by their lead coefficients, we obtainthe (unique) reduced row echelon form. When discussing Grobnerbases, we will see how the special case of linear equations generalizesto the higher degree setup.

Page 28: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

1. INTRODUCTION 18

Example 1.5.2 We solve the system

f1 = x1 + x2 + x5 = 0f2 = x1 + x2 + 2x3 + 2x4 + x5 = 0f3 = x1 + x2 + x3 + x4 + x5 = 0

Gaussian elimination yields

f1 = x1 + x2 + + x5 = 0spoly(f1, f2) = 2x3 + 2x4 = 0spoly(f1, f3) = x3 + x4 = 0

and, since the S-pair of the last two vanishes

x1 + x2 + + x5 = 02x3 + 2x4 = 0

Using matrix notation, we can do the Gaussian elimination inMaple by the following code:with(LinearAlgebra):

A := <<1,1,1>∣<1,1,1>∣<0,2,1>∣<0,2,1>∣<1,1,1>>:GaussianElimination(A);⎡⎢⎢⎢⎢⎣

1 1 0 0 10 0 2 2 00 0 0 0 0

⎤⎥⎥⎥⎥⎦

Utilizing the Grobner basis engine of Singular, we can do thesame computation as follows:ring R = 0,(x(1..5)),lp;

ideal I = x(1) + x(2) + x(5),

x(1) + x(2) + 2*x(3) + 2*x(4) + x(5),

x(1) + x(2) + x(3) + x(4) + x(5);

option(redSB);

std(I);

[1] = x(3) + x(4)

[2] = x(1) + x(2) + x(5)

See also Exercise 1.6.

Remark 1.5.3 Solving an inhomogeneous linear system of equa-tions

fi =∑jaijxj − ci = 0

can be reduced to the homogeneous case by homogenizing the systemto

fi =∑jaijxj − ciy = 0

with a homogenization variable y. See also Exercise 1.7. We willcome back to this idea later in the context of higher degree polyno-mial equations.

Page 29: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

1. INTRODUCTION 19

1.6 Algebraic Geometry

If we pass from linear systems to polynomial equations of higherdegree things become much more interesting. Algebraic geometrystudies the set of solutions of such systems. It will be the mainmotivation of the algorithms we encounter in commutative algebra.

Definition 1.6.1 The affine space of dimension n over the fieldK is defined as

An(K) =Kn

By this notation we express that we (usually) do not care aboutthe structure of Kn as a K-vector space.

Definition 1.6.2 An affine algebraic set is the common zeroset

V (f1, . . . , fr) = {p ∈ An(K) ∣ f1(p) = 0, . . . , fr(p) = 0}

of polynomials f1, . . . , fr ∈K[x1, . . . , xn].An affine algebraic set X is called irreducible, if it cannot be

written as X =X1 ∪X2 with affine algebraic sets Xi ⫋X. Then wealso call X an affine algebraic variety.

Example 1.6.3 Affine algebraic varieties commonly known alsooutside algebraic geometry are V (1) = ∅, V (0) = Kn, the set ofsolutions of a linear system of equations

A ⋅ x − b = 0

or the graph

Γ (g) = V (x2 ⋅ b (x1) − a (x1)) ⊂ A2(K)

of a rational function

g =a

b∈K(x1).

For example, the graph of g(x1) =x31−1

x1is

V (x2x1 − x31 + 1) ⊂ A2(K),

as depicted in Figure 1.13 for K = R.

Page 30: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

1. INTRODUCTION 20

Figure 1.13: Graph of a rational function.

Example 1.6.4 If f ∈K[x1, . . . , xn] is non-zero and non-constant,then V (f) ⊂ An(K) is called a hypersurface. For example, thesurfaces shown in the Figures 1.4, 1.6, and 1.7 are hypersurfacesin A3(R).

Note, that V (f) is irreducible, if and only if f is irreducible. InExercise 1.10 we will discuss, in the case that K is a finite field, aprobabilistic test for checking whether f is irreducible.

For the remainder of this section we will take a closer look at el-liptic curves. After that, we will discuss the algorithmic foundationfor computating with algebraic sets in the next chapter.

Example 1.6.5 Not every curve in A2(K) is a graph, for example,the circle

V (x21 + x

22 − 1) ⊂ A2(R)

or the elliptic curve

V (x22 − x

31 − x

21 + 2x1 − 1) ⊂ A2(R)

are not, see Figure 1.14.

Example 1.6.6 In general, an elliptic curve is of the form E =V (f) where f ∈ K[x1, x2] is an irreducible polynomial of degree

3 and V (f, ∂f∂x ,∂f∂y) = ∅, which guarantees that the curve does not

have a singularity. The set of points of an elliptic curve has thefollowing remarkable property: It comes with the structure of anabelian group with the operation as specified in Figure 1.15. Canyou tell what is the neutral element?

Page 31: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

1. INTRODUCTION 21

Figure 1.14: Elliptic curve

Example 1.6.7 If we consider elliptic curves over the field Q

E(Q) = {p ∈ A2(Q) ∣ f (p) = 0}

(also called the Q-rational points of the elliptic curve over C),we close the circle back to number theory: The Theorem of Mordellshows, that E(Q) as a group is finitely generated. The structure ofa finitely generated group is known: It is the product of factors Zand Z/n (that is, of cyclic groups). The question about the numberof Z-factors of E(Q) is the topic of ongoing research (for example,on the conjecture of Birch and Swinnerton-Dyer, which in fact isbased on computer experiments, and is one of the one million dollarproblems).

An important application of elliptic curves is public-key crypto-graphy. Given a crypto system based on the discrete logarithm inthe prime residue class group F×p (like Diffie-Hellman key exchange),one can replace F×p by the group E (Fp) ⊂ A2(Fp) of points of anelliptic curve over a finite field Fp. This allows one to achieve thesame strength with a much smaller key size.

One can show that (for p ≥ 5) in a suitable coordinate systemevery elliptic curve can be written as

E (Fp) = {(x, y) ∈ A2(Fp) ∣ f (x, y) = 0} ∪ {O}

with a polynomial

f = (x3 + a ⋅ x + b) − y2 ∈ Fp [x, y]

Page 32: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

1. INTRODUCTION 22

Figure 1.15: Group structure on an elliptic curve.

with 4a3+27b2 ≠ 0 modp. HereO denotes the point at infinity, whichlies on any line parallel to the y-axis and is the neutral element ofthe group.

Example 1.6.8 Figure 1.16 depicts in black the points of the curve

x3 − 2x + 1 − y2 = 0

over F7 (where y is the vertical axis). The grey dots are the pointsof the line

x − 2y − 1 = 0

through the points P,Q ∈ E (F7). The sum P + Q is obtained asthe reflection of the third point of intersection − (P +Q) of the linewith the curve. Note: If we substitute x = 2y + 1 into f , we obtaina polynomial of degree 3 in one variable

y3 + 4y2 + 2y = 0

which has 3 zeros y = 0,1,2 corresponding to the 3 points of inter-section (1,0), (3,1) and (−2,2). This is a special case of Bezout’stheorem.

In the context of cryptography it is of course important to knowthe group order (that is, the number of points) of E (Fp). Weanswer this question using the computer algebra system Magma,which is the only closed source system devoted to algebraic geome-try, number theory and combinatorics. The curve is specified by thevector [0,0,0, a, b]

Page 33: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

1. INTRODUCTION 23

Q

P

P+Q

-P-Q

–3

–2

–1

0

1

2

3

–3 –2 –1 0 1 2 3

Figure 1.16: Elliptic curve over F7

F := FiniteField(7,1);

E := EllipticCurve([Zero(F),Zero(F),Zero(F),-2,1]);

E;

Elliptic Curve defined by y^2 = x^3 + 5*x +1 over GF(7)

#E;

12

Note that this includes O, not visible in Figure 1.16. Of course wecan also do larger examples:F := FiniteField(NextPrime(10^30),1);

E := EllipticCurve([Zero(F),Zero(F),Zero(F),-2,1]);

#E;

999999999999999242601621761120

How does this work? Let p be an odd prime. The Legendresymbol is defined for c ∈ Z by

(c

p) =

⎧⎪⎪⎪⎨⎪⎪⎪⎩

1 if y2 ≡ cmodp is solveable and p ∤ c−1 if y2 ≡ cmodp is not solveable0 if p ∣ c

With this notation, given x ∈ Fp we have

(x3 + a ⋅ x + b

p) =

⎧⎪⎪⎪⎨⎪⎪⎪⎩

1 ⇔ if there are 2 points (x,−) ∈ E (Fp)−1 ⇔ if there is no point (x,−) ∈ E (Fp)0 ⇔ if there is 1 point (x,−) ∈ E (Fp)

Page 34: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

1. INTRODUCTION 24

that is, there are exactly

1 + (x3 + a ⋅ x + b

p)

points of the form (x,−) ∈ E (Fp). Hence we obtain (not forgettingthe point at infinity O):

Theorem 1.6.9 On the elliptic curve

E (Fp) = {(x, y) ∈ F2p ∣ x3 + a ⋅ x + b = y2} ∪ {O}

there are exactly

∣E (Fp)∣ = p + 1 + ∑x∈Fp

(x3 + a ⋅ x + b

p)

points.

See also Exercise 1.8. Theorem 1.6.9 immediately implies:

Corollar 1.6.10 For the number of points of an elliptic curve E (Fp)it holds

1 ≤ ∣E (Fp)∣ ≤ 2p + 1

More precisely there is the following theorem (which we cannotprove here):

Theorem 1.6.11 (Hasse) The number of points of an elliptic curveE (Fp) satisfies

p + 1 − 2√p ≤ ∣E (Fp)∣ ≤ p + 1 + 2

√p

One can show, that all possible values are indeed attained. InExercise 1.9 we verify this theorem for a finite set of primes.

To compute ∣E (Fp)∣ it remains to evaluate the Legendre symbol,which one can do as follows. To obtain an easier algorithm, we firstgeneralize the Legendre symbol:

Definition 1.6.12 If n = p1 ⋅ ... ⋅ pr with odd primes pi and c ∈ Z,then define the Jacobi symbol as

(c

n) ∶=

r

∏i=1

(c

pi).

Note, that Singular (like most other computer algebra sys-tems) has a command to compute the Jacobi symbol.

Page 35: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

1. INTRODUCTION 25

Remark 1.6.13 If b ≡ cmodn, then

(b

n) = (

c

n).

For any b and c

(b ⋅ c

n) = (

b

n)(c

n).

Theorem 1.6.14 (Law of quadratic reciprocity) If b, c > 0 areodd, then

(b

c) = (−1)

(b−1)(c−1)4 (

c

b)

and

(2

c) = (−1)

c2−18 .

A proof can be found in most books on algebra or number the-ory. The formulas of Remark 1.6.13 and Theorem 1.6.14 yield arecursive algorithm to compute the Jacobi symbol.

Example 1.6.15 We apply this algorithm:

(55

103) = −(

103

55) = −(

48

55) = −(

2

55)

4

(3

55)

= (55

3) = (

1

3) = 1

Hypersurfaces X = V (f) ⊂ An(K), as considered above, aregiven by a single non-constant equation f ∈K[x1, . . . , xn]. We alsospeak of an algebraic set of codimension 1. The set of 4 points inA2(R) we considered in Figure 1.2 was given by two equations

2x2 − xy + 2y2 − 2 = 02x2 − 3xy + 3y2 − 2 = 0

and has codimension 2. Once we give a precise definition of thedimension dimX of a variety X, we can define the codimension asthe difference

codimX = n − dimX.

We will see that, in general, the codimension can differ from thenumber of equations. As in the case of linear equations and vectorspaces, the first step is to write down an independent set of equa-tions, that is, a Grobner basis. Even then, the codimension can besmaller than the number of equations, however, we will describe analgorithm to compute the dimension (and hence the codimension)from a Grobner basis.

Page 36: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

1. INTRODUCTION 26

1.7 Exercises

Exercise 1.1 Install Singular, Gap, Pari/Gp, and Surferand try the examples featured in Chapter 1. Check out the onlinehelp pages.

Exercise 1.2 1) Implement the Euclidian Algorithm for com-puting the greatest common divisor in Z. Test your imple-mentation at examples.

2) Use your implementation to cancel

90189116021

18189250063.

Exercise 1.3 Let p be a prime and Fp = Z/p the field with p ele-ments.

1) Use an analogue of the sieve of Eratosthenes to find all irre-ducible polynomials in F2[x] of degree ≤ 3.

2) Factor x5 + x2 + x + 1 ∈ F2[x] into a product of irreduciblepolynomials.

3) Determine all elements of

K = F2 [x] / (x2 + x + 1) ,

the addition table of K, and the multiplication table of K.Prove that K is a field. What is the characteristic of K?

Exercise 1.4 Test the prime number theorem:

1) Write a procedure to compute

π (x) = ∣{p ≤ x ∣ p ∈ N prime}∣

for x > 0.

2) Plot π(x)x and 1

ln(x) and compare for large x.

3) Show that, according to the prime number theorem, the totalexpected number of Fermat primes is finite.

Recall, that a Fermat prime is a prime number of the form

Fn = 22n + 1

with n ∈ N0.

Page 37: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

1. INTRODUCTION 27

Figure 1.17: Icosahedron with numbering of the vertices.

Exercise 1.5 Let G be the symmetry group of the icosahedron (Fig-ure 1.17).

1) Compute the group order of G.

2) Find generators of G as a subgroup of S12. Prove your claimusing Gap.

Exercise 1.6 Let A ∈ Qn×m be a matrix. Using the Singularcommand Grobner basis command std for ideals, implement a pro-cedure which computes the reduced row echelon form of A.

You may also want to use the following commands, see the on-line help: ring, matrix, proc, int, nrows, ncols, def, basering,imap, poly, ideal, for, option(redSB), diff, maxideal, setring,return.

Exercise 1.7 Using the idea of homogenization, describe an algo-rithm for describing the set of solutions of an inhomogeneous sys-tem of linear equations, which is based on the algorithm for solvinga homogeneous system.

Exercise 1.8 Let p ≥ 5 be a prime, and

Ea,b (Fp) = {(x, y) ∈ A2(Fp) ∣ fa,b (x, y) = 0} ∪ {O}

an elliptic curve given by

fa,b = x3 + a ⋅ x + b − y2 ∈ Fp [x, y] .

with 4a3 + 27b2 ≠ 0 modp. Write a procedure, which computes thenumber of points ∣Ea,b (Fp)∣ of the elliptic curve.

Note: You can simply test all points of A2(Fp), or make use ofthe Singular command Jacobi.

Page 38: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

1. INTRODUCTION 28

Exercise 1.9 Using your procedure from Exercise 1.8, prove Hasse’stheorem

p + 1 − 2√p ≤ ∣Ea,b (Fp)∣ ≤ p + 1 + 2

√p

for all primes p with 5 ≤ p ≤ 53. Verify that ∣Ea,b (Fp)∣ takes allpossible values.

Exercise 1.10 Let p be a prime and f ∈ Fp[x1, . . . , xn] a non-constant polynomial. For every point x ∈ An(Fp) the polynomialf can take p possible values f(x). Assume that an irreducible poly-nomial f takes these values with equal probability 1

p for randomlychosen x.

1) What is the probability that f(x) = 0 for random x under theassumption that f is the product of two irreducible polynomi-als.

2) Derive from this a probabilistic test for irreducibility.

3) Try out examples and compare with the Singular commandfactorize or the Maple command Factor() mod p.

Page 39: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2

Ideals, Varieties andStandard Bases

2.1 Ideals and Varieties

We begin with an easy, but important, observation about the alge-braic set V (f1, . . . , fs) with fi ∈ R =K [x1, . . . , xn]:

If f1 (p) = 0, . . . , fs (p) = 0 for p ∈ An(K), then also any R-linearcombination of the fi vanishes on p, that is,

(s

∑i=1

ri ⋅ fi)(p) =s

∑i=1

ri (p) fi (p) = 0

for all ri ∈ R. Hence, V (f1, . . . , fs) depends only on the ideal

⟨f1, . . . , fs⟩ = {∑si=1rifi ∣ ri ∈ R} ⊂ R,

generated by f1, . . . , fs. Recall:

Definition 2.1.1 Let R be a commutative ring with 1. An idealis a non-empty subset I ⊂ R with

a + b ∈ I

ra ∈ I

for all a, b ∈ I and r ∈ R.If S ⊂ R then

⟨S⟩ = {∑finiterifi ∣ ri ∈ R, fi ∈ S}

is the ideal generated by S.

29

Page 40: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 30

Figure 2.1: Elliptical arc

Recall, that the definition of an ideal is motivated in algebraby the following: For a subgroup I ⊂ R the additive group R/Ibecomes a ring with multiplication induced by that of R if andonly if I is an ideal (prove this as an easy exercise).

By the above observation it is natural to consider, instead ofthe vanishing locus of a set of equations, the vanishing locus of anideal:

Definition 2.1.2 If I ⊂K [x1, . . . , xn] then

V (I) = {p ∈Kn ∣ f (p) = 0 ∀f ∈ I}

is called the vanishing locus of I.

This is indeed an affine variety, because any ideal I ⊂ k [x1, . . . , xn]is finitely generated, as we will prove in Theorem 2.1.7.

Definition 2.1.3 Let S ⊂ An(K) be a subset. Then

I(S) = {f ∈K [x1, . . . , xn] ∣ f (p) = 0 ∀p ∈ S}

is (as we have seen above) an ideal, the vanishing ideal of S.

Example 2.1.4 Consider the elliptical arc

S = {(x1, x2) ∈ An(R) ∣ x21 + 2x2

2 = 1 and x1, x2 ≥ 0}

shown in black in Figure 2.1. We have

I(S) = (x21 + 2x2

2 − 1)

hence V (I(S)) is the complete ellipse, the smallest algebraic setcontaining S. This is the closure

S = V (I(S))

Page 41: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 31

of S in the so called Zariski topology:The Zariski topology on An(K) has as closed sets the V (I)

for ideals I ⊂K [x1, . . . , xn]. See also Exercise 2.2, which you needto show that this indeed gives a topology.

By I and V inclusion reversing maps

{affine algebraic sets X ⊂ An(K)}I⇄V

{ideals in K[x1, . . . , xn]}

between the set of algebraic subsets of An(K) and the set of idealsof K [x1, . . . , xn] are given. It remains to show that any ideal I ⊂K[x1, . . . , xn] is finitely generated, that is, there are finitely manyf1, . . . , fs ∈ R with I = ⟨f1, . . . , fs⟩. We begin with a characterizationof these ideals:

Theorem 2.1.5 Let R be a commutative ring with 1. The follow-ing conditions are equivalent:

1) Every ideal I ⊂ R is finitely generated .

2) Every ascending chain

I1 ⊂ I2 ⊂ I3 ⊂ ... ⊂ In ⊂ ...

of ideals terminates, that is, there is an m, such that

Im = Im+1 = Im+2 = ...

3) Every non-empty set of ideals has a maximal element withrespect to inclusion.

If R satisfies these conditions, then R is called Noetherian.

These rings are called Noetherian after Emmy Noether (1882-1935), who has formulated the general structure theory for this classof rings and used this to give a simpler and more general proof ofthe theorems of Kronecker and Lasker.Proof. (1)Ô⇒ (2): Let I1 ⊂ I2 ⊂ ... be a chain of ideals. Then

I = ⋃∞j=1Ij

is also an ideal: If a, b ∈ I, then there are j1, j2 ∈ N with a ∈ Ij1 ,b ∈ Ij2 , and

a + b ∈ Imax(j1,j2) ⊂ I

Page 42: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 32

By (1) the ideal I is finitely generated, hence there are a1, . . . , as ∈ Iwith I = ⟨f1, . . . , fs⟩. For every fk there is a jk with fk ∈ Ijk . For

m ∶= max{jk ∣ k = 1, . . . , s}

we have f1, . . . , fs ∈ Im, so

I = ⟨f1, . . . , fs⟩ ⊂ Im ⊂ Im+1 ⊂ ... ⊂ I

and henceIm = Im+1 = ...

(2) Ô⇒ (3): Assume that (3) does not hold. Then there is a setM of ideals, such that for every I ∈M there is an I ′ ∈M with I ⫋ I ′

strictly contained. Hence, by induction, we obtain a sequence

I1 ⫋ I2 ⫋ I3 ⫋ ...

of ideals in M , which does not terminate, that is, (2) is not satisfied.(3)Ô⇒ (1): Let I be an arbitrary ideal. The set

M = {I ′ ⊂ I ∣ I ′ finitely generated}

is non-empty, for example, ⟨0⟩ ∈M . Let J be a maximal element ofM . So there are f1, . . . , fs ∈ J with J = ⟨f1, . . . , fs⟩. We show thatI = J : If this is not true, then there is an f ∈ I/J with

J ⫋ ⟨f1, . . . , fs, f⟩ ⊂ I.

This contradicts the maximality of J .

Example 2.1.6 1) The ring of integers Z is Noetherian, sinceall ideals of Z are of the form

⟨n⟩ = nZ = {nk ∣ k ∈ Z}

and, hence, are finitely generated (by a single element). SeeExercise 2.1.

2) A field K only has the ideals (0) and K = (1), in particular,K is Noetherian.

3) If R is Noetherian and I ⊂ R an ideal, then the quotient ringR/I is Noetherian:

Let π ∶ R → R/I be the canonical epimorphism. If J ⊂ R/Ian ideal then by assumption π−1(J) = ⟨f1, . . . , fs⟩, and J =⟨π(f1), . . . , f(fs)⟩.

Page 43: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 33

4) The polynomial ring K[x1, x2, ...] in infinitely many variablesis not Noetherian. Also the ring

R = {f ∈ Q[X] ∣ f(0) ∈ Z}

of polynomials in Q[X] with integer values at 0 is not Noethe-rian. See Exercise 2.4.

Hilbert has shown in 1890, that the polynomial ring K [x1, ...xn]over a field K is Noetherian:

Theorem 2.1.7 (Hilbert’s basis theorem) If R is a Noetherianring, then also R [x] is Noetherian.

Using that a field K and the ring of integers Z are Noetherian,by induction on the number n of variables

R [x1, . . . , xn] = R [x1, . . . , xn−1] [xn]

we obtain:

Corollar 2.1.8 Let K be a field. Then the polynomial rings K [x1, ...xn]and Z [x1, ...xn] in n variables are Noetherian.

The fact that K [x1, ...xn]is Noetherian, is the basis of all algo-rithms, we will discuss.

For the proof of Theorem 2.1.7 we consider the lead coefficientsin R of polynomials in R [x]. If

f = akxk + ... + a1x + a0 ∈ R [x]

with ak ≠ 0 then the degree of f is deg (f) = k, its lead coeffi-cient is LC (f) = ak, its lead term LT (f) = akxk, and its leadmonomial L (f) = xk.Proof. Assume R [x] is not Noetherian. Then there is an idealI ⊂ R [x] which is not finitely generated. Let f1 ∈ I with deg (f1)minimal, f2 ∈ I/ ⟨f1⟩ mit deg (f2) minimal, and inductively

fk ∈ I/ ⟨f1, . . . , fk−1⟩

with deg (fk) minimal. Then

deg (f1) ≤ deg (f2) ≤ ... ≤ deg (fk) ≤ ...

and we obtain an ascending chain of ideals in R

⟨LC (f1)⟩ ⊂ ⟨LC (f1) ,LC (f2)⟩ ⊂ ... ⊂ ⟨LC (f1) , . . . ,LC (fk)⟩ ⊂ ...

Page 44: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 34

We show that the inclusions are strict (and hence R is not Noethe-rian): Assume

⟨LC (f1) , . . . ,LC (fk)⟩ = ⟨LC (f1) , . . . ,LC (fk+1)⟩

Then we can write

LC (fk+1) =k

∑j=1

bj LC (fj)

with bj ∈ R. Hence

g ∶=k

∑j=1

bj ⋅ xdeg(fk+1)−deg(fj) ⋅ fj

∈ ⟨f1, . . . , fk⟩

has the same lead term as fk+1, so

deg (g − fk+1) < deg (fk+1) ,

a contradiction, since fk+1 was chosen to have minimal degree.So any algebraic set can be represented by an ideal, and any

ideal gives an algebraic set. However, the V -map is not injective,for example,

V (x) = V (x2) ⊂ A1(K).

There are two ways to remedy this situation. One possibility isto generalize our notation of an algebraic set: Given I ⊂ R =K[x1, . . . , xn] we replace V (I) by the spectrum

Spec(R/I) = {P ⊂ R/I ∣ P prime ideal}

and consider R/I as the ring of function on Spec(R/I). Togetherwith the Zariski topology we obtain a generalization of an alge-braic set, called a scheme. An easier approach is to restrict theclass of ideals in consideration. To determine that class of ideals, itis, astonishingly, enough to find out, under which conditions an al-gebraic set is empty. This is characterized by the following theoremof Hilbert (which we cannot prove here):

Theorem 2.1.9 (Weak Nullstellensatz) Let K be an algebraicallyclosed field and I ⊂K[x1, . . . , xn] an ideal. Then

V (I) = ∅⇐⇒ I =K[x1, . . . , xn]

Remark 2.1.10 The condition, that K is algebraically closed, isnecessary. For example, V (x2 + y2 + 1) ⊂ A2(R) is empty (it is notempty over C).

Page 45: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 35

From Theorem 2.1.9 we obtain:

Theorem 2.1.11 (Strong Nullstellensatz) Let K be an alge-braically closed field and I ⊂K[x1, . . . , xn] an ideal. Then

I(V (I)) =√I.

where √I = {f ∈K[x1, . . . , xn] ∣ ∃a ∈ N with fa ∈ I}

denotes the radical of I.

Proof. According to the basis theorem, write I = ⟨f1, . . . , fs⟩. Forf ∈ I(V (I)) consider

J = ⟨I, y ⋅ f − 1⟩ ⊂K[x1, . . . , xn, y].

Since f vanishes at any common zero of f1, . . . , fs, and, hence, y ⋅f − 1 does not, we have V (J) = ∅. So by Theorem 2.1.9 J =K[x1, . . . , xn, y], that is, there are ci, d ∈K[x1, . . . , xn, y] with

1 = c1 ⋅ f1 + ... + cs ⋅ fs + d ⋅ (y ⋅ f − 1).

Substituting y = 1f makes the coefficients to ci(x1, . . . , xn,

1f ). So

multiplying with a sufficiently high power a of f cancels the de-nominators and yields fa ∈ I.

The other inclusion is easy.

Definition 2.1.12 An ideal I ⊂ K[x1, . . . , xn] is called a radicalideal, if I =

√I.

Theorem 2.1.11 shows that, if K is algebraically closed,

{affine algebraic sets X ⊂ An(K)}I⇄V

{radical ideals in K[x1, . . . , xn]}

is a one-to-one correspondence. In Exercise 2.3 we will prove, thatan algebraic set X = V (I) is irreducible, if and only if I(V (I)) isprime. This is true over any field K. If K is algebraically closed,then, by the strong Nullstellensatz, V (I) is irreducible iff I(V (I)) =√I is prime. In particular, if I is prime then V (I) is irreducible.

Note that this is not true in general if K is not algebraically closed.So for K algebraically closed we obtain a one-to-one correspondenceof varieties (irreducible algebraic sets) and prime ideals:

{affine varieties X ⊂ An(K)}I⇄V

{prime ideals in K[x1, . . . , xn]}

Page 46: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 36

If K is algebraically closed, the points correspond to the maximalideals, that is, we have a one–to-one correspondence

{maximal ideals of K[x1, . . . , xn]}V⇄I

Kn

⟨x − a1, . . . , x − an⟩ (a1, . . . , an)

Recall, that an ideal P ⫋ R of a commutative ring R with 1 iscalled prime ideal, if ∀a, b ∈ R it holds

a ⋅ b ∈ P Ô⇒ a ∈ P or b ∈ P .

The ideal P is called maximal ideal, if for all ideals I ⊂ R it holds

P ⊂ I ⫋ RÔ⇒ P = I.

Recall also the following, standard and easy to prove, characteriza-tion of prime and maximal ideals:

Theorem 2.1.13 Let R be a commutative ring with 1 and I ⫋ Ran ideal. Then it holds:

1) I prime ⇐⇒ R/I is an integral domain.

2) I maximal ⇐⇒ R/I is a field.

Example 2.1.14 1) The ideal ⟨x2⟩ ⊂K[x1, x2] is a prime ideal,because

K[x1, x2]/ (x2) ≅K[x1]

is an integral domain. On the other hand, ⟨x1 ⋅ x2⟩ is not aprime ideal, since

x1 ⋅ x2 = 0 ∈K[x1, x2]/I

and x1, x2 ≠ 0. Geometrically, the prime ideals ⟨x1⟩ and ⟨x2⟩correspond to the coordinate axes and ⟨x1 ⋅ x2⟩ to their union

V (x1 ⋅ x2) = V (x1) ∪ V (x2)

2) The ideal ⟨x2 − x21⟩ ⊂K [x1, x2] is a prime ideal, since

K [x1, x2] / ⟨x2 − x21⟩ → K[t]x1 ↦ tx2 ↦ t2

is an isomorphism and K[t] is an integral domain.

Page 47: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 37

Figure 2.2: Reducible affine algebraic set

The idealI = ⟨(x2 − x

21) ⋅ (x1 − x

22)⟩

is not prime, and

V (I) = V (x2 − x21) ∪ V (x1 − x

22),

see Figure 2.2.

In fact, any radical ideal can be written as an intersection ofprime ideals, more generally, any ideal as an intersection of, socalled, primary ideals. We will discuss in detail an algorithm whichcomputes this primary decomposition.

Example 2.1.15 The ideal ⟨x1, x2⟩ ⊂K[x1, x2] is a maximal ideal,since K[x1, x2]/ ⟨x1, x2⟩ ≅K is a field.

See also the Exercises 2.5 and 2.6.So the bottom line is: Any geometric problem concerning affine

algebraic sets, can be translated into a problem concerning idealsin polynomial rings.

2.2 Introduction to the Ideal Member-

ship Problem and Grobner Bases

Suppose we want to obtain information about a variety V (I) ⊂An(K) specified by an ideal I = ⟨f1, . . . , fs⟩ ⊂ K[x1, . . . , xn] whichagain is given by generators f1, . . . , fs ∈ K[x1, . . . , xn]. For exam-ple, we may want to determine, whether V (I) is contained in the

Page 48: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 38

hypersurface V (f). Equivalently, we have to determine whetherf ∈ ⟨f1, . . . , fs⟩. This question is called the ideal membershipproblem and appears as a fundamental buildung block in manymore advanced algorithms.

Example 2.2.1 Consider the twisted cubic curve C = V (I) definedby I = ⟨y − x2, z − x3⟩, see Figure 2.3. By definition, C is contained

Figure 2.3: Twisted cubic

in the hypersurfaces V (y − x2) and V (z − x3). However, is it alsocontained in the hypersurface V (z − xy)? Figure 2.4suggests yes,

Figure 2.4: Surface containing the twisted cubic

and we easily find a representation

z − xy = (−x) ⋅ (y − x2) + 1 ⋅ (z − x3) .

How to find such a representation in a systematic way?

Page 49: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 39

Before solving the ideal membership problem in general, let usfirst discuss two special settings, the linear and the univariate case.

Example 2.2.2 Let f1, . . . , fs, f ∈ K[x1, . . . , xn] be linear. Thentesting f ∈ I = ⟨f1, . . . , fs⟩ is easy and can be done in the followingtwo steps:

1) Apply Algorithm 1.5.1 to obtain linear equations g1, . . . , gr inrow echelon form, so L(g1) > ... > L(gr).

2) For i = 1, . . . , r do

If L(f) = L(gi) then

f = f − LC(f)LC(gi)gi

If f = 0 then return true else return false.

As a second special case, consider higher degree equations in asingle variable. The polynomial ring K[x] in one variable over afield K is an example of a Euclidean domain:

Definition 2.2.3 A Euclidean domain is an integral domain Rtogether with a map (called Euclidean norm)

d ∶ R/ {0}Ð→ N0

such that for any a, b ∈ R/ {0} there exist g, r ∈ R with

1) a = g ⋅ b + r and

2) r = 0 or d (r) < d (b).

Example 2.2.4 The ring of integers Z with d (n) = ∣n∣ and thepolynomial ring K[X] in one variable X over a field K with d (f) =deg (f) is Euclidean.

There are many more Euclidean domains, for example, Z [i]with

d (a1 + i ⋅ a2) = ∣a1 + i ⋅ a2∣2= a2

1 + a22.

The Euclidean algorithm given in Theorem 1.2.2 and its proofcarry over directly to any Euclidean domain by replacing the abso-lute value by d.

Theorem 2.2.5 Euclidean domains are principal ideal domains(any ideal is principal, that is, generated by a single element).

Page 50: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 40

Proof. Let I ⊂ R be an ideal in a Euclidean domain. The idealI = ⟨0⟩ is principal. Otherwise, there is a non-zero b ∈ I with d (b)minimal. Let a ∈ I be arbitrary and a = g ⋅ b + r with r = 0 ord (r) < d (b). By a, b ∈ I also r ∈ I. As d(b) was chosen minimal, weget r = 0 and, hence, a ∈ ⟨b⟩. This proves I ⊂ ⟨b⟩ ⊂ I.

Corollar 2.2.6 If R is a principal ideal domain, and f1, . . . , fs ∈ R,then

⟨f1, . . . , fs⟩ = ⟨gcd (f1, . . . , fs)⟩

Proof. As R is a principal ideal domain,

⟨f1, . . . , fs⟩ = ⟨d⟩

with d ∈ R, hence d ∣ fi for all i. On the other hand, there are xi ∈ Rwith

d = x1f1 + ... + xsfs.

So every divisor of all fi divides d. Hence

d = gcd (f1, . . . , fs) .

Recall that the gcd is only unique up to units in R.Hence, the ideal membership problem translates into the follow-

ing characterization

f ∈ ⟨f1, . . . , fs⟩ ⇐⇒ gcd (f1, . . . , fs) divides f .

Example 2.2.7 We test whether

x3 + x ∈ I = ⟨x4 − 1, x4 − 3x2 − 4⟩ ⊂ Q[x]

The Euclidean algorithm yields

x4 − 3x2 − 4 = 1 ⋅ (x4 − 1) + (−3x2 − 3)x4 − 1 = x2 ⋅ (x2 + 1) + (−x2 − 1)

= (x2 − 1) ⋅ (x2 + 1) + 0

henceI = ⟨x2 + 1⟩

and division with remainder

x3 + x = x ⋅ (x2 + 1) + 0,

shows that, x3 + x ∈ I.

So what about the general case?

Page 51: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 41

Example 2.2.8 Suppose we want to check whether

x2 − y2 ∈ ⟨x2 + y, xy + x⟩ .

In order to do division with remainder, we have to decide whichterm of a polynomial is the lead term. Ordering by degree is notsufficient, consider xy2 + x2y. For example, we could order themonomials in a lexicographic way, that is, like the words in a tele-phone book. Then

L(x2 + y) = x2 L(xy + x) = xy

and the usual strategy for division with remainder would give

x2 − y2 = 1 ⋅ (x2 + y) + (−y2 − y)x2 + y−y2 − y

The lead terms we write in bold face red. So the remainder is −y2−y ≠ 0, however

x2 − y2 = −y (x2 + y) + x (xy + x) ∈ ⟨x2 + y, xy + x⟩ .

The problem is caused by the cancelling of the lead terms in thisexpression. How to resolve the problem?

Simply add to the set of generators all polynomials, which canbe obtained by canceling lead terms. The result is what is called aGrobner basis. In the example we would add x2 − y2 and then

−y2 − y = (x2 − y2) + (−1) ⋅ (x2 + y).

Finally, we could get rid of x2 − y2 or x2 + y as it is sufficient tokeep one generator for each possible lead monomial. This results ina minimal Grobner basis

x2 − y2, xy + x, y2 + y

orx2 + y, xy + x, y2 + y.

The second one is the unique reduced Grobner basis, which canbe obtained by removing terms in tail(f) = f − LT(f) which aredivisable by some lead monomial. For any of these Grobner bases,the division of x2 − y2 will give remainder zero: For the first onethis is trivial, since x2 − y2 is already an element of the Grobnerbasis. For the second one, we can continue the above calculation,resulting in the expression

x2 − y2 = 1 ⋅ (x2 + y) + (−1) ⋅ (y2 + y) + 0

with remainder 0.

Page 52: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 42

Indeed, we will show in general, that when dividing f by aGrobner basis g1, . . . , gr, division will give remainder zero if andonly if f ∈ ⟨g1, . . . , gr⟩. We begin by formalizing this concept:

2.3 Monomial Orderings

For monomials we use multi-index notation xα = xα11 ⋅ ... ⋅ xαnn with

the exponent vector α = (α1, . . . , αn) ∈ Nn0 .

Definition 2.3.1 A monomial ordering (or semigroup or-dering) on the semigroup of monomials in the variables x1, . . . , xnis an ordering > with

1) > is a total ordering

2) > respects multiplication, that is,

xα > xβ ⇒ xαxγ > xβxγ

for all α,β, γ.

Definition and Theorem 2.3.2 A global ordering is a mono-mial ordering > with the following equivalent properties

1) > is a well ordering

(that is, any non-empty set of monomials has a smallest ele-ment)

2) xi > 1 ∀i.

3) xα > 1 for all 0 ≠ α ∈ Nn0 .

4) If xβ ∣ xα and xα ≠ xβ then xα > xβ

(that is, > refines divisibility).

If xi < 1 ∀i, then > is called a local ordering.

Proof. The implications (1) ⇒ (2) ⇒ (3) ⇒ (4) are easy, seeExercise 2.7. With respect to (4) ⇒ (1), we have to prove thatany non-empty set of monomials has only finitely many minimalelements with respect to divisibility. Then, by assumption (4) weonly have to consider those minimal elements, and, since > is a totalordering, among them there is a smallest.

Page 53: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 43

Lemma 2.3.3 (Dickson, Gordan) Any non-empty set of mono-mials in the variables x1, . . . , xn has only finitely many minimalelements with respect to divisibility.

Proof. Let M ≠ ∅ be a set of monomials in the variables x1, . . . , xn,and ⟨M⟩ ⊂ K[x1, . . . , xn] the ideal generated by the elements ofM . By the Hilbert basis theorem 2.1.7 we have ⟨M⟩ = ⟨f1, . . . , fs⟩with polynomials fi = ∑

uj=1 ri,jmj where ri,j ∈ K[x1, . . . , xn] and

m1, . . . ,mu ∈M . Hence

⟨M⟩ ⊂ ⟨m1, . . . ,mu⟩ ⊂ ⟨M⟩ .

Among the m1, . . . ,mu consider the minimal elements with respectto divisibility.

The ideal we have encountered in the proof is an example of amonomial ideal:

Definition 2.3.4 An ideal I ⊂ K[x1, . . . , xn] is called a mono-mial ideal, if it is generated by monomials.

Corollar 2.3.5 Every monomial ideal has a unique set of mini-mal generators consisting of monomials.

Proof. See the proof of Lemma 2.3.3 (or apply the lemma to theset of monomials in the ideal).

In the proof we have also encountered the following trivial, butimportant, observation:

Lemma 2.3.6 Let I = ⟨M⟩ be a monomial ideal generated by themonomials in M . If f ∈ I, then every term of f is in I.

In particular, if f ∈ I is a monomial, then there is an m ∈ Mwith m ∣ f .

Proof. If f = ∑uj=1 rjmj ∈ I with rj ∈ K[x1, . . . , xn] and mj ∈ M ,

any term of f is a term of some (perhaps several) rjmj and hencea multiple of some mj.

We discuss some specific monomial orderings, there are manymore. First note:

Example 2.3.7 In one variable all global orderings are equivalentto the ordering defined by x > 1, all local orderings to that definedby x < 1.

Definition 2.3.8 The following definitions yield global monomialorderings:

Page 54: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 44

1) Lexicographical ordering:

xα > xβ ⇐⇒ the leftmost nonzero entry of α − β is positive.

In Singular this ordering is abbreviated as lp.

2) Degree reverse lexicographical ordering:

xα > xβ ⇔ degxα > degxβ or degxα = degxβ and ∃1 ≤ i ≤ n ∶αn = βn, . . . , αi+1 = βi+1, αi < βi.

In Singular this ordering is abbreviated as dp.

An example of a local ordering is the negative lexicographicalordering:

xα > xβ ⇐⇒ the leftmost nonzero entry of α − β is negative.In Singular this ordering is abbreviated as ls.

The degree reverse lexicographical ordering usually gives a bet-ter performance than the lexicographical one. This is especiallyapparent if we are computing a Grobner basis of an ideal whichis homogeneous, that is, which can be genereated by homogeneouspolynomials. Recall that a polynomial is called homogeneous ifall its monomials have the same degree. Note, that a homogeneousideal has a lot of non-homogeneous elements.

The lexicographical ordering is nevertheless very important, sinceit has the so called elimination property, that is, it allows one tobring polynomial systems into a triangular form. We will comeback to this property later.

Example 2.3.9 For lp on the monomials in x, y, z we have (iden-tifying monomials and exponent vectors)

x = (1,0,0) > y = (0,1,0) > z = (0,0,1)

xy2 = (1,2,0) > (0,3,4) = y3z4

x3y2z4 = (3,2,4) > (3,1,5) = x3y1z5

on the other hand, for dp we get

x = (1,0,0) > y = (0,1,0) > z = (0,0,1)

xy2 = (1,2,0) < (0,3,4) = y3z4

x3y2z4 = (3,2,4) > (3,1,5) = x3yz5

and for ls

x = (1,0,0) < y = (0,1,0) < z = (0,0,1)

xy2 = (1,2,0) < (0,3,4) = y3z4

x3y2z4 = (3,2,4) < (3,1,5) = x3yz5

Page 55: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 45

In Singular we can compare monomials as follows:ring R=0,(x,y,z),lp;

x>y;1

y>z;1

xy2>y3z4;1

x3y2z4>x3yz51

ring R=0,(x,y,z),dp;

x>y;1

y>z;1

xy2>y3z4;0

x3y2z4>x3yz51

ring R=0,(x,y,z),ls;

1>z;1

z>y;1

y>x;1

xy2>y3z4;0

x3y2z4>x3yz50

Our definitions in the linear and univariate case generalize di-rectly:

Definition 2.3.10 With respect to a given monomial ordering >,for any polynomial 0 ≠ f = ∑α cαx

α the leading monomial is thelargest monomial xα with cα ≠ 0 and is denoted by L (f). Further-more, we denote by LC(f) = cα the leading coefficient, and byLT (f) = cαxα the leading term. For f = 0 we set L(0) = LT (0) =LC(0) = 0.

Example 2.3.11 Using lp we have

L(5x2y + yx2) = x2y.

Page 56: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 46

In Singular we compute the lead term, monomial and coeffi-cient as follows:ring R=0,(x,y,z),lp;

poly f = 5x2y+xy2;

lead(f);

5x2y

leadcoef(f);

5

leadmonom(f);

x2y

Definition 2.3.12 A monomial ordering > is called a weighteddegree ordering if there is some w ∈ Rn with non-zero entriessuch that

wα > wβ ⇒ xα > xβ.

Example 2.3.13 If > is any monomial ordering and w ∈ Rn, then>w given by

xα >w xβ⇔ wα > wβ or (wα = wβ and xα > xβ)

is a monomial ordering.The ordering >, which takes over if the w-weights of xα and xβ

are equal, is called tie-break ordering.By construction, >w is a weighted degree ordering, it is global if

wi > 0 ∀i and it is local if wi < 0 ∀i.

For the purpose of explicit computations, which will only involvea finite number of monomials, we can represent any monomial or-dering by a weight vector:

Proposition 2.3.14 Given a monomial ordering > and a finite setM of monomials in the variables x1, . . . , xn, there is a weight vectorw ∈ Zn with

xα > xβ ⇐⇒ w ⋅ α > w ⋅ β

for all xα, xβ ∈M .We can choose w such that wi > 0 if xi > 1 and wi < 0 if xi < 1.

Proof. Consider

D> ∶= {α − β ∈ Zn ∣ xα > xβ} .

If α1 − β1, α2 − β2 ∈D> then

xα1+α2 = xα1xα2 > xβ1xα2 > xβ1xβ2 = xβ1+β2 ,

Page 57: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 47

henceδ1, δ2 ∈D>⇒ δ1 + δ2 ∈D>.

So for all λi ∈ N and δi ∈D>

∑iλiδi ∈D>.

As 0 ∉D>, we get ∑iλiδi ≠ 0 for all δi ∈D> and λi ∈ Q>0, hence

0 ∉ convHull(D>).

Here for a set of vectors V ⊂ Zn, we write

convHull(V ) = {∑ri=1λiδi ∣ δi ∈ V , λi ∈ Q≥0, ∑

ri=1λi = 1}

For an example in Figure 2.5 the grey area is the convex hull of theblack points. So also for

Figure 2.5: A convex hull

DM> ∶= {α − β ∈ Zn ∣ xα, xβ ∈M , xα > xβ}

we have0 ∉ convHull(DM

> ).

Thus there is a w ∈ Zn such that convHull(DM> ) is contained in

the half space where the linear form δ ↦ wδ takes positive values.Hence,

wδ > 0 for all δ ∈D>.

For the second statement observe: This w satisfies wi > 0 ifxi > 1 and wi < 0 if xi < 1, provided that 1, x1, . . . , xn ∈M .

Note that this representation of > via scalar weights obtainedfrom the linear form w⋅ is in general not valid for comparing arbi-trary monomials (in one variable it is). However one can representany monomial ordering in n variables by using a vector valued lex-icographic comparison

Example 2.3.15 For the lexicographical ordering > in the vari-ables x1, x2 and the set of all monomials M of degree ≤ 4, the setDM

> is plotted in Figure 2.6.The figure also shows the line wδ = 0,where w is a weight vector representing lp on all monomials of de-gree ≤ 4. For more examples see Exercise 2.9.

Page 58: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 48

Figure 2.6: DM> for the ordering lp and the set M of monomial of

degree ≤ 4

You can imagine that a Grobner basis computation for a fixedideal will only involve finitely many monomials due to the Noethe-rian property of the polynomial ring. The equivalent weight vectorsw form a cone and these cones fit nicely together in what is calledthe Grobner fan (that is, the intersection of two such cones isagain one of the cones). Figure 2.7 shows the Grobner fan clas-sifying the non-equivalent weight vectors for f = x + y + 1 and theinitial term of each cone. Given a weight-vector w, the initial terminw(f) is the sum of all terms of f with maximal w-weight. Thenthe Grobner fan of ⟨f⟩ consists of the closures of cones

{w ∣ inw(f) = g}

for any possible initial form g. These cones are given by linearinequalities. As an exercise determine these inequalities. The def-inition of the Gronber fan can be generalized to ideals with morethan one generator, however to do this, one requires Grobner basistechniques.

If you have heard about tropical geometry, the tropical varietyof an ideal can be considered as a subfan of the Grobner fan. In theexample, it consists of those faces such that inw(f) is not a mono-mial. So the three black half-lines in the figure form the tropicalvariety of a line.

Page 59: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 49

Figure 2.7: Grobner fan of the line.

2.4 Monomial Orderings and Localiza-

tions

Monomial orderings are closely related to the concept of localiza-tions, which again have and important geometric interpretation.

Definition 2.4.1 A local ring is a ring which has exactly onemaximal ideal.

Definition 2.4.2 Let R be a ring. Given a multiplicatively closedset S ⊂ R, that is, a set with 1 ∈ S and

s1, s2 ∈ S ⇒ s1 ⋅ s2 ∈ S

the localization of R with respect to S is the ring

S−1R ∶= {r

s∣ r ∈ R, s ∈ S}

where rs is the equivalence class of all (r′, s′) with respect to the

equivalence relation

(r, s) ∼ (r′, s′)⇐⇒ ∃q ∈ S with q(rs′ − r′s) = 0,

and addition and multiplication are defined by the usual formulasfor calculating with fractions.

Example 2.4.3 1) With S = Z/{0},

Q = S−1Z.

Page 60: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 50

2) More generally we can construct in this way the quotient fieldQ(R) of an integral domain R, for example the function field

K(x1, . . . , xn) = Q(K[x1, . . . , xn])

over a field K.

3) If P ⊂ R is a prime ideal in a ring R, then S = R/P ismultiplicatively closed and we write

RP = S−1R

for the localization of R at the prime ideal P . The ringS−1R is a local ring with maximal ideal

P ⋅RP = {r

s∣ r ∈ P, s ∉ P} .

Remark 2.4.4 If R is Noetherian then S−1R is also Noetherian.

We leave the details as an easy exercise. Geometrically,localizationat a prime ideal corresponds to investigating an algebraic set at lo-cally at P :

Example 2.4.5 Consider the curve C = V (I) ⊂ A2(K) defined byI = ⟨(x − 1) ⋅ y⟩ ⊂ R = K[x, y]. In the localization at the maximalideal P = ⟨x, y⟩ ⊂ R we have that

I ⋅RP = ⟨y⟩

since x − 1 ∉ P is a unit in RP . So locally at the point (0,0) thecurve C looks like a line, whereas at the point (1,0) it looks like theintersection of two line, see Figure 2.8.

Example 2.4.6 If K is a field and > is a monomial ordering onthe semigroup of monomials in x1, . . . , xn, then

S> = {u ∈K[x1, . . . , xn] ∣ LM(u) = 1}

is multiplicatively closed. We write

K[x1, . . . , xn]> = S−1K[x1, . . . , xn]

for the corresponding localization of the polynomial ring with respectto >.

By Definition and Theorem 2.3.2, > is global if and only if S> =K∗, that is

K[x1, . . . , xn]> =K[x1, . . . , xn].

On the other hand if > is local then

K[x1, . . . , xn]> =K[x1, . . . , xn]⟨x1,...,xn⟩.

Page 61: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 51

Figure 2.8: Local properties of union of two lines

We can use this construction to describe localizations at arbi-trary coordinate planes:

Example 2.4.7 If > is a local ordering on the monomials in x1, . . . , xn,then

K[x1, . . . , xn, y1, . . . , ym]⟨x1,...,xn⟩ =K(y1, . . . , ym)[x1, . . . , xn]>.

The proof is Exercise 2.10.

We can extend the notion of a lead monomial to K[x1, . . . , xn]>in the following way. This will lead to a Grobner bases theory inK[x1, . . . , xn]>, the so called theory of standard bases.

Definition 2.4.8 If f ∈ K[x1, . . . , xn]> there is a polynomial u ∈K[x1, . . . , xn] with

LT(u) = 1 and u ⋅ f ∈K[x1, . . . , xn].

We defineL(f) ∶= L(u ⋅ f).

In the same way, we define

LC(f) ∶= LC(u ⋅ f)

LT(f) ∶= LT(u ⋅ f)

tail(f) ∶= tail(u ⋅ f).

In Exercise 2.13 we show that these definitions are independentof the choice of u.

Page 62: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 52

2.5 Division with Remainder and Stan-

dard Bases

Fix a monomial ordering onK[x1, . . . , xn] and writeR =K[x1, . . . , xn]>.If we consider a global monomial ordering, that is, R =K[x1, . . . , xn],then it is pretty clear, how to do division with remainder. Algo-rithm 2.5.1 divides f ∈ R by g1, . . . , gs ∈ R.

Algorithm 2.5.1 Division with remainder

Input: f ∈ R, g1, ..., gs ∈ R, > be a global ordering on the monomialsof R.

Output: An expression

f = q + r = ∑si=1aigi + r

such that L(r) is not divisible by any L(gi).1: q = 02: r = f3: while r ≠ 0 and L(gi) ∣ L(r) for some i do4: Cancel the lead term of r:5: a = LT (r)

LT (gi)6: q = q + a ⋅ gi7: r = r − a ⋅ gi

Proof. In every step the lead term of r becomes smaller withrespect to >, so the algorithm terminates, since > is a well-ordering.

Example 2.5.1 Using lp divide x2y + x by y − 1 and x2 − 1.

x2y + x = x2 (y − 1) + 1 ⋅ (x2 − 1) + x + 1x2y − x2

x2 + xx2 − 1x + 1

Remark 2.5.2 The assumption that > is global is necessary for thetermination: If we divide x by x−x2 using the local ordering x < 1,then Algorithm 2.5.1 will compute

x = 1 ⋅ (x − x2) +x2

= (1 + x) ⋅ (x − x2) +x3

= (∑∞i=0x

i) ⋅ (x − x2) + 0

Page 63: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 53

that is, the geometric series expansion of

x

x − x2=

1

1 − x= ∑

∞i=0x

i.

So the algorithm works as expected, but does not give an answerafter finitely many steps. We will come back to this (however, thesolution is pretty obvious, clear the denominator 1 − x).

We will now show that Algorithm 2.5.1 solves the ideal mem-bership problem, provided we divide by a Grobner basis, and wewill develop a modified version of the algorithm that will also dothe job for non-global orderings.

Definition 2.5.3 Given a monomial ordering > and a subset G ⊂R, we define the leading ideal of G as

L(G) = L>(G) = ⟨L(f) ∣ f ∈ G/{0}⟩ ⊂ R,

the monomial ideal generated by the lead monomials. If the choiceof > is clear, we also write L(G).

Given an ideal I the ideal L(I) will contain all possible leadmonomials obtainable by cancelling lead term, hence we define:

Definition 2.5.4 (Standard and Grobner bases) Let I be anideal and > a monomial ordering. A finite set

G ⊂ I

with 0 ∉ G is called a standard basis of I with respect to >, if

L(G) = L(I).

If > is global, then we call a standard basis also a Grobner basis.

Note that the inclusion ⊂ is true for any subset. The existenceof a standard basis is easy:

Theorem 2.5.5 Every ideal I ⊂ R has a standard basis.

Proof. Since L(I) is finitely generated, L(I) = ⟨m1, . . . ,ms⟩ withmonomials mi. Furthermore, mi is divisible by some L(gi) for somegi ∈ I, see Lemma 2.3.6. Hence

L(I) = ⟨L(g1), . . . , L(gs)⟩ ,

Page 64: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 54

so g1, . . . , gs form a standard basis of I.From the definition it is not clear whether a standard basis of

I is indeed a set of generators of I. Solving the ideal membershipproblem will answer also this question.

Our goal will be to handle the global and non-global settingin an uniform way. We first formlize the abstract properties ofAlgorithm 2.5.1 in the notion of a normal form.

Definition 2.5.6 Given a list G = (g1, . . . , gs) ⊂ R, a normalform is a map NF(−,G) ∶ R → R with

1) NF(0,G) = 0.

2) If NF(f,G) ≠ 0 then L(NF(f,G)) ∉ L(G).

3) For every 0 ≠ f ∈ R there are ai ∈ R with

f −NF(f,G) = ∑si=1aigi

and L(f) ≥ L(aigi) for all i with aigi ≠ 0. Such an expressionwe call a standard represenation of f .

We also say that NF is a normal form, if NF(−,G) is a normalform for all G.

As discussed above, in the non-global setting we will have torelax property (3) allowing for clearing denominators:

Definition 2.5.7 A weak normal form is a map NF(−,G) ∶R → R with condition (1) and (2) of the previous definition and

3’) For every 0 ≠ f ∈ R there is a unit u ∈ R∗ such that u ⋅ f hasa standard representation.

A weak normal form is called polynomial weak normal formif for every f ∈K[x1, . . . , xn] and list G ⊂K[x1, . . . , xn] there existsa unit u ∈ R∗∩K[x1, . . . , xn] such that there is a standard expression

u ⋅ f −NF(f,G) = ∑si=1aigi

with ai ∈K[x1, . . . , xn].

Remark 2.5.8 1) Any normal form is a weak normal form.

2) Note that any weak normal form induces a normal form bydivision with u. However only if > is global, i.e., R∗ = K∗,this normal form will be polynomial.

Page 65: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 55

Since in the applications we can usually work with polynomialdata, we will use polynomial weak normal forms for local orderings,and normal forms for global orderings.

Lemma 2.5.9 Given a list G = (g1, . . . , gs) and any order of pref-erence of the gi in the division, Algorithm 2.5.1 yields a normalform NF(−,G). It is called the Buchberger normal form.

Proof. We map f to NF(f,G) ∶= r. If the algorithm returns re-mainder r ≠ 0 then L(r) is not divisible by any L(gi), so L(r) ∉L(G) by Lemma 2.3.6. Condition (3) is clear, since in every itera-tion of the algorithm L(a ⋅ gi) ≤ L(f).

Using standard bases and a weak normal form, we can nowdecide the ideal membership problem:

Theorem 2.5.10 (Ideal membership) Let I ⊂ R be an ideal andf ∈ R. If G = {g1, . . . , gs} is a standard basis of I and NF is a weaknormal form, then

f ∈ I ⇐⇒ NF(f,G) = 0.

Proof. Consider a standard expression uf = ∑i aigi + r with r =NF(f,G), ai ∈ R and u ∈ R∗. If r = 0 then uf = ∑i aigi ∈ ⟨G⟩ ⊂ I,hence f ∈ I. On the other hand, if r ≠ 0 then by Definition 2.5.6(2.)

L(r) ∉ L(G) = L(I).

So, by definition of the lead ideal,

r ∉ I,

hence uf = ∑i aigi + r ∉ I, so f ∉ I.

Lemma 2.5.11 If J ⊂ I ⊂ R are ideals with L(J) = L(I) thenI = J .

Proof. Let G = {g1, . . . , gs} be a standard basis of J , NF a weaknormal form, f ∈ I and uf = ∑i aigi + r a standard expression withr = NF(f,G). So r ∈ I. If r ≠ 0, then by Definition 2.5.6 (2.)

L(r) ∉ L(G) = L(J) = L(I).

By the definition of the lead ideal, we have r ∉ I, a contradiction.

Page 66: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 56

Corollar 2.5.12 If G is a standard basis of I, then

I = ⟨G⟩ .

Proof. We have L(I) = L(G) ⊂ L(⟨G⟩) ⊂ L(I), so G is a standardbasis of ⟨G⟩ ⊂ I and L(⟨G⟩) = L(I). Equality follows from Lemma2.5.11.

Example 2.5.13 The generators of the ideal I = ⟨x2 − 1, y − 1⟩ al-ready form a Grobner basis with respect to lp: Since x ∉ L(I) (Ex-ercise) we have

L(I) = ⟨x2, y⟩ .

Corollar 2.5.14 For any monomial ordering >, the ring

R =K[x1, . . . , xn]>

is Noetherian.

Proof. By Theorem 2.5.5 any ideal in R has a standard basis,which consists out of finitely many elements, and by Corollary2.5.12 this standard basis generates the ideal.

In particular, this proves again that K[x1, . . . , xn] is Noetherian,see Corollary 2.1.8.

Of course, the result of division with remainder depends onthe monomial ordering. But, even if we fix a monomial orderingand divide by a Grobner basis, the result may not be uniquelydetermined in the sense that the remainder depends on the orderof preference of the divisors gi in the division algorithm:

Example 2.5.15 At every step of Algorithm 2.5.1, there can beseveral choices of gi such that L(gi) ∣ L(f). We divide x2y + x bythe Grobner basis G = {y − 1, x2 − 1}, using lp as in Example 2.5.1.However we now prefer x2 − 1 over y − 1 when possible:

x2y + x = y ⋅ (x2 − 1) + x + yx2y − yx + y

So depending on the choice made, the remainder will be x + 1 orx + y.

To have a uniquely determined remainder, we proceed as follows:

Page 67: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 57

Definition 2.5.16 An element f ∈ R is called reduced with re-spect to a set G ⊂ R, if no term of the power series expansion of fis contained in L(G).

A normal form NF is called reduced normal form, if NF(f,G)is reduced with respect to G for all f and G.

Algorithm 2.5.2 yields a reduced normal form, the reducedBuchberger normal form.

Algorithm 2.5.2 Reduced division with remainder

Input: f ∈ R, g1, ..., gs ∈ R, > be a global ordering on the monomialsof R.

Output: An expression

f = q + r = ∑si=1aigi + r

such that not term of r is divisible by any L(gi).1: q = 02: r = 03: h = f4: while h ≠ 0 do5: if L(gi) ∣ L(h) for some i then6: Cancel the lead term of h:7: a = LT (h)

LT (gi)8: q = q + a ⋅ gi9: h = h − a ⋅ gi10: else11: Put the lead term into the remainder:12: r = r +LT (h)13: h = h −LT (h)

Example 2.5.17 So, also putting terms into the remainder in theintermediate steps, we can continue in Example 2.5.15:

x2y + x = y ⋅ (x2 − 1) +x + 1 ⋅ (y − 1) + 1x2y − yx + yyy − 11

which leads to the same remainder x+1 as in Example 2.5.1. Indeed,the remainder is now unique provided we divide by a Grobner basis:

Page 68: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 58

Theorem 2.5.18 Let > be a global ordering, I ⊂ R an ideal, f ∈ Rand G a Grobner basis of I. If NF is a reduced normal form, thenNF(f,G) is uniquely determined by >, f and I. We then also writeNF(f, I).

Proof. Write G = {g1, . . . , gs} and suppose that

f = ∑si=1aigi + r

= ∑si=1a

′igi + r

Thenr − r′ = ∑

si=1(ai − a

′i)gi ∈ ⟨G⟩ = I

(using Corollary 2.5.12). So, if r − r′ ≠ 0, then L(r − r′) ∈ L(I) =L(G). Since L(r − r′) is a monomial of r or r′, this would meanthat r or r′ is not reduced with respect to G.

Example 2.5.19 In Singular we can compute the reduced Buch-berger normal form in Example 2.5.17 by:ring R=0,(x,y),lp;

ideal I = x2-1,y-1;

We first check that the generators of I form a Grobner basis:I=std(I);

I;

I[1]=x-1

I[2]=x2-1

reduce(x2y+x,I);

x+1

The non-reduced version is called by reduce(-,-,1).Singular makes the choices in the algorithms for you in a cleverway, however, you cannot influence this.The standard expression of f respectively uf including the remain-der and the unit u is returned by the command division (in thestated order):division(x2y+x,I);

[1]:

[1,1]=x2

[2,1]=1

[2]:

[1]=x+1

[3]:

[1,1]=1

Since we are working with a global ordering, Singular chooses theunit to be 1.

Page 69: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 59

Remark 2.5.20 Even when using a reduced normal form and aGrobner basis, although the remainder is unique, the generated ex-pression in the generators may not be. In the Examples 2.5.1 and2.5.17 we obtain

x2y + x = y ⋅ (x2 − 1) + 1 ⋅ (y − 1) + x + 1

andx2y + x = x2 (y − 1) + 1 ⋅ (x2 − 1) + x + 1

respectively.When dividing f by G = (g1, . . . , gs), we can obtain a unique

expressionf = ∑

si=1aigi + r

by requiring that no term of aiL(gi) is divisible by any L(gj) forj < i.

In the example, the first expression would be returned for G =(x2 − 1, y − 1), and the second for G = (y − 1, x2 − 1).

2.6 Computing Standard Bases

In Section 2.2 we have already seen the basic idea for computinga Grobner basis of an ideal. We will now turn this idea into analgorithm. The formulation will also be applicable in the case ofstandard bases. So again write R =K[x1, . . . , xn]> for a fixed mono-mial ordering >.

Definition 2.6.1 The syzygy polynomial or S-polynomial off, g ∈ R is defined as

spoly(f, g) =lcm(L(f), L(g))

LT (f)f −

lcm(L(f), L(g))

LT (g)g ∈ R.

Doing all possible cancelations of lead terms, Algorithm 2.6 com-putes a standard basis.

Page 70: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 60

Algorithm 2.6.1 Buchberger

Input: I = ⟨g1, ..., gs⟩ ⊂ R an ideal, > a monomial ordering, and NFa weak normal form.

Output: A standard basis of I with respect to >.1: G = {g1, ..., gs}2: repeat3: H = G4: for all f, g ∈H do5: r = NF(spoly(f, g),H)6: if r ≠ 0 then7: G = G ∪ {r}8: until G =H

Proof. If r ≠ 0 then L(r) ∉ L(H) by Definition 2.5.6(2.), hence

L(H) ⫋ L(H ∪ {r}).

So, by the Noetherian property of R, the algorithm terminates withNF(spoly(f, g),H) = 0 for all f, g ∈H.

To show that the final result is a standard basis, we prove:

Theorem 2.6.2 (Buchberger’s criterion) If I ⊂ R is an ideal,NF a weak normal form and

G = {g1, . . . , gs} ⊂ I

a set of elements of I with 0 ∉ G, then the following conditions areequivalent:

1) G is a standard basis of I.

2) NF(f,G) = 0 for all f ∈ I.

3) I = ⟨G⟩ and NF(spoly(gi, gj),G) = 0 for all i ≠ j.

Proof. (1)⇒ (2)⇒ (3): If G is a standard basis we get NF(f,G) =0 for all f ∈ I by Theorem 2.5.10. For the second implication, notethat spoly(gi, gj) ∈ I and by NF(f,G) = 0 and Definition 2.5.6(3’)any element of I can be written in terms of the generating system G.

(2) ⇒ (1): If f ∈ I then again by NF(f,G) = 0 and Definition2.5.6(3’) we have an expression

uf = ∑si=1aigi

with a unit u and L(f) = L(uf) ≥ L(aigi) for all i. So there hasto be an i with L(f) = L(aigi), which implies that L(gi) ∣ L(f).Hence L(f) ∈ L(G).

Page 71: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 61

(3)⇒ (1): We have to show that if f ∈ I then L(f) ∈ L(G). Byassumption there are ai ∈ R with

f = ∑si=1aigi.

Clearly L(f) ≤ maxiL(aigi). If L(f) < maxiL(aigi), then somelead terms of summands in∑

si=1aigi cancel, say L(ai1gi1) and L(ai2gi2).

By assumption we have a division expression

0 = u ⋅ spoly(gi1 , gi2) −∑si=1cigi

with a unit u. Such a relation is called a syzygy. Subtracting amultiple of this equality from the equality f = ∑

si=1aigi we obtain a

new expression for f with smaller maxiL(aigi). After finitely manysteps L(f) = maxiL(aigi), hence L(gi) ∣ L(f) for some i, that is,L(f) ∈ L(G).

For the step (3) ⇒ (1) we have given more like a sketch of aproof. The theory of standard bases for modules will enable us towrite down a very elegant proof later.

Example 2.6.3 Using Buchberger’s criterion we can easily checkthat G = {x2 − 1,y − 1} is a Grobner basis of I = ⟨G⟩ with respectto lp: For the S-pair

s = y(x2 − 1) − x2(y − 1) = x2 − y

division with remainder gives NF(s,G) = 0:

x2 − y = 1 ⋅ (x2 − 1) − 1 ⋅ (y − 1) + 0x2 − 1−y + 1−y + 10

Example 2.6.4 We apply Buchberger’s algorithm to compute aGrobner basis of

I = ⟨t2 − x, t3 − y, t4 − z⟩ ⊂ k [t, z, y, x]

for the lexicographical ordering t > z > y > x. In each step the firstcolumn denotes the coefficients in the syzygy polynomial and thesecond the (reduced) division with remainder.

↱ −tx + y ↱ −t2x + z ↱ −ty + z ↱ t3y − zxt2 − x t t2 x −tyt3 − y −1 tt4 − z −1 −1 xtx − y 1 −t3 −yz − x2 −1 −1 xty − x2 1y2 − x3 −1

Page 72: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 62

Writing this in terms of syzygies

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

t2 − xt3 − yt4 − ztx − yz − x2

ty − x2

y2 − x3

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

t

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

t t2 + x 0 −ty−1 0 t 00 −1 −1 x1 0 0 −t3 − y0 −1 −1 x0 0 1 00 0 0 y2 − x3

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

= 0.

As an exercise, do the divisions with remainder and show that allremaining syzygy polynomials reduce to 0. So a Grobner basis of Iis given by

G = (t2 − x, t3 − y, t4 − z, tx − y,z − x2, ty − x2,y2 − x3).

However, do we need all these polynomials?

Definition 2.6.5 A standard basis G = {g1, . . . , gs} is called min-imal, if L(gi) ∤ L(gj) for all i ≠ j.

If, in addition, LC(gi) = 1 and tail(gi) is reduced with respectto G for all i, then, G is called reduced.

Remark 2.6.6 From any standard basis we can obtain a minimalone by deleting elements.

Proof. Given a standard basis G = {g1, . . . , gs}, by Lemma 2.3.3,the set {L(gi) ∣ i} has a unique subset of minimal elements withrespect to divisibility. This subset also generates L(G), and, hence,the corresponding gi form a standard basis.

Remark 2.6.7 A minimal standard basis is minimal in the sensethat we cannot delete any element without loosing the standard basisproperty.

Theorem 2.6.8 Let > be a global ordering. Every ideal has aunique reduced Grobner basis (up to permutation of the elements).

Proof. Suppose G and H are reduced Grobner bases of the idealI. By

L(G) = L(I) = L(H)

and since G and H are minimal, for any g ∈ G there is an h ∈ Hwith L(g) = L(h). Then

s = g − h = tail(g) − tail(h)

Page 73: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 63

and, as no term of the tails is divisible by any lead term, we have

s = NF(s,G).

Finally s = NF(s,G) = 0 by the Ideal Membership Theorem 2.5.10and s ∈ I.

Remark 2.6.9 Fix a global ordering >. If G = {g1, . . . , gs} is min-imal and NF is a reduced normal form, then H = {h1, . . . , hs} with

hi = NF(gi, (g1, . . . , gi−1, gi+1, . . . , gs))

is the reduced Grobner basis of I.

Proof. If G is minimal, then L(gi) is not divisible by any L(gj) fori ≠ j, so L(gi) = L(hi). By construction, tail(hi) is reduced withrespect to hj for j ≠ i. Moreover, no term of tail(hi) is divisible byL(hi), since by Definition and Theorem 2.3.2 the global orderingrefines divisibility.

Example 2.6.10 In Example 2.6.4 a minimal Grobner basis is

G = {t2 − x, tx − y,z − x2, ty − x2,y2 − x3}.

Example 2.6.11 For Example 2.6.4 we can compute a minimalGrobner basis using Singular as follows:ring R=0,(t,z,y,x),lp;

ideal I = t2-x,t3-y,t4-z;

std(I);

[1]=y2-x3

[2]=z-x2

[3]=tx-y

[4]=ty-x2

[5]=t2-x

In this example, the result is already reduced.

Example 2.6.12 In general, the Grobner basis returned std maynot be reduced. To force Singular to compute the reduced Grobnerbasis, we set the option redSB:ring R=0,(x,y),lp;

ideal I = x+y,y;

std(I);

[1]=y

Page 74: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 64

[2]=x+y

option(redSB);

std(I);

[1]=y

[2]=x

2.7 The Mora Weak Normal Form

We will now construct a weak polynomial normal form. As usualwe fix a monomial ordering > on K[x1, . . . , xn] and write R =K[x1, . . . , xn]>. As discussed in Remark 2.5.2, the Buchberger nor-mal form for division of x by x−x2 with respect to the local orderingon K[x] leads to computation of the geometric series

x = (∑∞i=0x

i) ⋅ (x − x2) + 0,

and, thus, to an infinite computation. We can resolve this issue byclearing the denominator, arriving at the standard expression

(1 − x) ⋅ x = 1 ⋅ (x − x2) + 0

with the unit u = 1 − x. How to do this algorithmically?Suppose we are dividing a polynomial f ∈ K[x1, . . . , xn] by a

given set of divisors G ⊂ K[x1, . . . , xn]. The idea is to proceed inthe same way as in the Buchberger normal form, but to enlarge G inthe course of the division process by the previous remainder in orderto ensure termination. Enlarging G will amount to multiplying fby a unit: Since f (or a remainder thereof) will also appear on theright side of a standard expression

f = a ⋅ f +∑i

aigi + r

we bring a ⋅ f to the left side, leading to a weak normal form ex-pression

(1 − a) ⋅ f =∑i

aigi + r,

with unit u = 1 − a.

Example 2.7.1 When dividing x by G = {x − x2} after one itera-tion of division with remainder we obtain the expression

x = 1 ⋅ (x − x2) + x2

Page 75: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 65

and then enlarge G to G = {x−x2, x}. In the next iteration, we usex to eliminate x2 leading to the expression

x = 1 ⋅ (x − x2) + x ⋅ x + 0.

Bringing the multiple of x to the left side, we obtain the weak normalform expression

(1 − x) ⋅ x = 1 ⋅ (x − x2) + 0

with the unit u = 1 − x.

To obtain an explicit algorithm, we need a criterion when toenlarge the set of divisors G. The controlling invariant is the socalled ecart of the polynomial:

Definition 2.7.2 For 0 ≠ f ∈K[x1, . . . , xn] the ecart of f is

ecart(f) = deg(f) − degL(f).

Remark 2.7.3 If f is homogeneous then ecart(f) = 0.

Example 2.7.4 For f = x22+x

71 and monomial ordering ls we have

ecart(f) = 5.

We can now formulate the Mora normal form algorithm in Al-gorithm 2.7.1, which yields (for any given set of choices of divisors)a polynomial weak normal form.

We first show correctness of the algorithm, and then will addresstermination.Proof. Since the algorihm does a Buchberger division in each step,it clearly computes a standard expression of f with respect to theenlarged set T , provided it terminates. As an exercise show that,if expressing all divisors not in G by their corresponding linearcombination of elements of G and f yields in every iteration anexpression

u ⋅ f −NF(f,G) = ∑si=1aigi

with L(f) ≥ L(aigi) for all i with aigi ≠ 0. It remains to show thatu is indeed a unit in every iteration. For this we have to show that

L(a) < 1,

which holds true since

L(a) ⋅L(g) = L(a ⋅ g) = L(r) < L(g)

which is true because g was a remainder in a previous step.We still have to show that the algorithm terminates. We build

our argument on the following remarks:

Page 76: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 66

Algorithm 2.7.1 Mora weak normal form

Input: f ∈ K[x1, . . . , xn], g1, ..., gs ∈ K[x1, . . . , xn], > a monomialordering on K[x1, . . . , xn].

Output: An standard expression

u ⋅ f = q + r = ∑si=1aigi + r

with ai, r, u ∈K[x1, . . . , xn] and u ∈ R∗.1: r = f2: q = 0, u = 13: T = {g1, ..., gs}4: while r ≠ 0 and Tr ∶= {g ∈ T ∣ L(g) ∣ L(r)} ≠ ∅ do5: Choose g ∈ Tr with minimal ecart(g)6: if ecart(g) > ecart(r) then7: Add the remainder to the set of divisors:8: T = T ∪ {r}9: Cancel the lead term of r:10: a = LT(r)

LT(g)11: r = r − a ⋅ g12: Book-keeping for weak normal form expression:13: if g ∈ {g1, ..., gs} then14: q = q + a ⋅ g15: else16: Let u ⋅ f = q + g be expression for g from earlier step.17: q = q − a ⋅ q18: u = u − a ⋅ u

Remark 2.7.5 If we use Algorithm 2.7.1 with a well-ordering, theneven if elements are added to Th these elements will never be usedin reductions since L(g) ∣ L(r) implies that L(g) ≤ L(r). Hence Al-gorithm 2.7.1 coincides with Algorithm 2.5.1 with some restrictionson the choice of divisor.

Remark 2.7.6 For homogeneous input f and g1, . . . , gs all ecartsare always zero, and we obtain the Buchberger normal form algo-rithm 2.5.1.

Note that if we are reducing a homogeneous polynomial f by ho-mogeneous polynomials, then the result is again homogeneous of thesame degree as f . Since in Algorithm 2.5.1 the lead terms formsa decreasing sequence and there are only finitely many monomialsof a given degree, the division must end after finitely many steps(either with remainder 0 or remainder with a lead term which can-not be removed). In the homogeneous setting termination is hence

Page 77: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 67

clear.

Definition 2.7.7 Let 0 ≠ f ∈K[x1, . . . , xn] be of degee d. We write

fh = xd0 ⋅ f(x1

x0

, . . . ,xnx0

) ∈K[x0, . . . , xn]

for its homogenization with respect to x0.

We will discuss homogenization in the context of relating affineand projective varieties. Here x0, . . . , xn correspond to homoge-neous coordinates in projective space. In the following section werather use the name t for the homogenization variable (since it willplay a special role), writing fh ∈ K[t, x1, . . . , xn] for the homoge-nization of 0 ≠ f ∈K[x1, . . . , xn] with respect to the variable t.

Remark 2.7.8 Let > be a monomial ordering, and write

fh ∈K[t, x1, . . . , xn]

for the homogenization of 0 ≠ f ∈ K[x1, . . . , xn] with respect to thevariable t. The induced monomial ordering

tpxα >h tqxβ ∶⇔ deg(tpxα) > deg(tqxβ)or ( deg(tpxα) = deg(tqxβ) and xα > xβ)

is a well-ordering (why?) and

L>h(fh) = tecart(f) ⋅L>(f).

Example 2.7.9 For f = x22+x

71 and monomial ordering ls we have

fh = t5x22 + x

71

and L>h(fh) = t5 ⋅ x2

2.

Using this remark, termination of Algorithm 2.7.1 can be for-mulated as in Algorithm (dropping the book-keeping for computingthe standard expression). As an exercise prove that Algorithm 2.7.1and 2.7.2 indeed return the same remainder. We now prove termi-nation:Proof. Since R is Noetherian, the lead ideal L(Tr) becomes stableafter finitely many steps. Hence, in the next iteration, we haveL(r) ∈ L(Tr) ⊂ L(T ), so there is a g ∈ T such that L(g) ∣ L(r).Hence, in step (4), we have α = 0 and T does not get enlarged. Thealgorithm will continue from this point with fixed T . Since in everystep the lead term of r decreases and >h is a well-ordering, it willterminate after finitely many steps.

Page 78: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 68

Algorithm 2.7.2 Homogeneous version of Mora weak normal form

Input: f ∈ K[x1, . . . , xn], g1, ..., gs ∈ K[x1, . . . , xn], > a monomialordering on K[x1, . . . , xn].

Output: A remainder r ∈ K[x1, . . . , xn] such that there is a stan-dard expression

u ⋅ f = q + r = ∑si=1aigi + r

with ai, u ∈K[x1, . . . , xn] and u ∈ R∗.1: r = fh

2: T = {gh1 , ..., ghs }

3: while r ≠ 0 and Tr ∶= {g ∈ T ∣ ∃α ≥ 0 ∶ L(g) ∣ tαL(r)} ≠ ∅ do4: Choose g ∈ Tr with α ≥ 0 minimal.5: if α > 0 then6: Add the remainder to the set of divisors:7: T = T ∪ {r}8: Cancel the lead term of r:9: a = tα⋅LT(r)

LT(g)10: r = tα ⋅ r − a ⋅ g11: r = r(1, x1, . . . , xn)h

12: r = r(1, x1, . . . , xn)

Example 2.7.10 We divide f = y2+x2 by G = {x−x2, y} using ls:In the first division we reduce by y ∈ T = G:

y2 + x2 = y ⋅ (y) + x2

In the next step we use x − x2

x2 = x ⋅ (x − x2) + x3

leading to remainder x3. Now we enlarge T to T = {x − x2, y, x2}.We then can eliminate x3 by x2

x3 = x ⋅ x2 + 0

leading to remainder 0. So we obtain the expression

y2 + x2 = y ⋅ y + x ⋅ (x − x2) + x ⋅ x2.

Now we use the equation

x2 = (y2 + x2) − y ⋅ y

to replace x2

y2 + x2 = y ⋅ y + x ⋅ (x − x2) + x ⋅ ((y2 + x2) − y ⋅ y)

= (y − xy) ⋅ y + x ⋅ (x − x2) + x ⋅ (y2 + x2)

Page 79: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 69

This is equivalent to the weak normal form expression

(1 − x) ⋅ (y2 + x2) = (y − xy) ⋅ y + x ⋅ (x − x2) + 0

with the unit u = 1 − x.The following code does the computation in Singular:

ring R=0,(x,y),ls;

division(y^2+x^2,ideal(x-x^2,y));

[1]:

[1,1]=y-xy

[2,1]=x

[2]:

[1]=0

[3]:

[1,1]=1-x

2.8 Exercises

Exercise 2.1 Show the following:

1) Any ideal of Z is of the form

⟨n⟩ = nZ = {nk ∣ k ∈ Z}

with n ∈ Z.

2) Let ⟨n⟩ ⊂ Z be an ideal and n > 0. Then

(n) is a prime ideal⇐⇒ n is a prime number.

Exercise 2.2 Let I, J ⊂K[x1, . . . , xn] be ideals. Show that

V (I + J) = V (I) ∩ V (J)

andV (I ⋅ J) = V (I ∩ J) = V (I) ∪ V (J).

Recall that I ∩ J ,

I + J = {f + g ∣ f ∈ I and g ∈ J}

I ⋅ J = ⟨f ⋅ g ∣ f ∈ I and g ∈ J⟩

are ideals.

Exercise 2.3 1) Let K be a field and X ⊂ An(K) an affinealgebraic set. Prove that X is irreducible if and only if I(X) ⊂K[x1, . . . , xn] is prime.

Page 80: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 70

2) Show that, if K is algebraically closed and I is prime, thenV (I) is irreducible.

3) Give an example of a prime ideal I ⊂ K[x1, . . . , xn] over afield K such that V (I) is reducible.

4) For K algebraically closed, prove that

{affine varieties X ⊂ An(K)}I⇄V

{prime ideals in K[x1, . . . , xn]}

is a one-to-one correspondence.

Exercise 2.4 Prove that the following rings are not Noetherian:

1) The polynomial ring K[x1, x2, ...] in infinitely many variables.

2) The ringR = {f ∈ Q[X] ∣ f(0) ∈ Z}

of polynomials with integer values at 0.

Exercise 2.5 Let K be a field and (a1, . . . , an) ∈Kn. Prove that

⟨x1 − a1, . . . , xn − an⟩ ⊂K [x1, . . . , xn]

is a maximal ideal.Hint: Develop a multivariate division with remainder.

Exercise 2.6 Determine all maximal ideals of R [x].

Exercise 2.7 Let > be a semigroup ordering on the monomials inthe variables x1, . . . , xn. Prove that the following conditions areequivalent:

1) > is a well ordering

(that is, any non-empty set of monomials has a smallest ele-ment).

2) xi > 1 ∀i.

3) xα > 1 for all 0 ≠ α ∈ Nn0 .

4) If xβ ∣ xα and xα ≠ xβ then xα > xβ

(that is, > refines divisibility).

Exercise 2.8 Sort all monomials of degree ≤ 2 in the variablesx, y, z with respect to the monomial orderings lp, dp, and ls.

Page 81: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 71

Exercise 2.9 If > is a monomial ordering on x1, x2 define

D> = {α − β ∣ xα > xβ} ⊂ Z2

1) Determine the set D> for the monomial orderings lp and dp.

2) Assuming that we consider only monomials of degree ≤ d, findweight vectors u = (u1, u2) which represent lp and dp, respec-tively.

What about the weight ordering >w with weight vector w ∈ Z2

and tie break ordering lp?

Exercise 2.10 Prove that, if > is a local ordering on the monomi-als in x1, . . . , xn, then

K[x1, . . . , xn, y1, . . . , ym]⟨x1,...,xn⟩ =K(y1, . . . , ym)[x1, . . . , xn]>.

Exercise 2.11 Let R = K[x1, . . . , xn] be a polynomial ring over afield K.

1) Show that there exist infinitely many global monomial order-ings on R if and only if n ≥ 2.

2) Considering all global monomial orderings, prove that everyideal I ⊂ R has only finitely many distinct lead ideals

L(I) = ⟨L(f) ∣ f ∈ I⟩ .

3) Find all possible lead ideals of

I = ⟨x51x2 + x

41x

42 + x

41 + x

21x

52 + x1x

22 + x

62 + x2⟩ ⊂K[x1, x2].

For each lead ideal determine the corresponding set of weightvectors w ∈ R2 such that the initial ideal

inw(I) = ⟨inw(f) ∣ f ∈ I⟩

equals the lead ideal. Here inw(f) denotes the sum of all termscxa of f such that the inner product w ⋅ a is maximal. Forwhich w do you obtain a non-monomial initial ideal inw(I)?

Exercise 2.12 1) Let A ∈ GL(n,R) an invertible matrix overthe reals. Show that a monomial ordering is given by

xα >A xβ ∶⇔ A ⋅ α >lex A ⋅ β,

where >lex is the lexicographic ordering on Rn, so for v ∈ Rn

we have v >lex 0 if the first non-zero coordinate of v is positive.

Page 82: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

2. IDEALS, VARIETIES AND STANDARD BASES 72

2) Find matrices A over the integers which represent the order-ings lp, dp, and ls on K[x1, . . . , xn].

Exercise 2.13 Prove that for f ∈K[x1, . . . , xn]> the definition

L(f) = L(uf)

with u ∈ K[x1, . . . , xn] such that LT(u) = 1 and uf ∈ K[x1, . . . , xn]is independent of the choice of u. Consider also the correspondingdefinitions of LC, LT, and tail.

Exercise 2.14 Let I = ⟨f1, f2, f3⟩ ⊂ R[x, y, z] be the ideal generatedby

f1 = x2 + y2 − 1

f2 = x2 + z2 − 1

f3 = x + y + z

1) Compute the reduced Grobner basis of I with respect to lp.

2) Deduce from this, that V (I) consists of 4 points.

Exercise 2.15 Use Buchberger’s algorithm to compute the reducedGrobner basis of

I = ⟨t2 − x, t3 − y, t4 − z⟩ ⊂ k [t, z, y, x]

for the lexicographical ordering t > z > y > x.

Exercise 2.16 Let I ⊂K[x1, . . . , xn] be an ideal and NF a reducednormal form. Show that

K[x1, . . . , xn]/I → K ⟨xα ∣ xα ∉ L(I)⟩

f ↦ NF(f, I)

is an isomorphism of K-vectorspaces.

Exercise 2.17 Let

I = ⟨y + x2 + 1, xy + y2 + y⟩ ⊂ R[x, y]

and fix the monomial ordering lp.

1) Find the minimal generators of L(I).

2) Show that 1, x, y, y2 form a vectorspace basis of R[x, y]/I.

3) Compute the multiplication table of R[x, y]/I with respect tothis basis.

Page 83: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3

Computing with Ideals andAlgebraic Sets

We now discuss how to use Buchberger’s algorithm to computewith algebraic sets, or equivalently with ideals. We have alreadyseen, how to decide, whether an algebraic set is contained in ahypersurface by solving the ideal membership problem.

The most fundamental problem is of course to decide inclusion(and hence equality) of algebraic sets. If I, J ⊂ R = K[x1, . . . , xn]are radical ideals and K =K, then

V (I) ⊂ V (J)⇐⇒ J ⊂ I

(where ⇐ is true by definition, and ⇒ follows by the Nullstellen-satz). So we have to decide inclusion of ideals. The ideal member-ship property of Grobner bases provides a solution to this problem.If

I = ⟨f1, . . . , fs⟩ J = ⟨g1, . . . , gr⟩

and (g1, . . . , gr) is a Grobner basis, then

I ⊂ J ⇐⇒ NF(fi, (g1, . . . , gr)) for all i.

3.1 Sums and Intersections of Ideals

Given two ideals I, J ⊂ R =K[x1, . . . , xn], by

V (I) ∩ V (J) = V (I + J)

the intersection of algebraic sets corresponds to the sum of ideals,see Exercise 2.2. If

I = ⟨f1, . . . , fs⟩ J = ⟨g1, . . . , gr⟩

73

Page 84: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 74

thenI + J = ⟨f1, . . . , fs, g1, . . . , gr⟩ ,

so computing the sum is trivial. Note, however, that even if (f1, . . . , fs)and (g1, . . . , gr) are Grobner bases, (f1, . . . , fs, g1, . . . , gr) may notbe.

On the other hand, by

V (I) ∪ V (J) = V (I ∩ J)

the union of algebraic sets corresponds to the intersection of ideals(see again Exercise 2.2), which can be obtained as follows:

Algorithm 3.1.1 Let I, J ⊂ R be ideals and

I = ⟨f1, . . . , fs⟩ J = ⟨g1, . . . , gr⟩

With

L = ⟨t ⋅ f1, . . . , t ⋅ fs, (1 − t) ⋅ g1, . . . , (1 − t) ⋅ gr⟩ ⊂ R[t]

it holdsI ∩ J = L ∩R

Proof. If f ∈ I ∩ J , then

R ∋ f = t ⋅ f − (1 − t) ⋅ f ∈ L.

On the other hand if f ∈ L ∩R, then

f(x, t) = t∑si=1ai(x, t)fi(x) + (1 − t)∑

rj=1bj(x, t)gj(x)

is independent of t, hence

I ∋ ∑si=1ai(x,1)fi(x) = f(x,1) = f(x,0) = ∑

rj=1bj(x,0)gj(x) ∈ J .

To turn this result into an algorithm, we need a way to computethe intersection of L with the subring R ⊂ R[t]. Before discussingthis fundamental problem in the next section, we try out ideal in-tersection in Singular:

Example 3.1.2 Consider the points

P1 = V (⟨x, y⟩) P2 = V (⟨x − 1, y⟩)P3 = V (⟨x, y − 1⟩) P4 = V (⟨x − 1, y − 1⟩)

Page 85: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 75

in A2K. Then the union P1 ∪ P2 ∪ P3 ∪ P4 is defined by the ideal

⟨x, y⟩ ∩ ⟨x − 1, y⟩ ∩ ⟨x, y − 1⟩ ∩ ⟨x − 1, y − 1⟩ .

We compute a Grobner basis of this intersection using Singular:ring R=0,(x,y),lp;

ideal I1 = x,y;

ideal I2 = x-1,y;

ideal I3 = x,y-1;

ideal I4 = x-1,y-1;

std(intersect(I1,I2,I3,I4));

[1]=y2-y

[2]=x2-x

Hence

⟨x, y⟩ ∩ ⟨x − 1, y⟩ ∩ ⟨x, y − 1⟩ ∩ ⟨x − 1, y − 1⟩ = ⟨x2 − x, y2 − y⟩ ,

so the four points are represented as the intersection of two pairsof parallel lines, see Figure 3.1.

Figure 3.1: Four points as the intersection of two pairs of lines

In the context of primary decomposition, we will discuss, howto do the converse, that is, how to represent a given ideal as anintersection.

In Exercise 5.10 we will develop an algorithm for computingintersections of ideals with the help of syzygyies.

Page 86: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 76

3.2 Elimination of Variables

We now discuss how to intersect an ideal with a polynomial subring.Geometrically this corresponds to the projection of algebraic sets.

Definition 3.2.1 A monomial ordering > on

S =K[x1, . . . , xm, xm+1, . . . , xn]

is called elimination ordering for x1, . . . , xm if for all polynomi-als f ∈ S it holds

L(f) ∈K[xm+1, . . . , xn]⇒ f ∈K[xm+1, . . . , xn].

Remark 3.2.2 An elimination ordering satisfies xi > 1 for all i =1, . . . ,m, that is, it is global on K[x1, . . . , xm].

Proof. If xi < 1 then L(1 + xi) = 1 ∈ K[xm+1, . . . , xn] but 1 + xi ∉K[xm+1, . . . , xn].

Example 3.2.3 The lexicographic ordering with x1 > ... > xn isclearly an elimination ordering (for any 0 ≤m < n).

Algorithm 3.2.4 Let > be an elimination ordering for x1, . . . , xm,let I ⊂ K[x1, . . . , xm, xm+1, . . . , xn]> be an ideal, and G a standardbasis of I with respect to >. Then

H = {g ∈ G ∣ L(g) ∈K[xm+1, . . . , xn]}

is a standard basis of J = I ∩K[xm+1, . . . , xn]> (where we consider> as a monomial ordering on K[xm+1, . . . , xn]).

Proof. If g ∈ H ⊂ G ⊂ I, so L(g) ∈ K[xm+1, . . . , xn], then byDefinition 3.2.1 we have g ∈ K[xm+1, . . . , xn], so g ∈ J . This showsH ⊂ J .

From this we get L(H) ⊂ L(J). For the other inclusion: If

f ∈ J ⊂ I

then L(f) ∈ L(I) = L(G), hence there is a g ∈ G with

L(g) ∣ L(f).

Since L(f) ∈ K[xm+1, . . . , xn], also L(g) ∈ K[xm+1, . . . , xn], that is,g ∈H. This proves that L(J) ⊂ L(H), and, hence, H is a standardbasis of J .

Page 87: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 77

Example 3.2.5 Consider the twisted cubic

C = V (I) ⊂ A3K

defined byI = ⟨y − x2, z − x3⟩ ⊂K[x, y, z].

We compute the intersection

P = I ∩K[y, z]

by computing a Grobner basis of I with respect to lp with x > y > z:ring R=0,(x,y,z),lp;

ideal I = y-x2,z-x3;

std(I);

[1]=y3-z2

[2]=xz-y2

[3]=xy-z

[4]=x2-y

HenceP = ⟨y3 − z2⟩

The curve V (P ) corresponds to the image of C under the projectionmap

A3K → A2

K, (x, y, z)↦ (y, z)

see Figure 3.2. The elimination ideal can also be computed with the

Figure 3.2: Projection of the twisted cubic

following command (no matter what the monomial order is):

Page 88: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 78

eliminate(I,x);

[1]=y3-z2

To eliminate several variables, put their product into the secondargument.

In the next section we discuss the relation between the geometricconcept of projection and the algebraic concept of elimination.

3.3 Projection and Elimination

For any ideal I ⊂ K [x1, . . . , xn], for 0 ≤ m < n consider the elimi-nation ideal

Im = I ∩K[xm+1, . . . , xn]

and the projection

πm ∶ AnK → An−m

K

πm (a1, . . . , an) = (am+1, . . . , an)

forgetting the first m coordinates.

Example 3.3.1 For

I = ⟨x2 − 1, y2 − 4⟩

V (I) = {(1,2) , (−1,2) , (1,−2) , (−1,−2)}

then π1 (V (I)) = {−2,2} and I1 = ⟨y2 − 4⟩. We will see how to usethe idea of projection to solve algebraic systems with a finite set ofsolutions.

Example 3.3.2 The projection of an algebraic set may not be analgebraic set: For the hyperbola S = V (xy − 1) we have π1 (S) =A1K/ {0}, see Figure 3.3.

Hence, the right question is, how to describe the closure of theprojection in the Zariski topology. Recall that the closed sets ofthe Zariski topology are the algebraic sets. For any subset S ⊂ An

K

the Zariski closure isS = V (I(S)).

In particular, for an algebraic set S, we have S = V (I(S)).

Theorem 3.3.3 If K =K and I ⊂K [x1, . . . , xn] is an ideal, then

πm(V (I)) = V (Im)

for all 0 ≤m < n.

Page 89: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 79

Figure 3.3: Projection of a hyperbola

Proof. If (am+1, . . . , an) = πm(a1, . . . , an) ∈ πm(V (I)) and f ∈ Im,then, considering f as an element of I ⊂K [x1, . . . , xn], we have

f(am+1, . . . , an) = f(a1, . . . , an) = 0,

henceπm(V (I)) ⊂ V (Im).

Since V (Im) is closed,

πm(V (I)) ⊂ V (Im) = V (Im).

Any g ∈ I (πm(V (I))) ⊂ K[xm+1, . . . , xn] can be considered asan element of K[x1, . . . , xn] and vanishes on V (I). So by The-orem 2.1.11 (Nullstellensatz) there is an a with ga ∈ I, so ga ∈I ∩K[xm+1, . . . , xn] = Im. Hence, again by Theorem 2.1.11,

I (πm(V (I))) ⊂√Im = I(V (Im)),

so by applying V we get

V (Im) = V (Im) = V (I(V (Im))) ⊂ V (I (πm(V (I)))) = πm(V (I)).

Example 3.3.4 Considering the ideal

I = ⟨x − st, y − t, z − s2⟩ ⊂K[s, t, x, y, z]

Page 90: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 80

we compute the projection on the variables x, y, z using Singular:ring R=0,(s,t,x,y,z),lp;

ideal I = x-st, y-t, z-s2;

std(I);

[1]=x2-y2z

[2]=t-y

[3]=sy-x

[4]=sx-yz

[5]=s2-z

Henceπ2 (V (I)) = V (x2 − y2z).

We will now discuss how to interpret this calculation.

3.4 Polynomial Maps Between Algebraic

Sets

Proposition 3.4.1 Suppose K =K and we are given a polynomialmap

ϕ ∶ AmK → An

K

t = (t1, . . . , tm)↦ (f1(t), . . . , fn(t))

with fi ∈ K [t1, . . . , tm]. Then for the closure of the image of ϕ itholds

im(ϕ) = V (Jm)

where

J = ⟨x1 − f1, . . . , xn − fn⟩ ⊂K [t1, . . . , tm, x1, . . . , xn] .

Proof. With the graph

Γ(ϕ) = {(t, x) ∈ An+mK ∣ x = ϕ(t)} = V (J).

we haveπm(V (J)) = πm(Γ(ϕ)) = im (ϕ) .

Using Theorem 3.3.3 it follows

im (ϕ) = V (Jm) .

Page 91: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 81

Example 3.4.2 The Whitney umbrella is the image of the map

ϕ ∶ A2K → A3

K

(s, t) ↦ (st, t, s2)

Applying Proposition 3.4.1, we have already determined in Example3.3.4 that the

im (ϕ) = V (x2 − y2z).

Figure 3.4 shows the Whitney umbrella over the reals K = R.

Figure 3.4: Whitney umbrella

In general we define:

Definition 3.4.3 A polynomial parametrization of the alge-braic variety X ⊂ An

K is a polynomial map ϕ ∶ AmK → An

K with

im(ϕ) =X.

Computing the ideal of the image of a polynomial parametriza-tion is also referred to as implicitation, since we determine implicitequations for the image of the parametrization.

Example 3.4.4 Given a homogeneous linear system of equations,using Gaussian elimination we can compute a parametrization ofthe solution set.

For example, consider the linear system of equations from Ex-ample 1.5.2

f1 = x1 + x2 + x5 = 0f2 = x1 + x2 + x3 + x4 + x5 = 0

Page 92: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 82

Gaussian elimination yields

x1 + x2 + + x5 = 0x3 + x4 = 0

So we obtain a basis of the vector space of solutions

V (⟨f1, f2⟩) = ⟨

⎛⎜⎜⎜⎜⎜⎜⎝

−10001

⎞⎟⎟⎟⎟⎟⎟⎠

,

⎛⎜⎜⎜⎜⎜⎜⎝

00−110

⎞⎟⎟⎟⎟⎟⎟⎠

,

⎛⎜⎜⎜⎜⎜⎜⎝

−11000

⎞⎟⎟⎟⎟⎟⎟⎠

and, hence, a parametrization

ϕ ∶ A3K → A5

K

(t1, t2, t3) ↦ (−t1 − t3, t3,−t2, t2, t1)

withV (⟨f1, f2⟩) = im(ϕ).

We can extend the concept of a polynomial map between affinespaces to polynomial maps between algebraic sets:

Definition 3.4.5 A map ϕ ∶X → Y between algebraic sets X ⊂ AmK

and Y ⊂ AnK, which is induced by a polynomial map ϕ′ ∶ Am

K → AnK

with ϕ′(X) ⊂ Y is called a morphism.

Proposition 3.4.6 If X = V (I) ⊂ AmK with an ideal I ⊂K[t1, . . . , tm]

andϕ ∶ X → An

K

t = (t1, . . . , tm)↦ (f1(t), . . . , fn(t))

is a morphism, thenim(ϕ) = V (Jm)

where

J = ⟨I⟩ + ⟨x1 − f1(t), . . . , xn − fn(t)⟩ ⊂ k [t1, . . . , tm, x1, . . . , xn] .

Proof. Again

Γ(ϕ) = {(t, x) ∈ An+mK ∣ x = ϕ(t), t ∈X} = V (J)

is the graph, and we can argue as in the proof of Proposition 3.4.1.

Page 93: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 83

Example 3.4.7 The image of the sphere

S = V (t21 + t22 + t

23 − 1) ⊂ A3

K

under the morphism

ϕ ∶ S → A3K

(t1, t2, t3) ↦ (t1t2, t1t3, t2t3)

is the Steiner surface. Figure 3.5 shows an image for K = R.By computing a Grobner basis of

J = ⟨t21 + t22 + t

23 − 1, x − t1t2, y − t1t3, z − t2t3⟩

with respect to an elimination ordering for t1, t2, t3, by Proposition3.4.6 we get

im(ϕ) = V (x2y2 + x2z2 + y2z2 − xyz).

See also Exercise 3.3.

Figure 3.5: Steiner surface over the reals

The elimination ideal can be interpreted as the kernel of a ringhomomorphism. Recall that the kernel of a ring homomorphismis an ideal (in fact, the ideal definition is motivated by the keyproperties of kernels).

Proposition 3.4.8 Let I ⊂ K[t1, . . . , tm] be an ideal. The kernelker(f) of a ring homomorphism

f ∶ K[x1, . . . , xn] → K[t1, . . . , tm]/Ixi ↦ fi

Page 94: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 84

is an ideal, andker(f) = Jm

with

J = ⟨I⟩ + ⟨x1 − f1(t), . . . , xn − fn(t)⟩ ⊂K [t1, . . . , tm, x1, . . . , xn] .

Note that J is independent of the choice of representatives fi ofthe classes fi, since we add I.Proof. Write I = ⟨g1, . . . , gs⟩ ⊂K[t1, . . . , tm]. We have

h(x) ∈ ker(f)

⇔ h(f1(t), . . . , fn(t)) ∈ I

⇔ h(x) ∈ J ∩K [x1, . . . , xn]

For the last equivalence we observe: By Taylor’s formula,

h(x) = h(f1(t), . . . , fn(t)) +∑ni=1ci(x, t) ⋅ (xi − fi(t))

with some ci(t, x) ∈K [t1, . . . , tm, x1, . . . , xn]. So if h(f1(t), . . . , fn(t)) ∈I then h(x) ∈ J . On the other hand, if h(x) ∈ J , then ∃ai(x, t), ci(x, t)with

h(x) = ∑si=1ai(x, t)gi(t) +∑

ni=1ci(x, t) ⋅ (xi − fi(t))

so

h(f1(t), . . . , fn(t)) = ∑si=1ai(f1(t), . . . , fn(t), t) ⋅ gi(t) ∈ I.

So a morphism

ϕ ∶ V (I) → AnK

t ↦ (f1(t), . . . , fn(t))

can be represented on the algebraic side by the ring homomorphism

f ∶ K[x1, . . . , xn] → K[t1, . . . , tm]/Ixi ↦ fi

With this notation, the conclusion of Proposition 3.4.6 can bewritten in a more intrinsic way as

ϕ(X) = V (ker(f)).

On the level of schemes, we would simply define the image asthe scheme defined by ker(f).

Page 95: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 85

Example 3.4.9 By computing a kernel, the ideal of the Steinersurface in Example 3.4.7 can be determined as follows:ring S = 0,(x,y,z),dp;

ring R = 0,(t1,t2,t3),dp;

ideal I = t1^2+t2^2+t3^2-1;

qring Q = std(I);

map f = S, ideal(t1*t2, t1*t3, t2*t3);

setring S;

kernel(Q,f);

[1]=x2y2+x2z2+y2z2-xyz

Note, that the ring homomorphism f is defined in the target ringQ (and gives a reference to the source ring S). On the other handthe kernel is computed in the source ring S (and you have to givea reference to the target ring Q).

3.5 Rational Maps Between Varieties

More generally, one can consider maps given by rational functions.This is indeed necessary, for example to parametrize a circle, seeExercise 3.2. We discuss how to determine the image of a rationalmap. This is the algorithmic basis of birational geometry, whichstudies algebraic varieties up to birational maps, that is, rationalmaps which admit a rational inverse.

Definition 3.5.1 A rational map

ϕ = (f1

g1

, . . . ,fngn

) ∶ AmK An

K

is a tuple of rational functions figi∈ K(t1, . . . , tm). We assume that

fi and gi are coprime. A rational map gives a map

ϕ ∶ AmK/Z → An

K

t = (t1, . . . , tm)↦ (f1(t)g1(t) , . . . ,fn(t)gn(t))

where Z = V (g1 ⋅ . . . ⋅ gn), that is, AmK/Z is the locus on which all

component functions are defined. The image of ϕ is then defined as

im (ϕ) = ϕ(AmK/Z).

The dashed arrow indicates that the map is not defined on thewhole of Am

K . Of course any polynomial map is also a rational map.

Page 96: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 86

Proposition 3.5.2 Suppose K =K,

ϕ = (f1

g1

, . . . ,fngn

) ∶ AmK An

K

is a rational map, and g = g1 ⋅ ... ⋅ gn. Then for the closure of theimage of ϕ it holds

im (ϕ) = V (Jm+1)

where

J = ⟨g1x1 − f1, . . . , gnxn − fn, 1 − gs⟩ ⊂K[s, t1, . . . , tm, x1, . . . , xn].

The idea of the proof is simple: The equation 1−gs removes thesolutions (t, x) of the equations gixi − fi with some gi (x) = 0.Proof. With the map

ι ∶ AmK/Z → An+m+1

K

t ↦ (g(t)−1, t, ϕ(t))

we obtain a commutative diagram

An+m+1K

AmK/Z

ϕ-

ι

-

AnK

πm+1

-

It holdsι(Am

K/Z) = V (J)

since (s, t, x) ∈ V (J) if and only if

gi(t) ≠ 0∀i and xi =fi(t)

gi(t)∀i and s =

1

g(t)

that is (s, t, x) ∈ ι(AmK/Z). Applying πm+1 we get

ϕ(AmK/Z) = πm+1(V (J))

and hence, by Theorem 3.3.3,

ϕ(AmK/Z) = πm+1(V (J)) = V (Jm+1) .

Remark 3.5.3 With the notation as in Proposition 3.5.2, the graphof ϕ is

Γ(ϕ) = V (J ∩K[t1, . . . , tm, x1, . . . , xn]).

Page 97: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 87

Example 3.5.4 Consider the rational map

ϕ ∶ A1K A2

K

t ↦ (1−t2t2+1 ,

2tt2+1)

defined on the complement of Z = V (t2 + 1). To determine theimage, we calculate a Grobner basis of

I = ⟨(t2 + 1)x − (1 − t2) , (t2 + 1) y − 2t, 1 − (t2 + 1)2s⟩

for lp with s > t > x > y using Singular:ring R=0,(s,t,x,y),lp;

ideal I = (t2+1)*x-(1-t2), (t2+1)*y-2t, 1-(t2+1)^2*s;

option(redSB);

std(I);

[1]=x2+y2-1

[2]=ty+x-1

[3]=tx+t-y

[4]=4s-2x+y2-2

Hence, the closure of the image of ϕ

C = im (ϕ) = V (I2) = V (x2 + y2 − 1)

is a circle.

Definition 3.5.5 A rational parametrization of the algebraicvariety X ⊂ An

K is a rational map ϕ ∶ AmK An

K with im(ϕ) =X.

In general the parametrization problem is much more compli-cated. Indeed, most varieties do not admit a rational parametriza-tion. For the circle, however, the problem is easy:

Remark 3.5.6 To find ϕ, we do stereographic projection from apoint P on the circle C to a line, for example, from P = (−1,0) toL = {x = 0}. So consider the linear system of all lines

Lt = {y − t (x + 1) = 0} ⊂ A2K

through P , and t ∈ P1K = A1

K ∪ {∞}. Writing

Lt ∩C = {P,Pt}Lt ∩ {x = 0} = {Qt} = {(0, t)}

we defineϕ(Qt) = Pt,

Page 98: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 88

see Figure 3.6. As an exercise do the calculation. Note that theaffine space A1

K is not sufficient to parametrize all points of C: Inorder to obtain P we have to consider the vertical line L∞ whichcorresponds to the point at infinity on A1

K. Hence, we have to passfrom affine to the projective space P1

K.This is a hint, that birational geometry should better be done

with projective varieties.

Figure 3.6: Rational parametrization of the circle.

The parametrization ϕ of the circle is indeed birational, that is,it has a rational inverse. The inverse

ϕ−1 =y

x + 1∶ C A1

K

is obtained by solving the equation of the line for t. Note that thisequation appears also in the Grobner basis computed in Example3.5.4. To formalize the idea of an inverse rational map we first of allhave to generalize rational maps between affine spaces to rationalmaps between algebraic varieties, since the closure of the image ofa rational map is an algebraic variety.

Definition 3.5.7 If I ⊂ K[x1, . . . , xn] is a prime ideal and X =V (I) ⊂ An

K is the corresponding algebraic variety, then the coordi-nate ring

K[X] =K[x1, . . . , xn]/I

Page 99: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 89

of X is an integral domain. Hence, we can form the quotient field

K(X) = quot(K[X])

by calculating with fractions. It describes the rational functions onX and is called the rational function field of X.

The domain of definition D(q) of q ∈K(X) is

D(q) = {x ∈X ∣ ∃f , g ∈K[X] with g(x) ≠ 0 and q =f

g} .

So q is a well-defined map q ∶D(q)→ A1K by using for each x ∈D(q)

a representative of q defined at x.

Definition 3.5.8 A rational map

ϕ = (q1, . . . , qn) ∶X AnK

is a tuple of rational functions qi ∈ K(X). The domain of defi-nition D(ϕ) of ϕ is

D(ϕ) =D(q1) ∩ . . . ∩D(qn),

and the image of ϕ is

im(ϕ) = ϕ(D(ϕ)).

If Y ⊂ AnK is a variety, then a rational map

ϕ ∶X Y

is a rational map ϕ ∶X AnK with im(ϕ) ⊂ Y .

In order to define birational maps we need a notion of compo-sition of rational maps. Given rational maps

ϕ = (q1, . . . , qn) ∶X Y and ψ = (f1

g1

, . . . ,fmgm

) ∶ Y Z

the natural definition for the composition is

ψ ○ ϕ = (f1 ○ (q1, . . . , qn)

g1 ○ (q1, . . . , qn), . . . ,

fm ○ (q1, . . . , qn)

gm ○ (q1, . . . , qn)) ∶X Z.

However, it may happen that gi ○ (q1, . . . , qn) = 0. This is excludedby the following condition:

Page 100: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 90

Definition 3.5.9 A rational map ϕ ∶X Y is called dominant,if im(ϕ) = Y .

Remark 3.5.10 The rational map ϕ = (q1, . . . , qn) ∶ X Y isdominant if and only if the K-algebra homomorphism

ϕ∗ ∶ K[Y ] → K(X)g ↦ g ○ (q1, . . . , qn)

is injective.

Proof. We have g ○ (q1, . . . , qn) = 0 ⇔ g (q1(x), . . . , qn(x)) = 0∀x ∈D(ϕ) ⊂X ⇔ im(ϕ) ⊂ V (g). So ϕ∗ is not injective if and onlyif im(ϕ) is contained in a Zariski closed proper subset of Y .

Remark 3.5.11 If ϕ ∶ X Y and ψ = ( f1g1 , . . . ,fmgm

) ∶ Y Z

are rational maps and ϕ is dominant, then the composition ψ ○ ϕ ∶X Z is defined as

ψ ○ ϕ = (ϕ∗(f1)

ϕ∗(g1), . . . ,

ϕ∗(fm)

ϕ∗(gm)) .

Note that the algebraic varieties and dominant rational mapsform a category.

Definition 3.5.12 A dominant rational map ϕ ∶X Y is calleda birational map, if it has a rational inverse ϕ−1 ∶ Y X, thatis, ψ ○ ϕ = id and ϕ ○ ψ = id. We then say that X and Y arebirational.

Here we use the above notion of composition and consider theidentity as a rational map.

Example 3.5.13 For the parametrization of the circle in Example3.5.4 and its inverse

ϕ = (1−t2t2+1 ,

2tt2+1) ϕ−1 = ( y

x+1)

we have2tt2+1

1−t2t2+1 + 1

= t

and⎛

1 − ( y

x+1)

2

( y

x+1)

2+ 1

,2 ( y

x+1)

( y

x+1)

2+ 1

⎠= (x, y) .

Note that to obtain the latter we have to compute in K(C), that ismodulo the equation of the circle.

Page 101: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 91

Remark 3.5.14 A dominant rational map ϕ ∶ X Y is bira-tional if and only if ϕ∗ ∶ K(Y ) → K(X) is a K-algebra isomor-phism.

A straightforward combination of the ideas of Propositions 3.4.6and 3.5.2 generalizes these results to an algorithm for computingthe image of a rational map X An

K (we skip the proof):

Algorithm 3.5.15 Suppose K = K, I ⊂ K[t1, . . . , tm] is a primeideal, X = V (I) ⊂ Am

K is the corresponding algebraic variety

ϕ = (f1

g1

, . . . ,fngn

) ∶X AnK

is a rational map, and g = g1 ⋅ ... ⋅ gn. Then for the closure of theimage of ϕ it holds

im (ϕ) = V (Jm+1)

where

J = ⟨I⟩+⟨g1x1 − f1, . . . , gnxn − fn, 1 − gs⟩ ⊂ k [s, t1, . . . , tm, x1, . . . , xn] .

Example 3.5.16 We compute the image of the node

X = V (t31 + t21 − t

22) ⊂ A2

K

(see Figure 3.7) under the rational map

t1t2∶X A1

K

using Singular:ring R=0,(s,t1,t2,x),lp;

ideal I = t1^3+t1^2-t2^2, t2*x-t1,1-t2*s;

std(I);

t2*x^3+x^2-1

t1-t2*x

s*x^2-s+x^3

s*t2-1

Hence the closure of the image

im (ϕ) = V (0) = A1K

is the whole of A1K.

The map ϕ is indeed birational: From the equations

t2x3 + x2 − 1 = 0

t1 − t2x = 0

Page 102: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 92

we can read off the inverse

ϕ−1 = (1 − x2

x2,1 − x2

x3) ∶ A1

K X

which gives a rational parametrization of X.See also Exercise 1.5.2.

–1

0

1

0 1

Figure 3.7: Node

Example 3.5.17 Let I = ⟨xy − zw⟩ ⊂ R = K[x, y, z,w] and X =V (I) ⊂ A4

K. Then K[X] = R/I is not a unique factorization do-main, for example,

xy = zw.

Hence we have two representations for the rational function

q =x

z=w

y∈K(X)

SoS/V (z) ⊂D(q) and S/V (y) ⊂D(q)

henceS/V (y, z) ⊂D(q).

Do we have equality? How to compute the domain of a rationalfunction in general? The following lemma describes the domain byan ideal:

Page 103: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 93

Algorithm 3.5.18 Let X ⊂ AnK be a variety and q = f

g ∈ K(X).Then the domain of definition of q is the complement

D(q) =X/V (N)

of the vanishing locus of the ideal

N = {γ ∈K[x1, . . . , xn] ∣ γ ⋅ f ∈ ⟨g⟩ + I(X)} .

Proof. The possible denominators of q are the elements of theideal

M = {γ ∈K[X] ∣ γ ⋅ q ∈K[X]}

It is the image of N under the canonical epimorphism

K[x1, . . . , xn]→K[x1, . . . , xn]/I(X) =K[X]

since

γ ∈M ⇔ γ ⋅f

g∈K[X]⇔ γ ⋅ f ∈ ⟨g⟩⇔ γ ⋅ f ∈ ⟨g⟩ + I(X)⇔ γ ∈ N .

Then the claim follows by the definition of D(q).How can we compute the ideal N using Grobner bases? It is a

special case of an ideal quotient

I ∶ J = {w ∈ R ∣ w ⋅ J ⊂ I}

of two ideals I, J ⊂ R. Indeed,

N = (⟨g⟩ + I(X)) ∶ ⟨f⟩ .

3.6 Ideal Quotients

We now discuss how to obtain ideal quotients using Grobner bases.Aside the computation of D(q), a key application of ideal quotientsis the computation of complements of algebraic sets. Of course thecomplement will in general not be an algebraic set. So the bestwe can hope for is to obtain the Zariski closure of the complement.Ideal quotients will also play a major role in primary decomposition.

Definition 3.6.1 Let R be a ring. For ideal I, J ⊂ R the idealquotient is

I ∶ J = {f ∈ R ∣ f ⋅ J ⊂ I} .

Remark 3.6.2 For all ideals I, J ⊂ R it holds

Page 104: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 94

(1) I ∶ J is an ideal of R,

(2) I ⊂ (I ∶ J),

(3) J ⊂ I if and only if I ∶ J = R.

For all ideals I1, . . . , Is, J ⊂ R it holds

(4) (I1 ∩ ... ∩ Is) ∶ J = (I1 ∶ J) ∩ ... ∩ (Is ∶ J),

(5) J ∶ (I1 + ... + Is) = (J ∶ I1) ∩ ... ∩ (J ∶ Is),

For all ideals I, J,L ⊂ R it holds

(6) (I ∶ J) ∶ L = I ∶ (J ⋅L).

We do the straightforward proof in Exercise 3.5.For computational purposes we now focus on ideals in R =

K[x1, . . . , xn]. By Remark 3.6.2.(5) and the ideal intersection algo-rithm 3.1.1, it is sufficient to compute ideal quotients by principalideals: If J = ⟨g1, . . . , gr⟩ then

I ∶ J = I ∶ (⟨g1⟩ + ... + ⟨gr⟩) = (I ∶ ⟨g1⟩) ∩ ... ∩ (I ∶ ⟨gr⟩) .

Again using the ideal intersection algorithm, we can compute:

Algorithm 3.6.3 Let I ⊂ R be an ideal and g ∈ R. If we write

I ∩ ⟨g⟩ = ⟨g ⋅ f1, . . . , g ⋅ fs⟩

with fi ∈ R, then it holds

I ∶ ⟨g⟩ = ⟨f1, . . . , fs⟩ .

Proof. Any element of I ∩ ⟨g⟩ is a multiple of g, so

I ∩ ⟨g⟩ = ⟨g ⋅ f1, . . . , g ⋅ fs⟩ .

By⟨f1, . . . , fs⟩ ⋅ g ⊂ I

we have⟨f1, . . . , fs⟩ ⊂ I ∶ ⟨g⟩ .

On the other hand, if f ∈ I ∶ ⟨g⟩, then f ⋅ g ∈ I ∩ ⟨g⟩, so

f ⋅ g = ∑iai ⋅ g ⋅ fi = g ⋅∑iai ⋅ fi

with ai ∈ R. Hence

f = ∑iai ⋅ fi ∈ ⟨f1, . . . , fs⟩ .

Page 105: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 95

Example 3.6.4 We compute the domain of

q =x

z∈K(X)

where X = V (xy − zw) ⊂ A4K using Singular:

ring R=0,(x,y,z,w),dp;

ideal I = xy-zw;

quotient(I+ideal(z),ideal(x));

[1]=z

[2]=y

So the domain of q is the complement of the plane V (y, z) ⊂X.

We can interpret ideal quotients geometrically as follows:

Theorem 3.6.5 Let I, J ⊂ R be ideals.

1) If I ⊂ R is a prime ideal, and J /⊂ I is an ideal then I ∶ J = I.

2) If I = ⋂sl=1Il with Il prime and J is an ideal, then

I ∶ J = ⋂J /⊂IlIl

Proof. Let g ∈ J with g ∉ I. If f ∈ I ∶ J , that is, f ⋅ J ⊂ I, thenf ⋅ g ∈ I. Since I is a prime ideal, it follows that f ∈ I. By Remark3.6.2.(2), we obtain the first claim.

Using the first claim and Remark 3.6.2.(4) and (3), the secondclaim follows:

I ∶ J = (⋂J /⊂Il(Il ∶ J)´¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¶

Il

) ∩ (⋂J⊂Il(Il ∶ J)´¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¶

R

)

As we have already observed, if K =K, we have for prime idealsIl by the Nullstellensatz

J ⊂ Il ⇒ V (Il) ⊂ V (J)⇒ J =√J ⊂ Il

that is,J ⊂ Il⇔ V (Il) ⊂ V (J)

hence:

Corollar 3.6.6 Let K = K. If I = ⋂sl=1Il with Il ⊂ R prime andJ ⊂ R is an ideal, then

V (I ∶ J) = ⋃V (Il)/⊂V (J)V (Il)

This impliesV (I ∶ J) = V (I)/V (J)

that is, the ideal quotient computes the closure of the complement.

Page 106: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 96

Example 3.6.7 Consider the ideal

I = ⟨x2 − x, y2 − y⟩ = ⟨x, y⟩∩⟨x, y − 1⟩∩⟨x − 1, y⟩∩⟨x − 1, y − 1⟩ ⊂K[x, y]

withV (I) = {(0,0), (0,1), (1,0), (1,1)} .

For J = ⟨x − y⟩ we compute:ring R=0,(x,y),dp;

ideal I = x2-x, y2-y;

ideal J = x-y;

quotient(I, J);

[1]=x+y-1

[2]=y2-y

SoI ∶ J = ⟨x + y − 1, y2 − y⟩ ,

henceV (I ∶ J) = {(0,1), (1,0)} ,

see Figure 3.8.

Figure 3.8: Ideal quotient

3.7 Solving Algebraic Systems with a

Finite Set of Solutions

Suppose K = K. Given an ideal I ⊂ K[x1, . . . , xn] with a finite setof solutions, how to compute the points of V (I) explicitly? Thenaive algorithm would be:

Page 107: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 97

1) Project to each coordinate, that is, compute I ∩K[xi] = ⟨fi⟩by elimination (note that K[xi] is a principal ideal domain).

2) Compute the finite sets V (fi), for example by numerical tech-niques.

3) Check, which points of V (f1) × ... × V (fn) are contained inV (I).

Example 3.7.1 Consider the ideal

I = ⟨2x2 − xy + 2y2 − 2, 2x2 − 3xy + 3y2 − 2⟩

from Section 1.1.ring R=0,(x,y),lp;

ideal I = 2x2-xy+2y2-2, 2x2-3xy+3y2-2;

eliminate(I,x);

[1] = y3-y

eliminate(I,y);

[1] = 4x4 - 5x2 + 1

Hence, byI ∩K[y] = ⟨y3 − y⟩ = ⟨y(y + 1)(y − 1)⟩

and

I ∩K[x] = ⟨4x4 − 5x2 + 1⟩ = ⟨(x + 1)(x − 1)(2x + 1)(2x − 1)⟩

we get

V (I) ⊂ {−1,1,−1

2,1

2} × {0,−1,1} .

Testing these 9 points with respect to the generators of I yields

V (I) = {(1,0) , (−1,0) ,(1

2,1) ,(−

1

2,−1)} .

The cartesian product can get very large, in a general settingwe expect dn points where d = ∣V (I)∣. But we can do better. Thecornerstone is the following theorem:

Theorem 3.7.2 Let K = K, I ⊂ K [x1, . . . , xn]. Then the follow-ing are equivalent:

1) ∣V (I)∣ <∞

2) If G is a Grobner basis of I, then for every i there is a g ∈ Gwith

L(g) = xαii

and αi ≥ 0.

Page 108: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 98

3) dimK(K [x1, . . . , xn] /I) <∞.

Proof. For (1)⇒ (2) consider the projection

π ∶ V (I)→ A1K , (a1, . . . , an)↦ ai

Thenf =∏t∈π(V (I))(xi − t) ∈ I(V (I)) =

√I,

hence fw ∈ I for some w ≥ 1, so L(fw) ∈ L(I) = L(G). Hence thereis a g ∈ G such that L(g) divides L(fw), which is a power of xi.

(2)⇔ (3) follows, since (by Exercise 2.16)

K [x1, . . . , xn] /I ≅ K ⟨xα ∣ xα ∉ L(I)⟩

as K-vector spaces.(3)⇒ (1): Since dimK(K [x1, . . . , xn] /I) <∞ the classes x0

i , x1i , x

2i , ...

are linearly dependent, so there is a 0 ≠ fi ∈ K[xi] with fi ∈ I. Asabove,

V (I) ⊂ V (f1) × ... × V (fn) .

In Exercise 3.8 we show that dimK(K [x1, . . . , xn] /I) is a boundfor the number of solutions, and equality holds if I is radical.

Remark 3.7.3 By the previous theorem, if V (I) ≠ ∅, the minimalGrobner basis of I for lp with x1 > ... > xn contains equations of theform

xα11 − g1 (x1, . . . , xn)

xα22 − g2 (x2, . . . , xn)

xαn−1n−1 − gn−1 (xn−1,xn)

gn (xn)

with αi > 0.To determine V (I), solve the equations for xn, . . . , x1 and keep

those solutions which satisfy the remaining Grobner basis elements.This can be done by numerical methods for solving univariate poly-nomial equations.

Example 3.7.4 Consider again, the intersection of two ellipsesfrom Section 1.1. As we have already seen there, for y > x we get:ring R=0,(y,x),lp;

ideal I = 2x2-xy+2y2-2, 2x2-3xy+3y2-2;

Page 109: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 99

std(I);

[1]=4x4-5x2+1

[2]=3y+8x3-8x

Solving 4x4 − 5x2 + 1 = 0 yields

x = 1,−1,1

2,−

1

2

and from the second equation we get

V (I) = {(1,0) , (−1,0) , (1

2,1), (−

1

2,−1)} .

On the other hand, for x > y,ring R=0,(x,y),lp;

ideal I = 2x2-xy+2y2-2, 2x2-3xy+3y2-2;

std(I);

[1]=y3-y

[2]=2xy-y2

[3]=2x2-3xy+3y2-2

so we gety = 0,1,−1.

Solving the third equality yields

V (I) ⊂ {(1,0) , (−1,0) , (1,1), (1

2,1), (−1,−1), (−

1

2,−1)} .

To obtain V (I), we discart the solutions (1,1), (−1,−1) which donot satisfy 2xy − y2 = 0.

See also Exercise 3.9.

3.8 Projective Algebraic Sets and Graded

Ideals

As we have seen in Example the points of a circle in A2R are in

1 ∶ 1-correspondence with the points of P1R. More generally, many

results in algebraic geometry improve, if we replace the affine spaceAnK by projective space PnK . For example, any line in A2

K gets addedits point at infinity, which leads to the desirable fact that any twodistinct lines intersect in a point: Two parallel lines intersect attheir common point at infinity. More generally, Bezout’s theoremshows: If K = K, two curves in P2

K of degree d1 and d2 intersectprecisely in d1 ⋅ d2 points counted with multiplicity. Another main

Page 110: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 100

motivation to pass to projective varieties is to give algorithms forcomputing invariants like dimension, degree and genus.

In this section we will discuss the basics of graded rings, ho-mogeneous ideals and the associated projective algebraic sets. Weinvestigate how to associate to a projective algebraic set and affinealgebraic set, and vice versa.

Definition 3.8.1 The n-dimensional projective space over K is

Pn(K) = {1-dimensional vector subspaces of Kn+1}

If ⟨(p0, . . . , pn)⟩ ∈ Pn(K), so in particular (p0, . . . , pn) ≠ 0, then wewrite

(p0 ∶ ... ∶ pn) ∶= ⟨(p0, . . . , pn)⟩ .

The quotient symbol ∶ indicates that the generator of the 1-dimension vector space is only unique up to multiplication with anon-zero constant:

(p0 ∶ ... ∶ pn) = (q0 ∶ ... ∶ qn)⇐⇒ ∃λ ≠ 0 ∶ λ ⋅ (p0, . . . , pn) = (q0, . . . , qn)

With the group action

K× ×Kn+1 →Kn+1, (λ, (p0, . . . , pn))↦ λ ⋅ (p0, . . . , pn)

we havePn(K) = (Kn+1 − {0}) /K×.

This quotient construction has a generalization in the setting oftoric geometry and geometric invariant theory.

For example, we can think of P2(R) as a half sphere with oppo-site boundary points identified (since they generate the 1-dimensionvector space), see Figure 3.9.

To specify algebraic subsets of Pn(K) we have to consider ho-mogeneous polynomials:

Definition 3.8.2 A graded ring is a commutative ring R with 1together with a fixed decomposition

R =⊕α∈GRα

as a direct sum of abelian groups, where G is a monoid (that issemigroup with unit), such that

RαRβ ⊂ Rα+β.

If f ∈ Rα then f is called homogeneous of degree α.If f ∈ R then f = ∑α∈G, finite fα with the uniquely determined

homogeneous components fα ∈ Rα.A homogeneous ideal is an ideal I ⊂ R which can be generated

by homogeneous elements.

Page 111: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 101

Figure 3.9: Projective space P2(R).

Note that 1 ∈ R0 (since for any r ∈ Rβ we have r = 1 ⋅ r ∈ Rα+β),and 0 ∈ Rα for all α.

Definition 3.8.3 The standard grading on K[x0, . . . , xn] by N0

is given by setting degxi = 1∀i. Then

K[x0, . . . , xn] =⊕∞d=0K[x0, . . . , xn]d

whereK[x0, . . . , xn]d = {∑∣α∣=dcαx

α ∈K[x0, . . . , xn]}

Example 3.8.4 In the standard grading on K[x, y] the polynomi-als 3x2y and 3x2y+5xy2 are homogeneous, whereas 3x2y+5x is nothomogeneous.

However if you consider the grading of K[x, y] by N20 with degx =

e1 and deg y = e2, then the degree of a monomial is its exponent vec-tor. Hence 3x2y is homogeneous of degree (2,1), however 3x2y +5xy2 and 3x2y+5x are not. The homogeneous polynomials are pre-cisely the constant multiples of monomials (that is, terms).

Page 112: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 102

If not mentioned otherwise, in what follows, we will always con-sider the standard grading on

R =K[x0, . . . , xn].

The main idea to define projective algebraic sets is the following:

If f ∈ R is homogeneous of degree d, then

f (λ ⋅ (p0, . . . , pn)) = λd ⋅ f(p0, . . . , pn)

hence the condition f(p0 ∶ ... ∶ pn) = 0 for (p0 ∶ ... ∶ pn) ∈ Pn(K) iswell-defined (whereas the value of f at a point is not).

Definition 3.8.5 If I ⊂ R is homogeneous, then the projectivealgebraic set defined by I is

V (I) = {p ∈ Pn(K) ∣ f(p) = 0 ∀ homogeneous f ∈ I}

and if X ⊂ Pn(K)

I(X) = ⟨f ∈ R homogeneous ∣ f(p) = 0 ∀p ∈X⟩

is the homogeneous zero ideal of X.

Remark 3.8.6 If we set degxi to a positive integer wi, the corre-sponding homogeneous polynomials are used to cut out subvarietiesof the weighted projective space PnK(w0, . . . ,wn), which is definedanalogously to the ordinary projective space via the action

K× ×Kn+1 →Kn+1, (λ, (p0, . . . , pn))↦ (λw0 ⋅ p0, . . . , λwn ⋅ pn) .

In toric geometry one considers the Cox ring associated to atoric variety, which is a polynomial ring graded by a finitely gen-erated abelian group, the divisor class group of the respective toricvariety. Ideals in the Cox ring are then used to define algebraicsubsets of the toric variety.

Remark 3.8.7 Consider the hyperplane at infinity

H = {p ∈ Pn(K) ∣ p0 = 0}

and the corresponding affine chart

U = {p ∈ Pn(K) ∣ p0 ≠ 0}

Page 113: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 103

Figure 3.10: Mapping A2(R) into P2(R) by stereographic projec-tion.

so Pn(K) = U ∪H. The map

ϕ ∶ An(K) → U(p1, . . . , pn) ↦ (1 ∶ p1 ∶ ... ∶ pn)

(p1p0 , . . . ,pnp0

) ←[ (p0 ∶ p1 ∶ ... ∶ pn)

is a well-defined bijection. Figure 3.10 depicts the identificationof A2(R) with U ⊂ P2(R). The horizontal lines correspond to thepoints of H.

If F ∈K[x0, . . . , xn], then we define

F a = F (1, x1, . . . , xn).

Given a homogeneous ideal I ⊂K[x0, . . . , xn], the ideal

Ia = {F a ∣ F ∈ I} ⊂K[x1, . . . , xn]

is called the dehomogenization of I. In this way we can associateto the projective algebraic set X = V (I) ⊂ Pn(K) the affine algebraicset

ϕ−1(X ∩U) = V (Ia).

Proof. (1 ∶ x1 ∶ ... ∶ xn) ∈ V (I) ⇔ F (1, x1, . . . , xn) = 0 ∀ homoge-neous F ∈ I⇔ (x1, . . . , xn) ∈ V (Ia).

Note that, more generally, any choice of a homogeneous linearform l yields an affine chart U = {l(p) ≠ 0}.

Page 114: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 104

Example 3.8.8 The projective parabola X = V (x1x0 −x22) ⊂ P2(R)

consists of the points (1 ∶ x1 ∶ x2) corresponding to the point (x1, x2) ∈V (x1 − x2

2) ⊂ A2(R) of the affine parabola (Figure 3.11) and onepoint at infinity (0 ∶ 1 ∶ 0), so

U = {(x0 ∶ x1 ∶ x2) ∈ P2(R) ∣ x0 ≠ 0} → A2(R)∪ ∪

X = V (x1x0 − x22) → V (x1 − x2

2)(1 ∶ x1 ∶ x2) ↦ (x1, x2)

In Figure 3.11 the projective parabola is depicted by identifying a1-dimensional subspaces of A3(R) with its generator on the upperhalf sphere. Projecting the upper half sphere into the (x1, x2)-planemaps the projective parabola into the unit disc, see Figure 3.13.

Figure 3.11: Parabola x1 − x22 = 0 in A2(R).

Similar to affine algebraic geometry, the key to the identificationof projective algebraic sets with homogeneous ideals is a projectiveversion of the strong Nullstellensatz. To formulate this theorem, weneed the following easy but fundamental fact about homogeneousideals:

Lemma 3.8.9 For an ideal I ⊂ R the following are equivalent:

1) I is homogeneous.

2) For every f ∈ I also the homogeneous summands fi ∈ Ri off = ∑i fi are in I.

Page 115: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 105

Figure 3.12: Projective parabola

3) If > is a global monomial ordering, the reduced Grobner basisof I with respect to > consists out of homogeneous polynomi-als.

Proof. (2) ⇒ (1): The homogeneous summands of any set ofgenerators are in I, hence I is generated by these summands.

(1)⇒ (2): Assume I = ⟨f1, . . . , fr⟩ with fj ∈ Rdj homogeneous,and let f = ∑j ajfj ∈ I. Write aj = ∑i ai,j with ai,j ∈ Ri, so

f =∑j∑iai,jfj =∑d∑i+dj=d

ai,jfj´¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¶

gd

with gd ∈ Rd. Obviously all gd ∈ I. Since there is no cancella-tion between the homogeneous polynomials gd ∈ Rd, they are thehomogeneous summands of f .

(3)⇒ (1) is clear by Corollary 2.5.12. The converse (1)⇒ (3)we will prove in Exercise 3.10.

Note that this generalizes Lemma 2.3.6 if we use the grading bythe exponent vector. In particular, the reduced Grobner basis ofa monomial ideal consists out of monomials. Recall also that forhomogeneous polynomials the ecart is always zero, hence Mora’s

Page 116: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 106

Figure 3.13: Projective parabola as a subset of the unit disc.

algorithm coincides with Buchberger’s algorithm, so the lemma isalso true for non-global ordering..

Using Lemma 3.8.9, it is straightforward to prove (see Exer-cise 3.11):

Corollar 3.8.10 The radical of a homogeneous ideal is homoge-neous.

Theorem 3.8.11 (Projective strong Nullstellensatz) Let K =K and I ⊂K[x0, . . . , xn] homogeneous with V (I) ≠ ∅. Then

I(V (I)) =√I.

Proof. Let X = V (I) ⊂ Pn(K) and consider the affine cone C(X) =V (I) ⊂ An+1(K). Then by I(C(X)) = I(X), as shown in Exercise3.12, the (affine) strong Nullstellensatz 2.1.11, and we have

√I = I(C(X)) = I(X).

From this it follows immediately:

Corollar 3.8.12 If K =K then there is a 1 ∶ 1-map

{projective algebraic sets

X ⊂ Pn(K)}

I⇄V

{homogeneous ideals J ⊂ R

with J =√J and J ≠ ⟨x0, . . . , xn⟩

}

Page 117: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 107

Proof. Note that there are precisely two homogeneous radicalideals I with V (I) = ∅ namely I = ⟨x0, . . . , xn⟩ and I = ⟨1⟩. Hence,if we exclude the irrelevant ideal ⟨x0, . . . , xn⟩, by Theorem 3.8.11we get a 1 ∶ 1 map.

Finally we show, that to any affine variety we can associate aprojective one:

Definition 3.8.13 Given f ∈K[x1, . . . , xn], the homogenizationof f is

fh = xdeg f0 ⋅ f (

x1

x0

, . . . ,xnx0

) ∈K[x0, . . . , xn]

which clearly is a homogeneous polynomial.If I ⊂K[x1, . . . , xn], then the homogenization of I is defined as

Ih = ⟨fh ∣ f ∈ I⟩ ⊂K[x0, . . . , xn],

which, by definition, is a homogeneous ideal.

Example 3.8.14 For F = x30 + x

20x1 we get F a = 1 + x1, hence

(F a)h= x0 + x1. So if we dehomogenize and then homogenize, we

remove any common x0-power of the terms. On the other hand, bydefinition it is clear that for f ∈K[x1, . . . , xn] it holds (fh)

a= f .

Definition 3.8.15 Let X ⊂ An(K) be an affine algebraic set. Wedefine the projective closure of X as

pc(X) = V (I(X)h) ⊂ Pn(K),

the vanishing locus of the homogenization of the zero ideal of X.

Theorem 3.8.16 The projective closure of an affine algebraic setX is the smallest projective algebraic set containing ϕ(X) with theaffine chart map ϕ defined as above.

Proof. We note that ϕ(X) ⊂ pc(X): If f ∈ I(X) then fh(1, x1, . . . , xn) =0 ∀(x1, . . . , xn) ∈ X. Since any (hence any homogeneous) elementof I(X)h is a linear combination of polynomials fh with f ∈ I(X),the claim follows.

Suppose ϕ(X) ⊂ V (F1, . . . , Fr) with Fi ∈ K[x0, . . . , xn] homo-geneous. Then fi = Fi(1, x1, . . . , xn) ∈ I(X), so fh

i ∈ I(X)h, hencealso Fi ∈ I(X)h. This shows ⟨F1, . . . , Fr⟩ ⊂ I(X)h, so

pc(X) = V (I(X)h) ⊂ V (F1, . . . , Fr).

Page 118: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 108

Remark 3.8.17 We define the Zariski topology on Pn(K) byconsidering as closed sets the projective algebraic sets. The theoremshows that the projective closure of X is the Zariski closure of ϕ(X),that is,

pc(X) = ϕ(X).

Example 3.8.18 If we homogenize the defining ideal I of an affinevariety V (I), then pc(V (I)) = V (Ih), however only if K = K,see Exercise 3.13. As a counterexample in case K ≠ K, considerI = ⟨x2

1 + x42⟩ ∈ R[x1, x2]. Then V (I) = {(0,0)}, hence I(V (I)) =

⟨x1, x2⟩, which coincides with its homogenization, whereas Ih =⟨x2

0x21 + x

42⟩, so

{(1 ∶ 0 ∶ 0)} = pc(V (I)) ⫋ V (Ih) = {(1 ∶ 0 ∶ 0), (0 ∶ 1 ∶ 0)}.

Algorithm 3.8.19 Let I ⊂K[x1, . . . , xn] be an ideal. If G = (g1, . . . , gr)is a Grobner basis of I with respect to any weighted degree ordering> with weight vector w = (1, . . . ,1), then

Gh = (gh1 , . . . , g

hr )

is a Grobner basis of Ih with respect to the monomial ordering

xa0xα >h x

b0x

β ⇐⇒ xα > xβ or (xα = xβ and a > b)

Proof. By the choice of >, we have for all f ∈K[x1, . . . , xn] that

degL>(f) = deg f ,

henceL>h(f

h) = L>(f).

By the Grobner basis definition, our assumption is

L>(I) = L>(G)

and we have to show

L>h(Ih) = L>h(G

h).

By L>h(ghi ) = L>(gi) and Lemma 3.8.9, this amounts to proving that

if F ∈ Ih is homogeneous then there is an i with L>(gi) ∣ L>h(F ).For this write

F =∑ili ⋅ f

hi

with li ∈K[x0, . . . , xn] and fi ∈ I. Then

F a =∑ilai ⋅ fi ∈ I

Page 119: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 109

so, by assumption, there is an i with

L> (gi) ∣ L>(Fa).

Moreover, for the homogeneous polynomial F there is an s ≥ 0with F = xs0 ⋅ (F

a)h. Hence, it follows that L>(F a) = L>h((F

a)h)

divides L>h(F ).

Example 3.8.20 Consider the affine twisted cubic

C = V (I) ⊂ A3(K)

defined byI = ⟨x2

1 − x2, x31 − x3⟩ ⊂K[x1, x2, x3].

Note, that the degree reverse lexicographical ordering refines thegrading by the total degree as required in Algorithm 3.8.19. Hence,we can compute the homogenization in Singular as follows:ring R = 0,(x(0..3)),dp;

ideal I = x(1)^2-x(2), x(1)^3-x(3);

std(I);

[1]=x(2)^2-x(1)*x(3)

[2]=x(1)*x(2)-x(3)

[3]=x(1)^2-x(2)

SoIh = ⟨x2

2 − x1x3, x1x2 − x0x3, x21 − x2x0⟩ .

Note that homogenizing the given set of generators of I will notyield the correct result:

V (x21 − x2x0, x

31 − x

20x3) = pc(C) ∪ V (x0, x1),

recall Exercise 3.7.

3.9 Rational Maps of Projective Vari-

eties

We first note that in the projective setting a well-defined rationalmap between projective spaces

Φ = (f0

g0

, . . . ,fngn

) ∶ PmK PnK

should be given by a tuple of homogeneous rational functionsfigi

that is fi, gi ∈ K[t0, . . . , tm] are homogeneous coprime polyno-mials of the same degree. Then we can clear the denominators by

Page 120: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 110

multiplying with g = (g0, . . . , gn) and represent the same map by atuple of polynomials

Φ = (p0 ∶ ... ∶ pn)

where pi = g ⋅figi∈K[t0, . . . , tn] are homogeneous of the same degree

deg(g).

Definition 3.9.1 A rational map of projective spaces

Φ = (p0 ∶ ... ∶ pn) ∶ PmK PnK, t↦ (p0(t) ∶ ... ∶ pn(t))

is given by a tuple of homogeneous polynomials pi ∈ K[t0, . . . , tm]all of the same degree. The domain of definition of Φ is

D(Φ) = PmK / V (p0, . . . , pn)

and the image of Φ is

im(Φ) = Φ(U).

The map Φ is a morphism if

V (p0, . . . , pn) = ∅.

Example 3.9.2 Recall that the rational map

ϕ ∶ A1K A2

K

t ↦ (1−t2t2+1 ,

2tt2+1)

defined on the complement of Z = V (t2 + 1) parametrizes the circleC = V (x2 + y2 − 1). Its image is

im(ϕ) = C/{(−1,0)}

where (−1,0) corresponds to the parameter t = ∞. A parametriza-tion of the projective closure of the circle

pc(C) = V (x21 + x

22 − x

20) ⊂ P2

K

(note that pc(C) over K = R equals the image of C in P2K under

the chart map, however pc(C) is strictly larger for K = C) is givenby the rational map

Φ ∶ P1K P2

K

(t0 ∶ t1) ↦ (t20 + t21 ∶ t

20 − t

21 ∶ 2t0t1)

Page 121: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 111

In the projective representation, the point t = ∞ corresponds to(t0 ∶ t1) = (0 ∶ 1) with image

Φ(0 ∶ 1) = (1 ∶ −1 ∶ 0).

MoreoverV (t20 + t

21, t

20 − t

21, 2t0t1) = ∅,

henceD(Φ) = P1K. Note that for K = C the domain of definition

includes the points (1 ∶ ±i) corresponding to the points t = ±i whereϕ is not defined. They map to

Φ(1 ∶ ±i) = (0 ∶ 1 ∶ ±i),

the two points at infinity of the complex circle.

To simplify matters, we first focus on morphisms between pro-jective spaces. How to determine the image?

Example 3.9.3 Let K =K. We consider the morphism

Φ ∶ P1K Ð→ P2

K

(t0 ∶ t1) z→ (t20 ∶ t0t1 ∶ t21)

and

J = ⟨minors2 (x0 x1 xnt20 t0t1 t21

)⟩

This ideal definines the graph of Φ as a subset of P1K ×P2

K (with thevanishing locus defined as the vanishing locus of all elements of Jwhich are both homogeneous in x and t): Note that

(x0 ∶ x1 ∶ x2) = (t20 ∶ t0t1 ∶ t21)

if and only if (x0, x1, x2) and (t20, t0t1, t21) are linearly dependent,

that is all 2 × 2-minors of the matrix

(x0 x1 xnt20 t0t1 t21

)

vanish. We will prove this in general in Lemma 3.9.12 below.What about using elimination on J to determine an ideal defin-

ing im(Φ)? By the affine projection-elimination theorem 3.3.3, theideal J ∩K[x0, x1, x2] defines the closure of the image of

V (J) ⊂ A2K ×A3

K

Page 122: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 112

under the projection π to the second factor A3K. However

π(V (J)) = A3K

because for (t0, t1) = (0,0) there is no condition on (x0, x1, x2), so

J ∩K[x0, x1, x2] = ⟨0⟩ .

On the other hand, im(Φ) ⊂ P2K cannot be dense as it is the image

of P1K. What has gone wrong? The affine vanishing locus V (J)

contains a component

{0} ×A3K ⊂ V (J)

which does not exist in P1K×P2

K, but shows up in the affine projection(which again corresponds to J ∩K[x0, x1, x2]). This component canbe removed by an iterated ideal quotient:

Definition and Theorem 3.9.4 If I, J ⊂ R = K[x1, . . . , xn] areideals we can consider the ideal quotients of I by powers of J

I ⊂ (I ∶ J) ⊂ (I ∶ J2) ⊂ . . . ⊂ R

Since R is Noetherian, there exists a smallest t ≥ 0 such that (I ∶J t) = (I ∶ J t+i) for all i ≥ 0 and the ideal

I ∶ J∞ =⋃i≥0(I ∶ Ji) = (I ∶ J t)

is called the saturation of I with respect to J .

Remark 3.9.5 We can compute the saturation by iterating theideal quotient until it stabilizes since

(I ∶ J) ∶ L = I ∶ (J ⋅L)

see Exercise 3.5. This yields an algorithm for computing saturations(of course one could also power J iteratively, but this is very ineffi-cient). In Exercise 3.15 we will give another algorithm to computesaturations.

For ideal quotients and saturations of homogeneous ideals withregard to a variable the algorithm in Exercise 3.14 usually showsthe best performance.

In contrast to ideal quotients, a saturation will also remove mul-tiple zeros from an ideal:

Page 123: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 113

Example 3.9.6 We have

⟨x ⋅ y2⟩ ∶ ⟨y⟩ = ⟨x ⋅ y⟩

and⟨x ⋅ y2⟩ ∶ ⟨y⟩

∞= ⟨x⟩

In Singular we can compute saturations as follows:LIB "elim.lib";

ring R = 0,(x,y),dp;

ideal I = x*y^2;

ideal J = y;

quotient(I,J);

[1]=xy

sat(I,J)[1];

x

Note that the second entry of sat(I,J) is the integer t as inthe definition.

Example 3.9.7 In the setting of Example 3.9.3 the extreneous com-ponent {0} ×A3

K ⊂ V (J) is removed by saturation

J ∶ ⟨t0, t1⟩∞= ⟨x0x2 − x

21, t0x2 − t1x1, t0x1 − t1x0⟩ .

Note that

J ⫋ J ∶ ⟨t0, t1⟩ ⫋ J ∶ ⟨t0, t1⟩2⫋ J ∶ ⟨t0, t1⟩

3= J ∶ ⟨t0, t1⟩

∞,

and V (J ∶ ⟨t0, t1⟩) and V (J ∶ ⟨t0, t1⟩2) still contain {0} ×A3

K, so weindeed have to iterate the ideal quotient:ring R = 0,(t0,t1,x0,x1,x2),lp;

matrix A[2][3] = x0,x1,x2,t0^2,t0*t1,t1^2;

ideal J = minor(A,2);

ideal J1 = quotient(J,ideal(t0,t1));

J1[1]=t1^2*x0*x2-t1^2*x1^2

J1[2]=t0*t1*x2-t1^2*x1

J1[3]=t0*t1*x1-t1^2*x0

J1[4]=t0^2*x2-t0*t1*x1

J1[5]=t0^2*x1-t0*t1*x0

ideal J2 = quotient(J1,ideal(t0,t1));

J2[1]=t1*x0*x2-t1*x1^2

J2[2]=t0*x2-t1*x1

J2[3]=t0*x1-t1*x0

ideal J3 = quotient(J2,ideal(t0,t1));

J3[1]=x0*x2-x1^2

Page 124: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 114

J3[2]=t0*x2-t1*x1

J3[3]=t0*x1-t1*x0

quotient(J3,ideal(t0,t1));

[1]=x0*x2-x1^2

[2]=t0*x2-t1*x1

[3]=t0*x1-t1*x0

By elimination we then obtain

(J ∶ ⟨t0, t1⟩∞) ∩K[x0, x1, x2] = ⟨x0x2 − x

21⟩ ,

which is the ideal of a conic curve in P2K. In fact this ideal de-

fines im(Φ), as we will prove now in full generality for morphismsbetween projective spaces.

Theorem 3.9.8 Suppose K =K and we are given a morphism

Φ ∶ PmK Ð→ PnKt = (t0 ∶ . . . ∶ tm) z→ (f0(t) ∶ . . . ∶ fn(t))

so all fi ∈K [t1, . . . , tm] homogeneous of the same degree and

V (f0, . . . , fn) = ∅.

Thenim(Φ) = V ((J ∶ ⟨t0, . . . , tm⟩

∞) ∩K [x0, . . . , xn])

where

J = ⟨minors2 (x0 . . . xnf0 . . . fn

)⟩ ⊂K [t1, . . . , tm, x0, . . . , xn] .

In particular im(Φ) is Zariski closed.

To prove Theorem 3.9.8 about the image of a morphism wefirst establish, similarly to the affine case, an elimination-projectiontheorem. To formulate it we define:

Definition 3.9.9 Let I ⊂K [t0, . . . , tm, x1, . . . , xn] be an ideal gen-erated by polynomials which are homogeneous in t0, . . . , tm. Theprojective elimination ideal of I is

I = {f ∈K[x1, . . . , xn] ∣ ∀i = 0, . . . ,m ∃si ≥ 0 ∶ tsii ⋅ f ∈ I} .

Note that I is an ideal.

Using the projective elimination ideal, the elimination-projectiontheorem for algebraic subsets of PmK ×An

K is as follows:

Page 125: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 115

Theorem 3.9.10 Let I ⊂K [t0, . . . , tm, x1, . . . , xn] be an ideal gen-erated by polynomials which are homogeneous in t0, . . . , tm. Wewrite

V (I) = {(t, x) ∈ PmK×AnK ∣ f(t, x) = 0 for all f ∈ I homogeneous in the ti}.

Denoting the projection onto the second factor by

π ∶ PmK ×AnK Ð→ An

K, ((t0 ∶ . . . ∶ tm) , (x1, . . . , xn))z→ (x1, . . . , xn)

we haveπ(V (I)) ⊂ V (I).

If K =K, thenπ(V (I)) = V (I).

Proof. For the first claim: If f ∈ I then for every variable ti thereis an si with tsii ⋅f ∈ I, so for the point with coordinates (t, x) ∈ V (I)we have

tsii ⋅ f(x) = 0.

Since there is a ti ≠ 0, it follows that f(x) = 0. Hence π(V (I)) ⊂V (I).

For the secon claim now assume that K =K and there is a pointx ∈ V (I) with x ∉ π(V (I)). Then for the homogeneous ideal

L = ⟨f(t, x) ∣ f ∈ I⟩ ⊂K[t0, . . . , tn]

we have∅ = V (L) ⊂ PmK

hence using the projective Nullstellensatz 3.8.11√L = I(V (L)) = ⟨1⟩ or ⟨t0, . . . , tm⟩ .

In any case there is a degree r ≥ 1 with

⟨t0, . . . , tm⟩r⊂ L

(why?), sotα ∈ L

for all monomials tα of degree ∣α∣ = r. Hence if we write

I = ⟨f1, . . . , fr⟩

with homogeneous generators fi, so

L = ⟨f1(t, x), . . . , fr(t, x)⟩ ,

Page 126: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 116

by expressing the tα in terms of the generators of L, we see thatthe polynomials

tβfi(t, x)

with ∣β∣ = r − deg(fi) form a generating system of the vector spaceK[t0, . . . , tn]r. Note that the coefficients in a linear combinationleading to tα (and hence the monomials appearing in them) canbe assumed to be homogeneous of degree r−deg(fi) since all otherterms must cancel, so can be deleted. Among the generating systemchoose a basis

tβ1g1(t, x), . . . , tβqgq(t, x)

with g1(t, x), . . . , gq(t, x) ∈ I. Write

tβigi(t, x) = ∑∣α∣=r

ci,α(x)tα

as a polynomial in t. Since both the tβigi(t, x) and the tα are abasis of K[t0, . . . , tn]r we get that

C(x) = (ci,α(x))i,α

has determinantdet(C(x)) ≠ 0 ∈K,

so also the polynomial

det(C(x)) ≠ 0 ∈K[x1, . . . , xn].

Hence with the column vectors G(t, x) = (tβigi(t, x))i and T (t) =(tα)α we have

det(C(x)) ⋅ T (t) = C(x)adj ⋅G(t, x)

with the adjoint matrix C(x)adj of C(x). Thus, since the entries ofG(t, x) are in I, also

det(C(x)) ⋅ tα ∈ I

for all ∣α∣ = r, i.e.,det(C(x)) ∈ I

hencedet(C(x)) = 0,

a contradiction.Using this theorem it is easy to obtain the following variant

for algebraic subsets of products of projective spaces (see Exercise3.16):

Page 127: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 117

Corollar 3.9.11 Let K =K and the ideal I ⊂K [t0, . . . , tm, x0, . . . , xn]be generated by bihomogeneous polynomials, that is, polynomi-als which are homogeneous both in the variables t0, . . . , tm and thevariables x0, . . . , xn. We write

V (I) = {(t, x) ∈ PmK × PnK ∣ f(t, x) = 0 for all bihomogeneous f ∈ I}.

Denoting the projection onto the second factor by

π ∶ PmK × PnK Ð→ PnK, ((t0 ∶ . . . ∶ tm) , (x0 ∶ . . . ∶ xn))z→ (x0 ∶ . . . ∶ xn)

we haveπ(V (I)) = V (I).

Lemma 3.9.12 With the notion as in Theorem 3.9.8, the closureof the graph of Φ is

Γ(Φ) = {(t,Φ(t)) ∣ t ∈ PmK} = V (J) ⊂ PmK × PnK

Proof. If (t, x) ∈ Γ(Φ) then x = Φ(t), so (t, x) ∈ V (J) since all2× 2-minors generating J vanish on this point. On the other hand,if (t, x) ∈ V (J) then xi ⋅ fj(t)− xj ⋅ fi(t) = 0 for all i, j. There existsa

xi ≠ 0,

moreover, by V (f1, . . . , fn) = ∅, an fj with

fj(t) ≠ 0.

By xj ⋅ fi(t) = xi ⋅ fj(t) ≠ 0, we also have that

xj ≠ 0.

Hencexjfj(t)

≠ 0

is a nonzero constant and for all i we have

xi =xjfj(t)

⋅ fi(t),

that is,

(x0, . . . , xn) =xjfj(t)

⋅ (f0(t), . . . , fn(t)) ,

so for the homogeneous coordinates

(x0 ∶ . . . ∶ xn) = (f0(t) ∶ . . . ∶ fn(t))

Page 128: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 118

hence (t, x) ∈ Γ(Φ).Combining these results, we now prove Theorem 3.9.8:

Proof. By Lemma 3.9.12 and Corollary 3.9.11 we have

im(Φ) = π(Γ(Φ)) = π(V (J)) = V (J)

The subsequent Lemma 3.9.13 completes the proof. It gives a moreintrinsic description of the projective elimination ideal. It also pro-vides an algorithm to compute I via saturation and elimination.

Lemma 3.9.13 If I ⊂ K [t0, . . . , tm, x1, . . . , xn] is an ideal gener-ated by polynomials which are homogeneous in t0, . . . , tm then

I = (I ∶ ⟨t0, . . . , tm⟩∞) ∩K [x1, . . . , xn] .

Proof. We first show that for a large enough

I = (I ∶ ⟨ta0, . . . , tam⟩) ∩K [x1, . . . , xn] .

Note that, by the Noetherian property, the chain

I ∶ ⟨t0, . . . , tm⟩ ⊂ I ∶ ⟨t20, . . . , t2m⟩ ⊂ I ∶ ⟨t30, . . . , t

3m⟩ ⊂ . . .

becomes stationary, say

I ∶ ⟨ta0, . . . , tam⟩ = I ∶ ⟨ta+1

0 , . . . , ta+1m ⟩ = . . .

If f ∈ I then there are si ≥ 0 with tsii ⋅f ∈ I, so for s ∶= max(s1, . . . , sn)we have

f ∈ I ∶ ⟨ts0, . . . , tsm⟩ ⊂ I ∶ ⟨ta0, . . . , t

am⟩ .

Moreover f ∈K [x1, . . . , xn].On the other hand, if f ∈ (I ∶ ⟨ta0, . . . , t

am⟩) ∩K [x1, . . . , xn], then

taj ⋅ f ∈ I for all i, hence f ∈ I.Finally we show that

I ∶ ⟨t0, . . . , tm⟩∞= I ∶ ⟨ta0, . . . , t

am⟩ .

If f ∈ I ∶ ⟨t0, . . . , tm⟩∞

then for N large enough f ⋅ ⟨t0, . . . , tm⟩N⊂ I.

In particular, f ⋅ tNi ∈ I, hence

f ∈ I ∶ ⟨tN0 , . . . , tNm⟩ ⊂ I ∶ ⟨ta0, . . . , t

am⟩ .

On the other hand, for N large enough any monomial tα of degreeN in t0, , . . . , tm is divisible by some tai , hence if f ∈ I ∶ ⟨ta0, . . . , t

am⟩

then f ∈ I ∶ ⟨t0, . . . , tm⟩N⊂ I ∶ ⟨t0, . . . , tm⟩

∞.

Page 129: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 119

In Exercise 3.17 we for example use Theorem 3.9.8 to determinethe ideal of the Veronese surface.

So what about rational maps between algebraic varieties? Let

X = V (I) ⊂ PmKwith I ⊂K[t0, . . . , tm] homogeneous and write

K[X] =K[t0, . . . , tm]/I

for the homogeneous coordinate ring of X. Note that this ring,since I is homogeneous, inherits a grading from the polynomial ring(how?). Suppose we are given a rational map

Φ ∶ X PnKt = (t0 ∶ . . . ∶ tm)z→ (f 0(t) ∶ . . . ∶ fn(t))

with all f i ∈K[X] homogeneous of the same degree. The domainof definition of Φ is

D(Φ) =X / ⋂{V (g0, . . . , gn) ∣ gi ∈K[X], minors2 (g0 . . . gnf 0 . . . fn

) = 0}

Note that the vanishing loci V (g0, . . . , gn) are well-defined as sub-sets of X in the sense of

V (g0, . . . , gn) ∶= V (I + ⟨g0, . . . , gn⟩) ⊂X ⊂ PmKNote also that then any t ∈ D(Φ) has a well-defined image: Firstof all if t ∈X = V (I) then we can set

f i(t) ∶= fi(t)

and this does not depend on the choice of the representative fiof f i since any element of I is vanishing on t (see Lemma 3.8.9).Moreover if

minors2 (g0 . . . gnf 0 . . . fn

) = 0

then for t ∈D(Φ) the vectors (f 0(t), . . . , fn(t)) and (g0(t), . . . , gn(t))are linearly dependent, hence

(f 0(t) ∶ . . . ∶ fn(t)) = (g0(t) ∶ . . . ∶ gn(t))

So we can setim(Φ) = Φ(D(Φ)).

In a similar way as in case of the theorem for morphisms betweenprojective space we can then prove the following theorem, which isthe basis of algorithmic rational projective geometry.

Page 130: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 120

Theorem 3.9.14 If K =K, then

im(Φ) = V ((J ∶ ⟨f0, . . . , fn⟩∞) ∩K [x0, . . . , xn])

where

J = I + ⟨minors2 (x0 . . . xnf0 . . . fn

)⟩ ⊂K [t0, . . . , tm, x0, . . . , xn] .

If Φ is a morphism, that is, D(Φ) = X, then im(Φ) is Zariskiclosed.

Note that J is independent of the choice of representatives fi ofthe classes f i since I ⊂ J . Moreover note, that this is also true forJ ∶ ⟨f0, . . . , fn⟩

∞, see Exercise 3.5.

We first determine a domain of definition of a rational map,compare with Example 3.5.17.

Example 3.9.15 Let I = ⟨xy − zw⟩ ⊂ R = K[x, y, z,w] and X =V (I) ⊂ P3

K. The rational map

Φ ∶X P1K, (x ∶ y ∶ z ∶ w)z→ (x ∶ z)

has domain of definition

D(Φ) =X/(V (x, z) ∩ V (w, y)) =X/V (x, y, z,w) =X,

so it is in fact a morphism.

We now use Theorem 3.9.14 to compute the image of a planecurve under a rational map:

Example 3.9.16 Let K =K and consider the curve

C = V (t51 + 10t41t2 + 20t31t22 + 130t21t

32 − 20t1t

42 + 20t52 − 2t41t0

− 40t31t2t0 − 150t21t22t0 − 90t1t

32t0 − 40t42t0 + t

31t

20 + 30t21t2t

20

+ 110t1t22t

20 + 20t31t

20) ⊂ P2

K .

see Figure 3.14, and the rational map

Φ ∶ C P3K

(t0 ∶ t1 ∶ t2) z→ (t32 − t22t0 ∶ t1t

22 − t1t2t0 ∶ t

21t2 − t1t2t0 ∶ t

31 − t

21t0)

We use Singular to determine the closure of the image of Φ:

ring R = 0, (t0,t1,t2,x0,x1,x2,x3), (dp(3),dp(4));

ideal C = t1^5+10*t1^4*t2+20*t1^3*t2^2+130*t1^2*t2^3-20*t1*t2^4

Page 131: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 121

–2

–1

0

1

2

3

–1 0 1 2 3

Figure 3.14: Degree 5 plane curve with three double points and onetriple point.

+20*t2^5-2*t1^4*t0-40*t1^3*t2*t0-150*t1^2*t2^2*t0-90*t1*t2^3*t0

-40*t2^4*t0+t1^3*t0^2+30*t1^2*t2*t0^2+110*t1*t2^2*t0^2+20*t2^3*t0^2;

matrix A[2][4] = x0, x1, x2, x3,

t2^3-t2^2*t0, t1*t2^2-t1*t2*t0, t1^2*t2-t1*t2*t0, t1^3-t1^2*t0;

ideal J = C + minor(A,2);

LIB "elim.lib";

ideal G = sat(J,ideal(A[2,1], A[2,2], A[2,3], A[2,4]))[1];

ideal L = eliminate(G,t0*t1*t2);

J[1]=x1*x2-x0*x3

J[2]=20*x0*x1-20*x1^2+130*x0*x3+20*x1*x3+10*x2*x3+x3^2

J[3]=20*x0^2-20*x1^2+130*x0*x2+10*x2^2+150*x0*x3+20*x1*x3+11*x2*x3+x3^2

LIB "sing.lib";

sat(slocus(L),ideal(x0,x1,x2,x3))[1];

[1]=1

In the last lines we compute the singular locus of C ′ = im(Φ). SoC ′ is a smooth curve in P3

K given by 3 quadrics. In an appropriate

Page 132: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 122

coordinate system, this curve is the twisted cubic we have alreadyencountered in Exercise 3.8.20.

Remark 3.9.17 In Example 3.9.16, the notation (dp(3), dp(4)) inthe definition of the monomial ordering of R refers to a productordering: Given monomial orderings >1 on the monomials in thevariables ti and >2 on the monomials in the variables xi we obtaina monomial ordering on the monomials in both sets of variables by

tαxβ > tα′

xβ′

⇔ tα >1 tα′ or (tα = tα

and xβ >2 xβ′).

In the example we have used >1= dp on the variables ti and >2= dpon the variables xi. Although the ordering does not change the idealcomputed by the algorithm, using an ordering refining the bihomo-geneous grading of I can speed up computations. The reason isthat the S-pairs to be considered in the Buchberger criterion can besorted in a more clever way according to an induced ordering onthe set of S-pairs..

Example 3.9.18 For the same curve C as in Example 3.9.16 wenow consider the map

Ψ ∶ C P1K

(t0 ∶ t1 ∶ t2) z→ (t21 − t1t0 ∶ t22 − t2t0)

The corresponding computation shows that

im(Ψ) = P1K

ring R = 0, (t0,t1,t2,x0,x1), (dp(3),dp(2));

ideal C = t1^5+10*t1^4*t2+20*t1^3*t2^2+130*t1^2*t2^3-20*t1*t2^4

+20*t2^5-2*t1^4*t0-40*t1^3*t2*t0-150*t1^2*t2^2*t0-90*t1*t2^3*t0

-40*t2^4*t0+t1^3*t0^2+30*t1^2*t2*t0^2+110*t1*t2^2*t0^2+20*t2^3*t0^2;

matrix A[2][2] = x0, x1, t1^2-t1*t0, t2^2-t2*t0;

ideal J = C + minor(A,2);

LIB "elim.lib";

ideal G = sat(J,ideal(t1^2-t1*t0, t2^2-t2*t0))[1];

eliminate(G,t0*t1*t2);

[1]=0

Besides the use in the computation of im(Φ), the saturation

G = J ∶ ⟨f0, . . . , fn⟩∞

also can be used to determine whether Φ is birational and, if so, tocompute the inverse Φ−1.

Page 133: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 123

Example 3.9.19 Continuing the previous example we determinethe elements in the Grobner basis which are linear in the ti (notethat here the product ordering helps by sorting the Grobner basiselements by t-degree):

std(G);

[1]=t1*x0^2+20*t1*x0*x1-20*t1*x1^2+10*t2*x0^2+130*t2*x0*x1

+20*t2*x1^2

[2]=t0*x0^3+30*t0*x0^2*x1+110*t0*x0*x1^2+20*t0*x1^3

+70*t1*x0*x1^2-220*t1*x1^3-t2*x0^3+80*t2*x0^2*x1

+1320*t2*x0*x1^2+200*t2*x1^3

[3]=t0*t1*x1-t1^2*x1-t0*t2*x0+t2^2*x0

[4]= ...

[5]= ...

The first two generators are linear in the ti. We write down thecorresponding homogeneous linear system of equations for the ti andsolve it over the homogeneous coordinate ring K[P ] =K[x0, x1] for

P = im(Φ) = P1K.

matrix Rel = diff(ideal(t0,t1,t2),ideal(I[1..2]));

0, x1^3+30*x1^2*x2+110*x1*x2^2+20*x2^3,

x1^2+20*x1*x2-20*x2^2, 70*x1*x2^2-220*x2^3,

10*x1^2+130*x1*x2+20*x2^2, -x1^3+80*x1^2*x2+1320*x1*x2^2+200*x2^3

The solution space is generated by the column of the matrix:

matrix Par = syz(transpose(Rel));

x1^5-60*x1^4*x2-2240*x1^3*x2^2-18100*x1^2*x2^3-4800*x1*x2^4-400*x2^5,

-10*x1^5-430*x1^4*x2-5020*x1^3*x2^2-15100*x1^2*x2^3-4800*x1*x2^4-400*x2^5,

x1^5+50*x1^4*x2+690*x1^3*x2^2+1620*x1^2*x2^3-1800*x1*x2^4-400*x2^5

This is indeed a parametrization of the quintic plane curve C:

subst(C,t0,Par[1,1],t1,Par[2,1],t2,Par[3,1]);

[1]=0

Can you turn this method into an algorithm and prove its cor-rectness? The command syz refers to computing the syzygy matrixPar of Relt, that is, a matrix with im(Par) = ker(Relt). How tocompute such a generating matrix will be one of the main topics ofthe subsequent two chapters.

Example 3.9.20 Similar to the parametrization of the circle inRemark 3.5.6, the map Ψ in the previous example is obtained byintersecting curves in the linear system

Lt = V (x1 ⋅ (t21 − t1t0) − x0 ⋅ (t

22 − t2t0))

parametrized by x ∈ P1K with C, see Figure 3.15 for a plot of the

Page 134: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 124

–2

–1

0

1

2

3

–1 0 1 2 3

Figure 3.15: Three curves in the linear system of quardrics throughthe singular points of C.

curves Lx for x = (1 ∶ 0), (0 ∶ 1), (1 ∶ 1). Note that all Lx passthrough the singularities of C. By the Theorem of Bezout C ∩ Lxconsists out of 2⋅5 = 10 intersection points counted with multiplicity.The intersection of Lx with the singularities of C accounts for 3 +2 + 2 + 2 = 9 of these, and there is one addition point Px movingwith x. The parametrization Par computed above is the birationalmorphism

Ψ−1 ∶ P1K Ð→ Cx z→ Px.

Can you turn this method into an algorithm and prove its cor-rectness?

Remark 3.9.21 The twisted cubic curve (and hence C ′) can beparametrized by P1

K using the same approach as in Example 3.9.3,just using the monomials of degree 3 instead of degree 2 (try thatout!). Both this parametrization and the rational map Φ are infact birational. Hence we can expect to find a birational map of Cwhich goes directly to P1

K and is a composition of Φ ∶ C C ′ ⊂ P3K

Page 135: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 125

and an appropriate projection π ∶ P3K → P1

K. The map Ψ is such abirational map. Can you find out to which coordinates you have toproject via π to obtain Ψ = π ○Φ?

3.10 Highest Corner and Finite Deter-

minacy

We finish this chapter by outlining methods which are the core ofcomputational local algebraic geometry and singularity theory. LetK = K. Denote by R = K{x1, . . . , xn} either the ring of conver-gent power series, that is, power series which converge in someopen neighborhood of 0, or denote by R =K[[x1, . . . , xn]] the ringof formal power series. Note that R is a local ring with maximalideal m = ⟨x1, . . . , xn⟩. A major topic in singularity theory is theclassification of functions in R up to right equivalence:

Definition 3.10.1 We say that f, g ∈ m are right equivalent,written f ∼ g, if there exists a K-algebra automorphism ϕ of Rsuch that ϕ(f) = g.

Note that a K-algebra automorphism ϕ is given by

xi ↦ ϕi(x)

with

ϕi(x) =n

∑i=1

ci,jxj + higher order terms

and(ci,j)i,j ∈ GL(n,K)

(prove this as an Exercise).

Example 3.10.2 The functions

f = y2 + x3 and g = x3 + y2 + 2x2y + x4

are equivalent via the automorphism

x↦ x

y ↦ y + x2

Here is an example which shows that for local classification pur-poses we have to work with power series instead of the localization:

Page 136: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 126

Example 3.10.3 The function

f = y2 − x3 − x2,

which defines the ordinary node (see Figure 3.7), is irreducible inK[x, y]⟨x,y⟩, however in R it factors as

f = (y − x√

1 + x)(y + x√

1 + x),

hence it is right equivalent to

f = (x − y) ⋅ (x + y).

To put it differently, in the Zariski topology the open sets are toolarge to factor f in an open neighborhood of 0 into its two smoothbranches. Over R we see that the singularity locally looks like theintersection of two lines.

The key observation is that any right equivalence class of anisolated singularity can be represented by a polynomial.

Definition 3.10.4 Let k ∈ N. A function f ∈ m is called k-determined if all g ∈ R with

f − g ∈mk+1

are right equivalent to f , that is,

f ∼ g.

We then also say that f is finitely determined.

Note that any finitely determined function is right equivalent toa polynomial.

In view of a generalization of vanishing loci and the Nullstellen-satz to ideals in arbitrary rings, see Exercise 3.20, that the vanishinglocus of the Jacobian ideal J(f) is the set of critical points of f ,and mk ⊂ J(f) should mean V (J(f)) ⊂ V (mk) = {0}, we define:

Definition 3.10.5 Write

J(f) = ⟨∂f

∂x1

, . . . ,∂f

∂xn⟩ ⊂ R

for the Jacobian ideal of f . We say that the function f hasan isolated singularity (that is, critical point) at 0 if there is ak ∈ N0 with

mk ⊂ J(f)

Page 137: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 127

Remark 3.10.6 Note that 0 is an isolated singularity of f if andonly if the Milnor number

µ(f) = dimC(R/J(f))

is finite. (Prove this!)

Note that when talking about singularities of V (f) (in contrastto singularities of f) we require that the corresponding solution isin V (⟨f⟩ + J(f)). In the characterization of Remark 3.10.6 onethen has to replace the Milnor number with the Tjurina numberτ(f) = dimC(R/(⟨f⟩ + J(f))).

How to bound the determinacy? The following theorem, whichwe cannot prove here, provides a very good estimate:

Theorem 3.10.7 Let char(K) = 0. If f ∈m with

mk+1 ⊂m2J(f)

then f is k-determined.

Corollar 3.10.8 If f has an isolated singularity, then f is finitelydetermined.

Proof. If mk ⊂ J(f) then mk+2 ⊂m2J(f).

Corollar 3.10.9 If f ∈m2, then f is (µ(f) + 1)-determined.

Proof. In Exercise 3.18 we prove thatmµ(f) ⊂ J(f), hencemµ(f)+2 ⊂m2J(f).

Definition 3.10.10 Let > be a monomial ordering on the mono-mials in x1, . . . , xn, let R =K[x1, . . . , xn]> and let I ⊂ R be an ideal.Then the monomial h(I) is the highest corner of I if it is thesmallest monomial (with respect to >) which is not in L(I), that is,

h(I) ∉ L(I)

and if for any monomial m′

m′ < h(I)Ô⇒m′ ∈ L(I).

However note that the highest corner does not necessarily exist.If it exists then it is unique since > is a total ordering.

Page 138: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 128

Remark 3.10.11 If > is global and 1 ∉ I, then 1 ∉ L(I) so

h(I) = 1,

since there is no smaller monomial than 1. For 1 ∈ I every mono-mial is in L(I) = ⟨1⟩, hence h(I) does not exist.

Example 3.10.12 For

f = x5 + x2y2 + y6

we determine the highest corner of

J(f) = ⟨2xy2 + 5x4, 6y5 + 2x2y⟩

using Singular:ring R =0,(x,y),ds;

poly f = x^5+x^2*y^2+y^6;

ideal J = jacob(f);

highcorner(std(J));

y^6

To see this, we compute generators of the lead ideal:lead(std(J));

[1]=x2y

[2]=2xy2

[3]=5x5

[4]=y7

In Figure 3.16 the generators of L(J(f)) correspond to the blackdots, and the further monomials in L(J(f)) to the grey dots . Thehighest corner is marked in red. Note that with respect to ds allwhite dots are larger than y7.

Lemma 3.10.13 Let > be a monomial ordering on R =K[x1, . . . , xn]>,let I ⊂ R be an ideal, and assume that h is a monomial such thatfor all monomials xα

xα < h Ô⇒ xα ∈ L(I).

If f ∈K[x1, . . . , xn] then we have

L(f) < h Ô⇒ f ∈ I.

Proof. Let G be a standard basis of I for > and r = NF (f,G) theMora normal form of f with respect to G. Assume that f ∉ I withL(f) < h. Then r ≠ 0 and L(r) ≤ L(f) < h, hence L(r) ∈ L(I).This is a contradiction to NF being a weak normal form.

Note that the highest corner satisfies the assumption in Lemma3.10.13.

Page 139: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 129

Figure 3.16: Highest corner for the Jacobian ideal of f = x5+x2y2+y6.

Theorem 3.10.14 Let > be a local degree ordering on the mono-mials in x1, . . . , xn, let R = K[x1, . . . , xn]>, write m = ⟨x1, . . . , xn⟩,and let I ⊂ R be an ideal. Then the following are equivalent:

1) h(I) exists.

2) There is k ∈ N0 with mk ⊂ L(I).

3) There is k ∈ N0 with mk ⊂ I.

We then havemdeg(h(I))+1 ⊂ L(I).

Proof. (1)⇒ (2): If h(I) = 1 then x1, . . . , xn ∈ L(I) since all xi < 1.If h(I) ≠ 1 then for k = deg(h(I)) + 1 we have mk ⊂ L(I) since >is a local degree ordering, so all monomials of degree k are smallerthan h(I).

(2)⇒ (1): If mk ⊂ L(I) then the finite set of all monomials notin L(I) has a minimum h. So if m′ < h then m′ ∈ L(I), that is,h = h(I).

Page 140: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 130

(2) ⇒ (3): Since xki ∈ L(I) there is a tail hi with xki + hi ∈ Iand L(hi) < xki . By enlarging k we can assume that xki < h(I).Then L(hi) < xki < h(I), so, by Lemma 3.10.13, we get hi ∈ I. Thisimplies that also xki ∈ I. Hence for k′ large enough, all monomialsof degree k′ are in I.

(3)⇒ (2): If mk ⊂ I then mk ⊂ L(I).

Corollar 3.10.15 Let char(K) = 0 and let > be a local degree or-dering. If f ∈ m2 ⊂ K[x1, . . . , xn]> has an isolated singularity thenthe highest corner

h = h(m2 ⋅ J(f))

exists and f is deg(h)-determined.

Proof. Since f has an isolated singularity there is a k ∈ N0 withmk ⊂ J(f), hence

mk+2 ⊂m2 ⋅ J(f),

so by Theorem 3.10.14 the highest corner h = h(m2 ⋅ J(f)) exists.By Lemma 3.10.13 we obtain that xα ∈m2 ⋅ J(f) for all xα < h. Inparticular, since > is a local degree ordering,

mdeg(h)+1 ⊂m2 ⋅ J(f),

Since the completionK[[x1, . . . , xn]] is a faithfully flatR-module,so tensoring an exact sequence with K[[x1, . . . , xn]] again yields anexact sequence, we also have

mdeg(h)+1 ⊂ m2 ⋅ J(f)

over K[[x1, . . . , xn]] with m denoting the maximal ideal. So theclaim follows with Theorem 3.10.7.

In particular, when computing with right equivalences, we candelete all terms of degree≥ deg(h) + 1.

Example 3.10.16 For

f = x5 + x2y2 + y6

we have:ring R =0,(x,y),ds;

poly f = x^5+x^2*y^2+y^6;

ideal J = maxideal(2)*jacob(f);

highcorner(std(J));

y^6

Page 141: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 131

Hence for any

g = f + sum of terms of degree ≥ 7

we havef ∼ g.

For example

x5 + x2y2 + y6 ∼ x5 + x2y2 + y6 + y7

See also Exercise 3.21. We finish by an interesting observationto speed up computations of standard bases:

Theorem 3.10.17 Let > be a local degree ordering, I = ⟨f1, . . . , fr⟩ ⊂R =K[x1, . . . , xn]> and assume that h(J) for

J = ⟨L(f1), . . . , L(fr)⟩

exists. Then we have:

1) If f ∈ R with L(f) < h(J) then f ∈ I.

2) If xα is a monomial with xα < h(J), ci ∈K and

gi = {fi if L(fi) ≤ xα

fi + cixα if L(fi) > xα

then we haveI = ⟨g1, . . . , gr⟩ .

Proof. (1): If L(f) < h(J), then, by definition of the highestcorner, L(f) ∈ L(J) ⊂ L(I). Hence, by Lemma 3.10.13, we get thatf ∈ I.(2): If xα < h(J) then xα ∈ I by (1), so

I = ⟨g1, . . . , gr, xα⟩ .

We apply (1) to I = ⟨g1, . . . , gr⟩ and f = xα: First note that h(J)exists for

J = ⟨L(g1), . . . , L(gr)⟩ = ⟨L(f1), . . . , L(fr)⟩ = J

and xα < h(J) = h(J), hence, by (1), we obtain that

xα ∈ I = ⟨g1, . . . , gr⟩ .

So it follows thatI = ⟨g1, . . . , gr⟩ .

Remark 3.10.18 This shows that in standard basis computationswe can delete from the generator fi all terms c ⋅xα which are strictlysmaller than both L(fi) and h(J) for the current ideal of lead mono-mials J . This considerably speeds up local computations.

Page 142: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 132

3.11 Exercises

Exercise 3.1 Show that for

C = {(t2 − 1, t3 − t) ∣ t ∈ R} ⊂ A2R

we have I (C) = ⟨x3 + x2 − y2⟩. Make a plot of the curve.

Exercise 3.2 Show, that for char (K) ≠ 2 the circle C = V (x2 + y2 − 1) ⊂A2K does not admit a polynomial parametrization.

Exercise 3.3 Let

S = V (t21 + t22 + t

23 − 1) ⊂ A3

K

be the unit sphere, and consider the morphism

α ∶ S Ð→ A3K

(t1, t2, t3)z→ (t1t2, t1t3, t2t3)

Show, that

1) if K = R,C then

X = im (α) = V (x21x

22 + x

21x

23 + x

22x

23 − x1x2x3) ,

2) if K = C, then im(α) =X,

3) if K = R, then im(α) ⫋X.

Exercise 3.4 Compute the closure of the image of the curve (Fig-ure 3.17)

C = V (y3 − 3x2y − (x2 + y2)2) ⊂ A2R

under the rational map

ϕ = (x2

y2,x

y) ∶ C A2

R

Exercise 3.5 Let R = K[x1, . . . , xn] be a polynomial ring over afield K and for ideals I, J ⊂ R

I ∶ J = {f ∈ R ∣ f ⋅ J ⊂ I}

the ideal quotient. Prove that:

Page 143: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 133

–1

0

1

0 1

Figure 3.17: Curve with triple point

1) For all ideals I, J ⊂ R it holds

(a) I ∶ J is an ideal of R,

(b) I ⊂ (I ∶ J),

(c) J ⊂ I if and only if I ∶ J = ⟨1⟩.

2) For all ideal I1, . . . , Is, J ⊂ R it holds

(a) (I1 ∩ ... ∩ Is) ∶ J = (I1 ∶ J) ∩ ... ∩ (Is ∶ J),

(b) J ∶ (I1 + ... + Is) = (J ∶ I1) ∩ ... ∩ (J ∶ Is).

3) For all ideals I, J,L ⊂ R it holds

(I ∶ J) ∶ L = I ∶ (J ⋅L).

Exercise 3.6 Let R =K[x1, . . . , xn].

1) Using the Singular command eliminate, write a procedurethat computes I ∩ J for ideals I, J ⊂ R.

2) Suppose J = ⟨g⟩ ⊂ R is principal and I ⊂ R is an ideal. Apply-ing your ideal intersection command from (1), write a Sin-gular procedure which computes I ∶ J .

3) For any two ideals I, J ⊂ R, write a procedure that computesI ∶ J . Try out some examples.

Page 144: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 134

Exercise 3.7 Let

I = ⟨xz − y2, x − yz⟩ ⊂ R[x, y, z]

1) Use your implementation from Exercise 3.6 to compute

J = I ∶ ⟨x⟩

andI ∶ J

Compare with the Singular command quotient.

2) Write I as an intersection of two prime ideals.

3) Make a plot of V (I) ⊂ A3R. Hint: Find a polynomial parametriza-

tion of V (J).

Exercise 3.8 Let K = K, and I ⊂ K [x1, . . . , xn] with ∣V (I)∣ <∞.Show that

∣V (I)∣ ≤ dimK (K [x1, . . . , xn] /I)

and equality holds if I is radical.Hint: Use interpolation to find a basis.

Exercise 3.9 Let K = K, and I ⊂ K [x1, . . . , xn] with ∣V (I)∣ <∞.Then the following conditions are equivalent:

1) For all p, q ∈ V (I) with p ≠ q we have pn ≠ qn and I is radical.

2) The reduced Grobner basis of I with respect to the lexico-graphic ordering with x1 > ... > xn has the form

x1 − g1 (xn)

x2 − g2 (xn)

xn−1 − gn−1(xn)

gn (xn)

and gn (xn) is squarefree.

Hint: Use Exercise 3.8.

Exercise 3.10 Fix a global monomial ordering > on R =K[x1, . . . , xn].

Page 145: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 135

1) Let f, f1, . . . , fs ∈ R be homogeneous. Show that the Buch-berger normal form algorithm computes a standard expression

f =∑s

i=1ai ⋅ fi + r

with all ai and r homogeneous. What is the degree of r?

2) Show that if f, g ∈ R are homogeneous, then spoly(f, g) ishomogeneous.

3) Using Buchberger’s algorithm, show that any homogeneousideal I ⊂ R has a Grobner basis consisting out of homoge-neous polynomials.

4) Prove that an ideal I ⊂ K[x1, . . . , xn] is homogeneous if andonly if its reduced Grobner basis consists out of homogeneouspolynomials.

Exercise 3.11 Prove that the radical of a homogeneous ideal ishomogeneous.Hint: Use Lemma 3.8.9 considering the homogeneous summand ofmaximal degree.

Exercise 3.12 Let K = K. Let R = K[x0, . . . , xn] and I ⊂ R ahomogeneous ideal. Consider X = V (I) ⊂ Pn(K) and let

C(X) = V (I) ⊂ An+1(K)

be the affine cone of X. Show that if X ≠ ∅, then

I(C(X)) = I(X).

Hints: Recall that

I(C(X)) = {f ∈ R ∣ f(p) = 0 ∀p ∈ C(X)}

andI(X) = ⟨f ∈ R homogeneous ∣ f(p) = 0 ∀p ∈X⟩ .

Use Lemma 3.8.9 considering the summand of degree zero.

Exercise 3.13 Let K = K, I ⊂ K[x1, . . . , xn] an ideal and X =V (I) ⊂ An(K). Show that the projective closure of X is the van-ishing locus of the homogenization of I, that is,

pc(X) = V (Ih).

Hint: Recall thatpc(X) = V (I(X)h).

Prove thatf ∈

√I Ô⇒ fh ∈

√Ih

and use the strong Nullstellensatz.

Page 146: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 136

Exercise 3.14 Let I ⊂ K[x1 . . . , xn] be a homogeneous ideal andG the reduced Grobner basis of I with respect to the degree reverselexicographical ordering with x1 > . . . > xn.

1) Then

{f ∈ G ∣ xn does not divide f}∪{f

xn∣ f ∈ G and xn divides f}

is a Grobner basis of I ∶ ⟨xn⟩.

2) Moreover

{f

xin∣ f ∈ G and i ≥ 0 maximal such that xin divides f}

is a Grobner basis of I ∶ ⟨xn⟩∞

.

Hint: Show that xn ∣ f ⇐⇒ xn ∣ L(f) for all f ∈ G.

Exercise 3.15 Let I ⊂K[x1, . . . , xn] be an ideal, f ∈K[x1, . . . , xn].Show that for

J = ⟨I⟩ + ⟨1 − s ⋅ f⟩ ⊂K[s, x1, . . . , xn]

the saturation of I with respect to f is

I ∶ ⟨f⟩∞= J ∩K[x1, . . . , xn].

Exercise 3.16 Let K =K and the ideal I ⊂K [t0, . . . , tm, x0, . . . , xn]be generated by bihomogeneous polynomials, that is, polynomialswhich are homogeneous both in the variables t0, . . . , tm and the vari-ables x0, . . . , xn.

1) Show that the projective elimination ideal I ⊂ K [x0, . . . , xn]is homogeneous.

2) With the projection onto the second factor π ∶ PmK × PnK → PnKwe have

π(V (I)) = V (I).

Exercise 3.17 The Veronese surface S ⊂ P5 is the image of themorphism

Φ ∶ P2 Ð→ P5

(t0 ∶ t1 ∶ t2) z→ (t20 ∶ t21 ∶ t

22 ∶ 2t0t1 ∶ 2t0t2,2t1t2)

Determine the vanishing ideal I(S) using Singular. Can you finda representation of I(S) in terms of minors of a matrix?

Page 147: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 137

Exercise 3.18 Let K be a field and R a local K-algebra with max-imal ideal m.

1) If d = dimK(R) <∞ then md = 0.

2) If I ⊂ R is an ideal and d = dimK(R/I) <∞ then md ⊂ I.

Exercise 3.19 Let K = K, X = V (I) ⊂ PmK for an ideal I ⊂K[x0, . . . , xm] and Φ ∶X PnK a rational map.

1) Write a Singular procedure to determine im(Φ).

2) Try out your procedure for the rational maps in Examples3.9.3, 3.9.16 and 3.9.18 from the lecture.

Exercise 3.20 Let R be a ring,

X = Spec(R) = {P ⊂ R ∣ P prime} ,

for an ideal I ⊂ R define the vanishing locus as

V(I) = {P ∈X ∣ P ⊃ I}

and for a set Y ⊂X the vanishing ideal as

I(Y ) =⋂P ∈Y P .

1) Show thatV(⟨1⟩) = ∅, V (⟨0⟩) =X

and for ideals I1, . . . , Ir ⊂ R and a family of ideals Ji ⊂ Rindexed by S we have

⋃ri=1V(Ii) = V(⋂ri=1Ii), ⋂i∈SV(Ji) = V(∑i∈SJi)

Conclude that considering the sets V (I) for ideals I ⊂ R asclosed sets, we obtain a topology on X.

2) Show that for I ⊂ R an ideal

I(V(I)) =√I.

You can use the following facts (prove these at least for R = Zif you have not seen them):

1) If I ⫋ R an ideal, then√I is the intersection of all prime

ideals containing I (see Remark 7.5.8).

Page 148: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

3. COMPUTING WITH IDEALS & ALGEBRAIC SETS 138

2) If I1, . . . , Ir ⊂ R are ideals and P ⊂ R is prime, then

P ⊃⋂r

i=1 IiÔ⇒ ∃i ∶ P ⊃ Ii

Exercise 3.21 Let K = K, let ϕ be an automorphism of R =K[[x1, . . . , xn]] with ϕ(xi) ∈ P = K[x1, . . . , xn], and assume thatf ∈ P has an isolated singularity at 0.

1) Write a Singular procedure which computes ϕ(f) and trun-cates above the degree of the highest corner of ⟨x1, . . . , xn⟩

2⋅

J(ϕ(f)).

2) Show that

f = x2+2xy+y2+x3−3x2y+3xy2−y3+2x4+2x3y and g = x3+y2

are right equivalent.

Hints: Use the commands map and jet. In (2) first factorizethe degree 2 part of f .

Page 149: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

4

Modules over principalideal domains

4.1 Overview

In the same way as for ideals, we first discuss the special case ofmodules over principal ideal domains R like Z or the polynomialring K[x] in one variable over a field. Examples you know arevector spaces over a field K, or abelian groups G, which are exactlythe Z-modules with the scalar multiplication

Z ×G→ G, (n, g)↦ n ⋅ g = g + ... + g´¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¶

n

Groups as Z-modules play an important role, for example, in thetheory of toric varieties (divisor class group).

For modules over principle ideal domains, we will describe an al-gorithm, which generalizes, like Buchberger’s algorithm, both Gaus-sian reduction and the Euclidean algorithm. An interesting classof R-modules (however not the most general, as we will see) areimages M = im(A) of matrices A ∈ Rn×m. To describe M and todecide, whether a given vector v ∈ Rn is contained in M , we requirea suitable normal form for A.

From linear algebra over a field K we know: If A ∈Kn×m, thenthere are changes of bases T ∈ GL (m,K) and S ∈ GL (n,K), whichtransform A to the normal form

S ⋅A ⋅ T =

⎛⎜⎜⎜⎝

1⋱ 0

10 0

⎞⎟⎟⎟⎠

=D

139

Page 150: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

4. MODULES OVER PRINCIPAL IDEAL DOMAINS 140

(where the number of ones on the diagonal is the rank of A). Thenv ∈ im(A) if and only if S ⋅ v ∈ im(D), which in turn we can decideimmediately.

If we replace K by a principal ideal domain R, then we cannotexpect the normal form to be that simple any more: By the adjointmatrix formula for the inverse, a matrix T ∈ Rn×n is invertible ifand only if det (T ) is a unit. For example A = (2) ∈ Z1×1 already isin normal form, because Z× = {±1}. In general we can achieve that

S ⋅A ⋅ T =D =

⎛⎜⎜⎜⎝

d1

⋱ 0dr

0 0

⎞⎟⎟⎟⎠

∈ Rn×m

where di is a divisor of di+1 for all i and the di are uniquely deter-mined by A.

The chapter is organized as follows: We first prove this claim inthe elementary divisor theorem. The proof also gives an algorithmto obtain S, T and D. Using the normal form D we prove variousstructure results: Generalizing vector spaces over a field, we firstrecall some basic facts on modules over a ring, and then describefinitely generated modules over principle ideal domains. In partic-ular, we will discuss finitely generated abelian groups (Z-modules),and the Jordan normal form.

4.2 The Elementary Divisor Algorithm

Remark 4.2.1 A matrix A ∈ Rn×n is invertible (that is, A ∈ GL (n,R))if and only if its determinant is a unit, that is,

det (A) ∈ R×

Proof. If A ⋅ A−1 = E, then det (A) ⋅ det (A−1) = 1. On the otherhand, if det (A) ∈ R×, then

A−1 =Aadj

det (A)∈ Rn×n

with the adjoint matrix Aadj = ((−1)i+j

det (Aji))i,j ∈ Rn×n, where

Aji is obtained by canceling the j-th row and i-th column of A.

Theorem 4.2.2 (Elementary divisor theorem) Let R be a prin-cipal ideal domain and A ∈ Rn×m. Then there are S ∈ GL (n,R) and

Page 151: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

4. MODULES OVER PRINCIPAL IDEAL DOMAINS 141

T ∈ GL (m,R) and r ≤ min (n,m) with

S ⋅A ⋅ T =D =

⎛⎜⎜⎜⎝

d1

⋱ 0dr

0 0

⎞⎟⎟⎟⎠

∈ Rn×m

andd1 ∣ d2, d2 ∣ d3 . . . dr−1 ∣ dr ≠ 0

The di are uniquely determined by A up to multiplication with units,and are called the elementary divisors of A, and D is called theSmith normal form of A.

Remark 4.2.3 In the special case where R = K is a field, we canachieve di = 1 and we obtain S as a product of row operations and Tas a product of column operations, see Section 1.5. Permuting rowsand columns, we can assume that a11 ≠ 0 (if A ≠ 0). Subtractingthe

a1,ja1,1

-multiple of the first column from the j-th column (and in

the same way for rows) we transform A to

⎛⎜⎜⎜⎝

a1,1 0 ⋯ 00⋮ ∗0

⎞⎟⎟⎟⎠

Finally, multiply the first column by 1a1,1

. The claim follows by

induction.

In a ring R it is in general not possible to forma1,ja1,1

as a1,1 may

not be a unit. We now prove Theorem 4.2.2 in the case that R isa Euclidean domain (see Definition 2.2.3). Here we can replace thedivision

a1,ja1,1

by the division with remainder. The proof yields an

algorithm to compute the Smith normal form.Proof. Let R be a Euclidean domain with norm d. We may assumethat A ≠ 0.

1) By permuting rows and columns we can assume that a1,1 ≠ 0and

d (a1,1) ≤ d (ai,j) or ai,j = 0

for all (i, j) ≠ (1,1).

2) If some entry a1,j in the first row (analogously for the firstcolumn) is not divisible by a1,1, then write by division withremainder

a1,j = q ⋅ a1,1 + r

Page 152: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

4. MODULES OVER PRINCIPAL IDEAL DOMAINS 142

with d (r) < d (a1,1). The case r = 0 does not happen, sinceby assumption a1,1 ∤ a1,j.

After subtracting q times the 1st column from the j-th col-umn, we obtain

d (a1,1) > d (a1,j)

Now go back to step (1). This process terminates, sinced (a1,1) becomes smaller in every run.

3) If, now, all entries of the first row and column are divisible bya1,1, by adding multiples of the first column, we can transformA into

⎛⎜⎜⎜⎝

a1,1 0 ⋯ 0

∗ ∗

⎞⎟⎟⎟⎠

and, by adding multiples of the first row, further to

⎛⎜⎜⎜⎝

a1,1 0 ⋯ 00⋮ A′

0

⎞⎟⎟⎟⎠

If A′ has an entry ai,j, which is not divisible by a1,1, we addthe i-th row to the first row and go back to (2). Again, d (a1,1)decreases strictly.

4) If all entries of A are divisible by a1,1, then also the entries ofA′, since they are R-linear combinations of entries of A.

By induction on min (n,m) the claim follows.

For the induction start (n = 1 or m = 1) the steps (1) − (3) arethe Euclidean algorithm on the entries of the matrix.

Before discussing the general case over a principle ideal domainR and the uniqueness, we test the algorithm at an example:

Example 4.2.4 We compute the Smith normal form of

A = (6 9 66 6 7

) ∈ Z2×3

and at the same time S ∈ GL(2,Z) and T ∈ GL(3,Z) by simultane-ously doing the row and column operations on a 2 × 2 respectively3 × 3 unit matrix. Division by remainder (step 2) yields

(1 00 1

) (6 3 66 0 7

)⎛⎜⎝

1 −1 00 1 00 0 1

⎞⎟⎠

Page 153: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

4. MODULES OVER PRINCIPAL IDEAL DOMAINS 143

Permuting (step 1)

(1 00 1

) (3 6 60 6 7

)⎛⎜⎝

−1 1 01 0 00 0 1

⎞⎟⎠

Reducing the first row and column (step 3)

(1 00 1

) (3 0 00 6 7

)⎛⎜⎝

−1 3 21 −2 −20 0 1

⎞⎟⎠

Since 7 is not divisible by 3, we add the second to the first row

(1 10 1

) (3 6 70 6 7

)⎛⎜⎝

−1 3 21 −2 −20 0 1

⎞⎟⎠

Division by remainder (step 2)

(1 10 1

) (3 6 10 6 7

)⎛⎜⎝

−1 3 41 −2 −40 0 1

⎞⎟⎠

Permuting (step 1)

(1 10 1

) (1 6 37 6 0

)⎛⎜⎝

4 3 −1−4 −2 11 0 0

⎞⎟⎠

Reducing the first row and column (step 3)

(1 1−7 −6

) (1 0 00 −36 −21

)⎛⎜⎝

4 −21 −13−4 22 131 −6 −3

⎞⎟⎠

Applying the algorithm to the submatrix obtained by deleting (orignoring) the first row and column, we can proceed, for example, asfollows

( −36 −21 )↦ ( −15 −21 )↦ ( −15 −6 )↦ ( −3 −6 )↦ ( −3 0 )

(in this case this is just the Euclidean algorithm computing the gcd).This yields the Smith normal form

D = S ⋅A ⋅ T

Page 154: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

4. MODULES OVER PRINCIPAL IDEAL DOMAINS 144

with

S = (1 1−7 −6

) D = (1 0 00 −3 0

) T =⎛⎜⎝

4 2 −9−4 1 21 −3 6

⎞⎟⎠

Hence, the elementary divisors of A are

d1 = 1 d2 = 3

up to multiplication with units Z× = {1,−1}.Using the Maple package LinearAlgebra we can do the cal-

culation as follows:with(LinearAlgebra):

A := Matrix([[6,9,6],[6,6,7]]):

SmithForm(A);

(1 0 00 3 0

)

(S, T) := SmithForm(A, output=[’U’, ’V’]):

S, T;

(0 1−1 3

) ,⎛⎜⎝

−2 1 −91 −1 21 0 6

⎞⎟⎠

S.A.T;

(1 0 00 3 0

)

Note that S and T are not uniquely determined.

If, more generally, R is a principal ideal domain, we can proveTheorem 4.2.2 in a similar way, replacing the Euclidean algorithmby the following remark:

Remark 4.2.5 Let R be a principal ideal domain, and A = (a1,1, a1,2) ∈R1×2. Then there are x, y ∈ R with

gcd (a1,1, a1,2) = d = x ⋅ a1,1 + y ⋅ a1,2

(note that if R is not a principal ideal domain then in generalgcd (a1,1, a1,2) ∉ ⟨a1,1, a1,2⟩, hence such a representation of the gcddoes not exist; note also, that over a Euclidean domain R, we canfind x and y by the Euclidean algorithm). Write

a1,1 = u ⋅ d a1,2 = v ⋅ d

with u, v ∈ R. Then with

T = (x −vy u

) ∈ GL (2,R)

Page 155: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

4. MODULES OVER PRINCIPAL IDEAL DOMAINS 145

we haveA ⋅ T = (d, 0) .

This procedure allows us to replace the steps (1) − (3) of the ele-mentary divisor algorithm: If a1,1 ≠ 0 then we can make all otherentries in the first row and column zero. This process terminates,since the entries a1,1 appearing in the process generate an ascendingchain of ideals, which terminates, since R is Noetherian.

Note that det (T ) = 1, that is, T ∈ SL (2,R).

Remark 4.2.6 In the elementary divisor algorithm all transforma-tions have determinant ±1 (row/column transformations and per-mutation matrices). Hence, in Theorem 4.2.2 we can achieve thatT ∈ SL (m,R) and S ∈ SL (n,R) (how?).

That r and the elementary divisors di are unique up to units,follows from:

Theorem 4.2.7 For the elementary divisors d1, . . . , dr of A ∈ Rn×m

it holds

d1 ⋅ ... ⋅ di = gcd (det (AI,J) ∣ ∣I ∣ = ∣J ∣ = i) =∶Di

for i ≤ r. For i > r all det (AI,J) = 0.Here, if I ⊂ {1, . . . , n} and J ⊂ {1, . . . ,m}, we denote by

AI,J ∈ R∣I ∣×∣J ∣

the submatrix of A with the rows I and the columns J . The det (AI,J)with ∣I ∣ = ∣J ∣ = i are also called the i × i-minors of A.

The Di are also called the i-th determinantal divisors of A.Note that d1 = D1 is the greatest common divisor of all entries

of A.

Proof. We sketch the proof using some results from (multi-)linearalgebra: The entries of the representing matrix of the i-th exteriorpower ⋀iA of A (with respect to a suitable basis) are exactly thei × i-minors of A. Moreover, if S ∈ Rn×n, then

(⋀iS) ⋅ (⋀iA) = ⋀i (S ⋅A)

If S ∈ GL (n,R), then for the gcd of the entries it holds

gcd (⋀i (S ⋅A)) = gcd (⋀iA)

Page 156: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

4. MODULES OVER PRINCIPAL IDEAL DOMAINS 146

(up to units), as any entry of ⋀i (S ⋅A) is a linear combination of theentries of ⋀iA and hence gcd (⋀i (S ⋅A)) is divisible by gcd (⋀iA).The converse is also true since A = S−1 ⋅ (S ⋅A).

For the base change T in the source we proceed in a similarfashion.

If we now have

S ⋅A ⋅ T =D =

⎛⎜⎜⎜⎝

d1

⋱ 0dr

0 0

⎞⎟⎟⎟⎠

according to the elementary divisor theorem, then

gcd (⋀iA) = gcd (⋀iD)

= gcd (dj1 ⋅ ... ⋅ dji ∣ 1 ≤ j1 < ... < ji ≤ r)

= d1 ⋅ ... ⋅ di

since dj ∣ dk for j ≤ k.

Example 4.2.8 For

A =

⎛⎜⎜⎜⎝

1 1 1−3 1 11 −3 11 1 −3

⎞⎟⎟⎟⎠

we compute the Smith normal form:

A↦

⎛⎜⎜⎜⎝

1 0 00 4 40 −4 00 0 −4

⎞⎟⎟⎟⎠

⎛⎜⎜⎜⎝

1 0 00 4 40 −4 00 0 −4

⎞⎟⎟⎟⎠

⎛⎜⎜⎜⎝

1 0 00 4 00 0 40 0 −4

⎞⎟⎟⎟⎠

⎛⎜⎜⎜⎝

1 0 00 4 00 0 40 0 0

⎞⎟⎟⎟⎠

=D

On the other hand,D1 = 1 = d1

the 2 × 2-minors are equal to 0, ±4 or 8, hence

D2 = 4 = d1 ⋅ d2

and the 3 × 3-minors are ±16, hence

D3 = 16 = d1 ⋅ d2 ⋅ d3.

The elementary divisor theorem 4.2.2 describes the structure offinitely generated modules over principal ideal domains:

Page 157: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

4. MODULES OVER PRINCIPAL IDEAL DOMAINS 147

4.3 Modules and Presentations

We recall some basic facts on modules. Here R is any (not neces-sarily commutative) ring.

Definition 4.3.1 An R-(left)-module (M,+, ⋅) is a set M withmaps

+ ∶M ×M Ð→M

⋅ ∶ R ×M Ð→M

such that

1) (M,+) is an abelian group,

2) the scalar multiplication ⋅ is distributive over the addition +,that is,

r ⋅ (m1 +m2) = r ⋅m1 + r ⋅m2

(r1R+ r2) ⋅m = r1 ⋅m + r2 ⋅m

for all r, r1, r2 ∈ R and m,m1,m2 ∈M , and

3) for all r, s ∈ R and m ∈M it holds

(r R⋅ s) ⋅m = r ⋅ (s ⋅m)

If R has a multiplicative unit 1, then we require, in addition,that 1 ⋅m =m.

Usually it is clear from the context whether + refers to theaddition in R or M . If we want to be more precise, we note Rrespectively M over + (and in the same way for ⋅).

Example 4.3.2 1) Let R = K be a field. Then a K-module isnothing else than a K-vector space.

2) A Z-module G is nothing else than an abelian group (G,+).The scalar multiplication is

Z ×GÐ→ G

(n, g)z→ n ⋅ g ∶= g + ... + g´¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¶n-times

with (−1) ⋅ g ∶= −g.

Page 158: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

4. MODULES OVER PRINCIPAL IDEAL DOMAINS 148

3) Let (R,+, ⋅) be a commutative ring. Then a subset I ⊂ R isan ideal if and only if (I,+, ⋅) is an R-module.

4) If M1 and M2 are modules over R, then also the direct productM1 ×M2 is an R-module with r ⋅ (m1,m2) = (r ⋅m1, r ⋅m2), inparticular:

5) If R is a ring, then

Rn = R × ... ×R´¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¶

n

is an R-module.

6) Let (M,+, ⋅) be an R-module. A submodule U ⊂ M is asubgroup of (M,+), on which the scalar multiplication can berestricted, that is, with

r ⋅m ∈ U

for all m ∈ U and r ∈ R. A submodule is again an R-module.

A subset U ⊂M is a submodule if and only if U ≠ ∅ and

m1 +m2 ∈ U

r ⋅m ∈ U

for all mi,m ∈ U and r ∈ R.

7) Let M be an R-module and U ⊂ M a submodule. Then thequotient group M/U is again an R-module (the quotientmodule) with the scalar multiplication

r ⋅ m = r ⋅ (m +U) = r ⋅m +U = r ⋅m

for r ∈ R and m ∈M .

8) Let V be a K-vector space and A ∈ End (V ) an endomor-phism (for example, V = Kn and A ∈ Kn×n). Then by thesubstitution homomorphism

K[x] Ð→ End (V )x z→ A

we can make the K-vector space V into a K[x]-module bydefining the scalar multiplication as

K[x] × V Ð→ V

(f, v)z→ f ⋅ v ∶= f (A) (v)

Page 159: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

4. MODULES OVER PRINCIPAL IDEAL DOMAINS 149

9) An R-Algebra S is a ring (S,+, ⋅) with 1 together with a ringhomomorphism ϕ ∶ R → S such that ϕ (r) ⋅ s = s ⋅ ϕ (r) for allr ∈ R and s ∈ S. With the scalar multiplication

∗ ∶ R × S Ð→ S(r, s) z→ r ∗ s ∶= ϕ (r) ⋅ s

S becomes an R-module.

Hence, an R-algebra is nothing else than a set S with opera-tions

+ ∶ S × S → S (addition)

⋅ ∶ S × S → S (multiplication)

∗ ∶ R × S → S (scalar multiplication)

such that

(a) (S,+,∗) is an R-module,

(b) (S,+, ⋅) is a ring, and

(c) for all r ∈ R and s1, s2 ∈ S it holds

r ∗ (s1 ⋅ s2) = (r ∗ s1) ⋅ s2 = s1 ⋅ (r ∗ s2) .

Is, in turn, such an S given, then we obtain the structure mapof the algebra as ϕ ∶ R → S, ϕ(r) ∶= r ∗ 1S.

Definition 4.3.3 An R-module homomorphism is an R-lineargroup homomorphism f ∶M → N between R-modules, that is,

1) f (m1 +m2) = f (m1) + f (m2) for all m1,m2 ∈M

2) f (r ⋅m) = r ⋅ f (m) for all m ∈M and r ∈ R.

Kernel ker (f) and image im (f) are submodules, and the ho-momorphism theorem for modules holds

M/ker (f) ≅ im (f) .

We define coker(f) = N/ im (f) as the cokernel of f .

Definition 4.3.4 Let M be an R-module.

Page 160: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

4. MODULES OVER PRINCIPAL IDEAL DOMAINS 150

1) M is called finitely generated, if there is a surjective R-module homomorphism

π ∶ Rr →M .

The images mi = π (ei) ∈ M of the standard basis vector eiare called generators. The map π is surjective if and onlyif, every element M can be written as an R-linear combinationof m1, . . . ,mr, that is,

∀m ∈M ∃a1, . . . , ar ∈ R with m = a1m1 + ... + armr.

We then writeM = ⟨m1, . . . ,mr⟩ .

2) M is called free of rank r, if there is an isomorphism π ∶Rr →M , that is

M ≅ Rr.

The above representation m = a1m1+ ...+armr is then unique,and we call m1, . . . ,mr a basis of M .

3) An R-module M is called finitely presented, if M is finitelygenerated and ker(π) is also finitely generated.

Example 4.3.5 Considered as a Z-module, the rational numbersQ are not finitely generated: Assume Q is generated by r1, . . . , rn.Then there is a d ∈ Z coprime to the denominators ri and 1

d does notlie in the Z-module (that is, abelian group) ⟨r1, . . . , rn⟩ generated byr1, . . . , rn.

A K-vector space of dimension r is, considered as a K-module,free of rank r (as any vector space has a basis).

The ring R = K [x1, x2, ...] of polynomials in countably manyvariables is as an R-module finitely generated (by 1). However itssubmodule

M = {f ∈ R ∣ f (0) = 0}

is not, since it contains all xi, however any finite set of polynomialsinvolves only finitely many variables.

The following short hand notation is very useful:

Definition 4.3.6 A sequence of R-module homomorphisms

...→Miϕi→Mi+1

ϕi+1→ Mi+2 → ...

is called exact, if

im (ϕi) = ker (ϕi+1) ∀i.

Page 161: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

4. MODULES OVER PRINCIPAL IDEAL DOMAINS 151

Remark 4.3.7 A homomorphism ϕ ∶ N → M is surjective, if thesequence

Nϕ→M → 0

is exact, and it is injective, if

0→ Nϕ→M

is exact.

Remark 4.3.8 Hence, a module M is finitely generated if there isan exact sequence

Rn π→M → 0.

With the inclusion ι of the kernel, we obtain an exact sequence

0→ ker (ϕ)ι→ Rn π

→M → 0

So a module M is finitely presented if there is an exact sequence

Rm A→ Rn π

→M → 0

with A ∈ Rn×m. This matrix A is called presentation matrix ofM , and describes M completely up to isomorphism, since by thehomomorphism theorem

Rn/ im (A) = Rn/ker (π) ≅ im (π) = Mei ↦ π(ei)

That is, the image of A contains all relations between the generatorsπ (ei) of M (where ei denotes the standard basis of Rn). Or to putit in a different way, up to isomorphism we obtain M from the freemodule Rn by imposing the calculation rules

r1e1 + ... + rnen = 0

for all

⎛⎜⎝

r1

⋮rn

⎞⎟⎠∈ im (A) .

Every finitely generated module over a Noetherian ring can berepresented in this way. Note that in general we cannot expectthis, for example, R/m for R = K[x1, x2, . . .] a polynomial ringin infinitely many variables and m = ⟨x1, x2, . . .⟩ is as an R-modulefinitely generated (by 1), but not finitely presented. We now discussthe Noetherian case. In the same way as for ideals, we first showthe following equivalence (Exercise 4.4):

Page 162: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

4. MODULES OVER PRINCIPAL IDEAL DOMAINS 152

Definition and Theorem 4.3.9 Let R be a commutative ring with1. An R-module M is called Noetherian, if it satisfies the follow-ing equivalent conditions:

1) Every ascending chain of submodules of M terminates.

2) Every submodule of M is finitely generated.

3) Every non-empty set of submodules of M has a maximal ele-ment.

Using the chain condition it is any easy exercise to show thefollowing (Exercise 4.5):

Lemma 4.3.10 Let

0→ Uι→ F

π→M → 0

be an exact sequence of R-modules. Then F is Noetherian if andonly if U and M are Noetherian.

Lemma 4.3.11 Let R be a Noetherian ring. Then Rn is a Noethe-rian module.

Proof. First note, that R is a Noetherian R-module by Example4.3.2.(3). Since

0 → R → Rn → Rn−1 → 0

a1 ↦

⎛⎜⎜⎜⎝

a1

0⋮0

⎞⎟⎟⎟⎠

,

⎛⎜⎜⎜⎝

a1

a2

⋮an

⎞⎟⎟⎟⎠

↦⎛⎜⎝

a2

⋮an

⎞⎟⎠

is exact, the claim follows by induction and Lemma 4.3.10.Since for any finitely generated R-module M we have an exact

sequence0→ U → Rn →M → 0

with a submodule U ⊂ Rn, it follows by Lemma 4.3.10:

Theorem 4.3.12 Finitely generated modules over Noetherian ringsare finitely presented.

This also proves: Finitely generated modules over Noetherianrings are Noetherian.

In particular, we can apply Theorem 4.3.12 to describe finitelygenerated Z-modules (that is, finitely generated abelian groups)and finitely generated K [x]-modules by a presentation matrix.

Page 163: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

4. MODULES OVER PRINCIPAL IDEAL DOMAINS 153

Example 4.3.13 We consider the abelian group G with the pre-sentation as Z-module

0→ Z3 A→ Z4 π

→ G→ 0

given by the matrix

A =

⎛⎜⎜⎜⎝

1 1 1−3 1 11 −3 11 1 −3

⎞⎟⎟⎟⎠

First compute the Smith normal form D = S ⋅A ⋅ T of A with

D =

⎛⎜⎜⎜⎝

1 0 00 4 00 0 40 0 0

⎞⎟⎟⎟⎠

S =

⎛⎜⎜⎜⎝

1 0 0 03 1 0 02 1 1 01 1 1 1

⎞⎟⎟⎟⎠

T =⎛⎜⎝

1 −1 00 1 −10 0 1

⎞⎟⎠

(see Exercise 4.2.8). So we have a commutative diagram

0 → Z3 A→ Z4 π

→ G → 0↑ T ↓ S ≅

0 → Z3 D→ Z4 → coker(D) → 0

Hence, the columns ci = S−1 (ei) of

S−1 =

⎛⎜⎜⎜⎝

1 0 0 0−3 1 0 01 −1 1 01 0 −1 1

⎞⎟⎟⎟⎠

represent generators c1, c2, c3, c4 of coker(A) = Z4/ im (A) with therelations

1 ⋅ c1 = 0 4 ⋅ c2 = 0 4 ⋅ c3 = 0

In particular, the generator c1 can be omitted. We can see thisdirectly:

⎛⎜⎜⎜⎝

1−311

⎞⎟⎟⎟⎠

= A ⋅ e1 ∈ im (A)

In the same way, since G ≅ coker(A), the elements

vi = π(S−1 (ei)) ∈ G

Page 164: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

4. MODULES OVER PRINCIPAL IDEAL DOMAINS 154

for i = 2,3,4 are generators of G with the relations

4 ⋅ v2 = 0 4 ⋅ v3 = 0

Hence we can write G as a product of cyclic groups

G ≅ coker(D) ≅ Z/4 ×Z/4 ×Z

where the factors correspond to the generators

v2 = π

⎛⎜⎜⎜⎝

01−10

⎞⎟⎟⎟⎠

v3 = π

⎛⎜⎜⎜⎝

001−1

⎞⎟⎟⎟⎠

v4 = π

⎛⎜⎜⎜⎝

0001

⎞⎟⎟⎟⎠

∈ G

In the next section we give the general result:

4.4 Finitely Generated Modules Over

Principal Ideal Domains

Using the elementary divisor theorem we can describe finitely gen-erated modules over principal ideal domains.

Let R be a principal ideal domain and M a finitely generatedR-module. By Theorem 4.3.12, M is finitely presented

Rm A→ Rn π

→M → 0

and A ∈ Rn×m. The elementary divisor theorem 4.2.2 yields S ∈GL (n,R) and T ∈ GL (m,R) with

Rm A→ Rn π

→ M → 0↑ T ↓ S ≅

Rm D→ Rn → M ′ → 0

and

D =

⎛⎜⎜⎜⎝

d1

⋱ 0dr

0 0

⎞⎟⎟⎟⎠

With the standard basis vectors ei of Rn

vi = π (S−1 (ei))

are generators of M with the relations

d1v1 = 0 . . . drvr = 0

Page 165: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

4. MODULES OVER PRINCIPAL IDEAL DOMAINS 155

If di is a unit, then divi = 0 implies vi = 0, hence we can delete thegenerator vi (and with it the i-th row of D). The last m−r columnscan be deleted, as this does not change im (A) = ker (π). In thisway, we obtain a presentation

0→ Rm A→ Rn π

→M → 0.

To formulate this as a theorem we use the following notation:

Definition 4.4.1 An R-module M is the direct sum

M = U1 ⊕ ...⊕Un

of submodules U1, . . . , Un ⊂M , if M is generated by the elements ofthe Ui and for all ui ∈ Ui it holds

u1 + ... + un = 0 Ô⇒ u1 = ... = un = 0

Definition 4.4.2 A module is called cyclic, if it is generated by asingle element.

Theorem 4.4.3 Let R be a principal ideal domain and M a finitelygenerated R-module. Then it holds:

1) There are generators v1, . . . , vn of M and d1, . . . , dr ∈ R, r ≤ nwith di ∉ R× and di ∣ di+1 for i = 1, . . . , r − 1, such that M isdescribed by the relations

d1v1 = 0 . . . drvr = 0

2) M is the direct sum

M = U1 ⊕ ...⊕Un

of cyclic submodules and

Ui ≅ {R/ ⟨di⟩ for i ≤ rR for i > r

3) that is,M ≅ R/ ⟨d1⟩ × . . . × R/ ⟨dr⟩ × Rn−r

The rank n − r of M is uniquely determined by M , also theelementary divisors di of M (up to units).

Page 166: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

4. MODULES OVER PRINCIPAL IDEAL DOMAINS 156

Corollar 4.4.4 Let R be a principal ideal domain and M a finitelygenerated R-module. Let

T = {m ∈M ∣ ∃r ∈ R with r ⋅m = 0} ⊂M

be the torsion submodule of M . There is a free submodule F ⊂Mwith

M = T ⊕ F .

The torsion submodule T is canonical as a submodule, the freepart F , on the other hand, is not (rather the quotient M/T ≅ F iscanonical).

Definition 4.4.5 The module M is called torsion-free, if T ={0}, and M is called a torsion module, if M = T .

Remark 4.4.6 Corollary 4.4.4 shows: A finitely generated moduleover a principal ideal domain is free if and only if it is torsion-free.

From this it follows:

Remark 4.4.7 Let R be a principal ideal domain. Then everysubmodule of a free R-module is again free.

Example 4.4.8 The ideal M = ⟨x, y⟩ ⊂ R = K [x, y] is not princi-pal. As an R-submodule of R the module M is torsion-free, howevernot free (see Exercise 4.6).

Example 4.4.9 In Example 4.3.13

G = ⟨v2⟩⊕ ⟨v3⟩´¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¶

T

⊕ ⟨v4⟩°F

with the (unique) torsion submodule

T = ⟨v2, v3⟩ ≅ Z/4 ×Z/4

and the (non-unique) free part

F = ⟨v4⟩ ≅ Z.

In Section 4.6 and in Exercise 4.8 we will also see examples overK[x].

The decomposition in Theorem 4.4.3 can be refined: If d ∈ Rand d = pe11 , . . . , p

ekk is a prime factorization (with all ei > 0), then

by the Chinese remainder theorem

R/ (d) ≅ R/ ⟨pe11 ⟩ × ... ×R/ ⟨pekk ⟩

as the ideals ⟨peii ⟩ are pairwise coprime. Hence it holds:

Page 167: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

4. MODULES OVER PRINCIPAL IDEAL DOMAINS 157

Theorem 4.4.10 Let R be a principal ideal domain and M a finitelygenerated R-module. Then there is a t ∈ N0 and prime elementsp1, . . . , ps ∈ R and e1, . . . , es ∈ N with

M ≅ R/ ⟨pe11 ⟩ × . . . × R/ ⟨pess ⟩ × Rt

and this product is unique up to reordering of the factors.

4.5 Fundamental Theorem of Finitely

Generated Abelian Groups

As a special case we consider finitely generated Z-modules, that is,finitely generated abelian groups. We summarize for this case theresults of the preceding section:

Theorem 4.5.1 Let G be a finitely generated abelian group. Thenit holds:

1) G is the direct sum of cyclic subgroups.

2) There is 0 ≤ r ≤ n and d1, . . . , dr ≥ 2 with di ∣ di+1 for i =1, . . . , r − 1, such that

G ≅ Z/ (d1) × . . . × Z/ (dr) × Zn−r

3) There are prime numbers p1, . . . , ps (not necessarily pairwisedifferent) and e1, . . . , es ∈ N with

G ≅ Z/ (pe11 ) × . . . × Z/ (pess ) × Zn−r

Here r and n and the di (up to permutation) are uniquely de-termined by G. The same is true for the peii .

Example 4.5.2 Let G be given by the presentation matrix

A =

⎛⎜⎜⎜⎝

2 0 0 00 3 0 00 0 4 00 0 0 18

⎞⎟⎟⎟⎠

∈ Z5×5

By the elementary divisor algorithm we obtain the Smith normalform D of A

A↦

⎛⎜⎜⎜⎝

1 0 0 00 6 0 00 0 4 00 0 0 18

⎞⎟⎟⎟⎠

⎛⎜⎜⎜⎝

1 0 0 00 2 0 00 0 12 00 0 0 18

⎞⎟⎟⎟⎠

⎛⎜⎜⎜⎝

1 0 0 00 2 0 00 0 6 00 0 0 36

⎞⎟⎟⎟⎠

=D

Page 168: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

4. MODULES OVER PRINCIPAL IDEAL DOMAINS 158

Hence, the elementary divisor representation in Theorem 4.5.1 is

G ≅ Z/2 ×Z/6 ×Z/36

and the prime power representation (by 6 = 2 ⋅ 3 and 36 = 22 ⋅ 32) is

G ≅ Z/2 ×Z/2 ×Z/3 ×Z/22 ×Z/32.

From this we can recover the elementary divisor representation

G ≅ Z/2 × Z/2 × Z/22

× Z/3 × Z/32

≅ Z/2 × Z/6 × Z/36

since by the condition di ∣ di+1 it holds: If we write the elementarydivisors

di = pei,11 ⋅ ... ⋅ p

ei,tt

with prime numbers p1, . . . , pt and ei,j ≥ 0, then ei,j ≤ ei+1,j. More-over we can use any prime power only once. See also Exercise 4.7.

4.6 The Jordan Normal Form

In linear algebra over a field K the Jordan normal form of an en-domorphism A = (ai,j) ∈Kn×n is one of the key constructions.

Considering the K[x]-module structure on Kn associated to A,we can determine the Jordan normal form of A by applying theelementary divisor algorithm to the presentation matrix of Kn as aK[x]-module.

Remark 4.6.1 In Example 4.3.2.(8) we have seen, that Kn be-comes a K[x]-module with the scalar multiplication

K[x] ×Kn Ð→Kn

(f, v)z→ f (A) ⋅ v

induced by substituting x by A. From the K[x]-module structurewe can recover the K-linear map

Kn → Kn

v ↦ x ⋅ v

Hence, a K[x]-module structure on Kn is the same as an endomor-phism A ∈Kn×n.

Page 169: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

4. MODULES OVER PRINCIPAL IDEAL DOMAINS 159

Remark 4.6.2 A subvector space U ⊂ Kn is a K[x]-submodule ifand only if A (U) ⊂ U .

Proof. Let u ∈ U . Then f ⋅ u ∈ U ∀f ∈K[x] if and only if x ⋅ u ∈ U ,if and only if A ⋅ u ∈ U .

Remark 4.6.3 The standard basis vectors e1, . . . , en of Kn are gen-erators of Kn as a K[x]-module, that is, there is an exact sequence

K[x]nπÐ→Kn Ð→ 0

Among the ei we have the obvious relations

x ⋅ ej = A ⋅ ej =⎛⎜⎝

a1,j

⋮an,j

⎞⎟⎠=

n

∑i=1

ai,j ⋅ ei ∈Kn

By these relations, any element ∑ni=1 fi ⋅ ei ∈ K [x]

nwith fi ∈ K[x]

can be reduced to a vector of constants (that is, to an element ofKn). So these relations generate ker (π) as a K [x]-module.

Hence Kn as a K[x]-module has the presentation

K[x]nxE−AÐ→ K[x]n Ð→Kn Ð→ 0

with the presentation matrix

xE −A =

⎛⎜⎜⎜⎝

x − a1,1 −a1,n ⋯ −a1,n

−a2,1 x − a2,2 ⋮⋮ ⋱ ⋮

−an,1 ⋯ ⋯ x − an,n

⎞⎟⎟⎟⎠

In linear algebra this matrix is also called the characteristic ma-trix of A.

Remark 4.6.4 The kernel of the substitution homomorphism

ϕA ∶ K[x] → Kn×n

x ↦ A

is a principal ideal in K [x]. The minimal polynomial pA of Ais defined in linear algebra as the monic generator of the kernel

ker (ϕA) = ⟨pA⟩ .

So for every v ∈Kn the scalar multiplication pA ⋅ v = 0 is zero, thatis, Kn is a (finitely generated) torsion module.

According to the theorem of Cayley-Hamilton the characteris-tic polynomial

χA = det (xE −A) ∈ ker (ϕA)

is in the kernel, so pA ∣ χA.

Page 170: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

4. MODULES OVER PRINCIPAL IDEAL DOMAINS 160

Lemma 4.6.5 Assume that the characteristic polynomial χA fac-tors into linear factors. Then Kn as a K [x]-module is the directsum

Kn = U1 ⊕ ...⊕Us

of cyclic submodules

Ui ≅K[x]/ ⟨(x − λi)ei⟩

and

∏si=1 (x − λi)

ei = χA

Proof. Applying the elementary divisor algorithm to xE − A weobtain S,T ∈ SL(n,K [x]) with

S ⋅ (xE −A) ⋅ T =D =⎛⎜⎝

d1

⋱dn

⎞⎟⎠

and di ≠ 0 (note, that Kn is a torsion module). Decomposing fur-ther by the Chinese remainder theorem (that is, applying Theorem4.4.10) yields a decomposition

Kn = U1 ⊕ ...⊕Us

into a direct sum of submodules Ui and isomorphisms

αi ∶ Ui≅Ð→K[x]/ ⟨peii ⟩

with irreducible polynomials pi ∈K[x]. Then it holds

∏si=1p

eii = d1 ⋅ ... ⋅ dn = det (D) = det (xE −A) = χA.

Since χA decomposes into linear factors, the pi are of the formpi = x − λi with λi ∈K.

We now describe a K-vector space basis of Ui, in which A ∣Ui ∶Ui → Ui, v ↦ A ⋅ v becomes a Jordan block (note that A maps Uiinto Ui by Remark 4.6.2): As a K-vector space

K[x]/ ⟨(x − λi)ei⟩

has the basis

1, x − λi, (x − λi)2, . . . , (x − λi)

ei−1

The preimages

vi,j = α−1i ((x − λi)

j)

Page 171: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

4. MODULES OVER PRINCIPAL IDEAL DOMAINS 161

under the isomorphism αi ∶ Ui Ð→ K[x]/ ⟨peii ⟩ give a basis Bi =(vi,j)j=0,...,ei−1 of Ui.

Then it holds

(A − λiE) ⋅ vi,j = (x − λi) ⋅ α−1i ((x − λi)

j) = α−1

i ((x − λi)j+1

) = vi,j+1

for j = 0, . . . , ei − 2 and

(A − λiE) ⋅ vi,ei−1 = (x − λi) ⋅ vi,ei−1 = 0.

Hence, with respect to the basis Bi the matrix A has as representingmatrix an ei × ei-Jordan block with eigenvalue λi

MBiBi (A ∣Ui) = J (λi, ei) ∶=

⎛⎜⎜⎜⎝

λi 01 ⋱

⋱ ⋱0 1 λi

⎞⎟⎟⎟⎠

∈Kei×ei

This proves:

Theorem 4.6.6 (Jordan normal form) Let A ∈Kn×n, and sup-pose χA (t) factors over K into linear factors (which is true, forexample, if K = C). Then there is an S ∈ GL (n,K), such that

SAS−1 = J =

⎛⎜⎜⎜⎝

J (λ1, e1) 0J (λ2, e2)

⋱0 J (λs, es)

⎞⎟⎟⎟⎠

has block diagonal form with Jordan blocks J (λi, ri) with (not nec-essarily pairwise different) eigenvalues λ1, . . . , λs on the diagonal.Up to permutation of the blocks, J is uniquely determined by A.

Remark 4.6.7 The prime power factors of the last elementary di-visor dn correspond to the maximal Jordan blocks, those of the sec-ond last to blocks of size one less, and so on. In particular, dn = pAis the minimal polynomial of A.

Example 4.6.8 We try out the algorithm for

A =

⎛⎜⎜⎜⎜⎜⎜⎝

0 0 0 0 01 0 0 0 00 1 0 0 00 0 0 0 00 0 0 0 1

⎞⎟⎟⎟⎟⎟⎟⎠

Page 172: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

4. MODULES OVER PRINCIPAL IDEAL DOMAINS 162

(which, for simplicity is already in Jordan normal form). First wecompute the Smith normal form of xE −A:

⎛⎜⎜⎜⎜⎜⎜⎝

x 0 0 0 0−1 x 0 0 00 −1 x 0 00 0 0 x 00 0 0 0 x − 1

⎞⎟⎟⎟⎟⎟⎟⎠

⎛⎜⎜⎜⎜⎜⎜⎝

−1 0 0 0 00 x2 0 0 00 −1 x 0 00 0 0 x 00 0 0 0 x − 1

⎞⎟⎟⎟⎟⎟⎟⎠

⎛⎜⎜⎜⎜⎜⎜⎝

−1 0 0 0 00 −1 0 0 00 0 x3 0 00 0 0 x 00 0 0 0 x − 1

⎞⎟⎟⎟⎟⎟⎟⎠

⎛⎜⎜⎜⎜⎜⎜⎝

1 0 0 0 00 1 0 0 00 0 1 0 00 0 0 x 00 0 0 0 x3 (x − 1)

⎞⎟⎟⎟⎟⎟⎟⎠

=D

From the elementary divisors we can read off, that the Jordan nor-mal form of A has one Jordan block of the size

1 × 1 with eigenvalue 03 × 3 with eigenvalue 01 × 1 with eigenvalue 1

Example 4.6.9 Suppose A would have two 1 × 1 blocks and one3 × 3 block, all with eigenvalue 0, then the Smith normal form ofxE −A would be

D =

⎛⎜⎜⎜⎜⎜⎜⎝

1 0 0 0 00 1 0 0 00 0 x 0 00 0 0 x 00 0 0 0 x3

⎞⎟⎟⎟⎟⎟⎟⎠

For another example see Exercise 4.8.

4.7 Exercises

Exercise 4.1 1) Compute the Smith normal form of

A =⎛⎜⎝

4 6 22 3 22 3 0

⎞⎟⎠∈ Z3×3

and S,T ∈ GL (3,Z) with

S ⋅A ⋅ T =D

2) Determine a basis of im(A) and describe Z3/ im(A).

Page 173: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

4. MODULES OVER PRINCIPAL IDEAL DOMAINS 163

Exercise 4.2 Let

g1 =⎛⎜⎝

102

⎞⎟⎠, g2 =

⎛⎜⎝

120

⎞⎟⎠, g3 =

⎛⎜⎝

−3−3−3

⎞⎟⎠, g4 =

⎛⎜⎝

122

⎞⎟⎠∈ Z3

Determine a basis of the subgroup of Z3 generated by g1, . . . , g4.

Exercise 4.3 Let G be a finite abelian group, and

Zn A→ Zn → G→ 0

a presentation of G by A = (ai,j) ∈ Zn×n. Prove that for the orderof the group G it holds

∣G∣ = ∣detA∣ .

Exercise 4.4 An R-module M is called Noetherian if it satisfiesthe following equivalent conditions:

1) Every ascending chain of submodules terminates.

2) Every submodule of M is finitely generated.

3) Every non-empty set of submodules contains a maximal ele-ment.

Prove the equivalence.

Exercise 4.5 Let0→ U

a→ F

π→M → 0

be an exact sequence of R-modules. Prove that F is Noetherian ifand only if U and M are Noetherian.

Exercise 4.6 Let K be a field and R = K[x, y]. Show that M =⟨x, y⟩ ⊂ R as an R-module is torsion-free, but not free.

Exercise 4.7 Find the elementary divisors di of

G = Z/2 ×Z/2 ×Z/2 ×Z/2 ×Z/32 ×Z/32 ×Z/35 ×Z/5 ×Z/5 ×Z/7

that is, a representation G ≅ Z/d1× ...×Z/dr with di ≥ 2 and di ∣ di+1

for i = 1, . . . , r − 1.

Exercise 4.8 Let

B =⎛⎜⎝

2 0 −1−1 1 11 0 0

⎞⎟⎠∈ End (C3)

Page 174: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

4. MODULES OVER PRINCIPAL IDEAL DOMAINS 164

1) Compute the Smith normal form D of

A = xE −B ∈ C[x]3×3

and S,T ∈ GL (3,C[x]) with D = S ⋅A ⋅ T .

2) Determine from this the Jordan normal form of B.

Page 175: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5

Free Resolutions andInvariants

5.1 Overview

If M is a finitely generated module over a principal ideal domainR, then by Theorem 4.4.3 there is an exact presentation sequence

0→ Rr D→ Rs π

→M → 0

where

D =

⎛⎜⎜⎜⎝

d1

⋱dr

0

⎞⎟⎟⎟⎠

Note that exactness at the module Rr is achieved by deleting anyzero column in the Smith normal form. In this way, one can describethe structure of M completely.

In which way can we generalize this to the setup of modules Mover say R = K[x1, . . . , xn]? What we have in mind, is to obtaininvariants encoding information about the algebraic variety X =V (f1, . . . , fr) ⊂ An

K given by fi ∈ R from

M = coker (f1, . . . , fr) = R1/ im (f1, . . . , fr)

which is, as an R-module, isomorphic to the coordinate ringK[X] =R/I of X.

In particular, we are interested in the dimension of X, the de-gree of X and the genus of X. We already have some idea, whatthe dimension of an algebraic variety should be, for example, thedimension of a hypersurface should be n−1. The degree of a hyper-surface should be the degree of the equation, and if X is finite, the

165

Page 176: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 166

degree should be the number of solutions counted with multiplicity.The genus of X you perhaps know from topology. Nevertheless, wewill have to make the definitions precise and see how to computethese invariants. The canonical setting to do this, are ideals gen-erated by homogeneous polynomials. So we will also give a shortprimer on the corresponding projective varieties in Section 3.8.

5.2 Free Resolutions

With the notation as in the introduction, the R-module

M = coker(A) ≅ R/I

withA = (f1, . . . , fr) ∈ R

1×r

has the presentation

Rr A→ R1 →M → 0.

If X is not a hypersurface, then A will have a non-trivial kernel.

Example 5.2.1 For I = ⟨x, y⟩ ⊂ R =K[x, y], we have

A = (x, y)

and ker(A) = im(B) with

B = (y−x

)

Obviously, ker(B) = 0, hence, we have an exact sequence

0→ R1 B→ R2 A

→ R1 → R/I → 0

In Theorem 5.10.7 we will formulate a general algorithm, which,given A, will determine a matrix B with

ker(A) = im(B)

using a straightforward generalization of Buchberger’s algorithmfrom ideals to modules. Recall, that we encountered the moduleof relations (syzygies) between the generators fi in the proof ofBuchberger’s criterion. In addition to the computation of B, arigorous theory of Grobner bases of modules will allow us to give amuch nicer proof of Buchberger’s criterion.

If we iterate this process of writing ker(A) = im(B), we obtainwhat is called a free resolution:

Page 177: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 167

Definition 5.2.2 Let M be an R-module. An exact sequence

...→ Fiφi→ Fi−1

φi−1→ ...

φ2→ F1

φ1→ F0

φ0→M → 0

with free modules Fi is called a free resolution of M . It is calledfinite if Fi = 0 for i > l for some integer l, which is called the lengthof the resolution.

The i-th syzygy module of M is im(φi) = ker(φi−1).

A priori it is not clear that the length is finite. This is noteven true if R is Noetherian and M is finitely generated (and hencefinitely presented):

Example 5.2.3 Let R =K[x, y]/ ⟨xy⟩. The R-module ⟨x⟩ is finitelygenerated, however, it has the infinite free resolution

...→ R1 y→ R1 x

→ R1 y→ R1 x

→ ⟨x⟩→ 0

However, for modules over the polynomial ring, we will provethe following key theorem by Hilbert:

Theorem 5.2.4 (Syzygy theorem) Let R = K[x1, . . . , xn]. Ev-ery finitely generated R-module has a finite free resolution. Allmodules in the resolution are finitely generated, and the length is atmost n.

Example 5.2.5 We compute the finite free resolution in Example5.2.1 using Singular:ring R=0,(x,y),lp;

ideal I=x,y;

def L=res(I,0);

1 2 3

R <-- R <-- R

0 1 2

matrix(L[1]);

[1,1] = y

[1,2] = x

matrix(L[2]);

[1,1] = -x

[2,1] = y

If the second argument of res is positive, then Singular will stopafter computing the given number of steps of the resolution.Increasing the number of generators we get similar complexes:ring R=0,(x(1..4)),lp;

Page 178: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 168

ideal I=x(1..4);

def L=res(I,0);

1 4 6 4 1

R <-- R <-- R <-- R <-- R

0 1 2 3 4In general, this kind of resolution is called Koszul complex. Forn independent variables,

rank(Fi) = (n

i).

We will come back to this in Exercise 5.6.

5.3 Graded modules and the Hilbert func-

tion

Suppose we are given a projective variety X ⊂ Pn(K) and I(X) =⟨f1, . . . , fr⟩ with homogeneous polynomials fi ∈ R = K[x0, . . . , xn].We will determine the invariants of X mentioned above from a finitefree resolution of the R-module

M = coker (f1 ... fr) ≅ R/I.

This module comes with an additional structure, we will have to re-spect when computing the resolution to obtain well-defined results:M is a graded module. In general, we define:

Definition 5.3.1 Let R = ⊕i∈N0Ri be a graded ring. A graded

R-module is an R-module M together with a decomposition

M =⊕i∈ZMi

as abelian groups such that

RiMj ⊂Mi+j

for all i, j.

Example 5.3.2 Considering I = ⟨x30 − x

31 − x

32⟩ ⊂ R = K[x0, x1, x2]

choosing lp with x0 > x1 > x2 we have as a K-vector space

R/I =K ⟨xα ∣ xα ∉ L(I)⟩ =K ⟨xα ∣ 0 ≤ α0 ≤ 2, α1, α2 ≥ 0⟩

so R/I is a graded R-module with the decomposition into K-vectorspaces

R/I =K ⟨1⟩⊕K ⟨x0, x1, x2⟩⊕K ⟨x20, x0x1, x0x2, x

21, x1x2, x

22⟩

⊕K ⟨x20x1, x

20x2, x0x

21, x0x1x2, x0x

22, x

31, x

21x2, x1x

22, x

32⟩⊕ ...

Page 179: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 169

In general, if I ⊂ R =K[x0, . . . , xn] is a homogeneous ideal, andIj is the K-vector space of homogeneous polynomials of degree j inI, then

I =⊕jIj,

since, by Lemma 3.8.9, all homogeneous summands of an elementare again in I. So also

R/I =⊕jRj/Ij

is a graded R-module, and

dimK(Rj/Ij) = dimK(Rj) − dimK(Ij).

This immediately raises the question, which information we canderive from the K-vector space dimensions of the graded pieces.

Definition and Theorem 5.3.3 Consider R =K[x0, . . . , xn] withthe standard grading, and let M be a graded R-module. If M isfinitely generated, then Mi is a K-vector space of finite dimension.The Hilbert function of M is defined as

HM ∶ Z → N0

i ↦ dimKMi

Proof. If dimKMs = ∞, then the submodule ⊕i≥sMi ⊂ M is notfinitely generated, since any element in Ms can only be a K-linearcombination of R-module generators.

Example 5.3.4 The Hilbert function of R/I in Example 5.3.2 is

i 0 1 2 3 4HR/I(i) 1 3 6 9 12

so for i ≥ 1 it seems that

HR/I(i) = 3i

agrees with a polynomial. This is a general phenomenon:

The following theorem by Hilbert shows that all informationencoded in the Hilbert function is determined by only finitely manyvalues:

Page 180: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 170

Definition and Theorem 5.3.5 Let R = K[x0, . . . , xn] with thestandard grading, and M a finitely generated graded R-module.Then there is an i0 ∈ Z and a polynomial PM ∈ Q[t] of degree ≤ nwith

HM(i) = PM(i)

for all integers i ≥ i0.The polynomial PM is called the Hilbert polynomial of M .

Definition 5.3.6 If X ⊂ Pn(K) is a projective variety, and I =I(X) ⊂ R = K[x0, . . . , xn] is the homogeneous zero ideal, then wedefine,

1) the dimension of X as the degree of PR/I

dim(X) = deg(PR/I),

2) the degree of X as dim(X)! times the lead coefficient of PR/I

deg(X) = dim(X)! ⋅ LC(PR/I),

3) the arithmetic genus of X as

pa(X) = (−1)dim(X) (PR/I(0) − 1) .

For an affine algebraic set X we define these invariants as theinvariants of the projective closure pc(X). How this definition ofdimension relates to the various other notations of dimension inalgebraic geometry and commtutative algebra will be discussed inSection 5.6.

Example 5.3.7 Returning to Example 5.3.2, we use Singular tocompute the Hilbert polynomial PR/I and, hence, determine theseinvariants for C = V (I):ring R=0,(x(0..2)),dp;

ideal I = x(0)^3-x(1)^3 - x(2)^3;

LIB "poly.lib";

hilbPoly(I);

0, 3

This tells us thatPR/I(t) = 3t + 0

so dim(C) = 1, deg(C) = 3 and pa(C) = 1, which makes sense foran elliptic curve. See also Exercise 3.13.

By the proof of Theorem 5.3.5 we obtain an algorithm to com-pute the Hilbert polynomial. It uses graded free resolutions:

Page 181: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 171

5.4 Graded free resolutions

Definition 5.4.1 A homomorphism f ∶M → N of graded R-modulesis called homogeneous if f(Mi) ⊂ Ni for all i.

Proposition 5.4.2 If f ∶ M → N is a homogeneous homomor-phism of R-modules, the R-modules

ker(f) ⊂M

im(f) ⊂ N

coker(f) = N/ im(f)

are graded.

Considering the homomorphisms

fi = f ∣Mi∶Mi → Ni

the proof is an easy exercise.

Remark 5.4.3 If0→ U →M → Q→ 0

is an exact sequence of graded modules with homogeneous homo-morphisms then by the homomorphism theorem

HU(i) −HM(i) +HQ(i) = 0

for all i.

Consider the homomorphism of K[x]-modules

K[x]1 →K[x]1, e1 ↦ x ⋅ e1

where e1 = 1 denotes the unit basis vector. This map clearly shouldbe homogeneous. However, according to our definition it is not,since e1 of degree deg(e1) = 0 is mapped to x⋅e1 of degree deg(x⋅e1) =deg(x)+deg(e1) = 1. This problem can easily be solved by shiftingthe degrees:

Definition 5.4.4 If M is a graded R-module and a ∈ Z, then thegraded R-module M(a) is defined by

M(a)i =Ma+i

and is called the a-th twist of M .

Page 182: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 172

The module K[x]1(−1) has one generator e′1 = 1 of degreedeg(e′1) = 1, which is mapped by

K[x]1(−1)→K[x]1, e′1 ↦ x ⋅ e1

to x ⋅ e1 of degree deg(x ⋅ e1) = 1+0 = 1. Hence, this homomorphismis homogeneous. More generally:

Example 5.4.5 If fi ∈ R = K[x0, . . . , xn] are homogeneous andI = ⟨f1, . . . , fr⟩ ⊂ R then

A = (f1, . . . , fr) ∶⊕rj=1R(−deg fj)→ R

is a homogeneous homomorphism. In particular, cokerA is a gradedR-module and cokerA ≅ R/I by a homogeneous isomorphism.

Definition 5.4.6 If M is a graded R-module, then a free resolution

...→ Fiφi→ Fi−1

φi−1→ ...

φ2→ F1

φ1→ F0

φ0→M → 0

is called graded if all φi are homogeneous.

In particular, R and all Fi are graded.

Theorem 5.4.7 (Graded syzygy theorem) Let R =K[x0, . . . , xn].Every finitely generated graded R-module has a finite graded freeresolution. The free modules are finitely generated and the lengthis at most n + 1.

We will prove Theorem 5.4.7 (and 5.2.4) by constructing a res-olution using Grobner basis techniques. Before, we use the gradedsyzygy theorem to prove Theorem 5.3.5 by giving an explicit con-struction of the Hilbert polynomial.

5.5 Construction of the Hilbert polyno-

mial

Remark 5.5.1 Let R = K[x0, . . . , xn]. Since in R there are pre-cisely

(i + n

n) =∏

nj=1

i + j

j

monomials of degree t ≥ 0 and no monomials of negative degree, wehave

HR(i) = (i + n

n)

0

∶= {(i+nn) for i ≥ −n

0 otherwise

Page 183: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 173

Note that (i+nn) = 0 for i = −n, . . . ,−1.

Hence for i ≥ −n the Hilbert function agrees with a polynomialof degree n:

HR(i) = PR(i)

with

PR(t) =1

n!(t + n) ⋅ ... ⋅ (t + 1) ∈ Q[t].

Proof. List the numbers 1, . . . , i + n, and choose n of these todivide up the remaining i numbers into sets S0, . . . , Sn of consecutivenumbers. Then such a choice corresponds uniquely to the monomialxs00 ⋅ . . . ⋅ xsnn with si = ∣Si∣.

Example 5.5.2 For n = 3 and i = 4, if we choose 2,5,6 from1, . . . ,7

1 2 3 4 5 6 7⋅ ∣ ⋅ ⋅ ∣ ∣ ⋅

we obtain the degree 4 monomial

x10 ⋅ x

21 ⋅ x

02 ⋅ x

13 = x0x

21x3.

Example 5.5.3 For the Hilbert function of R =K[x0, x1, x2] as anR-module, we get

i 0 1 2 3 4HR(i) 1 3 6 10 15

and for i ≥ −2

HR(i) =1

2(i + 2)(i + 1),

see Figure 5.1.

Remark 5.5.4 For the twist R(a) we have

HR(a)(i) =HR(i + a) = (i + a + n

n)

0

and

HR(a)(i) = (i + a + n

n)

for i ≥ −a − n.

So for a direct sum of twists we obtain:

Page 184: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 174

–1

0

1

2

3

4

5

6

–3 –2 –1 1 2

Figure 5.1: Hilbert function and Hilbert polynomial ofK[x0, x1, x2].

Remark 5.5.5 If R =K[x0, . . . , xn] and F =⊕sj=1R(aj), then

HF (i) =s

∑j=1

(i + aj + n

n)

0

and

HF (i) =s

∑j=1

(i + aj + n

n)

for i ≥ −min{aj} − n.

Example 5.5.6 If R = K[x0, x1, x2] and M = R(−2) ⊕ R(−3) wehave

HR(i) =1

2(i(i − 1) + (i − 1)(i − 2)) = (i − 1)2

for i ≥ −min{−2,−3} − 2 = 1, see Figure 5.2. For example, writtenin terms of the standard basis vectors e1 of degree 2 and e2 of degree3,

M2 = ⟨(10)⟩

and

M3 =K ⟨(01) ,(

x1

0) ,(

x2

0) ,(

x3

0)⟩

Note that deg(xie1) = 1 + 2 = 3.

Page 185: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 175

0

1

2

3

4

1 2 3

Figure 5.2: Hilbert function and Hilbert Polynomial of R(−2) ⊕R(−3) for R =K[x0, x1, x2].

Using these elementary observations and the graded syzygy the-orem, we now prove Theorem 5.3.5. For a different proof see Exer-cises 5.4 and 5.2.Proof. By Theorem 5.4.7, any finitely generated graded R-modulehas a finite graded free resolution

0→ Flφl→ Fl−1

φl−1→ ...

φ2→ F1

φ1→ F0

φ0→M → 0

So, decomposing into short exact sequences

0→ kerφi → Fiφi→ imφi → 0,

using Remark 5.4.3 we obtain

HM(t) =r

∑i=0

(−1)iHFi(t).

WritingFi =⊕

sij=1R(ai,j),

by Remarks 5.5.1 and 5.5.5, we have

HFi(t) =si

∑j=1

(t + ai,j + n

n)

0

so

HM(t) =r

∑i=0

(−1)isi

∑j=1

(t + ai,j + n

n)

0

Page 186: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 176

for all i. Hence for i ≥ −min{ai,j} − n the Hilbert function agreeswith the polynomial

HM(t) =r

∑i=0

(−1)isi

∑j=1

(t + ai,j + n

n)

of degree ≤ n.

Algorithm 5.5.7 The constructive proof immediately yields an al-gorithm to compute both the Hilbert function and the Hilbert poly-nomial from a graded free resolution.

Example 5.5.8 For the plane cubic I = ⟨x30 − x

31 − x

32⟩ ⊂ R =K[x0, x1, x2]

from Example 5.3.2 the resolution of R/I is

0→ R(−3)1 → R → R/I → 0

and hence we obtain

HM(t) = (t + 2

2) − (

t − 1

2)

=1

2((t + 2)(t + 1) − (t − 1)(t − 2))

= 3t.

Note that here we can see directly that

HM(t) = dimK Rt − dimK It

= dimK Rt − dimK Rt−3

= (t + 2

2) − (

t − 1

2).

Example 5.5.9 Consider the projective twisted cubic C = V (I) ⊂P3(K), where

I = ⟨x22 − x1x3, x1x2 − x0x3, x

21 − x2x0⟩ ⊂ R =K[x0, . . . , x3].

A finite free resolution of R/I is given by

0→ R(−3)2 → R(−2)3 → R → R/I → 0

as the following Singular calculation shows:ring R=0,(x0,x1,x2,x3),dp;

ideal I=x2^2-x1*x3, x1*x2-x0*x3, x1^2-x2*x0;

def L=res(I,0);

Page 187: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 177

1 3 2

R <-- R <-- R

0 1 2

print(betti(L),"betti");

0 1 2

0: 1 - -

1: - 3 2

total: 1 3 2

In general, for a graded free resolution

0→ Fl → Fl−1 → ...→ F1 → F0 →M → 0

the column i of this so called Betti table corresponds to the freemodule Fi. The rank of Fi is given in the last row ”total”. At rowposition j and column position i the number of free generators ofFi of degree j + i is indicated.

The shift by i has the benefit of leading to a more compact table,since, homogeneous maps given by linear polynomials have sourceand target in the same row (as we will see, we can assume that themaps φi are given by matrices with entries of degree at least 1).

See also Exercise 5.1.

Example 5.5.10 From the resolution we obtain for t ≥ 0 = 3 − 3

HR/I(t) = (t + 0 + 3

3) − 3(

t − 2 + 3

3) + 2(

t − 3 + 3

3)

=1

3!((t + 3)(t + 2)(t + 1) − 3(t + 1)t(t − 1) + 2t(t − 1)(t − 2))

= 3t + 1

so in the alternating sum the t3 and t2 terms cancel, and we obtaina polynomial of degree 1. Hence,

dim(C) = 1 deg(C) = 3 pa(C) = 0.

This makes sense, since C is a curve

For an example of higher dimension, see Exercise 5.1.

5.6 Geometric and Algebraic Notions

of Dimension

We give three equivalent interpretations of the dimension of alge-braic varieties, one in term of integral ring extensions (which also

Page 188: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 178

yields a way to compute the dimension via Grobner bases), one interms of field extensions, and one geometric one in terms of chainsof subvarieties of increasing dimension (which will be formulated interms of chains of prime ideals).

We first consider an affine algebraic set X = V (I) with coordi-nate ring K[X] =K[x1, . . . , xn]/I over an algebraically closed fieldK =K. Then, in the projective setting, we will connect our notionsof dimension with the dimension defined in Section 5.3.

Definition 5.6.1 An integral ring extension

K[y1, . . . , yd] ⊂K[X]

with y1, . . . , yd ∈K[X] algebraically independent over K is called aNoether normalization for K[X].

For existence we use that after a suitable a linear change a non-constant polynomial becomes monic:

Remark 5.6.2 If f ∈ K[x1, . . . , xn], f ∉ K and deg(f) = d, thenthere are ci ∈K such that

f(x1, x2 + c2x1, . . . , xn + cnx1) = λ ⋅ xd1 + . . .

with 0 ≠ λ ∈K.

Proof. Easy exercise using that ∣K ∣ =∞ and

f(x1, x2 + c2x1, . . . , xn + cnx1) = f(1, c2, . . . , cn) ⋅ xd1 + . . .

with d = deg f .Note that the ci with f(1, c2, . . . , cn) = 0 form a Zariski closed

subset, hence usually a random choice of ci will do. Note how-ever also, that over a finite field we may even require a non-linearcoordinate change. Using the remark inductively we obtain:

Remark 5.6.3 Suppose that 1 ∉ I. After a linear change of coor-dinates, we can assume that for the elimination ideals

Im = I ∩K[xm+1, . . . , xn]

we have for some c, that

I ⫌ I1 ⫌ . . . ⫌ Ic = . . . = In = ⟨0⟩

and each Im ≠ ⟨0⟩ for m ≥ 0 contains a monic polynomial in xm+1.Note that this condition can be verified by computing all eliminationideals via a lexicographic Grobner basis of I.

Page 189: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 179

Note that, just like in the previous remark, the coordinate changessuch that this condition is satisfied form a Zariski open subset.Hence, a random coordinate change will usually do.

Theorem 5.6.4 A Noether normalization for K[K] exists.

Proof. Choosing the coordinate system as in Remark 5.6.3, weobtain that

K[xc+1, . . . , xn] ⊂K[xc, . . . , xn]/Ic−1 ⊂ . . . ⊂K[x2, . . . , xn]/I1 ⊂K[X]

is a sequence of integral ring extensions and xc+1, . . . , xn are al-gbraically independent.

Note that the corresponding geometric projection map X → AdK

is then surjective and finite (that is, any point in AdK has finitely

many preimages).

Theorem 5.6.5 If I is a prime ideal and

K[y1, . . . , yd] ⊂K[X] =K[x1, . . . , xn]/I

is a Noether normalization, then for the rational function fieldK(X) of X we have

d = trdegKK(X),

hence d is independent of the choice of the Noether normalization,and we call dim(X) ∶= d the dimension of X. The number

c = n − d

as in Remark 5.6.3 we calls the codimension of X.

Proof. The extension K(y1 . . . , yd) ⊂K(X) is algebraic, hence

d = trdegKK(y1, . . . , yd) = trdegKK(X).

Example 5.6.6 For X = V (I), I = ⟨y3 + y2 − x2⟩ the node,

K[x] ⊂K[x, y]/I =K[X]

is a Noether normalization,

K(X) =K(x)[y]/ ⟨y3 + y2 − x2⟩ ,

anddimX = trdegK(K(X)) = trdegKK(x) = 1.

Page 190: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 180

We finish by a characterization of dimension in terms of chainsprime ideals in K[X]:

Definition 5.6.7 Let R be a ring. The Krull dimension dimRof R is

dimR = sup{d ∣ p0 ⫋ . . . ⫋ pd ⫋ R with pi prime ideal} .

Using the lying over and the going up theorem it is an easyexercise to prove:

Lemma 5.6.8 If R ⊂ S is an integral ring extension, then dimR =dimS.

As one would guess one has:

Theorem 5.6.9 dimK[x1, . . . , xn] = n.

We cannot prove this here, but note that ≥ is clear since we havein K[x1, . . . , xn] the chain of prime ideals

⟨0⟩ ⫋ ⟨x1⟩ ⫋ ⟨x1, x2⟩ ⫋ . . . ⫋ ⟨x1, . . . , xn⟩ .

Corollar 5.6.10 For K[X] =K[x1, . . . , xn]/I as above we have

dimK[X] = trdegKK(X).

Proof. Let K[y1, . . . , yd] ⊂ K[X] be a Noether normalization.Then

dimK[X] = dimK[y1, . . . , yd] = d = trdegKK(X).

where the respective equalities follow from Lemma 5.6.8, Theorem5.6.9 and Theorem 5.6.5.

Theorem 5.6.11 The dimension of the projective algebraic set X ⊂PnK is the maximum of the dimensions of the affine algebraic setsX ∩ {xi ≠ 0} ⊂ An

K in the standard affine charts

dim(X) = max{dim(X ∩ {xi ≠ 0}) ∣ i} .

Moreover for the homogeneous coordinate ring and the affine coneof X we have

dim(X) = dimC(X) − 1 = dimK[X] − 1.

Page 191: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 181

We give a sketch of the proof:Proof. If K[y0, . . . , yd] ⊂ K[X] is a Noether normalization asconstructed above then one first shows that

dim(X ∩ {xi ≠ 0}) = d.

Since K[X] is generated by finitely many integral elements overK[y0, . . . , yd], it is a finitely generatedK[y0, . . . , yd]-module. Hence,by Theorem 5.3.5, the Hilbert polynomial of K[X] has degree

deg(PK[X]) ≤ d.

Since K[y0, . . . , yd] ⊂K[X] is a subring, we have

HK[X](i) ≥ (i + d

i)

for all i ≥ 0, hence deg(PK[X]) = d.The second statement follows since K[X] is the coodinate ring

of C(X), hence dimC(X) = dimK[X] = d + 1.

5.7 Monomial orderings for modules

Let R = K[x1, . . . , xn]. For the moment we do not consider anygrading on R. To compute free resolution we have to extend theBuchberger algorithm from ideals of R to the setup of submodulesof the free module Rt.

First of all, what are the monomials? Write ei for the i-thstandard basis vector of Rt. Then, like in the case of polynomials,any element of Rt can be written as a sum of terms of the formcαxαei. For example, in K[x, y]2

(2x + y2

x) = 2xe1 + y

2e1 + xe2.

Hence we define:

Definition 5.7.1 An element of the form xαei ∈ Rt we call a mono-mial, and a non-zero constant multiple of a monomial we call aterm.

A monomial ordering on Rt is an ordering > on the set ofmonomials in Rt such that

1) > is a total ordering

Page 192: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 182

2) > respects multiplication, that is,

xαei > xβej ⇒ xαxγei > x

βxγej

for all α,β, γ, i, j.

3) xαei > xβei⇔ xαej > xβej for all α,β, i, j.

Remark 5.7.2 By setting xα > xβ ⇔ xαei > xβei the ordering >uniquely determines a monomial ordering on R, which we againdenote by >.

Definition 5.7.3 A monomial ordering on Rt is called global ifthe induced ordering on R is global.

Remark 5.7.4 The ordering > on Rt is a well ordering if and onlyif the induced ordering > on R is a well ordering.

Proof. The implication ⇒ is trivial. On the other hand, any setof monomials is a union M = M1e1 ∪ ... ∪Mtet where Mi are setsof monomials in R. So if > is a well ordering on R then Mi has asmallest element mi, and there is a smallest element in the finiteset {m1e1, . . . ,mtet}.

Example 5.7.5 Given a monomial ordering > on R there are twocanonical ways of producing a monomial ordering on Rt:

1) Priority to the monomials (>, c):

xαei > xβej ∶⇐⇒ xα > xβ or (xα = xβ and i < j)

2) Priority to the components (c,>):

xαei > xβej ∶⇐⇒ i < j or (i = j and xα > xβ)

Example 5.7.6 In Singular we can give priority to the mono-mials byring R = 0,(x,y),(lp,c);

[1,0]>[0,1];1

[x,0]>[y,0];1

[0,x]>[y,0];1

and priority to the components byring R = 0,(x,y),(c,lp);

[0,x]>[y,0];

Page 193: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 183

0

[x,0]>[y,0];1

If you use C instead of c, then the ordering of the unit basisvectors is reversed.

Definition 5.7.7 With respect to a given monomial ordering > onRt, for any element

v =∑α,i

cαxαei

the leading monomial is the largest monomial xαei with cα ≠ 0and is denoted by L (v). Furthermore, we denote by LC(v) = cα theleading coefficient, and by LT (v) = cαxαei the leading term.

Example 5.7.8 Using (lp, c) on K[x, y]2, for

f = (x

5x2y + xy2 ) = 5x2y ⋅ e2 + x ⋅ e1 + xy2 ⋅ e2

we get

L(f) = x2y ⋅ e2 LC(f) = 5 LT (f) = 5x2y ⋅ e2

In Singular:ring R=0,(x,y),(lp,c);

vector f = [x, 5x2y+xy2];

leadmonom(f);

x2y*gen(2)

leadcoef(f);

5

lead(f);

5x2y*gen(2)

To do one more example, for

f = (y + zx + y

) ∈K[x, y, z]2

with respect to (lp, c) we have

L(f) = x ⋅ e2

and with respect to (c, lp)

L(f) = y ⋅ e1

In Singular:

Page 194: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 184

ring R=0,(x,y,z),(lp,c);

vector f = [y+z, x+y];

leadmonom(f);

x*gen(2)

ring R=0,(x,y,z),(c,lp);

vector f = [y+z, x+y];

leadmonom(f);

[y]

Note, that for (lp, c), Singular writes the elements of Rt in termsof unit basis vectors, and for (c, lp) as lists. Note also, that in thelist notation, trailing zeros are skipped. You can also use both waysto input vectors.

Definition 5.7.9 The monomials of Rt come with a natural partialorder, which we call divisibility

xαei ∣ xβej ⇐⇒ i = j and xα ∣ xβ

Moreover, given two terms c1xαei and c2xβej with xαei ∣ xβejwe define their quotient as

c2xβejc1xαei

=c2xβ

c1xα∈ R.

Definition 5.7.10 A submodule U ⊂ Rt is called monomial, if itis generated by monomials.

Lemma 5.7.11 Every monomial submodule has a unique set ofminimal generators consisting of monomials.

Proof. Let U = ⟨M⟩ ⊂ Rt be generated by the set of monomialsM . By Lemma 4.3.11 the free module Rt is Noetherian, hence Uis finitely generated by f1, . . . , fr ∈ U (see Definition and Theorem4.3.9). Like in the case of ideals, write fi = ∑

uj=1 ri,jmj with mj ∈M .

Then U ⊂ ⟨m1, . . . ,mu⟩ ⊂ ⟨M⟩ = U . Among the mj consider theminimal elements with respect to divisibility.

Note thatxαei ≤ x

βej ⇐⇒ xαei ∣ xβej

gives a partial order on the set of monomials of Rt.

Page 195: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 185

5.8 Division with remainder and Grobner

bases for modules

The basic setup for the theory of Grobner bases of submodules ofRt works just like in the case of ideals (that is, t = 1) as describedin Section 2.5. To convince ourselves that this is indeed the case,let us recall the fundamental steps.

Definition 5.8.1 Given a monomial ordering > and a subset G ⊂Rt, we define the leading module of G as

L(G) = L>(G) = ⟨L(f) ∣ f ∈ G/{0}⟩ ⊂ Rt,

the monomial submodule generated by the leading monomials.

Definition 5.8.2 Given a list G = (g1, . . . , gs) of elements of Rt, anormal form is a map NF(−,G) ∶ Rt → Rt with

1) NF(0,G) = 0.

2) If NF(f,G) ≠ 0 then L(NF(f,G)) ∉ L(G).

3) For all 0 ≠ f ∈ Rt there is a standard expression

f −NF(f,G) = ∑si=1aigi

with ai ∈ R and L(f) ≥ L(aigi) for all i with aigi ≠ 0.

We also say that NF is a normal form, if NF(−,G) is a normalform for all G.

Using Definition 5.7.9, Division with remainder in R (Algorithm2.5.1) generalizes immediately to Algorithm 5.8.1 in Rt. For anyorder of preference of the gi in the division, it gives a normal formin the sense of Definition 5.8.2.

Example 5.8.3 Let R =K[x1, . . . , x5] and consider the monomialordering (lp, c) on R5 obtained from lp by giving priority to themonomials. Let gi ∈ R5 be the i-th column of the matrix

A =

⎛⎜⎜⎜⎜⎜⎜⎝

0 x2 0 0 −x1

−x2 0 x3 0 00 −x3 0 x4 00 0 −x4 0 x5

x1 0 0 −x5 0

⎞⎟⎟⎟⎟⎟⎟⎠

Page 196: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 186

Algorithm 5.8.1 Division with remainder for modules

Input: f ∈ Rt, g1, ..., gs ∈ Rt, > be a global ordering on the mono-mials of Rt.

Output: An expression

f = q + r = ∑ti=1aigi + r

such that L(r) is not divisible by any L(gi).1: q = 02: r = f3: while r ≠ 0 and L(gi) ∣ L(r) for some i do4: Cancel the lead term of r:5: a = LT (r)

LT (gi) ∈ R as given in Definition 5.7.96: q = q + a ⋅ gi7: r = r − a ⋅ gi

and U = im(A) = ⟨g1, . . . , g5⟩ ⊂ R5. We try out Algorithm 5.8.1 todivide some vectors v ∈ R5 by G = (g1, . . . , g5):

v =

⎛⎜⎜⎜⎜⎜⎜⎝

000

−x2x4

x1x3

⎞⎟⎟⎟⎟⎟⎟⎠

= x3

⎛⎜⎜⎜⎜⎜⎜⎝

0−x2

00x1

⎞⎟⎟⎟⎟⎟⎟⎠

+

⎛⎜⎜⎜⎜⎜⎜⎝

0x2x3

0−x2x4

0

⎞⎟⎟⎟⎟⎟⎟⎠

= x3

⎛⎜⎜⎜⎜⎜⎜⎝

0−x2

00x1

⎞⎟⎟⎟⎟⎟⎟⎠

+ x2

⎛⎜⎜⎜⎜⎜⎜⎝

0x3

0−x4

0

⎞⎟⎟⎟⎟⎟⎟⎠

+ 0

which shows that v ∈ U .In the following example the division terminates early:

v =

⎛⎜⎜⎜⎜⎜⎜⎝

000

x1 − x2x4

x1x3

⎞⎟⎟⎟⎟⎟⎟⎠

= x3

⎛⎜⎜⎜⎜⎜⎜⎝

0−x2

00x1

⎞⎟⎟⎟⎟⎟⎟⎠

+

⎛⎜⎜⎜⎜⎜⎜⎝

0x2x3

0x1 − x2x4

0

⎞⎟⎟⎟⎟⎟⎟⎠

This can be fixed by considering reduced division, just like in Al-gorithm 2.5.2, which will put x1e4 into the remainder. Recall, thatfor testing whether a normal form is zero, this is not a problem:If we would put terms into the remainder in intermediate steps,they would never go away again (since in every step the lead term

Page 197: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 187

decreases). So once Algorithm 5.8.1 stops with a non-zero remain-der, we know that also reduced division will not give zero (and viceversa).

Finally, for

v =

⎛⎜⎜⎜⎜⎜⎜⎝

00

−x1x3

x2x5

0

⎞⎟⎟⎟⎟⎟⎟⎠

= x1g2 + x2g5

Algorithm 5.8.1 will not do anything, and return v as the remainder,although v ∈ U . The reason is that G is not a Grobner basis. Wewill return to this in the next section.In Singular these calculation can be done as follows:ring R = 0,(x(1..5)),(lp,c);

module M = [0,-x(2),0,0,x(1)],

[x(2),0,-x(3),0,0],

[0,x(3),0,-x(4),0],

[0,0,x(4),0,-x(5)],

[-x(1),0,0,x(5),0];

reduce([0,0,0,-x(2)*x(4),x(1)*x(3)],M,1);

0

reduce([0,0,0,x(1)-x(2)*x(4),x(1)*x(3)],M,1);

x(1)*gen(4)+x(2)*x(3)*gen(2)-x(2)*x(4)*gen(4)

reduce([0,0,-x(1)*x(3),x(2)*x(5),0],M,1);

-x(1)*x(3)*gen(3)+x(2)*x(5)*gen(4)

Provided we divide by a Grobner basis, division with remaindersolves the submodule membership problem:

Definition 5.8.4 Let U ⊂ Rt be a submodule and > a global mono-mal ordering on Rt. A finite set 0 ∉ G ⊂ U is called Grobner basisof U with respect to >, if

L(G) = L(U).

Theorem 2.5.10, Lemma 2.5.11 and Corollary 2.5.12 generalizeimmediately to the submodule setup:

Theorem 5.8.5 (Submodule membership) Let U ⊂ Rt be a sub-module and f ∈ Rt. If G = (g1, . . . , gs) is a Grobner basis of U andNF is a normal form, then

f ∈ U ⇐⇒ NF(f,G) = 0.

Page 198: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 188

Proof. Write f = ∑i aigi + r with r = NF(f,G). If r = 0 thenf ∈ ⟨G⟩ ⊂ U . On the other hand, if r ≠ 0 then by Definition 5.8.2(2.)

L(r) ∉ L(G) = L(U).

So, r ∉ U , hence f = ∑i aigi + r ∉ U .

Lemma 5.8.6 If V ⊂ U ⊂ Rt are submodules with L(V ) = L(U)then U = V .

Proof. Let G = (g1, . . . , gs) be a Grobner basis of V , NF a normalform, f ∈ U and f = ∑i aigi + r with r = NF(f,G). So r ∈ U . Ifr ≠ 0, then by Definition 5.8.2 (2.)

L(r) ∉ L(G) = L(V ) = L(U).

Hence r ∉ U , a contradiction.

Corollar 5.8.7 If G is a Grobner basis of the submodule U ⊂ Rt,then

U = ⟨G⟩ .

Proof. We have L(U) = L(G) ⊂ L(⟨G⟩) ⊂ L(U), so G is a Grobnerbasis of ⟨G⟩ ⊂ U and L(⟨G⟩) = L(U). Equality follows from Lemma5.8.6.

Remark 5.8.8 To have a uniquely determined remainder, we pro-ceed as follows: A vector f ∈ Rt is called reduced with respect to aset G ⊂ Rt, if no term of f is contained in L(G). A normal form iscalled reduced normal form, if NF(f,G) is reduced with respectto G for all f and G.

Arguing in the same way as in proof of Theorem 2.5.18 showsthat, for a reduced normal form, the remainder is unique.

Also Algorithm 2.5.2 immediately generalizes to the module case,yielding a reduced normal form. Recall that for reduced division withremainder we do not stop if the lead monomial is not divisible bysome lead monomial of G, but instead put the lead term into theremainder and continue.

Example 5.8.9 Using reduced division with remainder, we can

Page 199: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 189

continue the second calculation in Example 5.8.3:

v =

⎛⎜⎜⎜⎜⎜⎜⎝

000

x1 − x2x4

x1x3

⎞⎟⎟⎟⎟⎟⎟⎠

= x3

⎛⎜⎜⎜⎜⎜⎜⎝

0−x2

00x1

⎞⎟⎟⎟⎟⎟⎟⎠

+

⎛⎜⎜⎜⎜⎜⎜⎝

0x2x3

0x1 − x2x4

0

⎞⎟⎟⎟⎟⎟⎟⎠

= x3

⎛⎜⎜⎜⎜⎜⎜⎝

0−x2

00x1

⎞⎟⎟⎟⎟⎟⎟⎠

+

⎛⎜⎜⎜⎜⎜⎜⎝

000x1

0

⎞⎟⎟⎟⎟⎟⎟⎠

+ x2

⎛⎜⎜⎜⎜⎜⎜⎝

0x3

0−x4

0

⎞⎟⎟⎟⎟⎟⎟⎠

In Singular:ring R = 0,(x(1..5)),(lp,c);

module M = [0,-x(2),0,0,x(1)],

[x(2),0,-x(3),0,0],

[0,x(3),0,-x(4),0],

[0,0,x(4),0,-x(5)],

[-x(1),0,0,x(5),0];

reduce([0,0,0,x(1)-x(2)*x(4),x(1)*x(3)],M);

x(1)*gen(4)

5.9 Computing Grobner bases of sub-

modules

Fix a global monomial ordering > on Rt. We follow the same strat-egy as in Section 2.6 by cancelling lead terms via S-polynomials.Clearly, lead terms can only cancel if they occur in the same com-ponent of the vectors. Hence, we define:

Definition 5.9.1 The least common multiple of two monomi-als xαei and xβej in Rt is

lcm(xαei, xβej) = {

lcm(xα, xβ) ⋅ ei if i = j0 if i ≠ j

Definition 5.9.2 The syzygy polynomial or S-polynomial of f, g ∈Rt is defined as the vector

spoly(f, g) =lcm(L(f), L(g))

LT (f)f −

lcm(L(f), L(g))

LT (g)g ∈ Rt.

Page 200: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 190

In particular, writing L(f) = xαei and L(g) = xβej, if i ≠ j thenspoly(f, g) = 0. On the other hand, if i = j then, according toDefinition 5.7.9, we have a well defined quotient

lcm(L(f), L(g))

LT (f)∈ R.

Using this notation, Buchberger’s algorithm for ideals carriesover directly to Algorithm 5.9.1. Clearly we have to consider in thealgorithm only pairs of elements f ≠ g which have the lead term inthe same component.

Algorithm 5.9.1 Buchberger

Input: U = ⟨g1, ..., gs⟩ ⊂ Rt a submodule, > a global monomialordering, and NF a normal form.

Output: A Grobner basis of U with respect to >.1: G = {g1, ..., gs}2: repeat3: H = G4: for all f, g ∈H do5: r = NF(spoly(f, g),H)6: if r ≠ 0 then7: G = G ∪ {r}8: until G =H

Proof. If r ≠ 0 then L(r) ∉ L(H) by Definition 5.8.2(2.), hence

L(H) ⫋ L(H ∪ {r}).

Since Rt is Noetherian (Lemma 4.3.11), the algorithm terminatesby the chain condition (Definition and Theorem 4.3.9). To showthat the final result is a Grobner basis, we will prove Buchberger’scriterion in the next Section 5.10.

Example 5.9.3 Continuing Example 5.8.3, we use Buchberger’salgorithm to compute a Grobner basis of U ⊂ R5 with respect to(lp, c). In each step the first column denotes the coefficients in thesyzygy polynomial and the second the division with remainder.

↱ −x1x3e3 + x2x5e4 ↱ −x1x3x5e5 + x2x4x5e4

g1 = x1e5 − x2e2 x3x5

g2 = x2e1 − x3e3 x1

g3 = x3e2 − x4e4 x2x5

g4 = x4e3 − x5e5 x1x3

g5 = −x1e1 + x5e4 x2

g6 = x1x3e3 − x2x5e4 1 −x4

Page 201: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 191

For the first calculation, recall that already in Example 5.8.3 weobserved that NF(g6, (g1, . . . , g5)) = g6 ≠ 0. The second calculationstep by step:

spoly(g4, g6) = −x1x3x5e5 + x2x4x5e4

= x3x5 ⋅ g1 + (−x2x3x5e2 + x2x4x5e4)

= x3x5 ⋅ g1 + x2x5 ⋅ g3 + 0

Since there are no further non-zero S-polynomials, this provesthat (g1, . . . , g6) is a Grobner basis.

Dividing by (g1, . . . , g6), the submodule membership test for g6

now obviously works as expected: NF(g6, (g1, . . . , g6)) = 0.The Grobner basis calculation in Singular:

ring R = 0,(x(1..5)),(lp,c);

module M = [0,-x(2),0,0,x(1)],

[x(2),0,-x(3),0,0],

[0,x(3),0,-x(4),0],

[0,0,x(4),0,-x(5)],

[-x(1),0,0,x(5),0];

std(M);

[1]=x(4)*gen(3)-x(5)*gen(5)

[2]=x(3)*gen(2)-x(4)*gen(4)

[3]=x(2)*gen(1)-x(3)*gen(3)

[4]=x(1)*gen(5)-x(2)*gen(2)

[5]=x(1)*gen(1)-x(5)*gen(4)

[6]=x(1)*x(3)*gen(3)-x(2)*x(5)*gen(4)

print(std(M));0, 0, x(2), 0, x(1), 0,

0, x(3), 0, -x(2), 0, 0,

x(4), 0, -x(3), 0, 0, x(1)*x(3),

0, -x(4), 0, 0, -x(5), -x(2)*x(5),

-x(5), 0, 0, x(1), 0, 0

Remark 5.9.4 Using the notion of divisibility as introduced inDefinition 5.7.9, the definitions of minimal and reduced Grobnerbases carry over from the ideal case immediately.

Given a Grobner basis G = (g1, . . . , gs), by Lemma 5.7.11, the gicorresponding to the (with respect to divisibility) minimal elementsof {L(gi) ∣ i} form a minimal Grobner basis.

Just like in the ideal case (Theorem 2.6.8 and Remark 2.6.9) wecan obtain the unique reduced Grobner basis.

Page 202: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 192

5.10 Buchberger’s criterion and compu-

tation of syzygy modules

We now prove Buchberger’s criterion for Grobner bases of submod-ules U ⊂ Rt.

As we have already observed in the ideal case (Theorem 2.6.2),the strategy for the proof is closely related to syzygies. Indeed, theBuchberger test produces a Grobner basis of the module of syzy-gies with respect to an appropriately chosen ordering. By iteratingthis, we will obtain an algorithm to compute free resolutions. Thisalgorithm is, by far, the fastest way of computing free resolutions.It is implemented in Singular in the command sres.

Definition 5.10.1 For a matrix G ∈ Rt×s we define the syzygymodule of G as the kernel

Syz(G) = ker(G) ⊂ Rs,

and the elements are called syzygies of G.Any matrix SG ∈ Rs×g with

im(SG) = Syz(G),

that is, with generators of Syz(G) in its columns, we call a syzygymatrix of G.

We use the notation also for a list G = (g1, . . . , gs) of elementsof Rt, then defining the syzygy module of G as Syz(G) = Syz(MG)for the matrix

MG = (g1 ∣ ... ∣ gs) ∶ Rs → Rt

ei ↦ gi

To summarize, the image of MG

im(MG) = ⟨g1, . . . , gs⟩ ⊂ Rt

is the submodule of Rt generated by the gi, and

im(SG) = ker(g1 ∣ ... ∣ gs) ⊂ Rs

is the module of relations between the gi.Note also that, by iteratively computing syzygy matrices, we

can compute free resolutions. We will do this in more detail in thenext section.

See also Exercise 5.10 for an application of the syzygy matrixfor computing intersections of ideals.

Page 203: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 193

Remark 5.10.2 Any syzygy v = ∑si=1 viei ∈ Syz(G) ⊂ Rs corre-

sponds to a relations

∑i=1

vigi = 0.

Given a global monomial ordering >, every successful Buchbergertest

NF(spoly(gi, gj),G) = 0

gives an expression

lcm(L(gi),L(gj))LT (gi)

´¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¶m

⋅ gi −lcm(L(gi),L(gj))

LT (gj)´¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¶

w

⋅ gj − ∑sk=1 akgk = 0

and, hence, a syzygy

s(gi, gj) ∶= m ⋅ ei −w ⋅ ej −∑sk=1 akek

∈ Syz(G) ⊂ Rs

For a Grobner basis G = (g1, . . . , gs) we will even prove: Withrespect to the following ordering, the s(gi, gj) form a Grobner basisof Syz(G).

Definition 5.10.3 Let G = (g1, . . . , gs) be a list of elements gi ∈ Rt

and > a monomial ordering on Rt. A monomial ordering >G on Rs

is defined by

xαei >G xβej ∶⇐⇒ L(xαgi) > L(x

βgj) or (L(xαgi) = L(xβgj) and i < j)

It is called the Schreyer ordering induced by > and G.

The key property is, that we have control over the lead mono-mials of the syzygies:

Lemma 5.10.4 If i < j then

L(s(gi, gj)) =lcm(L(gi), L(gj))

L(gi)ei

where the left hand side is with respect to >G and the right handside with respect to >.

Proof. Since in an S-polynomial the lead terms cancel we have(using the notation of Remark 5.10.2)

L(m ⋅ gi) = L(w ⋅ gj).

Page 204: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 194

If m = w = 0 then ak = 0 for all k, hence s(gi, gj) = 0, so the claim istrivial. Otherwise, by i < j, we have

m ⋅ ei >G w ⋅ ej.

Moreover, since NF is a normal form, for all k with ak ≠ 0 we have

L(akgk) ≤ L(spoly(gi, gj)) < L(m ⋅ gi),

hence alsom ⋅ ei >G L(akek).

Using both observations, the claim follows.

Remark 5.10.5 If > is global, then also >G is global (Exercise).

Example 5.10.6 We return to the resolution of the projective twistedcubic as discussed in Example 5.5.9. So let C = V (I) ⊂ P3(K),where I is generated by the Grobner basis

G = (x22 − x1x3, x1x2 − x0x3, x

21 − x0x2)

with respect to dp. For

A =⎛⎜⎝

x1 −x0

−x2 x1

x3 −x2

⎞⎟⎠

we have MG ⋅ A = 0 hence im(A) ⊂ syz(G). We verify that thecolumns of A form a Grobner basis of im(A) with respect to >G.Observe that with respect to dp

x1 ⋅ x22 = x2 ⋅ x1x2 > x3 ⋅ x

21

x0 ⋅ x22 < x1 ⋅ x1x2 = x2 ⋅ x

21,

hence the lead terms of the columns of A with respect to >G are

A =⎛⎜⎝

x1 −x0

−x2 x1

x3 −x2

⎞⎟⎠

This tells us that there is no non-zero syzygy between the columns,so, assuming that Algorithm 5.9.1 is correct, they form a Grobnerbasis of im(A).

For the moment we do not know whether the columns of A gen-erate syz(G). This question will be solved as a by-product of theproof of Buchberger’s test:

Page 205: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 195

Theorem 5.10.7 (Buchberger test) Let > be a global monomialordering on Rt and NF a normal form. Let U = ⟨g1, . . . , gs⟩ ⊂ Rt

with non-zero gi be a submodule. If

NF(spoly(gi, gj),G) = 0

for all i < j, then

1) G = (g1, . . . , gs) is a Grobner basis of U with respect to >, and

2) the non-zero syzygies s(gi, gj) for i < j form a Grobner basisG′ of Syz(G) with respect to >G, in particular, by Corollary5.8.7,

Syz(G) = ⟨G′⟩ .

Note that this finishes the proof of correctness of Algorithm5.9.1. Before proving the theorem, we apply it to Example 5.10.6:

Example 5.10.8 We do the Buchberger test for

G = (x22 − x1x3, x1x2 − x0x3, x

21 − x0x2)

and the monomial ordering dp:

↱ −x21x3 + x0x2x3 ↱ x0x

22 − x0x1x3 ↱ x0x

32 − x3

1x3

x22 − x1x3 x1 −x0 x2

1 −x0x2

x1x2 − x0x3 −x2 x1

x21 − x0x2 x3 −x2 −x2

2 x1x3

By Theorem 5.10.7, this shows that G is a Grobner basis of I = ⟨G⟩with respect to dp. Moreover, it proves that

G′ =⎛⎜⎝

⎛⎜⎝

x1

−x2

x3

⎞⎟⎠,⎛⎜⎝

−x0

x1

−x2

⎞⎟⎠,⎛⎜⎝

x21 − x0x2

0−x2

2 + x1x3

⎞⎟⎠

⎞⎟⎠

is a Grobner basis of the syzygy module Syz(G) with respect to>G. The last vector can be deleted since its lead monomial x2

1e1 isdivisible by the lead monomial x1e1 of the first vector, hence

G′ =⎛⎜⎝

⎛⎜⎝

x1

−x2

x3

⎞⎟⎠,⎛⎜⎝

−x0

x1

−x2

⎞⎟⎠

⎞⎟⎠

is a minimal Grobner basis of Syz(G). Indeed, it is the reducedGrobner basis.

Page 206: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 196

In particular,ker(MG) = im(MG′)

with

MG′ =⎛⎜⎝

x1 −x0

−x2 x1

x3 −x2

⎞⎟⎠

.

We can continue now one step further by considering syzygiesof syzygies, that is, we do the Buchberger test for G′. As alreadyobserved in Example 5.10.6, there is no non-trivial syzygy betweenthe vectors in G′, that is, ker(MG′) = 0. Hence,

0→ R2 MG′

→ R3 MG→ R1 → R/I → 0

is a free resolution.Since we begin with a homogeneous homomorphism MG, also the

syzygy matrix MG′ as produced by the theorem, is a homogeneoushomomorphism (we will prove that later in general). So, takingthe grading into account, we have proven that the projective twistedcubic has the graded free resolution

0→ R2(−3)MG′

→ R3(−2)MG→ R1 → R/I → 0

with Betti table0 1 2

0 ∶ 1 − −1 ∶ − 3 2total ∶ 1 3 2

Proof. Fix an arbitrary element

f = ∑si=1aigi ∈ U .

Theng = ∑

si=1aiei ∈ R

s

is a preimage of f under MG, that is,

MG(g) = f .

Using >G and a reduced normal form NF′ on Rs we get anexpression

g = ∑i,jgi,j ⋅ s(gi, gj) +NF′(g,G′)´¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¶∑sk=1rkek

Page 207: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 197

with gi,j ∈ R. Then for all k with rk ≠ 0, it holds

L(rkek) ∉ ⟨L(s(gi, gj)) ∣ i, j with s(gi, gj) ≠ 0⟩ .

By Lemma 5.10.4, for k < j

L(s(gk, gj)) =lcm(L(gk), L(gj))

L(gk)ek,

solcm(L(gk), L(gj))

L(gk)does not divide L(rk) (5.1)

for all k < j with s(gk, gj) ≠ 0.By

g −NF′(g,G′) ∈ ⟨G′⟩ ⊂ Syz(G) = ker(MG)

we getf =MG(NF′(g,G′)) = ∑

sk=1rkgk.

We show that in the sum there cannot be any cancellation oflead terms of summands: If for k < j with rk, rj ≠ 0 it holds

L(rkgk) = L(rjgj),

then L(rkgk) = L(rk)L(gk) ∈ Rt is divisible by L(gk) and L(gj),hence also by lcm(L(gk), L(gj)). So

lcm(L(gk), L(gj))

L(gk)divides L(rk),

a contradiction to Equation 5.1 (since s(gk, gj) ≠ 0 by assumptionL(rkgk) = L(rjgj)). We now apply the no-cancellation statementin two ways:

• In the case f ≠ 0 it proves that L(f) = L(rkgk) for some k,and hence L(f) ∈ L(G). So L(U) = L(G), which is the firstclaim.

• If we take f = 0 then g is an arbitrary syzygy. In the case f = 0the argument shows that rk = 0 for all k. Hence NF′(g,G′) = 0for all g ∈ Syz(G). This implies the second claim by thefollowing standard Lemma 5.10.9 applied to G′.

Lemma 5.10.9 Let > be a global monomial ordering on Rt, NF anormal form, U ⊂ Rt a submodule, and G = (g1, . . . , gs) a list ofnon-zero elements of U . Then it is equivalent:

Page 208: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 198

1) G is a Grobner basis of U .

2) NF(f,G) = 0 for all f ∈ U .

Proof. The implication (1) ⇒ (2) follows from Theorem 5.8.5,since for a Grobner basis G we get NF(f,G) = 0 for all f ∈ U .

On the other hand let f ∈ U . By NF(f,G) = 0 and Definition5.8.2(3.) we obtain a standard expression

f = ∑si=1aigi

with L(f) ≥ L(aigi) for all i. Hence, there has to be an i withL(f) = L(aigi), which implies L(gi) ∣ L(f).

This proves that L(U) = L(G).

Remark 5.10.10 By Theorem 5.10.7 the conditions in the lemmaare equivalent to

3) U = ⟨G⟩ and NF(spoly(gi, gj),G) = 0 for all i < j.

See Theorem 2.6.2 in the ideal case.

Remark 5.10.11 (Chain condition) Clearly it is sufficient toconsider in Theorem 5.10.7 a subset of G′ which has the same leadideal.

Suppose L(gi), L(gj) and L(gl) are in the same component andi < j < l. Then s(gi, gj), s(gi, gl), s(gj, gl) ∈ G′. If

L(gj) ∣ lcm(L(gi), L(gl))

then lcm(L(gi), L(gj)) ∣ lcm(L(gi), L(gl)). Hence

L(s(gi, gj)) ∣ L(s(gi, gl)),

that is, s(gi, gl) can be deleted from G′.

Example 5.10.12 In Example 5.10.8 for

G = (x22 − x1x3, x1x2 − x0x3, x

21 − x0x2)

we havex1x2 ∣ x2

1x22,

so only s(g1, g2) and s(g2, g3) are needed in G′ (as already observedabove).

Page 209: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 199

5.11 Computing free resolutions

By iterating Theorem 5.10.7 we can compute free resolutions. How-ever, we have to show that the process of computing syzygies ofsyzygies terminates. For this we show the Syzygy Theorem 5.2.4by proving:

Theorem 5.11.1 Let R = K[x1, . . . , xn]. Every finitely generatedR-module M has a finite free resolution

0→ Rtlφl→ Rtl−1

φl−1→ ...

φ1→ Rt0 →M → 0

such that, if we denote the j-th column of φi by gi,j, it holds

L(gi,j) ∈K[xi, . . . , xn]ti−1

for all j. The length of the resolution l ≤ n.

To prove the theorem, we develop an algorithm computing thedesired resolution. First note that by Theorem 4.3.12, any finitelygenerated R-module is finitely presented.

Algorithm 5.11.1 Free resolution

Input: An R-module M with a finite presentation

Rt′1φ′1→ Rt0 →M → 0

and a monomial ordering > on Rt0 .Output: A finite free resolution of M as in Theorem 5.11.1.1: Put a Grobner basis of im(φ′1) with respect to > into the

columns of the matrix φ1 (apply Algorithm 5.9.1).2: a = 13: while φa ≠ 0 do4: Applying Remark 5.9.4, replace φa by a matrix

φa ∶ Rta → Rta−1

with a minimal Grobner basis in its columns.5: Sort the columns of φa = (ga,1 ∣ ... ∣ ga,ta) such that the L(ga,i)

involving the same unit vector are in descending order withrespect to lp.

6: Compute a syzygy matrix φa+1 ∶ Rta+1 → Rta withim(φa+1) = ker(φa) such that the columns of φa+1 form aGrobner basis of im(φa+1) with respect to >φa (apply Theo-rem 5.10.7).

7: a = a + 1

Page 210: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 200

Proof. First observe: If the L(ga,i) involve only xv, . . . , xn thenthe L(s(ga,i, ga,j)) with respect to >φa involve only xv+1, . . . , xn.

Proof: Suppose i < j, and

L(ga,i) = xαvv ⋅ ... ⋅ xαnn ⋅ eq

L(ga,j) = xβvv ⋅ ... ⋅ xβnn ⋅ eq.

By Lemma 5.10.4

L(s(ga,i, ga,j)) = (∏nl=vx

max{αl,βl}−αll ) ⋅ ei.

If the leftmost nonzero entry of α − β is positive (lexicographicordering), then αv ≥ βv, hence

max{αv, βv} − αv = 0,

which proves the claim.Applying this observation inductively, there is some a ≤ n such

that L(s(ga,i, ga,j)) does not involve x1, . . . , xn for all s(ga,i, ga,j) ≠ 0.Suppose that there is some s(ga,i, ga,j) ≠ 0. Then, in the above

notation, max{αl, βl} − αl for all i, hence

αi ≥ βi for all i,

which implies thatL(ga,j) ∣ L(ga,i).

This contradicts the assumption that the Grobner basis (ga,1, . . . , ga,ta)was chosen to be minimal, hence φa+1 must be zero.

Remark 5.11.2 Let U ⊂ Rt be a graded R-module and g1, . . . , gs ∈U homogeneous of degree deg(ga) = da. Since monomials can onlycancel if they have the same degree, also all monomials in the ex-pression

lcm(L(gi),L(gj))LT (gi) ⋅ gi −

lcm(L(gi),L(gj))LT (gj) ⋅ gj − ∑

sk=1 akgk = 0

have the same degree di,j = deg(lcm(L(gi),L(gj))

LT (gi) ⋅ gi). If we now definea grading on Rs by

deg(ea) = da

also s(gi, gj) is homogeneous of degree di,j. If we put the s(gi, gj)into the columns of φ, we obtain a graded homomorphism

φ ∶⊕i,jR(−di,j)→⊕aR(−da).

Together with Theorem 5.11.1, this proves the graded Syzygy Theo-rem 5.4.7.

Page 211: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 201

Example 5.11.3 Let R =K[x0, . . . , x6]. We compute a graded freeresolution of R/I for the ideal I generated by the entries of

φ1 = (x1x2x5, x1x2x6, x3x4x6, x3x4x7, x5x7) .

This is a graded map

φ1 ∶ R(−3)4 ⊕R(−2)1 → R1.

The generators are already sorted by lexicographically. Using dp,the Buchberger test gives:

↱ 0 ↱ 0 ↱ 0 ↱ 0 ↱ 0 ↱ 03 x1x2x5 −x6 −x7

3 x1x2x6 x5 −x3x4 −x5x7

3 x3x4x6 −x7 x1x2

3 x3x4x7 x6 −x5

2 x5x7 x3x4 x1x2 x1x2x6

deg 4 4 4 4 5 5

In the table, we also indicate (in blue) the degrees of the generatorsand the syzygies, according to Remark 5.11.2.

Note, that the remaining syzygies

↱ 0 ↱ 0 ↱ 0 ↱ 0x1x2x5 −x3x4x6 −x3x4x7

x1x2x6 −x3x4x7

x3x4x6 x1x2x5 −x7

x3x4x7 x1x2x5 x1x2x6

x5x7 x3x4

can be skipped, since they do not give any new lead terms. Hence

φ2 =

⎛⎜⎜⎜⎜⎜⎜⎝

−x6 0 0 −x7 0 0x5 0 0 0 −x3x4 −x5x7

0 −x7 0 0 x1x2 00 x6 −x5 0 0 00 0 x3x4 x1x2 0 x1x2x6

⎞⎟⎟⎟⎟⎟⎟⎠

Observe that the lead terms of the syzygies do not involve x1.As a graded map

φ2 ∶ R(−4)4 ⊕R(−5)2 → R(−3)4 ⊕R(−2)1.

We now proceed with the next step: The syzygies g2,i are alreadysorted lexicographically by the lead monomials.

↱ −g2,6 ↱ −x1x2x5x7e3 + x1x2x3x4x6e54 g2,1 = −x6e1 + x5e2 x7

4 g2,2 = −x7e3 + x5e4 −x1x2x5

4 g2,3 = −x5e4 + x3x4e5 −x1x2x6

4 g2,4 = −x7e1 + x1x2e5 −x6

5 g2,5 = −x3x4e2 + x1x2e3 −x5x7

5 g2,6 = −x5x7e2 + x1x2x6e5 1 x3x4

deg 5 7

Page 212: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 202

The division with remainder for the second syzygy in detail:

−x1 x2x5x7e3 + x1x2x3x4x6e5

= x1x2x5(−x7e3 + x6e4) −x1x2x5x6e4 + x1x2x3x4x6e5

= x1x2x5(−x7e3 + x6e4) + x1x2x6(−x5e4 + x3x4e5)

Hence

φ3 =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

x7 00 −x1x2x5

0 −x1x2x6

−x6 00 −x5x7

1 x3x4

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

As a graded homomorphism,

φ3 ∶ R(−7)1 ⊕R(−5)1 → R(−4)4 ⊕R(−5)2.

Since there are no syzygies between the columns of φ3, we havefound a free resolution

0→ R2 φ3→ R6 φ2

→ R5 φ1→ R1 → R/I → 0.

which is graded as

0→ R(−7)1⊕R(−5)1 φ3→ R(−4)4⊕R(−5)2 φ2

→ R(−3)4⊕R(−2)1 φ1→ R1 → R/I → 0.

Written as a Betti diagram

0 1 2 30 ∶ 11 ∶ 12 ∶ 4 4 13 ∶ 24 ∶ 1total ∶ 1 5 6 2

In Singular we can compute the resolution as follows:ring R = 0,(x(1..7)),dp;

ideal I = x(5)*x(7), x(3)*x(4)*x(7),

x(3)*x(4)*x(6), x(1)*x(2)*x(6), x(1)*x(2)*x(5);

resolution r = sres(I,0);1 5 6 2

R <-- R <-- R <-- R

0 1 2 3resolution not minimized yet

Page 213: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 203

The last output refers to the fact that we can simplify the resolutionat the expense of loosing the Grobner basis property for the columnsof the φi. Essentially, the constant entry of φ3 allows us to removethe last column of φ2.r = minres(list(r));

1 5 5 1

R <-- R <-- R <-- R

0 1 2 3print(betti(r),"betti");

0 1 2 2

0: 1 - - -

1: - 1 - -

2: - 4 4 -

3: - - 1 -

1: - - - 1

total: 1 5 5 1In Exercise 5.1 we have already derived the numerical invariantsof X = V (I) ⊂ P6 from this resolution. Note that the Hilbert poly-nomial, by Theorem 5.3.5, is an invariant of R/I, hence does notdepend on the choice of the graded free resolution.

In general we proceed as follows:

Definition 5.11.4 Let R =K[x0, . . . , xn]. A free resolution

0→ Flφl→ Fl−1

φl−1→ ...

φ1→ F0 →M → 0

of a graded R-module M is called minimal if

im(φi) ⊂ ⟨x0, . . . , xn⟩ ⋅ Fi−1

for all i.

This means that all entries of the maps φi are contained in theideal ⟨x0, . . . , xn⟩, that is, they do not have any constant non-zeroentry.

Remark 5.11.5 One can show that the minimal free resolution isunique up to isomorphism. See Exercise 5.8.

We can make a resolution minimal as follows:

Remark 5.11.6 Consider a graded exact sequence

...Ð→ Rti+1φi+1Ð→ Rti

φiÐ→ Rti−1 Ð→ ...

Page 214: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 204

Note that a change of basis

Rti+1φi+1 - Rti

φi - Rti−1

Rti

T

?�-

with graded T ∈ GL(ti,R), results in a graded exact sequence

...Ð→ Rti+1T○φi+1Ð→ Rti

φi○T−1Ð→ Rti−1 Ð→ ...

Suppose φi+1 has a non-zero constant entry at position (a, b). Wecan make all other entries of column b and row a zero by gradedrow and column operations.

Deleting row a and column b in φi+1, and column a in φi, weobtain an exact sequence

...Ð→ Rti+1−1φ′i+1Ð→ Rti−1

φ′iÐ→ Rti−1 Ð→ ...

For more than one non-zero constant entry, first do row and columnreductions to φi+1 such that φi+1 mod ⟨x0, . . . , xn⟩ is of the form

⎛⎜⎜⎜⎝

0 01 0

⋱ 00 1

⎞⎟⎟⎟⎠

Note that R/ ⟨x0, . . . , xn⟩ ≅ K is a field. Then proceed as above.Note that, by graded operations, constant entries stay constant.

In Exercise 5.9 we turn these observations into an explicit algo-rithm.

Example 5.11.7 By row operations we get

T ○ φ3 =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

0 −x3x4x7

0 −x1x2x5

0 −x1x2x6

0 x3x4x6

0 −x5x7

1 x3x4

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

Page 215: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 205

with

T =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

1 −x7

11

1 x6

11

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

T −1 =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

1 x7

11

1 −x6

11

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

Then, necessarily, in

φ2 ○ T−1 =

⎛⎜⎜⎜⎜⎜⎜⎝

−x6 0 0 −x7 0 0x5 0 0 0 −x3x4 00 −x7 0 0 x1x2 00 x6 −x5 0 0 00 0 x3x4 x1x2 0 0

⎞⎟⎟⎟⎟⎟⎟⎠

the last column vanishes. Denoting by φ′2 and φ′3 the submatricesas marked above we obtain the minimal graded free resolution

0→ R(−7)1φ′3→ R(−4)4⊕R(−5)1

φ′2→ R(−3)4⊕R(−2)1 φ1

→ R1 → R/I → 0.

The Betti diagram is obtained from that of the non-minimial res-olution by a diagonal cancellation between a position (i, j) and(i − 1, j + 1):

0 1 2 30 ∶ 11 ∶ 12 ∶ 4 4 13 ∶ 24 ∶ 1total ∶ 1 5 6 2

z→

0 1 2 30 ∶ 11 ∶ 12 ∶ 4 43 ∶ 14 ∶ 1total ∶ 1 5 5 1

Note that any diagonal cancellation does not change the Hilbertpolynomial.

5.12 Exercises

Exercise 5.1 Compute for the projective variety X ⊂ P6, I = I(X) ⊂R = C[x0, . . . , x6] with graded free resolution

0← R/I ← R1 ← R(−2)⊕R(−3)4 ← R(−5)1⊕R(−4)4 ← R(−7)1 ← 0.

1) the Hilbert polynomial PR/I ,

Page 216: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 206

2) dimension dim(X), degree deg(X), and arithmetic genus pa(X),and

3) the Betti table of the resolution.

Exercise 5.2 Let R = K[x0, . . . , xn], let p1, . . . , pd ∈ Pn(K) be dis-tinct points and Ij = I(pj) ⊂ R.

1) Determine the Hilbert polynomial PR/Ij of one point.

2) Show that the sequence

0 → Ii ∩ Ij → Ii ⊕ Ij → Ii + Ij → 0(f, g) ↦ f − g

is exact.

3) Considering I = I(p1)∩ ...∩I(pd), prove by induction that theHilbert polynomial of d distinct points satisfies

PR/I = d.

Hint: Ii + Ij =?

Exercise 5.3 Let hi ∈ Z be a sequence of integers with i ∈ N, andlet

h′i = hi − hi−1

be its first difference. Assume that h′i agrees for all i ≥ i0 with apolynomial of degree ≤ n − 1 with rational coefficients.

Show that hi agrees with a polynomial of degree ≤ n with rationalcoefficients for all i ≥ i0.

Exercise 5.4 Let M be a finitely generated graded R =K[x0, . . . , xn]-module.

1) Consider the multiplication by xn

f ∶ M(−1) → Mm ↦ xn ⋅m

Show that coker(f) and ker(f) are finitely generated gradedK[x0, . . . , xn−1]-modules.

2) Using induction on n and Exercise 5.3, deduce that the Hilbertfunction HM(i) agrees for large i with a polynomial of degree≤ n with rational coefficients (reproving Theorem 5.3.5 by dif-ferent means).

Page 217: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 207

Hints: What do you get if you multiply coker(f) and ker(f) by xn?Derive from f an exact sequence of graded K-vector spaces.

Exercise 5.5 Let R =K[x, y] and

f =⎛⎜⎝

xy + y2

xy2 − 1x2y + x2 + xy2 + xy

⎞⎟⎠, g1 =

⎛⎜⎝

y0

xy + x

⎞⎟⎠, g2 =

⎛⎜⎝

x + 1y2

0

⎞⎟⎠∈ R3

Divide f by (g1, g2) using the monomial ordering extending lp toR3 by giving

1) priority to the monomials in R,

2) priority to the components.

Exercise 5.6 Let R = K[x0, x1, x2, x3] and let > be the orderingdp. Consider the ideal

I = ⟨x0, x1, x2, x3⟩ ⊂ R,

with Grobner basis G = (x0, x1, x2, x3).

1) By verifying Buchberger’s criterion for G, determine for thesyzygy module Syz(G) a Grobner basis with respect to >G.

2) Iterate this to compute a graded free resolution of R/I.

3) Determine PR/I .

Exercise 5.7 In R =K[x1, . . . , x5], consider the ideal

I = ⟨x1x3, x2x4, x3x5, x4x1, x5x2⟩ ,

and let > be the ordering dp.

1) Using the Singular commands

resolution A = res(I,0);

resolution B = sres(I,0);

compute graded free resolutions of R/I.

2) From the matrices A[i] and B[i] determine the respectiveBetti tables.

3) From each of the Betti tables derive the Hilbert polynomialPR/I . What do you observe?

Page 218: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 208

4) For the projective variety X = V (I) ⊂ P4, compute dim(X),deg(X), and pa(X).

Exercise 5.8 Let R =K[x1, . . . , xn], and

...f2→ F1

f1→ F0

f0→M → 0

...g2→ G1

g1→ G0

g0→ N → 0

be exact complexes of R-modules with all Fi and Gi free.

1) Show that every homomorphism α ∶ M → N extends to acommutative diagram

...f2 - F1

f1 - F0

f0 - M - 0

...g2 - G1

α1

? g1 - G0

α0

? g0 - N

α

?- 0

with homomorphisms αi ∶ Fi → Gi.

2) The homomorphisms αi are unique up to homotopy, that is,if α′i ∶ Fi → Gi also extend α then there are hi ∶ Fi → Gi+1 with

αi − α′i = hi−1 ○ fi + gi+1 ○ hi

for all i.

3) Considering two minimal free resolutions

...f2→ F1

f1→ F0

f0→M → 0

...g2→ G1

g1→ G0

g0→M → 0

of a graded module M and f = idM , show that all αi areisomorphisms.

Exercise 5.9 Describe an algorithm to transform a graded free res-olution into a minimal one.

Exercise 5.10 Let R =K[x1, . . . , xn]. Given ideals I = ⟨f1, . . . , fa⟩ ⊂R and J = ⟨g1, . . . , gb⟩ ⊂ R, consider the matrix

G = (f1 . . . fa 0 . . . 0 10 . . . 0 g1 . . . gb 1

) ∈ R2×(a+b+1),

and let S = syz(G) ∈ R(a+b+1)×c be a syzygy matrix of G.

Page 219: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

5. FREE RESOLUTIONS AND INVARIANTS 209

1) Show that the entries of the last row of S generate I ∩ J .

2) Applying this algorithm, compute the intersection

⟨x1, x2⟩ ∩ ⟨x1 − x3, x2 − x3⟩ ⊂K[x1, x2, x3].

Hint: You can use the Singular command syz.

Exercise 5.11 Let R =K[x1, . . . , xn]. Given ideals I = ⟨f1, . . . , fa⟩ ⊂R and J = ⟨g1, . . . , gb⟩ ⊂ R, consider the matrix

G =

⎛⎜⎜⎜⎝

f1 . . . fa 0 . . . 0 0 . . . . . . 0 g1

0 . . . 0 f1 . . . fa 0 . . . . . . 0 g2

⋮ ⋱ ⋮0 . . . 0 f1 . . . fa gb

⎞⎟⎟⎟⎠

∈ Rb×(ab+1),

and let S = syz(G) ∈ R(ab+1)×c be a syzygy matrix of G.

1) Show that the entries of the last row of S generate I ∶ J .

2) Applying this algorithm, compute the ideal quotient

⟨x1x3, x2x3⟩ ∶ ⟨x1, x2⟩ ⊂K[x1, x2, x3].

Exercise 5.12 Let R =K[x0, ..., x6] and

A =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

0 x1 0 0 0 0 −x6

−x1 0 x3 0 0 0 00 −x3 0 x5 0 0 00 0 −x5 0 x0 0 00 0 0 −x0 0 x2 00 0 0 0 −x2 0 x4

x6 0 0 0 0 −x4 0

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

∈ R7×7

1) With respect to (dp, c), extend the set of columns of A to aGrobner basis of its image im(A).

2) From the Buchberger test on the Grobner basis, determinegenerators of the kernel ker(A).

Exercise 5.13 Let R =K[x0, . . . , x6] and

I = ⟨x0x1x4, x0x3x4, x1x2x5, x1x4x5, x0x3x6, x2x3x6, x2x5x6⟩

1) Using Algorithm 5.11.1, compute a graded free resolution ofR/I.

2) Determine from this a minimal free resolution.

3) For both resolutions, write down the Betti tables and mark thediagonal cancellations.

4) Compute dimension, degree and genus of V (I) ⊂ P6.

Page 220: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

6

Computing with modules

6.1 Overview

Based on Theorem 5.10.7 to compute the syzygy module of a Grobnerbasis, we can derive algorithms to compute with finitely presentedmodules over the polynomial ring R = K[x1, . . . , xn]. We start outwith an algorithm computing generators of the kernel of an arbi-trary matrix over R. We can apply this, for example, to derive anideal intersection algorithm, see Exercise 5.10. The second basictask is to find a presentation of the subquotient of two submodulesof Rt, which are given by generators. Based on these basic tasks, wewill derive an algorithm for computing the module HomR(M,N) ofhomomorphisms M → N between two R-modules M and N . Thisis a fundamental algorithm for many tasks in algebraic geometryand commutative algebra. One application, we will have a quicklook at, are deformations of algebraic varieties. Here, given a vari-ety X = V (I) by an ideal I ⊂ R, one can obtain from HomR(I,R/I)information about deforming X in a way which keeps key invariantslike the Hilbert polynomial constant. Figure 6.1 shows the defor-mation of the union of three lines V (x0x1x2) ⊂ P2 into an ellipticcurve, that is, a smooth plane cubic.

6.2 Computing kernels

Theorem 5.10.7 only provides an algorithm to compute the kernel ofa matrix (g1 ∣ ... ∣ ga) ∈ Rt×a whose columns gi ∈ Rt form a Grobnerbasis with respect to some ordering. However, we can easily derivean algorithm for the more general task of computing the kernel(syzygy module) of an arbitrary matrix (that is, homomorphism offree R-modules of finite rank).

210

Page 221: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

6. COMPUTING WITH MODULES 211

Figure 6.1: Deformation of three lines into an elliptic curve (realpicture).

Algorithm 6.2.1 Kernel

Input: Matrix M = (g1 ∣ ... ∣ ga) ∈ Rt×a.Output: A matrix S with im(S) = ker(M).1: Compute a Grobner basis g1, ..., ga, ga+1, ..., ga+b.2: From the syzygies s(gi, gj) build a matrix

T =

⎛⎜⎜⎜⎝

∗ ∗

1 ∗⋱ ∗

0 1

⎞⎟⎟⎟⎠

∈ R(a+b)×s

that is, put the Buchberger tests leading to a new Grobner basiselement first.

3: Apply column operations to T to obtain

T ′ =

⎛⎜⎜⎜⎝

∗ S1 ∗

⋱ 00 1

⎞⎟⎟⎟⎠

∈ R(a+b)×s

4: Return S.

Proof. By Theorem 5.10.7, ker(g1, . . . , ga+b) = im(T ). Since thefirst a columns of T ′ are linearly independent, any syzygy whichinvolves only g1, . . . , ga is a linear combination of the last b columns.

Page 222: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

6. COMPUTING WITH MODULES 212

Example 6.2.1 In Example 5.11.3, by column operations

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

x7 00 −x1x2x5

0 −x1x2x6

−x6 00 −x5x7

1 x3x4

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

x7 −x3x4x7

0 −x1x2x5

0 −x1x2x6

−x6 x3x4x6

0 −x5x7

1 0

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

hence

Syz

⎛⎜⎜⎜⎜⎜⎜⎝

−x6 0 0 −x7 0x5 0 0 0 −x3x4

0 −x7 0 0 x1x2

0 x6 −x5 0 00 0 x3x4 x1x2 0

⎞⎟⎟⎟⎟⎟⎟⎠

= ⟨

⎛⎜⎜⎜⎜⎜⎜⎝

−x3x4x7

−x1x2x5

−x1x2x6

x3x4x6

−x5x7

⎞⎟⎟⎟⎟⎟⎟⎠

In Singular we can compute a syzygy matrix using the com-mand syz:ring R = 0, (x(1..7)),dp;

matrix M[5][5] = -x(6), 0, 0, -x(7), 0,

x(5), 0, 0, 0, -x(3)*x(4), 0,

0, -x(7), 0, 0, x(1)*x(2),

0, x(6), -x(5), 0, 0,

0, 0, x(3)*x(4), x(1)*x(2), 0;

print(syz(M));

x(3)*x(4)*x(7),

x(1)*x(2)*x(5),

x(1)*x(2)*x(6),

-x(3)*x(4)*x(6),

x(5)*x(7)

For another example, see Exercise 5.12.

6.3 Computing subquotients

Definition 6.3.1 Given two matrices A ∈ Rt×a and B ∈ Rt×b thesubquotient with generators A and relations B is the R-module

subquot(A,B) =im(A) + im(B)

im(B).

Page 223: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

6. COMPUTING WITH MODULES 213

Here we add im(B), before dividing it out again, to make thequotient well-defined.

Remark 6.3.2 In particular,

im(A) = subquot(A,0)

coker(B) = subquot(Et,B)

where Et denotes the t × t unit matrix.

The following algorithm determines a presentation

Rc C→ Ra → subquot(A,B)→ 0

of the subquotient.

Algorithm 6.3.1 Subquotient

Input: A ∈ Rt×a and B ∈ Rt×b.Output: C ∈ Ra×c with

subquot(A,B) ≅ coker(C)

1: By computing a syzygy matrix of ( A B ) ∈ Rt×(a+b) deter-mine C ∈ Ra×c and D ∈ Rb×c with

ker ( A B ) = im(CD

)

2: Return C.

Proof. We have a presentation

Rc

⎛⎜⎜⎝

CD

⎞⎟⎟⎠

Ð→ Ra+b( A B )

Ð→ im(A) + im(B)→ 0

Dividing by im(B), yields an exact sequence

Rc CÐ→ Ra A

Ð→im(A) + im(B)

im(B)→ 0

where A denotes the map

A ∶ Ra → Rt/ im(B)ei ↦ Aei + im(B)

induced by A.See also Exercise 6.1.

Page 224: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

6. COMPUTING WITH MODULES 214

Example 6.3.3 For

A = (x, y) B = (x2, y2)

we have

ker(x, y, x2, y2) = im

⎛⎜⎜⎜⎝

−y x 0x 0 y0 −1 00 0 −1

⎞⎟⎟⎟⎠

hencesubquot(A,B) ≅ coker(C)

with

C = (−y x 0x 0 y

)

The presentation sequence of subquot(A,B) is

R3 CÐ→ R2 Ð→ ⟨x, y⟩ / ⟨x2, y2⟩ Ð→ 0

e1 z→ xe2 z→ y

In Singular we can obtain C by applying the modulo commandto the images of A and B:ring R=0,(x,y),dp;

module A = x,y;

module B = x2,y2;

print(modulo(A,B));

0,x,-y,

y,0,x

Note that the sorting of the columns of C is irrelevant.

Remark 6.3.4 Suppose M is a finitely presented module

Rc C→ Ra π

→M → 0

and π(ei) = A ⋅ ei. Then

M = subquot(A,B) ≅ coker(C).

Writing M as the subquotient of A and B, keeps track of the gen-erators of M , that is, of the map π. Writing M as the cokernel ofC looses the information about π.

Page 225: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

6. COMPUTING WITH MODULES 215

6.4 Hom and the Hilbert scheme

Definition 6.4.1 For R-modules M and N let

HomR(M,N) = {f ∶M → N ∣ f is an R-module homomorphism}

be the module of homomorphisms. It has the structure of anR-module by

(f + g)(m) = f(m) + g(m)

(r ⋅ f)(m) = r ⋅ f(m)

for m ∈M and r ∈ R.

Before discussing how to compute Hom by Grobner basis tech-niques (specifically, Algorithms 6.2.1 and 6.3.1) we give a sketch ofan important application in algebraic geometry:

It is based on the key fact that algebraic subsets of PnK are againparametrized by an algebraic set. More precisely, we have to con-sider schemes Proj(R/I), which corresponds to homogeneous idealsI, which are not necessarily radical. In general, the remainder ofthis subsection is intended to give you some impression. To be com-pletely precise, we would need much more technical background.

Example 6.4.2 Consider the set Hn,d of hypersurfaces in PnK ofdegree d. Every element X ∈ Hn,d is of the form

X = V (I)

where I = ⟨f⟩ and

f = ∑∣α∣=d

cαxα ∈K[x0, . . . , xn]

is homogeneous of degree deg(f) = d. So X corresponds to anelement

(cα)α ∈ Pm−1K

where m is the dimension of the vector space K[x0, . . . , xn]d of poly-nomials of degree d. Hence

Hn,d ≅ Pm−1K .

All elements X ∈ Hn,d have the same Hilbert polynomial

PX(t) ∶= PR/I(t) = (t + n

n) − (

t − d + n

n).

It turns out that this idea is the right strategy in general:

Page 226: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

6. COMPUTING WITH MODULES 216

Definition 6.4.3 The Hilbert scheme Hn is the set all subschemesof PnK.

Theorem 6.4.4 The Hilbert scheme

Hn = ⋃P ∈K[t]Hn,P

is the disjoint union of projective schemes Hn,P such that PX = Pfor all X ∈ Hn,P .

We cannot prove this here. In general, the Hilbert scheme isalso difficult to construct. However, the following theorem (whichwe also cannot prove here) allows us to describe Hn,P locally at apoint X by computing a module of homomorphisms. As we willsee in the next section, this is a task which can easily be handledalgorithmically.

Theorem 6.4.5 Let X ∈ Hn,P given by the homogeneous ideal I ⊂K[x0, . . . , xn]. The tangent space of Hn,P at X is

Hom(I,R/I)0

the K-vector space of graded homomorphisms I → R/I.The elements of Hom(I,R/I)0 are called the homogeneous first

order deformations of I.

Recall that the tangent space gives a linear approximation ofa variety at a given point. See Figure 6.2 for a tangent space ofa conic. Keep in mind, that in Theorem 6.4.5 we are not talking

Figure 6.2: A tangent to a conic

about a tangent space of X, but rather about the tangent space ofthe space of all possible X at a specific X.

Page 227: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

6. COMPUTING WITH MODULES 217

Remark 6.4.6 Suppose X is defined by I = im(g1, . . . , gs) and

Hom(I,R/I)0 = ⟨φ1, . . . , φm⟩ .

Then for parameters t, the ideal

⟨gi +∑mj=1tj ⋅ φj(gi) ∣ i = 1, . . . , s⟩

determines a deformation Xt of X. However PXt = PX is only truemodulo appropriate higher order terms in ⟨t0, . . . , tm⟩

2(in analogy

to a Taylor series). Moreover, there can be algebraic relations be-tween the tj.

Example 6.4.7 In the setup of Example 6.4.2, consider the hyper-surface I = ⟨x0 ⋅ ... ⋅ xn⟩. Then a basis of Hom(I,R/I)0 is given bythe homomorphisms

φα ∶ I → R/Ix0 ⋅ ... ⋅ xn ↦ xα

where ∣α∣ = d and α ≠ (1, . . . ,1).

To do some examples, we first develop an algorithm to computeHom in general.

6.5 Computing Hom

First note thatHomR (Rs,Rt) ≅ Rt⋅s

is a free module. We choose the identification of matrices andvectors

⎛⎜⎝

a1,1 ⋯ a1,s

⋮ ⋮at,1 ⋯ at,s

⎞⎟⎠↦

⎛⎜⎜⎜⎜⎜⎜⎝

a1,1

⋮at,1⋮at,s

⎞⎟⎟⎟⎟⎟⎟⎠

For those who know about the tensor product: Denote by astar the dual vector respectively module. We have HomR (Rs,Rt) ≅Rt ⊗ (Rs)∗, where A = (ai,j) is identified with ∑

ti=1∑

sj=1ai,j ⋅ ei ⊗ e

∗j .

Hence, the above identification amounts to an ordering of the basisvectors ei ⊗ e∗j of the tensor product.

Page 228: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

6. COMPUTING WITH MODULES 218

Algorithm 6.5.1 Hom

Input: R-modules M and N given by presentations

Rs1f1→ Rs0 →M → 0

Rt1g1→ Rt0 → N → 0

Output: HomR(M,N) as a subquotient.1: By Algorithm 6.2.1, compute g2 such that

Rt2g2→ Rt1

g1→ Rt0 → N → 0

is exact.2: Construct the (s1t0) × (s0t0 + s1t1) matrix

Hom (Rs0 ,Rt0)⊕Hom (Rs1 ,Rt1)δ→ Hom (Rs1 ,Rt0)

(A, B) ↦ A ⋅ f1 − g1 ⋅B

3: By Algorithm 6.2.1 compute a matrix γ with ker(δ) = im(γ).4: Construct the (s0t0 + s1t1) × (s0t1 + s1t2) matrix

Hom (Rs0 ,Rt1)⊕Hom (Rs1 ,Rt2)ρ→ Hom (Rs0 ,Rt0)⊕Hom (Rs1 ,Rt1)

(C, D) ↦ (g1 ⋅C, C ⋅ f1 − g2 ⋅D)

5: Return subquot(γ, ρ).

For the proof of correctness we make the following observations:

Remark 6.5.1 First note that

g1Cf1 − g1(Cf1 − g2D) = 0,

soδ ⋅ ρ = 0,

that is, im(ρ) ⊂ ker(δ) and, hence,

subquot(γ, ρ) = ker(δ)/ im(ρ).

Lemma 6.5.2 The map

π ∶ ker(δ) → HomR(M,N)

(A, B) ↦ A = (ei ↦ A ⋅ ei)

is well-defined and surjective.

Page 229: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

6. COMPUTING WITH MODULES 219

Proof. Let (A,B) ∈ ker(δ). Then we have a commutative diagram

Rs1f1 - Rs0 - M - 0

Rt1

B

? g1 - Rt0

A

?- N

A

?- 0

where A is well defined: Suppose v ∈ im(f1). So v = f1w withw ∈ Rs1 , hence A ⋅ v = Af1w = g1Bw ∈ im(g1).

Moreover, any homomorphism f ∶M → N can be written as

f(ej) =∑i

aijei

with some matrix A ∶ Rs0 → Rt0 , ej ↦ ∑i aijei, and since f is well-defined, A must satisfy

im(A ⋅ f1) ⊂ im(g1).

Hence there are bij with

A ⋅ f1 ⋅ ej = g1 ⋅∑i

bijei,

that is, with B = (bij) we have A ⋅ f1 = g1 ⋅ B. We conclude that(A,B) ∈ ker(δ) and π(A,B) = f .

For correctness of the algorithm it remains to prove:

Lemma 6.5.3 ker(π) = im(ρ).

Proof. We can collect all maps in the diagram

Rs1f1 - Rs0 - M - 0

Rt2g2 -

D

�Rt1

B

? g1 -

C

�Rt0

A

?- N

A

?- 0

First note that (A,B) ∈ ker(π) if and only if A ⋅ f1 = g1 ⋅ B andim(A) ⊂ im(g1).

• If (A,B) = (g1 ⋅C, C ⋅ f1 − g2 ⋅D) ∈ im(ρ), then

A ⋅ f1 = g1 ⋅C ⋅ f1 = g1 ⋅ (C ⋅ f1 − g2 ⋅D) = g1 ⋅B

and im(A) = im(g1 ⋅C) ⊂ im(g1).

Page 230: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

6. COMPUTING WITH MODULES 220

• On the other hand, let (A,B) ∈ ker(π). Since im(A) ⊂ im(g1)there is C ∈ HomR (Rs0 ,Rt1) with

A = g1 ⋅C.

Moreover, by A ⋅ f1 = g1 ⋅B, we have

g1 ⋅ (C ⋅ f1 −B) = A ⋅ f1 − g1 ⋅B = 0,

that is,im(C ⋅ f1 −B) ⊂ ker(g1) = im(g2).

Hence there is D ∈ HomR (Rs1 ,Rt2) with C ⋅ f1 − B = g2 ⋅D,that is,

B = C ⋅ f1 + g2 ⋅D.

Example 6.5.4 For X = V (I) ⊂ P5 defined by

I = im(g1) ⊂ R1

g1 = (x0x1, x2x3, x4x5)

we have a minimal graded free resolution

0→ R(−6)1 → R(−4)3 g2→ R(−2)3 g1

→ R1 → R/I → 0

with

g2 =⎛⎜⎝

−x2x3 −x4x5 0x0x1 0 −x4x5

0 x0x1 −x2x3

⎞⎟⎠

HencePX(t) = 4t2 + 2,

so X is a genus 1 surface of degree 8. It is an example of a so calledK3-surface, which is the two-dimensional analogue of an ellipticcurve.

Our goal is to compute the tangent space Hom(I,R/I)0 of H5,4t2+2

at X.We use the opportunity to demonstrate one more computer alge-

bra system: Macaulay2 has a similar functionality as Singular.It is very well suited for the type of calculations required in Algo-rithm 6.5. Macaulay2 (like Singular and GAP) has a built-infunction for computing Hom:i1: R = QQ[x 0..x 5];

i2: I = ideal(x 0*x 1,x 2*x 3,x 4*x 5)

o2: ideal ( x 0x 1 x 2x 3 x 4x 5 )

Page 231: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

6. COMPUTING WITH MODULES 221

o2: Ideal of R

A matrix with the generators of I:i3: g1 = gens I

o3: ∣ x 0x 1 x 2x 3 x 4x 5 ∣o3: Matrix R1 <--- R3

To consider I as a submodule of R1 do:i4: M = image g1

o4: image ∣ x 0x 1 x 2x 3 x 4x 5 ∣o4: R-module, submodule of R1

To consider R/I as a submodule of R1 do:i5: N= coker g1

o5: cokernel ∣ x 0x 1 x 2x 3 x 4x 5 ∣o5: R-module, quotient of R1

Construct HomR(I,R/I):i6: H = Hom(M, N)o6: cokernel ∣ x 0x 1 x 2x 3 x 4x 5 0 0 0 0 0 0 ∣

∣ 0 0 0 x 0x 1 x 2x 3 x 4x 5 0 0 0 ∣∣ 0 0 0 0 0 0 x 0x 1 x 2x 3 x 4x 5 ∣

A matrix with a K-vectorspace basis in degree 0 in its columns:i7: T = basis(0,H);

The K-vector space dimension of HomR(I,R/I)0:i8: rank source T

o8: 54

For example the 11th basis vector (indexing starts at 0):i9: T {10}o9: ∣ x 2^2 ∣

∣ 0 ∣∣ 0 ∣

o9: Matrix

We can interpret a given basis vector as a homomorphism, for ex-ample:i10: homomorphism T {10}o10: ∣ x 2^2 0 0 ∣o10: Matrix

This homomorphism maps the generators of I to R/I as follows:

x0x1 ↦ x22, x2x3 ↦ 0, x4x5 ↦ 0

From o6 it is clear that a basis of HomR(I,R/I)0 is given by the54 = 18 + 18 + 18 homomorphisms

x0x1 ↦ xα, x2x3 ↦ 0, x4x5 ↦ 0,

x0x1 ↦ 0, x2x3 ↦ xα, x4x5 ↦ 0

x0x1 ↦ 0, x2x3 ↦ 0, x4x5 ↦ xα

where deg(xα) = 2 and xα ≠ x0x1, x2x3, x4x5.

Page 232: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

6. COMPUTING WITH MODULES 222

Example 6.5.5 For X = V (I) ⊂ P2 defined by

I = im(g1)

g1 = (x0x1, x0x2, x1x2)

we have a minimal graded free resolution

0→ R(−3)2 g2→ R(−2)3 g1

→ R1 → R/I → 0

with

g2 =⎛⎜⎝

−x2 0x1 −x1

0 x0

⎞⎟⎠

HencePX(t) = 3,

so X is the union of 3 points, indeed,

I = ⟨x0, x1⟩ ∩ ⟨x0, x2⟩ ∩ ⟨x1, x2⟩ .

We follow Algorithm 6.5, step-by-step, to obtain HomR(I,R/I).The usual diagram reads

R(−3)2g2- R(−2)3

g1 - I - 0

R(−3)2g2-

D

�R(−2)3

B

? g1 -

C

�R1

A

?- R/I

A

?- 0

Hence

A ∈ HomR (R(−2)3,R1) ≅ R(2)3

B ∈ HomR (R(−3)2,R(−2)3) ≅ R(1)6

δ(A,B) = A ⋅ g2 − g1 ⋅B ∈ HomR (R(−3)2,R1) ≅ R(3)2

andδ ∶ R(2)3 ⊕R(1)6 → R(3)2

is represented by

δ = (

a11 a12 a13 b11 b21 b31 b12 b22 b32

−x2 x1 0 −x0x1 −x0x2 −x1x2 0 0 00 −x1 x0 0 0 0 −x0x1 −x0x2 −x1x2

)

Page 233: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

6. COMPUTING WITH MODULES 223

(with the columns corresponding to a11, a12, a13, b11, b21, . . . , b32). In-deed, to obtain the first block, compute

( a11 a12 a13 ) ⋅ g2 = ( −a11x2 + a12x1 −a12x1 + a13x0 )

set one ai,j = 1 and all others zero and use again the above identi-fication of matrices with vectors. For the second block, compute

g1⋅⎛⎜⎝

b11 b12

b21 b22

b31 b32

⎞⎟⎠= ( x0x1b11 + x0x2b21 + x1x2b31 x0x1b12 + x0x2b22 + x1x2b32 )

and proceed in the same way. If you know about the tensor product,the blocks are tensor products of matrices.

Turning to ρ,

C ∈ HomR (R(−2)3,R(−2)3) ≅ R9

D ∈ HomR (R(−3)2,R(−3)2) ≅ R4

andρ(C,D) = (g1 ⋅C,C ⋅ g2 − g2 ⋅D)

is in the direct sum of

HomR (R(−2)3,R1) ≅ R(2)3

andHomR (R(−3)2,R(−2)3) ≅ R(1)6.

Henceρ ∶ R9 ⊕R4 → R(2)3 ⊕R(1)6

and, in the same way as above, one observes that

ρ =

⎛⎜⎜⎜⎜⎜⎜⎝

C D

g1 0 0 0 0A 0 g1 0 0 0

0 0 g1 0 0

B −x2E3 x1E3 0 −g2 00 −x1E3 x0E3 0 −g2

⎞⎟⎟⎟⎟⎟⎟⎠

where E3 denotes the 3 × 3 unit matrix.To compute ker(δ)/ im(ρ) by Algorithms 6.2.1 and 6.3.1, we con-tinue in Macaulay2:i1: R = QQ[x 0..x 2];

i2: I = ideal(x 0*x 1,x 0*x 2,x 1*x 2)

o2: ideal ( x 0x 1 x 0x 2 x 1x 2 )

Page 234: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

6. COMPUTING WITH MODULES 224

o2: Ideal of R

Compute a graded minimal free resolution:i3: cc = res I;

i4: betti cc0 1 2

o4: total: 1 3 2

0: 1 . .

1: . 3 2i5: g1 = cc.dd 1

o5: ∣ x 0x 1 x 0x 2 x 1x 2 ∣o5: Matrix R1 <--- R3

i6: g2 = cc.dd 2o6: {2} ∣ -x 2 0 ∣

{2} ∣ x 1 -x 1 ∣{2} ∣ 0 x 0 ∣

o6: Matrix R3<--- R2

We form the matrices δ and ρ:i7: T0 = target g1; T1 = source g1; T2 = source g2;

i8: S0 = source g1; S1 = source g2;

i9: M0 = Hom(S1,T0);

i10: M1 = Hom(S0, T0) ++ Hom(S1, T1);

i11: M2 = Hom(S0, T1) ++ Hom(S1, T2);

Here ++ refers to the direct sum ⊕ of modules.i12: degrees M0

o12: {{-3},{-3}}i13: degrees M1

o13: {{-2},{-2},{-2},{-1},{-1},{-1},{-1},{-1},{-1}}i14: degrees M2

o14: {{0},{0},{0},{0},{0},{0},{0},{0},{0},{0},{0},{0},{0}}i15: delta11 = transpose g2;

i16: delta12 = -id (R^2)**g1;

Here ** refers to the tensor product ⊗ of matrices.i17: delta = map(M0,M1,matrix {{delta11, delta12}});o17: {-3} ∣ x 2 x 1 0 -x 0x 1 -x 0x 2 -x 1x 2 0 0 0 ∣

{-3} ∣ 0 -x 1 x 0 0 0 0 -x 0x 1 -x 0x 2 -x 1x 2 ∣

i18: rho11 = id (R^3)**g1;

i19: rho21 = (transpose g2)**id (R^3);

i20: rho12 = map(R^3,R^4,0);

i21: rho22 = -(id (R^2))**g2;

i22: rho = map(M1,M2,matrix{{rho11,rho12},{rho21,rho22}});

Page 235: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

6. COMPUTING WITH MODULES 225

o22: {-2} ∣ x 0x 1 x 0x 2 x 1x 2 0 0 0 0 0 0 0 0 0 0 ∣

{-2} ∣ 0 0 0 x 0x 1 x 0x 2 x 1x 2 0 0 0 0 0 0 0 ∣

{-2} ∣ 0 0 0 0 0 0 x 0x 1 x 0x 2 x 1x 2 0 0 0 0 ∣

{-1} ∣ -x 2 0 0 x 1 0 0 0 0 0 x 2 0 0 0 ∣

{-1} ∣ 0 -x 2 0 0 x 1 0 0 0 0 -x 1 x 1 0 0 ∣

{-1} ∣ 0 0 -x 2 0 0 x 1 0 0 0 0 -x 0 0 0 ∣

{-1} ∣ 0 0 0 -x 1 0 0 x 0 0 0 0 0 x 2 0 ∣

{-1} ∣ 0 0 0 0 -x 1 0 0 x 0 0 0 0 -x 1 x 1 ∣

{-1} ∣ 0 0 0 0 0 -x 1 0 0 x 0 0 0 0 -x 0 ∣

Now compute the Hom-module as a subquotient:i23: H =(ker delta)/(image rho);

Basis in degree 0:i24: B = basis(0,H)o24: {-1} ∣ x 0 0 0 0 0 0 ∣

{-1} ∣ 0 x 1 0 0 0 0 ∣{-1} ∣ 0 0 x 0 0 0 0 ∣{-1} ∣ 0 0 0 x 1 0 0 ∣{-1} ∣ 0 0 0 0 x 2 0 ∣{-1} ∣ 0 0 0 0 0 x 2 ∣{0} ∣ 0 0 0 0 0 0 ∣

To obtain the homomorphisms, we consider for each column, thecorresponding linear combination of the generators of H:i25: (gens H) * (matrix entries B)o25: {-2} ∣ x 0^2 x 1^2 0 0 0 0 ∣

{-2} ∣ 0 0 x 0^2 0 0 x 2^2 ∣{-2} ∣ 0 0 0 x 1^2 x 2^2 0 ∣{-1} ∣ 0 0 x 0 0 0 0 ∣{-1} ∣ -x 0 0 0 0 x 1 0 ∣{-1} ∣ 0 -x 1 0 0 0 x 1 ∣{-1} ∣ 0 0 -x 0 -x 1 0 0 ∣{-1} ∣ 0 0 0 0 -x 1 0 ∣{-1} ∣ 0 0 0 0 0 -x 1 ∣

Every column corresponds to a tuple (A,B), the first three entriesto A and the last six to B. Hence the possible A are

(x20,0,0), (x2

1,0,0),

(0, x20,0), (0, x2

2,0),

(0,0, x21), (0,0, x2

2).

6.6 Exercises

Exercise 6.1 Let R =K[x0, x1, x2]. For

A = (x1 x0 00 x2 x1

)

B = (x1x2 x0x1 0 0

0 0 x1x2 x0x1)

Page 236: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

6. COMPUTING WITH MODULES 226

compute a presentation of

subquot(A,B) =im(A) + im(B)

im(B).

Exercise 6.2 Let R =K[x0, . . . , x4] and

I = ⟨x0x1, x1x2, x2x3, x3x4, x4x0⟩ ⊂ R

With the help of a computer algebra system, determine:

1) HomR(I,R/I) as a subquotient,

2) a basis of HomR(I,R/I)0, and

3) interpret your basis vectors as homomorphisms I → R/I.

Exercise 6.3 Let R =K[x0, . . . , x3] and

I = ⟨x0x1, x2x3⟩ ⊂ R

In a step-by-step calculation,

1) determine δ and ρ as needed in Algorithm 6.5 to presentHomR(I,R/I),

2) compute γ with im(γ) = ker(δ),

3) compute a presentation of HomR(I,R/I) = subquot(γ, ρ),

4) determine a basis of HomR(I,R/I)0, and

5) interpret your basis vectors as homomorphisms I → R/I.

Page 237: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

7

Primary decomposition

7.1 Overview

As we have already seen in Section 3.1, the union of algebraic setsX1 = V (I1) and X2 = V (I2) corresponds to the intersection of thedefining ideals

X1 ∪X2 = V (I1 ∩ I2)

To decompose the problem of analyzing X1 ∪ X2 into the prob-lem of analyzing the simpler pieces Xi, we encounter the followingtask: Write a given ideal I as an intersection of ideals in analogyto prime factorization of integers. The main question is, what theappropriate building blocks should be. If I is radical, then the de-composition of X into a union of (irreducible) varieties correpondsto the decomposition of I into an intersection of prime ideals. Forexample,

I = ⟨x0x1, x0x2, x1x2⟩ = ⟨x0, x1⟩ ∩ ⟨x0, x2⟩ ∩ ⟨x1, x2⟩

is the intersection of three prime ideals, and V (I) ⊂ P2 is the unionof the corresponding 3 points. However we have seen (for examplein Section 6.4) that in many settings one also has to consider idealswhich are not radical. In this case, it turns out that right thebuilding blocks are primary ideals: An ideal I ≠ R of a ring R iscalled primary if every zerodivisor in R/I is nilpotent.

Let us first focus on decomposing monomial ideals:

7.2 Irreducible decomposition of mono-

mial ideals

Let R = K[x0, . . . , xn]. First of all, we should avoid unnecessaryfactors:

227

Page 238: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

7. PRIMARY DECOMPOSITION 228

Definition 7.2.1 A decomposition

I =⋂s

i=1Qi

of an ideal I ⊂ R into an intersection of ideals is called irredun-dant if omitting some Qj in the intersection does not result in Iany more.

Lemma 7.2.2 Let m1, . . . ,mr be the unique minimal generators ofthe monomial ideal I according to Corollary 2.3.5. If

m1 = u1 ⋅ u2

with deg(ui) > 0 and gcd(u1, u2) = 1, then

I = I1 ∩ I2

withIj = ⟨uj,m2, . . . ,mr⟩ .

Proof. The inclusion I ⊂ Ij is obvious. On the other hand, letm ∈ I1 ∩ I2. If mi ∣ m for some i ≥ 2, then m ∈ I. Otherwise u1 ∣ mand u2 ∣ m. Then, by gcd(u1, u2) = 1 we have m1 ∣ m, hence m ∈ I.

Theorem 7.2.3 Any monomial ideal I ⊂ R has a unique irredun-dant decomposition

I =⋂s

i=1Qi

into idealsQi = ⟨xα1

i1, . . . , xαrir ⟩

generated by powers of variables.

Proof. For the existence of a decomposition apply Lemma 7.2.2inductively.

If I = ⋂si=1Qi then Qj can be omitted from the intersection ifand only if

⋂i≠jQi ⊂ Qj.

Proceeding inductively, we obtain an irredundant decomposition.For the uniqueness, suppose

⋂s

i=1Qi =⋂s′

j=1Q′j

are irredundant decompositions into ideals generated by powers ofvariables. Fix i and let

Qi = ⟨xα1i1, . . . , xαrir ⟩

Page 239: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

7. PRIMARY DECOMPOSITION 229

with αl > 0 for all l. Assume that Q′j /⊂ Qi for all j. Then for every

j there is an xβjvj ∈ Q

′j with x

βjvj ∉ Qi, that is,

vj = il Ô⇒ αl > βj.

Clearly

m = lcm(xβ1v1 , . . . , xβs′vs′ ) ∈⋂

s′

j=1Q′j ⊂ Qi

So there is some l with xαlil ∣m, which contradicts il = vj Ô⇒ αl > βj.Hence for every i there is j with Q′

j ⊂ Qi, which proves theclaim.

Definition 7.2.4 An ideal I is called irreducible if it cannot bewritten as

I = I1 ∩ I2

with ideals Ii ⫌ I.

Corollar 7.2.5 A monomial ideal Q ⊂ R is irreducible if and onlyif it is of the form

Q = ⟨xα1i1, . . . , xαrir ⟩ .

Proof. If Q is not of this form, then by Lemma 7.2.2 it is notirreducible.

On the other hand, suppose is of the given form and

Q = I1 ∩ I2

and letIj =⋂iQj,i

be decompositions as in Theorem 7.2.3 with Qj,i generated by pow-ers of variables. From this we obtain an irredundant decomposition

Q =⋂some iQ1,i ∩⋂some iQ2,i

which by Theorem 7.2.3 is unique. Since also Q is generated bypowers of variables, for some i, j

Q = Qj,i ⊃ Ij

hence Q = Ij.By Theorem 7.2.3 and Corollary 7.2.5 we have:

Corollar 7.2.6 Any monomial ideal I ⊂ R has a unique irredun-dant decomposition into irreducible monomial ideals.

Page 240: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

7. PRIMARY DECOMPOSITION 230

Example 7.2.7 For

I = ⟨x0x1x2, x20x2, x

31x2⟩

we follow the constructive proof of Theorem 7.2.3:

I = ⟨x0, x31x2⟩ ∩ ⟨x1x2, x

20x2⟩

= ⟨x0, x31x2⟩ ∩ ⟨x1, x

20x2⟩ ∩ ⟨x2⟩

= ⟨x0, x31⟩ ∩ ⟨x0, x2⟩ ∩ ⟨x1, x

20⟩ ∩ ⟨x1, x2⟩ ∩ ⟨x2⟩

= ⟨x0, x31⟩ ∩ ⟨x0, x2⟩ ∩ ⟨x1, x

20⟩ ∩ ⟨x2⟩

= ⟨x0, x31⟩ ∩ ⟨x1, x

20⟩ ∩ ⟨x2⟩ .

Note that

⟨x0, x31⟩ ∩ ⟨x0, x2⟩ ∩ ⟨x1, x

20⟩ ∩ ⟨x2⟩ ⊂ ⟨x1, x2⟩

and⟨x0, x

31⟩ ∩ ⟨x1, x

20⟩ ∩ ⟨x2⟩ ⊂ ⟨x0, x2⟩ .

In Singular we can compute this decomposition by:LIB "monomialideal.lib";

ring R = 0,(x(0..2)),dp;

ideal I = x(0)*x(1)*x(2), x(0)^2*x(2), x(1)^3*x(2);

irreddecMon(I);

[1]:

[1]=x(0)^2

[2]=x(1)

[2]:

[1]=x(0)

[2]=x(1)^3

[3]:

[1]=x(2)

We summarize our strategy for computing this decompositionin Algorithm 7.2.1.

Page 241: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

7. PRIMARY DECOMPOSITION 231

Algorithm 7.2.1 Irreducible decomposition of monomial ideals

Input: Monomial ideal I.Output: The irredundant irreducible decomposition of I.1: Applying Lemma 7.2.2 inductively to minimal generators com-

pute an irreducible decomposition

I =⋂s

i=1Qi

2: Inductively delete any Qj with

⋂i≠jQi ⊂ Qj

What about non-monomial ideals?

Theorem 7.2.8 Any ideal I ⊂ R has a decomposition

I =⋂s

i=1Qi

into irreducible ideals Qi.

Proof. Let X be the set of ideals for which the claim is false. ByTheorem 2.1.5, X has a maximal element I. Since I cannot beirreducible, we can write I = I1 ∩ I2 with I ⫋ Ij. Since I was chosenmaximal, both I1 and I2 have a decomposition into irreducibles,hence also I has. This contradicts the assumption.

Example 7.2.9 If we leave the class of monomial ideals, an ir-redundant irreducible decomposition is by no means unique. Forexample

I = ⟨x2, xy, y2⟩ = ⟨x2, y⟩ ∩ ⟨x, y2⟩ = ⟨x2, x + y⟩ ∩ ⟨x, y2⟩ .

This problem can be fixed (partly) by combining irreduciblesummands in a suitable way. The basic philosophy is that the idealin Example 7.2.9 should be not decomposed at all.

7.3 Primary decomposition

Definition 7.3.1 An ideal I ≠ R of a ring R is called primary ifevery zerodivisor in R/I is nilpotent.

Remark 7.3.2 I is primary if and only if for f, g ∈ R it holds

fg ∈ I ⇒ f ∈ I or g ∈√I.

Page 242: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

7. PRIMARY DECOMPOSITION 232

Definition and Theorem 7.3.3 If I is primary then P ∶=√I is

prime. It is called the associated prime of I, and I is calledP -primary.

Proof. If f ⋅ g ∈√I, there is an m with fm ⋅ gm = (f ⋅ g)m ∈ I. Since

I is primary, fm ∈ I or gm⋅m′

∈ I, hence f ∈√I or g ∈

√I.

Lemma 7.3.4 If I1, I2 ⊂ R are ideals then

√I1 ∩ I2 =

√I1 ∩

√I2.

Proof. Let f ∈√I1 ∩ I2, so fm ∈ I1 ∩ I2 for some m. This implies

f ∈√I1 and f ∈

√I2.

On the other hand, if f ∈√I1 ∩

√I2 then fm ∈ I1 and fm

∈ I2

for some m and m′. Hence fmax{m,m′} ∈ I1 ∩ I2.

Lemma 7.3.5 Any intersection of P -primary ideals is P -primary.

Proof. Suppose Q1,Q2 ⊂ R are primary and√Qi = P . Let fg ∈

Q1 ∩Q2. Hence

(f ∈ Q1 or g ∈ P ) and (f ∈ Q2 or g ∈ P ),

that is, f ∈ Q1 ∩Q2 or g ∈ P . By Lemma 7.3.4

√Q1 ∩Q2 = P

and hence the claim follows.

Lemma 7.3.6 Let R be a ring, I ⊂ R an ideal. If

I ∶ ⟨f⟩ = I ∶ ⟨f 2⟩

for some f ∈ R, then

I = (I ∶ ⟨f⟩) ∩ ⟨I, f⟩ .

Proof. If g ∈ (I ∶ ⟨f⟩) ∩ ⟨I, f⟩ then, by g ∈ ⟨I, f⟩, there are h ∈ I,r ∈ R with

g = h + rf .

On the other hand, by g ∈ (I ∶ ⟨f⟩),

fh + rf 2 = fg ∈ I,

hence rf 2 ∈ I, that is, r ∈ I ∶ ⟨f 2⟩ = I ∶ ⟨f⟩. So rf ∈ I, which impliesthat g = h + rf ∈ I.

The other inclusion is obvious.

Page 243: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

7. PRIMARY DECOMPOSITION 233

Proposition 7.3.7 For any ideal I ⫋ R it holds

prime ⇒ irreducible ⇒ primary

Proof. For the first implication, suppose I = I1 ∩ I2 with I ⫋ I1.Then there is an f ∈ I1 − I. For any g ∈ I2

fg ∈ I1I2 ⊂ I1 ∩ I2 = I.

If I is prime then g ∈ I, which proves that I2 = I.For the second implication, let f, g ∈ R with fg ∈ I and f ∉ I.

By Theorem 2.1.5 the ascending chain

I ∶ ⟨g⟩ ⊂ I ∶ ⟨g2⟩ ⊂ ...

terminates, so there is an m with I ∶ ⟨gm⟩ = I ∶ ⟨gm+1⟩. By Lemma7.3.6 this implies that

I = (I ∶ ⟨gm⟩) ∩ ⟨I, gm⟩ .

By fgm ∈ I we have f ∈ I ∶ ⟨gm⟩. As f ∉ I it holds

I ⫋ I ∶ ⟨gm⟩ ,

hence, since I is irreducible,

I = ⟨I, gm⟩ ,

This implies gm ∈ I, that is, g ∈√I.

Definition 7.3.8 A primary decomposition of an ideal I is anexpression

I =⋂s

i=1Qi

with Qi primary. A primary decomposition is called minimal if itis irredundant and all

√Qi are distinct.

Theorem 7.3.9 Any ideal has a minimal primary decomposition.

Proof. By Proposition 7.2.8, there is an irredundant irreducibledecomposition. By Theorem 7.3.7 this is a primary decomposition.By Lemma 7.3.5, we can combine factors which have the same rad-ical.

Note that the notion of a minimal primary decomposition makessense geometrically since

√Q1 =

√Q2 implies that V (Q1) = V (Q2).

Page 244: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

7. PRIMARY DECOMPOSITION 234

7.4 Algorithm for primary decomposi-

tion of monomial ideals

Proposition 7.4.1 Any irreducible monomial ideal I = ⟨xα1i1, . . . , xαrir ⟩

is ⟨xi1 , . . . , xir⟩-primary.

Proof. By Proposition 7.3.7 I is primary. Since ⟨xi1 , . . . , xir⟩ ⊃ Iis a prime ideal, the claim follows.

Using this observation, we obtain Algorithm 7.4.1 for computinga minimal primary decomposition of a monomial.

Algorithm 7.4.1 Monomial primary decomposition

Input: Monomial ideal I.Output: Minimal primary decomposition of I.1: Compute the irredundant irreducible decomposition.2: Combine factors which have the same radical.

Example 7.4.2 In Example 7.2.7 we have computed the irredun-dant irreducible decomposition

I = ⟨x0x1x2, x20x2, x

31x2⟩ = ⟨x0, x

31⟩ ∩ ⟨x1, x

20⟩ ∩ ⟨x2⟩

By Proposition 7.4.1

√⟨x0, x3

1⟩ = ⟨x0, x1⟩ =√

⟨x1, x20⟩

hence, by⟨x0, x

31⟩ ∩ ⟨x1, x

20⟩ = ⟨x2

0, x0x1, x31⟩

a minimal primary decomposition of I is

I = ⟨x20, x0x1, x

31⟩ ∩ ⟨x2⟩

In Singular we can compute a minimal primary decomposition ofany (not necessarily monomial) ideal by:LIB "primdec.lib";

ring R = 0,(x(0..2)),dp;

ideal I = x(0)*x(1)*x(2), x(0)^2*x(2), x(1)^3*x(2);

primdecGTZ(I);

[1]:

[1]:

[1]=x(2)

[2]:

[1]=x(2)

[2]:

Page 245: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

7. PRIMARY DECOMPOSITION 235

[1]:

[1]=x(1)^3

[2]=x(0)*x(1)

[3]=x(0)^2

[2]:

[1]=x(1)

[2]=x(0)

This command returns a list of tuples of a primary ideal Qi theprime

√Qi.

Example 7.4.3 In general, a minimal primary decomposition isnot unique. For example

⟨x2, xy⟩ = ⟨x⟩ ∩ ⟨x2, y⟩ = ⟨x⟩ ∩ ⟨x2, xy, yn⟩

for all n ≥ 1.

However, we have uniqueness in the following sense:

7.5 Uniqueness of primary decomposi-

tion

Theorem 7.5.1 IfI =⋂

s

i=1Qi

is a minimal primary decomposition, then the pairwise differentprime ideals

√Qi are uniquely determined.

They are precisely the primes P ⊂ R with P =√I ∶ ⟨b⟩ for some

b ∈ R.

Remark 7.5.2 If Q is primary and b ∈ R then

b ∈ QÔ⇒ Q ∶ b = R

b ∉ QÔ⇒√Q ∶ b =

√Q

Proof. The first claim of the remark and the inclusion ⊃ in thesecond claim are trivial. Let xm ∈ Q ∶ b for some m, that is, xmb ∈ Q.Since b ∉ Q and Q is primary, we have xm⋅m

∈ Q for some m′.We now prove the theorem:

Proof. By the remark

I ∶ ⟨b⟩ =⋂s

i=1 (Qi ∶ ⟨b⟩)

hence √I ∶ ⟨b⟩ =⋂

s

i=1

√Qi ∶ ⟨b⟩ =⋂b∉Qi

√Qi.

Page 246: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

7. PRIMARY DECOMPOSITION 236

If√I ∶ ⟨b⟩ is prime then by Proposition 7.3.7

√I ∶ ⟨b⟩ =

√Qi

for some i.Conversely, by minimality of the decomposition, for every j

there isbj ∈⋂i≠jQi

with bj ∉ Qj. Then√Qj =

√I ∶ ⟨bj⟩.

Example 7.5.3 Consider

I = ⟨x0x1x2, x20x2, x

31x

22⟩

We compute an irreducible decomposition

I = ⟨x0, x31x

22⟩ ∩ ⟨x1, x

20x2⟩ ∩ ⟨x2⟩

= ⟨x0, x31⟩ ∩ ⟨x0, x

22⟩ ∩ ⟨x1, x

20⟩ ∩ ⟨x1, x2⟩ ∩ ⟨x2⟩

Since ⟨x2⟩ ⊂ ⟨x1, x2⟩, we have

⟨x0, x31⟩ ∩ ⟨x0, x

22⟩ ∩ ⟨x1, x

20⟩ ∩ ⟨x2⟩ ⊂ ⟨x1, x2⟩ ,

so we can delete ⟨x1, x2⟩. Note that ⟨x0, x22⟩ cannot be deleted since

⟨x0, x31⟩ ∩ ⟨x1, x

20⟩ ∩ ⟨x2⟩ /⊂ ⟨x0, x

22⟩ .

So the irredundant irreducible decomposition is

I = ⟨x0, x31⟩ ∩ ⟨x0, x

22⟩ ∩ ⟨x1, x

20⟩ ∩ ⟨x2⟩ .

Hence, like in Example 7.4.2, a minimal primary decomposition is

I = ⟨x20, x0x1, x

31⟩ ∩ ⟨x2⟩ ∩ ⟨x0, x

22⟩ .

We verify this also using Singular:LIB "primdec.lib";

ring R = 0,(x(0..2)),dp;

ideal I = x(0)*x(1)*x(2), x(0)^2*x(2), x(1)^3*x(2)^2;

primdecGTZ(I);

[1]:

[1]:

[1]=x(2)

Page 247: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

7. PRIMARY DECOMPOSITION 237

[2]:

[1]=x(2)

[2]:

[1]:

[1]=x(1)^3

[2]=x(0)*x(1)

[3]=x(0)^2

[2]:

[1]=x(1)

[2]=x(0)

[3]:

[1]:

[1]=x(2)^2

[2]=x(0)

[2]:

[1]=x(2)

[2]=x(0)

By computing appropriate ideal quotientsradical(quotient(I,x(0)^2));

[1]=x(2)

radical(quotient(I,x(2)^2));

[1]=x(1)

[2]=x(0)

radical(quotient(I,x(1)^3*x(2)));

[1]=x(2)

[2]=x(0)

we can obtain all possible primes

√I ∶ ⟨x2

0⟩ = ⟨x2⟩√I ∶ ⟨x2

2⟩ = ⟨x0, x1⟩√I ∶ ⟨x3

1x2⟩ = ⟨x0, x2⟩ .

In fact, in the case of monomial ideals, the elements b in Theorem7.5.1 can always be chosen monomial.

Definition 7.5.4 The√Qi in the theorem are called the associ-

ated primes of I. Write

Ass(I) = {√Qi ∣ i} .

The minimal elements of Ass(I) with respect to inclusion arecalled the minimal associated primes of I. Write Min(I) forthe set of minimal associated primes.

Page 248: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

7. PRIMARY DECOMPOSITION 238

Primary ideals Qi with√Qi minimal are called isolated pri-

mary components, the others are called embedded primary compo-nents.

Note that if√Q1 ⫋

√Q2 then V (Q2) ⊂ V (Q1), so the notation

embedded makes sense geometrically.

Example 7.5.5 In the above example

Ass(I) = {⟨x2⟩ , ⟨x0, x1⟩ , ⟨x0, x2⟩}

andMin(I) = {⟨x2⟩ , ⟨x0, x1⟩}

The primary component ⟨x0, x22⟩ is embedded in the isolated compo-

nent ⟨x2⟩.In geometric terms, V (x0, x2

2) is a line in A2 which lies on theplane V (x2), see Figure 7.1.

Figure 7.1: Primary decomposition with an embedded line

Definition 7.5.6 A point specified (as a scheme) by a primaryideal that is not prime is usually referred to as a fat point.

Example 7.5.7 The ideal ⟨x, y2⟩ ⊂ K[x, y] defines a fat point,which is an embedded component of

⟨x, y2⟩ ∩ ⟨y⟩ = ⟨xy, y2⟩

lying on the line given by ⟨y⟩, see Figure 7.2.

Page 249: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

7. PRIMARY DECOMPOSITION 239

Figure 7.2: Fat point on line

Remark 7.5.8 If I ⊂ R is an ideal then

√I = ⋂P ∈Min(I)P ,

in particular, √I = ⋂P⊃I primeP .

Proof. Clear by Theorem 7.5.1 and Lemma 7.3.4.Without proof we mention:

Theorem 7.5.9 The isolated components of a minimal primarydecomposition are uniquely determined.

7.6 Exercises

Exercise 7.1 Let S be the set of squarefree monomials in the vari-ables x0, . . . , xn. A simplicial complex ∆ on the vertices x0, . . . , xnis a subset ∆ ⊂ S, such that x0, . . . , xn ∈ ∆, and if m ∈ ∆ and w ∣mthen also w ∈ ∆. The elements of ∆ are called faces, the maximalones facets.

The Stanley-Reisner ideal of ∆ is the ideal

I∆ = ⟨m ∣m ∈ S, m ∉ ∆⟩ ⊂K[x0, . . . , xn]

generated by the non-faces of ∆.An element m ∈ S is called coface if x1⋅...⋅xn

m ∈ ∆, that is, if itscomplement is a face.

1) Show thatI∆ = ⋂

xi1 ⋅...⋅xia minimalcoface of ∆

⟨xi1 , . . . , xia⟩

2) For the simplicial complex

S = {1, x0, x1, x2, x3, x1x2, x1x3, x0x2, x0x3, x2x3, x1x2x3}

(see Figure 7.3), determine I∆, and its decomposition accord-ing to 1). Verify your result by computing the ideal intersec-tion.

Page 250: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

7. PRIMARY DECOMPOSITION 240

Figure 7.3: Simplicial complex with three maximal faces.

Exercise 7.2 Let R =K[x0, x1, x2] and

I = ⟨x20x1, x

20x

22, x

21, x1x

22⟩ ⊂ R

Find the irredundant decomposition of I into irreducible ideals.

Exercise 7.3 Let R =K[x0, x1, x2] and

I = ⟨x30, x

31, x

20x

22, x0x1x

22, x

21x

22⟩ ⊂ R

1) Find the irredundant decomposition of I into irreducible ide-als.

2) Find a minimal primary decomposition of I.

Page 251: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

8

Normalization

8.1 Overview

Definition 8.1.1 Let A be a Noetherian domain. The normal-ization of A, written A, is the integral closure of A in its quotientfield quot(A). We call A normal if A = A.

Recall that the integral closure is unique up to isomorphism.The key setup we have in mind is the normalization of an affinealgebra

A =K[x1, . . . , xn]/I

where I is a prime ideal, and this is the setup we will consider inthe following. We will describe an algorithm which computes thenormalization as an affine algebra A = A[t1, . . . , ts]/J with a primeideal J ⊂ A. For simplicity we assume that K has characteristic zero(the algorithm will also work fine if K, more generally, is perfect,for example, if K = Fp).

On the geometric side, A is the coordinate ring of an algebraicvariety X = V (I) ⊂ An

K and A is the coordinate ring of an algebraicvariety X ⊂ An+s

K called the normalization of X. The integral ringextension A ⊂ A corresponds on the geometric side to a polynomialmap X →X .

Example 8.1.2 In Figure 3.3, we can view the twisted cubic V (x2−y, x3 − z) as the normalization X of the cusp X = V (y3 − z2). Thenormalization is only determined up to isomorphism. In fact, thetwisted cubic is in bijection to the line A1 via the paramatrization

A1 → V (x2 − y, x3 − z)

t↦ (t, t2, t3)

241

Page 252: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

8. NORMALIZATION 242

In terms of algebra, we can see the normalization map from the lineto the cusp immediately: If I = ⟨y3 − z2⟩ ⊂K[y, z] is the ideal of thecusp, then

A =K[y, z]/I ≅ K[t2, t3] ⊂ K[t] = Ay ↦ t2

z ↦ t3

Since t is a zero of the monic polynomial T 2 − t2 ∈ K[t2, t3][T ], itis integral. Moreover, K[t] is normal since it is factorial:

Example 8.1.3 Any unique factorization domain is normal.

Proof. Let R be a unique factorization domain and rs ∈ quot(R)

be integral over R and gcd(r, s) ∈ R×. Then there are ai ∈ R with

(r

s)d

=d−1

∑i=0

ai (r

s)i

,

and, cancelling the denominator,

rd = s(d−1

∑i=0

airisd−1−i) .

So if p is a prime divisor of s, then also of r, which implies thatrs ∈ R.

In terms of geometry, normalization is a technique that improvesthe singularities of X, by removing singularities of dimension d−1 ina d-dimensional variety. In particular, for a curve X, normalizationgives a desingularization.

The basic philosophy is that X is easier to study than X, butnevertheless yields equivalent information. For example, many re-sults for curves assume, in their natural formulation, that the curveis non-singular, like the Riemann-Roch theorem classifying rationalmaps between curves.

We remark that also a desingularization of varieties of higherdimension can be achieved, for example, in the case of the sin-gular surfaces in Figures 1.4, 1.6, and 1.7. However, this is morecomplicated since desingularization does not correspond to a simplealgebraic process in terms of A (like normalization of X correspondsto normalization of A).

Page 253: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

8. NORMALIZATION 243

8.2 Basics on normalization

As in the introduction, let

A =K[x1, . . . , xn]/I

with a prime ideal I ⊂K[x1, . . . , xn]. We first observe that normal-ity is a local property, that is, it can be tested by testing it at everyelement of

X = Spec(A) = {P ⊂ A ∣ P prime ideal}

for the spectrum of A. An element P ∈ X is also called a point ofthe scheme X.

Recall that, If S ⊂ A is a multiplicatively closed set, then

S−1A = {a

s∣ s ∈ S, a ∈ A} ⊂ quot(A)

is a ring called the localization of A at S. If P ∈ X, then defineAP = S−1A with S = A − P .

Theorem 8.2.1 Normalization commutes with localization, thatis,

AP = AP

for all P ∈X.

Proof. Let au ∈ AP so a ∈ A. Hence there are ai ∈ A with

ad +∑d

i=1aia

d−i = 0

so

(a

u)d

+∑d

i=1aiu

i (a

u)d−i

= 0.

This implies au ∈ AP .

If au ∈ AP , then there are ai

ui∈ AP with

(a

u)d

+∑d

i=1

aiui

(a

u)d−i

= 0

Hence

(a ⋅ u1 ⋅ ... ⋅ ud)d+∑

d

i=1ai (u

i ⋅∏j≠iaj) (a ⋅ u1 ⋅ ... ⋅ un)d−i = 0

so a′ = a ⋅ u1 ⋅ ... ⋅ ud ∈ A. This implies a ∈ AP .

Page 254: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

8. NORMALIZATION 244

Corollar 8.2.2 A is normal if and only if AP is normal for all P .

Proof. If A = A then by Theorem 8.2.1 we have AP = AP = AP forall P . On the other hand, if AP = AP for all P then, again usingthe Theorem 8.2.1, AP = AP for all P ∈X. Using [5, Corollary 2.9]this implies A = A.

Definition 8.2.3 We call

N(A) = {P ∈X ∣ AP is not normal}

the non-normal locus of A.

Remark 8.2.4 By Corollary 8.2.2 the ring A is normal if and onlyif N(A) is empty.

Our next goal is to show that the non-normal locus can bedescribed by an ideal. It will be convenient to use the followingdefinitions (coming from the theory of schemes, see Exercise 3.20):Let X = Spec(A) as above. For an ideal J ⊂ A we define by

V(J) = {P ∈X ∣ P ⊃ J} ⊂X

its vanishing locus. Subsets of the form V(J) are the closed setsof a topology on X, the Zariski topology. On the other hand, forany subset Y ⊂X we write

I(Y ) = ⋂P ∈Y P

for its zero ideal. Then, using Remark 7.5.8, it follows immedi-ately:

Theorem 8.2.5 If J ⊂ A is an ideal then

I(V(J)) =√J .

Definition 8.2.6 The conductor of A in A is

CA = {a ∈ A ∣ aA ⊂ A}.

It is an ideal of both A and A.

Lemma 8.2.7 N(A) = V(CA).

Page 255: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

8. NORMALIZATION 245

Proof. N(A) ⊂ V(CA) ∶ If P ∈ N(A), that is, AP ⫋ AP then

(CA)P = CAP = {a ∈ AP ∣ aAP ⊂ AP} ⫋ AP

However if P ∉ V(CA) then (CA)P = AP .

V(CA) ⊂ N(A) ∶ By

V(CA) = ⋃h∈AV({a ∈ A ∣ ah ∈ A}),

we have to show that for all h = pq ∈ A ⊂ quot(A) it holds

V({a ∈ A ∣ ah ∈ A}) ⊂ N(A).

So for every prime P we have to prove

{a ∈ A ∣ ah ∈ A} ⊂ P Ô⇒ AP ⫋ AP .

If AP = AP then the image of h in AP is p/q1 = p

q , that is, q ∉ P .Moreover, qh = p ∈ A, which proves the claim.

In order to compute the normalization we require some knowl-edge about the non-normal locus N(A). In general, CA can only becomputed a-posteriori from A. Fortunately, the singular locus of Acan be obtained explicitly, and contains the non-normal locus:

Definition 8.2.8 For an ideal I = ⟨f1, . . . , fs⟩ ⊂ K[x1, . . . , xn], theJacobian ideal Jac(I) is generated by the c × c minors of theJacobian matrix

⎛⎜⎝

∂f1∂x1

⋯ ∂f1∂xn

⋮ ⋮∂fs∂x1

⋯ ∂fs∂xn

⎞⎟⎠

where c = n − dim(X) is the codimension of X = V (I). Then thesingular locus of A is

Sing(A) = V(Jac(I) + I).

Note that we can consider Jac(I) + I both as an ideal in A =K[x1, . . . , xn]/I and in K[x1, . . . , xn], in fact it is easy to prove:

Remark 8.2.9 There is a bijection between the ideals of A and theideals of K[x1, . . . , xn] which contain I.

Example 8.2.10 Consider the coordinate ring

A =K[x, y] =K[x, y]/I

Page 256: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

8. NORMALIZATION 246

of the plane curve X = V(I) defined by

I = ⟨x4 + y2(y − 1)3⟩.

ThenJac(I) = ⟨x3, 2y(y − 1)3 + 3y2(y − 1)2⟩

In Singular we can compute the ideal Jac(I)+ I ⊂K[x, y] by thecommand slocus:ring R = 0,(x,y),dp;

ideal I = x^4 + y^2*(y-1)^3;

ideal singI = std(slocus(I));

singI;

[1]=y3-2y2+y

[2]=x3

We compute a minimal primary decomposition of the singular locus:primdecGTZ(singI);

[1]:

[1]:

[1]=y2-2y+1

[2]=x3

[2]:

[1]=y-1

[2]=x

[2]:

[1]:

[1]=y

[2]=x3

[2]:

[1]=y

[2]=x

So √Jac(I) + I = ⟨x, y⟩ ∩ ⟨x, y − 1⟩ ,

and the singular locus of the curve X = V (I) consists of two points(0,0), (0,1).

For the non-normal and the singular locus there is the followinginclusion (without proof):

Theorem 8.2.11 N(A) ⊂ Sing(A).

Page 257: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

8. NORMALIZATION 247

8.3 Finiteness of normalization

The following result will allow us to design an algorithm computingA in a finite number of steps:

Theorem 8.3.1 A is a finitely generated A-module.

Hence A is a Noetherian A-module by Theorem 4.3.12, since Ais a Noetherian ring by Example 2.4(3).Proof. Noether normalization gives algebraically independent y1, . . . , ys ∈A such that A is a finitely generated K[y1, . . . , ys]-module. Then

K[y1, . . . , ys] ⊂ A ⊂ A ⊂K(y1, . . . , ys) ⊂ L ∶= quot(A)

Note that K[y1, . . . , ys] = A, since K[y1, . . . , ys] ⊂ A is finite.Note that in characteristic zero any finite extension is separable.

Hence we may assume that the finite extension K(y1, . . . , ys) ⊂ Lis Galois. Otherwise we pass to the normal closure K(y1, . . . , ys) ⊂L ⊂ L′. Then the same arguments as below prove that the integralclosure of A in L′ is finite over A, which implies that A is finite overA.

So, with the Galois group G of K(y1, . . . , ys) ⊂ L, consider thetrace

Tr ∶ L → K(y1, . . . , ys)x ↦ ∑g∈G g(x)

The trace yields a nondegenerate bilinear form

L ×L→K(y1, . . . , ys)

(x, y)↦ Tr(xy)

Hence, for a basis x1, . . . , xr ∈ A with

L =K(y1, . . . , ys)(x1, . . . , xr),

there is a dual basis x∗1, . . . , x∗r ∈ L with

Tr(xix∗j ) = δi,j

andL =K(y1, . . . , ys)(x

∗1, . . . , x

∗r).

We show thatA ⊂ Ax∗1 + ... +Ax

∗r

and, hence, A is a finitely generated A-module: Given b ∈ A, thereare ai ∈K(y1, . . . , ys) with

b = a1x∗1 + ... + arx

∗r .

Page 258: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

8. NORMALIZATION 248

By bxi ∈ A we haveai = Tr(bxi) ∈ A

using thatTr(A) ⊂ A.

Indeed, if x ∈ A then Tr(x) is a coefficient of the polynomial

P =∏g∈G

(T − g(x)) .

Since P is invariant under G, we have P ∈ K(y1, . . . , ys)[T ]. Sinceall g(x) for g ∈ G are integral over A all coefficients are integral,hence P ∈ A[T ].

8.4 Grauert-Remmert criterion

The first key observation is that, for any ideal J ⊂ A, the moduleHomA(J, J) lies between A and A. Moreover it can be computedas an ideal quotient. We denote by

(I1 ∶A I2) = {b ∈ A ∣ bI2 ⊂ I1}

the quotient of ideals I1, I2 ⊂ A. Note that if Ii = Ji mod I withideals Ji ⊂ K[x1, . . . , xn], then by Remark 8.2.9 this ideal quotientcan be computed by Algorithm 3.6.3 as

(I1 ∶A I2) = ((J1 + I) ∶ (J2 + I))mod I.

Lemma 8.4.1 If J ⊂ A is an ideal and 0 ≠ g ∈ J , then:

1) Any ϕ ∈ HomA(J, J) is given by multiplication

ϕ ∶ J → J

b ↦ ϕ(g)g b

2) There is a natural inclusion of rings

A ↪ HomA(J, J)a ↦ ϕa ∶ J → J

b↦ ab

3) There is a natural isomorphism of rings

HomA(J, J) ≅ 1g(gJ ∶A J)

ϕ ↦ ϕ(g)g

Page 259: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

8. NORMALIZATION 249

4) Any element of 1g(gJ ∶A J) is integral, that is,

1

g(gJ ∶A J) ⊂ A ⊂ quot(A).

Proof.

1) If ϕ ∶ J → J is a homomorphism and b ∈ J is any otherelement, then by A-linearity

g ⋅ ϕ(b) = ϕ(gb) = b ⋅ ϕ(g),

hence for b ≠ 0

ϕ(g)

g=ϕ(b)

b∈ quot(A).

This implies that ϕ(g)g b = ϕ(b)

b b = ϕ(b) for b ≠ 0. For b = 0 theclaim is trivial.

2) If ϕa = 0, that is, ab = 0 for all b ∈ J . Since 0 ≠ g ∈ J is anon-zerodivisor, it follows that a = 0.

3) If ϕ ∈ HomA(J, J) then by (1) we have ϕ(g)g J ⊂ J , that is,

ϕ(g)J ⊂ gJ . This proves that ϕ(g) ∈ (gJ ∶A J) since ϕ(g) ∈J ⊂ A, so the specified map is well-defined. Moreover, by (1)it is injective, as ϕ = 0 if ϕ(g) = 0. It is surjective since for anyg′ ∈ (gJ ∶A J) a well-defined homomorphism J → J is givenby b↦ g′

g b.

4) Finally, we have to prove that for

b ∈ (gJ ∶A J)

the element bg ∈ quot(A) is integral over A: Consider the A-

linear multiplication map Lb ∶ J → J , a ↦ ab. Fix A-modulegenerators g1, . . . , gs of J . By bJ ⊂ gJ , there are

bij ∈ ⟨g⟩

withbgj = ∑ibijgi

which yields an s × s-matrix (bij) representing Lb. By thetheorem of Cayley-Hamilton, Lb is a zero of the characteristicpolynomial

χ(t) = det(t ⋅E − (bij)).

Page 260: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

8. NORMALIZATION 250

Hence, there are ai ∈ A with

bs + a1bs−1 + ... + as−1b

1 + as = 0.

Since ai is a linear combination of i×i-minors of (bij) we have

ai ∈ ⟨g⟩i.

Hence

(b

g)s

+a1

g(b

g)s−1

+ ... +as−1

gs−1(b

g)

1

+asgs

= 0

is a monic equation for bg over A.

Remark 8.4.2 If J ⊂ A is an ideal and 0 ≠ g ∈ J , then

(gJ ∶A J) = (gJ ∶quot(A) J).

Proof. The inclusion ⊂ is clear. If g′ ∈ quot(A) with g′J ⊂ gJ thena well-defined homomorphism ϕ ∶ J → J is given by b ↦ g′

g b. ByLemma 8.4.1(3.) it follows that

ϕ(g)

g∈

1

g(gJ ∶A J),

that is,g′ = ϕ(g) ∈ (gJ ∶A J).

The following criterion for normality is due to Grauert and Rem-mert. It is the basis for an algorithmic approach on computing thenormalization. It tells us that, if forming HomA(J, J) does notenlarge A any more, then we have reached A. However this onlyworks if J sees all of the non-normal locus, that is N(A) ⊂ V(J).

Theorem 8.4.3 (Grauert-Remmert criterion) Let 0 ≠ J ⊂ Abe a radical ideal with

N(A) ⊂ V(J).

Then A is normal if and only if the inclusion

A ↪ HomA(J, J)a ↦ ϕa

is an isomorphism.

Page 261: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

8. NORMALIZATION 251

Proof. If A = A then, by Lemma 8.4.1, we have injective mapsA↪ HomA(J, J)↪ A, which proves the claim.

For the converse: By Lemma 8.2.7

V(CA) = N(A) ⊂ V(J).

Hence, by Theorem 8.2.5,

J =√J = I(V(J)) ⊂ I(V(CA)) =

√CA,

which implies that there is a smallest m ≥ 0 with Jm ⊂ CA, that is,

JmA ⊂ A.

Assume that m > 0. Then there is a ∈ Jm−1 and b ∈ A with ab ∈A − A. Moreover, abJ ⊂ A, so multiplication by ab defines an A-homomorphism

ϕab ∶ J → Ac ↦ abc

Since ab ∈ A there is a monic equation

(ab)d + a1(ab)d−1 + ... + ad = 0

with ai ∈ A. If 0 ≠ c ∈ J , then

(abc)d = −a1c(abc)d−1 − ... − adc

d ∈ J

hence abc ∈√J = J , that is,

ϕab ∈ HomA(J, J).

If we assume that A→ HomA(J, J), c↦ ϕc is an isomorphism, thenab ∈ A, a contradiction. Hence m = 0, that is, A = A.

Definition 8.4.4 A pair (J, g) with J as in Theorem 8.4.3 and0 ≠ g ∈ J is called a test pair for A, and J is called a test idealfor A.

By Lemma 1.6.13 we can choose the Jacobian ideal togetherwith any non-zero element as a test pair.

Page 262: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

8. NORMALIZATION 252

8.5 Normalization algorithm

By Lemma 8.4.1 and Theorem 8.4.3, if A is not normal, computingHom as an ideal quotient yields a ring

A ⫋ HomA(J, J) ≅1

g(gJ ∶A J) ⊂ A ⊂ quot(A),

that is strictly larger than A and is contained in A.

Example 8.5.1 For A as in Example 8.2.10, the radical of theJacobian ideal is

J ∶= ⟨x, y (y − 1)⟩A ,

and we can take g ∶= x ∈ J as a non–zerodivisor of A. Using Sin-gular we can determine HomA(J, J) as an ideal quotient:LIB "normal.lib";

ring R = 0,(x,y),dp;

ideal I = x^4+y^2*(y-1)^3;

qring A = std(I);

ideal J = x, y*(y-1);

quotient(x*J, J);

[1]=x

[2]=y3-2y2+y

HenceA ⫋ A1 ⊂ A ⊂ quot(A)

with

A1 =1

x(xJ ∶A J) =

1

x⟨x, y(y − 1)2⟩

=A ⟨1,y(y − 1)2

x⟩ .

By iterating this calculation, we obtain Algorithm 8.5.1.We prove correctness of the algorithm:

Proof. Starting from A0 = A, we get a chain of extensions ofreduced Noetherian rings

A = A0 ⊂ ⋅ ⋅ ⋅ ⊂ Ai−1 ⊂ Ai ⊂ ⋅ ⋅ ⋅ ⊂ Am = A.

Since A is Noetherian, by Theorem 8.3.1 the sequence terminates,that is, for some m we have Am = Am+1. By Theorem 8.4.3 it thenholds Am = A.

Moreover, (Ji, g) is a test pair for Ai by the following lemma:

Page 263: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

8. NORMALIZATION 253

Algorithm 8.5.1 Normalization

Input: Prime ideal I ⊂K[x1, ..., xn].Output: Normalization A of A =K[x1, ..., xn]/I.

1: Initial test pair: J0 ∶=√

Jac(I) + I ⊂ A and select 0 ≠ g ∈ J0.2: i = 03: repeat4: i = i + 15: Ai =

1g(gJi−1 ∶Ai−1 Ji−1)

6: Ji =√JAi−1

7: until Ai = Ai−1

Lemma 8.5.2 Let A ⊂ A′ ⊂ A be extensions of rings and (J, g) atest pair for A. Then (

√JA′, g) is a test pair for A′.

Proof. Clearly, g ∈ A is also a non-zero element of A′ ⊂ quot(A).For J ′ =

√JA′ we have to show that N(A′) = V(CA′) ⊂ V(J ′), that

is, if CA′ ⊂ Q for a prime Q then J ′ ⊂ Q.Let P = Q ∩A. Then P is prime: If f ⋅ g ∈ P ⊂ Q with f, g ∈ A

then f ∈ Q or g ∈ Q. Hence f ∈ P or g ∈ P .By A′ = A we have

Q ⊃ CA′ = {a ∈ A′ ∣ aA ⊂ A′} ⊃ {a ∈ A ∣ aA ⊂ A} = CA.

Hence Q ∩ A ⊃ CA, that is, Q ∩ A ∈ V(CA) = N(A) ⊂ V(J). SoJ ⊂ Q ∩ A, which implies that JA′ ⊂ Q. Using Remark 7.5.8 itfollows that √

JA′ = ⋂Q′⊃JA′ primeQ′ ⊂ Q.

Practical computations rely on explicit representations of the Aias A–algebras. These will be obtained as an application of Lemma8.5.3 below. To formulate the lemma, we use the following notation.Let J ⊂ A be an ideal containing a non–zerodivisor g of A, andlet A–module generators u0 = g, u1, . . . , us for (gJ ∶A J) be given.Choose variables T1, . . . , Ts, and consider the epimorphism

Φ ∶ A[T1, . . . , Ts]→1

g(gJ ∶A J), Ti ↦

uig

,

hence1

g(gJ ∶A J) ≅ A[T1, . . . , Ts]/ker(Φ).

The kernel of Φ describes the A–algebra relations on the ui/g. Thesecan be computed by Algorithm 3.5.15. In fact, in this setup, theycan be described explicitly:

Page 264: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

8. NORMALIZATION 254

• Each A–module syzygy

α0u0 + α1u1 + . . . + αsus = 0, αi ∈ A,

gives an element α0 +α1T1 + . . .+αsTs ∈ ker(Φ), which we calla linear relation.

• Developing each productuig

ujg , 1 ≤ i ≤ j ≤ s, as a sum

uig

ujg =

∑k βijkukg , we get elements TiTj −∑k βijkTk in ker Φ, which we

call quadratic relations.

Lemma 8.5.3 The linear and quadratic relations generate ker(Φ).

For a proof see [9, Lemma 3.6.7].

Example 8.5.4 For A1 as in Example 8.5.1, we find

A[t1]/I1 ≅ A1

t1 ↦y(y − 1)2

x

with

I1 = ⟨−t1x + y(y − 1)2, t1y(y − 1) + x3, t21 + x2(y − 1)⟩ .

In this representation of A1 we can compute

J1 =√A1 ⟨x, y(y − 1)⟩ =A1 ⟨x, y(y − 1), t1⟩ .

Finally, the following result will allow us to find the normaliza-tion in a way such that in all steps of the algorithm the computationof Hom can be carried through in the original ring A:

Theorem 8.5.5 Let 0 ≠ J ⊂ A be an ideal and A ⊂ A′ ⊂ A anintermediate ring, and let J ′ =

√JA′. Let U and H be ideals of A

and d ∈ A such that A′ = 1dU and J ′ = 1

dH, respectively. Then

(gJ ′ ∶A′ J′) =

1

d(dgH ∶A H) ⊂ quot(A).

Proof. By Remark 8.4.2, g ∈ J ⊂ J ′ and quot(A) = quot(A′) weget

(gJ ′ ∶A′ J′) = (gJ ′ ∶quot(A) J

′)

and, in the same way, by dg ∈H

(dgH ∶A H) = (dgH ∶quot(A) H) .

Page 265: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

8. NORMALIZATION 255

Moreover

(gJ ′ ∶quot(A) J′) = {a ∈ quot(A) ∣ a

1

dH ⊂ g

1

dH}

= {a ∈ quot(A) ∣ aH ⊂ gH}

= (gH ∶quot(A) H)

and

(dgH ∶quot(A) H) = {b ∈ quot(A) ∣ bH ⊂ dgH}

= {b ∈ quot(A) ∣b

dH ⊂ gH}

= d {a ∈ quot(A) ∣ aH ⊂ gH}

= d (gH ∶quot(A) H) ,

which proves the claim.Note that, in the setup of the algorithm, in every step, d can be

chosen to be a power of g.

Example 8.5.6 Continuing Example 8.5.4 we write J1 as an A-module

J1 =1

x⟨x2, xy(y − 1), y(y − 1)2⟩ =

1

dH1

with d = x and H1 = ⟨x2, xy(y − 1), y(y − 1)2⟩ ⊂ A.Using the test pair (J1, x) and applying Theorem 8.5.5 and Lemma

8.5.3, we get

1

x(xJ1 ∶A1 J1) =

1

x2(x2H1 ∶A H1) =

1

x2⟨x2, xy(y − 1), y(y − 1)2⟩

=A ⟨1,y(y − 1)

x,y(y − 1)2

x2⟩

andA2 ∶= A[t1, t2]/I2 ≅ A ⟨1, y(y−1)

x , y(y−1)2x2 ⟩

t1 ↦ y(y−1)2x2

t2 ↦ y(y−1)x

with

I2 = ⟨t1x − t2(y − 1), − t2x + y(y − 1), t1y(y − 1) + x2, t1y2(y − 1)2 + t2x

3,

t21 + (y − 1), t1t2 + x, t22 − t2y⟩

In the final step, we find that A2 is normal, so that A = A2.

Page 266: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

8. NORMALIZATION 256

Example 8.5.7 The normalization algorithm described above, isavailable in Singular. In fact, this is the first implementation ofa normalization algorithm which is practically useable. We apply itto the coordinate ring of the curve from Example 8.5.6:LIB "normal.lib";

ring R = 0,(x,y),dp;

ideal I = x^4+y^2*(y-1)^3;

list nor = normal(I);

def R1 = nor[1][1];

setring R1;

norid;

norid[1]=T(1)*x-T(2)*y+T(2)

norid[2]=-T(2)*x+y^2-y

norid[3]=T(1)*y^2-T(1)*y+x^2

norid[4]=T(1)*y^4-2*T(1)*y^3+T(1)*y^2+T(2)*x^3

norid[5]=T(1)^2+y-1

norid[6]=T(1)*T(2)+x

norid[7]=T(2)^2-T(1)*y

norid[8]=y^5+x^4-3*y^4+3*y^3-y^2

normap;

normap[1]=x

normap[2]=y

We verify that the normalization of the given curve is indeed smooth:std(slocus(norid));

[1]=1

8.6 Exercises

Exercise 8.1 Determine the normalization of the singularity oftype Ak defined by the ideal

⟨y2 − xk+1⟩ ⊂K[x, y]

for k ≥ 2 even.

Exercise 8.2 Let R =K[x, y] and let

I = ⟨yk − xk + xk+1⟩ ⊂ R

be the ideal of an ordinary k-fold point, where k ≥ 2. For A = R/Idetermine A-module generators of A.

Page 267: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

8. NORMALIZATION 257

Exercise 8.3 Determine the normalization of the Whitney um-brella X = V (I) ⊂ A3

I = ⟨x2 − y2z⟩ ⊂K[x, y, z]

(see Figure 3.4).

Exercise 8.4 For the Steiner surface X = V (I) ⊂ A3

I = ⟨x2y2 + x2z2 + y2z2 − xyz⟩ ⊂K[x, y, z]

(see Figure 3.5) determine A-module generators of A where A =K[x, y, z]/I.

Page 268: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

Index

Zariski topology, 244

affine algebra, 241affine algebraic set, 19affine algebraic variety, 19affine chart, 102affine space, 19Algebraic geometry, 4algebraic variety, 4arithmetic genus, 170associated prime, 232associated primes, 237Axiom, 15

Barth sextic, 5basis, 150Betti table, 177Bezout’s theorem, 22, 99, 124bihomogeneous polynomials, 117birational, 90birational map, 90Buchberger normal form, 55Buchberger’s algorithm, 2, 60, 190Buchberger’s criterion, 60

Cayley-Hamilton, theorem of, 159,249

characteristic matrix, 159characteristic polynomial, 159closure, 30codimension, 25, 179, 245coface, 239cokernel, 149column operation, 141conductor, 244Conj. of Birch and Swinnerton-

Dyer, 21

coordinate ring, 88curve, 4cyclic module, 155

degree, 170degree reverse lexicographical or-

dering, 44dehomogenization, 103desingularization, 242determinantal divisors, 145differential equation, 16differential field, 15Diffie-Hellman key exchange, 21dimension, 170, 179, 180direct sum, 155divisibility, 184Division with remainder, 8domain of definition, 89, 110dominant, 90double cone, 4

ecart, 65elementary divisor, 141Elementary divisor theorem, 140elementary divisors of a module,

155elementary extension, 15elimination ideal, 78elimination ordering, 76elliptic curve, 20elliptical arc, 30embedded, 238Euclidean Algorithm, 8Euclidean norm, 39Euclidean ring, 39exact sequence, 167

258

Page 269: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

INDEX 259

exakt, 150exponent vector, 42

face, 239facet, 239fat point, 238Fermat’s last theorem, 10finite, 167finitely determined, 126finitely generated, 31finitely generated module, 150finitely presented, 150first order deformations, 216free module, 150free resolution, 167fundamental thm. of arithmetic,

9

Galois group, 247Gaussian elimination, 2generating system, 29generators, 150, 212geometric invariant theory, 100global ordering, 42global ordering for modules, 182Grobner bases, 2Grobner basis, 53, 187Grobner fan, 48graded free resolution, 172graded module, 168graded ring, 100Grauert-Remmert criterion, 250group of bijections, 14group table, 14

highest corner, 127Hilbert function, 169Hilbert polynomial, 170Hilbert scheme, 216Hilbert’s basis theorem, 33Hom, 215homogeneous, 44homogeneous coordinate ring, 119homogeneous homomorphism, 171

homogeneous ideal, 100homogeneous polynomial, 100homogeneous rational function,

109homogeneous zero ideal, 102homogenization, 67, 107homomorphism theorem for mod-

ules, 149hyperboloid, 4hyperplane at infinity, 102

icosahedron, 5ideal, 29ideal membership problem, 38ideal quotient, 93, 248image, 89, 110implicitation, 81initial term, 48intersection of ideals, 74irreducible, 19irreducible ideal, 229irredundant, 228isolated, 238isolated singularity, 126

Jacobi symbol, 24Jacobian ideal, 126, 245Jordan block, 161

k-determined, 126K3-surface, 220Koszul complex, 168Krull dimension, 180Kummer quartic surface, 4

lead coefficient, 33, 45, 183lead monomial, 33lead term, 33leading ideal, 53leading module, 185leading monomial, 45, 183leading term, 45, 183least common multiple, 189Legendre symbol, 23

Page 270: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

INDEX 260

lexicographic ordering, 44linear system, 87local ordering, 42local ring, 49localization, 49, 243localization at a prime ideal, 50

Macaulay2, 220Maple, 3Mathematica, 15Maxima, 15maximal ideal, 36Milnor number, 127minimal, 62, 233minimal associated primes, 237minimal free resolution, 203minimal generators, 43minimal generators for monomial

submodules, 184minimal Grobner basis, 41minimal polynomial, 159minors, 145module, 147module homomorphism, 149module of homomorphisms, 215monomial ideal, 43monomial ordering, 42monomial ordering for modules,

181monomial submodule, 184monomials, 181morphism, 82, 110multi-index notation, 42multiplicatively closed set, 49, 243

negative lexicographical ordering,44

Noether normalization, 178, 247Noether, Emmy, 31Noetherian, 31Noetherian module, 152non-normallocus, 244normal closure, 247normal form, 54, 185

normalization of a ring, 241normalization of a variety, 241

octahedron, 11ODE, 16orbit, 12ordinary k-fold point, 256

p-adic numbers, 10P-primary, 232Pari/Gp, 11polynomial parametrization, 81polynomial weak normal form, 54presentation matrix, 151primary decomposition, 37, 233primary ideal, 37, 231prime factorization, 9prime number, 9prime number theorem, 10product ordering, 122projection, 78projective algebraic set, 102projective closure, 107projective elimination ideal, 114projective space, 99, 100

Q-rational points, 21quotient module, 148

radical, 35radical ideal, 35rank, 155rational function field, 89rational map, 85, 89, 109rational map of projective spaces,

110rational parametrization, 87Reduce, 15reduced, 57, 62, 188reduced Buchberger normal form,

57reduced Grobner basis, 41reduced normal form, 57, 188relations, 212

Page 271: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

INDEX 261

Riemann-Roch theorem, 242right equivalent, 125ring of convergent power series,

125Risch’s algorithm, 15row operation, 141

S-pair, 17S-polynomial, 59, 189saturation, 112scheme, 34Schreyer ordering, 193semigroup ordering, 42sieve of Eratosthenes, 9simplicial complex, 239Singular, 2singular locus, 245singularity, 4singularity of type Ak, 256Smith normal form, 141spectrum, 34, 243stabilizer, 12standard basis, 53standard grading, 101standard represenation, 54Stanley-Reisner ideal, 239Steiner surface, 83subfield of constants, 15submodule, 148subquotient, 212sum of ideals, 74surface, 4Surfer, 4syzygy, 61, 192syzygy matrix, 192syzygy module, 167, 192syzygy polynomial, 59, 189syzygy theorem, 167, 199

term, 181test ideal, 251test pair, 251tetrahedron, 5Theorem of Cayley, 14

Theorem of Mordell, 21tie-break, 46Togliatti quintic, 5toric geometry, 100torsion modul, 156torsion submodule, 156torsion-free, 156total ordering, 42, 181trial division, 9twist, 171

unique factorization domain, 242

vanishing ideal, 30vanishing locus, 30vanishing locus, scheme theoretic,

244Veronese surface, 119

weighted degree ordering, 46well ordering, 42Whitney umbrella, 81Wiles, Andrew, 10

Zariski topology, 31, 108zero ideal, scheme theoretic, 244

Page 272: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

Bibliography

[1] Atiyah, M. F.; MacDonald, I. G.: Introduction to commutativealgebra (1969).

[2] The Axiom Group: Axiom, http://www.axiom-developer.org/(2017).

[3] Bosma, W.; Cannon J.; Playoust C.: The Magma algebra sys-tem. I. The user language, J. Symbolic Comput., 24 (1997),235–265.

[4] J. Bohm: Grundlagen der Algebra und Zahlentheorie, Springer(2016).

[5] J. Bohm: Mathematik fur Informatiker: Algebraische Struk-turen, Lecture Notes (2018).

[6] J. Bohm, M. Marais: Introduction to algebraic structures, Lec-ture Notes (2019).

[7] Decker, W.; Greuel, G.-M.; Pfister, G.; Schonemann, H.:Singular 4-1-0 — A computer algebra system for polyno-mial computations, available at http://www.singular.uni-kl.de(2017).

[8] Eisenbud, D.: Commutative Algebra with a View Toward Al-gebraic Geometry. Springer (1995).

[9] Endrass, S.: Surf, http://surf.sourceforge.net

[10] Grayson, D. R.; Stillman, M. E.: Macaulay2, a soft-ware system for research in algebraic geometry, available athttp://www.math.uiuc.edu/Macaulay2/ (2017).

[11] Greuel, G.-M.; Meyer, H.; Stussak, Ch.: Surfer,http://www.imaginary-exhibition.com/surfer.php (2008).

[12] Greuel, G.-M.; Pfister, G: A Singular introduction to commu-tative algebra, Springer (2002).

262

Page 273: Computer Algebraboehm/lehre/17_CA/ca.pdf · Computer Algebra Lecture Notes, Summer Term 2017 Janko B ohm January 6, 2020

BIBLIOGRAPHY 263

[13] Hearn, A. C.: REDUCE 3.8, available at http://reduce-algebra.com/ (2009).

[14] Herzog, J.; Hibi, T.: Monomial ideals, Springer (2011).

[15] Maple (Waterloo Maple Inc.): Maple 2017,http://www.maplesoft.com/ (2017).

[16] Maxima: Maxima, a Computer Algebra System. Version 5.40.0,available at http://maxima.sourceforge.net/ (2017).

[17] The GAP Group, GAP – Groups, Algorithms, and Program-ming, Version 4.8.7, available at http://www.gap-system.org(2017).

[18] The PARI-Group, PARI/GP, version 2.9.2, available athttp://pari.math.u-bordeaux.fr/ (2017).

[19] Wolfram Research, Inc.: Mathematica Edition: Version 7.0(2008).