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 2026 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 | This file has been modified. |
| 16 | -/ |
| 17 | import OAI.Algebra.Foundations.PolynomialCatenaryT |
| 18 | import Mathlib.RingTheory.AlgebraicIndependent.TranscendenceBasis |
| 19 | import Mathlib.RingTheory.QuasiFinite.Basic |
| 20 | import Mathlib.RingTheory.KrullDimension.Field |
| 21 | import Mathlib.RingTheory.LocalRing.ResidueField.Instances |
| 22 | import Mathlib.RingTheory.KrullDimension.Polynomial |
| 23 | import Mathlib.RingTheory.NoetherNormalization |
| 24 | |
| 25 | /-! # Transcendence Degree Krull Dimension -/ |
| 26 | |
| 27 | namespace OAI.Algebra.RingTheory.TranscendenceDegreeKrullDimension |
| 28 | |
| 29 | noncomputable section |
| 30 | |
| 31 | open _root_.Algebra |
| 32 | |
| 33 | /-! |
| 34 | # Krull dimension and transcendence degree over a field |
| 35 | |
| 36 | For a finitely generated domain over a field, the Krull dimension and the transcendence degree of |
| 37 | the fraction field agree. Both are therefore available to compute the dimension of a prime |
| 38 | quotient, whose transcendence degree is that of the residue field at the prime. |
| 39 | |
| 40 | A quasi-finite algebra does not change the residue field's transcendence degree, so for finitely |
| 41 | generated algebras it does not change the dimension of a prime quotient either. This is the |
| 42 | commutative-algebra half of the catenary dimension formula for smooth complex schemes. |
| 43 | -/ |
| 44 | |
| 45 | open _root_.Ideal _root_.MvPolynomial |
| 46 | |
| 47 | variable {k A : Type} [Field k] [CommRing A] [IsDomain A] [Algebra k A] |
| 48 | [Algebra.FiniteType k A] |
| 49 | |
| 50 | /-- A finite-type domain over a field has a finite Krull dimension, and that dimension is its |
| 51 | transcendence degree. The natural number is obtained from Noether normalization. -/ |
| 52 | lemma FiniteType.exists_ringKrullDim_eq_and_trdeg_eq : |
| 53 | ∃ n : ℕ, ringKrullDim A = n ∧ Algebra.trdeg k A = n := by |
| 54 | obtain ⟨n, g, hg, hfinite⟩ := exists_finite_inj_algHom_of_fg k A |
| 55 | let : Algebra (MvPolynomial (Fin n) k) A := g.toAlgebra |
| 56 | let : FaithfulSMul (MvPolynomial (Fin n) k) A := |
| 57 | (faithfulSMul_iff_algebraMap_injective _ _).mpr hg |
| 58 | let : Algebra.IsIntegral (MvPolynomial (Fin n) k) A := |
| 59 | ⟨hfinite.to_isIntegral⟩ |
| 60 | refine ⟨n, ?_, ?_⟩ |
| 61 | · rw [Foundations.PolynomialCatenaryT.PolynomialCatenary.ringKrullDim_eq_of_isIntegral_of_injective hg, |
| 62 | MvPolynomial.ringKrullDim_of_isNoetherianRing, |
| 63 | ringKrullDim_eq_zero_of_field, ENat.card_eq_coe_fintype_card, Fintype.card_fin] |
| 64 | simp |
| 65 | · have h := trdeg_add_eq k (MvPolynomial (Fin n) k) (A := A) |
| 66 | have hzero : Algebra.trdeg (MvPolynomial (Fin n) k) A = 0 := trdeg_eq_zero |
| 67 | rw [hzero, add_zero, MvPolynomial.trdeg_of_isDomain, |
| 68 | Cardinal.mk_fin, Cardinal.lift_id] at h |
| 69 | exact h.symm |
| 70 | |
| 71 | variable {R : Type} [CommRing R] [Algebra k R] |
| 72 | |
| 73 | /-- Passing from a prime quotient to its fraction field preserves transcendence degree. -/ |
| 74 | lemma trdeg_quotient_eq_residueField (P : Ideal R) [P.IsPrime] : |
| 75 | Algebra.trdeg k (R ⧸ P) = Algebra.trdeg k P.ResidueField := by |
| 76 | have h := trdeg_add_eq k (R ⧸ P) (A := P.ResidueField) |
| 77 | have hzero : Algebra.trdeg (R ⧸ P) P.ResidueField = 0 := trdeg_eq_zero |
| 78 | rw [hzero, add_zero] at h |
| 79 | exact h |
| 80 | |
| 81 | variable {S : Type} [CommRing S] [Algebra k S] [Algebra R S] |
| 82 | [IsScalarTower k R S] [Algebra.QuasiFinite R S] |
| 83 | |
| 84 | /-- A quasi-finite map induces an algebraic extension between the residue fields of a prime and |
| 85 | its contraction, so their transcendence degrees over the ground field agree. -/ |
| 86 | lemma QuasiFinite.trdeg_residueField_eq (P : Ideal S) [P.IsPrime] : |
| 87 | Algebra.trdeg k P.ResidueField = |
| 88 | Algebra.trdeg k (P.under R).ResidueField := by |
| 89 | let q : Ideal R := P.under R |
| 90 | let : Algebra (Localization.AtPrime q) (Localization.AtPrime P) := |
| 91 | Localization.AtPrime.algebraOfLiesOver q P |
| 92 | have h := trdeg_add_eq k q.ResidueField (A := P.ResidueField) |
| 93 | have hzero : Algebra.trdeg q.ResidueField P.ResidueField = 0 := trdeg_eq_zero |
| 94 | rw [hzero, add_zero] at h |
| 95 | exact h.symm |
| 96 | |
| 97 | variable [Algebra.FiniteType k R] [Algebra.FiniteType k S] |
| 98 | |
| 99 | include k in |
| 100 | /-- A quasi-finite map between finite-type algebras over a field preserves the Krull dimension of |
| 101 | the quotient at a prime. -/ |
| 102 | lemma QuasiFinite.ringKrullDim_quotient_eq (P : Ideal S) [P.IsPrime] : |
| 103 | ringKrullDim (S ⧸ P) = ringKrullDim (R ⧸ P.under R) := by |
| 104 | let q : Ideal R := P.under R |
| 105 | obtain ⟨n, hnDim, hnTrdeg⟩ := |
| 106 | TranscendenceDegreeKrullDimension.FiniteType.exists_ringKrullDim_eq_and_trdeg_eq (k := k) (A := R ⧸ q) |
| 107 | obtain ⟨m, hmDim, hmTrdeg⟩ := |
| 108 | TranscendenceDegreeKrullDimension.FiniteType.exists_ringKrullDim_eq_and_trdeg_eq (k := k) (A := S ⧸ P) |
| 109 | have htr : Algebra.trdeg k (S ⧸ P) = Algebra.trdeg k (R ⧸ q) := |
| 110 | (trdeg_quotient_eq_residueField (k := k) P).trans |
| 111 | ((TranscendenceDegreeKrullDimension.QuasiFinite.trdeg_residueField_eq (k := k) (R := R) P).trans |
| 112 | (trdeg_quotient_eq_residueField (k := k) q).symm) |
| 113 | have hmnCard : (m : Cardinal) = (n : Cardinal) := |
| 114 | hmTrdeg.symm.trans (htr.trans hnTrdeg) |
| 115 | have hmn : m = n := by exact_mod_cast hmnCard |
| 116 | rw [hmDim, hnDim, hmn] |
| 117 | |
| 118 | end |
| 119 | |
| 120 | end OAI.Algebra.RingTheory.TranscendenceDegreeKrullDimension |