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.HomogenizedProjectiveClosure |
| 2 | import OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Coefficient.ModulePresheaf |
| 3 | import Mathlib.AlgebraicGeometry.Morphisms.FinitePresentation |
| 4 | import Mathlib.AlgebraicGeometry.Noetherian |
| 5 | import Mathlib.RingTheory.Extension.Presentation.Basic |
| 6 | |
| 7 | /-! # Compactification -/ |
| 8 | |
| 9 | namespace OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Affine.Compactification.AffineCompactification |
| 10 | |
| 11 | noncomputable section |
| 12 | |
| 13 | /-! Explicit projective compactifications of finitely presented affine schemes. -/ |
| 14 | |
| 15 | open _root_.CategoryTheory _root_.AlgebraicGeometry |
| 16 | open OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.HomogenizedProjectiveClosure.PolynomialHomogenization |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | variable {R : Type u} [CommRing R] |
| 21 | |
| 22 | structure Data {X : Scheme.{u}} (f : X ⟶ Spec (.of R)) where |
| 23 | coordinates : Type u |
| 24 | finiteCoordinates : Finite coordinates |
| 25 | scheme : Scheme.{u} |
| 26 | base : scheme ⟶ Spec (.of R) |
| 27 | proper : IsProper base |
| 28 | chart : X ⟶ scheme |
| 29 | openImmersion : IsOpenImmersion chart |
| 30 | chart_base : chart ≫ base = f |
| 31 | embedding : scheme ⟶ Proj (HilbertScheme.Presentations.Polynomial.Dehomogenization.PolynomialProjective.polynomialGrading (Option coordinates) R) |
| 32 | closedImmersion : IsClosedImmersion embedding |
| 33 | embedding_base : embedding ≫ |
| 34 | HilbertScheme.Presentations.Projective.Flatness.GradedHilbert.projectiveStructureMap |
| 35 | (HilbertScheme.Presentations.Polynomial.Dehomogenization.PolynomialProjective.polynomialGrading (Option coordinates) R) = base |
| 36 | |
| 37 | attribute [instance] Data.finiteCoordinates Data.proper Data.openImmersion Data.closedImmersion |
| 38 | |
| 39 | def quotientEquiv {A σ : Type u} {κ : Type*} [CommRing A] [Algebra R A] |
| 40 | (P : Algebra.Presentation R A σ κ) : |
| 41 | (MvPolynomial σ R ⧸ Ideal.span (Set.range P.relation)) ≃ₐ[R] A := by |
| 42 | rw [P.span_range_relation_eq_ker] |
| 43 | exact P.quotientEquiv.restrictScalars R |
| 44 | |
| 45 | def ofPresentation {A σ : Type u} {κ : Type*} [CommRing A] [Algebra R A] [Finite σ] |
| 46 | (P : Algebra.Presentation R A σ κ) : |
| 47 | Data (Spec.map (CommRingCat.ofHom (algebraMap R A))) := by |
| 48 | let d : κ → ℕ := fun i => (P.relation i).totalDegree |
| 49 | let e := AffineCompactification.quotientEquiv P |
| 50 | have : IsIso e.toRingEquiv.toCommRingCatIso.hom := e.toRingEquiv.toCommRingCatIso.isIso_hom |
| 51 | let j := Spec.map e.toRingEquiv.toCommRingCatIso.hom ≫ |
| 52 | HomogenizedProjectiveClosure.PolynomialHomogenization.homogenizedAffineOpen P.relation d (fun _ => le_rfl) |
| 53 | have hj : IsOpenImmersion j := by |
| 54 | have := HomogenizedProjectiveClosure.PolynomialHomogenization.homogenizedAffineOpen_isOpenImmersion P.relation d (fun _ => le_rfl) |
| 55 | dsimp only [j] |
| 56 | infer_instance |
| 57 | refine ⟨σ, inferInstance, HomogenizedProjectiveClosure.PolynomialHomogenization.homogenizedProjectiveClosure P.relation d, |
| 58 | HomogenizedProjectiveClosure.PolynomialHomogenization.homogenizedProjectiveBase P.relation d, |
| 59 | HomogenizedProjectiveClosure.PolynomialHomogenization.homogenizedProjectiveBase_proper P.relation d, j, hj, ?_, |
| 60 | HomogenizedProjectiveClosure.PolynomialHomogenization.homogenizedProjectiveEmbedding P.relation d, |
| 61 | HomogenizedProjectiveClosure.PolynomialHomogenization.homogenizedProjectiveEmbedding_closed P.relation d, |
| 62 | HomogenizedProjectiveClosure.PolynomialHomogenization.homogenizedProjectiveEmbedding_over P.relation d⟩ |
| 63 | dsimp only [j] |
| 64 | rw [Category.assoc, HomogenizedProjectiveClosure.PolynomialHomogenization.homogenizedAffineOpen_over, ← Spec.map_comp] |
| 65 | congr 1 |
| 66 | exact CommRingCat.hom_ext e.toAlgHom.comp_algebraMap |
| 67 | |
| 68 | def ofAlgebra (A : Type u) [CommRing A] [Algebra R A] [Algebra.FinitePresentation R A] : |
| 69 | Data (Spec.map (CommRingCat.ofHom (algebraMap R A))) := |
| 70 | ofPresentation ((Algebra.Presentation.ofFinitePresentation R A).reindex |
| 71 | (Equiv.ulift : ULift.{u} _ ≃ _) (Equiv.refl _)) |
| 72 | |
| 73 | theorem coefficient_factor {X : Scheme.{u}} (f : X ⟶ Spec (.of R)) : |
| 74 | X.toSpecΓ ≫ Spec.map (CommRingCat.ofHom (Coefficient.ModulePresheaf.schemeCoefficientMap f)) = f := by |
| 75 | change X.toSpecΓ ≫ Spec.map ((Scheme.ΓSpecIso (.of R)).inv ≫ f.appTop) = f |
| 76 | simp only [Spec.map_comp, ← Scheme.toSpecΓ_naturality_assoc, |
| 77 | toSpecΓ_SpecMap_ΓSpecIso_inv, Category.comp_id] |
| 78 | |
| 79 | def ofAffine {X : Scheme.{u}} [IsAffine X] (f : X ⟶ Spec (.of R)) |
| 80 | [LocallyOfFinitePresentation f] : Data f := by |
| 81 | let : Algebra R Γ(X, ⊤) := (Coefficient.ModulePresheaf.schemeCoefficientMap f).toAlgebra |
| 82 | have hc : (Coefficient.ModulePresheaf.schemeCoefficientMap f).FinitePresentation := |
| 83 | (RingHom.finitePresentation_respectsIso.cancel_left_isIso |
| 84 | (Scheme.ΓSpecIso (.of R)).inv f.appTop).mpr f.finitePresentation_appTop |
| 85 | have : Algebra.FinitePresentation R Γ(X, ⊤) := hc |
| 86 | let D := ofAlgebra (R := R) Γ(X, ⊤) |
| 87 | refine ⟨D.coordinates, D.finiteCoordinates, D.scheme, D.base, D.proper, |
| 88 | X.isoSpec.hom ≫ D.chart, inferInstance, ?_, |
| 89 | D.embedding, D.closedImmersion, D.embedding_base⟩ |
| 90 | rw [Category.assoc, D.chart_base] |
| 91 | exact coefficient_factor f |
| 92 | |
| 93 | def ofFiniteType {X : Scheme.{u}} [IsAffine X] [IsNoetherianRing R] |
| 94 | (f : X ⟶ Spec (.of R)) [LocallyOfFiniteType f] : Data f := |
| 95 | ofAffine f |
| 96 | |
| 97 | end |
| 98 | |
| 99 | end OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Affine.Compactification.AffineCompactification |