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 | /- |
| 2 | Copyright 2025 The Formal Conjectures Authors. |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | https://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | |
| 16 | This file has been modified. |
| 17 | -/ |
| 18 | |
| 19 | import Mathlib.AlgebraicGeometry.Morphisms.Proper |
| 20 | import Mathlib.AlgebraicGeometry.ProjectiveSpectrum.Scheme |
| 21 | import Mathlib.RingTheory.MvPolynomial.Homogeneous |
| 22 | |
| 23 | import HodgeConjecture.Mathlib.CategoryTheory.ConcreteCategory.Notation |
| 24 | import Mathlib.AlgebraicGeometry.ProjectiveSpectrum.Proper |
| 25 | |
| 26 | namespace OAI.AlgebraicGeometry.Foundations.ProjectiveSpaceIs |
| 27 | |
| 28 | open _root_.AlgebraicGeometry |
| 29 | |
| 30 | /-! |
| 31 | # Projective space and explicit projective presentations |
| 32 | |
| 33 | This file constructs projective space over a scheme as a pullback from `Proj`, proves its |
| 34 | structure morphism proper for finitely many homogeneous coordinates, and packages a closed |
| 35 | embedding into finite-dimensional projective space as an explicit projective presentation. |
| 36 | |
| 37 | The original projective-space construction was contributed to Mathlib in |
| 38 | [`mathlib4` pull request #26061](https://github.com/leanprover-community/mathlib4/pull/26061). |
| 39 | -/ |
| 40 | |
| 41 | section |
| 42 | |
| 43 | -- The contents of this file will be in mathlib as of #26061 |
| 44 | |
| 45 | universe u v |
| 46 | open _root_.CategoryTheory Limits _root_.MvPolynomial _root_.OAI.AlgebraicGeometry.Foundations.ProjectiveSpaceIs |
| 47 | |
| 48 | variable (n : Type v) (S : Scheme.{max u v}) |
| 49 | |
| 50 | local notation "ℤ[" n "]" => homogeneousSubmodule n ℤ |
| 51 | local notation3 "ℤ[" n "].{" u "," v "}" => homogeneousSubmodule n (ULift.{max u v} ℤ) |
| 52 | |
| 53 | attribute [local instance] MvPolynomial.gradedAlgebra |
| 54 | |
| 55 | /-- Let `S` be a scheme and `n` an index set for homogeneous coordinates. This is projective space |
| 56 | over `S`, defined by base change to `S` of `Proj(ℤ[x_i | i ∈ n])` with each variable in degree |
| 57 | one. For `n = Fin (d+1)`, this is the usual `d`-dimensional projective space `ℙ^d_S`. -/ |
| 58 | noncomputable def ProjectiveSpace : Scheme.{max u v} := |
| 59 | pullback (terminal.from S) (terminal.from (Proj ℤ[n].{u, v})) |
| 60 | |
| 61 | /-- `ℙ(n; S)` is projective space over `S` with homogeneous coordinates indexed by `n`. -/ |
| 62 | scoped [AlgebraicGeometry] notation "ℙ("n"; "S")" => _root_.OAI.AlgebraicGeometry.Foundations.ProjectiveSpaceIs.ProjectiveSpace n S |
| 63 | |
| 64 | namespace ProjectiveSpace |
| 65 | |
| 66 | /-- Let `R` be a commutative ring and `n` an index set of polynomial variables, each assigned degree |
| 67 | one. The degree-zero homogeneous subring of `R[x_i | i ∈ n]` is isomorphic to `R`: this |
| 68 | equivalence takes the constant coefficient, with inverse the inclusion of constant polynomials. -/ |
| 69 | noncomputable def degreeZeroEquiv (R : Type*) [CommRing R] : |
| 70 | homogeneousSubmodule n R 0 ≃+* R where |
| 71 | toFun f := f.1.coeff 0 |
| 72 | invFun r := ⟨C r, isHomogeneous_C n r⟩ |
| 73 | left_inv f := Subtype.ext (totalDegree_eq_zero_iff_eq_C.mp |
| 74 | ((totalDegree_zero_iff_isHomogeneous n).mpr f.2)).symm |
| 75 | right_inv r := coeff_zero_C r |
| 76 | map_mul' x y := by |
| 77 | have hx := totalDegree_eq_zero_iff_eq_C.mp |
| 78 | ((totalDegree_zero_iff_isHomogeneous n).mpr x.2) |
| 79 | have hy := totalDegree_eq_zero_iff_eq_C.mp |
| 80 | ((totalDegree_zero_iff_isHomogeneous n).mpr y.2) |
| 81 | change (x.1 * y.1).coeff 0 = x.1.coeff 0 * y.1.coeff 0 |
| 82 | rw [hx, hy, ← map_mul, coeff_zero_C, coeff_zero_C, coeff_zero_C] |
| 83 | map_add' _ _ := rfl |
| 84 | |
| 85 | /-- A polynomial ring in finitely many variables is of finite type over its degree-zero |
| 86 | homogeneous subring. -/ |
| 87 | noncomputable instance degreeZeroFiniteType [Finite n] (R : Type*) [CommRing R] : |
| 88 | Algebra.FiniteType (homogeneousSubmodule n R 0) (MvPolynomial n R) := by |
| 89 | rw [← RingHom.finiteType_algebraMap] |
| 90 | have hC : (C : R →+* MvPolynomial n R).FiniteType := by |
| 91 | rw [← MvPolynomial.algebraMap_eq] |
| 92 | exact RingHom.finiteType_algebraMap.mpr inferInstance |
| 93 | have he : (degreeZeroEquiv n R).toRingHom.FiniteType := |
| 94 | RingHom.FiniteType.of_surjective _ (degreeZeroEquiv n R).surjective |
| 95 | have h := hC.comp he |
| 96 | convert h using 1 |
| 97 | exact RingHom.ext fun x ↦ totalDegree_eq_zero_iff_eq_C.mp |
| 98 | ((totalDegree_zero_iff_isHomogeneous n).mpr x.2) |
| 99 | |
| 100 | /-- Projective space on finitely many homogeneous coordinates is proper over the terminal |
| 101 | scheme. -/ |
| 102 | noncomputable instance terminalProjProper [Finite n] : |
| 103 | IsProper (terminal.from (Proj ℤ[n].{u, v})) := by |
| 104 | have hterminal : IsTerminal (Spec ↧(ℤ[n].{u, v} 0)) := |
| 105 | IsTerminal.ofIso specULiftZIsTerminal |
| 106 | (Scheme.Spec.mapIso |
| 107 | (degreeZeroEquiv n (ULift.{max u v} ℤ)).toCommRingCatIso.op) |
| 108 | have := isIso_of_isTerminal hterminal terminalIsTerminal (terminal.from _) |
| 109 | rw [← terminal.comp_from (Proj.toSpecZero ℤ[n].{u, v}), |
| 110 | MorphismProperty.cancel_right_of_respectsIso (P := @IsProper)] |
| 111 | infer_instance |
| 112 | |
| 113 | /-- Let `S` be a scheme and `n` an index set of homogeneous coordinates. This is the structure |
| 114 | morphism `ℙ(n; S) → S`, the projection from the base change of `Proj(ℤ[x_i | i ∈ n])` to `S`. -/ |
| 115 | noncomputable def toBase : ℙ(n; S) ⟶ S := |
| 116 | pullback.fst (terminal.from S) (terminal.from (Proj ℤ[n].{u, v})) |
| 117 | |
| 118 | /-- Finite-dimensional projective space is proper over its base. -/ |
| 119 | noncomputable instance toBaseProper [Finite n] : IsProper (toBase n S) := by |
| 120 | change IsProper (pullback.fst (terminal.from S) (terminal.from (Proj ℤ[n].{u, v}))) |
| 121 | infer_instance |
| 122 | |
| 123 | universe w |
| 124 | |
| 125 | variable {X T : Scheme.{w}} |
| 126 | |
| 127 | /-- Let `f : X → T` be a morphism of schemes. A projective presentation consists of a natural number |
| 128 | `d` and a closed immersion `i : X → ℙ^d_T` such that the composite of `i` with the projection |
| 129 | `ℙ^d_T → T` is `f`. -/ |
| 130 | structure Presentation (f : X ⟶ T) where |
| 131 | /-- The dimension of the ambient projective space. -/ |
| 132 | ambientDimension : ℕ |
| 133 | /-- The closed embedding into projective space. -/ |
| 134 | immersion : X ⟶ ℙ(Fin (ambientDimension + 1); T) |
| 135 | [isClosedImmersion : IsClosedImmersion immersion] |
| 136 | /-- The embedding is a morphism over the base scheme. -/ |
| 137 | immersion_toBase : |
| 138 | immersion ≫ toBase (Fin (ambientDimension + 1)) T = f |
| 139 | |
| 140 | end ProjectiveSpace |
| 141 | |
| 142 | section |
| 143 | |
| 144 | open _root_.OAI.AlgebraicGeometry.Foundations.ProjectiveSpaceIs.ProjectiveSpace |
| 145 | |
| 146 | universe w |
| 147 | |
| 148 | variable {X T : Scheme.{w}} |
| 149 | |
| 150 | /-- A morphism of schemes `f : X → T` is projective here if there exist a natural number `d` and a |
| 151 | closed immersion `X → ℙ^d_T` whose composite with the projection to `T` is `f`. -/ |
| 152 | class IsProjective (f : X ⟶ T) : Prop where |
| 153 | /-- A finite-dimensional projective presentation exists. -/ |
| 154 | nonempty_presentation : Nonempty (_root_.OAI.AlgebraicGeometry.Foundations.ProjectiveSpaceIs.ProjectiveSpace.Presentation f) |
| 155 | |
| 156 | /-- A projective morphism in the explicit-presentation sense is proper. -/ |
| 157 | instance IsProjective.isProper {f : X ⟶ T} [h : IsProjective f] : IsProper f := by |
| 158 | obtain ⟨P⟩ := h.nonempty_presentation |
| 159 | let : IsClosedImmersion P.immersion := P.isClosedImmersion |
| 160 | have hcomp : IsProper |
| 161 | (P.immersion ≫ _root_.OAI.AlgebraicGeometry.Foundations.ProjectiveSpaceIs.ProjectiveSpace.toBase (Fin (P.ambientDimension + 1)) T) := by |
| 162 | infer_instance |
| 163 | rwa [P.immersion_toBase] at hcomp |
| 164 | |
| 165 | end |
| 166 | |
| 167 | end |
| 168 | |
| 169 | end OAI.AlgebraicGeometry.Foundations.ProjectiveSpaceIs |