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.HodgeConjecture.DegreeTwo.SheafComplexLift |
| 2 | import OAI.AlgebraicTopology.Cohomology.Singular.StalkLocalIso |
| 3 | import Mathlib.Topology.Sheaves.Abelian |
| 4 | |
| 5 | /-! # Local Stalk Quasi Iso -/ |
| 6 | |
| 7 | namespace OAI.AlgebraicGeometry.HodgeConjecture.DegreeTwo.LocalStalkQuasiIso.Constructions |
| 8 | |
| 9 | noncomputable section |
| 10 | |
| 11 | section |
| 12 | |
| 13 | /-! Actual quasi-isomorphisms on arbitrarily small open neighborhoods induce stalk quasi-isomorphisms. -/ |
| 14 | |
| 15 | open _root_.CategoryTheory _root_.CategoryTheory.Limits _root_.TopologicalSpace Opposite _root_.TopCat.Presheaf |
| 16 | open OAI.AlgebraicTopology.Cohomology.Singular.StalkLocalIso |
| 17 | |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | variable {R : Type} [Ring R] {X : TopCat.{0}} |
| 21 | variable {K L : CochainComplex (X.Presheaf (ModuleCat.{0} R)) ℕ} (f : K ⟶ L) |
| 22 | |
| 23 | theorem openCochainMap_homology_app_isIso (U : Opens X) (n : ℕ) |
| 24 | [QuasiIsoAt (((AlgebraicTopology.Cohomology.Singular.Stalk.presheafSectionFunctor U).mapHomologicalComplex (ComplexShape.up ℕ)).map f) n] : |
| 25 | IsIso ((HomologicalComplex.homologyMap f n).app (op U)) := by |
| 26 | have : IsIso ((AlgebraicTopology.Cohomology.Singular.Stalk.openCohomologyIso K U n).hom ≫ (HomologicalComplex.homologyMap f n).app (op U)) := by |
| 27 | rw [← AlgebraicTopology.Cohomology.Singular.Stalk.openCohomologyIso_naturality f U n] |
| 28 | infer_instance |
| 29 | exact IsIso.of_isIso_comp_left (AlgebraicTopology.Cohomology.Singular.Stalk.openCohomologyIso K U n).hom |
| 30 | ((HomologicalComplex.homologyMap f n).app (op U)) |
| 31 | |
| 32 | theorem stalkCochainMap_quasiIso_of_locally (x : X) |
| 33 | (hlocal : ∀ (U : Opens X), x∈U → ∃ (W : Opens X), x∈W ∧ W≤U ∧ |
| 34 | QuasiIso (((AlgebraicTopology.Cohomology.Singular.Stalk.presheafSectionFunctor W).mapHomologicalComplex (ComplexShape.up ℕ)).map f)) : |
| 35 | QuasiIso (((stalkFunctor (ModuleCat.{0} R) x).mapHomologicalComplex (ComplexShape.up ℕ)).map f) := by |
| 36 | rw [quasiIso_iff] |
| 37 | intro n |
| 38 | rw [quasiIsoAt_iff_isIso_homologyMap] |
| 39 | have hs : IsIso ((stalkFunctor (ModuleCat.{0} R) x).map (HomologicalComplex.homologyMap f n)) := by |
| 40 | apply AlgebraicTopology.Cohomology.Singular.StalkLocalIso.stalkMap_isIso_of_locally_isIso |
| 41 | intro U hxU |
| 42 | obtain ⟨W,hxW,hWU,hW⟩ := hlocal U hxU |
| 43 | have := hW |
| 44 | exact ⟨W,hxW,homOfLE hWU,openCochainMap_homology_app_isIso f W n⟩ |
| 45 | have : IsIso (HomologicalComplex.homologyMap |
| 46 | (((stalkFunctor (ModuleCat.{0} R) x).mapHomologicalComplex (ComplexShape.up ℕ)).map f) n ≫ |
| 47 | (AlgebraicTopology.Cohomology.Singular.Stalk.stalkCohomologyIso L x n).hom) := by |
| 48 | rw [AlgebraicTopology.Cohomology.Singular.Stalk.stalkCohomologyIso_naturality] |
| 49 | infer_instance |
| 50 | exact IsIso.of_isIso_comp_right _ (AlgebraicTopology.Cohomology.Singular.Stalk.stalkCohomologyIso L x n).hom |
| 51 | |
| 52 | variable {S : CochainComplex (TopCat.Sheaf (ModuleCat.{0} R) X) ℕ} |
| 53 | |
| 54 | theorem sheafComplexLift_stalk_unit (g : K ⟶ AlgebraicTopology.Cohomology.Singular.SheafSections.sheafUnderlyingCochainComplex S) (x : X) : |
| 55 | AlgebraicTopology.Cohomology.Singular.SheafQuasiIso.sheafificationStalkComplexHom K x ≫ AlgebraicTopology.Cohomology.Singular.SheafQuasiIso.sheafStalkCochainMap (SheafComplexLift.Constructions.sheafComplexLift g) x = |
| 56 | ((stalkFunctor (ModuleCat.{0} R) x).mapHomologicalComplex (ComplexShape.up ℕ)).map g := by |
| 57 | ext n : 1 |
| 58 | change (stalkFunctor (ModuleCat.{0} R) x).map (CategoryTheory.toSheafify |
| 59 | (Opens.grothendieckTopology X) (K.X n)) ≫ |
| 60 | (stalkFunctor (ModuleCat.{0} R) x).map ((SheafComplexLift.Constructions.sheafComplexLift g).f n).hom = |
| 61 | (stalkFunctor (ModuleCat.{0} R) x).map (g.f n) |
| 62 | rw [← Functor.map_comp, SheafComplexLift.Constructions.sheafComplexLift_unit] |
| 63 | |
| 64 | theorem sheafComplexLift_stalk_quasiIso_of_locally |
| 65 | (g : K ⟶ AlgebraicTopology.Cohomology.Singular.SheafSections.sheafUnderlyingCochainComplex S) (x : X) |
| 66 | (hlocal : ∀ (U : Opens X), x∈U → ∃ (W : Opens X), x∈W ∧ W≤U ∧ |
| 67 | QuasiIso (((AlgebraicTopology.Cohomology.Singular.Stalk.presheafSectionFunctor W).mapHomologicalComplex (ComplexShape.up ℕ)).map g)) : |
| 68 | QuasiIso (AlgebraicTopology.Cohomology.Singular.SheafQuasiIso.sheafStalkCochainMap (SheafComplexLift.Constructions.sheafComplexLift g) x) := by |
| 69 | have := stalkCochainMap_quasiIso_of_locally g x hlocal |
| 70 | have : QuasiIso (AlgebraicTopology.Cohomology.Singular.SheafQuasiIso.sheafificationStalkComplexHom K x ≫ AlgebraicTopology.Cohomology.Singular.SheafQuasiIso.sheafStalkCochainMap (SheafComplexLift.Constructions.sheafComplexLift g) x) := by |
| 71 | rw [sheafComplexLift_stalk_unit] |
| 72 | infer_instance |
| 73 | exact quasiIso_of_comp_left (AlgebraicTopology.Cohomology.Singular.SheafQuasiIso.sheafificationStalkComplexHom K x) |
| 74 | (AlgebraicTopology.Cohomology.Singular.SheafQuasiIso.sheafStalkCochainMap (SheafComplexLift.Constructions.sheafComplexLift g) x) |
| 75 | |
| 76 | end |
| 77 | |
| 78 | /-! Canonical comparison of two genuine sheaf quotients from their actual stalk maps. -/ |
| 79 | |
| 80 | open _root_.CategoryTheory _root_.CategoryTheory.Limits _root_.TopologicalSpace Opposite _root_.TopCat.Presheaf |
| 81 | open ZeroObject |
| 82 | |
| 83 | set_option backward.isDefEq.respectTransparency false |
| 84 | |
| 85 | variable {R : Type} [Ring R] {X : TopCat.{0}} |
| 86 | variable {A B C : TopCat.Sheaf (ModuleCat.{0} R) X} |
| 87 | |
| 88 | abbrev moduleSheafStalk (x : X) := |
| 89 | TopCat.Sheaf.forget (ModuleCat.{0} R) X ⋙ stalkFunctor (ModuleCat.{0} R) x |
| 90 | |
| 91 | theorem moduleSheafMorphism_eq_zero_of_stalk (f : A ⟶ B) |
| 92 | (hf : ∀ x, (moduleSheafStalk x).map f = 0) : f=0 := by |
| 93 | apply Sheaf.hom_ext |
| 94 | apply NatTrans.ext |
| 95 | funext U |
| 96 | apply ModuleCat.hom_ext |
| 97 | apply LinearMap.ext |
| 98 | intro s |
| 99 | apply section_ext B U.unop |
| 100 | intro x hx |
| 101 | change germ B.obj U.unop x hx ((f.hom.app U) s) = germ B.obj U.unop x hx 0 |
| 102 | rw [← stalkFunctor_map_germ_apply] |
| 103 | have hx0 : (stalkFunctor (ModuleCat.{0} R) x).map f.hom = 0 := hf x |
| 104 | rw [hx0, map_zero] |
| 105 | rfl |
| 106 | |
| 107 | theorem moduleSheaf_epi_of_stalk_epi (f : A ⟶ B) |
| 108 | (hf : ∀ x, Epi ((moduleSheafStalk x).map f)) : Epi f := by |
| 109 | let S : ShortComplex (TopCat.Sheaf (ModuleCat.{0} R) X) := |
| 110 | ShortComplex.mk f (0 : B ⟶ 0) (by simp) |
| 111 | apply (S.exact_iff_epi rfl).mp |
| 112 | apply (TopCat.Sheaf.exact_iff_stalkFunctor_map_exact S).mpr |
| 113 | intro x |
| 114 | apply ((S.map (moduleSheafStalk x)).exact_iff_epi (by simp [S])).mpr |
| 115 | exact hf x |
| 116 | |
| 117 | theorem moduleSheaf_kernel_comp_eq_zero (f : A ⟶ B) (g : A ⟶ C) |
| 118 | (h : ∀ x, IsIso ((moduleSheafStalk x).map f) ∨ IsZero ((moduleSheafStalk x).obj C)) : |
| 119 | kernel.ι f ≫ g = 0 := by |
| 120 | apply moduleSheafMorphism_eq_zero_of_stalk |
| 121 | intro x |
| 122 | rcases h x with hx | hx |
| 123 | · have := hx |
| 124 | have hk : (moduleSheafStalk x).map (kernel.ι f) = 0 := by |
| 125 | apply (cancel_mono ((moduleSheafStalk x).map f)).mp |
| 126 | rw [← Functor.map_comp, kernel.condition, Functor.map_zero, zero_comp] |
| 127 | rw [Functor.map_comp, hk, zero_comp] |
| 128 | · exact hx.eq_zero_of_tgt _ |
| 129 | |
| 130 | def epiQuotientComparisonIso {D : Type*} [Category D] [Abelian D] |
| 131 | {A B C : D} (f : A ⟶ B) (g : A ⟶ C) [Epi f] [Epi g] |
| 132 | (hfg : kernel.ι f ≫ g=0) (hgf : kernel.ι g ≫ f=0) : B ≅ C where |
| 133 | hom := Abelian.epiDesc f g hfg |
| 134 | inv := Abelian.epiDesc g f hgf |
| 135 | hom_inv_id := by |
| 136 | apply (cancel_epi f).mp |
| 137 | rw [← Category.assoc, Abelian.comp_epiDesc, Abelian.comp_epiDesc, Category.comp_id] |
| 138 | inv_hom_id := by |
| 139 | apply (cancel_epi g).mp |
| 140 | rw [← Category.assoc, Abelian.comp_epiDesc, Abelian.comp_epiDesc, Category.comp_id] |
| 141 | |
| 142 | variable (f : A ⟶ B) (g : A ⟶ C) |
| 143 | variable (h : ∀ x, (IsIso ((moduleSheafStalk x).map f) ∧ |
| 144 | IsIso ((moduleSheafStalk x).map g)) ∨ |
| 145 | (IsZero ((moduleSheafStalk x).obj B) ∧ IsZero ((moduleSheafStalk x).obj C))) |
| 146 | |
| 147 | include h |
| 148 | |
| 149 | theorem moduleSheaf_localQuotient_epi : Epi f := by |
| 150 | apply moduleSheaf_epi_of_stalk_epi |
| 151 | intro x |
| 152 | rcases h x with hx | hx |
| 153 | · have := hx.1 |
| 154 | infer_instance |
| 155 | · exact hx.1.epi _ |
| 156 | |
| 157 | def moduleSheafLocalQuotientIso : B ≅ C := by |
| 158 | have := moduleSheaf_localQuotient_epi f g h |
| 159 | have := moduleSheaf_localQuotient_epi g f (fun x => (h x).elim |
| 160 | (fun hx => Or.inl hx.symm) (fun hx => Or.inr hx.symm)) |
| 161 | exact epiQuotientComparisonIso f g |
| 162 | (moduleSheaf_kernel_comp_eq_zero f g (fun x => (h x).elim |
| 163 | (fun hx => Or.inl hx.1) (fun hx => Or.inr hx.2))) |
| 164 | (moduleSheaf_kernel_comp_eq_zero g f (fun x => (h x).elim |
| 165 | (fun hx => Or.inl hx.2) (fun hx => Or.inr hx.1))) |
| 166 | |
| 167 | theorem moduleSheafLocalQuotientIso_comm : f ≫ (moduleSheafLocalQuotientIso f g h).hom = g := by |
| 168 | have := moduleSheaf_localQuotient_epi f g h |
| 169 | exact Abelian.comp_epiDesc _ _ _ |
| 170 | |
| 171 | end |
| 172 | |
| 173 | end OAI.AlgebraicGeometry.HodgeConjecture.DegreeTwo.LocalStalkQuasiIso.Constructions |