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.Dimension.Localization |
| 2 | import Mathlib.LinearAlgebra.FreeModule.PID |
| 3 | import Mathlib.RingTheory.TensorProduct.IsBaseChangeHom |
| 4 | |
| 5 | /-! # Lattice Subspace Eq -/ |
| 6 | |
| 7 | namespace OAI.NumberTheory.PadicHodge.GeometricComparison.LatticeSubspaceEq.LatticeSubspace |
| 8 | |
| 9 | noncomputable section |
| 10 | |
| 11 | /-! Intersections with rational subspaces preserve full lattices and have torsion-free quotients. -/ |
| 12 | |
| 13 | open scoped nonZeroDivisors |
| 14 | |
| 15 | variable {R K M V : Type*} [CommRing R] [IsDomain R] [Field K] |
| 16 | [Algebra R K] [IsFractionRing R K] |
| 17 | [AddCommGroup M] [Module R M] [AddCommGroup V] [Module R V] |
| 18 | [Module K V] [IsScalarTower R K V] |
| 19 | |
| 20 | def integralPart (f : M →ₗ[R] V) (S : Submodule K V) : Submodule R M := |
| 21 | (S.restrictScalars R).comap f |
| 22 | |
| 23 | def inclusion (f : M →ₗ[R] V) (S : Submodule K V) : integralPart f S →ₗ[R] S where |
| 24 | toFun x := ⟨f x, x.property⟩ |
| 25 | map_add' x y := Subtype.ext (f.map_add x y) |
| 26 | map_smul' r x := Subtype.ext (f.map_smul r x) |
| 27 | |
| 28 | theorem quotient_torsionFree (f : M →ₗ[R] V) (S : Submodule K V) : |
| 29 | Module.IsTorsionFree R (M ⧸ integralPart f S) := by |
| 30 | apply Module.IsTorsionFree.of_smul_eq_zero |
| 31 | intro r x hx |
| 32 | by_cases hr : r = 0 |
| 33 | · exact Or.inl hr |
| 34 | right |
| 35 | obtain ⟨m, rfl⟩ := (integralPart f S).mkQ_surjective x |
| 36 | apply (Submodule.Quotient.mk_eq_zero (integralPart f S)).mpr |
| 37 | have hm : r • f m ∈ S := by |
| 38 | have h := (Submodule.Quotient.mk_eq_zero (integralPart f S)).mp |
| 39 | (show (integralPart f S).mkQ (r • m) = 0 by simpa only [map_smul] using hx) |
| 40 | exact (f.map_smul r m) ▸ h |
| 41 | have hrK : algebraMap R K r ≠ 0 := by |
| 42 | intro h |
| 43 | apply hr |
| 44 | apply IsFractionRing.injective R K |
| 45 | simpa only [map_zero] using h |
| 46 | exact (S.smul_mem_iff hrK).mp (by simpa only [IsScalarTower.algebraMap_smul] using hm) |
| 47 | |
| 48 | instance localized (f : M →ₗ[R] V) [IsLocalizedModule R⁰ f] (S : Submodule K V) : |
| 49 | IsLocalizedModule R⁰ (inclusion f S) where |
| 50 | map_units s := (isLocalizedModule_id R⁰ S K).map_units s |
| 51 | surj x := by |
| 52 | obtain ⟨⟨m, s⟩, hs⟩ := IsLocalizedModule.surj R⁰ f (x : V) |
| 53 | have hm : m ∈ integralPart f S := by |
| 54 | change f m ∈ S |
| 55 | rw [← hs] |
| 56 | exact (S.restrictScalars R).smul_mem (s : R) x.property |
| 57 | exact ⟨(⟨m, hm⟩, s), Subtype.ext hs⟩ |
| 58 | exists_of_eq h := by |
| 59 | obtain ⟨s, hs⟩ := IsLocalizedModule.exists_of_eq (S := R⁰) (f := f) |
| 60 | (congrArg Subtype.val h) |
| 61 | exact ⟨s, Subtype.ext hs⟩ |
| 62 | |
| 63 | omit [IsDomain R] in |
| 64 | theorem finrank_eq (f : M →ₗ[R] V) [IsLocalizedModule R⁰ f] (S : Submodule K V) : |
| 65 | Module.finrank R (integralPart f S) = Module.finrank K S := by |
| 66 | rw [IsFractionRing.finrank_right_eq R K S] |
| 67 | exact (IsLocalizedModule.finrank_eq R⁰ (inclusion f S) le_rfl).symm |
| 68 | |
| 69 | end |
| 70 | |
| 71 | end OAI.NumberTheory.PadicHodge.GeometricComparison.LatticeSubspaceEq.LatticeSubspace |