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.Algebra.MvPolynomial.PDeriv |
| 2 | import Mathlib.Algebra.Polynomial.Coeff |
| 3 | import Mathlib.RingTheory.Ideal.Maps |
| 4 | |
| 5 | /-! # Polynomial Coefficients -/ |
| 6 | |
| 7 | namespace OAI.AlgebraicGeometry.HilbertScheme.Presentations.Linear.PolynomialCoefficients.GradedHilbert |
| 8 | |
| 9 | noncomputable section |
| 10 | |
| 11 | /-! Linear coefficients extract module generators from polynomial relations. -/ |
| 12 | |
| 13 | open _root_.MvPolynomial |
| 14 | |
| 15 | variable {R ι : Type*} [CommRing R] |
| 16 | |
| 17 | def polynomialLinearPart : MvPolynomial ι R →ₗ[R] (ι → R) where |
| 18 | toFun p i := AddMonoidAlgebra.coeff (p) ((Finsupp.single i 1)) |
| 19 | map_add' p q := by ext i; rfl |
| 20 | map_smul' r p := funext (fun i => coeff_smul (Finsupp.single i 1) r p) |
| 21 | |
| 22 | theorem polynomialLinearPart_eq_derivative (p : MvPolynomial ι R) (i : ι) : |
| 23 | polynomialLinearPart p i = constantCoeff (pderiv i p) := by |
| 24 | simp [polynomialLinearPart, constantCoeff_eq, coeff_pderiv] |
| 25 | |
| 26 | theorem polynomialLinearPart_mul (p q : MvPolynomial ι R) : |
| 27 | polynomialLinearPart (p * q) = constantCoeff q • polynomialLinearPart p + |
| 28 | constantCoeff p • polynomialLinearPart q := by |
| 29 | funext i |
| 30 | simp only [Pi.add_apply, Pi.smul_apply, smul_eq_mul, polynomialLinearPart_eq_derivative, |
| 31 | pderiv_mul, map_add, map_mul] |
| 32 | rw [mul_comm (constantCoeff (pderiv i p))] |
| 33 | |
| 34 | theorem polynomialLinearPart_C (r : R) : polynomialLinearPart (C r : MvPolynomial ι R) = 0 := by |
| 35 | funext i |
| 36 | rw [polynomialLinearPart_eq_derivative, pderiv_C, map_zero] |
| 37 | rfl |
| 38 | |
| 39 | theorem polynomialLinearPart_X [DecidableEq ι] (j : ι) : |
| 40 | polynomialLinearPart (X j : MvPolynomial ι R) = Pi.single j 1 := by |
| 41 | funext i |
| 42 | rw [polynomialLinearPart_eq_derivative] |
| 43 | by_cases hij : i = j |
| 44 | · subst j |
| 45 | simp |
| 46 | · simp [pderiv_X_of_ne (Ne.symm hij), hij] |
| 47 | |
| 48 | def linearVariableSubstitution (g : ι → R) : MvPolynomial ι R →ₐ[R] Polynomial R := |
| 49 | aeval (fun i => Polynomial.C (g i) * Polynomial.X) |
| 50 | |
| 51 | theorem linearVariableSubstitution_coeff_zero (g : ι → R) (p : MvPolynomial ι R) : |
| 52 | (linearVariableSubstitution g p).coeff 0 = constantCoeff p := by |
| 53 | induction p using MvPolynomial.induction_on with |
| 54 | | C r => simp [linearVariableSubstitution] |
| 55 | | add p q hp hq => simp only [map_add, Polynomial.coeff_add, hp, hq] |
| 56 | | mul_X p i hp => simp [linearVariableSubstitution, Polynomial.mul_coeff_zero] |
| 57 | |
| 58 | theorem linearVariableSubstitution_coeff_one [Fintype ι] |
| 59 | (g : ι → R) (p : MvPolynomial ι R) : |
| 60 | (linearVariableSubstitution g p).coeff 1 = ∑ i, polynomialLinearPart p i * g i := by |
| 61 | classical |
| 62 | induction p using MvPolynomial.induction_on with |
| 63 | | C r => simp [linearVariableSubstitution, polynomialLinearPart_C] |
| 64 | | add p q hp hq => |
| 65 | simp only [map_add, Polynomial.coeff_add, hp, hq, Pi.add_apply, add_mul, Finset.sum_add_distrib] |
| 66 | | mul_X p j hp => |
| 67 | rw [map_mul, polynomialLinearPart_mul] |
| 68 | have hx : linearVariableSubstitution g (X j) = Polynomial.C (g j) * Polynomial.X := by |
| 69 | simp [linearVariableSubstitution] |
| 70 | rw [hx, Polynomial.mul_coeff_one, linearVariableSubstitution_coeff_zero] |
| 71 | simp [polynomialLinearPart_X, Pi.single_apply] |
| 72 | |
| 73 | theorem polynomialLinearPart_mem_span |
| 74 | (B : Set (MvPolynomial ι R)) (hB : ∀ b ∈ B, constantCoeff b = 0) |
| 75 | {p : MvPolynomial ι R} (hp : p ∈ Ideal.span B) : |
| 76 | constantCoeff p = 0 ∧ polynomialLinearPart p ∈ Submodule.span R (polynomialLinearPart '' B) := by |
| 77 | induction hp using Submodule.span_induction with |
| 78 | | mem b hb => exact ⟨hB b hb, Submodule.subset_span ⟨b, hb, rfl⟩⟩ |
| 79 | | zero => exact ⟨map_zero _, by simp only [map_zero]; exact Submodule.zero_mem _⟩ |
| 80 | | add p q _ _ hp hq => |
| 81 | exact ⟨by rw [map_add, hp.1, hq.1, add_zero], by |
| 82 | rw [map_add] |
| 83 | exact Submodule.add_mem _ hp.2 hq.2⟩ |
| 84 | | smul a b _ hb => |
| 85 | change constantCoeff (a * b) = 0 ∧ polynomialLinearPart (a * b) ∈ _ |
| 86 | refine ⟨by rw [map_mul, hb.1, mul_zero], ?_⟩ |
| 87 | rw [polynomialLinearPart_mul, hb.1, zero_smul, zero_add] |
| 88 | exact Submodule.smul_mem _ (constantCoeff a) hb.2 |
| 89 | |
| 90 | end |
| 91 | |
| 92 | end OAI.AlgebraicGeometry.HilbertScheme.Presentations.Linear.PolynomialCoefficients.GradedHilbert |