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.AlgebraicGeometry.Limits |
| 2 | import Mathlib.Topology.LocallyConstant.Basic |
| 3 | |
| 4 | /-! # Iff -/ |
| 5 | |
| 6 | namespace OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.ConstantScheme.Iff |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | /-! Constant schemes and the disjoint open decomposition attached to a locally constant map. -/ |
| 11 | |
| 12 | open _root_.CategoryTheory _root_.AlgebraicGeometry _root_.CategoryTheory.Limits |
| 13 | open _root_.TopologicalSpace |
| 14 | |
| 15 | universe u |
| 16 | |
| 17 | variable {I : Type u} {S T : Scheme.{u}} |
| 18 | |
| 19 | /-- The disjoint union of one copy of the base for each element of an index type. -/ |
| 20 | def constantScheme (S : Scheme.{u}) (I : Type u) : Over S := |
| 21 | Over.mk (Sigma.desc (fun _ : I => 𝟙 S)) |
| 22 | |
| 23 | @[simp, reassoc] |
| 24 | theorem constantScheme_ι_hom (i : I) : |
| 25 | Sigma.ι (fun _ : I => S) i ≫ (constantScheme S I).hom = 𝟙 S := |
| 26 | Sigma.ι_comp_desc _ _ |
| 27 | |
| 28 | /-- The index of a point in a disjoint union is locally constant. -/ |
| 29 | def constantSchemeIndex (S : Scheme.{u}) (I : Type u) : |
| 30 | LocallyConstant (constantScheme S I).left I where |
| 31 | toFun x := ((sigmaMk (fun _ : I => S)).symm x).1 |
| 32 | isLocallyConstant := |
| 33 | (show IsLocallyConstant (Sigma.fst : (Σ _ : I, S) → I) from |
| 34 | isOpen_sigma_fst_preimage).comp_continuous (sigmaMk (fun _ : I => S)).symm.continuous |
| 35 | |
| 36 | @[simp] |
| 37 | theorem constantSchemeIndex_ι (i : I) (x : S) : |
| 38 | constantSchemeIndex S I (Sigma.ι (fun _ : I => S) i x) = i := by |
| 39 | change ((sigmaMk (fun _ : I => S)).symm (Sigma.ι (fun _ : I => S) i x)).1 = i |
| 40 | rw [← sigmaMk_mk, Homeomorph.symm_apply_apply] |
| 41 | |
| 42 | /-- The index-valued locally constant function associated with a map to a constant scheme. -/ |
| 43 | def constantSchemePoint (T : Over S) (f : T ⟶ constantScheme S I) : |
| 44 | LocallyConstant T.left I := |
| 45 | (constantSchemeIndex S I).comap ⟨f.left, f.left.continuous⟩ |
| 46 | |
| 47 | /-- A fiber of a locally constant map is an open subscheme. -/ |
| 48 | def locallyConstantFiber (c : LocallyConstant T I) (i : I) : T.Opens := |
| 49 | ⟨{x | c x = i}, c.isLocallyConstant.isOpen_fiber i⟩ |
| 50 | |
| 51 | /-- The open fibers of a locally constant function form a disjoint-union presentation. -/ |
| 52 | instance locallyConstantFibersDesc_isIso (c : LocallyConstant T I) : |
| 53 | IsIso (Sigma.desc (fun i => (locallyConstantFiber c i).ι)) := by |
| 54 | apply (Cofan.nonempty_isColimit_iff_isIso_sigmaDesc |
| 55 | (Cofan.mk T (fun i => (locallyConstantFiber c i).ι))).mp |
| 56 | apply nonempty_isColimit_cofanMk_of |
| 57 | · simp only [Scheme.Opens.opensRange_ι] |
| 58 | apply top_unique |
| 59 | intro x _ |
| 60 | exact (Opens.mem_iSup).mpr ⟨c x, rfl⟩ |
| 61 | · intro i j hij |
| 62 | change Disjoint (locallyConstantFiber c i).ι.opensRange (locallyConstantFiber c j).ι.opensRange |
| 63 | rw [Scheme.Opens.opensRange_ι, Scheme.Opens.opensRange_ι, disjoint_iff] |
| 64 | apply le_bot_iff.mp |
| 65 | intro x hx |
| 66 | exact (hij (hx.1.symm.trans hx.2)).elim |
| 67 | |
| 68 | /-- The domain is canonically the disjoint union of the fibers of a locally constant map. -/ |
| 69 | def locallyConstantFibersIso (c : LocallyConstant T I) : |
| 70 | (∐ fun i => (locallyConstantFiber c i).toScheme) ≅ T := |
| 71 | asIso (Sigma.desc (fun i => (locallyConstantFiber c i).ι)) |
| 72 | |
| 73 | @[simp, reassoc] |
| 74 | theorem locallyConstantFibersIso_ι_hom (c : LocallyConstant T I) (i : I) : |
| 75 | Sigma.ι (fun i => (locallyConstantFiber c i).toScheme) i ≫ |
| 76 | (locallyConstantFibersIso c).hom = (locallyConstantFiber c i).ι := |
| 77 | Sigma.ι_comp_desc _ _ |
| 78 | |
| 79 | @[simp, reassoc] |
| 80 | theorem locallyConstantFibersIso_ι_inv (c : LocallyConstant T I) (i : I) : |
| 81 | (locallyConstantFiber c i).ι ≫ (locallyConstantFibersIso c).inv = |
| 82 | Sigma.ι (fun i => (locallyConstantFiber c i).toScheme) i := |
| 83 | (Iso.comp_inv_eq _).mpr (locallyConstantFibersIso_ι_hom c i).symm |
| 84 | |
| 85 | /-- A point has index `i` exactly when it lies in the `i`th copy of the base. -/ |
| 86 | theorem constantSchemeIndex_eq_iff (x : (constantScheme S I).left) (i : I) : |
| 87 | constantSchemeIndex S I x = i ↔ x ∈ Set.range (Sigma.ι (fun _ : I => S) i) := by |
| 88 | constructor |
| 89 | · intro hx |
| 90 | obtain ⟨⟨j, y⟩, rfl⟩ := (sigmaMk (fun _ : I => S)).surjective x |
| 91 | rw [sigmaMk_mk, constantSchemeIndex_ι] at hx |
| 92 | subst j |
| 93 | exact ⟨y, (sigmaMk_mk (fun _ : I => S) i y).symm⟩ |
| 94 | · rintro ⟨y, rfl⟩ |
| 95 | exact constantSchemeIndex_ι i y |
| 96 | |
| 97 | /-- A map with constant index factors through the corresponding copy of the base. -/ |
| 98 | theorem constantScheme_factor (f : T ⟶ (constantScheme S I).left) (i : I) |
| 99 | (hf : ∀ x, constantSchemeIndex S I (f x) = i) : |
| 100 | f = (f ≫ (constantScheme S I).hom) ≫ Sigma.ι (fun _ : I => S) i := by |
| 101 | have : IsOpenImmersion (Sigma.ι (fun _ : I => S) i) := inferInstance |
| 102 | have hr : Set.range f ⊆ Set.range (Sigma.ι (fun _ : I => S) i) := by |
| 103 | rintro _ ⟨x, rfl⟩ |
| 104 | exact (constantSchemeIndex_eq_iff (f x) i).mp (hf x) |
| 105 | let l := IsOpenImmersion.lift (Sigma.ι (fun _ : I => S) i) f hr |
| 106 | have hl : l ≫ Sigma.ι (fun _ : I => S) i = f := |
| 107 | IsOpenImmersion.lift_fac (Sigma.ι (fun _ : I => S) i : S ⟶ ∐ fun _ : I => S) f hr |
| 108 | have hb : l = f ≫ (constantScheme S I).hom := |
| 109 | (Category.comp_id l).symm.trans |
| 110 | ((congrArg (fun z => l ≫ z) (constantScheme_ι_hom (S := S) i).symm).trans |
| 111 | (((Category.assoc _ _ _).symm).trans |
| 112 | (congrArg (fun z => z ≫ (constantScheme S I).hom) hl))) |
| 113 | exact hl.symm.trans (congrArg (fun z => z ≫ Sigma.ι (fun _ : I => S) i) hb) |
| 114 | |
| 115 | /-- A locally constant index function determines a map into the disjoint union of bases. -/ |
| 116 | def constantSchemePointInverse (T : Over S) (c : LocallyConstant T.left I) : |
| 117 | T ⟶ constantScheme S I := |
| 118 | Over.homMk ((locallyConstantFibersIso c).inv ≫ |
| 119 | Sigma.desc (fun i => (locallyConstantFiber c i).ι ≫ T.hom ≫ Sigma.ι (fun _ : I => S) i)) (by |
| 120 | have hd : (Sigma.desc (fun i => |
| 121 | (locallyConstantFiber c i).ι ≫ T.hom ≫ Sigma.ι (fun _ : I => S) i)) ≫ |
| 122 | (constantScheme S I).hom = (locallyConstantFibersIso c).hom ≫ T.hom := by |
| 123 | apply Sigma.hom_ext |
| 124 | intro i |
| 125 | exact (Category.assoc _ _ _).symm.trans |
| 126 | ((congrArg (fun z => z ≫ (constantScheme S I).hom) (Sigma.ι_comp_desc _ _)).trans |
| 127 | ((Category.assoc _ _ _).trans |
| 128 | ((congrArg (fun z => (locallyConstantFiber c i).ι ≫ z) |
| 129 | ((Category.assoc _ _ _).trans |
| 130 | ((congrArg (fun z => T.hom ≫ z) (constantScheme_ι_hom i)).trans |
| 131 | (Category.comp_id _)))).trans |
| 132 | (locallyConstantFibersIso_ι_hom_assoc c i T.hom).symm))) |
| 133 | exact (Category.assoc _ _ _).trans |
| 134 | ((congrArg (fun z => (locallyConstantFibersIso c).inv ≫ z) hd).trans |
| 135 | ((locallyConstantFibersIso c).inv_hom_id_assoc T.hom))) |
| 136 | |
| 137 | @[reassoc] |
| 138 | theorem constantSchemePointInverse_ι (T : Over S) (c : LocallyConstant T.left I) (i : I) : |
| 139 | (locallyConstantFiber c i).ι ≫ (constantSchemePointInverse T c).left = |
| 140 | (locallyConstantFiber c i).ι ≫ T.hom ≫ Sigma.ι (fun _ : I => S) i := |
| 141 | (Category.assoc _ _ _).symm.trans |
| 142 | ((congrArg (fun z => z ≫ Sigma.desc (fun j => |
| 143 | (locallyConstantFiber c j).ι ≫ T.hom ≫ Sigma.ι (fun _ : I => S) j)) |
| 144 | (locallyConstantFibersIso_ι_inv c i)).trans (Sigma.ι_comp_desc _ _)) |
| 145 | |
| 146 | theorem constantSchemePoint_rightInverse (T : Over S) (c : LocallyConstant T.left I) : |
| 147 | constantSchemePoint T (constantSchemePointInverse T c) = c := by |
| 148 | ext x |
| 149 | let y : (locallyConstantFiber c (c x)).toScheme := ⟨x, rfl⟩ |
| 150 | have w := congrArg (fun z : (locallyConstantFiber c (c x)).toScheme ⟶ |
| 151 | (constantScheme S I).left => z y) (constantSchemePointInverse_ι T c (c x)) |
| 152 | change (constantSchemePointInverse T c).left x = |
| 153 | Sigma.ι (fun _ : I => S) (c x) (T.hom x) at w |
| 154 | change constantSchemeIndex S I ((constantSchemePointInverse T c).left x) = c x |
| 155 | rw [w, constantSchemeIndex_ι] |
| 156 | |
| 157 | theorem constantSchemePoint_leftInverse (T : Over S) (f : T ⟶ constantScheme S I) : |
| 158 | constantSchemePointInverse T (constantSchemePoint T f) = f := by |
| 159 | let c := constantSchemePoint T f |
| 160 | apply Over.OverMorphism.ext |
| 161 | apply (cancel_epi (locallyConstantFibersIso c).hom).mp |
| 162 | apply Sigma.hom_ext |
| 163 | intro i |
| 164 | rw [locallyConstantFibersIso_ι_hom_assoc, locallyConstantFibersIso_ι_hom_assoc] |
| 165 | have hfactor := constantScheme_factor ((locallyConstantFiber c i).ι ≫ f.left) i |
| 166 | (fun x => x.property) |
| 167 | exact (constantSchemePointInverse_ι T c i).trans |
| 168 | ((congrArg (fun z => z ≫ Sigma.ι (fun _ : I => S) i) |
| 169 | ((Category.assoc _ _ _).trans |
| 170 | (congrArg (fun z => (locallyConstantFiber c i).ι ≫ z) f.w)).symm).trans hfactor.symm) |
| 171 | |
| 172 | /-- Maps over the base into a constant scheme are exactly locally constant index functions. -/ |
| 173 | def constantSchemePointsEquiv (S : Scheme.{u}) (I : Type u) (T : Over S) : |
| 174 | (T ⟶ constantScheme S I) ≃ LocallyConstant T.left I where |
| 175 | toFun := constantSchemePoint T |
| 176 | invFun := constantSchemePointInverse T |
| 177 | left_inv := constantSchemePoint_leftInverse T |
| 178 | right_inv := constantSchemePoint_rightInverse T |
| 179 | |
| 180 | end |
| 181 | |
| 182 | end OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.ConstantScheme.Iff |