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.HilbertScheme.Presentations.BasisGrading |
| 2 | import Mathlib.LinearAlgebra.Finsupp.VectorSpace |
| 3 | import Mathlib.RingTheory.MvPolynomial.WeightedHomogeneous |
| 4 | import Mathlib.Algebra.Module.GradedModule |
| 5 | |
| 6 | /-! # Weighted Free Modules -/ |
| 7 | |
| 8 | namespace OAI.AlgebraicGeometry.HilbertScheme.Presentations.WeightedFreeModules.GradedModules |
| 9 | |
| 10 | noncomputable section |
| 11 | |
| 12 | /-! Weighted free polynomial modules and their actual integer gradings. -/ |
| 13 | |
| 14 | open _root_.Module _root_.MvPolynomial |
| 15 | |
| 16 | universe u v w |
| 17 | |
| 18 | variable {σ : Type u} {ι : Type v} (R : Type w) [CommRing R] |
| 19 | |
| 20 | def polynomialIntegerGrading : ℤ → Submodule R (MvPolynomial σ R) := |
| 21 | weightedHomogeneousSubmodule R (fun _ : σ => (1 : ℤ)) |
| 22 | |
| 23 | instance polynomialIntegerGradedAlgebra : GradedAlgebra (polynomialIntegerGrading (σ := σ) R) := |
| 24 | weightedGradedAlgebra R (fun _ : σ => (1 : ℤ)) |
| 25 | |
| 26 | def freeMonomialBasis : Basis (Σ _ : ι, σ →₀ ℕ) R (ι →₀ MvPolynomial σ R) := |
| 27 | Finsupp.basis (fun _ : ι => basisMonomials σ R) |
| 28 | |
| 29 | def freeMonomialDegree (w : ι → ℤ) (p : Σ _ : ι, σ →₀ ℕ) : ℤ := |
| 30 | Finsupp.weight (fun _ : σ => (1 : ℤ)) p.2 + w p.1 |
| 31 | |
| 32 | def weightedFreeGrading (w : ι → ℤ) : ℤ → Submodule R (ι →₀ MvPolynomial σ R) := |
| 33 | BasisGrading.GradedModules.basisPiece (freeMonomialBasis (σ := σ) R) (freeMonomialDegree w) |
| 34 | |
| 35 | instance weightedFreeDecomposition (w : ι → ℤ) : |
| 36 | DirectSum.Decomposition (weightedFreeGrading (σ := σ) R w) := |
| 37 | BasisGrading.GradedModules.basisPieceDecomposition _ _ |
| 38 | |
| 39 | theorem mem_weightedFreeGrading (w : ι → ℤ) (d : ℤ) (f : ι →₀ MvPolynomial σ R) : |
| 40 | f ∈ weightedFreeGrading R w d ↔ ∀ i, f i ∈ polynomialIntegerGrading R (d - w i) := by |
| 41 | rw [weightedFreeGrading, BasisGrading.GradedModules.mem_basisPiece_iff] |
| 42 | constructor |
| 43 | · intro h i m hm |
| 44 | have he : Finsupp.weight (fun _ : σ => (1 : ℤ)) m + w i = d := by |
| 45 | by_contra hn |
| 46 | exact hm (h ⟨i, m⟩ hn) |
| 47 | omega |
| 48 | · intro h p hp |
| 49 | change AddMonoidAlgebra.coeff ((f p.1)) (p.2) = 0 |
| 50 | by_contra hn |
| 51 | have he := h p.1 hn |
| 52 | apply hp |
| 53 | change Finsupp.weight (fun _ : σ => (1 : ℤ)) p.2 + w p.1 = d |
| 54 | omega |
| 55 | |
| 56 | instance weightedFreeGradedSMul (w : ι → ℤ) : |
| 57 | SetLike.GradedSMul (polynomialIntegerGrading (σ := σ) R) (weightedFreeGrading (σ := σ) R w) where |
| 58 | smul_mem := by |
| 59 | intro n d a f ha hf |
| 60 | rw [mem_weightedFreeGrading] at hf ⊢ |
| 61 | intro i |
| 62 | have h := ha.mul (hf i) |
| 63 | change IsWeightedHomogeneous (fun _ : σ => (1 : ℤ)) (a * f i) (n + d - w i) |
| 64 | have he : n + d - w i = n + (d - w i) := by omega |
| 65 | rw [he] |
| 66 | exact h |
| 67 | |
| 68 | theorem weightedFree_single_homogeneous (w : ι → ℤ) (i : ι) : |
| 69 | Finsupp.single i (1 : MvPolynomial σ R) ∈ weightedFreeGrading R w (w i) := by |
| 70 | classical |
| 71 | rw [mem_weightedFreeGrading] |
| 72 | intro j |
| 73 | by_cases h : i = j |
| 74 | · subst j |
| 75 | simp only [Finsupp.single_eq_same, sub_self] |
| 76 | exact SetLike.GradedOne.one_mem |
| 77 | · rw [Finsupp.single_eq_of_ne (Ne.symm h)] |
| 78 | exact Submodule.zero_mem _ |
| 79 | |
| 80 | variable {M : Type*} [AddCommGroup M] [Module R M] [Module (MvPolynomial σ R) M] |
| 81 | [IsScalarTower R (MvPolynomial σ R) M] |
| 82 | variable (ℳ : ℤ → Submodule R M) |
| 83 | [SetLike.GradedSMul (polynomialIntegerGrading (σ := σ) R) ℳ] |
| 84 | |
| 85 | omit [IsScalarTower R (MvPolynomial σ R) M] in |
| 86 | theorem weightedFree_linearCombination_homogeneous (w : ι → ℤ) (v : ι → M) |
| 87 | (hv : ∀ i, v i ∈ ℳ (w i)) (d : ℤ) (f : ι →₀ MvPolynomial σ R) |
| 88 | (hf : f ∈ weightedFreeGrading R w d) : |
| 89 | Finsupp.linearCombination (MvPolynomial σ R) v f ∈ ℳ d := by |
| 90 | change (∑ i ∈ f.support, f i • v i) ∈ ℳ d |
| 91 | apply Submodule.sum_mem |
| 92 | intro i _ |
| 93 | have h := SetLike.GradedSMul.smul_mem ((mem_weightedFreeGrading R w d f).mp hf i) (hv i) |
| 94 | have he : (d - w i) + w i = d := sub_add_cancel _ _ |
| 95 | exact he ▸ h |
| 96 | |
| 97 | end |
| 98 | |
| 99 | end OAI.AlgebraicGeometry.HilbertScheme.Presentations.WeightedFreeModules.GradedModules |