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.RingTheory.Localization.Integral |
| 2 | import Mathlib.RingTheory.Localization.Ideal |
| 3 | import Mathlib.RingTheory.Localization.FractionRing |
| 4 | import Mathlib.RingTheory.PrincipalIdealDomain |
| 5 | import Mathlib.Algebra.Polynomial.FieldDivision |
| 6 | |
| 7 | /-! # Generic Polynomial GCD -/ |
| 8 | |
| 9 | namespace OAI.AlgebraicGeometry.ComplexGroups.HolomorphicAlgebraicity.GenericPolynomialGCD.Constructions.GenericGCD |
| 10 | |
| 11 | noncomputable section |
| 12 | |
| 13 | /-! |
| 14 | # Clearing denominators in a generic polynomial gcd |
| 15 | |
| 16 | Over an integral domain, a polynomial ideal becomes principal over the |
| 17 | fraction field. Clearing denominators gives a nonzero polynomial and |
| 18 | explicit nonzero scalar multipliers relating it to the original ideal. |
| 19 | -/ |
| 20 | |
| 21 | open Set _root_.Polynomial |
| 22 | open scoped nonZeroDivisors |
| 23 | |
| 24 | variable {A K : Type*} [CommRing A] [IsDomain A] [Field K] [Algebra A K] [IsFractionRing A K] |
| 25 | |
| 26 | attribute [local instance] Polynomial.algebra Polynomial.isLocalization |
| 27 | |
| 28 | theorem clear_mapped_ideal_membership (I : Ideal A[X]) (p : A[X]) |
| 29 | (hp : p.map (algebraMap A K) ∈ I.map (Polynomial.mapRingHom (algebraMap A K))) : |
| 30 | ∃ a : A, a ≠ 0 ∧ C a * p ∈ I := by |
| 31 | obtain ⟨c, hc, hcp⟩ := (IsLocalization.algebraMap_mem_map_algebraMap_iff |
| 32 | (A⁰.map C) K[X] I p).mp hp |
| 33 | obtain ⟨a, ha, rfl⟩ := hc |
| 34 | exact ⟨a, nonZeroDivisors.ne_zero ha, hcp⟩ |
| 35 | |
| 36 | theorem clear_mapped_divisibility (p q : A[X]) |
| 37 | (h : p.map (algebraMap A K) ∣ q.map (algebraMap A K)) : |
| 38 | ∃ a : A, a ≠ 0 ∧ p ∣ C a * q := by |
| 39 | have hm : q.map (algebraMap A K) ∈ |
| 40 | (Ideal.span ({p} : Set A[X])).map (Polynomial.mapRingHom (algebraMap A K)) := by |
| 41 | rw [Ideal.map_span, Set.image_singleton] |
| 42 | exact Ideal.mem_span_singleton.mpr h |
| 43 | obtain ⟨a, ha, haq⟩ := clear_mapped_ideal_membership (K := K) _ q hm |
| 44 | exact ⟨a, ha, Ideal.mem_span_singleton.mp haq⟩ |
| 45 | |
| 46 | /-- The polynomial generator over the fraction field can be represented |
| 47 | over the original domain. Its divisibility and ideal membership both hold |
| 48 | after multiplying by nonzero scalars from that domain. -/ |
| 49 | theorem exists_generic_generator (I : Ideal A[X]) (hI : I ≠ ⊥) : |
| 50 | ∃ G : A[X], G ≠ 0 ∧ |
| 51 | (∃ a : A, a ≠ 0 ∧ C a * G ∈ I) ∧ |
| 52 | ∀ p ∈ I, ∃ a : A, a ≠ 0 ∧ G ∣ C a * p := by |
| 53 | classical |
| 54 | let K := FractionRing A |
| 55 | let φ : A[X] →+* K[X] := Polynomial.mapRingHom (algebraMap A K) |
| 56 | let J := I.map φ |
| 57 | let q : K[X] := Submodule.IsPrincipal.generator J |
| 58 | have hqspan : Ideal.span ({q} : Set K[X]) = J := Ideal.span_singleton_generator J |
| 59 | have hq0 : q ≠ 0 := by |
| 60 | intro hq |
| 61 | have hJ : J = ⊥ := by rw [← hqspan, hq, Ideal.span_singleton_eq_bot.mpr rfl] |
| 62 | apply hI |
| 63 | apply le_antisymm ?_ bot_le |
| 64 | intro p hp |
| 65 | have hmap : φ p ∈ J := Ideal.mem_map_of_mem φ hp |
| 66 | rw [hJ, Ideal.mem_bot] at hmap |
| 67 | exact (Polynomial.map_injective (algebraMap A K) (IsFractionRing.injective A K)) |
| 68 | (by simpa only [φ, Polynomial.coe_mapRingHom, Polynomial.map_zero] using hmap) |
| 69 | let G := IsLocalization.integerNormalization A⁰ q |
| 70 | have hG0 : G ≠ 0 := by |
| 71 | exact fun h => hq0 ((IsLocalization.integerNormalization_eq_zero_iff (M := A⁰) le_rfl q).mp h) |
| 72 | obtain ⟨b, hb, hGb⟩ := IsLocalization.integerNormalization_spec A⁰ q |
| 73 | have hGb' : φ G = C (algebraMap A K b) * q := by |
| 74 | simpa only [φ, Polynomial.coe_mapRingHom, ← algebraMap_smul, Algebra.smul_def, |
| 75 | Polynomial.algebraMap_apply] using hGb |
| 76 | have hbunit : IsUnit (C (algebraMap A K b) : K[X]) := |
| 77 | isUnit_C.mpr (isUnit_iff_ne_zero.mpr ((IsFractionRing.to_map_eq_zero_iff (R := A) (K := K)).not.mpr |
| 78 | (nonZeroDivisors.ne_zero hb))) |
| 79 | have hGspan : Ideal.span ({φ G} : Set K[X]) = J := by |
| 80 | rw [hGb', Ideal.span_singleton_mul_left_unit hbunit, hqspan] |
| 81 | have hGJ : φ G ∈ J := hGspan ▸ Ideal.subset_span (mem_singleton _) |
| 82 | refine ⟨G, hG0, clear_mapped_ideal_membership (K := K) I G hGJ, ?_⟩ |
| 83 | intro p hp |
| 84 | apply clear_mapped_divisibility (K := K) G p |
| 85 | apply Ideal.mem_span_singleton.mp |
| 86 | change φ p ∈ Ideal.span ({φ G} : Set K[X]) |
| 87 | rw [hGspan] |
| 88 | exact Ideal.mem_map_of_mem φ hp |
| 89 | |
| 90 | /-- A finite polynomial family has one common-root polynomial away from the |
| 91 | vanishing of one nonzero coefficient-ring element. This statement holds for |
| 92 | every specialization to a field, and preserves the generator's degree. -/ |
| 93 | theorem exists_common_root_polynomial {ι : Type*} [Fintype ι] (P : ι → A[X]) |
| 94 | (hP : ∃ i, P i ≠ 0) : |
| 95 | ∃ (G : A[X]) (c : A), c ≠ 0 ∧ G ≠ 0 ∧ |
| 96 | ∀ {F : Type*} [Field F] (φ : A →+* F), φ c ≠ 0 → |
| 97 | (G.map φ).natDegree = G.natDegree ∧ |
| 98 | ∀ z : F, (∀ i, (P i).eval₂ φ z = 0) ↔ G.eval₂ φ z = 0 := by |
| 99 | classical |
| 100 | let I := Ideal.span (Set.range P) |
| 101 | have hmem (i : ι) : P i ∈ I := Ideal.subset_span (mem_range_self i) |
| 102 | have hI : I ≠ ⊥ := by |
| 103 | intro h |
| 104 | obtain ⟨i, hi⟩ := hP |
| 105 | exact hi (Ideal.mem_bot.mp (h ▸ hmem i)) |
| 106 | obtain ⟨G, hG, ⟨a₀, ha₀, haG⟩, hdiv⟩ := exists_generic_generator I hI |
| 107 | choose a ha hadiv using (fun i => hdiv (P i) (hmem i)) |
| 108 | let c := a₀ * (∏ i, a i) * G.leadingCoeff |
| 109 | have hc : c ≠ 0 := mul_ne_zero (mul_ne_zero ha₀ (Finset.prod_ne_zero_iff.mpr (fun i _ => ha i))) |
| 110 | (leadingCoeff_ne_zero.mpr hG) |
| 111 | refine ⟨G, c, hc, hG, ?_⟩ |
| 112 | intro F _ φ hφ |
| 113 | have hparts : φ a₀ * (∏ i, φ (a i)) * φ G.leadingCoeff ≠ 0 := by |
| 114 | simpa only [c, map_mul, map_prod] using hφ |
| 115 | have hlead : φ G.leadingCoeff ≠ 0 := (mul_ne_zero_iff.mp hparts).2 |
| 116 | have hφa₀ : φ a₀ ≠ 0 := (mul_ne_zero_iff.mp (mul_ne_zero_iff.mp hparts).1).1 |
| 117 | have hφa (i : ι) : φ (a i) ≠ 0 := |
| 118 | Finset.prod_ne_zero_iff.mp (mul_ne_zero_iff.mp (mul_ne_zero_iff.mp hparts).1).2 i (Finset.mem_univ _) |
| 119 | refine ⟨natDegree_map_of_leadingCoeff_ne_zero _ hlead, fun z => ?_⟩ |
| 120 | let ev : A[X] →+* F := Polynomial.eval₂RingHom φ z |
| 121 | constructor |
| 122 | · intro hz |
| 123 | have hker : I ≤ RingHom.ker ev := by |
| 124 | apply Ideal.span_le.mpr |
| 125 | rintro _ ⟨i, rfl⟩ |
| 126 | exact hz i |
| 127 | have hmul : φ a₀ * G.eval₂ φ z = 0 := by |
| 128 | have h := hker haG |
| 129 | change ev (C a₀ * G) = 0 at h |
| 130 | simpa only [ev, Polynomial.coe_eval₂RingHom, eval₂_mul, eval₂_C] using h |
| 131 | exact (mul_eq_zero.mp hmul).resolve_left hφa₀ |
| 132 | · intro hz i |
| 133 | obtain ⟨H, hH⟩ := hadiv i |
| 134 | have hmul : φ (a i) * (P i).eval₂ φ z = 0 := by |
| 135 | have h := congrArg ev hH |
| 136 | simpa only [ev, Polynomial.coe_eval₂RingHom, eval₂_mul, eval₂_C, hz, zero_mul] using h |
| 137 | exact (mul_eq_zero.mp hmul).resolve_left (hφa i) |
| 138 | |
| 139 | /-- Explicit finite polynomial identities form a certificate that can be |
| 140 | realized on a common neighborhood when the coefficient ring is a germ ring. -/ |
| 141 | theorem exists_generic_certificate {ι : Type*} [Fintype ι] (P : ι → A[X]) |
| 142 | (hP : ∃ i, P i ≠ 0) : |
| 143 | ∃ (G : A[X]) (a₀ : A) (B : ι → A[X]) (a : ι → A) (H : ι → A[X]), |
| 144 | G ≠ 0 ∧ a₀ ≠ 0 ∧ (∀ i, a i ≠ 0) ∧ |
| 145 | (∑ i, B i * P i) = C a₀ * G ∧ ∀ i, C (a i) * P i = G * H i := by |
| 146 | classical |
| 147 | let I := Ideal.span (Set.range P) |
| 148 | have hmem (i : ι) : P i ∈ I := Ideal.subset_span (mem_range_self i) |
| 149 | have hI : I ≠ ⊥ := by |
| 150 | intro h |
| 151 | obtain ⟨i, hi⟩ := hP |
| 152 | exact hi (Ideal.mem_bot.mp (h ▸ hmem i)) |
| 153 | obtain ⟨G, hG, ⟨a₀, ha₀, haG⟩, hdiv⟩ := exists_generic_generator I hI |
| 154 | obtain ⟨B, hB⟩ := Ideal.mem_span_range_iff_exists_fun.mp haG |
| 155 | choose a ha H hH using (fun i => hdiv (P i) (hmem i)) |
| 156 | exact ⟨G, a₀, B, a, H, hG, ha₀, ha, hB, hH⟩ |
| 157 | |
| 158 | end |
| 159 | |
| 160 | end OAI.AlgebraicGeometry.ComplexGroups.HolomorphicAlgebraicity.GenericPolynomialGCD.Constructions.GenericGCD |