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.AlgebraicGeometry.ProjectiveSpectrum.Proper |
| 2 | import Mathlib.AlgebraicGeometry.Morphisms.Immersion |
| 3 | import Mathlib.RingTheory.MvPolynomial.Homogeneous |
| 4 | import Mathlib.RingTheory.FiniteType |
| 5 | |
| 6 | /-! # Projective Presentations -/ |
| 7 | |
| 8 | namespace OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Projective.ProjectivePresentations |
| 9 | |
| 10 | noncomputable section |
| 11 | |
| 12 | /-! |
| 13 | Projective geometry needed by HilbertConstruction. Projective space is constructed from the |
| 14 | standard polynomial grading and base change to an arbitrary scheme. The |
| 15 | presentation structures below contain actual scheme morphisms and immersion |
| 16 | properties; they contain no moduli representability assumptions. |
| 17 | -/ |
| 18 | |
| 19 | open _root_.CategoryTheory _root_.CategoryTheory.Limits _root_.AlgebraicGeometry |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | variable (R : Type u) [CommRing R] |
| 24 | |
| 25 | abbrev coordinateRing (n : ℕ) := MvPolynomial (Fin (n + 1)) R |
| 26 | |
| 27 | abbrev coordinateGrading (n : ℕ) : ℕ → Submodule R (coordinateRing R n) := |
| 28 | MvPolynomial.homogeneousSubmodule (Fin (n + 1)) R |
| 29 | |
| 30 | instance coordinateGradedAlgebra (n : ℕ) : GradedAlgebra (coordinateGrading R n) := |
| 31 | MvPolynomial.gradedAlgebra |
| 32 | |
| 33 | /-- The degree-zero part of the standard polynomial grading is its base ring. -/ |
| 34 | def degreeZeroConstants (n : ℕ) : R ≃+* coordinateGrading R n 0 where |
| 35 | toFun r := ⟨MvPolynomial.C r, MvPolynomial.isHomogeneous_C (Fin (n + 1)) r⟩ |
| 36 | invFun p := AddMonoidAlgebra.coeff (p.val) (0) |
| 37 | left_inv r := MvPolynomial.coeff_zero_C r |
| 38 | right_inv p := by |
| 39 | apply Subtype.ext |
| 40 | have hp : MvPolynomial.IsHomogeneous p.val 0 := p.property |
| 41 | exact (MvPolynomial.totalDegree_eq_zero_iff_eq_C.mp |
| 42 | ((MvPolynomial.totalDegree_zero_iff_isHomogeneous (Fin (n + 1))).mpr hp)).symm |
| 43 | map_mul' r s := Subtype.ext (map_mul MvPolynomial.C r s) |
| 44 | map_add' r s := Subtype.ext (map_add MvPolynomial.C r s) |
| 45 | |
| 46 | instance coordinateRing_finiteType_over_zero (n : ℕ) : |
| 47 | Algebra.FiniteType (coordinateGrading R n 0) (coordinateRing R n) := by |
| 48 | let : IsScalarTower R (coordinateGrading R n 0) (coordinateRing R n) := |
| 49 | IsScalarTower.of_algebraMap_eq |
| 50 | (R := R) (S := coordinateGrading R n 0) (A := coordinateRing R n) |
| 51 | (fun _ => rfl) |
| 52 | exact Algebra.FiniteType.of_restrictScalars_finiteType |
| 53 | R (coordinateGrading R n 0) (coordinateRing R n) |
| 54 | |
| 55 | /-- Projective space over an affine base, with its structure morphism. -/ |
| 56 | def affineProjectiveSpace (n : ℕ) : Over (Spec (.of R)) := |
| 57 | Over.mk (Proj.toSpecZero (coordinateGrading R n) ≫ |
| 58 | Spec.map (CommRingCat.ofHom (degreeZeroConstants R n).toRingHom)) |
| 59 | |
| 60 | instance affineProjectiveSpace_proper (n : ℕ) : |
| 61 | IsProper (affineProjectiveSpace R n).hom := by |
| 62 | have : IsIso (CommRingCat.ofHom (degreeZeroConstants R n).toRingHom) := |
| 63 | (degreeZeroConstants R n).toCommRingCatIso.isIso_hom |
| 64 | have : IsProper (Proj.toSpecZero (coordinateGrading R n)) := inferInstance |
| 65 | have : IsProper (Spec.map (CommRingCat.ofHom (degreeZeroConstants R n).toRingHom)) := |
| 66 | inferInstance |
| 67 | change IsProper (Proj.toSpecZero (coordinateGrading R n) ≫ |
| 68 | Spec.map (CommRingCat.ofHom (degreeZeroConstants R n).toRingHom)) |
| 69 | infer_instance |
| 70 | |
| 71 | /-- Projective space over any base scheme, formed by base change from its |
| 72 | ring of global sections. -/ |
| 73 | def projectiveSpaceOver (S : Scheme.{u}) (n : ℕ) : Over S := |
| 74 | (Over.pullback S.toSpecΓ).obj (affineProjectiveSpace Γ(S, ⊤) n) |
| 75 | |
| 76 | instance projectiveSpaceOver_proper (S : Scheme.{u}) (n : ℕ) : |
| 77 | IsProper (projectiveSpaceOver S n).hom := by |
| 78 | dsimp [projectiveSpaceOver] |
| 79 | infer_instance |
| 80 | |
| 81 | /-- A projective presentation consists of a closed immersion into projective |
| 82 | space over the same base. -/ |
| 83 | structure ProjectivePresentation {S : Scheme.{u}} (X : Over S) where |
| 84 | dimension : ℕ |
| 85 | embedding : X ⟶ projectiveSpaceOver S dimension |
| 86 | closedImmersion : IsClosedImmersion embedding.left |
| 87 | |
| 88 | attribute [instance] ProjectivePresentation.closedImmersion |
| 89 | |
| 90 | theorem ProjectivePresentation.proper {S : Scheme.{u}} {X : Over S} |
| 91 | (P : ProjectivePresentation X) : IsProper X.hom := by |
| 92 | rw [← P.embedding.w] |
| 93 | infer_instance |
| 94 | |
| 95 | /-- A finite-type scheme with an open immersion into a scheme supplied |
| 96 | with a projective presentation over the same base. -/ |
| 97 | structure QuasiProjectivePresentation {S : Scheme.{u}} (X : Over S) where |
| 98 | locallyFiniteType : LocallyOfFiniteType X.hom |
| 99 | quasiCompact : QuasiCompact X.hom |
| 100 | compactification : Over S |
| 101 | projective : ProjectivePresentation compactification |
| 102 | embedding : X ⟶ compactification |
| 103 | openImmersion : IsOpenImmersion embedding.left |
| 104 | |
| 105 | attribute [instance] QuasiProjectivePresentation.openImmersion |
| 106 | |
| 107 | theorem QuasiProjectivePresentation.separated {S : Scheme.{u}} {X : Over S} |
| 108 | (P : QuasiProjectivePresentation X) : IsSeparated X.hom := by |
| 109 | have := P.projective.proper |
| 110 | rw [← P.embedding.w] |
| 111 | infer_instance |
| 112 | |
| 113 | end |
| 114 | |
| 115 | end OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Projective.ProjectivePresentations |