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.LinearAlgebra.Basis.Basic |
| 2 | import Mathlib.Algebra.DirectSum.Decomposition |
| 3 | |
| 4 | /-! # Basis Grading -/ |
| 5 | |
| 6 | namespace OAI.AlgebraicGeometry.HilbertScheme.Presentations.BasisGrading.GradedModules |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | /-! A basis with assigned degrees gives an actual internal module decomposition. -/ |
| 11 | |
| 12 | open _root_.Module DirectSum |
| 13 | |
| 14 | universe u v w t |
| 15 | |
| 16 | variable {R : Type u} [CommRing R] {M : Type v} [AddCommGroup M] [Module R M] |
| 17 | variable {ι : Type w} {δ : Type t} [DecidableEq δ] |
| 18 | variable (b : Basis ι R M) (w : ι → δ) |
| 19 | |
| 20 | def basisPiece (d : δ) : Submodule R M := Submodule.span R (b '' {i | w i = d}) |
| 21 | |
| 22 | omit [DecidableEq δ] in |
| 23 | theorem basis_mem_piece (i : ι) : b i ∈ basisPiece b w (w i) := |
| 24 | Submodule.subset_span ⟨i, rfl, rfl⟩ |
| 25 | |
| 26 | def basisDecompose : M →ₗ[R] ⨁ d, basisPiece b w d := |
| 27 | b.constr R (fun i => DirectSum.lof R δ (fun d => basisPiece b w d) (w i) |
| 28 | ⟨b i, basis_mem_piece b w i⟩) |
| 29 | |
| 30 | theorem basisDecompose_basis (i : ι) : |
| 31 | basisDecompose b w (b i) = DirectSum.lof R δ (fun d => basisPiece b w d) (w i) |
| 32 | ⟨b i, basis_mem_piece b w i⟩ := |
| 33 | b.constr_basis R _ i |
| 34 | |
| 35 | theorem basisDecompose_homogeneous (d : δ) (m : M) (hm : m ∈ basisPiece b w d) : |
| 36 | basisDecompose b w m = DirectSum.lof R δ (fun d => basisPiece b w d) d ⟨m, hm⟩ := by |
| 37 | induction hm using Submodule.span_induction with |
| 38 | | mem m hm => |
| 39 | obtain ⟨i, hi, rfl⟩ := hm |
| 40 | subst d |
| 41 | exact basisDecompose_basis b w i |
| 42 | | zero => |
| 43 | rw [map_zero] |
| 44 | exact (map_zero _).symm |
| 45 | | add x y hx hy hx' hy' => |
| 46 | rw [map_add, hx', hy'] |
| 47 | exact (map_add (DirectSum.lof R δ (fun d => basisPiece b w d) d) ⟨x, hx⟩ ⟨y, hy⟩).symm |
| 48 | | smul r x hx hx' => |
| 49 | rw [map_smul, hx'] |
| 50 | exact (map_smul (DirectSum.lof R δ (fun d => basisPiece b w d) d) r ⟨x, hx⟩).symm |
| 51 | |
| 52 | theorem basisDecompose_left_inverse : |
| 53 | (DirectSum.coeLinearMap (basisPiece b w)).comp (basisDecompose b w) = LinearMap.id := by |
| 54 | apply b.ext |
| 55 | intro i |
| 56 | rw [LinearMap.comp_apply, basisDecompose_basis, DirectSum.coeLinearMap_lof] |
| 57 | rfl |
| 58 | |
| 59 | theorem basisDecompose_right_inverse : |
| 60 | (basisDecompose b w).comp (DirectSum.coeLinearMap (basisPiece b w)) = LinearMap.id := by |
| 61 | apply DirectSum.linearMap_ext |
| 62 | intro d |
| 63 | apply LinearMap.ext |
| 64 | intro x |
| 65 | change basisDecompose b w (DirectSum.coeLinearMap (basisPiece b w) |
| 66 | (DirectSum.lof R δ (fun d => basisPiece b w d) d x)) = _ |
| 67 | rw [DirectSum.coeLinearMap_lof, basisDecompose_homogeneous b w d x.val x.property] |
| 68 | rfl |
| 69 | |
| 70 | instance basisPieceDecomposition : DirectSum.Decomposition (basisPiece b w) := |
| 71 | DirectSum.Decomposition.ofLinearMap _ (basisDecompose b w) |
| 72 | (basisDecompose_left_inverse b w) (basisDecompose_right_inverse b w) |
| 73 | |
| 74 | omit [DecidableEq δ] in |
| 75 | theorem mem_basisPiece_iff (d : δ) (m : M) : |
| 76 | m ∈ basisPiece b w d ↔ ∀ i, w i ≠ d → b.repr m i = 0 := by |
| 77 | rw [basisPiece, b.mem_span_image] |
| 78 | constructor |
| 79 | · intro h i hi |
| 80 | by_contra hn |
| 81 | exact hi (h (Finsupp.mem_support_iff.mpr hn)) |
| 82 | · intro h i hi |
| 83 | by_contra hn |
| 84 | exact (Finsupp.mem_support_iff.mp hi) (h i hn) |
| 85 | |
| 86 | end |
| 87 | |
| 88 | end OAI.AlgebraicGeometry.HilbertScheme.Presentations.BasisGrading.GradedModules |