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 OAI.AlgebraicGeometry.HilbertScheme.Presentations.Homogeneous.LocalizationFlat |
| 2 | import OAI.AlgebraicGeometry.HilbertScheme.Presentations.Graded.BaseChange |
| 3 | import OAI.AlgebraicGeometry.HilbertScheme.Presentations.Projective.IdealEquivalence |
| 4 | import Mathlib.AlgebraicGeometry.Morphisms.Flat |
| 5 | |
| 6 | /-! # Flatness -/ |
| 7 | |
| 8 | namespace OAI.AlgebraicGeometry.HilbertScheme.Presentations.Projective.Flatness.GradedHilbert |
| 9 | |
| 10 | noncomputable section |
| 11 | |
| 12 | /-! |
| 13 | Flatness of projective spectra from flatness in high homogeneous degrees. |
| 14 | This checks actual scheme morphisms through their standard affine cover. |
| 15 | -/ |
| 16 | |
| 17 | open _root_.CategoryTheory _root_.AlgebraicGeometry _root_.HomogeneousLocalization |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | variable {R A : Type u} [CommRing R] [CommRing A] [Algebra R A] |
| 22 | variable (𝒜 : ℕ → Submodule R A) [GradedAlgebra 𝒜] |
| 23 | |
| 24 | def projectiveStructureMap : Proj 𝒜 ⟶ Spec (CommRingCat.of R) := |
| 25 | Proj.toSpecZero 𝒜 ≫ Spec.map (CommRingCat.ofHom (algebraMap R (𝒜 0))) |
| 26 | |
| 27 | theorem projectiveStructureMap_away {s : A} (hs : s ∈ 𝒜 1) : |
| 28 | Proj.awayι 𝒜 s hs Nat.zero_lt_one ≫ projectiveStructureMap 𝒜 = |
| 29 | Spec.map (CommRingCat.ofHom (algebraMap R (HomogeneousLocalization.Away 𝒜 s))) := by |
| 30 | rw [projectiveStructureMap, ← Category.assoc, Proj.awayι_toSpecZero, |
| 31 | ← Spec.map_comp, Homogeneous.LocalizationFlat.GradedHilbert.homogeneousLocalization_algebraMap] |
| 32 | rfl |
| 33 | |
| 34 | theorem projectiveStructureMap_flat {ι : Type*} (s : ι → A) |
| 35 | (hs : ∀ i, s i ∈ 𝒜 1) |
| 36 | (hcover : (HomogeneousIdeal.irrelevant 𝒜).toIdeal ≤ Ideal.span (Set.range s)) |
| 37 | (N : ℕ) (hflat : ∀ d ≥ N, Module.Flat R (𝒜 d)) : Flat (projectiveStructureMap 𝒜) := by |
| 38 | have : IsZariskiLocalAtSource @Flat.{u} := |
| 39 | HasRingHomProperty.instIsZariskiLocalAtSource (P := @Flat.{u}) (Q := RingHom.Flat) |
| 40 | let U := Proj.affineOpenCoverOfIrrelevantLESpan 𝒜 s hs (fun _ => Nat.zero_lt_one) hcover |
| 41 | apply (IsZariskiLocalAtSource.iff_of_openCover U.openCover).mpr |
| 42 | intro i |
| 43 | change Flat (Proj.awayι 𝒜 (s i) (hs i) Nat.zero_lt_one ≫ projectiveStructureMap 𝒜) |
| 44 | rw [projectiveStructureMap_away, Flat.SpecMap_iff] |
| 45 | exact RingHom.flat_algebraMap_iff.mpr (Homogeneous.LocalizationFlat.GradedHilbert.homogeneousLocalization_flat_of_eventually_flat (hs i) N hflat) |
| 46 | |
| 47 | variable {n : ℕ} |
| 48 | |
| 49 | theorem quotient_irrelevant_le_span_variables (I : HomogeneousIdeal (Hilbert.Polynomial.GradedHilbert.grading R n)) : |
| 50 | (HomogeneousIdeal.irrelevant (Graded.Quotient.GradedHilbert.quotientGrading I)).toIdeal ≤ |
| 51 | Ideal.span (Set.range (fun i : Fin (n + 1) => Graded.Quotient.GradedHilbert.gradedQuotientMap I (MvPolynomial.X i))) := by |
| 52 | have h := Graded.Quotient.GradedHilbert.irrelevant_quotient_le_map I |
| 53 | change (HomogeneousIdeal.irrelevant (Graded.Quotient.GradedHilbert.quotientGrading I)).toIdeal ≤ |
| 54 | Ideal.map (Graded.Quotient.GradedHilbert.gradedQuotientMap I) (HomogeneousIdeal.irrelevant (Hilbert.Polynomial.GradedHilbert.grading R n)).toIdeal at h |
| 55 | apply h.trans |
| 56 | have hr : (Set.range fun i : Fin (n + 1) => Graded.Quotient.GradedHilbert.gradedQuotientMap I (MvPolynomial.X i)) = |
| 57 | Graded.Quotient.GradedHilbert.gradedQuotientMap I '' Set.range MvPolynomial.X := Set.range_comp' _ _ |
| 58 | rw [hr] |
| 59 | erw [← Ideal.map_span] |
| 60 | apply Ideal.map_mono |
| 61 | apply (HomogeneousIdeal.toIdeal_irrelevant_le (Hilbert.Polynomial.GradedHilbert.grading R n)).mpr |
| 62 | intro d hd f hf |
| 63 | change f ∈ Ideal.span (Set.range (MvPolynomial.X : Fin (n + 1) → Hilbert.Polynomial.GradedHilbert.CoordinateRing R n)) |
| 64 | rw [← Set.image_univ, MvPolynomial.mem_ideal_span_X_image] |
| 65 | intro a ha |
| 66 | have had : a.degree = d := (Hilbert.MonomialBasis.GradedHilbert.mem_degreeSpace_iff_support f d).mp hf a ha |
| 67 | have hex : ∃ i, a i ≠ 0 := by |
| 68 | by_contra! hzero |
| 69 | have haz : a = 0 := Finsupp.ext hzero |
| 70 | rw [haz] at had |
| 71 | simp only [map_zero] at had |
| 72 | omega |
| 73 | obtain ⟨i, hi⟩ := hex |
| 74 | exact ⟨i, Set.mem_univ i, hi⟩ |
| 75 | |
| 76 | /-- The projective quotient is flat as an actual scheme over the base |
| 77 | whenever its high homogeneous degree quotients are flat modules. -/ |
| 78 | theorem projectiveQuotient_flat_of_eventually_flat |
| 79 | (I : HomogeneousIdeal (Hilbert.Polynomial.GradedHilbert.grading R n)) (N : ℕ) |
| 80 | (hflat : ∀ d ≥ N, Module.Flat R (Hilbert.Polynomial.GradedHilbert.DegreeQuotient I.toIdeal d)) : |
| 81 | Flat (projectiveStructureMap (Graded.Quotient.GradedHilbert.quotientGrading I)) := by |
| 82 | apply projectiveStructureMap_flat (Graded.Quotient.GradedHilbert.quotientGrading I) |
| 83 | (fun i : Fin (n + 1) => Graded.Quotient.GradedHilbert.gradedQuotientMap I (MvPolynomial.X i)) |
| 84 | (fun i => (Graded.Quotient.GradedHilbert.gradedQuotientMap I).map_mem (MvPolynomial.isHomogeneous_X R i)) |
| 85 | (quotient_irrelevant_le_span_variables I) N |
| 86 | intro d hd |
| 87 | exact (Module.Flat.equiv_iff (Graded.Quotient.GradedHilbert.degreeQuotientEquivQuotientGrading I d)).mp (hflat d hd) |
| 88 | |
| 89 | end |
| 90 | |
| 91 | end OAI.AlgebraicGeometry.HilbertScheme.Presentations.Projective.Flatness.GradedHilbert |