Affine algebraic sets and vanishing ideals over a field
DefinitionNullstellensatz_DefsLet be a field and . Points of affine -space are tuples , and is the polynomial ring in variables. This file fixes the objects of the article's Formulations section.
- Zero locus. For an ideal ,
- Vanishing ideal. For a subset ,
which is an ideal. 3. Algebraic set. is an algebraic set if for some ideal . 4. Irreducible (Zariski topology). is irreducible if and, whenever with algebraic sets, or . 5. Ideal of a point. For , , the ideal generated by the polynomials .
These are the objects in terms of which the Nullstellensatz, the correspondence between algebraic sets and radical ideals, and the description of maximal ideals are stated.
Formalization Note. Points are functions . The algebraic sets are exactly the closed sets of the Zariski topology on ; irreducibility is expressed through that closed-set characterisation instead of through a topology instance. The standing field in this file is not assumed algebraically closed; the theorems that need it assume it explicitly.
import Mathlib
namespace Nullstellensatz
open MvPolynomial
variable {K : Type*} [Field K] {n : ℕ}
/-- The algebraic set `V(J) ⊆ Kⁿ`: the common zeros of all polynomials in `J`. -/
def zeroSet (J : Ideal (MvPolynomial (Fin n) K)) : Set (Fin n → K) :=
{a | ∀ f ∈ J, eval a f = 0}
/-- The vanishing ideal `I(U)`: all polynomials vanishing at every point of `U`. -/
def vanishingIdeal (U : Set (Fin n → K)) : Ideal (MvPolynomial (Fin n) K) where
carrier := {p | ∀ a ∈ U, eval a p = 0}
zero_mem' := by simp
add_mem' := by
intro p q hp hq a ha
simp [hp a ha, hq a ha]
smul_mem' := by
intro c p hp a ha
simp [hp a ha]
/-- `W ⊆ Kⁿ` is an algebraic set: `W = V(J)` for some ideal `J`. -/
def IsAlgebraicSet (W : Set (Fin n → K)) : Prop :=
∃ J : Ideal (MvPolynomial (Fin n) K), W = zeroSet J
/-- `W` is irreducible in the Zariski topology: it is nonempty and whenever it is covered by
two algebraic sets (Zariski-closed sets), it is contained in one of them. -/
def IsZariskiIrreducible (W : Set (Fin n → K)) : Prop :=
W.Nonempty ∧ ∀ W₁ W₂ : Set (Fin n → K), IsAlgebraicSet W₁ → IsAlgebraicSet W₂ →
W ⊆ W₁ ∪ W₂ → W ⊆ W₁ ∨ W ⊆ W₂
/-- The ideal `(X₁ - a₁, …, Xₙ - aₙ)` of the point `a ∈ Kⁿ`. -/
noncomputable def pointIdeal (a : Fin n → K) : Ideal (MvPolynomial (Fin n) K) :=
Ideal.span (Set.range fun i => X i - C (a i))
end Nullstellensatz
Read-back
What the Lean code literally says, in plain math · Aristotle (Harmonic)
Non-blind read-back — not independent testimony. This read-back was written by the same agent that drafted the Lean statement, with full knowledge of the source article and of the intended meaning. It is not a blind audit by an independent auditor, and no reviewer should treat it as independent evidence that the statement is faithful.
The file introduces five notions, all relative to a field (arbitrary: no algebraic closedness, no characteristic assumption) and a natural number (possibly ). Points are -tuples of elements of , i.e. functions from to ; polynomials are elements of , and denotes evaluation.
- , for an ideal of , is the set of points with for every . For the whole ring this is empty; for it is all of .
- , for any subset , is the ideal of all polynomials with for every (the file proves it is closed under , addition and multiplication by ring elements). is the whole ring.
- A subset is algebraic iff there exists an ideal with .
- A subset is called Zariski irreducible iff (i) is nonempty and (ii) for all subsets that are both algebraic, implies or . No condition that itself be algebraic is built in.
- For , is the ideal generated by the polynomials (), where is viewed as a constant polynomial. For this is the zero ideal of .
No other conditions are imposed.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.