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.Module.Torsion.Basic |
| 2 | import Mathlib.RingTheory.Noetherian.Basic |
| 3 | import Mathlib.RingTheory.Flat.TorsionFree |
| 4 | import Mathlib.RingTheory.Localization.BaseChange |
| 5 | |
| 6 | /-! # Generic Flatness -/ |
| 7 | |
| 8 | namespace OAI.ArithmeticGeometry.Models.SpreadingOut.GenericFlatness.Construction |
| 9 | |
| 10 | noncomputable section |
| 11 | |
| 12 | /-! Generic flatness over a Dedekind domain, for finite modules over |
| 13 | noetherian algebras, by killing the finitely generated base torsion. -/ |
| 14 | |
| 15 | open scoped TensorProduct nonZeroDivisors |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | theorem base_torsion_killed_by_nonzero |
| 20 | (R B M : Type u) [CommRing R] [IsDomain R] [CommRing B] [Algebra R B] |
| 21 | [AddCommGroup M] [Module R M] [Module B M] [IsScalarTower R B M] |
| 22 | [IsNoetherian B M] : |
| 23 | ∃ r : R, r ≠ 0 ∧ ∀ m : M, (∃ a : R, a ≠ 0 ∧ a • m = 0) → r • m = 0 := by |
| 24 | classical |
| 25 | let T := Submodule.torsion' B M R⁰ |
| 26 | obtain ⟨s, hs⟩ := (inferInstance : IsNoetherian B M).noetherian T |
| 27 | have H (x : s) : ∃ a : R⁰, a • (x : M) = 0 := by |
| 28 | change (x : M) ∈ T |
| 29 | rw [← hs] |
| 30 | exact Submodule.subset_span x.property |
| 31 | choose a ha using H |
| 32 | let r : R⁰ := ∏ x : s, a x |
| 33 | have hr (x : s) : r • (x : M) = 0 := by |
| 34 | dsimp only [r] |
| 35 | rw [← Finset.prod_erase_mul _ _ (Finset.mem_univ x), mul_smul, ha, smul_zero] |
| 36 | have hT : T ≤ (DistribSMul.toLinearMap B M r).ker := by |
| 37 | rw [← hs] |
| 38 | apply Submodule.span_le.mpr |
| 39 | intro x hx |
| 40 | exact hr ⟨x, hx⟩ |
| 41 | refine ⟨r, nonZeroDivisors.coe_ne_zero r, fun m hm ↦ ?_⟩ |
| 42 | apply hT |
| 43 | obtain ⟨a, ha, ham⟩ := hm |
| 44 | exact ⟨⟨a, mem_nonZeroDivisors_of_ne_zero ha⟩, ham⟩ |
| 45 | |
| 46 | theorem localized_torsionFree_of_torsion_killed |
| 47 | (R M N : Type u) [CommRing R] [IsDomain R] |
| 48 | [AddCommGroup M] [Module R M] [AddCommGroup N] [Module R N] |
| 49 | (r : R) (hr : r ≠ 0) |
| 50 | (hkill : ∀ m : M, (∃ a : R, a ≠ 0 ∧ a • m = 0) → r • m = 0) |
| 51 | (f : M →ₗ[R] N) [IsLocalizedModule (Submonoid.powers r) f] : |
| 52 | Module.IsTorsionFree R N := by |
| 53 | rw [Module.isTorsionFree_iff_smul_eq_zero] |
| 54 | intro a y hay |
| 55 | by_cases ha : a = 0 |
| 56 | · exact Or.inl ha |
| 57 | right |
| 58 | obtain ⟨⟨m, s⟩, hs⟩ := IsLocalizedModule.surj (Submonoid.powers r) f y |
| 59 | have ham : f (a • m) = 0 := by |
| 60 | rw [map_smul, ← hs, smul_comm, hay, smul_zero] |
| 61 | obtain ⟨t, ht⟩ := (IsLocalizedModule.eq_zero_iff (Submonoid.powers r) f).mp ham |
| 62 | have htm : ((t : R) * a) • m = 0 := by |
| 63 | simpa only [mul_smul, Submonoid.smul_def] using ht |
| 64 | have ht0 : (t : R) ≠ 0 := by |
| 65 | obtain ⟨n, hn⟩ := t.property |
| 66 | rw [← hn] |
| 67 | exact pow_ne_zero n hr |
| 68 | have hfm : f m = 0 := by |
| 69 | apply (IsLocalizedModule.eq_zero_iff (Submonoid.powers r) f).mpr |
| 70 | exact ⟨⟨r, Submonoid.mem_powers r⟩, hkill m ⟨_, mul_ne_zero ht0 ha, htm⟩⟩ |
| 71 | apply (IsLocalizedModule.smul_injective f s) |
| 72 | simpa only [smul_zero] using hs.trans hfm |
| 73 | |
| 74 | theorem finite_module_flat_after_inverting_nonzero |
| 75 | (R B M : Type u) [CommRing R] [IsDedekindDomain R] |
| 76 | [CommRing B] [Algebra R B] [AddCommGroup M] [Module R M] [Module B M] |
| 77 | [IsScalarTower R B M] [IsNoetherian B M] : |
| 78 | ∃ r : R, r ≠ 0 ∧ Module.Flat R (Localization.Away r ⊗[R] M) := by |
| 79 | obtain ⟨r, hr, hkill⟩ := base_torsion_killed_by_nonzero R B M |
| 80 | have : Module.IsTorsionFree R (Localization.Away r ⊗[R] M) := |
| 81 | localized_torsionFree_of_torsion_killed R M _ r hr hkill |
| 82 | (TensorProduct.mk R (Localization.Away r) M 1) |
| 83 | exact ⟨r, hr, inferInstance⟩ |
| 84 | |
| 85 | theorem finite_module_flat_over_localization |
| 86 | (R B M : Type u) [CommRing R] [IsDedekindDomain R] |
| 87 | [CommRing B] [Algebra R B] [AddCommGroup M] [Module R M] [Module B M] |
| 88 | [IsScalarTower R B M] [IsNoetherian B M] : |
| 89 | ∃ r : R, r ≠ 0 ∧ |
| 90 | Module.Flat (Localization.Away r) (Localization.Away r ⊗[R] M) := by |
| 91 | obtain ⟨r, hr, hf⟩ := finite_module_flat_after_inverting_nonzero R B M |
| 92 | exact ⟨r, hr, (Module.flat_iff_of_isLocalization (Localization.Away r) |
| 93 | (Submonoid.powers r) _).mpr hf⟩ |
| 94 | |
| 95 | end |
| 96 | |
| 97 | end OAI.ArithmeticGeometry.Models.SpreadingOut.GenericFlatness.Construction |