Hodge conjecture: the CM case in Lean, read and discussed
OpenAI's Lean proof of the Hodge conjecture for CM abelian varieties: rerun it, read its statement, and keep the open questions with their sources. The conjecture is open

| 1 | import Mathlib.RingTheory.MvPolynomial.Homogeneous |
| 2 | import Mathlib.RingTheory.GradedAlgebra.Homogeneous.Ideal |
| 3 | import Mathlib.LinearAlgebra.FiniteDimensional.Lemmas |
| 4 | import Mathlib.Algebra.Polynomial.Roots |
| 5 | |
| 6 | /-! # Polynomial -/ |
| 7 | |
| 8 | namespace OAI.AlgebraicGeometry.HilbertScheme.Presentations.Hilbert.Polynomial.GradedHilbert |
| 9 | |
| 10 | noncomputable section |
| 11 | |
| 12 | /-! |
| 13 | Graded coordinate quotients and the fixed Hilbert-polynomial condition. |
| 14 | The dimensions below are dimensions of actual quotient modules. Saturation |
| 15 | is expressed by the usual homogeneous test using all forms of one degree. |
| 16 | Existence and uniform boundedness of Hilbert polynomials are separate results. |
| 17 | -/ |
| 18 | |
| 19 | open _root_.Module |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | abbrev CoordinateRing (R : Type u) [CommRing R] (n : ℕ) := |
| 24 | MvPolynomial (Fin (n + 1)) R |
| 25 | |
| 26 | abbrev grading (R : Type u) [CommRing R] (n : ℕ) : |
| 27 | ℕ → Submodule R (CoordinateRing R n) := |
| 28 | MvPolynomial.homogeneousSubmodule (Fin (n + 1)) R |
| 29 | |
| 30 | instance coordinateGradedAlgebra (R : Type u) [CommRing R] (n : ℕ) : |
| 31 | GradedAlgebra (grading R n) := MvPolynomial.gradedAlgebra |
| 32 | |
| 33 | instance degreeSpace_finite (R : Type u) [CommRing R] (n d : ℕ) : |
| 34 | Module.Finite R (grading R n d) := |
| 35 | Module.Finite.of_fg (MvPolynomial.homogeneousSubmodule_fg (Fin (n + 1)) R d) |
| 36 | |
| 37 | variable {R : Type u} [CommRing R] {n : ℕ} |
| 38 | |
| 39 | def degreeRelations (I : Ideal (CoordinateRing R n)) (d : ℕ) : |
| 40 | Submodule R (grading R n d) := |
| 41 | (I.restrictScalars R).comap (grading R n d).subtype |
| 42 | |
| 43 | abbrev DegreeQuotient (I : Ideal (CoordinateRing R n)) (d : ℕ) := |
| 44 | (grading R n d) ⧸ degreeRelations I d |
| 45 | |
| 46 | instance degreeQuotient_finite (I : Ideal (CoordinateRing R n)) (d : ℕ) : |
| 47 | Module.Finite R (DegreeQuotient I d) := inferInstance |
| 48 | |
| 49 | theorem degreeRelations_mono {I J : Ideal (CoordinateRing R n)} (h : I ≤ J) (d : ℕ) : |
| 50 | degreeRelations I d ≤ degreeRelations J d := by |
| 51 | intro f hf |
| 52 | exact h hf |
| 53 | |
| 54 | def hilbertFunction (I : Ideal (CoordinateRing R n)) (d : ℕ) : ℕ := |
| 55 | Module.finrank R (DegreeQuotient I d) |
| 56 | |
| 57 | def HasHilbertPolynomial (I : Ideal (CoordinateRing R n)) (P : Polynomial ℚ) : Prop := |
| 58 | ∃ d₀ : ℕ, ∀ d : ℕ, d₀ ≤ d → (hilbertFunction I d : ℚ) = P.eval (d : ℚ) |
| 59 | |
| 60 | theorem hilbertPolynomial_unique {I : Ideal (CoordinateRing R n)} |
| 61 | {P Q : Polynomial ℚ} (hP : HasHilbertPolynomial I P) (hQ : HasHilbertPolynomial I Q) : |
| 62 | P = Q := by |
| 63 | obtain ⟨p, hp⟩ := hP |
| 64 | obtain ⟨q, hq⟩ := hQ |
| 65 | let d₀ := max p q |
| 66 | apply Polynomial.eq_of_infinite_eval_eq |
| 67 | have hinj : Function.Injective (fun m : ℕ => ((d₀ + m : ℕ) : ℚ)) := by |
| 68 | intro a b h |
| 69 | change ((d₀ + a : ℕ) : ℚ) = ((d₀ + b : ℕ) : ℚ) at h |
| 70 | have h' : d₀ + a = d₀ + b := by exact_mod_cast h |
| 71 | exact Nat.add_left_cancel h' |
| 72 | refine (Set.infinite_range_of_injective hinj).mono ?_ |
| 73 | rintro x ⟨m, rfl⟩ |
| 74 | exact (hp (d₀ + m) (le_trans (le_max_left _ _) (Nat.le_add_right _ _))).symm.trans |
| 75 | (hq (d₀ + m) (le_trans (le_max_right _ _) (Nat.le_add_right _ _))) |
| 76 | |
| 77 | /-- Homogeneous saturation with respect to the irrelevant ideal: a form |
| 78 | whose multiples by all degree-m forms lie in I must itself lie in I. -/ |
| 79 | def IsSaturated (I : Ideal (CoordinateRing R n)) : Prop := |
| 80 | ∀ (f : CoordinateRing R n) (d : ℕ), f.IsHomogeneous d → |
| 81 | (∃ m : ℕ, ∀ g : CoordinateRing R n, g.IsHomogeneous m → g * f ∈ I) → f ∈ I |
| 82 | |
| 83 | variable {K : Type u} [Field K] {I J : Ideal (CoordinateRing K n)} |
| 84 | |
| 85 | theorem degreeRelations_eq_of_le_of_hilbertFunction_eq |
| 86 | (hIJ : I ≤ J) (d : ℕ) (hd : hilbertFunction I d = hilbertFunction J d) : |
| 87 | degreeRelations I d = degreeRelations J d := by |
| 88 | apply Submodule.eq_of_le_of_finrank_eq (degreeRelations_mono hIJ d) |
| 89 | have hI := (degreeRelations I d).finrank_quotient_add_finrank |
| 90 | have hJ := (degreeRelations J d).finrank_quotient_add_finrank |
| 91 | change Module.finrank K (DegreeQuotient I d) = |
| 92 | Module.finrank K (DegreeQuotient J d) at hd |
| 93 | dsimp only [DegreeQuotient] at hd |
| 94 | rw [hd] at hI |
| 95 | exact Nat.add_left_cancel (hI.trans hJ.symm) |
| 96 | |
| 97 | theorem homogeneous_mem_iff_of_le_of_hilbertFunction_eq |
| 98 | (hIJ : I ≤ J) (d : ℕ) (hd : hilbertFunction I d = hilbertFunction J d) |
| 99 | (f : CoordinateRing K n) (hf : f.IsHomogeneous d) : f ∈ I ↔ f ∈ J := by |
| 100 | have heq := degreeRelations_eq_of_le_of_hilbertFunction_eq hIJ d hd |
| 101 | change (⟨f, hf⟩ : grading K n d) ∈ degreeRelations I d ↔ |
| 102 | (⟨f, hf⟩ : grading K n d) ∈ degreeRelations J d |
| 103 | rw [heq] |
| 104 | |
| 105 | /-- A saturated homogeneous ideal cannot be strictly contained in a |
| 106 | homogeneous ideal with the same eventual Hilbert polynomial. -/ |
| 107 | theorem saturated_eq_of_le_same_hilbertPolynomial |
| 108 | (I J : HomogeneousIdeal (grading K n)) (hIJ : I ≤ J) |
| 109 | (hSat : IsSaturated I.toIdeal) (P : Polynomial ℚ) |
| 110 | (hI : HasHilbertPolynomial I.toIdeal P) (hJ : HasHilbertPolynomial J.toIdeal P) : |
| 111 | I = J := by |
| 112 | obtain ⟨i₀, hi⟩ := hI |
| 113 | obtain ⟨j₀, hj⟩ := hJ |
| 114 | let m := max i₀ j₀ |
| 115 | have hdim (d : ℕ) (hd : m ≤ d) : |
| 116 | hilbertFunction I.toIdeal d = hilbertFunction J.toIdeal d := by |
| 117 | have h := (hi d (le_trans (le_max_left _ _) hd)).trans |
| 118 | (hj d (le_trans (le_max_right _ _) hd)).symm |
| 119 | exact_mod_cast h |
| 120 | apply HomogeneousIdeal.ext' |
| 121 | intro d f hf |
| 122 | constructor |
| 123 | · exact fun h => hIJ h |
| 124 | · intro hfJ |
| 125 | apply hSat f d hf |
| 126 | refine ⟨m, fun g hg => ?_⟩ |
| 127 | apply (homogeneous_mem_iff_of_le_of_hilbertFunction_eq |
| 128 | (I := I.toIdeal) (J := J.toIdeal) hIJ (m + d) |
| 129 | (hdim (m + d) (Nat.le_add_right _ _)) (g * f) (hg.mul hf)).mpr |
| 130 | exact J.toIdeal.mul_mem_left g hfJ |
| 131 | |
| 132 | end |
| 133 | |
| 134 | end OAI.AlgebraicGeometry.HilbertScheme.Presentations.Hilbert.Polynomial.GradedHilbert |