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 | /- |
| 2 | Copyright 2026 The Formal Conjectures Authors. |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | https://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | This file has been modified. |
| 16 | -/ |
| 17 | import OAI.AlgebraicGeometry.Foundations.ProjectiveSpaceIs |
| 18 | import Mathlib.Algebra.Category.Ring.Topology |
| 19 | import Mathlib.AlgebraicGeometry.Noetherian |
| 20 | import Mathlib.Analysis.Complex.Basic |
| 21 | import Mathlib.RingTheory.Valuation.ValuationRing |
| 22 | import Mathlib.Topology.Algebra.IsOpenUnits |
| 23 | import OAI.CategoryTheory.ConcreteCategory.Notation |
| 24 | import OAI.Topology.Algebra.IsOpenUnits |
| 25 | |
| 26 | /-! # Basic -/ |
| 27 | |
| 28 | namespace OAI.AlgebraicGeometry.ComplexPoint.Basic |
| 29 | |
| 30 | open _root_.AlgebraicGeometry |
| 31 | |
| 32 | /-! |
| 33 | # Points over a commutative ring, and analytification |
| 34 | |
| 35 | For a scheme `X: Over (Spec R)` over a commutative ring `R`, an `R`-point is a morphism |
| 36 | `Over.mk (𝟙 (Spec R)) ⟶ X`. The structure map is bundled with `X`, and `map` is composition |
| 37 | in this over category. These constructions require only that `R` is a commutative ring. |
| 38 | |
| 39 | Everything that speaks of *the* point underlying an `R`-point needs `Spec R` to have a unique |
| 40 | closed point, so from `stalkData` onwards `R` is local. An `R`-point then determines a scheme point |
| 41 | together with a local homomorphism out of the stalk there, and evaluating the sections on an open |
| 42 | `U` containing it gives a ring homomorphism `Γ(X.left, U) ⟶ ↧R`. Over an affine open this |
| 43 | identifies the `R`-points with a subspace of that hom set, which carries Mathlib's topology of |
| 44 | pointwise convergence; the analytic topology is the topology glued from these affine charts. It exists as |
| 45 | soon as multiplication on `R` is continuous and the units of `R` are open, so it applies to `ℝ`, |
| 46 | to a `p`-adic field, and to `ℤ_p` alike. |
| 47 | |
| 48 | `analyticTopology_eq_generateFrom` identifies it with the more elementary description: the |
| 49 | topology generated by the sets on which a local regular function takes values in a prescribed open |
| 50 | subset of `R`. |
| 51 | |
| 52 | Over a field the stalk homomorphism factors through the residue field, which is the classical |
| 53 | description; `residueData` and the lemmas beside it record it, and there nonvanishing replaces |
| 54 | invertibility. |
| 55 | |
| 56 | Complex points are the case `K = ℂ`. Analytification is then packaged as a functor from schemes |
| 57 | over `Spec ℂ` to topological spaces, so that singular (co)homology of a complex variety is Mathlib's |
| 58 | singular (co)homology of the resulting space. |
| 59 | |
| 60 | `isNoetherian_of_isProjective` records that a projective complex scheme is Noetherian. |
| 61 | -/ |
| 62 | |
| 63 | open _root_.CategoryTheory _root_.Topology |
| 64 | open scoped CommRingCat.HomTopology |
| 65 | |
| 66 | variable (R : Type) [CommRing R] |
| 67 | |
| 68 | /-- Let `R` be a commutative ring and `X` a scheme over `Spec R`. An `R`-point of `X` is a morphism |
| 69 | `Spec R → X` whose composite with the structure map `X → Spec R` is the identity. -/ |
| 70 | abbrev Point (X : Over (Spec ↧R)) := |
| 71 | Over.mk (𝟙 (Spec ↧R)) ⟶ X |
| 72 | |
| 73 | namespace Point |
| 74 | |
| 75 | variable {R} |
| 76 | |
| 77 | section Functoriality |
| 78 | |
| 79 | variable {X Y Z : Over (Spec ↧R)} |
| 80 | |
| 81 | /-- Let `R` be a commutative ring and `f: X → Y` a morphism of schemes over `Spec R`. This sends an |
| 82 | `R`-point `z: Spec R → X` to the composite `f ∘ z: Spec R → Y`. -/ |
| 83 | noncomputable def map (f : X ⟶ Y) : Point R X → Point R Y := |
| 84 | fun z ↦ z ≫ f |
| 85 | |
| 86 | /-- The identity scheme morphism induces the identity on `R`-points. -/ |
| 87 | @[simp] |
| 88 | lemma map_id (z : Point R X) : Point.map (𝟙 X) z = z := rfl |
| 89 | |
| 90 | /-- Composition of scheme morphisms agrees with composition on `R`-points. -/ |
| 91 | @[simp] |
| 92 | lemma map_comp_apply (f : X ⟶ Y) (g : Y ⟶ Z) (z : Point R X) : |
| 93 | Point.map (f ≫ g) z = Point.map g (Point.map f z) := rfl |
| 94 | |
| 95 | end Functoriality |
| 96 | |
| 97 | variable [IsLocalRing R] {X : Over (Spec ↧R)} |
| 98 | |
| 99 | /-- Let `R` be a commutative local ring and `X` a scheme over `Spec R`. An `R`-point `z: Spec R → |
| 100 | X` determines the image `x` of the unique closed point of `Spec R` and a local ring homomorphism |
| 101 | `𝒪_{X,x} → R`. This is that pair, with the assertion that the homomorphism is local. -/ |
| 102 | noncomputable def stalkData (z : Point R X) : |
| 103 | Σ x : X.left, {f : X.left.presheaf.stalk x ⟶ ↧R // IsLocalHom f.hom} := |
| 104 | SpecToEquivOfLocalRing X.left ↧R z.left |
| 105 | |
| 106 | /-- Let `R` be a commutative local ring and `X` a scheme over `Spec R`. For an `R`-point `z: Spec R |
| 107 | → X`, this is the image in `X` of the unique closed point of `Spec R`. -/ |
| 108 | noncomputable def underlying (z : Point R X) : X.left := z.stalkData.1 |
| 109 | |
| 110 | /-- Let `R` be a commutative local ring and `X` a scheme over `Spec R`. For an `R`-point `z: Spec R |
| 111 | → X`, let `x` be the image of the closed point of `Spec R`. This is the induced local |
| 112 | homomorphism `𝒪_{X,x} → R` from the stalk of the structure sheaf. -/ |
| 113 | noncomputable def stalkHom (z : Point R X) : |
| 114 | X.left.presheaf.stalk z.underlying ⟶ ↧R := z.stalkData.2.1 |
| 115 | |
| 116 | instance (z : Point R X) : IsLocalHom z.stalkHom.hom := z.stalkData.2.2 |
| 117 | |
| 118 | /-- Let `R` be a commutative local ring and `X` a scheme over `Spec R`. For a Zariski open `U ⊆ X`, |
| 119 | this is the set of `R`-points `z: Spec R → X` that send the unique closed point of `Spec R` |
| 120 | into `U`. -/ |
| 121 | noncomputable def overOpen (U : X.left.Opens) : Set (Point R X) := |
| 122 | {z | z.underlying ∈ U} |
| 123 | |
| 124 | /-- Let `R` be a commutative local ring and `X` a scheme over `Spec R`. For a Zariski open `U ⊆ X`, |
| 125 | this is the type of `R`-points together with the condition that the image of the closed point of |
| 126 | `Spec R` lies in `U`. -/ |
| 127 | abbrev OverOpen (U : X.left.Opens) := {z : Point R X // z.underlying ∈ U} |
| 128 | |
| 129 | open scoped Classical in |
| 130 | /-- Let `R` be a commutative local ring and `X` a scheme over `Spec R`. For a regular function `s` |
| 131 | on a Zariski open `U` and an `R`-point `z`, evaluate the germ of `s` using the stalk |
| 132 | homomorphism `𝒪_{X,x} → R` induced by `z` if its underlying point `x` is in `U`. The value is |
| 133 | defined to be zero when `x ∉ U`. -/ |
| 134 | noncomputable def evaluate (U : X.left.Opens) (s : Γ(X.left, U)) |
| 135 | (z : Point R X) : R := |
| 136 | if hz : z.underlying ∈ U then z.stalkHom (X.left.presheaf.germ U z.underlying hz s) else 0 |
| 137 | |
| 138 | /-- Restricting a regular function does not change its value at a point in the smaller open. -/ |
| 139 | lemma evaluate_res {U V : X.left.Opens} (hVU : V ≤ U) (s : Γ(X.left, U)) |
| 140 | (z : Point R X) (hz : z ∈ overOpen V) : |
| 141 | evaluate U s z = evaluate V (X.left.presheaf.map (homOfLE hVU).op s) z := by |
| 142 | rw [evaluate, dite_eq_left (show z.underlying ∈ U from hVU hz), evaluate, |
| 143 | dite_eq_left (show z.underlying ∈ V from hz)] |
| 144 | congr 1 |
| 145 | exact (X.left.presheaf.germ_res_apply (homOfLE hVU) z.underlying hz s).symm |
| 146 | |
| 147 | /-- An `R`-point belongs to a principal open exactly when its defining function evaluates to a |
| 148 | unit there. |
| 149 | |
| 150 | Over a field this is nonvanishing; see `mem_overOpen_basicOpen_iff_evaluate_ne_zero`. -/ |
| 151 | lemma mem_overOpen_basicOpen_iff_isUnit_evaluate {U : X.left.Opens} (s : Γ(X.left, U)) |
| 152 | (z : Point R X) (hz : z ∈ overOpen U) : |
| 153 | z ∈ overOpen (X.left.basicOpen s) ↔ IsUnit (evaluate U s z) := by |
| 154 | rw [evaluate, dite_eq_left (show z.underlying ∈ U from hz)] |
| 155 | rw [isUnit_map_iff z.stalkHom.hom] |
| 156 | exact X.left.mem_basicOpen s z.underlying hz |
| 157 | |
| 158 | /-- Let `R` be a commutative local ring and `X` a scheme over `Spec R`. For an `R`-point with |
| 159 | underlying point `x` in the Zariski open `U`, this ring homomorphism `Γ(U, 𝒪_X) → R` first takes |
| 160 | the germ at `x` and then applies the stalk map induced by the point. -/ |
| 161 | noncomputable def evaluationHom (U : X.left.Opens) |
| 162 | (z : OverOpen (X := X) U) : Γ(X.left, U) ⟶ ↧R := |
| 163 | X.left.presheaf.germ U z.1.underlying z.2 ≫ z.1.stalkHom |
| 164 | |
| 165 | @[simp] |
| 166 | lemma evaluationHom_apply (U : X.left.Opens) (z : OverOpen (X := X) U) |
| 167 | (s : Γ(X.left, U)) : evaluationHom U z s = evaluate U s z.1 := by |
| 168 | rw [evaluate, dite_eq_left z.2] |
| 169 | rfl |
| 170 | |
| 171 | /-- On an affine open, a regular function on a principal open is, at every `R`-point of that |
| 172 | principal open, a regular function on the whole affine open divided by a power of the defining |
| 173 | function. |
| 174 | |
| 175 | Over a field this reads as an honest quotient; see `exists_evaluate_basicOpen_eq_div`. -/ |
| 176 | lemma exists_evaluate_basicOpen_eq_inverse_mul {U : X.left.Opens} (hU : IsAffineOpen U) |
| 177 | (f : Γ(X.left, U)) (t : Γ(X.left, X.left.basicOpen f)) : |
| 178 | ∃ (k : ℕ) (a : Γ(X.left, U)), ∀ z : Point R X, |
| 179 | z ∈ overOpen (X.left.basicOpen f) → |
| 180 | evaluate (X.left.basicOpen f) t z = |
| 181 | Ring.inverse (evaluate U f z ^ k) * evaluate U a z := by |
| 182 | let := hU.isLocalization_basicOpen f |
| 183 | obtain ⟨k, a, hta⟩ := IsLocalization.Away.surj f t |
| 184 | refine ⟨k, a, fun z hz ↦ ?_⟩ |
| 185 | have hzU : z ∈ overOpen U := X.left.basicOpen_le f hz |
| 186 | have hunit : IsUnit (evaluate U f z) := |
| 187 | (mem_overOpen_basicOpen_iff_isUnit_evaluate f z hzU).mp hz |
| 188 | have key : evaluate (X.left.basicOpen f) t z * evaluate U f z ^ k = evaluate U a z := by |
| 189 | have hz' : z.underlying ∈ X.left.basicOpen f := hz |
| 190 | let ψ : Γ(X.left, X.left.basicOpen f) →+* R := (evaluationHom (X.left.basicOpen f) ⟨z, hz⟩).hom |
| 191 | have hmap := congrArg ψ hta |
| 192 | rw [evaluate_res (X.left.basicOpen_le f) f z hz, evaluate_res (X.left.basicOpen_le f) a z hz] |
| 193 | simp only [evaluate, dite_eq_left hz'] |
| 194 | change ψ t * ψ (algebraMap _ _ f) ^ k = ψ (algebraMap _ _ a) |
| 195 | simpa using hmap |
| 196 | rw [← key, mul_comm (evaluate (X.left.basicOpen f) t z), ← mul_assoc, |
| 197 | Ring.inverse_mul_cancel _ (hunit.pow k), one_mul] |
| 198 | |
| 199 | @[simp] |
| 200 | lemma underlying_map {Y : Over (Spec ↧R)} (f : X ⟶ Y) (z : Point R X) : |
| 201 | (Point.map f z).underlying = f.left z.underlying := rfl |
| 202 | |
| 203 | /-- The stalk homomorphism of the image of an `R`-point is obtained functorially. -/ |
| 204 | lemma stalkHom_map {Y : Over (Spec ↧R)} (f : X ⟶ Y) (z : Point R X) : |
| 205 | (Point.map f z).stalkHom = f.left.stalkMap z.underlying ≫ z.stalkHom := |
| 206 | Scheme.stalkClosedPointTo_comp _ _ |
| 207 | |
| 208 | /-- Pulling back a scheme open commutes with passage to `R`-points. -/ |
| 209 | lemma mem_overOpen_map_iff {Y : Over (Spec ↧R)} (f : X ⟶ Y) |
| 210 | (z : Point R X) (U : Y.left.Opens) : |
| 211 | Point.map f z ∈ overOpen U ↔ z ∈ overOpen (f.left ⁻¹ᵁ U) := by |
| 212 | simp [overOpen] |
| 213 | |
| 214 | /-- Evaluation of a pulled-back regular function agrees with evaluation after mapping the point. -/ |
| 215 | lemma evaluate_map {Y : Over (Spec ↧R)} (f : X ⟶ Y) |
| 216 | (U : Y.left.Opens) (s : Γ(Y.left, U)) (z : Point R X) : |
| 217 | evaluate U s (Point.map f z) = evaluate (f.left ⁻¹ᵁ U) (f.left.app U s) z := by |
| 218 | by_cases hx : z.underlying ∈ f.left ⁻¹ᵁ U |
| 219 | · have hy : f.left z.underlying ∈ U := hx |
| 220 | rw [evaluate, dite_eq_left (show (Point.map f z).underlying ∈ U from hy), evaluate, |
| 221 | dite_eq_left (show z.underlying ∈ f.left ⁻¹ᵁ U from hx), stalkHom_map] |
| 222 | exact congrArg (CommRingCat.Hom.hom z.stalkHom) |
| 223 | (f.left.germ_stalkMap_apply U z.underlying hy s) |
| 224 | · have hy : f.left z.underlying ∉ U := hx |
| 225 | rw [evaluate, dite_eq_right (show ¬ (Point.map f z).underlying ∈ U from hy), evaluate, |
| 226 | dite_eq_right (show ¬ z.underlying ∈ f.left ⁻¹ᵁ U from hx)] |
| 227 | |
| 228 | variable [TopologicalSpace R] |
| 229 | |
| 230 | /-- Let `R` be a commutative local ring with a topology and `X` a scheme over `Spec R`. On the |
| 231 | `R`-points whose underlying points lie in the open `U`, this is the topology induced by |
| 232 | evaluation into `Hom(Γ(U, 𝒪_X), R)`. The homomorphism space has the topology of pointwise |
| 233 | convergence on regular functions. -/ |
| 234 | @[instance_reducible] |
| 235 | noncomputable def chartTopology (U : X.left.Opens) : |
| 236 | TopologicalSpace (OverOpen (X := X) U) := |
| 237 | .induced (evaluationHom U) inferInstance |
| 238 | |
| 239 | /-- Let `R` be a commutative local ring with a topology and `X` a scheme over `Spec R`. This family |
| 240 | consists of sets `{z | underlying(z) ∈ U and s(z) ∈ V}`, where `U` is Zariski open in `X`, `s` a |
| 241 | regular function on `U`, and `V` open in `R`. These sets specify local conditions on values of |
| 242 | regular functions. -/ |
| 243 | noncomputable def analyticSubbasis : Set (Set (Point R X)) := |
| 244 | {W | ∃ (U : X.left.Opens) (s : Γ(X.left, U)) (V : Set R), IsOpen V ∧ |
| 245 | W = overOpen U ∩ evaluate U s ⁻¹' V} |
| 246 | |
| 247 | /-- Let `R` be a commutative local ring with a topology and `X` a scheme over `Spec R`. Give the |
| 248 | points over each affine open the topology of pointwise convergence of regular-function |
| 249 | evaluations. This is the topology on all `R`-points obtained by taking the supremum of the |
| 250 | topologies coinduced by those chart inclusions. For `R = ℂ`, it is the analytic topology on |
| 251 | complex points. -/ |
| 252 | @[instance_reducible] |
| 253 | noncomputable instance analyticTopology : TopologicalSpace (Point R X) := |
| 254 | ⨆ U : X.left.affineOpens, |
| 255 | .coinduced (Subtype.val : OverOpen (X := X) U.1 → _) (chartTopology U.1) |
| 256 | |
| 257 | /-- A set of `R`-points is analytically open exactly when, in every affine chart, it is cut |
| 258 | out by an open set of ring homomorphisms `Γ(X.left, U) ⟶ ↧R`. -/ |
| 259 | lemma isOpen_analyticTopology_iff {W : Set (Point R X)} : |
| 260 | IsOpen W ↔ ∀ U : X.left.affineOpens, |
| 261 | ∃ O : Set (Γ(X.left, U.1) ⟶ ↧R), IsOpen O ∧ evaluationHom U.1 ⁻¹' O = Subtype.val ⁻¹' W := by |
| 262 | rw [isOpen_iSup_iff] |
| 263 | exact forall_congr' fun U ↦ isOpen_coinduced.trans isOpen_induced_iff |
| 264 | |
| 265 | variable [ContinuousMul R] [IsOpenUnits R] |
| 266 | |
| 267 | /-- A defining subbasic set is open in the analytic topology. -/ |
| 268 | lemma isOpen_overOpen_inter_preimage (U : X.left.Opens) (s : Γ(X.left, U)) |
| 269 | (V : Set R) (hV : IsOpen V) : |
| 270 | IsOpen (overOpen U ∩ evaluate U s ⁻¹' V : Set (Point R X)) := by |
| 271 | rw [isOpen_analyticTopology_iff] |
| 272 | rintro ⟨W, hW⟩ |
| 273 | refine ⟨⋃ (g : Γ(X.left, W)) (k : ℕ) (a : Γ(X.left, W)) (_ : X.left.basicOpen g ≤ U ⊓ W) |
| 274 | (_ : ∀ y : Point R X, y ∈ overOpen (X.left.basicOpen g) → |
| 275 | evaluate U s y = Ring.inverse (evaluate W g y ^ k) * evaluate W a y), |
| 276 | {φ : Γ(X.left, W) ⟶ ↧R | IsUnit (φ g)} ∩ |
| 277 | (fun φ : Γ(X.left, W) ⟶ ↧R ↦ Ring.inverse (φ g ^ k) * φ a) ⁻¹' V, |
| 278 | ?_, ?_⟩ |
| 279 | · refine isOpen_iUnion fun g ↦ isOpen_iUnion fun k ↦ isOpen_iUnion fun a ↦ |
| 280 | isOpen_iUnion fun _ ↦ isOpen_iUnion fun _ ↦ ?_ |
| 281 | have hg : Continuous fun φ : Γ(X.left, W) ⟶ ↧R ↦ φ g := |
| 282 | CommRingCat.HomTopology.continuous_apply (R := ↧R) g |
| 283 | have ha : Continuous fun φ : Γ(X.left, W) ⟶ ↧R ↦ φ a := |
| 284 | CommRingCat.HomTopology.continuous_apply (R := ↧R) a |
| 285 | have hinv : ContinuousOn (fun φ : Γ(X.left, W) ⟶ ↧R ↦ Ring.inverse (φ g ^ k)) |
| 286 | {φ : Γ(X.left, W) ⟶ ↧R | IsUnit (φ g)} := |
| 287 | OAI.Topology.Algebra.IsOpenUnits.continuousOn_ringInverse.comp (hg.pow k).continuousOn fun _ hφ ↦ hφ.pow k |
| 288 | exact (hinv.mul ha.continuousOn).isOpen_inter_preimage |
| 289 | ((OAI.Topology.Algebra.IsOpenUnits.isOpen_setOf_isUnit _).preimage hg) hV |
| 290 | · ext z |
| 291 | have key : ∀ t : Γ(X.left, W), evaluationHom W z t = evaluate W t z.1 := |
| 292 | fun t ↦ evaluationHom_apply W z t |
| 293 | simp only [Set.mem_preimage, Set.mem_iUnion, Set.mem_ofPred_eq, Set.mem_inter_iff, |
| 294 | exists_prop, key] |
| 295 | constructor |
| 296 | · rintro ⟨g, k, a, hgle, hdiv, hg0, hgV⟩ |
| 297 | have hzg : z.1 ∈ overOpen (X.left.basicOpen g) := |
| 298 | (mem_overOpen_basicOpen_iff_isUnit_evaluate g z.1 z.2).mpr hg0 |
| 299 | exact ⟨(hgle.trans inf_le_left) hzg, by rw [hdiv z.1 hzg]; exact hgV⟩ |
| 300 | · rintro ⟨hzU, hzV⟩ |
| 301 | obtain ⟨g, hgle, hzg⟩ := |
| 302 | hW.exists_basicOpen_le (⟨z.1.underlying, ⟨hzU, z.2⟩⟩ : (U ⊓ W : X.left.Opens)) z.2 |
| 303 | have hgU : X.left.basicOpen g ≤ U := hgle.trans inf_le_left |
| 304 | obtain ⟨k, a, hka⟩ := |
| 305 | exists_evaluate_basicOpen_eq_inverse_mul (X := X) hW g |
| 306 | (X.left.presheaf.map (homOfLE hgU).op s) |
| 307 | have hdiv : ∀ y : Point R X, y ∈ overOpen (X.left.basicOpen g) → |
| 308 | evaluate U s y = Ring.inverse (evaluate W g y ^ k) * evaluate W a y := fun y hy ↦ by |
| 309 | rw [evaluate_res hgU s y hy]; exact hka y hy |
| 310 | refine ⟨g, k, a, hgle, hdiv, ?_, ?_⟩ |
| 311 | · exact (mem_overOpen_basicOpen_iff_isUnit_evaluate g z.1 z.2).mp hzg |
| 312 | · rw [← hdiv z.1 hzg]; exact hzV |
| 313 | |
| 314 | /-- The analytic topology is generated by evaluation of local regular functions. |
| 315 | |
| 316 | This is the original description of the topology: it is generated by the sets on which a local |
| 317 | regular function takes values in a prescribed open subset of `R`. -/ |
| 318 | lemma analyticTopology_eq_generateFrom : |
| 319 | (analyticTopology : TopologicalSpace (Point R X)) = |
| 320 | .generateFrom analyticSubbasis := by |
| 321 | refine le_antisymm (le_generateFrom ?_) ?_ |
| 322 | · rintro W ⟨U, s, V, hV, rfl⟩ |
| 323 | exact isOpen_overOpen_inter_preimage U s V hV |
| 324 | · intro W hW |
| 325 | rw [isOpen_analyticTopology_iff] at hW |
| 326 | refine (@isOpen_iff_forall_mem_open _ |
| 327 | (.generateFrom (analyticSubbasis (X := X))) _).2 fun z hz ↦ ?_ |
| 328 | obtain ⟨U, hU, hzU, -⟩ := |
| 329 | exists_isAffineOpen_mem_and_subset (x := z.underlying) (U := ⊤) trivial |
| 330 | obtain ⟨O, hO, hWO⟩ := hW ⟨U, hU⟩ |
| 331 | obtain ⟨O', hO', rfl⟩ := |
| 332 | (CommRingCat.HomTopology.isEmbedding_hom ↧R Γ(X.left, U)).isInducing.isOpen_iff.mp hO |
| 333 | have hzO : ⇑(evaluationHom U ⟨z, hzU⟩).hom ∈ O' := by |
| 334 | have h : (⟨z, hzU⟩ : OverOpen (X := X) U) ∈ Subtype.val ⁻¹' W := hz |
| 335 | rwa [← hWO] at h |
| 336 | obtain ⟨I, u, hu, hIO⟩ := isOpen_pi_iff.mp hO' _ hzO |
| 337 | refine ⟨overOpen U ∩ ⋂ t ∈ (I : Set Γ(X.left, U)), (overOpen U ∩ evaluate U t ⁻¹' u t), |
| 338 | ?_, ?_, ?_⟩ |
| 339 | · rintro y ⟨hyU, hyu⟩ |
| 340 | have hy : ⇑(evaluationHom U ⟨y, hyU⟩).hom ∈ O' := |
| 341 | hIO fun t ht ↦ by |
| 342 | rw [evaluationHom_apply] |
| 343 | exact (Set.mem_iInter₂.1 hyu t ht).2 |
| 344 | have hmem : (⟨y, hyU⟩ : OverOpen (X := X) U) ∈ |
| 345 | evaluationHom U ⁻¹' ((fun f : Γ(X.left, U) ⟶ ↧R ↦ ⇑f.hom) ⁻¹' O') := hy |
| 346 | rwa [hWO] at hmem |
| 347 | · exact @IsOpen.inter _ (.generateFrom _) _ _ |
| 348 | (TopologicalSpace.isOpen_generateFrom_of_mem ⟨U, 0, Set.univ, isOpen_univ, by simp⟩) |
| 349 | (@Set.Finite.isOpen_biInter _ _ (.generateFrom _) _ _ I.finite_toSet fun t ht ↦ |
| 350 | TopologicalSpace.isOpen_generateFrom_of_mem ⟨U, t, u t, (hu t ht).1, rfl⟩) |
| 351 | · refine ⟨hzU, Set.mem_iInter₂.2 fun t ht ↦ ⟨hzU, ?_⟩⟩ |
| 352 | have h2 := (hu t ht).2 |
| 353 | rwa [evaluationHom_apply] at h2 |
| 354 | |
| 355 | /-- Continuity of a map into the `R`-points is tested on the defining subbasis. -/ |
| 356 | lemma continuous_iff_analyticSubbasis {Z : Type*} [TopologicalSpace Z] |
| 357 | {g : Z → Point R X} : |
| 358 | Continuous g ↔ ∀ W ∈ analyticSubbasis (X := X), IsOpen (g ⁻¹' W) := by |
| 359 | rw [analyticTopology_eq_generateFrom] |
| 360 | exact continuous_generateFrom_iff |
| 361 | |
| 362 | /-- Every morphism over `Spec R` induces a continuous map on `R`-points for the topology |
| 363 | generated by regular-function evaluations. -/ |
| 364 | lemma continuous_map {Y : Over (Spec ↧R)} (f : X ⟶ Y) : |
| 365 | @Continuous (Point R X) (Point R Y) |
| 366 | analyticTopology analyticTopology (Point.map f) := by |
| 367 | rw [continuous_iff_analyticSubbasis] |
| 368 | rintro W ⟨U, s, V, hV, rfl⟩ |
| 369 | rw [Set.preimage_inter, Set.preimage_preimage] |
| 370 | have hover : Point.map f ⁻¹' overOpen U = overOpen (f.left ⁻¹ᵁ U) := |
| 371 | Set.ext fun z ↦ mem_overOpen_map_iff f z U |
| 372 | have heval : (fun z ↦ evaluate U s (Point.map f z)) = |
| 373 | evaluate (f.left ⁻¹ᵁ U) (f.left.app U s) := |
| 374 | funext fun z ↦ evaluate_map f U s z |
| 375 | rw [hover, heval] |
| 376 | exact isOpen_overOpen_inter_preimage _ _ _ hV |
| 377 | |
| 378 | /-- Let `R` be a commutative local ring with continuous multiplication and open units, and let `f: |
| 379 | X → Y` be a morphism of schemes over `R`. This is the continuous map on `R`-points `z ↦ f ∘ z`, |
| 380 | for the topologies defined by local regular-function evaluations. -/ |
| 381 | noncomputable def continuousMap {Y : Over (Spec ↧R)} (f : X ⟶ Y) : |
| 382 | @ContinuousMap (Point R X) (Point R Y) |
| 383 | analyticTopology analyticTopology := |
| 384 | @ContinuousMap.mk _ _ analyticTopology analyticTopology (Point.map f) (continuous_map f) |
| 385 | |
| 386 | /-- Let `R` be a commutative local ring with continuous multiplication and open units, and let `e: |
| 387 | X ≅ Y` be an isomorphism of schemes over `R`. Composition with `e` and `e⁻¹` gives this |
| 388 | homeomorphism of `R`-point spaces with their regular-function evaluation topologies. -/ |
| 389 | noncomputable def isoMapHomeomorph {Y : Over (Spec ↧R)} (e : X ≅ Y) : |
| 390 | @Homeomorph (Point R X) (Point R Y) |
| 391 | analyticTopology analyticTopology := |
| 392 | letI : TopologicalSpace (Point R X) := analyticTopology |
| 393 | letI : TopologicalSpace (Point R Y) := analyticTopology |
| 394 | { toFun := Point.map e.hom |
| 395 | invFun := Point.map e.inv |
| 396 | left_inv z := by simp [Point.map, Category.assoc] |
| 397 | right_inv z := by simp [Point.map, Category.assoc] |
| 398 | continuous_toFun := continuous_map e.hom |
| 399 | continuous_invFun := continuous_map e.inv } |
| 400 | |
| 401 | @[simp] |
| 402 | lemma isoMapHomeomorph_apply {Y : Over (Spec ↧R)} (e : X ≅ Y) |
| 403 | (z : Point R X) : |
| 404 | isoMapHomeomorph e z = Point.map e.hom z := |
| 405 | rfl |
| 406 | |
| 407 | end Point |
| 408 | |
| 409 | /-- Let `X` be a scheme over `ℂ`. A complex point is a scheme morphism `Spec ℂ → X` over `Spec ℂ`, |
| 410 | equivalently a point with a compatible complex-valued homomorphism from its residue field. -/ |
| 411 | abbrev ComplexSchemePoint (X : Over (Spec ↧ℂ)) := Point ℂ X |
| 412 | |
| 413 | end OAI.AlgebraicGeometry.ComplexPoint.Basic |