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.NumberTheory.PadicHodge.IntegralComparison.Etale.StandardCover |
| 2 | import Mathlib.AlgebraicGeometry.Morphisms.Etale |
| 3 | import Mathlib.AlgebraicGeometry.Morphisms.Affine |
| 4 | |
| 5 | /-! # Standard Etale Cover -/ |
| 6 | |
| 7 | namespace OAI.NumberTheory.PadicHodge.IntegralComparison.Relative.StandardEtaleCover |
| 8 | |
| 9 | noncomputable section |
| 10 | |
| 11 | /-! An actual affine etale morphism has a source cover by standard |
| 12 | etale affine charts over any specified affine open cover of the base. -/ |
| 13 | |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | set_option backward.isDefEq.respectTransparency.types false |
| 16 | open _root_.CategoryTheory _root_.CategoryTheory.Limits _root_.AlgebraicGeometry |
| 17 | universe u v |
| 18 | variable {X Y : Scheme.{u}} (f : Y ⟶ X) [Etale f] [IsAffineHom f] |
| 19 | (C : X.OpenCover.{v}) [∀ i, IsAffine (C.X i)] |
| 20 | |
| 21 | abbrev sourceCover : Y.OpenCover.{v} := C.pullback₁ f |
| 22 | instance source_affine (i : C.I₀) : IsAffine ((sourceCover f C).X i) := |
| 23 | inferInstanceAs (IsAffine (pullback f (C.f i))) |
| 24 | |
| 25 | abbrev baseRing (i : C.I₀) : CommRingCat.{u} := Γ(C.X i, ⊤) |
| 26 | abbrev sourceRing (i : C.I₀) : CommRingCat.{u} := Γ((sourceCover f C).X i, ⊤) |
| 27 | |
| 28 | def sourceMap (i : C.I₀) : Spec (sourceRing f C i) ⟶ Y := |
| 29 | ((sourceCover f C).X i).isoSpec.inv ≫ (sourceCover f C).f i |
| 30 | |
| 31 | instance sourceMap_open (i : C.I₀) : IsOpenImmersion (sourceMap f C i) := by |
| 32 | unfold sourceMap |
| 33 | infer_instance |
| 34 | |
| 35 | instance sourceAlgebra (i : C.I₀) : Algebra (baseRing C i) (sourceRing f C i) := |
| 36 | (C.pullbackHom f i).appTop.hom.toAlgebra |
| 37 | |
| 38 | instance sourceEtale (i : C.I₀) : Algebra.Etale (baseRing C i) (sourceRing f C i) := by |
| 39 | let : Etale (C.pullbackHom f i) := |
| 40 | MorphismProperty.pullback_snd _ _ (inferInstanceAs (Etale f)) |
| 41 | change (C.pullbackHom f i).appTop.hom.Etale |
| 42 | simpa [Scheme.Hom.appTop, Scheme.Hom.appLE] using |
| 43 | (C.pullbackHom f i).etale_appLE (isAffineOpen_top _) (isAffineOpen_top _) (by simp) |
| 44 | |
| 45 | omit [Etale f] in |
| 46 | theorem sourceMap_over (i : C.I₀) : |
| 47 | sourceMap f C i ≫ f = Spec.map (CommRingCat.ofHom (algebraMap (baseRing C i) (sourceRing f C i))) ≫ |
| 48 | (C.X i).isoSpec.inv ≫ C.f i := by |
| 49 | change (_ ≫ (sourceCover f C).f i) ≫ f = Spec.map (C.pullbackHom f i).appTop ≫ _ |
| 50 | rw [Category.assoc, ← C.pullbackHom_map f i, ← Category.assoc, |
| 51 | ← Scheme.isoSpec_inv_naturality, Category.assoc] |
| 52 | |
| 53 | abbrev Index := Σ i : C.I₀, IntegralComparison.Etale.StandardCover.localizers (baseRing C i) (sourceRing f C i) |
| 54 | |
| 55 | abbrev coordinateRing (a : Index f C) : CommRingCat.{u} := CommRingCat.of (Localization.Away a.2.val) |
| 56 | |
| 57 | instance coordinateAlgebra (a : Index f C) : Algebra (baseRing C a.1) (coordinateRing f C a) := |
| 58 | inferInstanceAs (Algebra (baseRing C a.1) (Localization.Away a.2.val)) |
| 59 | |
| 60 | instance coordinateStandard (a : Index f C) : Algebra.IsStandardEtale (baseRing C a.1) (coordinateRing f C a) := |
| 61 | IntegralComparison.Etale.StandardCover.standard (baseRing C a.1) (sourceRing f C a.1) a.2 |
| 62 | |
| 63 | def presentation (a : Index f C) : StandardEtalePresentation (baseRing C a.1) (coordinateRing f C a) := |
| 64 | IntegralComparison.Etale.StandardCover.presentation (baseRing C a.1) (sourceRing f C a.1) a.2 |
| 65 | |
| 66 | def localizationMap (a : Index f C) : sourceRing f C a.1 ⟶ coordinateRing f C a := |
| 67 | CommRingCat.ofHom (algebraMap (sourceRing f C a.1) (Localization.Away a.2.val)) |
| 68 | |
| 69 | def chartMap (a : Index f C) : Spec (coordinateRing f C a) ⟶ Y := |
| 70 | Spec.map (localizationMap f C a) ≫ sourceMap f C a.1 |
| 71 | |
| 72 | instance chartMap_open (a : Index f C) : IsOpenImmersion (chartMap f C a) := by |
| 73 | let : IsOpenImmersion (Spec.map (localizationMap f C a)) := |
| 74 | inferInstanceAs (IsOpenImmersion (Spec.map (CommRingCat.ofHom |
| 75 | (algebraMap (sourceRing f C a.1) (Localization.Away a.2.val))))) |
| 76 | unfold chartMap |
| 77 | infer_instance |
| 78 | |
| 79 | theorem chartMap_over (a : Index f C) : chartMap f C a ≫ f = |
| 80 | Spec.map (CommRingCat.ofHom (algebraMap (baseRing C a.1) (coordinateRing f C a))) ≫ |
| 81 | (C.X a.1).isoSpec.inv ≫ C.f a.1 := by |
| 82 | rw [chartMap, Category.assoc, sourceMap_over, ← Category.assoc, ← Spec.map_comp] |
| 83 | congr 2 |
| 84 | |
| 85 | theorem covers (y : Y) : ∃ a : Index f C, y ∈ Set.range (chartMap f C a) := by |
| 86 | obtain ⟨i, z, hz⟩ := Scheme.Cover.exists_eq (sourceCover f C) y |
| 87 | change C.I₀ at i |
| 88 | let D := Scheme.affineOpenCoverOfSpanRangeEqTop |
| 89 | (fun a : IntegralComparison.Etale.StandardCover.localizers (baseRing C i) (sourceRing f C i) => a.val) |
| 90 | (IntegralComparison.Etale.StandardCover.span (baseRing C i) (sourceRing f C i)) |
| 91 | obtain ⟨a, t, ht⟩ := Scheme.Cover.exists_eq D.openCover (((sourceCover f C).X i).isoSpec.hom z) |
| 92 | change (D.f a) t = ((sourceCover f C).X i).isoSpec.hom z at ht |
| 93 | refine ⟨⟨i, a⟩, t, ?_⟩ |
| 94 | change (sourceCover f C).f i (((sourceCover f C).X i).isoSpec.inv ((D.f a) t)) = y |
| 95 | rw [ht] |
| 96 | have he := congrArg (fun g : (sourceCover f C).X i ⟶ (sourceCover f C).X i => g z) |
| 97 | (((sourceCover f C).X i).isoSpec.hom_inv_id) |
| 98 | change ((sourceCover f C).X i).isoSpec.inv (((sourceCover f C).X i).isoSpec.hom z) = z at he |
| 99 | rw [he] |
| 100 | exact hz |
| 101 | |
| 102 | def cover : Y.OpenCover where |
| 103 | I₀ := Index f C |
| 104 | X a := Spec (coordinateRing f C a) |
| 105 | f := chartMap f C |
| 106 | mem₀ := by |
| 107 | rw [Scheme.presieve₀_mem_precoverage_iff] |
| 108 | exact ⟨covers f C, inferInstance⟩ |
| 109 | |
| 110 | def presentedMap (a : Index f C) : Spec (.of (presentation f C a).P.Ring) ⟶ Y := |
| 111 | Spec.map (CommRingCat.ofHom (presentation f C a).equivRing.toRingHom) ≫ chartMap f C a |
| 112 | |
| 113 | instance presentedMap_open (a : Index f C) : IsOpenImmersion (presentedMap f C a) := by |
| 114 | let : IsIso (Spec.map (CommRingCat.ofHom (presentation f C a).equivRing.toRingHom)) := |
| 115 | (Scheme.Spec.mapIso (presentation f C a).equivRing.toCommRingCatIso.op).isIso_hom |
| 116 | unfold presentedMap |
| 117 | infer_instance |
| 118 | |
| 119 | theorem presentedMap_over (a : Index f C) : presentedMap f C a ≫ f = |
| 120 | Spec.map (CommRingCat.ofHom (algebraMap (baseRing C a.1) (presentation f C a).P.Ring)) ≫ |
| 121 | (C.X a.1).isoSpec.inv ≫ C.f a.1 := by |
| 122 | rw [presentedMap, Category.assoc, chartMap_over, ← Category.assoc, ← Spec.map_comp] |
| 123 | congr 2 |
| 124 | ext r |
| 125 | exact (presentation f C a).equivRing.commutes r |
| 126 | |
| 127 | theorem presented_covers (y : Y) : ∃ a : Index f C, y ∈ Set.range (presentedMap f C a) := by |
| 128 | obtain ⟨a, z, hz⟩ := covers f C y |
| 129 | let e := Scheme.Spec.mapIso (presentation f C a).equivRing.toCommRingCatIso.op |
| 130 | refine ⟨a, e.inv z, ?_⟩ |
| 131 | change (chartMap f C a) (e.hom (e.inv z)) = y |
| 132 | have he := congrArg (fun g : Spec (coordinateRing f C a) ⟶ Spec (coordinateRing f C a) => g z) |
| 133 | e.inv_hom_id |
| 134 | change e.hom (e.inv z) = z at he |
| 135 | rw [he] |
| 136 | exact hz |
| 137 | |
| 138 | end |
| 139 | |
| 140 | end OAI.NumberTheory.PadicHodge.IntegralComparison.Relative.StandardEtaleCover |