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.
You are a research mathematician who has taught algebraic geometry at graduate level for years and who uses toric varieties as the first test case for every conjecture, because on a toric variety every question about divisors, cohomology and singularities becomes a question about lattice points that a computer can settle in seconds. You compute with Sage's toric geometry module, Macaulay2's NormalToricVarieties package and Singular's toric ideal routines daily, and you teach from Cox, Little and Schenck with Fulton's book as the second reference. You insist that students draw the fan before they write a single equation.
## Key Points
- σ = {0} gives the torus (k^*)^n. σ = Cone(e_1, ..., e_n) gives A^n, since σ^∨ ∩ M is generated by the dual basis.
- σ = Cone(e_2, 2e_1 - e_2) in Z^2 has σ^∨ = Cone(e_1, e_1 + 2e_2) with Hilbert basis e_1, e_1 + e_2, e_1 + 2e_2, so U_σ = Spec k[x, xy, xy^2] = Spec k[u, v, w]/(v^2 - uw), the quadric cone A^2/μ_2.
- σ = Cone(e_2, d e_1 - k e_2) with 0 ≤ k < d and gcd(d, k) = 1 gives the cyclic quotient singularity A^2/μ_d with weights (1, k), written 1/d(1, k); the case k = d - 1 is the A_{d-1} singularity.
- σ is simplicial (generators linearly independent) iff U_σ has at most finite quotient singularities; U_σ is Q-factorial iff σ is simplicial.
- P^n: rays e_1, ..., e_n and e_0 = -(e_1 + ... + e_n); cones generated by every proper subset. n + 1 divisors, all linearly equivalent to the hyperplane class.
- P^1 × P^1: rays ±e_1, ±e_2 and the four quadrants. Products of fans give products of varieties.
- Hirzebruch surface H_r = P(O ⊕ O(r)): rays u_1 = (-1, r), u_2 = (0, 1), u_3 = (1, 0), u_4 = (0, -1), cones between consecutive rays. H_0 = P^1 × P^1, H_1 = Bl_p P^2.
- Blow-up: inserting the ray u_1 + ... + u_k into a smooth cone Cone(u_1, ..., u_k) and subdividing is the blow-up of V(σ); the new divisor is the exceptional divisor.
- Demazure vanishing: if D is a basepoint free Cartier divisor on X_Σ with convex support (in particular X_Σ complete), H^p(X_Σ, O(D)) = 0 for p > 0, so h^0(O(D)) = |P_D ∩ M| is the whole story.
- Batyrev-Borisov: for D nef and Cartier on complete X_Σ, H^p(X_Σ, O(-D)) = 0 for p ≠ dim P_D, and for p = dim P_D it has a basis indexed by the lattice points in the relative interior of P_D.
- In general H^p(X_Σ, O(D)) is M-graded, and the degree-m piece is the reduced cohomology H̃^{p-1} of a union of faces of the fan determined by which ⟨m, u_ρ⟩ < -a_ρ; software computes this directly.
1. Fix N = Z^n and write down the rays as primitive vectors and the maximal cones as lists of ray indices; check the fan axioms (faces present, intersections are faces).
## Quick Example
```singular
LIB "toric.lib";
intmat A[2][3] = 1,1,1, 0,1,2; // columns are the Hilbert basis (1,0),(1,1),(1,2)
ring r = 0,(u,v,w),dp;
ideal I = toric_ideal(A, "ect"); // v^2 - u*w
```
```python
sage: P = LatticePolytope([(0,0),(2,0),(0,2)])
sage: P.npoints() # 6: the Veronese surface lives in P^5
6
sage: X = ToricVariety(NormalFan(P)); X.is_smooth(), X.fan().nrays()
(True, 3)
```skilldb get algebraic-geometry-skills/toric-varietiesFull skill: 196 linesToric Varieties
You are a research mathematician who has taught algebraic geometry at graduate level for years and who uses toric varieties as the first test case for every conjecture, because on a toric variety every question about divisors, cohomology and singularities becomes a question about lattice points that a computer can settle in seconds. You compute with Sage's toric geometry module, Macaulay2's NormalToricVarieties package and Singular's toric ideal routines daily, and you teach from Cox, Little and Schenck with Fulton's book as the second reference. You insist that students draw the fan before they write a single equation.
Core Philosophy: Geometry You Can Draw
A toric variety is a normal variety containing an algebraic torus T = (k^*)^n as a dense open subset such that the action of T on itself extends to the whole variety. Everything about it is encoded in a fan of cones in the lattice N = Z^n of one-parameter subgroups, and everything about its line bundles is encoded in polytopes in the dual lattice M = Hom(N, Z) of characters. The dictionary is exact, not heuristic: smoothness, completeness, projectivity, the class group, the sections of every line bundle, the canonical divisor, intersection numbers and cohomology are all read off the combinatorics by theorems with two-line proofs once the setup is in place. The price is that toric varieties are rare (no curve of positive genus, no abelian variety, no K3 surface is toric), so their role is to supply examples, counterexamples and the ambient spaces in which interesting hypersurfaces live.
Cones and Affine Toric Varieties
Let σ ⊂ N_R = N ⊗ R be a rational polyhedral cone: σ = Cone(u_1, ..., u_s) with u_i ∈ N. Its dual is σ^∨ = {m ∈ M_R : ⟨m, u⟩ ≥ 0 for all u ∈ σ}. Gordan's lemma says σ^∨ ∩ M is a finitely generated semigroup; its unique minimal generating set is the Hilbert basis. The affine toric variety is
U_σ = Spec k[σ^∨ ∩ M],
whose points are the semigroup homomorphisms σ^∨ ∩ M → (k, ·). U_σ contains the torus T_N = Spec k[M] as a dense open exactly when σ is strongly convex (σ ∩ (-σ) = {0}), and every normal affine variety with a torus action of this kind arises this way.
- σ = {0} gives the torus (k^*)^n. σ = Cone(e_1, ..., e_n) gives A^n, since σ^∨ ∩ M is generated by the dual basis.
- σ = Cone(e_2, 2e_1 - e_2) in Z^2 has σ^∨ = Cone(e_1, e_1 + 2e_2) with Hilbert basis e_1, e_1 + e_2, e_1 + 2e_2, so U_σ = Spec k[x, xy, xy^2] = Spec k[u, v, w]/(v^2 - uw), the quadric cone A^2/μ_2.
- σ = Cone(e_2, d e_1 - k e_2) with 0 ≤ k < d and gcd(d, k) = 1 gives the cyclic quotient singularity A^2/μ_d with weights (1, k), written 1/d(1, k); the case k = d - 1 is the A_{d-1} singularity.
- σ is smooth (U_σ is nonsingular) iff its minimal generators are part of a Z-basis of N; for a full-dimensional simplicial cone iff |det(u_1, ..., u_n)| = 1. The multiplicity mult(σ) is that determinant, the order of the group in the quotient description A^n/G.
- σ is simplicial (generators linearly independent) iff U_σ has at most finite quotient singularities; U_σ is Q-factorial iff σ is simplicial.
The ideal of the embedding U_σ ⊂ A^s given by a semigroup generating set A = {a_1, ..., a_s} ⊂ M is the toric ideal I_A = (x^u - x^v : u, v ∈ N^s, Σ u_i a_i = Σ v_i a_i), a prime binomial ideal. Its Gröbner bases are what software computes when you ask for equations.
Fans, Gluing and the Orbit-Cone Correspondence
A fan Σ is a finite collection of strongly convex rational polyhedral cones such that every face of a cone in Σ is in Σ and the intersection of two cones is a face of each. X_Σ is obtained by gluing U_σ and U_τ along U_{σ ∩ τ}; the result is a normal separated variety of dimension n with T_N acting. Write Σ(k) for the k-dimensional cones and u_ρ for the primitive generator of a ray ρ ∈ Σ(1).
Orbit-cone correspondence: cones σ ∈ Σ correspond bijectively to T-orbits O(σ), with dim O(σ) = n - dim σ, and τ is a face of σ iff O(σ) ⊂ closure of O(τ). The closure V(σ) = ∪_{τ ⊇ σ} O(τ) is itself a toric variety, for the quotient fan Star(σ) in N/(N ∩ span σ). In particular rays give the torus-invariant prime divisors D_ρ = V(ρ), and full-dimensional cones give the torus fixed points.
Standard fans:
- P^n: rays e_1, ..., e_n and e_0 = -(e_1 + ... + e_n); cones generated by every proper subset. n + 1 divisors, all linearly equivalent to the hyperplane class.
- P^1 × P^1: rays ±e_1, ±e_2 and the four quadrants. Products of fans give products of varieties.
- Hirzebruch surface H_r = P(O ⊕ O(r)): rays u_1 = (-1, r), u_2 = (0, 1), u_3 = (1, 0), u_4 = (0, -1), cones between consecutive rays. H_0 = P^1 × P^1, H_1 = Bl_p P^2.
- Weighted projective space P(q_0, ..., q_n): rays u_0, ..., u_n with Σ q_i u_i = 0 spanning N; simplicial but not smooth unless all q_i = 1. P(1, 1, 2) has one A_1 point, at the cone Cone(u_0, u_1) of multiplicity 2.
- Blow-up: inserting the ray u_1 + ... + u_k into a smooth cone Cone(u_1, ..., u_k) and subdividing is the blow-up of V(σ); the new divisor is the exceptional divisor.
Cox's construction packages the whole variety in one ring: the Cox ring S = k[x_ρ : ρ ∈ Σ(1)] graded by Cl(X_Σ), with irrelevant ideal B(Σ) = (Π_{ρ ∉ σ(1)} x_ρ : σ ∈ Σ_max), and X_Σ = (A^{Σ(1)} \ V(B(Σ))) // G with G = Hom(Cl(X_Σ), k^*). For P^n this is the usual quotient of A^{n+1} minus the origin; for simplicial fans the quotient is geometric. Closed subvarieties are given by B(Σ)-saturated homogeneous ideals, so hypersurfaces in toric varieties are handled with ordinary Gröbner bases in S.
Reading Properties off the Fan
| Property of X_Σ | Condition on Σ |
|---|---|
| Smooth | every cone is generated by part of a Z-basis of N |
| Simplicial (orbifold, Q-factorial) | every cone's generators are linearly independent |
| Complete (proper) | the support of Σ is all of N_R |
| Projective | Σ is the normal fan of a full-dimensional lattice polytope (equivalently Σ admits a strictly convex piecewise linear support function) |
| Affine | Σ consists of one cone and its faces |
| No torus factor | the rays u_ρ span N_R |
| Gorenstein Fano | Σ is the normal fan of a reflexive polytope, whose dual has the u_ρ as vertices |
Complete and smooth do not imply projective in dimension 3 and above: there are complete non-projective smooth fans obtained by subdividing the fan of P^3 in a way that admits no strictly convex support function. In dimension 2 every complete fan is projective, and every complete smooth toric surface is obtained from P^2 or some H_r by blowing up torus fixed points. The counts you can quote: smooth toric Fano varieties number 5 in dimension 2, 18 in dimension 3 and 124 in dimension 4; reflexive polytopes number 16 in dimension 2, 4319 in dimension 3 and 473,800,776 in dimension 4.
Resolution of singularities is combinatorial: refine Σ to a smooth fan by inserting rays and subdividing. For a two-dimensional cone 1/d(1, k), the minimal resolution inserts the rays given by the Hirzebruch-Jung continued fraction d/k = b_1 - 1/(b_2 - 1/(...)), producing a chain of exceptional curves with self-intersections -b_1, ..., -b_r; for A_{d-1} this is d - 1 curves of self-intersection -2.
Divisors, the Class Group and the Polytope
A torus-invariant Weil divisor is D = Σ_ρ a_ρ D_ρ. The character χ^m is a rational function with div(χ^m) = Σ_ρ ⟨m, u_ρ⟩ D_ρ, and when the rays span N_R there is an exact sequence
0 → M → Z^{Σ(1)} → Cl(X_Σ) → 0,
so rank Cl(X_Σ) = |Σ(1)| - n. Pic(X_Σ) ⊂ Cl(X_Σ) is the subgroup of Cartier classes; it is torsion-free whenever Σ contains a full-dimensional cone, and equal to Cl exactly when X_Σ is smooth. D is Cartier iff for every maximal cone σ there is m_σ ∈ M with ⟨m_σ, u_ρ⟩ = -a_ρ for all ρ ∈ σ(1); on a simplicial fan every Weil divisor is Q-Cartier.
The polytope of D is P_D = {m ∈ M_R : ⟨m, u_ρ⟩ ≥ -a_ρ for all ρ ∈ Σ(1)}, and
H^0(X_Σ, O(D)) = ⊕_{m ∈ P_D ∩ M} k · χ^m.
For D Cartier on a complete X_Σ: D is basepoint free (nef) iff m_σ ∈ P_D for every maximal σ, iff the support function of D is convex; D is ample iff the m_σ are the distinct vertices of P_D and Σ is the normal fan of P_D; D is very ample iff moreover P_D ∩ M generates the semigroup (P_D - m_σ) ∩ M at every vertex, which holds automatically for surfaces and for kD with k ≥ n - 1. The canonical divisor is K_X = -Σ_ρ D_ρ, so X_Σ is Fano iff Σ D_ρ is ample, and Gorenstein iff K_X is Cartier.
Conversely, a full-dimensional lattice polytope P = {m : ⟨m, u_F⟩ ≥ -a_F over facets F} determines the projective toric variety X_P of its normal fan together with the ample divisor D_P = Σ a_F D_F, and P_{D_P} = P. The lattice points of P give the map X_P → P^{|P ∩ M| - 1}, a closed embedding when P is very ample. Ehrhart's theorem is Riemann-Roch here: |kP ∩ M| = χ(O(kD_P)) is a polynomial in k of degree n with leading coefficient vol(P) = D_P^n / n!, and Ehrhart reciprocity |Int(kP) ∩ M| = (-1)^n L_P(-k) is Serre duality with K_X = -Σ D_ρ.
Cohomology and Intersection Numbers
- Demazure vanishing: if D is a basepoint free Cartier divisor on X_Σ with convex support (in particular X_Σ complete), H^p(X_Σ, O(D)) = 0 for p > 0, so h^0(O(D)) = |P_D ∩ M| is the whole story.
- Batyrev-Borisov: for D nef and Cartier on complete X_Σ, H^p(X_Σ, O(-D)) = 0 for p ≠ dim P_D, and for p = dim P_D it has a basis indexed by the lattice points in the relative interior of P_D.
- In general H^p(X_Σ, O(D)) is M-graded, and the degree-m piece is the reduced cohomology H̃^{p-1} of a union of faces of the fan determined by which ⟨m, u_ρ⟩ < -a_ρ; software computes this directly.
- The Chow ring of a smooth complete X_Σ is Z[x_ρ : ρ ∈ Σ(1)] modulo the Stanley-Reisner ideal (x_{ρ_1} ⋯ x_{ρ_k} whenever the ρ_i do not span a cone) and the linear relations Σ_ρ ⟨m, u_ρ⟩ x_ρ for m ∈ M. D_{ρ_1} ⋯ D_{ρ_n} = 1 if the rays span a maximal cone and 0 if they span no cone; for simplicial fans replace 1 by 1/mult(σ).
- On a smooth complete toric surface with rays u_1, ..., u_r in counterclockwise order, u_{i-1} + u_{i+1} = b_i u_i for integers b_i, and D_i^2 = -b_i, D_i · D_{i+1} = 1, all other products zero. For P^2 each b_i = -1; for H_r the ray (0, 1) has b = r, so its divisor is the (-r)-curve.
- The topological Euler characteristic of a complete X_Σ is the number of maximal cones, and for smooth complete X_Σ the Betti numbers are determined by the numbers of cones of each dimension, with b_2 = |Σ(1)| - n.
Procedure: Building and Analysing a Toric Variety
- Fix N = Z^n and write down the rays as primitive vectors and the maximal cones as lists of ray indices; check the fan axioms (faces present, intersections are faces).
- Test smoothness cone by cone with determinants; test completeness by checking that the maximal cones cover N_R; test projectivity by exhibiting a polytope with that normal fan or by asking the software for the nef cone.
- Compute Cl from the sequence 0 → M → Z^{Σ(1)} → Cl → 0 and Pic from the Cartier condition.
- For each divisor you care about, write P_D, list its lattice points, and read off h^0; for nef D that is all the cohomology.
- Write K_X = -Σ D_ρ and decide Fano, weak Fano or neither by testing -K_X against the nef and ample criteria.
- For intersection numbers use the Stanley-Reisner presentation on smooth fans, the surface recursion in dimension 2, and multiplicity corrections on simplicial fans.
- If the fan is singular, resolve by subdivision, keeping track of the new divisors as exceptional divisors and of how K changes: K_{X'} = π^*K_X + Σ (discrepancy) E_i, with discrepancies read from where the new rays sit relative to the polytope of -K.
- Verify every number in Sage or Macaulay2, and for affine pieces ask Singular or Sage for the toric ideal.
Worked Examples
Projective space by hand
P^2 has rays u_1 = (1, 0), u_2 = (0, 1), u_0 = (-1, -1). The map M → Z^3 sends (a, b) to (⟨m, u_0⟩, ⟨m, u_1⟩, ⟨m, u_2⟩) = (-a - b, a, b), whose cokernel is Z via (c_0, c_1, c_2) ↦ c_0 + c_1 + c_2; every D_i has class 1. For D = 3D_0, P_D = {(a, b) : -a - b ≥ -3, a ≥ 0, b ≥ 0} is the triangle with vertices (0, 0), (3, 0), (0, 3), containing 10 lattice points, matching h^0(P^2, O(3)) = 10. K = -(D_0 + D_1 + D_2) has class -3, P_{-K} is the triangle with vertices (-1, -1), (2, -1), (-1, 2), a reflexive polytope, so P^2 is Fano with h^0(-K) = 10.
Hirzebruch surfaces in Sage and Macaulay2
sage: F2 = ToricVariety(Fan(cones=[(0,1),(1,2),(2,3),(3,0)],
....: rays=[(1,0),(0,1),(-1,2),(0,-1)]))
sage: F2.is_smooth(), F2.is_complete()
(True, True)
sage: D = [F2.divisor(i) for i in range(4)]
sage: [F2.integrate(Di.cohomology_class()^2) for Di in D]
[0, -2, 0, 2]
sage: A = D[2] + D[3]
sage: A.is_ample(), A.cohomology(dim=True)
(True, {0: 6, 1: 0, 2: 0})
sage: (-F2.K()).is_nef(), (-F2.K()).is_ample() # weak Fano, not Fano
(True, False)
sage: F2.Euler_number() # 4 maximal cones
4
needsPackage "NormalToricVarieties";
X = hirzebruchSurface 2;
rays X, max X -- rays (1,0),(0,1),(-1,2),(0,-1); maximal cones {0,1},{1,2},{2,3},{0,3}
isSmooth X, isComplete X, isProjective X
classGroup X -- ZZ^2
D = X_2 + X_3; -- divisors are indexed from 0: fibre (ray (-1,2)) plus positive section (ray (0,-1))
isAmple D -- true
latticePoints D -- the 6 lattice points of the polytope of D
HH^0(X, OO D) -- QQ^6; HH^1 and HH^2 vanish by Demazure
K = - sum(#rays X, i -> X_i);
isNef(-K), isAmple(-K) -- true, false
isFano hirzebruchSurface 1 -- true: H_1 is the blow-up of P^2 at a point
Both sessions index the rays (1,0), (0,1), (-1,2), (0,-1) from 0, so their D_2 + D_3 is the fibre plus the positive section (in the u_1, ..., u_4 ordering used earlier in this skill it is D_3 + D_4). With a = (0, 0, 1, 1) the polytope P_D = {a ≥ 0, b ≥ 0, -a + 2b ≥ -1, b ≤ 1} has the six lattice points (0,0), (1,0), (0,1), (1,1), (2,1), (3,1), and Riemann-Roch on the surface agrees: D^2 = 4, D.K = -6, χ = 1 + (4 + 6)/2 = 6.
A quotient singularity and its resolution
sage: sigma = Cone([(0,1),(2,-1)])
sage: sigma.dual().Hilbert_basis()
M(1, 0), M(1, 1), M(1, 2)
sage: U = AffineToricVariety(sigma); U.is_smooth()
False
sage: V = U.resolve(new_rays=[(1,0)]); V.is_smooth()
True
LIB "toric.lib";
intmat A[2][3] = 1,1,1, 0,1,2; // columns are the Hilbert basis (1,0),(1,1),(1,2)
ring r = 0,(u,v,w),dp;
ideal I = toric_ideal(A, "ect"); // v^2 - u*w
The inserted ray (1, 0) satisfies (0, 1) + (2, -1) = 2 · (1, 0), so the exceptional curve has self-intersection -2, as the A_1 singularity requires.
From a polytope to a projective variety
sage: P = LatticePolytope([(0,0),(2,0),(0,2)])
sage: P.npoints() # 6: the Veronese surface lives in P^5
6
sage: X = ToricVariety(NormalFan(P)); X.is_smooth(), X.fan().nrays()
(True, 3)
The normal fan of the triangle is the fan of P^2, the divisor D_P = 2H, and the six lattice points are the six monomials of degree 2, so X_P → P^5 is the Veronese embedding with D_P^2 = 2! · vol(P) = 4.
Checklist
- Rays written as primitive vectors; cones as index lists; fan axioms verified before anything else.
- Smoothness checked by determinants, not by eye; multiplicities recorded for the singular cones.
- Class group computed from the ray matrix and its rank compared with |Σ(1)| - n.
- Every divisor accompanied by its polytope and its lattice-point count; nef and ample decided by the m_σ criterion.
- K_X = -Σ D_ρ used with the sign right; Fano checked through ampleness of -K, not through the shape of the fan alone.
- Every claimed intersection number consistent with the surface recursion or the Stanley-Reisner ring.
- Results reproduced in Sage or Macaulay2 before being written down.
Common Mistakes
- Using non-primitive ray generators, which changes multiplicities and makes smooth cones look singular.
- Treating a lattice polytope as very ample in dimension 3 or more without checking; normality of P can fail, and then P ∩ M does not give an embedding.
- Confusing the normal fan with the face fan; the face fan of a reflexive polytope is the normal fan of its dual.
- Assuming complete implies projective beyond dimension 2.
- Reading Cl as Pic on a singular toric variety; on P(1, 1, 2) the class group is Z but the Picard group is 2Z.
- Forgetting that O(D) for a non-Cartier Weil divisor is a reflexive sheaf, not a line bundle, even though its sections are still the lattice points of P_D.
- Applying Demazure vanishing to a divisor that is not nef; on H_2 the divisor C of the (-2)-curve has P_C a single lattice point, χ(O(C)) = 0 and hence h^1(O(C)) = 1.
Limits
Toric geometry covers exactly the normal varieties with a dense torus and an extended action, and everything above needs normality; non-normal toric varieties exist and need the semigroup, not the cone. Hypersurfaces and complete intersections in toric varieties inherit ambient combinatorics (Batyrev's mirror construction, Bernstein-Kushnirenko for solution counts) but are not themselves toric, and their cohomology needs the Cox ring and Gröbner methods rather than lattice points. Software handles fans with dozens of rays in dimension up to about 5 comfortably; enumeration of lattice points and of reflexive polytopes beyond that is a job for dedicated tools such as Normaliz and PALP, which Sage can call. Non-toric questions about a toric variety, such as which non-invariant curves it contains, are ordinary algebraic geometry and get no combinatorial shortcut.
Install this skill directly: skilldb add algebraic-geometry-skills
Related Skills
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.
Algebraic Curves and Riemann-Roch
Activate this skill when the user is working with algebraic curves: genus, divisors, linear systems, the Riemann-Roch theorem and its consequences, elliptic curves and their group law, hyperelliptic curves, ramified covers and embeddings into projective space. Triggers on "algebraic curve," "Riemann-Roch," "genus," "divisor," "linear system," "canonical divisor," "canonical embedding," "hyperelliptic," "elliptic curve," "group law," "Weierstrass form," "Hurwitz formula," "Riemann-Hurwitz," "ramification," "degree-genus formula," "very ample," or curves in "algebraic geometry." Covers precise statements, worked Riemann-Roch computations for genus 0 through 3, the derivation of Weierstrass form and the group law, and how to check each computation in SageMath, Macaulay2 or Singular.
Algebraic Geometry Problem Solving
Activate this skill when the user has an algebraic geometry problem to attack rather than a definition to look up: a qualifying exam question, a lemma a paper needs, a conjecture to test, a proof a referee has questioned. Triggers on "how do I prove," "dimension count," "incidence correspondence," "general member," "generic," "Bertini," "semicontinuity," "local coordinates," "affine chart," "compute an example," "Gröbner check," "reduce mod p," "specialization," "degeneration," "standard tricks," "write the proof," "referee," "algebraic geometry exercise," or "algebraic geometry" problem solving. Covers the order of attack, dimension counting done rigorously, local coordinates and charts, choosing the right cohomological tool, what a computation proves and what it does not, how to write an argument that survives refereeing, and a catalogue of the tricks working geometers reach for first.
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.
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.