Riemann hypothesis: the Lean proof, cleaned up together
The 2026 Lean proof of the Riemann hypothesis and GRH, machine-checked by others, not refereed, no word from Clay; cleaned up together: more readable, faster to build, the theorems unchanged

| 1 | module |
| 2 | |
| 3 | import TauCeti.AlgebraicGeometry.IdealSheaf.VanishingIdeal |
| 4 | import TauCeti.AlgebraicGeometry.Morphisms.Separated |
| 5 | public import Mathlib.AlgebraicGeometry.Noetherian |
| 6 | import Mathlib.AlgebraicGeometry.Morphisms.Immersion |
| 7 | import Mathlib.Analysis.CStarAlgebra.Classes |
| 8 | import Mathlib.RingTheory.Ideal.KrullsHeightTheorem |
| 9 | import Mathlib.RingTheory.Valuation.LocalSubring |
| 10 | public import Lib.General.Geometry.ProjectiveSpace |
| 11 | |
| 12 | /-! |
| 13 | # Dense families of complex points: reduced closures, separation of maps, and arcs |
| 14 | |
| 15 | Identities between functions or morphisms on a reduced scheme can be checked on a dense family of |
| 16 | complex points. `New.IsDenseFamily ξ` says that the points `ξ z : Spec ℂ ⟶ X` have dense image, and |
| 17 | `New.IsSeparatingFamily ξ` says that moreover `X` is reduced. Every family of complex points factors |
| 18 | through its reduced closure, on which it is separating. |
| 19 | |
| 20 | ## Main definitions and results |
| 21 | |
| 22 | * `New.exists_reduced_closure`: any family of complex points of `X` factors through a closed |
| 23 | subscheme in which it is `New.IsSeparatingFamily`, namely the reduced closure. |
| 24 | * `New.IsSeparatingFamily.pointFn_ext`, `New.IsSeparatingFamily.hom_ext`: regular functions, and |
| 25 | morphisms over `S` to a scheme separated over `S`, that agree at the points are equal. |
| 26 | * `New.IsSeparatingFamily.exists_map_of_coords`: if a linear system on `X` gives the points `e z` |
| 27 | the same coordinates as a projective embedding of `G` gives points `p z`, then it comes from a |
| 28 | morphism `X ⟶ G` that sends `e z` to `p z`. |
| 29 | * `New.exists_valuative_arc_of_isDenseFamily` joins any point of a locally noetherian scheme with |
| 30 | finitely many dense complex points to one of them by an arc `Spec V → S`, with `V` the ring of a |
| 31 | valuation of `ℂ` in `ℝ≥0`. |
| 32 | |
| 33 | Notions from other files: |
| 34 | * `New.PointFn X`: rules that attach an element of `A` to every ring-valued point `Spec A ⟶ X`. |
| 35 | It is regular on `U` (`IsRegularOn`) if, at points landing in `U`, it commutes with ring maps. |
| 36 | * `New.LineBundle X ι`: an open cover `U_i` of `X` with transition functions `g_ij`. |
| 37 | * `New.LineBundle.IsHomogeneousCoords`: `v` is a vector of homogeneous coordinates of the point `t`, |
| 38 | that is, `t` lands in `U_j` exactly when `v_j` is a unit, and then `g_jk(t) = v_k / v_j`. |
| 39 | * `New.LineBundle.IsLinearSystem`: the data of a map to projective space, the model being |
| 40 | `g_ij = s_j / s_i` on `U_i = {s_i ≠ 0}` for sections `s_i` without common zero. |
| 41 | * `New.LineBundle.IsProjEmbedding`: a linear system on a proper `X ⟶ S` for which points in one |
| 42 | chart with the same affine coordinates and the same image in `S` are equal. |
| 43 | -/ |
| 44 | |
| 45 | @[expose] public section |
| 46 | |
| 47 | /-! ## Reduced closures of families of complex points -/ |
| 48 | |
| 49 | section ReducedClosure |
| 50 | |
| 51 | open CategoryTheory AlgebraicGeometry Scheme IdealSheafData IsLocalRing |
| 52 | |
| 53 | /-- Let `i : Y ⟶ Z` be a closed immersion and `f : X ⟶ Z` with `X` reduced. If the preimage under |
| 54 | `f` of the image of `i` is dense in `X`, then `f` factors through `i`. -/ |
| 55 | @[stacks 0356 "'if' direction, with the preimage of the closed subscheme only assumed dense"] |
| 56 | lemma New.exists_lift_of_dense_preimage {X Y Z : Scheme} [IsReduced X] (i : Y ⟶ Z) |
| 57 | [IsClosedImmersion i] (f : X ⟶ Z) (h_dense : Dense (f ⁻¹' Set.range i)) : |
| 58 | ∃ g : X ⟶ Y, g ≫ i = f := by |
| 59 | -- The pull-back of the ideal of `i` has closed support containing a dense set, hence full |
| 60 | -- support, so it is zero as `X` is reduced. Thus `f` kills the ideal of `i`. |
| 61 | have h_supp : (i.ker.comap f).support = ⊤ := by |
| 62 | ext x |
| 63 | simp [i.support_ker, f.continuous.closure_preimage_subset _ (h_dense x)] |
| 64 | have h_ker : i.ker ≤ f.ker := by simpa using (map_gc f).le_u (support_eq_top_iff.1 h_supp).le |
| 65 | exact ⟨_, IsClosedImmersion.lift_fac i f h_ker⟩ |
| 66 | |
| 67 | /-- The images of the complex points `ξ z : Spec ℂ ⟶ X` form a dense subset of `X`. -/ |
| 68 | abbrev New.IsDenseFamily {Z : Type} {X : Scheme} (ξ : Z → (Spec (CommRingCat.of ℂ) ⟶ X)) : Prop := |
| 69 | DenseRange fun z : Z ↦ ξ z (closedPoint ℂ) |
| 70 | |
| 71 | /-- `X` is reduced and the complex points `ξ z` are dense in it, so that regular functions are |
| 72 | determined by their values at these points. -/ |
| 73 | def New.IsSeparatingFamily {Z : Type} {X : Scheme} (ξ : Z → (Spec (CommRingCat.of ℂ) ⟶ X)) : |
| 74 | Prop := AlgebraicGeometry.IsReduced X ∧ IsDenseFamily ξ |
| 75 | |
| 76 | /-- Reduced closure: complex points `ξ z : Spec ℂ ⟶ X` factor as `ξ z = i ∘ e z` through a closed |
| 77 | immersion `i : Y ⟶ X`, with `Y` reduced and the points `e z` dense in `Y` |
| 78 | (`IsSeparatingFamily e`). -/ |
| 79 | lemma New.exists_reduced_closure {Z : Type} {X : Scheme} |
| 80 | (ξ : Z → (Spec (CommRingCat.of ℂ) ⟶ X)) : |
| 81 | ∃ (Y : Scheme) (i : Y ⟶ X) (e : Z → (Spec (CommRingCat.of ℂ) ⟶ Y)), |
| 82 | IsClosedImmersion i ∧ (∀ z : Z, e z ≫ i = ξ z) ∧ IsSeparatingFamily e := by |
| 83 | -- Take the reduced closed subscheme on the closure of the points. |
| 84 | let I : IdealSheafData X := vanishingIdeal (.closure (.range fun z ↦ ξ z (closedPoint ℂ))) |
| 85 | -- Each point `ξ z` lands in the support, so it factors through the subscheme. |
| 86 | have h_lift (z : Z) : ∃ g : Spec (CommRingCat.of ℂ) ⟶ I.subscheme, g ≫ I.subschemeι = ξ z := |
| 87 | exists_lift_of_dense_preimage I.subschemeι (ξ z) |
| 88 | (dense_indiscrete ⟨_, ⟨ξ z (closedPoint ℂ), subset_closure ⟨z, rfl⟩⟩, rfl⟩) |
| 89 | choose e he using h_lift |
| 90 | have h_red : IsReduced I.subscheme := isReduced_subscheme_vanishingIdeal _ |
| 91 | -- The image of a point of the subscheme lies in the closure of the images of the `e z`. |
| 92 | have h_dense : IsDenseFamily e := by |
| 93 | have h_pt (z : Z) (x : Spec (CommRingCat.of ℂ)) : I.subschemeι (e z x) = ξ z x := by |
| 94 | rw [← he z, Scheme.Hom.comp_apply] |
| 95 | refine I.subschemeι.isEmbedding.dense_iff.2 fun y ↦ closure_mono ?_ y.property |
| 96 | exact Set.range_subset_iff.2 fun z ↦ ⟨e z (closedPoint ℂ), ⟨z, rfl⟩, h_pt z _⟩ |
| 97 | exact ⟨I.subscheme, I.subschemeι, e, inferInstance, he, h_red, h_dense⟩ |
| 98 | |
| 99 | end ReducedClosure |
| 100 | |
| 101 | /-! ## Functions and morphisms on reduced schemes determined by dense points -/ |
| 102 | |
| 103 | namespace New |
| 104 | |
| 105 | open CategoryTheory AlgebraicGeometry Limits Set Over LineBundle PointFn |
| 106 | |
| 107 | /-- A family of complex points is dense if each point of a dense family is a |
| 108 | specialization of one of its points. -/ |
| 109 | lemma IsDenseFamily.of_specializes {Z W : Type} {X : Scheme} |
| 110 | {ξ : Z → (Spec (CommRingCat.of ℂ) ⟶ X)} (hξ : IsDenseFamily ξ) |
| 111 | {η : W → (Spec (CommRingCat.of ℂ) ⟶ X)} |
| 112 | (h : ∀ z, ∃ w, η w (IsLocalRing.closedPoint ℂ) ⤳ ξ z (IsLocalRing.closedPoint ℂ)) : |
| 113 | IsDenseFamily η := by |
| 114 | intro x |
| 115 | refine hξ.induction_on x isClosed_closure fun z ↦ ?_ |
| 116 | obtain ⟨w, hw⟩ := h z |
| 117 | exact hw.mem_closed isClosed_closure (subset_closure (mem_range_self w)) |
| 118 | |
| 119 | /-- A universally closed morphism `f : Y ⟶ X` is surjective if every point `ξ z` of a dense family |
| 120 | of complex points of `X` lifts to a complex point `y z` of `Y`. -/ |
| 121 | lemma IsDenseFamily.surjective {Z : Type} {X Y : Scheme} |
| 122 | {ξ : Z → (Spec (CommRingCat.of ℂ) ⟶ X)} (hξ : IsDenseFamily ξ) (f : Y ⟶ X) [UniversallyClosed f] |
| 123 | (y : Z → (Spec (CommRingCat.of ℂ) ⟶ Y)) (h_lift : ∀ z : Z, y z ≫ f = ξ z) : |
| 124 | Surjective f := by |
| 125 | -- The range of `f` is closed and contains the dense set of the points `ξ z`. |
| 126 | have h_mem (z : Z) (x : Spec (CommRingCat.of ℂ)) : ξ z x ∈ range f := |
| 127 | ⟨y z x, by rw [← h_lift z, Scheme.Hom.comp_apply]⟩ |
| 128 | exact ⟨fun x ↦ hξ.induction_on x f.isClosedMap.isClosed_range fun z ↦ h_mem z _⟩ |
| 129 | |
| 130 | namespace IsSeparatingFamily |
| 131 | |
| 132 | /-- Let `X` be reduced and the complex points `ξ z` dense. Two functions on ring-valued points that |
| 133 | are regular on an open `U` (compatible with ring maps at points of `U`) and agree at all `ξ z` |
| 134 | landing in `U` agree at every ring-valued point `t` landing in `U`. -/ |
| 135 | lemma pointFn_ext {Z : Type} {X : Scheme} {ξ : Z → (Spec (CommRingCat.of ℂ) ⟶ X)} |
| 136 | (hξ : IsSeparatingFamily ξ) {U : X.Opens} {f g : PointFn X} (hf : IsRegularOn f U) |
| 137 | (hg : IsRegularOn g U) |
| 138 | (h_agree : ∀ z : Z, LandsIn (ξ z) U → f (CommRingCat.of ℂ) (ξ z) = g (CommRingCat.of ℂ) (ξ z)) |
| 139 | (A : CommRingCat) (t : Spec A ⟶ X) (ht : LandsIn t U) : |
| 140 | f A t = g A t := by |
| 141 | obtain ⟨h_red, h_dense⟩ := hξ |
| 142 | -- On `U` both `f` and `g` are given by sections of the structure sheaf. |
| 143 | obtain ⟨s, hs⟩ := hf.exists_ofSection |
| 144 | obtain ⟨s', hs'⟩ := hg.exists_ofSection |
| 145 | suffices h_eq : s - s' = 0 by rw [← hs A t ht, ← hs' A t ht, sub_eq_zero.1 h_eq] |
| 146 | by_contra hs_ne |
| 147 | -- On a reduced scheme a nonzero section is invertible on a nonempty open set. |
| 148 | have h_nonempty : (X.basicOpen (s - s') : Set X).Nonempty := by |
| 149 | simpa [← ne_empty_iff_nonempty] using hs_ne |
| 150 | -- By density some `ξ z` lies in it: there `s - s'` is a unit, but `f` and `g` agree. |
| 151 | obtain ⟨z, hz⟩ := h_dense.exists_mem_open (X.basicOpen (s - s')).isOpen h_nonempty |
| 152 | have hz_U : LandsIn (ξ z) U := (landsIn_iff_mem.2 hz).mono (X.basicOpen_le _) |
| 153 | exact ((landsIn_basicOpen hz_U _).1 (landsIn_iff_mem.2 hz)).ne_zero |
| 154 | (by simp [hs _ _ hz_U, hs' _ _ hz_U, h_agree z hz_U]) |
| 155 | |
| 156 | /-- Let `e z` be complex points of the `S`-scheme `X` over the points `η z` of `S`, with `X` reduced |
| 157 | and the `e z` dense. Two morphisms over `S` from `X` to a separated `G` that agree at every `e z` |
| 158 | are equal. -/ |
| 159 | lemma hom_ext {Z : Type} {S : Scheme} {η : Z → (Spec (CommRingCat.of ℂ) ⟶ S)} {X G : Over S} |
| 160 | {e : ∀ z : Z, Over.mk (η z) ⟶ X} (he : IsSeparatingFamily fun z : Z ↦ (e z).left) |
| 161 | [IsSeparated G.hom] {f g : X ⟶ G} (h_agree : ∀ z : Z, e z ≫ f = e z ≫ g) : |
| 162 | f = g := by |
| 163 | obtain ⟨h_red, h_dense⟩ := he |
| 164 | -- The ranges contain the dense family of images of the closed point of `Spec ℂ`. |
| 165 | have h_ranges : Dense (⋃ z, range (e z).left) := by |
| 166 | refine Dense.mono (range_subset_iff.2 ?_) h_dense |
| 167 | intro z |
| 168 | exact mem_iUnion.2 ⟨z, mem_range_self (IsLocalRing.closedPoint ℂ)⟩ |
| 169 | exact OverMorphism.ext (ext_of_dense_iUnion_range_of_isSeparated G.hom (f.w.trans g.w.symm) |
| 170 | (fun z ↦ (e z).left) h_ranges (fun z ↦ congrArg Over.Hom.left (h_agree z))) |
| 171 | |
| 172 | /-- Let `e z`, `p z` be complex points of the `S`-schemes `X`, `G` over the same point `η z`, with |
| 173 | `X` reduced and the `e z` dense. If a linear system `W` on `X` and a projective embedding `M` of |
| 174 | `G`, both with the finite index set `ι`, give `e z` and `p z` the same homogeneous coordinates |
| 175 | `v z`, then some morphism `d : X ⟶ G` over `S` sends each `e z` to `p z` and pulls the charts and |
| 176 | transition functions of `M` back to those of `W`. -/ |
| 177 | lemma exists_map_of_coords {Z ι : Type} {S : Scheme} {η : Z → (Spec (CommRingCat.of ℂ) ⟶ S)} |
| 178 | [Finite ι] {v : Z → ι → ℂ} {X G : Over S} {e : ∀ z : Z, Over.mk (η z) ⟶ X} |
| 179 | (he : IsSeparatingFamily fun z : Z ↦ (e z).left) {p : ∀ z : Z, Over.mk (η z) ⟶ G} |
| 180 | {W : LineBundle X.left ι} {M : LineBundle G.left ι} |
| 181 | (hW : IsLinearSystem W) (hM : IsProjEmbedding M G.hom) |
| 182 | (he_coords : ∀ z : Z, W.IsHomogeneousCoords (e z).left (v z)) |
| 183 | (hp_coords : ∀ z : Z, M.IsHomogeneousCoords (p z).left (v z)) : |
| 184 | ∃ d : X ⟶ G, (∀ z : Z, e z ≫ d = p z) ∧ M.pull d.left = W := by |
| 185 | -- `W` is the pull-back of the hyperplane bundle along a map `f : X ⟶ ℙ × S` over `S`, and `M` |
| 186 | -- along a closed immersion `j : G ⟶ ℙ × S` over `S`. |
| 187 | obtain ⟨f, hf_over, rfl⟩ := hW.exists_hom_projSpace X.hom |
| 188 | obtain ⟨j, hj_closed, hj_over, rfl⟩ := hM.exists_isClosedImmersion |
| 189 | obtain ⟨h_red, h_dense⟩ := he |
| 190 | -- Equal homogeneous coordinates give equal points of projective space. |
| 191 | have h_pt (z : Z) : (p z).left ≫ j = (e z).left ≫ f := |
| 192 | isProjEmbedding_projSpace.eq_of_isHomogeneousCoords (by simp [hf_over, hj_over]) (hp_coords z) |
| 193 | (he_coords z) (LineBundle.exists_landsIn _ _) |
| 194 | -- So `f` sends a dense set into the image of `j`, and factors through `j`. |
| 195 | have h_mem (z : Z) (x : (Over.mk (η z)).left) : f ((e z).left x) ∈ range j := |
| 196 | ⟨(p z).left x, by rw [← Scheme.Hom.comp_apply, h_pt z, Scheme.Hom.comp_apply]⟩ |
| 197 | have h_dense_pre : Dense (f ⁻¹' range j) := |
| 198 | h_dense.mono (range_subset_iff.2 fun z ↦ h_mem z _) |
| 199 | obtain ⟨d, rfl⟩ := exists_lift_of_dense_preimage j f h_dense_pre |
| 200 | exact ⟨homMk d (by rw [← hf_over, ← hj_over, Category.assoc]), |
| 201 | fun z ↦ OverMorphism.ext (by simp [← cancel_mono j, h_pt z]), by simp [pull_comp]⟩ |
| 202 | |
| 203 | end IsSeparatingFamily |
| 204 | |
| 205 | end New |
| 206 | |
| 207 | /-! ## Arcs from dense complex points to arbitrary points -/ |
| 208 | |
| 209 | section ArcExistence |
| 210 | |
| 211 | open CategoryTheory AlgebraicGeometry Spec Scheme Set Ideal IsLocalRing MvPolynomial |
| 212 | IsLocalization.AtPrime CommRingCat ValuativeRel Valuation IsIntegrallyClosed LocalSubring |
| 213 | |
| 214 | /-- The extension of a prime ideal of `A` to a polynomial ring over `A` is prime. -/ |
| 215 | lemma New.isPrime_map_C_mvPolynomial {A σ : Type*} [CommRing A] (p : Ideal A) [p.IsPrime] : |
| 216 | (p.map (C : A →+* MvPolynomial σ A)).IsPrime := by |
| 217 | -- It is the kernel of the map to the polynomial ring over the domain `A ⧸ p`. |
| 218 | rw [← p.mk_ker, ← ker_map] |
| 219 | exact RingHom.ker_isPrime _ |
| 220 | |
| 221 | /-- A prime of a noetherian ring that is minimal over one element extends to a prime of height at |
| 222 | most one in a polynomial ring in finitely many variables. -/ |
| 223 | lemma New.height_map_C_le_one {A σ : Type*} [CommRing A] [IsNoetherianRing A] [Finite σ] {x : A} |
| 224 | {p : Ideal A} (hp : p ∈ (span {x} : Ideal A).minimalPrimes) : |
| 225 | (p.map (C : A →+* MvPolynomial σ A)).height ≤ 1 := by |
| 226 | obtain ⟨⟨hp_prime, hxp⟩, hp_min⟩ := hp |
| 227 | have : Nontrivial A := (Ideal.Quotient.mk p).domain_nontrivial |
| 228 | -- The extension is minimal over `x`, so Krull's principal ideal theorem applies. |
| 229 | have h_min : p.map (C : A →+* MvPolynomial σ A) ∈ ((span {x}).map C).minimalPrimes := |
| 230 | ⟨⟨isPrime_map_C_mvPolynomial p, map_mono hxp⟩, fun J ⟨hJ_prime, hxJ⟩ hJp ↦ |
| 231 | map_le_of_le_comap (hp_min ⟨hJ_prime.comap C, le_comap_of_map_le hxJ⟩ |
| 232 | ((comap_mono hJp).trans_eq p.comap_map_eq_self_of_faithfullyFlat))⟩ |
| 233 | exact height_le_one_of_isPrincipal_of_mem_minimalPrimes _ _ h_min |
| 234 | |
| 235 | /-- Let `p` be a prime of a noetherian domain `A` that is minimal over one element. A nonzero prime |
| 236 | `J` of a polynomial ring over `A` that lies in the extension of `p` equals that extension. -/ |
| 237 | lemma New.eq_map_C_of_ne_bot_of_le_map_C {A σ : Type*} [CommRing A] [IsDomain A] |
| 238 | [IsNoetherianRing A] {x : A} {p : Ideal A} (hp : p ∈ (span {x} : Ideal A).minimalPrimes) |
| 239 | {J : Ideal (MvPolynomial σ A)} [J.IsPrime] (hJ_ne : J ≠ ⊥) (hJ_le : J ≤ p.map C) : |
| 240 | J = p.map C := by |
| 241 | -- In the finitely many variables of a nonzero `w ∈ J`, the prime `J` cuts out a nonzero prime |
| 242 | -- `J'` inside the extension of `p`, which has height at most one; so the two are equal. |
| 243 | obtain ⟨w, hw_mem, hw_ne⟩ := J.ne_bot_iff.1 hJ_ne |
| 244 | obtain ⟨n, u, hu, w, rfl⟩ := w.exists_fin_rename |
| 245 | let J' : Ideal (MvPolynomial (Fin n) A) := J.comap (rename u) |
| 246 | have h_le : J' ≤ p.map C := by |
| 247 | refine fun a ha ↦ (mem_map_C_iff (I := p) (f := a)).2 fun m ↦ ?_ |
| 248 | rw [← coeff_rename_mapDomain u hu] |
| 249 | exact (mem_map_C_iff (I := p) (f := rename u a)).1 (hJ_le (mem_comap.1 ha)) _ |
| 250 | have h_ne_bot : J' ≠ ⊥ := J'.ne_bot_iff.2 ⟨w, mem_comap.2 hw_mem, ne_zero_of_map hw_ne⟩ |
| 251 | have h_eq : J' = p.map C := J'.eq_of_le_of_height_le h_le |
| 252 | ((height_map_C_le_one hp).trans (by simpa [Order.one_le_iff_ne_zero] using h_ne_bot)) |
| 253 | refine hJ_le.antisymm (map_le_of_le_comap fun a ha ↦ ?_) |
| 254 | simpa [J'] using h_eq.ge (mem_map_of_mem C ha) |
| 255 | |
| 256 | /-- Let `V` be a valuation subring of a field in which every nonzero prime ideal contains the |
| 257 | maximal ideal. Then the valuation of `V` is archimedean: every value is bounded by a |
| 258 | power of any value above one. -/ |
| 259 | lemma New.exists_valuation_le_pow_of_maximalIdeal_le {K : Type*} [Field K] (V : ValuationSubring K) |
| 260 | (hV : ∀ J : Ideal V, J.IsPrime → J ≠ ⊥ → maximalIdeal V ≤ J) (z : K) |
| 261 | {y : K} (hy : 1 < V.valuation y) : |
| 262 | ∃ n : ℕ, V.valuation z ≤ V.valuation y ^ n := by |
| 263 | -- The element `y⁻¹` lies in the maximal ideal, so a power of it lies in the nonzero ideal `I` of |
| 264 | -- denominators of `z`. |
| 265 | let I : Ideal V := (1 : Submodule V K).comap (LinearMap.toSpanSingleton V K z) |
| 266 | have h_mem_iff (a : V) : a ∈ I ↔ ∃ w : V, (w : K) = a * z := by simp [I, Algebra.smul_def] |
| 267 | obtain ⟨⟨c, hc⟩, w₀, hw₀⟩ := IsLocalization.exists_integer_multiple (nonZeroDivisors V) z |
| 268 | have hI_ne : I ≠ ⊥ := I.ne_bot_iff.2 |
| 269 | ⟨c, (h_mem_iff c).2 ⟨w₀, by simpa [Algebra.smul_def] using hw₀⟩, nonZeroDivisors.ne_zero hc⟩ |
| 270 | have h_rad : maximalIdeal V ≤ I.radical := by |
| 271 | rw [radical_eq_sInf] |
| 272 | exact le_sInf fun J ⟨hIJ, hJ⟩ ↦ hV J hJ (ne_bot_of_le_ne_bot hI_ne hIJ) |
| 273 | obtain ⟨hy_mem, hy_max⟩ := V.mem_nonunits_iff_exists_mem_maximalIdeal.1 |
| 274 | (show y⁻¹ ∈ V.nonunits by simpa [V.mem_nonunits_iff] using inv_lt_one_of_one_lt₀ hy) |
| 275 | obtain ⟨n, hn⟩ := mem_radical_iff.1 (h_rad hy_max) |
| 276 | -- So `w = y⁻¹ ^ n * z` lies in `V`, that is, `y ^ n` divides `z` over `V`. |
| 277 | obtain ⟨w, hw⟩ : ∃ w : V, (w : K) = y⁻¹ ^ n * z := by simpa using (h_mem_iff _).1 hn |
| 278 | have hy_ne : y ≠ 0 := V.valuation.pos_iff.1 (zero_lt_one.trans hy) |
| 279 | have h_dvd : (w : K) * y ^ n = z := by simp [hw, field] |
| 280 | exact ⟨n, ((V.valuation_le_iff z (y ^ n)).2 ⟨w, h_dvd⟩).trans_eq (map_pow _ y n)⟩ |
| 281 | |
| 282 | /-- A valuation subring `V` of a field, in which every prime ideal with a nonzero element `c` |
| 283 | contains the maximal ideal, is the ring of a valuation with values in `ℝ≥0`. -/ |
| 284 | lemma New.exists_nnreal_valuation {K : Type*} [Field K] (V : ValuationSubring K) |
| 285 | (hV : ∀ J : Ideal V, J.IsPrime → ∀ c ∈ nonZeroDivisors V, c ∈ J → maximalIdeal V ≤ J) : |
| 286 | ∃ v : Valuation K NNReal, v.valuationSubring = V := by |
| 287 | -- The canonical valuation of the valuative relation of `V` is equivalent to that of `V`. |
| 288 | let : ValuativeRel K := ofValuation V.valuation |
| 289 | have : V.valuation.Compatible := .ofValuation V.valuation |
| 290 | have h : (valuation K).IsEquiv V.valuation := isEquiv _ _ |
| 291 | -- The value group is archimedean, hence has rank at most one and embeds into `ℝ≥0` by some `g`. |
| 292 | obtain ⟨g, hg⟩ : IsRankLeOne K := isRankLeOne_iff_mulArchimedean.2 |
| 293 | ⟨valuation_surjective.forall₂.2 fun z y hy ↦ |
| 294 | (exists_valuation_le_pow_of_maximalIdeal_le V (fun J hJ hne ↦ (J.ne_bot_iff.1 hne).elim |
| 295 | fun c ⟨hc, hc0⟩ ↦ hV J hJ c (mem_nonZeroDivisors_of_ne_zero hc0) hc) z |
| 296 | (h.one_lt_iff_one_lt.1 hy)).imp fun n hn ↦ by rwa [← map_pow, h.le_iff_le, map_pow]⟩ |
| 297 | exact ⟨(valuation K).map ⟨g, hg.monotone⟩, V.valuationSubring_valuation ▸ |
| 298 | (isEquiv_iff_valuationSubring _ _).1 ((isEquiv_map_self_of_strictMono _ hg.injective).trans h)⟩ |
| 299 | |
| 300 | /-- Blowing up inside a valuation ring. Let `O ⟶ W` be a local map from a noetherian local ring to |
| 301 | a valuation ring. Then `W` has a noetherian `O`-subalgebra `A` with a prime `p` that is minimal |
| 302 | over one element and lies over the maximal ideal of `O`. -/ |
| 303 | lemma New.exists_subalgebra_minimalPrimes_span_singleton (O W : Type*) [CommRing O] [IsLocalRing O] |
| 304 | [IsNoetherianRing O] [CommRing W] [IsDomain W] [ValuationRing W] [Algebra O W] |
| 305 | [IsLocalHom (algebraMap O W)] : |
| 306 | ∃ (A : Subalgebra O W) (x : A) (p : Ideal A), IsNoetherianRing A ∧ |
| 307 | p ∈ (span {x} : Ideal A).minimalPrimes ∧ maximalIdeal O ≤ p.comap (algebraMap O A) := by |
| 308 | obtain ⟨r, hr⟩ := (maximalIdeal O).fg_of_isNoetherianRing |
| 309 | -- Divisibility in `W` is total, so one element `x` of the maximal ideal divides all its |
| 310 | -- generators; `A` is generated by the quotients `k y = y / x`, so the maximal ideal becomes |
| 311 | -- principal in `A`. |
| 312 | have h_total : Std.Total fun a b : W ↦ b ∣ a := ⟨fun a b ↦ ValuationRing.dvd_total b a⟩ |
| 313 | obtain ⟨⟨x, hx_mem⟩, hx⟩ : ∃ x : (maximalIdeal O : Set O), |
| 314 | ∀ y : r, ∃ c : W, algebraMap O W y = algebraMap O W x * c := |
| 315 | (h_total.directed fun y : (maximalIdeal O : Set O) ↦ algebraMap O W y).finite_le |
| 316 | (inclusion (subset_span.trans hr.le)) |
| 317 | choose k hk using hx |
| 318 | let A : Subalgebra O W := (aeval (R := O) k).range |
| 319 | have hx_nonunit : ¬IsUnit (algebraMap O A x) := fun h_unit ↦ |
| 320 | notMem_maximalIdeal.2 (isUnit_of_map_unit (algebraMap O W) x (h_unit.map A.val)) hx_mem |
| 321 | obtain ⟨p, hp⟩ := nonempty_minimalPrimes (span_singleton_ne_top hx_nonunit) |
| 322 | have h_dvd (y : r) : algebraMap O A x ∣ algebraMap O A y := |
| 323 | ⟨⟨k y, X y, aeval_X k y⟩, Subtype.ext (hk y)⟩ |
| 324 | -- `A` is noetherian as the image of a polynomial ring in finitely many variables over `O`. |
| 325 | refine ⟨A, algebraMap O A x, p, inferInstance, hp, ?_⟩ |
| 326 | exact hr.ge.trans <| span_le.2 fun y hy ↦ |
| 327 | Ideal.IsMinimalPrime.le hp (mem_span_singleton.2 (h_dvd ⟨y, hy⟩)) |
| 328 | |
| 329 | /-- Let `e` identify a ring `R` with a subring of a field `K`. Every prime `P` of `R` is the centre |
| 330 | of a valuation subring `U` of `K` that contains `R`. -/ |
| 331 | @[stacks 00IA "for a prime of a subring"] |
| 332 | lemma New.exists_valuationSubring_comap_maximalIdeal_eq {R K : Type*} [CommRing R] [Field K] |
| 333 | {B : Subring K} (e : R ≃+* B) (P : Ideal R) [P.IsPrime] : |
| 334 | ∃ (U : ValuationSubring K) (f : R →+* U), |
| 335 | (∀ a : R, (f a : K) = e a) ∧ (maximalIdeal U).comap f = P := by |
| 336 | -- `U` dominates the localisation `L` of `B` at the image of `P`. |
| 337 | let L : LocalSubring K := LocalSubring.ofPrime B (P.map e) |
| 338 | obtain ⟨U, hU, hU_local⟩ := L.exists_le_valuationSubring |
| 339 | let f : R →+* U := (Subring.inclusion hU).comp ((algebraMap B L.toSubring).comp e.toRingHom) |
| 340 | -- The maximal ideal of `U` meets `B` in the image of `P`, as `U` dominates `L`. |
| 341 | refine ⟨U, f, fun _ ↦ rfl, ext fun a ↦ ?_⟩ |
| 342 | calc f a ∈ maximalIdeal U |
| 343 | ↔ algebraMap B L.toSubring (e a) ∈ maximalIdeal L.toSubring := |
| 344 | map_mem_nonunits_iff (Subring.inclusion hU) _ |
| 345 | _ ↔ e a ∈ P.map e := to_map_mem_maximal_iff _ _ (e a) |
| 346 | _ ↔ a ∈ P := apply_mem_of_equiv_iff |
| 347 | |
| 348 | /-- Let `A` be a noetherian subring of a field `K` and `p` a prime of `A` that is minimal over one |
| 349 | element. Then `A` lies in the ring of a valuation `v` of `K` with values in `ℝ≥0`, in such a way |
| 350 | that `p` lies in the maximal ideal. -/ |
| 351 | lemma New.exists_nnreal_valuation_le_comap_maximalIdeal {A : Type*} (K : Type*) [CommRing A] |
| 352 | [IsDomain A] [IsNoetherianRing A] [Field K] [Algebra A K] [FaithfulSMul A K] {x : A} |
| 353 | {p : Ideal A} (hp : p ∈ (span {x} : Ideal A).minimalPrimes) : |
| 354 | ∃ (v : Valuation K NNReal) (ψ : A →+* v.valuationSubring), |
| 355 | (∀ a : A, (ψ a : K) = algebraMap A K a) ∧ p ≤ (maximalIdeal v.valuationSubring).comap ψ := by |
| 356 | -- Adjoin a transcendence basis `t`, take a valuation ring `U` with centre the extension of `p`, |
| 357 | -- and localise at a prime `q` minimal over `p`. The result `V` has rank at most one. |
| 358 | have hp_prime : p.IsPrime := Ideal.IsMinimalPrime.isPrime hp |
| 359 | obtain ⟨t, ht⟩ := exists_isTranscendenceBasis A K |
| 360 | let P : Ideal (MvPolynomial t A) := p.map C |
| 361 | have hP_prime : P.IsPrime := isPrime_map_C_mvPolynomial p |
| 362 | let e : MvPolynomial t A ≃+* (Algebra.adjoin A (range (Subtype.val : t → K))).toSubring := |
| 363 | ht.1.aevalEquiv.toRingEquiv |
| 364 | obtain ⟨U, f, hf, h_centre⟩ := exists_valuationSubring_comap_maximalIdeal_eq e P |
| 365 | obtain ⟨q, ⟨⟨hq_prime, hPq⟩, hq_min⟩, hq_le⟩ := |
| 366 | exists_minimalPrimes_le (map_le_of_le_comap h_centre.ge) |
| 367 | let V : ValuationSubring K := U.ofPrime q |
| 368 | let g : MvPolynomial t A →+* V := (algebraMap U V).comp f |
| 369 | have hg (a : MvPolynomial t A) : (g a : K) = e a := hf a |
| 370 | let : Algebra (MvPolynomial t A) V := g.toAlgebra |
| 371 | -- Every prime of `V` with a nonzero element contains the maximal ideal `q V`. |
| 372 | have h_rank (J : Ideal V) (hJ : J.IsPrime) (c : V) (hc : c ∈ nonZeroDivisors V) |
| 373 | (hcJ : c ∈ J) : maximalIdeal V ≤ J := by |
| 374 | rw [← map_eq_maximalIdeal q V, map_le_iff_le_comap] |
| 375 | -- The ideals of the valuation ring `U` are totally ordered, so we may assume `J ∩ U ≤ q`. |
| 376 | obtain hqJ | hJq : q ≤ J.comap (algebraMap U V) ∨ J.comap (algebraMap U V) ≤ q := |
| 377 | (ValuationRing.le_total_ideal U).total _ _ |
| 378 | · exact hqJ |
| 379 | -- As `K` is algebraic over the polynomial ring, `c` divides a polynomial `w ≠ 0`. |
| 380 | have hc_alg : IsAlgebraic (MvPolynomial t A) c := |
| 381 | (ht.isAlgebraic.isAlgebraic (c : K)).of_ringHom_of_comp_eq _ _ e.surjective |
| 382 | V.subtype_injective (RingHom.ext fun a ↦ (hg a).symm) |
| 383 | obtain ⟨w, hw_ne, hcw⟩ : ∃ w : MvPolynomial t A, w ≠ 0 ∧ c ∣ g w := |
| 384 | hc_alg.exists_ne_zero_dvd hc |
| 385 | have h_comap : J.comap g = (J.comap (algebraMap U V)).comap f := (comap_comap _ _).symm |
| 386 | have hJP : J.comap g ≤ P := |
| 387 | h_comap.trans_le ((comap_mono (hJq.trans hq_le)).trans_eq h_centre) |
| 388 | have hJ_eq : J.comap g = P := eq_map_C_of_ne_bot_of_le_map_C hp |
| 389 | ((J.comap g).ne_bot_iff.2 ⟨w, mem_of_dvd J hcw hcJ, hw_ne⟩) hJP |
| 390 | -- So `J ∩ U` contains the extension of `p`, and `q` is minimal among such primes. |
| 391 | have hPJ : P.map f ≤ J.comap (algebraMap U V) := |
| 392 | map_le_iff_le_comap.2 (hJ_eq.ge.trans_eq h_comap) |
| 393 | exact hq_min ⟨hJ.comap _, hPJ⟩ hJq |
| 394 | obtain ⟨v, hv⟩ := exists_nnreal_valuation V h_rank |
| 395 | exact ⟨v, hv ▸ ⟨g.comp C, fun a ↦ (hg (C a)).trans (aeval_C _ a), |
| 396 | fun a ha ↦ (under_maximalIdeal V q).ge (hPq (mem_map_of_mem f (mem_map_of_mem C ha)))⟩⟩ |
| 397 | |
| 398 | /-- If the image of the closed point of `Spec K` under `t` specializes to `s`, then `t` factors |
| 399 | through the spectrum of the stalk at `s` via the corresponding map on stalks. -/ |
| 400 | lemma New.comp_fromSpecStalk_of_specializes {S : Scheme} {K : CommRingCat} [IsLocalRing K] |
| 401 | (t : Spec K ⟶ S) {s : S} (h : t (closedPoint K) ⤳ s) : |
| 402 | Spec.map (S.presheaf.stalkSpecializes h ≫ stalkClosedPointTo t) ≫ S.fromSpecStalk s = t := by |
| 403 | rw [Spec.map_comp, Category.assoc, SpecMap_stalkSpecializes_fromSpecStalk] |
| 404 | exact Spec_stalkClosedPointTo_fromSpecStalk t |
| 405 | |
| 406 | /-- Let `S` be a locally noetherian scheme with finitely many complex points `η i` whose images are |
| 407 | dense. For every point `s` of `S` there are an index `i`, a valuation `v` of `ℂ` with values in |
| 408 | `ℝ≥0` and a morphism `a` from the spectrum of its valuation ring `V` to `S` that restricts to `η i` |
| 409 | along `Spec ℂ ⟶ Spec V` (the map `specMap` of the inclusion) and sends the closed point to `s`. -/ |
| 410 | lemma New.exists_valuative_arc_of_isDenseFamily {S : Scheme} {ι : Type} [IsLocallyNoetherian S] |
| 411 | [Finite ι] (η : ι → (Spec (of ℂ) ⟶ S)) (hη : IsDenseFamily η) (s : S) : |
| 412 | ∃ (i : ι) (v : Valuation ℂ NNReal) (a : Spec (of v.valuationSubring) ⟶ S), |
| 413 | specMap v.valuationSubring.subtype ≫ a = η i ∧ |
| 414 | a (closedPoint (of v.valuationSubring)) = s := by |
| 415 | -- Some `η i` specialises to `s`, which gives a map `θ` from the local ring `O` at `s` to `ℂ`. |
| 416 | -- By blowing up at `s`, find a noetherian subring `A` of `ℂ` containing the image of `O`, with a |
| 417 | -- prime `p` over `s` minimal over one element; take a real valuation `v` centred above `p`. |
| 418 | obtain ⟨i, h_spec⟩ : ∃ i : ι, η i (closedPoint ℂ) ⤳ s := by |
| 419 | simpa [← iUnion_singleton_eq_range, ← specializes_iff_mem_closure] using hη s |
| 420 | let O : CommRingCat := S.presheaf.stalk s |
| 421 | let θ : O ⟶ of ℂ := S.presheaf.stalkSpecializes h_spec ≫ stalkClosedPointTo (η i) |
| 422 | obtain ⟨W, hW, hW_local⟩ := exists_factor_valuationRing θ.hom |
| 423 | let : Algebra O W := (θ.hom.codRestrict W hW).toAlgebra |
| 424 | have : IsLocalHom (algebraMap O W) := hW_local |
| 425 | obtain ⟨A, x, p, hA, hp, h_max_le⟩ := exists_subalgebra_minimalPrimes_span_singleton O W |
| 426 | obtain ⟨v, ψ, hψ, hp_le⟩ := exists_nnreal_valuation_le_comap_maximalIdeal ℂ hp |
| 427 | -- The arc is `Spec V → Spec O → S`, with `V` the ring of `v`. |
| 428 | let φ : O →+* v.valuationSubring := ψ.comp (algebraMap O A) |
| 429 | have hφ : ofHom φ ≫ ofHom v.valuationSubring.subtype = θ := |
| 430 | CommRingCat.hom_ext (RingHom.ext fun a ↦ hψ (algebraMap O A a)) |
| 431 | refine ⟨i, v, Spec.map (ofHom φ) ≫ S.fromSpecStalk s, ?_, ?_⟩ |
| 432 | · rw [← map_comp_assoc, hφ] |
| 433 | exact New.comp_fromSpecStalk_of_specializes (η i) h_spec |
| 434 | · -- `φ` is local, so the closed point goes to the closed point. |
| 435 | have h_local : maximalIdeal O ≤ (maximalIdeal v.valuationSubring).comap φ := |
| 436 | fun y hy ↦ hp_le (h_max_le hy) |
| 437 | -- in `local_hom_tfae`, item 4 (`maximalIdeal ≤ comap`) implies item 1 (`IsLocalHom`) |
| 438 | have : IsLocalHom φ := ((local_hom_tfae φ).out 4 1).1 h_local |
| 439 | exact (congrArg (S.fromSpecStalk s) Spec_closedPoint).trans fromSpecStalk_closedPoint |
| 440 | |
| 441 | end ArcExistence |