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.RingTheory.Flat.Equalizer |
| 2 | import Mathlib.RingTheory.LocalRing.Module |
| 3 | import Mathlib.RingTheory.LocalRing.ResidueField.Basic |
| 4 | import Mathlib.LinearAlgebra.TensorProduct.Quotient |
| 5 | |
| 6 | /-! # Fiber Flat Criterion -/ |
| 7 | |
| 8 | namespace OAI.AlgebraicGeometry.Quotients.FiniteDescent.FiberFlatCriterion.Construction.LocalSectionLifting |
| 9 | |
| 10 | noncomputable section |
| 11 | |
| 12 | /-! Lifting finite-module isomorphisms from the residue-field fiber in Openness. -/ |
| 13 | |
| 14 | open IsLocalRing TensorProduct |
| 15 | open scoped TensorProduct |
| 16 | |
| 17 | variable (R A : Type*) [CommRing R] [CommRing A] |
| 18 | [IsLocalRing R] [IsLocalRing A] [Algebra R A] |
| 19 | [IsLocalHom (algebraMap R A)] |
| 20 | |
| 21 | /-- Nakayama over a local algebra detects a finite module using the residue |
| 22 | field of the smaller local ring. -/ |
| 23 | theorem subsingleton_of_residueField_tensor |
| 24 | (M : Type*) [AddCommGroup M] [Module R M] [Module A M] |
| 25 | [IsScalarTower R A M] [Module.Finite A M] |
| 26 | [Subsingleton (ResidueField R ⊗[R] M)] : Subsingleton M := by |
| 27 | have : Subsingleton |
| 28 | (ResidueField A ⊗[ResidueField R] (ResidueField R ⊗[R] M)) := inferInstance |
| 29 | have : Subsingleton (ResidueField A ⊗[R] M) := |
| 30 | (AlgebraTensorModule.cancelBaseChange R (ResidueField R) (ResidueField A) |
| 31 | (ResidueField A) M).surjective.subsingleton |
| 32 | have : Subsingleton (ResidueField A ⊗[A] M) := |
| 33 | (TensorProduct.mapOfCompatibleSMul_surjective A R (ResidueField A) (ResidueField A) M).subsingleton |
| 34 | exact (IsLocalRing.subsingleton_tensorProduct (R := A) (M := M)).mp inferInstance |
| 35 | |
| 36 | variable {R A} |
| 37 | |
| 38 | /-- Surjectivity of a finite-module map over a local algebra can be checked |
| 39 | after base change to the residue field of the base ring. -/ |
| 40 | theorem surjective_of_residueField_tensor |
| 41 | {M N : Type*} [AddCommGroup M] [AddCommGroup N] |
| 42 | [Module R M] [Module A M] [IsScalarTower R A M] |
| 43 | [Module R N] [Module A N] [IsScalarTower R A N] [Module.Finite A N] |
| 44 | (f : M →ₗ[A] N) |
| 45 | (hf : Function.Surjective ((f.restrictScalars R).lTensor (ResidueField R))) : |
| 46 | Function.Surjective f := by |
| 47 | let Q := N ⧸ LinearMap.range f |
| 48 | let g : N →ₗ[A] Q := (LinearMap.range f).mkQ |
| 49 | have hg : Function.Surjective (g.restrictScalars R) := |
| 50 | Submodule.mkQ_surjective (LinearMap.range f) |
| 51 | have hex : Function.Exact (f.restrictScalars R) (g.restrictScalars R) := |
| 52 | f.exact_map_mkQ_range |
| 53 | have htex := _root_.lTensor_exact (ResidueField R) hex hg |
| 54 | have hgtex := (g.restrictScalars R).lTensor_surjective (ResidueField R) hg |
| 55 | have : Subsingleton (ResidueField R ⊗[R] Q) := by |
| 56 | refine (subsingleton_iff_forall_eq 0).mpr fun q => ?_ |
| 57 | obtain ⟨n, rfl⟩ := hgtex q |
| 58 | obtain ⟨m, rfl⟩ := hf n |
| 59 | exact htex.apply_apply_eq_zero m |
| 60 | have : Subsingleton Q := subsingleton_of_residueField_tensor R A Q |
| 61 | intro n |
| 62 | have hn : g n = 0 := Subsingleton.elim _ _ |
| 63 | have hnk : n ∈ LinearMap.ker ((LinearMap.range f).mkQ) := hn |
| 64 | change n ∈ LinearMap.range f |
| 65 | simpa only [Submodule.ker_mkQ] using hnk |
| 66 | |
| 67 | /-- For a surjection with flat codomain over the base, injectivity on its |
| 68 | residue-field fiber lifts to injectivity over the local algebra. -/ |
| 69 | theorem injective_of_surjective_of_flat_of_residueField_tensor |
| 70 | {M N : Type*} [AddCommGroup M] [AddCommGroup N] |
| 71 | [Module R M] [Module A M] [IsScalarTower R A M] |
| 72 | [Module R N] [Module A N] [IsScalarTower R A N] |
| 73 | [Module.Finite A M] [Module.FinitePresentation A N] [Module.Flat R N] |
| 74 | (f : M →ₗ[A] N) (hsurj : Function.Surjective f) |
| 75 | (hinj : Function.Injective ((f.restrictScalars R).lTensor (ResidueField R))) : |
| 76 | Function.Injective f := by |
| 77 | let H := LinearMap.ker f |
| 78 | have : Module.Finite A H := .of_fg (Module.FinitePresentation.fg_ker f hsurj) |
| 79 | let i : H →ₗ[A] M := H.subtype |
| 80 | have hi : Function.Injective (i.restrictScalars R) := Subtype.val_injective |
| 81 | have hex : Function.Exact (i.restrictScalars R) (f.restrictScalars R) := |
| 82 | f.exact_subtype_ker_map |
| 83 | have hit := LinearMap.lTensor_injective_of_exact_of_flat |
| 84 | (f.restrictScalars R) hsurj (i.restrictScalars R) hi hex (ResidueField R) |
| 85 | have htex := _root_.lTensor_exact (ResidueField R) hex hsurj |
| 86 | have : Subsingleton (ResidueField R ⊗[R] H) := by |
| 87 | refine (subsingleton_iff_forall_eq 0).mpr fun h => ?_ |
| 88 | apply hit |
| 89 | apply hinj |
| 90 | simpa only [map_zero] using htex.apply_apply_eq_zero h |
| 91 | have : Subsingleton H := subsingleton_of_residueField_tensor R A H |
| 92 | apply LinearMap.ker_eq_bot.mp |
| 93 | exact Submodule.subsingleton_iff_eq_bot.mp inferInstance |
| 94 | |
| 95 | /-- A map of finite modules with flat codomain over the local base is an |
| 96 | isomorphism if its base residue-field fiber is an isomorphism. -/ |
| 97 | theorem bijective_of_flat_of_residueField_tensor |
| 98 | {M N : Type*} [AddCommGroup M] [AddCommGroup N] |
| 99 | [Module R M] [Module A M] [IsScalarTower R A M] |
| 100 | [Module R N] [Module A N] [IsScalarTower R A N] |
| 101 | [Module.Finite A M] [Module.FinitePresentation A N] [Module.Flat R N] |
| 102 | (f : M →ₗ[A] N) |
| 103 | (hf : Function.Bijective ((f.restrictScalars R).lTensor (ResidueField R))) : |
| 104 | Function.Bijective f := by |
| 105 | have hs := surjective_of_residueField_tensor f hf.surjective |
| 106 | exact ⟨injective_of_surjective_of_flat_of_residueField_tensor f hs hf.injective, hs⟩ |
| 107 | |
| 108 | /-- A finite flat module mapping to a base-flat, finitely presented module |
| 109 | by a residue-field isomorphism certifies flatness over the local algebra. -/ |
| 110 | theorem flat_of_flat_source_of_residueField_tensor_iso |
| 111 | {M N : Type*} [AddCommGroup M] [AddCommGroup N] |
| 112 | [Module R M] [Module A M] [IsScalarTower R A M] |
| 113 | [Module R N] [Module A N] [IsScalarTower R A N] |
| 114 | [Module.Finite A M] [Module.Flat A M] |
| 115 | [Module.FinitePresentation A N] [Module.Flat R N] |
| 116 | (f : M →ₗ[A] N) |
| 117 | (hf : Function.Bijective ((f.restrictScalars R).lTensor (ResidueField R))) : |
| 118 | Module.Flat A N := by |
| 119 | let e : M ≃ₗ[A] N := LinearEquiv.ofBijective f |
| 120 | (bijective_of_flat_of_residueField_tensor f hf) |
| 121 | exact Module.Flat.of_linearEquiv e.symm |
| 122 | |
| 123 | end |
| 124 | |
| 125 | end OAI.AlgebraicGeometry.Quotients.FiniteDescent.FiberFlatCriterion.Construction.LocalSectionLifting |