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.AbelianModuli.HilbertConstruction.Affine.RationalPointIdeal |
| 2 | import Mathlib.AlgebraicGeometry.Stalk |
| 3 | import Mathlib.RingTheory.Localization.AtPrime.Basic |
| 4 | |
| 5 | /-! # Stalk Coordinate Localization -/ |
| 6 | |
| 7 | namespace OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Affine.StalkCoordinateLocalization |
| 8 | |
| 9 | noncomputable section |
| 10 | |
| 11 | /-! The actual stalk of an affine scheme is its coordinate-ring localization at the corresponding point. Its structure morphism is exactly the affine coordinate map of the germ homomorphism. -/ |
| 12 | open _root_.CategoryTheory _root_.AlgebraicGeometry |
| 13 | universe u |
| 14 | variable (T : Scheme.{u}) [IsAffine T] (x : T) |
| 15 | |
| 16 | local instance : (T.isoSpec.hom x).asIdeal.IsPrime := |
| 17 | (show PrimeSpectrum Γ(T, ⊤) from T.isoSpec.hom x).isPrime |
| 18 | |
| 19 | theorem affineTopPrimeIdeal_eq_isoSpec : |
| 20 | (isAffineOpen_top T).primeIdealOf ⟨x, trivial⟩ = T.isoSpec.hom x := by |
| 21 | have hp : T.isoSpec.inv ((isAffineOpen_top T).primeIdealOf ⟨x, trivial⟩) = x := by |
| 22 | simpa only [IsAffineOpen.fromSpec_top] using |
| 23 | (isAffineOpen_top T).fromSpec_primeIdealOf ⟨x, trivial⟩ |
| 24 | have h := congrArg T.isoSpec.hom hp |
| 25 | change (T.isoSpec.inv ≫ T.isoSpec.hom) |
| 26 | ((isAffineOpen_top T).primeIdealOf ⟨x, trivial⟩) = T.isoSpec.hom x at h |
| 27 | rw [T.isoSpec.inv_hom_id] at h |
| 28 | exact h |
| 29 | |
| 30 | @[instance_reducible] |
| 31 | def affineStalkCoordinateAlgebra : Algebra Γ(T, ⊤) (T.presheaf.stalk x) := |
| 32 | (T.presheaf.germ ⊤ x trivial).hom.toAlgebra |
| 33 | |
| 34 | theorem affineStalkCoordinate_isLocalization : |
| 35 | let : Algebra Γ(T, ⊤) (T.presheaf.stalk x) := affineStalkCoordinateAlgebra T x; |
| 36 | IsLocalization (T.isoSpec.hom x).asIdeal.primeCompl (T.presheaf.stalk x) := by |
| 37 | let : Algebra Γ(T, ⊤) (T.presheaf.stalk x) := affineStalkCoordinateAlgebra T x |
| 38 | have h := (isAffineOpen_top T).isLocalization_stalk ⟨x, trivial⟩ |
| 39 | rwa [affineTopPrimeIdeal_eq_isoSpec T x] at h |
| 40 | |
| 41 | def affineStalkCoordinateLocalizationEquiv : |
| 42 | let : Algebra Γ(T, ⊤) (T.presheaf.stalk x) := affineStalkCoordinateAlgebra T x; |
| 43 | Localization.AtPrime (T.isoSpec.hom x).asIdeal ≃ₐ[Γ(T, ⊤)] T.presheaf.stalk x := by |
| 44 | letI : Algebra Γ(T, ⊤) (T.presheaf.stalk x) := affineStalkCoordinateAlgebra T x |
| 45 | letI : IsLocalization (T.isoSpec.hom x).asIdeal.primeCompl (T.presheaf.stalk x) := |
| 46 | affineStalkCoordinate_isLocalization T x |
| 47 | exact IsLocalization.algEquiv (T.isoSpec.hom x).asIdeal.primeCompl |
| 48 | (Localization.AtPrime (T.isoSpec.hom x).asIdeal) (T.presheaf.stalk x) |
| 49 | |
| 50 | theorem affineCoordinateMap_germ_eq_fromSpecStalk : |
| 51 | QuotientCoefficientMap.affineCoordinateMap (T.presheaf.germ ⊤ x trivial).hom = T.fromSpecStalk x := by |
| 52 | have h := (isAffineOpen_top T).fromSpecStalk_eq_fromSpecStalk (x := x) trivial |
| 53 | simpa only [IsAffineOpen.fromSpecStalk, IsAffineOpen.fromSpec_top, QuotientCoefficientMap.affineCoordinateMap] using! h |
| 54 | |
| 55 | theorem specBaseCoefficientMap_fromSpecStalk : |
| 56 | Spec.CoefficientCechComparison.specBaseCoefficientMap (T.fromSpecStalk x) = (T.presheaf.germ ⊤ x trivial).hom := by |
| 57 | exact (congrArg Spec.CoefficientCechComparison.specBaseCoefficientMap (affineCoordinateMap_germ_eq_fromSpecStalk T x)).symm.trans |
| 58 | (QuotientCoefficientMap.specBaseCoefficientMap_affineCoordinateMap (T.presheaf.germ ⊤ x trivial).hom) |
| 59 | |
| 60 | end |
| 61 | |
| 62 | end OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Affine.StalkCoordinateLocalization |