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 (c) 2025 Andrew Yang. All rights reserved. |
| 3 | Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | Authors: Wanyi He, Jiedong Jiang, Christian Merten, Jingting Wang, Andrew Yang, Shouxin Zhang |
| 5 | This file has been modified. |
| 6 | -/ |
| 7 | import Mathlib.RingTheory.HopkinsLevitzki |
| 8 | import Mathlib.RingTheory.Ideal.GoingDown |
| 9 | import Mathlib.RingTheory.Ideal.Height |
| 10 | import Mathlib.RingTheory.Localization.Submodule |
| 11 | import Mathlib.RingTheory.Nakayama |
| 12 | import Mathlib.RingTheory.Ideal.Quotient.Noetherian |
| 13 | |
| 14 | /-! # Generator Height Bound -/ |
| 15 | |
| 16 | namespace OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Finite.GeneratorHeightBound |
| 17 | |
| 18 | noncomputable section |
| 19 | |
| 20 | open _root_.Ideal IsLocalRing |
| 21 | variable {R : Type*} [CommRing R] [IsNoetherianRing R] |
| 22 | |
| 23 | lemma localQuotientArtinianOfMinimalPrime |
| 24 | [IsLocalRing R] (I : Ideal R) (hp : IsLocalRing.maximalIdeal R ∈ I.minimalPrimes) : |
| 25 | IsArtinianRing (R ⧸ I) := |
| 26 | have : Ring.KrullDimLE 0 (R ⧸ I) := Ring.krullDimLE_zero_iff.mpr fun J prime ↦ |
| 27 | Ideal.isMaximal_of_isIntegral_of_isMaximal_under (R := R) J <| by |
| 28 | convert! IsLocalRing.maximalIdeal.isMaximal R |
| 29 | rw [Ideal.minimalPrimes, Set.mem_ofPred] at hp |
| 30 | have := prime.comap (Ideal.Quotient.mk I) |
| 31 | exact hp.eq_of_le ⟨this, .trans (by simp) (Ideal.ker_le_comap _)⟩ (le_maximalIdeal this.1) |
| 32 | IsNoetherianRing.isArtinianRing_of_krullDimLE_zero |
| 33 | |
| 34 | set_option backward.isDefEq.respectTransparency.types false in |
| 35 | lemma localPrincipalMinimalPrimeHeight |
| 36 | [IsLocalRing R] (I : Ideal R) [I.IsPrincipal] |
| 37 | (hp : (IsLocalRing.maximalIdeal R) ∈ I.minimalPrimes) : |
| 38 | (IsLocalRing.maximalIdeal R).height ≤ 1 := by |
| 39 | refine Ideal.height_le_iff.mpr fun q h₁ h₂ ↦ ?_ |
| 40 | suffices q.height = 0 by rw [this]; exact zero_lt_one |
| 41 | rw [← WithBot.coe_inj, |
| 42 | ← IsLocalization.AtPrime.ringKrullDim_eq_height q (Localization.AtPrime q), |
| 43 | WithBot.coe_zero, ← ringKrullDimZero_iff_ringKrullDim_eq_zero, |
| 44 | ← isArtinianRing_iff_krullDimLE_zero, isArtinianRing_iff_isNilpotent_maximalIdeal, |
| 45 | ← Localization.AtPrime.map_eq_maximalIdeal] |
| 46 | have : IsArtinianRing (R ⧸ I) := |
| 47 | localQuotientArtinianOfMinimalPrime I hp |
| 48 | let f := algebraMap R (Localization.AtPrime q) |
| 49 | let qs : ℕ →o (Ideal (R ⧸ I))ᵒᵈ := |
| 50 | { toFun n := ((q.map f ^ n).comap f).map (Ideal.Quotient.mk I) |
| 51 | monotone' i j e := Ideal.map_mono (Ideal.comap_mono (Ideal.pow_le_pow_right e)) } |
| 52 | obtain ⟨n, hn⟩ := IsArtinian.monotone_stabilizes qs |
| 53 | refine ⟨n, ?_⟩ |
| 54 | apply Submodule.eq_bot_of_le_smul_of_le_jacobson_bot (q.map f) _ (IsNoetherian.noetherian _) |
| 55 | rotate_left |
| 56 | · rw [IsLocalRing.jacobson_eq_maximalIdeal, Localization.AtPrime.map_eq_maximalIdeal] |
| 57 | exact bot_ne_top |
| 58 | rw [smul_eq_mul, ← pow_succ', |
| 59 | ← (IsLocalization.orderEmbedding q.primeCompl (Localization.AtPrime q)).map_rel_iff] |
| 60 | refine Submodule.le_of_le_smul_of_le_jacobson_bot (I := I) (IsNoetherian.noetherian _) ?_ ?_ |
| 61 | · rw [IsLocalRing.jacobson_eq_maximalIdeal] |
| 62 | exacts [hp.le, bot_ne_top] |
| 63 | · replace hn := congr(Ideal.comap (Ideal.Quotient.mk I) $(hn _ n.le_succ)) |
| 64 | simp only [qs, OrderHom.coe_mk, ← RingHom.ker_eq_comap_bot, Ideal.mk_ker, |
| 65 | Ideal.comap_map_of_surjective _ Ideal.Quotient.mk_surjective] at hn |
| 66 | intro x hx |
| 67 | obtain ⟨y, hy, z, hz, rfl⟩ := Submodule.mem_sup.mp (hn.le (Ideal.mem_sup_left hx)) |
| 68 | refine Submodule.add_mem_sup hy ?_ |
| 69 | obtain ⟨z, rfl⟩ := (Submodule.IsPrincipal.mem_iff_eq_smul_generator I).mp hz |
| 70 | rw [smul_eq_mul, smul_eq_mul, mul_comm] |
| 71 | refine Ideal.mul_mem_mul ?_ (Submodule.IsPrincipal.generator_mem _) |
| 72 | dsimp [IsLocalization.orderEmbedding] at hx |
| 73 | rwa [Ideal.mem_comap, f.map_add, f.map_mul, Ideal.add_mem_iff_right _ |
| 74 | (Ideal.pow_le_pow_right n.le_succ hy), mul_comm, Ideal.unit_mul_mem_iff_mem] at hx |
| 75 | refine IsLocalization.map_units (M := q.primeCompl) _ ⟨_, ?_⟩ |
| 76 | change Submodule.IsPrincipal.generator I ∉ (↑q : Set R) |
| 77 | rw [← Set.singleton_subset_iff, ← Ideal.span_le, Ideal.span_singleton_generator] |
| 78 | exact fun e ↦ h₂.not_ge (hp.2 ⟨h₁, e⟩ h₂.le) |
| 79 | |
| 80 | /-- **Krull's principal ideal theorem** (also known as **Krullscher Hauptidealsatz**): |
| 81 | In a commutative Noetherian ring `R`, any prime ideal that is minimal over a principal ideal |
| 82 | has height at most 1. -/ |
| 83 | lemma principalMinimalPrimeHeight |
| 84 | (I : Ideal R) [I.IsPrincipal] (p : Ideal R) (hp : p ∈ I.minimalPrimes) : p.height ≤ 1 := by |
| 85 | have := hp.isPrime |
| 86 | let f := algebraMap R (Localization.AtPrime p) |
| 87 | have := localPrincipalMinimalPrimeHeight (I.map f) ?_ |
| 88 | · rwa [← IsLocalization.height_under p.primeCompl, |
| 89 | Localization.AtPrime.under_maximalIdeal] at this |
| 90 | · rwa [IsLocalization.minimalPrimes_map p.primeCompl (Localization.AtPrime p) I, |
| 91 | Set.mem_preimage, Localization.AtPrime.under_maximalIdeal] |
| 92 | |
| 93 | theorem smallerPrimeMinimalOverReplacementGenerators {q p : Ideal R} [q.IsPrime] |
| 94 | (hqp : q < p) (x : R) (s : Set R) (hp : p ∈ (span (insert x s)).minimalPrimes) |
| 95 | (t : Set R) (htq : t ⊆ q) (hsp : s ⊆ (span (insert x t)).radical) : |
| 96 | q ∈ (span t).minimalPrimes := by |
| 97 | let f := Ideal.Quotient.mk (span t) |
| 98 | have hf : Function.Surjective f := Ideal.Quotient.mk_surjective |
| 99 | have hI'q : span t ≤ q := span_le.mpr htq |
| 100 | have hI'p : span t ≤ p := hI'q.trans hqp.le |
| 101 | have := hp.isPrime |
| 102 | have : (p.map f).IsPrime := map_isPrime_of_surjective hf (by rwa [mk_ker]) |
| 103 | suffices h : (p.map f).height ≤ 1 by |
| 104 | have h_lt : q.map f < p.map f := (map_mono hqp.le).lt_of_not_ge fun e ↦ hqp.not_ge <| by |
| 105 | simpa only [comap_map_of_surjective f hf, ← RingHom.ker_eq_comap_bot, f, mk_ker, |
| 106 | sup_eq_left.mpr hI'q, sup_eq_left.mpr hI'p] using comap_mono (f := f) e |
| 107 | have : (q.map f).IsPrime := map_isPrime_of_surjective hf (by rwa [mk_ker]) |
| 108 | have : (p.map f).FiniteHeight := ⟨Or.inr (h.trans_lt (WithTop.coe_lt_top 1)).ne⟩ |
| 109 | have := (height_strict_mono_of_isPrime_of_isPrime h_lt).trans_le h |
| 110 | rw [Order.lt_one_iff, height_eq_zero_iff] at this |
| 111 | have := minimalPrimes_comap_of_surjective hf this |
| 112 | rwa [comap_map_of_surjective f hf, ← RingHom.ker_eq_comap_bot, |
| 113 | mk_ker, sup_eq_left.mpr hI'q] at this |
| 114 | refine principalMinimalPrimeHeight ((span {x}).map f) (p.map f) ⟨⟨this, |
| 115 | map_mono <| span_le.mpr <| Set.singleton_subset_iff.mpr <| hp.le <| subset_span <| .inl rfl⟩, |
| 116 | fun r ⟨hr, hxr⟩ hrp ↦ map_le_iff_le_comap.mpr (hp.2 ⟨hr.comap f, ?_⟩ ?_)⟩ |
| 117 | · rw [span_le, Set.insert_subset_iff] |
| 118 | have := map_le_iff_le_comap.mp hxr (subset_span rfl) |
| 119 | refine ⟨this, hsp.trans ((hr.comap f).isRadical.radical_le_iff.mpr ?_)⟩ |
| 120 | rw [span_le, Set.insert_subset_iff] |
| 121 | exact ⟨this, span_le.mp (mk_ker.symm.trans_le (ker_le_comap _))⟩ |
| 122 | · conv_rhs => rw [← sup_eq_left.mpr hI'p, ← (span t).mk_ker, RingHom.ker_eq_comap_bot, |
| 123 | ← comap_map_of_surjective f hf p] |
| 124 | exact comap_mono hrp |
| 125 | |
| 126 | /-- **Krull's height theorem** (also known as **Krullscher Höhensatz**): |
| 127 | In a commutative Noetherian ring `R`, any prime ideal that is minimal over an ideal generated |
| 128 | by `n` elements has height at most `n`. -/ |
| 129 | lemma minimalPrimeHeightLeSpanRank |
| 130 | (I : Ideal R) (p : Ideal R) (hp : p ∈ I.minimalPrimes) : |
| 131 | p.height ≤ I.spanRank.toENat := by |
| 132 | classical |
| 133 | rw [I.spanRank_toENat_eq_iInf_finset_card, le_iInf_iff] |
| 134 | rintro ⟨s, (rfl : span s = I)⟩ |
| 135 | induction hn : s.card using Nat.strong_induction_on generalizing R with |
| 136 | | h n H => |
| 137 | replace hn : s.card ≤ n := hn.le |
| 138 | have := hp.isPrime |
| 139 | cases n with |
| 140 | | zero => |
| 141 | rw [ENat.natCast_zero, nonpos_iff_eq_zero, height_eq_zero_iff, minimalPrimes] |
| 142 | simp_all |
| 143 | | succ n => |
| 144 | wlog hR : ∃ (_ : IsLocalRing R), p = maximalIdeal R |
| 145 | · rw [← Localization.AtPrime.under_maximalIdeal (I := p)] at hp ⊢ |
| 146 | rw [IsLocalization.height_under p.primeCompl] |
| 147 | rw [← Set.mem_preimage, ← IsLocalization.minimalPrimes_map p.primeCompl, map_span] at hp |
| 148 | exact this _ (s.image (algebraMap R (Localization p.primeCompl))) (by simpa using hp) |
| 149 | inferInstance _ H (Finset.card_image_le.trans hn) ⟨inferInstance, rfl⟩ |
| 150 | obtain ⟨_, rfl⟩ := hR |
| 151 | simp_rw [height_le_iff_covBy, ENat.natCast_add, ENat.natCast_one, ENat.lt_natCast_add_one_iff] |
| 152 | intro q hq hpq hq' |
| 153 | obtain ⟨x, s', hxs', rfl, hxq⟩ : ∃ x s', x ∉ s' ∧ s = insert x s' ∧ x ∉ q := by |
| 154 | have : ¬(s : Set R) ⊆ q := by |
| 155 | rw [← span_le] |
| 156 | exact fun e ↦ lt_irrefl _ ((hp.2 ⟨hq, e⟩ hpq.le).trans_lt hpq) |
| 157 | obtain ⟨x, hxt, hxq⟩ := Set.not_subset.mp this |
| 158 | exact ⟨x, _, fun e ↦ (Finset.mem_erase.mp e).1 rfl, (Finset.insert_erase hxt).symm, hxq⟩ |
| 159 | have : maximalIdeal R ≤ (q ⊔ span {x}).radical := by |
| 160 | rw [radical_eq_sInf, le_sInf_iff] |
| 161 | exact fun J ⟨hJ, hJ'⟩ ↦ by_contra fun h ↦ hq' J hJ' ((SetLike.lt_iff_le_and_exists.mpr |
| 162 | ⟨le_sup_left, x, mem_sup_right (mem_span_singleton_self _), hxq⟩).trans_le hJ) |
| 163 | ((le_maximalIdeal hJ'.ne_top).lt_of_not_ge h) |
| 164 | have h : (s' : Set R) ⊆ (q ⊔ span {x}).radical := by |
| 165 | have := hp.le.trans this |
| 166 | rw [span_le, Finset.coe_insert, Set.insert_subset_iff] at this |
| 167 | exact this.2 |
| 168 | obtain ⟨t, ht, hspan⟩ := exists_subset_radical_span_sup_of_subset_radical_sup _ _ _ h |
| 169 | let t := Finset.univ.image t |
| 170 | suffices hq : q ∈ (span t).minimalPrimes from |
| 171 | have tcard : t.card ≤ n := Nat.le_of_lt_succ ((Finset.card_image_le.trans_lt <| by |
| 172 | simpa using Finset.card_lt_card (Finset.ssubset_insert hxs')).trans_le hn) |
| 173 | (H _ (tcard.trans_lt n.lt_succ_self) q t hq rfl).trans (by norm_cast) |
| 174 | rw [Finset.coe_insert] at hp |
| 175 | convert! smallerPrimeMinimalOverReplacementGenerators hpq _ _ hp _ ht ?_ |
| 176 | · simp [t] |
| 177 | refine hspan.trans <| radical_mono ?_ |
| 178 | rw [← Set.union_singleton, span_union] |
| 179 | |
| 180 | lemma minimalPrimeHeightLeGeneratorCard {p : Ideal R} {s : Finset R} |
| 181 | (hI : p ∈ (Ideal.span s).minimalPrimes) : |
| 182 | p.height ≤ s.card := by |
| 183 | trans (Cardinal.toENat (Submodule.spanRank (Ideal.span (s : Set R)))) |
| 184 | · exact minimalPrimeHeightLeSpanRank _ _ hI |
| 185 | · simpa using Submodule.spanRank_span_le_card (s : Set R) |
| 186 | |
| 187 | end |
| 188 | |
| 189 | end OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Finite.GeneratorHeightBound |