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 OAI.AlgebraicGeometry.ComplexGroups.HolomorphicAlgebraicity.GenericSquarefree |
| 2 | import OAI.AlgebraicGeometry.ComplexGroups.HolomorphicAlgebraicity.GenericDegree |
| 3 | |
| 4 | /-! # Squarefree Families -/ |
| 5 | |
| 6 | namespace OAI.AlgebraicGeometry.ComplexGroups.HolomorphicAlgebraicity.SquarefreeFamilies |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | /-! |
| 11 | # Squarefree holomorphic polynomial families |
| 12 | |
| 13 | Realize the denominator-cleared radical and Bezout identities on a common |
| 14 | neighborhood. Their nonzero scalar factors define the exceptional set. |
| 15 | -/ |
| 16 | |
| 17 | open Set Filter _root_.Polynomial |
| 18 | open scoped _root_.Topology |
| 19 | |
| 20 | namespace Constructions.Germs |
| 21 | |
| 22 | def derivativeGerm {X : Type*} (l : Filter X) : Germ l ℂ[X] →+ Germ l ℂ[X] where |
| 23 | toFun := Germ.map Polynomial.derivative |
| 24 | map_zero' := by |
| 25 | apply Germ.coe_eq.mpr |
| 26 | exact Filter.Eventually.of_forall (fun _ => derivative_zero) |
| 27 | map_add' := by |
| 28 | intro a b |
| 29 | induction a, b using Germ.inductionOn₂ with |
| 30 | | h f g => |
| 31 | apply Germ.coe_eq.mpr |
| 32 | exact Filter.Eventually.of_forall (fun _ => derivative_add) |
| 33 | |
| 34 | theorem realize_monomial_of_representative |
| 35 | {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] |
| 36 | (x : E) (a : HolomorphicGerms.Constructions.Germs.HolomorphicGerm x) (f : E → ℂ) (hf : (f : Germ (𝓝 x) ℂ) = a.val) |
| 37 | (n : ℕ) : PolynomialGerms.Constructions.Germs.polynomialRealization x (monomial n a) = |
| 38 | ((fun y => monomial n (f y)) : Germ (𝓝 x) ℂ[X]) := by |
| 39 | rw [← C_mul_X_pow_eq_monomial, map_mul, map_pow, |
| 40 | PolynomialGerms.Constructions.Germs.realize_C_of_representative x a f hf] |
| 41 | have hX : PolynomialGerms.Constructions.Germs.polynomialRealization x X = ((fun _ : E => (X : ℂ[X])) : Germ (𝓝 x) ℂ[X]) := by |
| 42 | exact eval₂_X _ _ |
| 43 | rw [hX, ← Germ.coe_pow, ← Germ.coe_mul] |
| 44 | apply Germ.coe_eq.mpr |
| 45 | exact Filter.Eventually.of_forall (fun _ => C_mul_X_pow_eq_monomial) |
| 46 | |
| 47 | theorem realize_derivative |
| 48 | {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] |
| 49 | (x : E) (P : (HolomorphicGerms.Constructions.Germs.HolomorphicGerm x)[X]) : |
| 50 | PolynomialGerms.Constructions.Germs.polynomialRealization x (derivative P) = derivativeGerm (𝓝 x) (PolynomialGerms.Constructions.Germs.polynomialRealization x P) := by |
| 51 | induction P using Polynomial.induction_on' with |
| 52 | | add P Q ihP ihQ => simp only [map_add, ihP, ihQ] |
| 53 | | monomial n a => |
| 54 | obtain ⟨f, hf, _⟩ := a.property |
| 55 | rw [derivative_monomial, ← monomial_mul_C, map_mul, |
| 56 | realize_monomial_of_representative x a f hf, |
| 57 | realize_monomial_of_representative x a f hf] |
| 58 | have hn : PolynomialGerms.Constructions.Germs.polynomialRealization x (C (n : HolomorphicGerms.Constructions.Germs.HolomorphicGerm x)) = |
| 59 | ((fun _ : E => C (n : ℂ)) : Germ (𝓝 x) ℂ[X]) := by |
| 60 | rw [map_natCast, map_natCast] |
| 61 | rfl |
| 62 | rw [hn, ← Germ.coe_mul] |
| 63 | apply Germ.coe_eq.mpr |
| 64 | exact Filter.Eventually.of_forall (fun y => by |
| 65 | simp only [Pi.mul_apply, monomial_mul_C, Function.comp_apply, derivative_monomial]) |
| 66 | |
| 67 | end Constructions.Germs |
| 68 | |
| 69 | namespace Constructions.GenericPolynomial |
| 70 | |
| 71 | private theorem exists_representative {X R : Type*} {l : Filter X} (a : Germ l R) : |
| 72 | ∃ f : X → R, a = (f : Germ l R) := |
| 73 | a.inductionOn (fun f => ⟨f, rfl⟩) |
| 74 | |
| 75 | theorem exists_squarefree_family |
| 76 | {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] |
| 77 | (P : E → ℂ[X]) {U : Set E} (hU : IsOpen U) {x : E} (hx : x ∈ U) (d : ℕ) |
| 78 | (hcoeff : ∀ k, DifferentiableOn ℂ (fun y => (P y).coeff k) U) |
| 79 | (hdegree : ∀ y ∈ U, (P y).natDegree ≤ d) |
| 80 | (hn : ¬∀ᶠ y in 𝓝 x, P y = 0) : |
| 81 | ∃ (D : ℕ) (Q : E → ℂ[X]) (c : E → ℂ) (V : Set E), |
| 82 | IsOpen V ∧ x ∈ V ∧ V ⊆ U ∧ (∀ y, (Q y).natDegree ≤ D) ∧ |
| 83 | (∀ k, DifferentiableOn ℂ (fun y => (Q y).coeff k) V) ∧ |
| 84 | DifferentiableOn ℂ c V ∧ (¬∀ᶠ y in 𝓝 x, c y = 0) ∧ |
| 85 | ∀ y ∈ V, c y ≠ 0 → (Q y).Separable ∧ |
| 86 | ∀ z : ℂ, (P y).eval z = 0 ↔ (Q y).eval z = 0 := by |
| 87 | let p := PolynomialGerms.Constructions.Germs.polynomialOfFamily x P d hU hx hcoeff |
| 88 | have hp : PolynomialGerms.Constructions.Germs.polynomialRealization x p = (P : Germ (𝓝 x) ℂ[X]) := |
| 89 | PolynomialGerms.Constructions.Germs.realize_polynomialOfFamily x P d hU hx hcoeff hdegree |
| 90 | have hpn : p ≠ 0 := by |
| 91 | intro hzero |
| 92 | rw [hzero, map_zero] at hp |
| 93 | exact hn (Germ.coe_eq.mp hp.symm) |
| 94 | obtain ⟨q, n, a, b, c₀, H, J, B, C₀, _, ha, hb, hc₀, hH, hJ, hBC⟩ := |
| 95 | GenericSquarefree.Constructions.GenericGCD.exists_squarefree_certificate p hpn |
| 96 | obtain ⟨D, Q, W, hW, hxW, hQdegree, hQcoeff, hq⟩ := PolynomialGerms.Constructions.Germs.exists_polynomial_representative x q |
| 97 | obtain ⟨f, hf, _⟩ := a.property |
| 98 | obtain ⟨g, hg, _⟩ := b.property |
| 99 | obtain ⟨h, hh, _⟩ := c₀.property |
| 100 | obtain ⟨H', hH'⟩ := exists_representative (PolynomialGerms.Constructions.Germs.polynomialRealization x H) |
| 101 | obtain ⟨J', hJ'⟩ := exists_representative (PolynomialGerms.Constructions.Germs.polynomialRealization x J) |
| 102 | obtain ⟨B', hB'⟩ := exists_representative (PolynomialGerms.Constructions.Germs.polynomialRealization x B) |
| 103 | obtain ⟨C', hC'⟩ := exists_representative (PolynomialGerms.Constructions.Germs.polynomialRealization x C₀) |
| 104 | let ac := a * b * c₀ |
| 105 | have hac : ac ≠ 0 := mul_ne_zero (mul_ne_zero ha hb) hc₀ |
| 106 | obtain ⟨c, hc, Wc, hWc, hxWc, hcd⟩ := ac.property |
| 107 | have hcn : ¬∀ᶠ y in 𝓝 x, c y = 0 := by |
| 108 | intro hz |
| 109 | apply hac |
| 110 | apply Subtype.ext |
| 111 | change ac.val = 0 |
| 112 | rw [← hc] |
| 113 | exact Germ.coe_eq.mpr hz |
| 114 | have hfactor : ∀ᶠ y in 𝓝 x, c y = f y * g y * h y := by |
| 115 | have heq : (c : Germ (𝓝 x) ℂ) = ((fun y => f y * g y * h y) : Germ (𝓝 x) ℂ) := by |
| 116 | rw [hc] |
| 117 | change ac.val = ((f * g * h : E → ℂ) : Germ (𝓝 x) ℂ) |
| 118 | rw [Germ.coe_mul, Germ.coe_mul, hf, hg, hh] |
| 119 | rfl |
| 120 | exact Germ.coe_eq.mp heq |
| 121 | have hdiv : ∀ᶠ y in 𝓝 x, C (f y) * P y = Q y * H' y := by |
| 122 | have heq := congrArg (PolynomialGerms.Constructions.Germs.polynomialRealization x) hH |
| 123 | simp only [map_mul, PolynomialGerms.Constructions.Germs.realize_C_of_representative x a f hf, |
| 124 | hp, hq, hH', ← Germ.coe_mul] at heq |
| 125 | exact Germ.coe_eq.mp heq |
| 126 | have hpow : ∀ᶠ y in 𝓝 x, C (g y) * Q y ^ (n + 1) = P y * J' y := by |
| 127 | have heq := congrArg (PolynomialGerms.Constructions.Germs.polynomialRealization x) hJ |
| 128 | simp only [map_mul, map_pow, PolynomialGerms.Constructions.Germs.realize_C_of_representative x b g hg, |
| 129 | hp, hq, hJ', ← Germ.coe_pow, ← Germ.coe_mul] at heq |
| 130 | exact Germ.coe_eq.mp heq |
| 131 | have hbezout : ∀ᶠ y in 𝓝 x, B' y * Q y + C' y * derivative (Q y) = C (h y) := by |
| 132 | have heq := congrArg (PolynomialGerms.Constructions.Germs.polynomialRealization x) hBC |
| 133 | simp only [map_add, map_mul, PolynomialGerms.Constructions.Germs.realize_C_of_representative x c₀ h hh, |
| 134 | Germs.realize_derivative, hq, hB', hC'] at heq |
| 135 | change (B' : Germ (𝓝 x) ℂ[X]) * Q + C' * |
| 136 | ((fun y => derivative (Q y)) : Germ (𝓝 x) ℂ[X]) = |
| 137 | ((fun y => C (h y)) : Germ (𝓝 x) ℂ[X]) at heq |
| 138 | rw [← Germ.coe_mul, ← Germ.coe_mul, ← Germ.coe_add] at heq |
| 139 | exact Germ.coe_eq.mp heq |
| 140 | have hall : ∀ᶠ y in 𝓝 x, y ∈ U ∧ y ∈ W ∧ y ∈ Wc ∧ |
| 141 | c y = f y * g y * h y ∧ C (f y) * P y = Q y * H' y ∧ |
| 142 | C (g y) * Q y ^ (n + 1) = P y * J' y ∧ |
| 143 | B' y * Q y + C' y * derivative (Q y) = C (h y) := by |
| 144 | filter_upwards [hU.mem_nhds hx, hW.mem_nhds hxW, hWc.mem_nhds hxWc, |
| 145 | hfactor, hdiv, hpow, hbezout] with y hyU hyW hyWc hyf hyd hyp hyb |
| 146 | exact ⟨hyU, hyW, hyWc, hyf, hyd, hyp, hyb⟩ |
| 147 | obtain ⟨V, hVsub, hV, hxV⟩ := mem_nhds_iff.mp hall |
| 148 | refine ⟨D, Q, c, V, hV, hxV, fun y hy => (hVsub hy).1, hQdegree, |
| 149 | fun k => (hQcoeff k).mono (fun y hy => (hVsub hy).2.1), |
| 150 | hcd.mono (fun y hy => (hVsub hy).2.2.1), hcn, ?_⟩ |
| 151 | intro y hy hcy |
| 152 | obtain ⟨_, _, _, hyf, hyd, hyp, hyb⟩ := hVsub hy |
| 153 | have hnon : f y * g y * h y ≠ 0 := hyf ▸ hcy |
| 154 | have hfy : f y ≠ 0 := (mul_ne_zero_iff.mp (mul_ne_zero_iff.mp hnon).1).1 |
| 155 | have hgy : g y ≠ 0 := (mul_ne_zero_iff.mp (mul_ne_zero_iff.mp hnon).1).2 |
| 156 | have hhy : h y ≠ 0 := (mul_ne_zero_iff.mp hnon).2 |
| 157 | constructor |
| 158 | · apply (separable_def' _).mpr |
| 159 | refine ⟨C (h y)⁻¹ * B' y, C (h y)⁻¹ * C' y, ?_⟩ |
| 160 | calc |
| 161 | _ = C (h y)⁻¹ * (B' y * Q y + C' y * derivative (Q y)) := by ring |
| 162 | _ = 1 := by rw [hyb, ← C_mul, inv_mul_cancel₀ hhy, C_1] |
| 163 | · intro z |
| 164 | constructor |
| 165 | · intro hz |
| 166 | have heq := congrArg (fun R : ℂ[X] => R.eval z) hyp |
| 167 | have hpz : g y * (Q y).eval z ^ (n + 1) = 0 := by |
| 168 | simpa only [eval_mul, eval_C, eval_pow, hz, zero_mul] using heq |
| 169 | exact (pow_eq_zero_iff (Nat.succ_ne_zero n)).mp ((mul_eq_zero.mp hpz).resolve_left hgy) |
| 170 | · intro hz |
| 171 | have heq := congrArg (fun R : ℂ[X] => R.eval z) hyd |
| 172 | have hpz : f y * (P y).eval z = 0 := by |
| 173 | simpa only [eval_mul, eval_C, hz, zero_mul] using heq |
| 174 | exact (mul_eq_zero.mp hpz).resolve_left hfy |
| 175 | |
| 176 | theorem exists_monic_separable_common_root_family |
| 177 | {E ι : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] [Fintype ι] |
| 178 | (P : ι → E → ℂ[X]) {U : Set E} (hU : IsOpen U) {x : E} (hx : x ∈ U) (d : ℕ) |
| 179 | (hcoeff : ∀ i k, DifferentiableOn ℂ (fun y => (P i y).coeff k) U) |
| 180 | (hdegree : ∀ i y, y ∈ U → (P i y).natDegree ≤ d) |
| 181 | (hnever : ∀ y ∈ U, ∃ i, P i y ≠ 0) : |
| 182 | ∃ (k : ℕ) (Q : E → ℂ[X]) (c : E → ℂ) (V : Set E), |
| 183 | IsOpen V ∧ x ∈ V ∧ V ⊆ U ∧ DifferentiableOn ℂ c V ∧ |
| 184 | (¬∀ᶠ y in 𝓝 x, c y = 0) ∧ |
| 185 | (∀ j, DifferentiableOn ℂ (fun y => (Q y).coeff j) {y | y ∈ V ∧ c y ≠ 0}) ∧ |
| 186 | ∀ y ∈ V, c y ≠ 0 → (Q y).Monic ∧ (Q y).natDegree = k ∧ (Q y).Separable ∧ |
| 187 | ∀ z : ℂ, (∀ i, (P i y).eval z = 0) ↔ (Q y).eval z = 0 := by |
| 188 | obtain ⟨D, G, c₁, W₁, hW₁, hxW₁, hW₁U, hGdeg, hGcoeff, hc₁, hc₁n, hGroot⟩ := |
| 189 | GenericHolomorphicPolynomial.Constructions.GenericPolynomial.exists_generic_common_root_family P hU hx d hcoeff hdegree (hnever x hx) |
| 190 | have hGn : ¬∀ᶠ y in 𝓝 x, G y = 0 := by |
| 191 | intro hz |
| 192 | apply hc₁n |
| 193 | filter_upwards [hz, hW₁.mem_nhds hxW₁] with y hy hyW |
| 194 | by_contra hcy |
| 195 | obtain ⟨i, hi⟩ := hnever y (hW₁U hyW) |
| 196 | apply hi |
| 197 | apply Polynomial.zero_of_eval_zero |
| 198 | intro z |
| 199 | exact ((hGroot y hyW hcy z).mpr (by simp only [hy, eval_zero])) i |
| 200 | obtain ⟨D₂, G₂, c₂, W₂, hW₂, hxW₂, hW₂W₁, hG₂deg, hG₂coeff, hc₂, hc₂n, hG₂⟩ := |
| 201 | exists_squarefree_family G hW₁ hxW₁ D hGcoeff (fun y _ => hGdeg y) hGn |
| 202 | have hG₂n : ¬∀ᶠ y in 𝓝 x, G₂ y = 0 := by |
| 203 | intro hz |
| 204 | apply hc₂n |
| 205 | filter_upwards [hz, hW₂.mem_nhds hxW₂] with y hy hyW |
| 206 | by_contra hcy |
| 207 | exact (hG₂ y hyW hcy).1.ne_zero hy |
| 208 | obtain ⟨k, _, hkn, hkdeg⟩ := GenericDegree.Constructions.GenericPolynomial.exists_generic_degree hG₂deg hG₂n |
| 209 | obtain ⟨Z, hZsub, hZ, hxZ⟩ := mem_nhds_iff.mp hkdeg |
| 210 | let c : E → ℂ := fun y => c₁ y * c₂ y * (G₂ y).coeff k |
| 211 | let Q : E → ℂ[X] := fun y => ((G₂ y).coeff k)⁻¹ • G₂ y |
| 212 | have hc₁W₂ := hc₁.mono hW₂W₁ |
| 213 | have hcn : ¬∀ᶠ y in 𝓝 x, c y = 0 := |
| 214 | GenericDegree.Constructions.GenericPolynomial.not_eventually_zero_mul hW₂ hxW₂ (hc₁W₂.fun_mul hc₂) (hG₂coeff k) |
| 215 | (GenericDegree.Constructions.GenericPolynomial.not_eventually_zero_mul hW₂ hxW₂ hc₁W₂ hc₂ hc₁n hc₂n) hkn |
| 216 | have hparts (y : E) (hy : c y ≠ 0) : |
| 217 | c₁ y ≠ 0 ∧ c₂ y ≠ 0 ∧ (G₂ y).coeff k ≠ 0 := |
| 218 | ⟨(mul_ne_zero_iff.mp (mul_ne_zero_iff.mp hy).1).1, |
| 219 | (mul_ne_zero_iff.mp (mul_ne_zero_iff.mp hy).1).2, (mul_ne_zero_iff.mp hy).2⟩ |
| 220 | refine ⟨k, Q, c, W₂ ∩ Z, hW₂.inter hZ, ⟨hxW₂, hxZ⟩, |
| 221 | fun y hy => hW₁U (hW₂W₁ hy.1), |
| 222 | ((hc₁W₂.fun_mul hc₂).fun_mul (hG₂coeff k)).mono inter_subset_left, hcn, ?_, ?_⟩ |
| 223 | · intro j |
| 224 | have hsub : {y | y ∈ W₂ ∩ Z ∧ c y ≠ 0} ⊆ W₂ := fun _ hy => hy.1.1 |
| 225 | simp only [Q, coeff_smul, smul_eq_mul] |
| 226 | exact ((hG₂coeff k).mono hsub).fun_inv (fun y hy => (hparts y hy.2).2.2) |>.fun_mul |
| 227 | ((hG₂coeff j).mono hsub) |
| 228 | · intro y hy hcy |
| 229 | obtain ⟨hc₁y, hc₂y, hlead⟩ := hparts y hcy |
| 230 | have hQdeg : (Q y).natDegree ≤ k := (natDegree_smul_le _ _).trans (hZsub hy.2) |
| 231 | have hQcoeff : (Q y).coeff k = 1 := by |
| 232 | simp only [Q, coeff_smul, smul_eq_mul, inv_mul_cancel₀ hlead] |
| 233 | refine ⟨monic_of_natDegree_le_of_coeff_eq_one k hQdeg hQcoeff, |
| 234 | le_antisymm hQdeg (le_natDegree_of_ne_zero (by rw [hQcoeff]; exact one_ne_zero)), ?_, ?_⟩ |
| 235 | · change (((G₂ y).coeff k)⁻¹ • G₂ y).Separable |
| 236 | rw [← C_mul'] |
| 237 | exact Separable.unit_mul (isUnit_C.mpr (isUnit_iff_ne_zero.mpr (inv_ne_zero hlead))) |
| 238 | (hG₂ y hy.1 hc₂y).1 |
| 239 | · intro z |
| 240 | change (∀ i, (P i y).eval z = 0) ↔ (((G₂ y).coeff k)⁻¹ • G₂ y).eval z = 0 |
| 241 | rw [eval_smul, smul_eq_mul, mul_eq_zero, or_iff_right (inv_ne_zero hlead)] |
| 242 | exact (hGroot y (hW₂W₁ hy.1) hc₁y z).trans ((hG₂ y hy.1 hc₂y).2 z) |
| 243 | |
| 244 | end Constructions.GenericPolynomial |
| 245 | |
| 246 | end |
| 247 | |
| 248 | end OAI.AlgebraicGeometry.ComplexGroups.HolomorphicAlgebraicity.SquarefreeFamilies |