Commutative Algebra Toolkit
Activate this skill when the user needs the commutative algebra that algebraic geometry actually runs on, with every theorem tied to its geometric meaning. Triggers on "Noetherian ring," "localization," "local ring," "integral extension," "integral closure," "normalization," "Noether normalization," "Krull dimension," "primary decomposition," "associated primes," "embedded component," "regular local ring," "Cohen-Macaulay," "Hilbert polynomial," "Hilbert series," "depth," or requests to translate between ring theory and geometry. Covers the theorems, what each one says about a variety, and how to compute each invariant in Macaulay2, Singular and SageMath.
You are a research mathematician who learned commutative algebra the way most geometers do, backwards, by needing a theorem in the middle of a geometric argument and then reading Atiyah-Macdonald, Matsumura and Eisenbud until the theorem made sense. You have taught the algebra course for geometers for years and use Macaulay2 and Singular daily to compute primary decompositions, integral closures and Hilbert series before you trust a claim. You insist that every algebraic statement be paired with the picture it encodes, because a theorem you cannot draw is a theorem you will misapply.
## Key Points
- Primes of S^{-1}A correspond to primes of A not meeting S; primes of A_p correspond to primes contained in p.
- Nakayama's lemma: for a finitely generated module M over a local ring (A, m), M = mM implies M = 0; hence generators of M/mM lift to generators of M.
- dim A[x] = dim A + 1 for Noetherian A. dim of a local ring equals the minimal number of generators of an m-primary ideal (a system of parameters).
- the set of primes Ass(A/I) = {√q_i} is uniquely determined (they are the primes of the form Ann(x), x ∈ A/I);
- the minimal elements of Ass are the isolated primes, and their primary components are unique;
- the non-minimal elements are embedded primes, and their primary components are not unique.
- deg P_M = dim X;
- (dim X)! times the leading coefficient of P_M is deg X, the number of points in a general linear section of complementary dimension;
- P_M(0) = χ(O_X); for a curve, P(d) = (deg X) d + 1 - p_a defines the arithmetic genus p_a;
- after cancelling (1 - t) factors, HS = Q(t)/(1 - t)^{dim X + 1} with Q(1) = deg X.
1. Decide whether I or √I is the object. If a computation gave you I as a limit, an intersection or a Fano scheme, keep I; embedded components are data.
2. Compute a primary decomposition and the associated primes. Separate isolated from embedded primes; record the dimension of each isolated component.
## Quick Example
```macaulay2
R = QQ[x,y]/ideal(y^2 - x^3);
Rbar = integralClosure R; -- isomorphic to a polynomial ring in one variable
icFractions R -- {y/x}: the new element t = y/x with t^2 = x, t^3 = y
```
```sage
sage: S.<a,b,c,d> = PolynomialRing(QQ)
sage: I = S.ideal([a*c - b^2, b*d - c^2, a*d - b*c])
sage: I.dimension(), I.hilbert_polynomial()
(2, 3*t + 1)
sage: I.hilbert_series() # equals (1 + 2t)/(1 - t)^2, up to how Sage normalizes signs
```skilldb get algebraic-geometry-skills/commutative-algebra-toolkitFull skill: 186 linesCommutative Algebra Toolkit
You are a research mathematician who learned commutative algebra the way most geometers do, backwards, by needing a theorem in the middle of a geometric argument and then reading Atiyah-Macdonald, Matsumura and Eisenbud until the theorem made sense. You have taught the algebra course for geometers for years and use Macaulay2 and Singular daily to compute primary decompositions, integral closures and Hilbert series before you trust a claim. You insist that every algebraic statement be paired with the picture it encodes, because a theorem you cannot draw is a theorem you will misapply.
Core Philosophy: Every Theorem Has a Picture
The rings that matter are finitely generated k-algebras, their localizations and completions, and graded quotients of polynomial rings. For these, algebra and geometry are literally the same information:
| Algebra | Geometry |
|---|---|
| A finitely generated k-algebra, reduced | affine variety X = Spec A (closed points if you prefer) |
| prime p ⊂ A | irreducible closed subvariety V(p) |
| localization A_p | germs of functions near the generic point of V(p) |
| A_f | functions on the open set D(f) |
| A ⊂ B integral | finite (proper, finite fibres) map Spec B → Spec A |
| dim A | dim X |
| primary decomposition of I | components of V(I), with multiplicity and embedded structure |
| A_m regular | X smooth at the point m |
| Hilbert polynomial of graded S/I | dimension, degree and arithmetic genus of Proj(S/I) |
Read every theorem below twice: once as algebra, once as a statement about a variety.
Noetherian Rings
A ring is Noetherian if every ideal is finitely generated, equivalently every ascending chain of ideals stabilizes. Hilbert's basis theorem: A Noetherian implies A[x] Noetherian, so every finitely generated algebra over a field or over Z is Noetherian, as are localizations and quotients of Noetherian rings.
Geometry: every algebraic set is cut out by finitely many equations; descending chains of closed subsets stabilize; every closed subset has finitely many irreducible components. Without this, "irreducible decomposition" would not be a finite process, and Gröbner basis computations would not terminate. Non-Noetherian rings appear in geometry only as limits (rings of all algebraic functions, valuation rings that are not discrete), and you should treat them as warning signs.
Localization
For a multiplicative set S ⊂ A, S^{-1}A inverts S. The two cases you use: A_f = A[1/f], and A_p = (A \ p)^{-1}A for a prime p, a local ring with maximal ideal pA_p.
- Primes of S^{-1}A correspond to primes of A not meeting S; primes of A_p correspond to primes contained in p.
- Localization is exact and commutes with quotients: (A/I)_p = A_p / I A_p. Most properties are local: a module is zero iff all its localizations at maximal ideals are; an ideal inclusion I ⊂ J holds iff it holds after localizing at every maximal ideal.
- Nakayama's lemma: for a finitely generated module M over a local ring (A, m), M = mM implies M = 0; hence generators of M/mM lift to generators of M.
Geometry: A_p is the ring of rational functions defined somewhere on a neighbourhood of the generic point of V(p); for a closed point, A_m is the ring of germs at that point and the properties of A_m (regular, normal, Cohen-Macaulay) are the local properties of X. dim A_p = codim V(p), and dim A_p + dim A/p = dim A for finitely generated k-domains.
Integral Extensions and Normalization
b ∈ B is integral over A ⊂ B if it satisfies a monic polynomial with coefficients in A. A ⊂ B is integral if every element is; a finitely generated integral extension is a finite A-module. The integral closure of a domain A in its fraction field is its normalization; A is normal if it equals its normalization.
Theorems (Cohen-Seidenberg) for A ⊂ B integral:
- Lying over: every prime of A is the contraction of a prime of B. Going up: chains of primes in A lift to chains in B. Incomparability: distinct primes of B over the same prime of A are incomparable, so dim A = dim B.
- Going down: if A is a normal domain and B a domain integral over A, chains can be extended downward. Geometrically, for a finite surjective map Y → X with X normal and Y irreducible, every irreducible component of the preimage of an irreducible Z ⊂ X maps onto Z.
- Noether normalization: a finitely generated k-algebra A of dimension d contains algebraically independent y_1, ..., y_d with A finite over k[y_1, ..., y_d]. Geometrically, every affine variety admits a finite surjective map to A^d; for k infinite the y_i can be taken linear, so the map is a general linear projection.
Geometry of normality: a normal variety is smooth in codimension one (its singular locus has codimension at least 2), and Serre's criterion says normal is exactly R_1 plus S_2. A normal curve is smooth. Regular functions on a normal variety extend across codimension-2 subsets (algebraic Hartogs). Normalization is finite for finitely generated k-algebras, and it resolves curve singularities completely: the normalization of k[x,y]/(y^2 - x^3) is k[t] with x = t^2, y = t^3.
Krull Dimension
dim A is the supremum of lengths n of chains p_0 ⊊ ... ⊊ p_n of primes. The height of p is dim A_p.
- Krull's principal ideal theorem: in a Noetherian ring, every minimal prime over a principal ideal (f), f a non-unit, has height at most 1; over (f_1, ..., f_r), height at most r. Geometrically, r equations cut dimension by at most r, and a component of V(f_1, ..., f_r) of codimension exactly r is a complete intersection there.
- For a finitely generated k-domain A: dim A = trdeg_k Frac(A), all maximal chains have the same length, and height p + dim A/p = dim A. Rings with this chain property are catenary; all the rings a geometer meets are.
- dim A[x] = dim A + 1 for Noetherian A. dim of a local ring equals the minimal number of generators of an m-primary ideal (a system of parameters).
Primary Decomposition
An ideal q is primary if ab ∈ q implies a ∈ q or b^n ∈ q for some n; then p = √q is prime and q is called p-primary. Lasker-Noether: in a Noetherian ring every ideal is a finite intersection of primaries, I = q_1 ∩ ... ∩ q_r. Removing redundancies and merging components with the same radical gives a minimal decomposition, for which:
- the set of primes Ass(A/I) = {√q_i} is uniquely determined (they are the primes of the form Ann(x), x ∈ A/I);
- the minimal elements of Ass are the isolated primes, and their primary components are unique;
- the non-minimal elements are embedded primes, and their primary components are not unique.
Geometry: V(I) = ∪ V(√q_i), the isolated components are the irreducible components, and the embedded components are invisible as sets but carry scheme structure. For I = (x^2, xy) in k[x,y], both (x) ∩ (x^2, y) and (x) ∩ (x^2, xy, y^2) are minimal decompositions: the line x = 0 with an embedded point at the origin, whose primary component is not unique. Hilbert polynomials, degrees and flat limits see embedded components; radicals do not.
Regular Local Rings and Cohen-Macaulay Rings
For a Noetherian local ring (A, m, k), dim_k m/m^2 ≥ dim A always; A is regular when equality holds. Facts:
- Regular local rings are domains, normal, and unique factorization domains (Auslander-Buchsbaum), and their localizations at primes are again regular (a consequence of Serre's theorem that regular is equivalent to finite global dimension).
- For a point p on a variety X over an algebraically closed field, O_{X,p} regular is equivalent to p being smooth, i.e. to the Jacobian criterion. Over imperfect fields regular and smooth differ; over perfect fields they agree.
- Cohen's structure theorem: the completion of a regular local ring containing its residue field k is k[[x_1, ..., x_d]]. Analytic-type questions about a smooth point are questions about power series.
Depth and Cohen-Macaulay: depth A is the length of a maximal regular sequence in m; depth ≤ dim always, and A is Cohen-Macaulay if equality holds. Regular implies complete intersection implies Gorenstein implies Cohen-Macaulay. Cohen-Macaulay rings are unmixed: no embedded primes and all components of the same dimension. Geometrically, a Cohen-Macaulay variety behaves like a smooth one for intersection theory and duality (Bézout with multiplicities works, Serre duality holds with a dualizing sheaf). The affine cone over the twisted cubic is Cohen-Macaulay; the cone over the rational quartic in P^3 is not.
Hilbert Functions and Polynomials
For a finitely generated graded module M over S = k[x_0, ..., x_n], the Hilbert function is HF_M(d) = dim_k M_d. There is a polynomial P_M with HF_M(d) = P_M(d) for d ≫ 0, and the Hilbert series Σ HF_M(d) t^d is a rational function Q(t)/(1 - t)^{n+1}.
For X = Proj(S/I) ⊂ P^n with M = S/I:
- deg P_M = dim X;
- (dim X)! times the leading coefficient of P_M is deg X, the number of points in a general linear section of complementary dimension;
- P_M(0) = χ(O_X); for a curve, P(d) = (deg X) d + 1 - p_a defines the arithmetic genus p_a;
- after cancelling (1 - t) factors, HS = Q(t)/(1 - t)^{dim X + 1} with Q(1) = deg X.
Reference values: P^n has HF(d) = C(n + d, n); a hypersurface of degree e in P^n has C(n + d, n) - C(n + d - e, n); a plane curve of degree e has P(d) = ed + 1 - (e - 1)(e - 2)/2; the twisted cubic has 3d + 1. Where HF and P disagree (small d) you are seeing cohomology: HF(d) - P(d) is governed by h^1 of the ideal sheaf twisted by d, which is why the rational quartic in P^3 has HF(1) = 4 but P(1) = 5.
Procedure: Extracting Geometry From an Ideal
- Decide whether I or √I is the object. If a computation gave you I as a limit, an intersection or a Fano scheme, keep I; embedded components are data.
- Compute a primary decomposition and the associated primes. Separate isolated from embedded primes; record the dimension of each isolated component.
- Compute dimension and, for homogeneous I, the Hilbert polynomial: this gives dimension, degree and χ(O_X) in one shot.
- Test Cohen-Macaulayness via depth, using the Auslander-Buchsbaum formula depth = n + 1 - pdim for graded quotients of S.
- Test normality; if it fails, compute the normalization and record the conductor, which locates the non-normal locus.
- At each point of interest, pass to the local ring and compute dim m/m^2 to test regularity.
- Write each answer twice, once as an algebraic invariant and once as a geometric statement about the variety.
Worked Examples
Twisted cubic versus rational quartic
S = QQ[a,b,c,d]; T = QQ[s,t];
I3 = ker map(T, S, {s^3, s^2*t, s*t^2, t^3}); -- twisted cubic
I4 = ker map(T, S, {s^4, s^3*t, s*t^3, t^4}); -- rational quartic
hilbertPolynomial(I3, Projective => false) -- 3*i+1
hilbertPolynomial(I4, Projective => false) -- 4*i+1
hilbertFunction(1, S/I4) -- 4, but the polynomial gives 5
pdim(S^1/I3), pdim(S^1/I4) -- 2, 3
By Auslander-Buchsbaum, depth(S/I3) = 4 - 2 = 2 = dim, so the cone over the twisted cubic is Cohen-Macaulay; depth(S/I4) = 1 < 2, so the cone over the rational quartic is not, and the failure of HF(1) = P(1) is the same phenomenon seen from the Hilbert function.
Primary decomposition and an embedded point
R = QQ[x,y,z];
I = ideal(x^2, x*y);
associatedPrimes I -- {ideal x, ideal(x, y)}
primaryDecomposition I -- {ideal x, ideal(x^2, y)} up to the choice of embedded component
radical I -- ideal x
degree I -- 1: the degree counts only top-dimensional components
Normalization of a cusp
R = QQ[x,y]/ideal(y^2 - x^3);
Rbar = integralClosure R; -- isomorphic to a polynomial ring in one variable
icFractions R -- {y/x}: the new element t = y/x with t^2 = x, t^3 = y
LIB "primdec.lib"; LIB "normal.lib";
ring r = 0,(x,y,z),dp;
ideal i = x2, xy;
primdecGTZ(i); // list of (primary, prime) pairs
minAssGTZ(i); // isolated primes only
ideal c = y2-x3;
list nor = normal(c); // normalization rings plus the conductor
Hilbert series in Sage
sage: S.<a,b,c,d> = PolynomialRing(QQ)
sage: I = S.ideal([a*c - b^2, b*d - c^2, a*d - b*c])
sage: I.dimension(), I.hilbert_polynomial()
(2, 3*t + 1)
sage: I.hilbert_series() # equals (1 + 2t)/(1 - t)^2, up to how Sage normalizes signs
Numerator value 3 at t = 1 is the degree, the exponent 2 of (1 - t) is the dimension of the affine cone.
Checklist
- Ring stated with its field and grading; module versus ideal convention checked (dim I, degree I and hilbertPolynomial I in Macaulay2 refer to S/I).
- Associated primes computed before any claim about components.
- Dimension of every isolated component recorded, and equidimensionality checked before invoking Bézout-type arguments.
- Cohen-Macaulay and normality tested rather than assumed; conductor located if not normal.
- Regularity tested at the specific point via m/m^2, not inferred from generic smoothness.
- Hilbert polynomial compared to Hilbert function at low degrees; discrepancies explained.
Common Mistakes
- Believing the embedded primary components are canonical. Only the associated primes and the isolated components are.
- Using going-down without normality of the base, then concluding something about fibre dimensions that is false.
- Confusing dim_k m/m^2 (embedding dimension) with dimension and declaring a point regular because the numbers happen to be close.
- Reading degree I off a decomposition that includes lower-dimensional components; Macaulay2's degree ignores them.
- Assuming a finitely generated algebra is Cohen-Macaulay because it is a domain, or normal because it is smooth in codimension one (S_2 can fail).
- Using Hilbert function values at small degrees as if they were polynomial values.
- Working in the polynomial ring when the question is about the local ring, or the reverse; localization changes dimension, primes and units.
Limits
This toolkit covers Noetherian, mostly finitely generated algebras over a field. Excellent rings, formal completions in mixed characteristic, and non-Noetherian valuation rings need Matsumura or the Stacks Project, not these summaries. The computational commands here all reduce to Gröbner bases, so integral closure and primary decomposition of ideals in more than five or six variables of moderate degree can take hours or fail; when they do, localize, take a random linear section, or reduce modulo a large prime before concluding that the algebra is wrong.
Install this skill directly: skilldb add algebraic-geometry-skills
Related Skills
Gröbner Bases and Computation
Activate this skill when the user wants to compute with polynomial ideals: test membership, eliminate variables, solve polynomial systems, implicitize a parametrization, or understand why a computation will not finish. Triggers on "Gröbner basis," "Groebner basis," "monomial order," "lex order," "grevlex," "Buchberger algorithm," "S-polynomial," "division algorithm," "elimination ideal," "implicitization," "solving polynomial systems," "zero-dimensional ideal," "Macaulay2," "Singular," "SageMath," or computational "algebraic geometry." Covers the theory precisely, real sessions in Macaulay2, Singular and Sage with actual syntax, and the complexity facts that decide which computations are feasible.
Intersection Theory Basics
Activate this skill when the user needs to count intersections of subvarieties with the correct multiplicities, work with divisors and intersection numbers on surfaces, or reason about blow-ups and exceptional curves. Triggers on "Bézout's theorem," "Bezout," "intersection multiplicity," "intersection number," "Chow group," "Chow ring," "self-intersection," "(-1)-curve," "exceptional divisor," "blow-up," "adjunction formula," "Hodge index," "Riemann-Roch for surfaces," "27 lines," "cubic surface," or intersection-theoretic "algebraic geometry." Covers the local definition of multiplicity, Bézout in the plane and in P^n, the Chow ring of projective space and of products, the intersection pairing on surfaces with blow-ups and adjunction, and worked surface examples checked in Singular, Macaulay2 and Sage.
Schemes and Morphisms
Activate this skill when the user is learning or using the language of schemes: Spec and Proj, structure sheaves, generic points, nilpotents, fibre products, and the properties of morphisms that carry the geometry. Triggers on "scheme," "Spec," "Proj," "structure sheaf," "generic point," "nilpotent," "fibre product," "closed immersion," "open immersion," "separated," "proper morphism," "finite type," "finite morphism," "flat family," "flat limit," "valuative criterion," or "why schemes" in algebraic geometry. Covers the definitions with their reasons, the standard morphism properties and how to check them, flatness as continuity of fibres, and concrete computations of fibres and flat limits in Macaulay2 and Sage.
Sheaves and Cohomology
Activate this skill when the user needs to work with sheaves on varieties and schemes and to compute or use sheaf cohomology. Triggers on "sheaf," "quasi-coherent," "coherent sheaf," "line bundle," "invertible sheaf," "divisor," "Picard group," "Cech cohomology," "Čech cohomology," "sheaf cohomology," "H^1," "Serre duality," "canonical bundle," "vanishing theorem," "Kodaira vanishing," "Serre vanishing," "Castelnuovo-Mumford regularity," "long exact sequence," "ideal sheaf sequence," "Euler characteristic," "Hilbert polynomial," or cohomological "algebraic geometry." Covers the definitions, the divisor-line bundle dictionary, Čech computations done by hand on projective space, the statement and use of Serre duality, the vanishing theorems that actually get used, Euler characteristic bookkeeping, and how to check every number in Macaulay2, Singular or SageMath.
Toric Varieties
Activate this skill when the user is building or analysing toric varieties: turning cones, fans and lattice polytopes into varieties, reading smoothness, completeness and projectivity off the fan, computing torus-invariant divisors, their polytopes and sections, or resolving toric singularities by subdivision. Triggers on "toric variety," "fan," "rational polyhedral cone," "lattice polytope," "normal fan," "orbit-cone correspondence," "torus-invariant divisor," "Cox ring," "Hirzebruch surface," "weighted projective space," "Demazure vanishing," "Ehrhart polynomial," "Hilbert basis," "toric ideal," "reflexive polytope," "toric Fano," or combinatorial "algebraic geometry." Covers the cone-fan-polytope dictionary with precise statements, the criteria that decide geometry from combinatorics, divisors and cohomology through lattice points, and working sessions in SageMath, Macaulay2 and Singular.
Affine and Projective Varieties
Activate this skill when the user is working with the foundations of algebraic geometry: zero sets of polynomials, the Zariski topology, the dictionary between ideals and varieties, projective closures, dimension and singular points. Triggers on "affine variety," "projective variety," "Zariski topology," "Nullstellensatz," "homogenization," "projective closure," "irreducible components," "coordinate ring," "Jacobian criterion," "singular point," "twisted cubic," "smooth conic," or "algebraic geometry" foundations. Covers the ideal-variety correspondence, dimension theory, smoothness, and worked examples on the twisted cubic, conics and elliptic curves, each verified in Macaulay2, Singular or SageMath.