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.AbelianModuli.HilbertConstruction.Finite.FreeCokernel |
| 2 | import Mathlib.RingTheory.Noetherian.Basic |
| 3 | import Mathlib.RingTheory.LocalRing.Module |
| 4 | |
| 5 | /-! # Cokernel Completion -/ |
| 6 | |
| 7 | namespace OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.CokernelCompletion.CokernelCompletionKernel |
| 8 | |
| 9 | noncomputable section |
| 10 | |
| 11 | /-! The kernel introduced by a finite free completion, and the first |
| 12 | finite free replacement of a two-term flat complex. -/ |
| 13 | |
| 14 | universe u v w z |
| 15 | |
| 16 | variable {R : Type u} [CommRing R] |
| 17 | variable {M : Type v} [AddCommGroup M] [Module R M] |
| 18 | variable {N : Type w} [AddCommGroup N] [Module R N] |
| 19 | variable {F : Type z} [AddCommGroup F] [Module R F] |
| 20 | variable (f : M →ₗ[R] N) (v : F →ₗ[R] N) |
| 21 | |
| 22 | def inclusion : f.ker →ₗ[R] (f.coprod v).ker := |
| 23 | ((LinearMap.inl R M F).comp f.ker.subtype).codRestrict _ (by |
| 24 | intro x |
| 25 | change f x.val + v 0 = 0 |
| 26 | rw [x.property, map_zero, add_zero]) |
| 27 | |
| 28 | def projection : (f.coprod v).ker →ₗ[R] F := |
| 29 | (LinearMap.snd R M F).comp (f.coprod v).ker.subtype |
| 30 | |
| 31 | theorem exact : Function.Exact (inclusion f v) (projection f v) := by |
| 32 | intro x |
| 33 | constructor |
| 34 | · intro hx |
| 35 | have hx0 : x.val.2 = 0 := hx |
| 36 | have hf : f x.val.1 = 0 := by |
| 37 | have h := x.property |
| 38 | change f x.val.1 + v x.val.2 = 0 at h |
| 39 | simpa only [hx0, map_zero, add_zero] using h |
| 40 | refine ⟨⟨x.val.1, hf⟩, ?_⟩ |
| 41 | apply Subtype.ext |
| 42 | exact Prod.ext rfl hx0.symm |
| 43 | · rintro ⟨y, rfl⟩ |
| 44 | rfl |
| 45 | |
| 46 | def kernelIso : (projection f v).ker ≃ₗ[R] f.ker where |
| 47 | toFun x := ⟨x.val.val.1, by |
| 48 | change f x.val.val.1 = 0 |
| 49 | have hx : x.val.val.2 = 0 := x.property |
| 50 | have h := x.val.property |
| 51 | change f x.val.val.1 + v x.val.val.2 = 0 at h |
| 52 | simpa only [hx, map_zero, add_zero] using h⟩ |
| 53 | invFun x := ⟨inclusion f v x, rfl⟩ |
| 54 | left_inv x := by |
| 55 | apply Subtype.ext |
| 56 | apply Subtype.ext |
| 57 | exact Prod.ext rfl x.property.symm |
| 58 | right_inv x := by rfl |
| 59 | map_add' x y := rfl |
| 60 | map_smul' r x := rfl |
| 61 | |
| 62 | theorem finite [IsNoetherianRing R] [Module.Finite R F] [Module.Finite R f.ker] : |
| 63 | Module.Finite R (f.coprod v).ker := by |
| 64 | have : IsNoetherian R (f.coprod v).ker := |
| 65 | isNoetherian_of_range_eq_ker (inclusion f v) (projection f v) |
| 66 | (LinearMap.exact_iff.mp (CokernelCompletionKernel.exact f v)).symm |
| 67 | infer_instance |
| 68 | |
| 69 | theorem free [IsNoetherianRing R] [IsLocalRing R] |
| 70 | [Module.Finite R F] [Module.Flat R F] |
| 71 | [Module.Flat R M] [Module.Flat R N] [Module.Finite R f.ker] |
| 72 | (h : Function.Surjective (f.coprod v)) : Module.Free R (f.coprod v).ker := by |
| 73 | have : Module.Flat R (M × F) := HilbertConstruction.Flat.Kernel.FlatKernel.prod |
| 74 | have : Module.Flat R (f.coprod v).ker := HilbertConstruction.Flat.Kernel.FlatKernel.flat _ h |
| 75 | have : Module.Finite R (f.coprod v).ker := finite f v |
| 76 | exact Module.free_of_flat_of_isLocalRing |
| 77 | |
| 78 | end |
| 79 | |
| 80 | end OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.CokernelCompletion.CokernelCompletionKernel |