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 | public import Mathlib.Algebra.Group.Ideal |
| 4 | public import Mathlib.RingTheory.Henselian |
| 5 | public import Mathlib.RingTheory.MvPolynomial.IrreducibleQuadratic |
| 6 | import Mathlib.Algebra.Order.Group.Ideal |
| 7 | import Mathlib.AlgebraicGeometry.Modules.Sheaf |
| 8 | import Mathlib.Data.Finsupp.PWO |
| 9 | import Mathlib.RingTheory.Etale.Weakly |
| 10 | import Mathlib.RingTheory.TotallySplit |
| 11 | public import Lib.General.Geometry.GeometricPoints |
| 12 | import Lib.General.Algebra.MultivariatePolynomials |
| 13 | import Lib.General.LinearAlgebra.MatrixPolynomials |
| 14 | public import TauCeti.RingTheory.MvPolynomial.Finrank |
| 15 | |
| 16 | /-! |
| 17 | # Flat families of ideals cut out by points and the flat closure of theta points |
| 18 | |
| 19 | An ideal of polynomials is cut out by points in the chart `c` if it contains `X c - 1`, the forms of |
| 20 | degree `r ^ j` have prescribed ranks modulo the ideal, and its forms of degree `r ^ j` with `j ≤ i` |
| 21 | are those that vanish at given points. When the points are the images of the same `A`-valued points, |
| 22 | such ideals fit into a flat family over `A`, and a degree bound for monomial ideals shows that |
| 23 | finitely many degrees suffice. |
| 24 | |
| 25 | ## Main definitions and results |
| 26 | |
| 27 | * `New.Variety.ThetaNull.IsCutDegree`, `New.Variety.ThetaNull.eventually_isCutDegree`: for every |
| 28 | large enough `d`, a monomial ideal with at most `σ i` standard monomials of degree `r ^ i` for all |
| 29 | `i ≤ d` has at most `σ i` of them in every degree `r ^ i`. |
| 30 | * `New.Variety.ThetaNull.eq_map_and_flat_of_isCutOut`: let `I₀` and the `I n` be cut out by the |
| 31 | images of the same `A`-valued points along a local map `φ` and jointly injective maps `ψ n` to one |
| 32 | field `K`, with `r > 1` and `i` such a bound. Let `T` be the polynomials over `A` that map into |
| 33 | every `I n`. Then `I₀` is the reduction of `T`, and the quotient by `T` is flat. |
| 34 | * `New.Variety.ThetaNull.IsCutOutAt`: at a field-valued point `t` of `S`, the vanishing ideals of a |
| 35 | set `Z` in the affine charts are cut out (`New.Variety.ThetaNull.IsCutOut`) by the values at `t` |
| 36 | of given maps `P a` from `S` to projective space. |
| 37 | * `New.Variety.ThetaNull.exists_isFlatClosure`: for points `θ n z` of projective space over complex |
| 38 | points `η n` of a reduced `S`, cut out (`New.Variety.ThetaNull.IsCutOutAt`) at each `η n` by |
| 39 | linear systems `P`, with `r > 1` and `i` a degree bound (`New.Variety.ThetaNull.IsCutDegree`), |
| 40 | where every point of `S` specialises to a geometric point at which some set is cut out, the |
| 41 | reduced closure of the points over a finite dense set of the `η n` is flat over `S`, and every |
| 42 | point of `S` specialises to a geometric point with reduced fibre. |
| 43 | |
| 44 | Notions from other files: |
| 45 | * `AddSemigroupIdeal (J →₀ ℕ)` (Mathlib): a set of exponents that is closed under adding any |
| 46 | exponent, that is, a monomial ideal. |
| 47 | * `New.LineBundle` with `New.LineBundle.IsLinearSystem`: a map from a scheme to projective space, |
| 48 | given by charts and the ratios of coordinates on them. |
| 49 | * `New.IsDenseFamily`: a family of complex points of a scheme whose images are dense. |
| 50 | * `New.Variety.AllSpecializeTo`: every point of a scheme S specialises to the image of some point |
| 51 | over an algebraically closed field that satisfies a property Q of field-valued points. |
| 52 | |
| 53 | ## Relation to the literature |
| 54 | |
| 55 | Known; see `Lib.Shimura.ThetaModuli.UniversalFamily` for sources. |
| 56 | -/ |
| 57 | |
| 58 | @[expose] public section |
| 59 | |
| 60 | noncomputable section |
| 61 | |
| 62 | namespace New.Variety.ThetaNull |
| 63 | |
| 64 | /-! |
| 65 | ## Ideals cut out by points and a degree bound for monomial ideals |
| 66 | |
| 67 | Commutative algebra for flat families of ideals cut out by points. Polynomials are in finitely many |
| 68 | variables `J`. Monomials are exponents `J →₀ ℕ`, and a monomial outside a monomial ideal is called |
| 69 | standard. |
| 70 | |
| 71 | The idea: explicit determinants give forms in `T` with all needed leading monomials. Division by |
| 72 | them shows that the standard monomials span, and ranks give freeness. |
| 73 | -/ |
| 74 | |
| 75 | section CutOutIdeals |
| 76 | |
| 77 | open AddSemigroupIdeal Finsupp Set |
| 78 | |
| 79 | variable {ι κ J A k K : Type} [CommRing A] [Field k] (φ : A →+* k) {d : ℕ} |
| 80 | (T : Ideal (MvPolynomial J A)) [IsLocalHom φ] |
| 81 | |
| 82 | variable [Finite J] in |
| 83 | /-- In finitely many variables there are finitely many exponents of total degree `d`. -/ |
| 84 | instance : Fintype (degree ⁻¹' {d} : Set (J →₀ ℕ)) := (finite_of_degree_eq d).fintype |
| 85 | |
| 86 | /-! ### A degree bound for monomial ideals -/ |
| 87 | |
| 88 | /-- `d` is a degree bound for monomial ideals in the variables `J` with counts `σ`: every monomial |
| 89 | ideal `M` that leaves out at most `σ i` monomials of degree `r ^ i` for all `i ≤ d` does so for |
| 90 | all `i`. -/ |
| 91 | def IsCutDegree (J : Type) (d r : ℕ) (σ : ℕ → ℕ) : Prop := |
| 92 | ∀ M : AddSemigroupIdeal (J →₀ ℕ), (∀ i ≤ d, (degree ⁻¹' {r ^ i} \ M.carrier).ncard ≤ σ i) → |
| 93 | ∀ i : ℕ, (degree ⁻¹' {r ^ i} \ M.carrier).ncard ≤ σ i |
| 94 | |
| 95 | /-- For a subgroup `T` of an additive group `G`, the integer part of the square root of the number |
| 96 | of `y` with `r ^ j • y ∈ T`. -/ |
| 97 | def thetaRanks {G : Type*} [AddGroup G] (T : AddSubgroup G) (r j : ℕ) : ℕ := |
| 98 | (Nat.card {y : G // r ^ j • y ∈ T}).sqrt |
| 99 | |
| 100 | /-- Every large enough `d` is a degree bound (`IsCutDegree`) for monomial ideals in finitely many |
| 101 | variables `J` with counts `σ`. -/ |
| 102 | lemma eventually_isCutDegree (J : Type) [Finite J] (r : ℕ) (σ : ℕ → ℕ) : |
| 103 | ∀ᶠ d : ℕ in Filter.atTop, IsCutDegree J d r σ := by |
| 104 | -- Noetherian induction on a subideal `N` of `M`: either `N` already leaves few monomials in |
| 105 | -- every degree `r ^ i`, or it leaves too many in one such degree, and then `M` contains one of |
| 106 | -- these finitely many monomials, so a larger subideal. |
| 107 | let Few (M : AddSemigroupIdeal (J →₀ ℕ)) (i : ℕ) : Prop := |
| 108 | (degree ⁻¹' {r ^ i} \ M.carrier).ncard ≤ σ i |
| 109 | suffices h_above : ∀ N : AddSemigroupIdeal (J →₀ ℕ), ∀ᶠ d : ℕ in Filter.atTop, |
| 110 | ∀ M ≥ N, (∀ i ≤ d, Few M i) → ∀ i : ℕ, Few M i from |
| 111 | (h_above ⊥).mono fun d h_bot M ↦ h_bot M bot_le |
| 112 | intro N |
| 113 | induction N using WellFoundedGT.induction with | ind N ih => ?_ |
| 114 | by_cases h_few : ∀ i : ℕ, Few N i |
| 115 | · exact .of_forall fun d M hNM _ i ↦ (ncard_le_ncard (sdiff_le_sdiff_left hNM)).trans (h_few i) |
| 116 | obtain ⟨i, h_many⟩ := not_forall.mp h_few |
| 117 | -- Adding a monomial of degree `r ^ i` outside `N` gives a larger ideal. |
| 118 | have h_lt (m : J →₀ ℕ) (hm : m ∈ degree ⁻¹' {r ^ i} \ N.carrier) : N < N ⊔ closure {m} := |
| 119 | left_lt_sup.mpr fun h_le ↦ hm.2 (closure_le.mp h_le (mem_singleton m)) |
| 120 | -- One `d` serves for all the finitely many ideals `N ⊔ closure {m}`. |
| 121 | have h_larger : ∀ᶠ d : ℕ in Filter.atTop, ∀ m ∈ degree ⁻¹' {r ^ i} \ N.carrier, |
| 122 | ∀ M ≥ N ⊔ closure {m}, (∀ i ≤ d, Few M i) → ∀ i : ℕ, Few M i := |
| 123 | (finite_of_degree_eq _).sdiff.eventually_all.mpr fun m hm ↦ ih _ (h_lt m hm) |
| 124 | filter_upwards [h_larger, Filter.mem_atTop i] with d h_cut hd M hNM hM |
| 125 | -- `M` leaves out fewer monomials of degree `r ^ i` than `N`, so contains one outside `N`. |
| 126 | obtain ⟨m, hm, hmM⟩ : |
| 127 | ∃ m ∈ degree ⁻¹' {r ^ i} \ N.carrier, m ∉ degree ⁻¹' {r ^ i} \ M.carrier := |
| 128 | not_subset.mp fun h_sub ↦ h_many ((ncard_le_ncard h_sub).trans (hM i hd)) |
| 129 | have hm_mem : m ∈ M := not_not.mp fun hm_not ↦ hmM ⟨hm.1, hm_not⟩ |
| 130 | exact h_cut m hm M (sup_le hNM (closure_le.mpr (singleton_subset_iff.mpr hm_mem))) hM |
| 131 | |
| 132 | open MvPolynomial Module Submodule Ideal.Quotient Matrix LinearMap Finite |
| 133 | |
| 134 | /-- The image of a submodule of `A[X]` in the quotient `A[X] ⧸ T`. -/ |
| 135 | abbrev imageMod : Submodule A (MvPolynomial J A) → Submodule A (MvPolynomial J A ⧸ T) := |
| 136 | Submodule.map (mkₐ A T).toLinearMap |
| 137 | |
| 138 | /-- An ideal `I` of polynomials over the field `k` in the variables `J` is cut out by the points |
| 139 | `p a` of `k ^ J` in the chart `c`, with ranks `σ j` in every degree `r ^ j` and the vanishing |
| 140 | condition in the degrees `r ^ j` with `j ≤ i`: the ideal `I` contains `X c - 1`. For each `j`, |
| 141 | the forms of degree `r ^ j` span a space of dimension `σ j` modulo `I`. For `j ≤ i`, the forms of |
| 142 | degree `r ^ j` in `I` are exactly those that vanish at all the points `p a`. -/ |
| 143 | structure IsCutOut (r i : ℕ) (σ : ℕ → ℕ) (c : J) (p : ι → J → k) (I : Ideal (MvPolynomial J k)) : |
| 144 | Prop where |
| 145 | /-- The coordinate `X c` is `1` modulo `I`: the ideal lives in the affine chart `c`. -/ |
| 146 | X_sub_one_mem : X c - 1 ∈ I |
| 147 | /-- The forms of degree `r ^ j` span a space of dimension `σ j` modulo `I`. -/ |
| 148 | rank (j : ℕ) : finrank k (imageMod I (homogeneousSubmodule J k (r ^ j))) = σ j |
| 149 | /-- For `j ≤ i`, a form of degree `r ^ j` lies in `I` iff it vanishes at all the points `p a`. -/ |
| 150 | mem_iff_vanish (j : ℕ) (hj : j ≤ i) (f : MvPolynomial J k) |
| 151 | (hf : f ∈ homogeneousSubmodule J k (r ^ j)) : f ∈ I ↔ ∀ a : ι, eval (p a) f = 0 |
| 152 | |
| 153 | /-- A polynomial supported on exponents of total degree `d` outside a set `M` is a form of degree |
| 154 | `d`. -/ |
| 155 | lemma restrictSupport_le_homogeneousSubmodule {M : Set (J →₀ ℕ)} : |
| 156 | restrictSupport A (degree ⁻¹' {d} \ M) ≤ homogeneousSubmodule J A d := |
| 157 | (restrictSupport_mono A sdiff_le).trans (homogeneousSubmodule_eq_finsupp_supported J A d).ge |
| 158 | |
| 159 | /-! ### Flatness -/ |
| 160 | |
| 161 | /-- Division with remainder. Let `φ : A →+* k` be a local homomorphism to a field. If every exponent |
| 162 | in `W` leads the nonzero reduction along `φ` of a form in `T`, then modulo any ideal `I` containing |
| 163 | the image of `T` the monomials of degree `d` outside `W` span the forms of degree `d`. -/ |
| 164 | lemma imageMod_homogeneousSubmodule_eq [Finite J] (o : MonomialOrder J) {W : Set (J →₀ ℕ)} |
| 165 | (h_lead : ∀ m ∈ W, ∃ g ∈ T, |
| 166 | m = o.degree (g.map φ) ∧ g.IsHomogeneous m.degree ∧ m ∈ (g.map φ).support) |
| 167 | {B : Type} [CommRing B] (ρ : A →+* B) {I : Ideal (MvPolynomial J B)} |
| 168 | (hI : ∀ f ∈ T, f.map ρ ∈ I) : |
| 169 | imageMod I (homogeneousSubmodule J B d) = |
| 170 | imageMod I (restrictSupport B (degree ⁻¹' {d} \ W)) := by |
| 171 | classical |
| 172 | -- The coefficients of the chosen forms `g m` at the exponents in `W` form an invertible matrix, |
| 173 | -- so subtracting a combination of the `g m` from a form `f` removes all its monomials in `W`. |
| 174 | let V : Set (J →₀ ℕ) := degree ⁻¹' {d} ∩ W |
| 175 | have h_choice (m : V) : ∃ g ∈ T, (m : J →₀ ℕ) = o.degree (g.map φ) ∧ g.IsHomogeneous d ∧ |
| 176 | (g.map φ).coeff (m : J →₀ ℕ) ≠ 0 := by |
| 177 | obtain ⟨hm_deg, hmW⟩ := m.prop |
| 178 | obtain ⟨g, hgT, hg_lead, hg_form, hg_supp⟩ := h_lead m hmW |
| 179 | rw [mem_singleton_iff.mp hm_deg] at hg_form |
| 180 | exact ⟨g, hgT, hg_lead, hg_form, MvPolynomial.mem_support_iff.mp hg_supp⟩ |
| 181 | choose g hgT hg_lead hg_form hg_coeff using h_choice |
| 182 | refine (map_mono restrictSupport_le_homogeneousSubmodule).antisymm' ?_ |
| 183 | rintro x ⟨f, hf, hfx⟩ |
| 184 | let G : Matrix V V A := of fun m m' : V ↦ (g m).coeff m'.val |
| 185 | -- Modulo `φ` the matrix is lower triangular for the monomial order, with nonzero diagonal. |
| 186 | have h_tri (m m' : V) (h_lt : o.toSyn m.val < o.toSyn m'.val) : φ (G m m') = 0 := by |
| 187 | rw [hg_lead m] at h_lt |
| 188 | simpa [G, coeff_map] using o.coeff_eq_zero_of_lt h_lt |
| 189 | have h_diag (m : V) : φ (G m m) ≠ 0 := by simpa [G, coeff_map] using hg_coeff m |
| 190 | have h_det : IsUnit (φ G.det) := by |
| 191 | let synOrder : LinearOrder (J →₀ ℕ) := o.toSyn.linearOrder |
| 192 | rw [φ.map_det, det_of_isLowerTriangular (φ.mapMatrix G) h_tri] |
| 193 | exact (Finset.prod_ne_zero_iff.mpr fun m _ ↦ h_diag m).isUnit |
| 194 | -- `φ` is a local homomorphism, so `G.det` itself is a unit. |
| 195 | have hG_det : IsUnit G.det := .of_map φ G.det h_det |
| 196 | have hG : IsUnit (ρ.mapMatrix G) := (G.isUnit_iff_isUnit_det.mpr hG_det).map ρ.mapMatrix |
| 197 | obtain ⟨c, hc⟩ : ∃ c : V → B, c ᵥ* ρ.mapMatrix G = fun m : V ↦ f.coeff m.val := |
| 198 | vecMul_surjective_iff_isUnit.mpr hG fun m : V ↦ f.coeff m.val |
| 199 | have h_form : f - ∑ m : V, c m • (g m).map ρ ∈ homogeneousSubmodule J B d := |
| 200 | sub_mem hf (sum_smul_mem _ c fun m _ ↦ (hg_form m).map ρ) |
| 201 | refine ⟨f - ∑ m : V, c m • (g m).map ρ, (mem_restrictSupport_iff B).mpr fun a ha ↦ ?_, ?_⟩ |
| 202 | · have ha_deg : a ∈ degree ⁻¹' {d} := (h_form.degree_eq_sum_deg_support ha).symm |
| 203 | -- If `a ∈ W`, the choice of `c` makes the coefficient at `a` vanish. |
| 204 | refine ⟨ha_deg, fun haW ↦ ?_⟩ |
| 205 | have h_coeff : ∑ m : V, c m * ρ ((g m).coeff a) = f.coeff a := by |
| 206 | simpa [vecMul_eq_sum, G] using congrFun hc ⟨a, ha_deg, haW⟩ |
| 207 | simp [← h_coeff, coeff_map] at ha |
| 208 | · -- The forms `g m` lie in `T`, so their images lie in `I` and vanish modulo `I`. |
| 209 | have h_sum : ∑ m : V, c m • (g m).map ρ ∈ I := |
| 210 | sum_mem fun m _ ↦ Submodule.smul_of_tower_mem I _ (hI (g m) (hgT m)) |
| 211 | rwa [AlgHom.toLinearMap_apply, map_sub, mkₐ_eq_mk, eq_zero_iff_mem.mpr h_sum, sub_zero] |
| 212 | |
| 213 | /-- If the monomials in `S` span modulo `I` a space of dimension at least their number, they are |
| 214 | independent modulo `I`. -/ |
| 215 | lemma eq_zero_of_ncard_le_finrank {I : Ideal (MvPolynomial J k)} {S : Set (J →₀ ℕ)} [Finite S] |
| 216 | (h_rank : S.ncard ≤ finrank k (imageMod I (restrictSupport k S))) {s : MvPolynomial J k} |
| 217 | (hs : s ∈ restrictSupport k S) (hsI : s ∈ I) : s = 0 := by |
| 218 | let b : Basis S k (restrictSupport k S) := basisRestrictSupport k S |
| 219 | have : Module.Finite k (restrictSupport k S) := of_basis b |
| 220 | have h_disj : Disjoint (restrictSupport k S) (ker (mkₐ k I).toLinearMap) := |
| 221 | disjoint_ker_of_finrank_le _ ((finrank_eq_nat_card_basis b).trans_le h_rank) |
| 222 | exact disjoint_def.mp h_disj s hs (eq_zero_iff_mem.mpr hsI) |
| 223 | |
| 224 | /-- Among the monomials in `S` there are as many independent ones modulo `I` as the dimension of |
| 225 | the space they span modulo `I`. -/ |
| 226 | lemma exists_independent_monomials (I : Ideal (MvPolynomial J k)) (S : Set (J →₀ ℕ)) [Finite S] : |
| 227 | ∃ e : Fin (finrank k (imageMod I (restrictSupport k S))) → S, |
| 228 | LinearIndependent k fun b : Fin (finrank k (imageMod I (restrictSupport k S))) ↦ |
| 229 | mkₐ k I (monomial (e b) 1) := by |
| 230 | rw [restrictSupport_eq_span, imageMod, ← span_image, image_image] |
| 231 | -- The classes of the monomials in `S` contain a basis `v` of their span. |
| 232 | let C : Set (MvPolynomial J k ⧸ I) := (fun m : J →₀ ℕ ↦ mkₐ k I (monomial m 1)) '' S |
| 233 | have h_finite : Module.Finite k (span k C) := Module.Finite.span_of_finite k (toFinite C) |
| 234 | obtain ⟨v, hv, -, h_indep⟩ : ∃ v : Fin (finrank k (span k C)) → MvPolynomial J k ⧸ I, |
| 235 | (∀ b : Fin (finrank k (span k C)), v b ∈ C) ∧ |
| 236 | span k (Set.range v) = span k C ∧ LinearIndependent k v := |
| 237 | exists_fun_fin_finrank_span_eq k C |
| 238 | choose e he hev using hv |
| 239 | refine ⟨fun b ↦ ⟨e b, he b⟩, ?_⟩ |
| 240 | rwa [← funext hev] at h_indep |
| 241 | |
| 242 | /-- Let `I` be cut out by the points `p a` in the chart `c` (`IsCutOut`: ranks `σ j` in the |
| 243 | degrees `r ^ j`, vanishing conditions up to the degree `r ^ i`). Monomials `μ b`, `b < n`, of a |
| 244 | degree `r ^ j` with `j ≤ i` are dependent modulo `I` iff the `n × n` determinant of their values at |
| 245 | `n` of the points `p a` vanishes for every choice of the `n` points (repetitions allowed). -/ |
| 246 | lemma IsCutOut.minors_eq_zero_iff {r i j n : ℕ} {σ : ℕ → ℕ} {c : J} {p : ι → J → k} |
| 247 | {I : Ideal (MvPolynomial J k)} (hI : IsCutOut r i σ c p I) (hj : j ≤ i) {μ : Fin n → J →₀ ℕ} |
| 248 | (hμ : ∀ b : Fin n, (μ b).degree = r ^ j) : |
| 249 | (∀ a : Fin n → ι, (of fun s b : Fin n ↦ eval (p (a s)) (monomial (μ b) 1)).det = 0) ↔ |
| 250 | ¬LinearIndependent k fun b : Fin n ↦ mkₐ k I (monomial (μ b) 1) := by |
| 251 | -- A combination of the monomials lies in `I` iff it vanishes at all the points. |
| 252 | have h_rel (t : Fin n → k) : ∑ b : Fin n, t b • mkₐ k I (monomial (μ b) 1) = 0 ↔ |
| 253 | ∑ b : Fin n, t b • (fun x : ι ↦ eval (p x) (monomial (μ b) 1)) = 0 := by |
| 254 | have h_form : ∑ b : Fin n, t b • monomial (μ b) (1 : k) ∈ homogeneousSubmodule J k (r ^ j) := |
| 255 | sum_smul_mem _ t fun b _ ↦ isHomogeneous_monomial 1 (hμ b) |
| 256 | simp_rw [← map_smul (mkₐ k I)] |
| 257 | rw [← map_sum, mkₐ_eq_mk, eq_zero_iff_mem, hI.mem_iff_vanish j hj _ h_form] |
| 258 | simp [funext_iff] |
| 259 | refine (New.det_eval_eq_zero_iff_not_linearIndependent |
| 260 | (v := fun b x ↦ eval (p x) (monomial (μ b) 1))).trans ?_ |
| 261 | simp only [Fintype.linearIndependent_iff, h_rel] |
| 262 | |
| 263 | /-- The determinant whose first row is the `n + 1` monomials `μ l` and whose other rows are their |
| 264 | values at the `n` points `p s`, expanded along the first row. -/ |
| 265 | def cofactorForm {n : ℕ} (p : Fin n → J → A) (μ : Fin (n + 1) → J →₀ ℕ) : MvPolynomial J A := |
| 266 | ∑ l : Fin (n + 1), |
| 267 | ((of fun s b : Fin n ↦ eval (p s) (monomial (μ (l.succAbove b)) 1)).det * (-1) ^ l.val) • |
| 268 | monomial (μ l) 1 |
| 269 | |
| 270 | /-- Suppose `I`, an ideal of polynomials over `k` in the variables `J`, is cut out in the chart `c` |
| 271 | by the points `ρ ∘ P a` in the sense of `IsCutOut r i σ c`. This means `X c - 1 ∈ I`, forms of |
| 272 | degree `r ^ j` span a space of dimension `σ j` modulo `I`, and for `j ≤ i` the forms of degree |
| 273 | `r ^ j` in `I` are exactly those that vanish at all the points `ρ ∘ P a`. For `j ≤ i`, take |
| 274 | `σ j + 1` monomials `μ` of degree `r ^ j` and `σ j` of the points `P (a s)`, and form their |
| 275 | `cofactorForm`: the determinant whose first row is the monomials and whose other rows are their |
| 276 | values at the points, expanded along the first row. Its image under `ρ` lies in `I`. -/ |
| 277 | lemma IsCutOut.map_cofactorForm_mem [Finite J] |
| 278 | {ρ : A →+* k} {r i j : ℕ} {σ : ℕ → ℕ} {c : J} {P : ι → J → A} |
| 279 | {I : Ideal (MvPolynomial J k)} (hI : IsCutOut r i σ c (fun a : ι ↦ ρ ∘ P a) I) (hj : j ≤ i) |
| 280 | (a : Fin (σ j) → ι) {μ : Fin (σ j + 1) → J →₀ ℕ} |
| 281 | (hμ : ∀ b : Fin (σ j + 1), (μ b).degree = r ^ j) : |
| 282 | MvPolynomial.map ρ (cofactorForm (fun s : Fin (σ j) ↦ P (a s)) μ) ∈ I := by |
| 283 | -- Modulo `I` the forms have rank `σ j` only, so the monomials are dependent. |
| 284 | have h_dep : ¬LinearIndependent k fun b ↦ mkₐ k I (monomial (μ b) 1) := by |
| 285 | intro h_indep |
| 286 | let v (b : Fin (σ j + 1)) : imageMod I (homogeneousSubmodule J k (r ^ j)) := |
| 287 | ⟨mkₐ k I (monomial (μ b) 1), mem_map_of_mem (isHomogeneous_monomial 1 (hμ b))⟩ |
| 288 | have hv : LinearIndependent k v := .of_comp (Submodule.subtype _) h_indep |
| 289 | simpa [hI.rank] using hv.fintype_card_le_finrank |
| 290 | -- The cofactor form is a combination of monomials of degree `r ^ j`. |
| 291 | have h_form : (cofactorForm (fun s : Fin (σ j) ↦ P (a s)) μ).IsHomogeneous (r ^ j) := |
| 292 | sum_smul_mem (homogeneousSubmodule J A _) _ fun l _ ↦ isHomogeneous_monomial 1 (hμ l) |
| 293 | refine (hI.mem_iff_vanish j hj _ (h_form.map ρ)).mpr fun x ↦ ?_ |
| 294 | -- The value of the form at a point `x` is the minor at the points `x, a 0, a 1, …`, expanded |
| 295 | -- along its first row. |
| 296 | calc eval (ρ ∘ P x) (MvPolynomial.map ρ (cofactorForm (fun s ↦ P (a s)) μ)) |
| 297 | _ = ∑ l : Fin (σ j + 1), (-1) ^ (l : ℕ) * eval (ρ ∘ P x) (monomial (μ l) 1) * |
| 298 | (of fun s b : Fin (σ j) ↦ eval (ρ ∘ P (a s)) (monomial (μ (l.succAbove b)) 1)).det := by |
| 299 | simp [cofactorForm, smul_eq_C_mul, mul_rotate (det _), Function.comp_def, RingHom.map_det, |
| 300 | Matrix.map, map_eval] |
| 301 | _ = (of fun s b : Fin (σ j + 1) ↦ eval (ρ ∘ P (vecCons x a s)) (monomial (μ b) 1)).det := by |
| 302 | rw [det_succ_row_zero] |
| 303 | rfl |
| 304 | _ = 0 := (hI.minors_eq_zero_iff hj hμ).mpr h_dep (vecCons x a) |
| 305 | |
| 306 | open scoped Classical in |
| 307 | /-- The exponents that lead, for the monomial order `o`, the nonzero reduction along `φ` of a form |
| 308 | in `T`. They form a monomial ideal. -/ |
| 309 | def leadingExponents (o : MonomialOrder J) : AddSemigroupIdeal (J →₀ ℕ) where |
| 310 | carrier := |
| 311 | {m : J →₀ ℕ | ∃ g ∈ T, m = o.degree (g.map φ) ∧ g.IsHomogeneous m.degree ∧ |
| 312 | m ∈ (g.map φ).support} |
| 313 | vadd_mem' n m := by |
| 314 | -- If `g` shows that `m` is leading, then `X ^ n * g` shows that `n + m` is leading. |
| 315 | rintro ⟨g, hgT, hm_lead, hg_form, hm_supp⟩ |
| 316 | have h_map : (monomial n 1 * g).map φ = monomial n 1 * g.map φ := by simp |
| 317 | have hn_ne : (monomial n 1 : MvPolynomial J k) ≠ 0 := by simp |
| 318 | have hg_ne : g.map φ ≠ 0 := ne_zero_iff.mpr ⟨m, MvPolynomial.mem_support_iff.mp hm_supp⟩ |
| 319 | have h_lead : n + m = o.degree ((monomial n 1 * g).map φ) := by |
| 320 | rw [h_map, o.degree_mul hn_ne hg_ne, o.degree_monomial, ite_eq_right one_ne_zero, ← hm_lead] |
| 321 | refine ⟨monomial n 1 * g, T.mul_mem_left _ hgT, h_lead, ?_, ?_⟩ |
| 322 | · simpa using (isHomogeneous_monomial 1 rfl).mul hg_form |
| 323 | · simpa [h_lead, h_map] using o.degree_mem_support (mul_ne_zero hn_ne hg_ne) |
| 324 | |
| 325 | /-- Let `φ : A →+* k` be a local homomorphism to a field, and let `I₀` be cut out in chart `c` by |
| 326 | the points `φ ∘ P a` (`IsCutOut`: `X c - 1 ∈ I₀`, the forms of degree `r ^ j` have rank `σ j` modulo |
| 327 | `I₀`, with the vanishing condition for `j ≤ i`). Let `T` reduce into `I₀`, let `j ≤ i`, and let `T` |
| 328 | contain the cofactor form (the determinant with first row the monomials, other rows their values at |
| 329 | the points) of any `σ j + 1` monomials of degree `r ^ j` at any `σ j` of the `P a`. Then at most |
| 330 | `σ j` monomials of degree `r ^ j` are not leading exponents of `T`. -/ |
| 331 | lemma IsCutOut.ncard_diff_leadingExponents_le [Finite J] |
| 332 | (o : MonomialOrder J) {r i j : ℕ} {σ : ℕ → ℕ} {c : J} |
| 333 | {P : ι → J → A} {I₀ : Ideal (MvPolynomial J k)} |
| 334 | (hI₀ : IsCutOut r i σ c (fun a : ι ↦ φ ∘ P a) I₀) (hj : j ≤ i) |
| 335 | (h_reduce : ∀ f ∈ T, MvPolynomial.map φ f ∈ I₀) |
| 336 | (h_cofactor : ∀ (a : Fin (σ j) → ι) (μ : Fin (σ j + 1) → J →₀ ℕ), |
| 337 | (∀ b : Fin (σ j + 1), (μ b).degree = r ^ j) → |
| 338 | cofactorForm (fun s : Fin (σ j) ↦ P (a s)) μ ∈ T) : |
| 339 | (degree ⁻¹' {r ^ j} \ (leadingExponents φ T o).carrier).ncard ≤ σ j := by |
| 340 | classical |
| 341 | -- Choose `σ j` standard (not leading) monomials `e b` independent modulo `I₀`, and points `a` |
| 342 | -- at which their minor is nonzero. Suppose that a standard monomial `m` is not among them. |
| 343 | let std : Set (J →₀ ℕ) := degree ⁻¹' {r ^ j} \ (leadingExponents φ T o).carrier |
| 344 | have h_fin : Finite std := (finite_of_degree_eq (r ^ j)).sdiff |
| 345 | have h_div : imageMod I₀ (homogeneousSubmodule J k (r ^ j)) = |
| 346 | imageMod I₀ (restrictSupport k std) := |
| 347 | imageMod_homogeneousSubmodule_eq φ T o (fun _ hm ↦ hm) φ h_reduce |
| 348 | obtain ⟨e, he⟩ : ∃ e : Fin (σ j) → std, |
| 349 | LinearIndependent k fun b ↦ mkₐ k I₀ (monomial (e b) 1) := by |
| 350 | rw [← hI₀.rank j, h_div] |
| 351 | exact exists_independent_monomials I₀ std |
| 352 | have h_std_deg (m : J →₀ ℕ) (hm : m ∈ std) : m.degree = r ^ j := hm.left |
| 353 | obtain ⟨a, ha⟩ : ∃ a : Fin (σ j) → ι, |
| 354 | (of fun s b ↦ eval (φ ∘ P (a s)) (monomial (e b) 1)).det ≠ 0 := by |
| 355 | by_contra! h_zero |
| 356 | exact (hI₀.minors_eq_zero_iff hj fun b ↦ h_std_deg _ (e b).prop).mp h_zero he |
| 357 | -- It suffices that every standard monomial is among the `e b`. |
| 358 | suffices h_surj : Function.Surjective e by |
| 359 | simpa using Nat.card_le_card_of_surjective e h_surj |
| 360 | intro m |
| 361 | by_contra! hm |
| 362 | -- `g` is the cofactor form of `m` and the `e b`. |
| 363 | let μ : Fin (σ j + 1) → J →₀ ℕ := vecCons m fun b ↦ e b |
| 364 | have hμ (l : Fin (σ j + 1)) : μ l ∈ std := l.cases m.prop fun b ↦ (e b).prop |
| 365 | let g : MvPolynomial J A := cofactorForm (fun s ↦ P (a s)) μ |
| 366 | have hg_std : g ∈ restrictSupport A std := |
| 367 | sum_smul_mem _ _ fun l _ ↦ (monomial_mem_restrictSupport A).mpr (.inl (hμ l)) |
| 368 | have hg_mem : g ∈ T := h_cofactor a μ fun l ↦ h_std_deg _ (hμ l) |
| 369 | -- As `m` is not among the `e b`, the coefficient of `m` in the reduction of `g` is the minor of |
| 370 | -- the `e b` at the points `a`, which is nonzero. |
| 371 | have h_coeff : (g.map φ).coeff m = (of fun s b ↦ eval (φ ∘ P (a s)) (monomial (e b) 1)).det := by |
| 372 | simp [g, cofactorForm, μ, Fin.sum_univ_succ, SetCoe.ext_iff, hm, coeff_map, RingHom.map_det, |
| 373 | Matrix.map, map_eval] |
| 374 | have hg_ne : (g.map φ).coeff m ≠ 0 := h_coeff.trans_ne ha |
| 375 | -- So the reduction has a leading exponent; it is leading, yet occurs in `g`, so is standard. |
| 376 | have h_top : o.degree (g.map φ) ∈ (g.map φ).support := |
| 377 | o.degree_mem_support (ne_zero_iff.mpr ⟨m, hg_ne⟩) |
| 378 | obtain ⟨h_deg, h_not_lead⟩ : o.degree (g.map φ) ∈ std := hg_std (support_map_subset _ g h_top) |
| 379 | have hg_form : g.IsHomogeneous (o.degree (g.map φ)).degree := by |
| 380 | rw [mem_singleton_iff.mp h_deg] |
| 381 | exact restrictSupport_le_homogeneousSubmodule hg_std |
| 382 | exact h_not_lead ⟨g, hg_mem, rfl, hg_form, h_top⟩ |
| 383 | |
| 384 | /-- Let `S j` be sets of exponents such that modulo `T` every polynomial of total degree at most `j` |
| 385 | is congruent to one supported on `S j`, and no nonzero polynomial supported on `S j` lies in `T`. |
| 386 | Then `A[X] ⧸ T` is flat over `A`. -/ |
| 387 | private lemma flat_of_exists_restrictSupport_of_eq_zero {S : ℕ → Set (J →₀ ℕ)} |
| 388 | (h_span : ∀ (j : ℕ) (x : MvPolynomial J A), x.totalDegree ≤ j → |
| 389 | ∃ s ∈ restrictSupport A (S j), mkₐ A T s = mkₐ A T x) |
| 390 | (h_free : ∀ (j : ℕ) (s : MvPolynomial J A), s ∈ restrictSupport A (S j) → s ∈ T → s = 0) : |
| 391 | Flat A (MvPolynomial J A ⧸ T) := by |
| 392 | -- Lift the `x l` to polynomials supported on one `S j`. The relation then holds in the |
| 393 | -- polynomial ring, which is flat over `A`, so it is trivial there and in the quotient. |
| 394 | refine .of_forall_isTrivialRelation fun {len b x} hx ↦ ?_ |
| 395 | have h_lift (l : Fin len) : ∃ s ∈ restrictSupport A (S (⨆ l, (x l).out.totalDegree)), |
| 396 | mkₐ A T s = x l := by |
| 397 | simpa using h_span _ (x l).out (le_ciSup (fun l ↦ (x l).out.totalDegree) l) |
| 398 | choose s hs hsx using h_lift |
| 399 | have h_sum_mem : ∑ l, b l • s l ∈ T := by |
| 400 | rw [← eq_zero_iff_mem, ← mkₐ_eq_mk A] |
| 401 | simpa only [map_sum, map_smul, hsx] using hx |
| 402 | have h_rel : ∑ l, b l • s l = 0 := h_free _ _ (sum_smul_mem _ b fun l _ ↦ hs l) h_sum_mem |
| 403 | obtain ⟨n, a, y, hy_s, hy_b⟩ := Flat.isTrivialRelation_of_sum_smul_eq_zero h_rel |
| 404 | have hx_sum (l : Fin len) : x l = ∑ i, a l i • mk T (y i) := by simp [← hsx, hy_s] |
| 405 | exact ⟨n, a, mk T ∘ y, hx_sum, hy_b⟩ |
| 406 | |
| 407 | /-- Let `φ : A → k` be a local homomorphism to a field, let the maps `ψ n : A → K` have no common |
| 408 | nonzero kernel element, let `1 < r`, and let `i` be a degree bound for the counts `σ` |
| 409 | (`IsCutDegree J i r σ`). Assume that `I₀` is cut out (`IsCutOut`) in the chart `c` by the points |
| 410 | `φ (P a)`, with ranks `σ` and the vanishing condition up to degree `r ^ i`, and that each `I n` is |
| 411 | cut out in the same way by the points `ψ n (P a)`. Then the ideal `T`, consisting of the polynomials |
| 412 | `f` over `A` with `ψ n f ∈ I n` for every `n`, generates `I₀` along `φ`, and `A[X] ⧸ T` is flat over |
| 413 | `A`. -/ |
| 414 | lemma eq_map_and_flat_of_isCutOut [Finite J] |
| 415 | [Field K] {ψ : κ → A →+* K} {r i : ℕ} {σ : ℕ → ℕ} {c : J} |
| 416 | {I₀ : Ideal (MvPolynomial J k)} (hψ : ∀ a : A, (∀ n : κ, ψ n a = 0) → a = 0) (hr : 1 < r) |
| 417 | (h_degree : IsCutDegree J i r σ) {P : ι → J → A} {I : κ → Ideal (MvPolynomial J K)} |
| 418 | (hI₀ : IsCutOut r i σ c (fun a : ι ↦ φ ∘ P a) I₀) |
| 419 | (hI : ∀ n : κ, IsCutOut r i σ c (fun a : ι ↦ ψ n ∘ P a) (I n)) |
| 420 | (hT : ∀ f : MvPolynomial J A, f ∈ T ↔ ∀ n : κ, MvPolynomial.map (ψ n) f ∈ I n) : |
| 421 | I₀ = T.map (MvPolynomial.map φ) ∧ |
| 422 | Flat A (MvPolynomial J A ⧸ T) := by |
| 423 | -- Fix a monomial order. Call an exponent leading if it leads the nonzero reduction of a form in |
| 424 | -- `T₀ = T ⊓ φ⁻¹ I₀`, else standard. In degrees `r ^ j` the standard monomials span modulo `T₀` |
| 425 | -- (division) and number at most `σ j` (determinants), so are independent modulo `I₀` and `T`; |
| 426 | -- both claims follow. |
| 427 | obtain ⟨o⟩ : Nonempty (MonomialOrder J) := by |
| 428 | -- any linear order of `J` gives the lexicographic monomial order (`J` is finite) |
| 429 | obtain ⟨linOrder, -⟩ := exists_wellFoundedLT (α := J) |
| 430 | exact ⟨MonomialOrder.lex⟩ |
| 431 | let T₀ : Ideal (MvPolynomial J A) := T ⊓ I₀.comap (map φ) |
| 432 | have hT₀_le : T₀ ≤ T := inf_le_left |
| 433 | have h_reduce₀ (f : MvPolynomial J A) (hf : f ∈ T₀) : map φ f ∈ I₀ := |
| 434 | Ideal.mem_comap.mp (Ideal.mem_inf.mp hf).2 |
| 435 | let lead : AddSemigroupIdeal (J →₀ ℕ) := leadingExponents φ T₀ o |
| 436 | let std (d : ℕ) : Set (J →₀ ℕ) := degree ⁻¹' {d} \ lead.carrier |
| 437 | have h_fin (d : ℕ) : Finite (std d) := (finite_of_degree_eq d).sdiff |
| 438 | have h_div {d : ℕ} {R : Type} [CommRing R] (ρ : A →+* R) {N : Ideal (MvPolynomial J R)} |
| 439 | (hN : ∀ f ∈ T₀, map ρ f ∈ N) : |
| 440 | imageMod N (homogeneousSubmodule J R d) = imageMod N (restrictSupport R (std d)) := |
| 441 | imageMod_homogeneousSubmodule_eq φ T₀ o (fun _ hm ↦ hm) ρ hN |
| 442 | have h_rank₀ (j : ℕ) : σ j = finrank k (imageMod I₀ (restrictSupport k (std (r ^ j)))) := by |
| 443 | rw [← h_div φ h_reduce₀, hI₀.rank] |
| 444 | have h_rank (n : κ) (j : ℕ) : |
| 445 | σ j = finrank K (imageMod (I n) (restrictSupport K (std (r ^ j)))) := by |
| 446 | rw [← h_div (ψ n) fun f hf ↦ (hT f).mp (hT₀_le hf) n, (hI n).rank] |
| 447 | -- Key step: at most `σ j` monomials of degree `r ^ j` are standard. By `h_degree`, `j ≤ i` |
| 448 | -- suffices, and then the cofactor forms lie in `T₀`. |
| 449 | have h_card : ∀ j : ℕ, (std (r ^ j)).ncard ≤ σ j := by |
| 450 | refine h_degree lead fun j hj ↦ ?_ |
| 451 | exact hI₀.ncard_diff_leadingExponents_le φ T₀ o hj h_reduce₀ fun a μ hμ ↦ |
| 452 | ⟨(hT _).mpr fun n ↦ (hI n).map_cofactorForm_mem hj a hμ, hI₀.map_cofactorForm_mem hj a hμ⟩ |
| 453 | have h_chart : X c - 1 ∈ T₀ := by simp [T₀, hT, (hI _).X_sub_one_mem, hI₀.X_sub_one_mem] |
| 454 | -- Spanning: along any `ρ : A →+* R` and modulo any `N` containing the image of `T₀`, a |
| 455 | -- polynomial is homogenised by `X c`, which is `1` modulo `N`, and then divided. |
| 456 | have h_span {R : Type} [CommRing R] {ρ : A →+* R} {N : Ideal (MvPolynomial J R)} {j : ℕ} |
| 457 | {x : MvPolynomial J R} (hN : ∀ f ∈ T₀, map ρ f ∈ N) (hx : x.totalDegree ≤ j) : |
| 458 | ∃ s ∈ restrictSupport R (std (r ^ j)), mkₐ R N s = mkₐ R N x := by |
| 459 | have h_one : mkₐ R N (X c) = 1 := Ideal.Quotient.eq.mpr (by simpa using hN _ h_chart) |
| 460 | obtain ⟨G, hG, hGx⟩ := |
| 461 | exists_homogenization (isHomogeneous_X R c) x (hx.trans (Nat.lt_pow_self hr).le) |
| 462 | exact (h_div ρ hN).le ⟨G, hG, hGx _ h_one⟩ |
| 463 | -- Independence over `A`: the standard monomials are independent modulo each `I n`, so the |
| 464 | -- coefficients of a relation modulo `T` are killed by every `ψ n`. |
| 465 | have h_free {j : ℕ} {s : MvPolynomial J A} (hs : s ∈ restrictSupport A (std (r ^ j))) |
| 466 | (hsT : s ∈ T) : s = 0 := by |
| 467 | refine s.ext 0 fun m ↦ hψ (s.coeff m) fun n ↦ ?_ |
| 468 | have h_map : map (ψ n) s = 0 := eq_zero_of_ncard_le_finrank ((h_card j).trans_eq (h_rank n j)) |
| 469 | (fun _ h ↦ hs (support_map_subset _ _ h)) ((hT s).mp hsT n) |
| 470 | simp [← coeff_map, h_map] |
| 471 | -- An `f ∈ T` has remainder `0` modulo `T₀`, so lies in `T₀`, and its reduction lies in `I₀`. |
| 472 | have h_le : T.map (map φ) ≤ I₀ := by |
| 473 | refine T.map_le_of_le_comap fun f hf ↦ ?_ |
| 474 | obtain ⟨s, hs, hsf⟩ := |
| 475 | h_span (ρ := RingHom.id A) (N := T₀) (by simp [MvPolynomial.map_id]) f.totalDegree.le_refl |
| 476 | have hs0 : s = 0 := |
| 477 | h_free hs ((T.sub_mem_iff_left hf).mp (hT₀_le (Ideal.Quotient.eq.mp hsf))) |
| 478 | rw [hs0, map_zero, eq_comm, mkₐ_eq_mk, eq_zero_iff_mem] at hsf |
| 479 | exact Ideal.mem_comap.mpr (h_reduce₀ f hsf) |
| 480 | refine ⟨h_le.antisymm' fun f hf ↦ ?_, ?_⟩ |
| 481 | · -- The remainder of `f ∈ I₀` modulo the image of `T` lies in `I₀`, so is zero. |
| 482 | obtain ⟨s, hs, hsf⟩ := |
| 483 | h_span (N := T.map (map φ)) (fun g hg ↦ T.mem_map_of_mem (map φ) (hT₀_le hg)) |
| 484 | f.totalDegree.le_refl |
| 485 | have hs0 : s = 0 := eq_zero_of_ncard_le_finrank ((h_card _).trans_eq (h_rank₀ _)) hs |
| 486 | ((sub_mem_iff_left _ hf).mp (h_le (Ideal.Quotient.eq.mp hsf))) |
| 487 | rwa [hs0, map_zero, eq_comm, mkₐ_eq_mk, eq_zero_iff_mem] at hsf |
| 488 | · -- The standard monomials of the degrees `r ^ j` span modulo `T` and are independent. |
| 489 | exact flat_of_exists_restrictSupport_of_eq_zero T (S := fun j ↦ std (r ^ j)) |
| 490 | (fun j x hx ↦ h_span (ρ := RingHom.id A) |
| 491 | (fun f hf ↦ by simpa [MvPolynomial.map_id] using hT₀_le hf) hx) |
| 492 | (fun j s hs hsT ↦ h_free hs hsT) |
| 493 | |
| 494 | end CutOutIdeals |
| 495 | |
| 496 | /-! |
| 497 | ## The flat projective closure of a dense family of theta points |
| 498 | |
| 499 | A map to projective space is a line bundle `New.LineBundle` with `New.LineBundle.IsLinearSystem`. |
| 500 | Its transition functions `transition i j` are the ratios of coordinates `s j / s i` on the chart |
| 501 | `opens i`. `New.LineBundle.IsHomogeneousCoords` gives the homogeneous coordinates of a point. |
| 502 | `New.IsSeparatingFamily ξ` adds to `New.IsDenseFamily ξ` that the scheme is reduced. |
| 503 | -/ |
| 504 | |
| 505 | section FlatClosure |
| 506 | |
| 507 | open CategoryTheory AlgebraicGeometry Limits LineBundle MvPolynomial Scheme RingHom Flat pullback |
| 508 | Over PointFn |
| 509 | |
| 510 | /-- The ideals of a set `Z ⊂ K ^ J` are cut out at a point `t` of `S` with values in the field `K` |
| 511 | by the maps `P a` to projective space. That is: for every choice of charts `l a` of the `P a` that |
| 512 | contain `t` and every chart `c`, the vanishing ideal of the points `v ∈ Z` with `v c ≠ 0`, scaled to |
| 513 | `v c = 1`, satisfies `New.Variety.ThetaNull.IsCutOut r i σ c` for the affine coordinates of the |
| 514 | points `P a` at `t` (ranks `σ j` in the degrees `r ^ j`, and in the degrees `r ^ j` with `j ≤ i` |
| 515 | the forms of the ideal are those that vanish at these points). -/ |
| 516 | def IsCutOutAt {J I K : Type} [Field K] {S : Scheme} (r i : ℕ) (σ : ℕ → ℕ) (P : I → LineBundle S J) |
| 517 | (t : Spec (CommRingCat.of K) ⟶ S) (Z : Set (J → K)) : Prop := |
| 518 | -- `l a` is a chart of `P a` that contains `t`, in which `P a` gives a point of `K ^ J` |
| 519 | ∀ l : I → J, |
| 520 | (∀ a : I, LandsIn t ((P a).opens (l a))) → |
| 521 | ∀ c : J, |
| 522 | IsCutOut r i σ c (fun a j ↦ (P a).transition (l a) j (CommRingCat.of K) t) |
| 523 | (⨅ v ∈ {v ∈ Z | v c ≠ 0}, RingHom.ker (MvPolynomial.eval fun j ↦ v j / v c)) |
| 524 | |
| 525 | /-- Let the `P a` be linear systems on `S` with charts `l a` that contain the point |
| 526 | `s : Spec R ⟶ S`, and let `t = Spec φ ≫ s` for a ring map `φ : R → K` to a field. If the |
| 527 | ideals of `Z` are cut out by `P` at `t`, then in each chart `c` they are cut out by the images |
| 528 | under `φ` of the affine coordinates of the `P a` at `s`. -/ |
| 529 | lemma isCutOut_of_isCutOutAt {J I K : Type} {S : Scheme} {r i : ℕ} {σ : ℕ → ℕ} [Field K] |
| 530 | {P : I → LineBundle S J} (hP : ∀ a : I, (P a).IsLinearSystem) {R : CommRingCat} {s : Spec R ⟶ S} |
| 531 | {l : I → J} (hl : ∀ a : I, LandsIn s ((P a).opens (l a))) {φ : R ⟶ CommRingCat.of K} |
| 532 | {t : Spec (CommRingCat.of K) ⟶ S} {Z : Set (J → K)} (ht : Spec.map φ ≫ s = t) |
| 533 | (hZ : IsCutOutAt r i σ P t Z) (c : J) : |
| 534 | IsCutOut r i σ c (fun a : I ↦ φ.hom ∘ fun j : J ↦ (P a).transition (l a) j R s) |
| 535 | (⨅ v ∈ {v ∈ Z | v c ≠ 0}, RingHom.ker (MvPolynomial.eval fun j : J ↦ v j / v c)) := by |
| 536 | subst ht |
| 537 | -- The coordinates are regular on the chart, so they commute with `φ`. |
| 538 | have h_coord (a : I) (j : J) : |
| 539 | (P a).transition (l a) j (CommRingCat.of K) (Spec.map φ ≫ s) = |
| 540 | φ ((P a).transition (l a) j R s) := |
| 541 | ((hP a).isRegularOn_transition (l a) j) φ s (hl a) |
| 542 | simpa only [h_coord, Function.comp_def] using hZ l (fun a ↦ (hl a).comp (Spec.map φ)) c |
| 543 | |
| 544 | /-- `A` is a flat projective family over `S` spanned by points `e n z` over the complex points |
| 545 | `η n` of `S`, with homogeneous coordinates `θ n z` in the linear system `N`. -/ |
| 546 | structure IsFlatClosure {J W κ : Type} {S : Scheme} {η : κ → (Spec (CommRingCat.of ℂ) ⟶ S)} |
| 547 | (θ : κ → W → J → ℂ) {A : Over S} (N : LineBundle A.left J) |
| 548 | (e : ∀ n : κ, W → (Over.mk (η n) ⟶ A)) : Prop where |
| 549 | /-- `A` is proper over `S`, and the linear system `N` separates points with the same image |
| 550 | in `S`. -/ |
| 551 | isProjEmbedding : IsProjEmbedding N A.hom |
| 552 | /-- `A` is flat over `S`. -/ |
| 553 | flat : Flat A.hom |
| 554 | /-- The point `e n z` has homogeneous coordinates `θ n z`. -/ |
| 555 | isHomogeneousCoords (n : κ) (z : W) : IsHomogeneousCoords N (e n z).left (θ n z) |
| 556 | /-- The fibre over `η n` is reduced, and the points `e n z` are dense in it. -/ |
| 557 | isSeparatingFamily_fibre (n : κ) : |
| 558 | IsSeparatingFamily (X := pullback A.hom (η n)) fun z : W ↦ |
| 559 | pullback.lift (e n z).left (𝟙 (Spec (CommRingCat.of ℂ))) (e n z).w |
| 560 | /-- Every point of `S` specialises to a geometric point over which the fibre is reduced. -/ |
| 561 | allSpecializeTo_isReduced : AllSpecializeTo S fun t ↦ IsReduced (pullback A.hom t) |
| 562 | /-- `A` is reduced, and all the points `e n z` together are dense in it. -/ |
| 563 | isSeparatingFamily : IsSeparatingFamily fun s : κ × W ↦ (e s.1 s.2).left |
| 564 | |
| 565 | /-- The chart `c` of the linear system `L` on a scheme `X` over `Spec R` is affine, and `u` presents |
| 566 | its ring of sections as a quotient of the polynomial ring in the affine coordinates. Here |
| 567 | `specMap ψ` is the morphism of spectra given by a ring map `ψ`, and `ofSection g B t` is the value |
| 568 | of a section `g` at a `B`-valued point `t`. -/ |
| 569 | structure IsChartPresentation {J : Type} {X : Scheme} {R : CommRingCat} (L : LineBundle X J) |
| 570 | (s : X ⟶ Spec R) (c : J) (u : MvPolynomial J R →+* Γ(X, L.opens c)) : Prop where |
| 571 | /-- The chart is affine. -/ |
| 572 | isAffineOpen : IsAffineOpen (L.opens c) |
| 573 | /-- Every section over the chart is a polynomial in the coordinates. -/ |
| 574 | surjective : Function.Surjective u |
| 575 | /-- `u` is compatible with the structure maps to `Spec R`. -/ |
| 576 | specMap_comp_C : specMap (u.comp C) = isAffineOpen.fromSpec ≫ s |
| 577 | /-- At a point `t` of the chart, `u f` is the value of `f` at the affine coordinates of `t`. -/ |
| 578 | ofSection_eq {B : CommRingCat} {t : Spec B ⟶ X} (ht : LandsIn t (L.opens c)) |
| 579 | (f : MvPolynomial J R) : |
| 580 | ofSection (u f) B t = eval₂Hom (Spec.preimage (t ≫ s)).hom (L.transition c · B t) f |
| 581 | |
| 582 | section Charts |
| 583 | |
| 584 | variable {J : Type} {X : Scheme} {R : CommRingCat} {L : LineBundle X J} {s : X ⟶ Spec R} |
| 585 | {u : ∀ c : J, MvPolynomial J R →+* Γ(X, L.opens c)} |
| 586 | |
| 587 | private abbrev chartPresentationCover (hu : ∀ c : J, IsChartPresentation L s c (u c)) : |
| 588 | X.OpenCover := |
| 589 | (AffineOpenCover.ofIsOpenCover _ (cover L) fun c ↦ (hu c).isAffineOpen).openCover |
| 590 | |
| 591 | /-- `X` is flat over `Spec R` if the ring of each chart is a flat `R`-module. -/ |
| 592 | lemma flat_of_isChartPresentation (hu : ∀ c : J, IsChartPresentation L s c (u c)) |
| 593 | (h_flat : ∀ c : J, Module.Flat R (MvPolynomial J R ⧸ ker (u c))) : Flat s := by |
| 594 | refine HasRingHomProperty.instIsZariskiLocalAtSource.of_openCover |
| 595 | (chartPresentationCover hu) fun c ↦ ?_ |
| 596 | -- (`RespectsIso` takes the property with its implicit arguments, hence `@`) |
| 597 | obtain ⟨h_comp_equiv, -⟩ : RingHom.RespectsIso @RingHom.Flat := respectsIso |
| 598 | have h_alg : ((u c).comp C).Flat := h_comp_equiv _ |
| 599 | (quotientKerEquivOfSurjective (hu c).surjective) (flat_algebraMap_iff.mpr (h_flat c)) |
| 600 | have h_spec : Flat (specMap ((u c).comp C)) := SpecMap_iff.mpr h_alg |
| 601 | rwa [(hu c).specMap_comp_C] at h_spec |
| 602 | |
| 603 | /-- `X` is reduced if the ideal of each chart is radical. -/ |
| 604 | lemma isReduced_of_isChartPresentation (hu : ∀ c : J, IsChartPresentation L s c (u c)) |
| 605 | (h_rad : ∀ c : J, (ker (u c)).IsRadical) : IsReduced X := by |
| 606 | let charts := chartPresentationCover hu |
| 607 | have h_chart (c : charts.I₀) : IsReduced (charts.X c) := |
| 608 | (affine_isReduced_iff _).mpr |
| 609 | ((ker_isRadical_iff_reduced_of_surjective (hu c).surjective).mp (h_rad c)) |
| 610 | exact IsReduced.of_openCover X charts |
| 611 | |
| 612 | end Charts |
| 613 | |
| 614 | /-- Complex points `x v` of a complex scheme `X`, with homogeneous coordinates `θ v`, are dense if |
| 615 | in each chart `c` a polynomial vanishing at all the `θ v` with `θ v c ≠ 0`, scaled to `θ v c = 1`, |
| 616 | lies in the ideal of the chart. -/ |
| 617 | lemma isDenseFamily_of_isChartPresentation {J W : Type} {X : Scheme} {L : LineBundle X J} |
| 618 | {s : X ⟶ Spec (CommRingCat.of ℂ)} {u : ∀ c : J, MvPolynomial J ℂ →+* Γ(X, L.opens c)} |
| 619 | (hu : ∀ c : J, IsChartPresentation L s c (u c)) {x : W → (Spec (CommRingCat.of ℂ) ⟶ X)} |
| 620 | (hx_over : ∀ v : W, x v ≫ s = 𝟙 (Spec (CommRingCat.of ℂ))) {θ : W → J → ℂ} |
| 621 | (hx : ∀ v : W, L.IsHomogeneousCoords (x v) (θ v)) |
| 622 | (h_ideal : ∀ c : J, |
| 623 | ⨅ v ∈ {v ∈ Set.range θ | v c ≠ 0}, ker (MvPolynomial.eval (v · / v c)) ≤ ker (u c)) : |
| 624 | IsDenseFamily x := by |
| 625 | -- Otherwise a basic open set of some `u c f` contains a point `y` and misses all the `x v`. |
| 626 | -- Then `f` vanishes at the `θ v`, so `u c f = 0` and the basic open set is empty. |
| 627 | change ∀ y : X, y ∈ closure (Set.range fun v : W ↦ x v (IsLocalRing.closedPoint ℂ)) |
| 628 | intro y |
| 629 | by_contra hy |
| 630 | obtain ⟨c, hc⟩ := TopologicalSpace.IsOpenCover.exists_mem (cover L) y |
| 631 | -- the open complement of the closure of the points |
| 632 | let V : X.Opens := |
| 633 | ⟨(closure (Set.range fun v : W ↦ x v (IsLocalRing.closedPoint ℂ)))ᶜ, |
| 634 | isClosed_closure.isOpen_compl⟩ |
| 635 | obtain ⟨f, hf_sub, hf_y⟩ : |
| 636 | ∃ f : MvPolynomial J ℂ, X.basicOpen (u c f) ≤ V ∧ y ∈ X.basicOpen (u c f) := |
| 637 | (hu c).surjective.exists.1 ((hu c).isAffineOpen.exists_basicOpen_le (V := V) ⟨y, hy⟩ hc) |
| 638 | have hf_vanish (v : W) (hv : θ v c ≠ 0) : MvPolynomial.eval (θ v · / θ v c) f = 0 := by |
| 639 | by_contra hf_v |
| 640 | obtain ⟨h_lands_iff, h_ratio⟩ := hx v c |
| 641 | have h_in : LandsIn (x v) (L.opens c) := h_lands_iff.2 hv.isUnit |
| 642 | have h_value : ofSection (u c f) _ (x v) = MvPolynomial.eval (θ v · / θ v c) f := by |
| 643 | simp [(hu c).ofSection_eq h_in, hx_over, h_ratio, hv, div_eq_mul_inv] |
| 644 | have h_basic : LandsIn (x v) (X.basicOpen (u c f)) := by |
| 645 | rw [landsIn_basicOpen h_in, h_value] |
| 646 | exact Ne.isUnit hf_v |
| 647 | exact hf_sub (landsIn_iff_mem.1 h_basic) (subset_closure ⟨v, rfl⟩) |
| 648 | have hf_zero : u c f = 0 := h_ideal c (by simpa using hf_vanish) |
| 649 | simp [hf_zero] at hf_y |
| 650 | |
| 651 | /-- In the chart `c` of the base change of `z : A ⟶ S` along `b`, a map `φ` kills the ideal of the |
| 652 | chart exactly when the `φ (X j)` are the coordinates of a point of `A` in the chart `c` that lies |
| 653 | over the point of `S` given by `φ.comp C` and `b`. -/ |
| 654 | lemma IsChartPresentation.ker_le_ker_iff {J B : Type} [CommRing B] {A S : Scheme} |
| 655 | {N : LineBundle A J} {z : A ⟶ S} {R : CommRingCat} {b : Spec R ⟶ S} {c : J} |
| 656 | {u : MvPolynomial J R →+* Γ(pullback z b, (N.pull (fst z b)).opens c)} |
| 657 | (hu : IsChartPresentation (N.pull (fst z b)) (snd z b) c u) (φ : MvPolynomial J R →+* B) : |
| 658 | ker u ≤ ker φ ↔ ∃ y : Spec (CommRingCat.of B) ⟶ A, LandsIn y (N.opens c) ∧ |
| 659 | y ≫ z = specMap (φ.comp C) ≫ b ∧ |
| 660 | ∀ j : J, N.transition c j (CommRingCat.of B) y = φ (X j) := by |
| 661 | constructor |
| 662 | · intro h_le |
| 663 | -- `φ` factors as `ψ ∘ u`; the point is `Spec ψ` followed by the chart. |
| 664 | obtain ⟨ψ, rfl⟩ : ∃ ψ : Γ(pullback z b, (N.pull (fst z b)).opens c) →+* B, ψ.comp u = φ := |
| 665 | ⟨u.liftOfSurjective hu.surjective ⟨φ, h_le⟩, u.liftOfSurjective_comp hu.surjective ⟨φ, h_le⟩⟩ |
| 666 | let y : Spec (CommRingCat.of B) ⟶ pullback z b := specMap ψ ≫ hu.isAffineOpen.fromSpec |
| 667 | have h_in : LandsIn y ((N.pull (fst z b)).opens c) := landsIn_fromSpec _ _ |
| 668 | have h_eval : ψ.comp u = eval₂Hom (Spec.preimage (y ≫ snd z b)).hom |
| 669 | ((N.pull (fst z b)).transition c · (CommRingCat.of B) y) := |
| 670 | ext fun f ↦ (ofSection_map_fromSpec _ (u f) _).symm.trans (hu.ofSection_eq h_in f) |
| 671 | refine ⟨y ≫ fst z b, landsIn_preimage.1 h_in, ?_, ?_⟩ |
| 672 | · simp [h_eval, condition, specMap] |
| 673 | · simp [h_eval] |
| 674 | · rintro ⟨y, hy_in, hy_over, hy_coord⟩ f hf |
| 675 | let y' : Spec (CommRingCat.of B) ⟶ pullback z b := lift y (specMap (φ.comp C)) hy_over |
| 676 | have h_in : LandsIn y' ((N.pull (fst z b)).opens c) := by simpa [y', lift_fst] |
| 677 | -- At the lift of `y`, the value of `u f` is `φ f`; it is zero as `u f = 0`. |
| 678 | have h_value : ofSection (u f) (CommRingCat.of B) y' = φ f := by |
| 679 | simpa [y', hy_coord, ← hom_eval₂, lift_snd, lift_fst] using hu.ofSection_eq h_in f |
| 680 | simp [mem_ker, ← h_value, mem_ker.1 hf] |
| 681 | |
| 682 | /-- Let `A` be reduced, `z : A ⟶ S`, and let `u` present the chart `c` of the pullback of the line |
| 683 | bundle `N` to the base change of `A` to the local ring of `S` at `p`. Let the complex points `x` be |
| 684 | dense in `A`, with finitely many images in `S`. Then a polynomial `f` over the local ring lies in |
| 685 | the kernel of `u` exactly when `u f` vanishes at every lift of a point `x w` to the base change |
| 686 | that lies in the chart. -/ |
| 687 | lemma IsChartPresentation.mem_ker_iff_forall_lift {J V : Type} {A S : Scheme} [IsReduced A] |
| 688 | {N : LineBundle A J} {z : A ⟶ S} {p : S} {c : J} |
| 689 | {u : MvPolynomial J (S.presheaf.stalk p) →+* |
| 690 | Γ(pullback z (S.fromSpecStalk p), (N.pull (fst z (S.fromSpecStalk p))).opens c)} |
| 691 | (hu : IsChartPresentation (N.pull (fst z (S.fromSpecStalk p))) (snd z (S.fromSpecStalk p)) c u) |
| 692 | {x : V → (Spec (CommRingCat.of ℂ) ⟶ A)} (h_dense : IsDenseFamily x) |
| 693 | (h_finite : (Set.range (x · ≫ z)).Finite) (f : MvPolynomial J (S.presheaf.stalk p)) : |
| 694 | f ∈ ker u ↔ ∀ (w : V) (ψ : S.presheaf.stalk p ⟶ CommRingCat.of ℂ) |
| 695 | (hψ : Spec.map ψ ≫ S.fromSpecStalk p = x w ≫ z), |
| 696 | LandsIn (lift (x w) (Spec.map ψ) hψ.symm) ((N.pull (fst z (S.fromSpecStalk p))).opens c) → |
| 697 | ofSection (u f) (CommRingCat.of ℂ) (lift (x w) (Spec.map ψ) hψ.symm) = 0 := by |
| 698 | constructor |
| 699 | · intro hf w ψ hψ _ |
| 700 | simp [mem_ker.1 hf] |
| 701 | · -- `u f` and `0` agree at the lifts, so they agree at the point `fromSpec` of the chart. |
| 702 | intro h_pts |
| 703 | have h_at_fromSpec : |
| 704 | ofSection (u f) _ (Spec.map (𝟙 _) ≫ hu.isAffineOpen.fromSpec) = 0 := |
| 705 | (isSeparatingFamily_stalk h_dense h_finite p).pointFn_ext (g := 0) (isRegularOn_ofSection _) |
| 706 | (by simp [IsRegularOn]) (fun ⟨w, ψ, hψ⟩ ↦ h_pts w ψ hψ) _ _ (landsIn_fromSpec _ _) |
| 707 | rwa [ofSection_map_fromSpec] at h_at_fromSpec |
| 708 | |
| 709 | /-- Let `A` and `S` be reduced schemes with `z : A ⟶ S`, and let `u` present the chart `c` of the |
| 710 | pullback of the line bundle `N` to the base change of `A` to the local ring of `S` at `p`. Let the |
| 711 | complex points `x (a, v)` be dense in `A`, lie over the complex points `ξ a` of `S` (finitely many |
| 712 | `a`), and have homogeneous coordinates `θ a v` for `N`. Then a polynomial `f` over the local ring |
| 713 | lies in the kernel of `u` exactly when, for every `a` and every `ψ : stalk → ℂ` through which `ξ a` |
| 714 | factors, the image of `f` under `ψ` vanishes at every point `θ a v / (θ a v) c` with |
| 715 | `(θ a v) c ≠ 0`. -/ |
| 716 | lemma IsChartPresentation.mem_ker_stalk_iff {J W ι : Type} [Finite ι] {A S : Scheme} [IsReduced A] |
| 717 | {N : LineBundle A J} {z : A ⟶ S} {p : S} {c : J} |
| 718 | {u : MvPolynomial J (S.presheaf.stalk p) →+* |
| 719 | Γ(pullback z (S.fromSpecStalk p), (N.pull (fst z (S.fromSpecStalk p))).opens c)} |
| 720 | (hu : IsChartPresentation (N.pull (fst z (S.fromSpecStalk p))) (snd z (S.fromSpecStalk p)) c u) |
| 721 | {ξ : ι → (Spec (CommRingCat.of ℂ) ⟶ S)} {θ : ι → W → J → ℂ} |
| 722 | {x : ι × W → (Spec (CommRingCat.of ℂ) ⟶ A)} (h_dense : IsDenseFamily x) |
| 723 | (h_over : ∀ w : ι × W, x w ≫ z = ξ w.1) |
| 724 | (h_coords : ∀ w : ι × W, N.IsHomogeneousCoords (x w) (θ w.1 w.2)) |
| 725 | (f : MvPolynomial J (S.presheaf.stalk p)) : |
| 726 | f ∈ ker u ↔ |
| 727 | ∀ (a : ι) (ψ : S.presheaf.stalk p ⟶ CommRingCat.of ℂ), |
| 728 | Spec.map ψ ≫ S.fromSpecStalk p = ξ a → |
| 729 | MvPolynomial.map ψ.hom f ∈ |
| 730 | ⨅ v ∈ {v ∈ Set.range (θ a) | v c ≠ 0}, ker (MvPolynomial.eval (v · / v c)) := by |
| 731 | have h_finite : (Set.range (x · ≫ z)).Finite := |
| 732 | (Set.finite_range ξ).subset (Set.range_subset_iff.2 fun w ↦ ⟨w.1, (h_over w).symm⟩) |
| 733 | -- At a lift of `x w` in the chart, the value of `u f` is `eval (θ · / θ c)` of the image of `f`. |
| 734 | have h_value (w : ι × W) (ψ : S.presheaf.stalk p ⟶ CommRingCat.of ℂ) |
| 735 | (hψ : Spec.map ψ ≫ S.fromSpecStalk p = x w ≫ z) |
| 736 | (h_in : LandsIn (lift (x w) (Spec.map ψ) hψ.symm) |
| 737 | ((N.pull (fst z (S.fromSpecStalk p))).opens c)) (h_ne : θ w.1 w.2 c ≠ 0) : |
| 738 | ofSection (u f) (CommRingCat.of ℂ) (lift (x w) (Spec.map ψ) hψ.symm) = |
| 739 | MvPolynomial.eval (θ w.1 w.2 · / θ w.1 w.2 c) (MvPolynomial.map ψ.hom f) := by |
| 740 | simp [hu.ofSection_eq h_in, h_coords .., h_ne, div_eq_mul_inv] |
| 741 | -- The lift of `x w` lies in the chart `c` exactly when the coordinate `θ w.1 w.2 c` is nonzero. |
| 742 | have h_in_iff (w : ι × W) (ψ : S.presheaf.stalk p ⟶ CommRingCat.of ℂ) |
| 743 | (hψ : Spec.map ψ ≫ S.fromSpecStalk p = x w ≫ z) : |
| 744 | LandsIn (lift (x w) (Spec.map ψ) hψ.symm) ((N.pull (fst z (S.fromSpecStalk p))).opens c) ↔ |
| 745 | θ w.1 w.2 c ≠ 0 := by |
| 746 | simp [(h_coords w c).1] |
| 747 | -- The lifts of the `x w` to the base change separate functions. |
| 748 | rw [hu.mem_ker_iff_forall_lift h_dense h_finite] |
| 749 | simp only [Submodule.mem_iInf, Set.mem_ofPred_eq, and_imp, Set.forall_mem_range, mem_ker] |
| 750 | constructor |
| 751 | · intro h_pts a ψ hψ v hv |
| 752 | have hψ' : Spec.map ψ ≫ S.fromSpecStalk p = x (a, v) ≫ z := hψ.trans (h_over (a, v)).symm |
| 753 | have h_in := (h_in_iff (a, v) ψ hψ').mpr hv |
| 754 | rw [← h_value (a, v) ψ hψ' h_in hv] |
| 755 | exact h_pts (a, v) ψ hψ' h_in |
| 756 | · intro h_pts w ψ hψ h_in |
| 757 | have h_ne : θ w.1 w.2 c ≠ 0 := (h_in_iff w ψ hψ).mp h_in |
| 758 | rw [h_value w ψ hψ h_in h_ne] |
| 759 | exact h_pts w.1 ψ (hψ.trans (h_over w)) w.2 h_ne |
| 760 | |
| 761 | /-- If the base change of `z` to the local ring at `p` is flat, then `z` is flat at every point |
| 762 | whose image generalises `p`. -/ |
| 763 | lemma flat_stalkMap_of_flat_snd {A S : Scheme} {z : A ⟶ S} {p : S} |
| 764 | (h_flat : Flat (snd z (S.fromSpecStalk p))) {a : A} (ha : z a ⤳ p) : |
| 765 | (z.stalkMap a).hom.Flat := by |
| 766 | let s : Spec (S.presheaf.stalk p) ⟶ S := S.fromSpecStalk p |
| 767 | have h_flat_comp : Flat (fst z s ≫ z) := by |
| 768 | rw [condition] |
| 769 | infer_instance |
| 770 | -- `a` comes from a point `y` of the base change, and `fst z s` is bijective on stalks. |
| 771 | obtain ⟨y, rfl⟩ : a ∈ Set.range (fst z s) := |
| 772 | (Pullback.range_fst z s).ge (range_fromSpecStalk.ge ha) |
| 773 | have h_stalk : ((fst z s ≫ z).stalkMap y).hom.Flat := stalkMap _ y |
| 774 | rw [Hom.stalkMap_comp] at h_stalk |
| 775 | exact (comp_iff_of_bijective_left (stalkMap_bijective_of_flat (fst z s) y)).1 h_stalk |
| 776 | |
| 777 | /-- Complex points `ξ w` of `S` and nonzero vectors `θ w` give points of `ℙ^J × S`. Their reduced |
| 778 | closure `A` is projective over `S`, with dense points `x w` over `ξ w` with coordinates `θ w`. -/ |
| 779 | lemma exists_reduced_projective_closure {J Ω : Type} [Finite J] {S : Scheme} |
| 780 | (ξ : Ω → (Spec (CommRingCat.of ℂ) ⟶ S)) {θ : Ω → J → ℂ} (hθ : ∀ w : Ω, θ w ≠ 0) : |
| 781 | ∃ (A : Scheme) (z : A ⟶ S) (N : LineBundle A J) (x : Ω → (Spec (CommRingCat.of ℂ) ⟶ A)), |
| 782 | N.IsProjEmbedding z ∧ |
| 783 | IsSeparatingFamily x ∧ |
| 784 | (∀ w : Ω, x w ≫ z = ξ w) ∧ |
| 785 | ∀ w : Ω, N.IsHomogeneousCoords (x w) (θ w) := by |
| 786 | -- Each `θ w` has a nonzero, hence unit, entry `θ w (c w)`. |
| 787 | choose c hc using fun w : Ω ↦ Function.ne_iff.1 (hθ w) |
| 788 | -- `p w` is a point of `ℙ^J × S` over `ξ w` with homogeneous coordinates `θ w` for `O(1)`. |
| 789 | choose p hp_over hp_coords using fun w : Ω ↦ |
| 790 | ProjSpace.exists_isHomogeneousCoords (ξ w) (hc w).isUnit |
| 791 | -- `A` is the reduced closure of the points `p w`, embedded by the pull-back of `O(1)`. |
| 792 | obtain ⟨A, ε, x, h_closed, h_fac, h_sep⟩ := exists_reduced_closure p |
| 793 | refine ⟨A, ε ≫ Limits.prod.snd, ((ProjSpace.hyperplaneBundle J).pull Limits.prod.fst).pull ε, x, |
| 794 | isProjEmbedding_projSpace.comp ε, h_sep, ?_, ?_⟩ |
| 795 | · simpa [← h_fac] using hp_over |
| 796 | · simpa [← h_fac, ← IsHomogeneousCoords.pull_iff] using hp_coords |
| 797 | |
| 798 | /-- The main step towards `exists_isFlatClosure`. Let `S` be reduced, with finitely many dense |
| 799 | complex points `η (j a)`, and at every `η n` the ideals of the vectors `θ n v` are cut out by the |
| 800 | linear systems `P`, where `1 < r` and `i` is a degree bound for the ranks `σ`. Let `A` be reduced |
| 801 | over `S`, with dense complex points `x₀ (a, v)` over `η (j a)` with homogeneous coordinates |
| 802 | `θ (j a) v` for `N`, and let `u b c` present the chart `c` of the base change of `A` along each `b`. |
| 803 | At a field-valued point `t` of `S` where the ideals of `Z` are cut out by `P`: the base change of |
| 804 | `A` to the local ring of `S` at the image of `t` is flat, and in each chart `c` the ideal of the |
| 805 | fibre over `t` is the vanishing ideal of the `v ∈ Z` with `v c ≠ 0`, scaled to `v c = 1`. -/ |
| 806 | lemma flat_snd_and_iInf_ker_eq_of_isCutOutAt {J W ι I κ : Type} {S : Scheme} {r i : ℕ} |
| 807 | {σ : ℕ → ℕ} [Finite J] [Finite ι] [IsReduced S] {j : ι → κ} |
| 808 | {η : κ → (Spec (CommRingCat.of ℂ) ⟶ S)} (hη_dense : IsDenseFamily fun a : ι ↦ η (j a)) |
| 809 | {P : I → LineBundle S J} (h_lin : ∀ a : I, (P a).IsLinearSystem) (hr : 1 < r) |
| 810 | (h_deg : IsCutDegree J i r σ) {θ : κ → W → J → ℂ} |
| 811 | (h_fib : ∀ n : κ, IsCutOutAt r i σ P (η n) (Set.range (θ n))) |
| 812 | {A : Scheme} [IsReduced A] {z : A ⟶ S} {N : LineBundle A J} |
| 813 | {x₀ : ι × W → (Spec (CommRingCat.of ℂ) ⟶ A)} (hx₀_dense : IsDenseFamily x₀) |
| 814 | (h_over : ∀ w : ι × W, x₀ w ≫ z = η (j w.1)) |
| 815 | (h_coords : ∀ w : ι × W, N.IsHomogeneousCoords (x₀ w) (θ (j w.1) w.2)) |
| 816 | {u : ∀ {R : CommRingCat} (b : Spec R ⟶ S) (c : J), |
| 817 | MvPolynomial J R →+* Γ(pullback z b, (N.pull (fst z b)).opens c)} |
| 818 | (hu : ∀ {R : CommRingCat} (b : Spec R ⟶ S) (c : J), |
| 819 | IsChartPresentation (N.pull (fst z b)) (snd z b) c (u b c)) |
| 820 | {k : Type} [Field k] {t : Spec (.of k) ⟶ S} {Z : Set (J → k)} |
| 821 | (hZ : IsCutOutAt r i σ P t Z) : |
| 822 | Flat (snd z (S.fromSpecStalk (t (IsLocalRing.closedPoint k)))) ∧ |
| 823 | ∀ c : J, ⨅ v ∈ {v ∈ Z | v c ≠ 0}, ker (eval (v · / v c)) = ker (u t c) := by |
| 824 | -- In each chart, `eq_map_and_flat_of_isCutOut` over the local ring at `t` gives both claims. |
| 825 | let p : S := t (IsLocalRing.closedPoint k) |
| 826 | let s : Spec (S.presheaf.stalk p) ⟶ S := S.fromSpecStalk p |
| 827 | have ht : Spec.map (stalkClosedPointTo t) ≫ s = t := Spec_stalkClosedPointTo_fromSpecStalk t |
| 828 | choose l hl using fun a : I ↦ (P a).exists_landsIn s |
| 829 | -- `ker (u s c)` is the intersection of the cut-out ideals at the `η (j a)` that factor through |
| 830 | -- `s`, so it has a flat quotient and reduces at `t` to the ideal of `Z`. |
| 831 | have h_map_eq_flat (c : J) : ⨅ v ∈ {v ∈ Z | v c ≠ 0}, ker (eval (v · / v c)) = |
| 832 | (ker (u s c)).map (MvPolynomial.map (stalkClosedPointTo t).hom) ∧ |
| 833 | Module.Flat (S.presheaf.stalk p) (MvPolynomial J (S.presheaf.stalk p) ⧸ ker (u s c)) := by |
| 834 | -- The other points are the complex points `ψ` of the local ring over some `η (j a)`; the ideal |
| 835 | -- cut out there is that of the vectors `θ (j a) v`. |
| 836 | let Pts : Type := |
| 837 | Σ' (a : ι) (ψ : S.presheaf.stalk p ⟶ CommRingCat.of ℂ), Spec.map ψ ≫ s = η (j a) |
| 838 | let idealAt (n : Pts) : Ideal (MvPolynomial J ℂ) := |
| 839 | ⨅ v ∈ {v ∈ Set.range (θ (j n.fst)) | v c ≠ 0}, ker (eval (v · / v c)) |
| 840 | refine eq_map_and_flat_of_isCutOut (κ := Pts) (I := idealAt) (stalkClosedPointTo t).hom |
| 841 | (ker (u s c)) (stalk_eq_zero_of_dense hη_dense) hr h_deg |
| 842 | (isCutOut_of_isCutOutAt h_lin hl ht hZ c) |
| 843 | (fun ⟨a, ψ, hψ⟩ ↦ isCutOut_of_isCutOutAt h_lin hl hψ (h_fib (j a)) c) fun f ↦ ?_ |
| 844 | rw [(hu s c).mem_ker_stalk_iff (ξ := fun a ↦ η (j a)) (θ := fun a ↦ θ (j a)) |
| 845 | hx₀_dense h_over h_coords f] |
| 846 | exact ⟨fun h ⟨a, ψ, hψ⟩ ↦ h a ψ hψ, fun h a ψ hψ ↦ h ⟨a, ψ, hψ⟩⟩ |
| 847 | constructor |
| 848 | · exact flat_of_isChartPresentation (hu s) fun c ↦ (h_map_eq_flat c).right |
| 849 | · refine fun c ↦ (h_map_eq_flat c).left.trans (eq_of_forall_ge_iff fun 𝔞 ↦ ?_) |
| 850 | -- The reduction of `ker (u s c)` is `ker (u t c)`: both lie in the same ideals `𝔞`. |
| 851 | rw [← 𝔞.mk_ker, Ideal.map_le_iff_le_comap, comap_ker, (hu s c).ker_le_ker_iff, |
| 852 | (hu t c).ker_le_ker_iff] |
| 853 | simp [comp_assoc, ht, specMap] |
| 854 | |
| 855 | /-- Let `N` embed `A` in projective space over `S` along `z`, let `ξ` be a complex point of `S`, and |
| 856 | let `u` present the chart `c` of the fibre of `A` over `ξ`. A vector `θ₀` with `θ₀ c ≠ 0` whose |
| 857 | evaluation (scaled to `θ₀ c = 1`) vanishes on the ideal of the chart is the vector of homogeneous |
| 858 | coordinates of a point of `A` over `ξ`. -/ |
| 859 | lemma exists_isHomogeneousCoords_of_ker_le_ker {J : Type} {A S : Scheme} {z : A ⟶ S} |
| 860 | {N : LineBundle A J} (h_emb : N.IsProjEmbedding z) {ξ : Spec (CommRingCat.of ℂ) ⟶ S} {c : J} |
| 861 | {u : MvPolynomial J (CommRingCat.of ℂ) →+* Γ(pullback z ξ, (N.pull (fst z ξ)).opens c)} |
| 862 | (hu : IsChartPresentation (N.pull (fst z ξ)) (snd z ξ) c u) {θ₀ : J → ℂ} (hc : θ₀ c ≠ 0) |
| 863 | (h_le : ker u ≤ ker (eval (θ₀ · / θ₀ c))) : |
| 864 | ∃ x : Over.mk ξ ⟶ Over.mk z, N.IsHomogeneousCoords x.left θ₀ := by |
| 865 | obtain ⟨y, hy_in, hy_over, hy_coord⟩ : ∃ y : Spec (CommRingCat.of ℂ) ⟶ A, LandsIn y (N.opens c) ∧ |
| 866 | y ≫ z = specMap ((eval (θ₀ · / θ₀ c)).comp C) ≫ ξ ∧ |
| 867 | ∀ j : J, N.transition c j (CommRingCat.of ℂ) y = eval (θ₀ · / θ₀ c) (X j) := |
| 868 | (hu.ker_le_ker_iff _).mp h_le |
| 869 | -- `θ₀` is `θ₀ c` times the affine coordinates of `y` in the chart `c`. |
| 870 | have h_scale : θ₀ c • (N.transition c · (.of ℂ) y) = θ₀ := |
| 871 | funext fun k ↦ by simp [hy_coord, mul_div_cancel₀ _ hc] |
| 872 | have hy : N.IsHomogeneousCoords y θ₀ := by |
| 873 | rw [← h_scale] |
| 874 | exact (h_emb.isLinearSystem.isHomogeneousCoords_transition hy_in).smul hc.isUnit |
| 875 | have hy_w : y ≫ z = ξ := by simp [hy_over, MvPolynomial.eval, specMap] |
| 876 | exact ⟨Over.homMk y hy_w, hy⟩ |
| 877 | |
| 878 | /-- Let `S` be reduced, with complex points `η n` of which finitely many, the `η (j a)`, are dense. |
| 879 | Let nonzero vectors `θ n v` be given whose ideals are cut out at `η n` by linear systems `P a` |
| 880 | (`IsCutOutAt`: ranks `σ m` in every degree `r ^ m`, vanishing in the degrees `r ^ m` with `m ≤ i`), |
| 881 | where `r > 1` and `i` is a degree bound for the ranks `σ`. Let every point of `S` specialise to a |
| 882 | geometric point where some set has its ideals cut out by `P`. Then the `θ n v` are the coordinates |
| 883 | of points spanning a flat projective family over `S`. -/ |
| 884 | lemma exists_isFlatClosure {J W ι I κ : Type} {S : Scheme} {r i : ℕ} {σ : ℕ → ℕ} [Finite J] |
| 885 | [Finite ι] [IsReduced S] (j : ι → κ) {η : κ → (Spec (CommRingCat.of ℂ) ⟶ S)} |
| 886 | (hη_dense : IsDenseFamily fun a : ι ↦ η (j a)) {P : I → LineBundle S J} |
| 887 | (h_lin : ∀ a : I, (P a).IsLinearSystem) (hr : 1 < r) (h_deg : IsCutDegree J i r σ) |
| 888 | {θ : κ → W → J → ℂ} (hθ : ∀ (n : κ) (v : W), θ n v ≠ 0) |
| 889 | (h_fib : ∀ n : κ, IsCutOutAt r i σ P (η n) (Set.range (θ n))) |
| 890 | (h_specialize_cut : AllSpecializeTo S fun {k : Type} [Field k] (t : Spec (.of k) ⟶ S) ↦ |
| 891 | ∃ Z : Set (J → k), IsCutOutAt r i σ P t Z) : |
| 892 | ∃ (A : Over S) (N : LineBundle A.left J) (e : ∀ n : κ, W → (Over.mk (η n) ⟶ A)), |
| 893 | IsFlatClosure θ N e := by |
| 894 | -- `A` is the reduced closure in `ℙ^J × S` of the points `θ (j a) v`. In each chart, |
| 895 | -- `eq_map_and_flat_of_isCutOut` over the local ring at a point `t` with `IsCutOutAt` shows that |
| 896 | -- `A` is flat there and that the fibre over `t` has the vanishing ideal of `Z`. |
| 897 | obtain ⟨A, z, N, x₀, h_emb, ⟨hA_red, h_dense⟩, h_over, h_coords⟩ : |
| 898 | ∃ (A : Scheme) (z : A ⟶ S) (N : LineBundle A J) (x₀ : ι × W → (Spec (.of ℂ) ⟶ A)), |
| 899 | N.IsProjEmbedding z ∧ IsSeparatingFamily x₀ ∧ (∀ w : ι × W, x₀ w ≫ z = η (j w.1)) ∧ |
| 900 | ∀ w : ι × W, N.IsHomogeneousCoords (x₀ w) (θ (j w.1) w.2) := |
| 901 | exists_reduced_projective_closure (fun w : ι × W ↦ η (j w.1)) fun w ↦ hθ (j w.1) w.2 |
| 902 | -- After base change along `b`, the ring of the chart `c` is `MvPolynomial J R ⧸ ker (u b c)`. |
| 903 | have h_chart {R : CommRingCat} (b : Spec R ⟶ S) (c : J) : |
| 904 | ∃ u, IsChartPresentation (N.pull (fst z b)) (snd z b) c u := by |
| 905 | obtain ⟨h_aff, u, h_surj, h_snd, h_ev⟩ := |
| 906 | (h_emb.of_isPullback (.of_hasPullback z b)).exists_affine_chart c |
| 907 | exact ⟨u, h_aff, h_surj, h_snd, h_ev⟩ |
| 908 | -- (`@` keeps the ring `R` an implicit argument of `u`) |
| 909 | choose u hu using @h_chart |
| 910 | -- Main step, at a point `t` where the ideals of `Z` are cut out by `P`: flatness over the local |
| 911 | -- ring at `t`, and the ideal of the fibre in each chart. |
| 912 | have h_fibre {k : Type} [Field k] {t : Spec (.of k) ⟶ S} {Z : Set (J → k)} |
| 913 | (hZ : IsCutOutAt r i σ P t Z) : |
| 914 | Flat (snd z (S.fromSpecStalk (t (IsLocalRing.closedPoint k)))) ∧ |
| 915 | ∀ c : J, ⨅ v ∈ {v ∈ Z | v c ≠ 0}, ker (eval (v · / v c)) = ker (u t c) := |
| 916 | flat_snd_and_iInf_ker_eq_of_isCutOutAt hη_dense h_lin hr h_deg h_fib h_dense h_over h_coords hu |
| 917 | hZ |
| 918 | -- In each chart the ideal is an intersection of kernels of maps to a field, hence radical. |
| 919 | have h_reduced {k : Type} [Field k] {t : Spec (.of k) ⟶ S} {Z : Set (J → k)} |
| 920 | (hZ : IsCutOutAt r i σ P t Z) : IsReduced (pullback z t) := by |
| 921 | obtain ⟨-, h_ker⟩ := h_fibre hZ |
| 922 | refine isReduced_of_isChartPresentation (hu t) fun c ↦ ?_ |
| 923 | rw [← h_ker c] |
| 924 | exact Ideal.isRadical_iInf _ fun v ↦ Ideal.isRadical_iInf _ fun _ ↦ |
| 925 | (ker_isPrime _).isRadical |
| 926 | -- Every `θ n v` is a point of `A` over `η n`, as evaluation at it kills the ideal of the fibre. |
| 927 | have h_point (n : κ) (v : W) : ∃ x : mk (η n) ⟶ mk z, N.IsHomogeneousCoords x.left (θ n v) := by |
| 928 | obtain ⟨c, hc⟩ : ∃ c : J, θ n v c ≠ 0 := Function.ne_iff.1 (hθ n v) |
| 929 | obtain ⟨-, h_ker⟩ := h_fibre (h_fib n) |
| 930 | have h_le : ker (u (η n) c) ≤ RingHom.ker (eval (θ n v · / θ n v c)) := |
| 931 | (h_ker c).ge.trans (iInf₂_le _ ⟨⟨v, rfl⟩, hc⟩) |
| 932 | exact exists_isHomogeneousCoords_of_ker_le_ker h_emb (hu (η n) c) hc h_le |
| 933 | choose x hx using h_point |
| 934 | -- Flatness at `a`: `z a` specialises to a point where ideals are cut out. |
| 935 | have h_flat : Flat z := by |
| 936 | refine .of_stalkMap _ fun a ↦ ?_ |
| 937 | obtain ⟨k, _, _, t, h_spec, Z, hZ⟩ := h_specialize_cut (z a) |
| 938 | exact flat_stalkMap_of_flat_snd (h_fibre hZ).left h_spec |
| 939 | -- Density in the fibre over `η n`, whose chart ideals are the vanishing ideals of the `θ n v`. |
| 940 | have h_fibre_dense (n : κ) : IsDenseFamily fun v : W ↦ |
| 941 | pullback.lift (x n v).left (𝟙 (Spec (CommRingCat.of ℂ))) (x n v).w := by |
| 942 | refine isDenseFamily_of_isChartPresentation (hu (η n)) |
| 943 | (fun v ↦ lift_snd (x n v).left (𝟙 (Spec (CommRingCat.of ℂ))) (x n v).w) (fun v ↦ ?_) |
| 944 | fun c ↦ ((h_fibre (h_fib n)).right c).le |
| 945 | have h_lift : pullback.lift (x n v).left (𝟙 (Spec (CommRingCat.of ℂ))) (x n v).w ≫ fst z (η n) = |
| 946 | (x n v).left := lift_fst _ _ _ |
| 947 | rw [IsHomogeneousCoords.pull_iff, h_lift] |
| 948 | exact hx n v |
| 949 | -- Every `s` specialises to a point where ideals are cut out, and there the fibre is reduced. |
| 950 | have h_specialize : AllSpecializeTo S fun t ↦ IsReduced (pullback z t) := fun s ↦ |
| 951 | let ⟨k, hk, hk', t, h_spec, _, hZ⟩ := h_specialize_cut s |
| 952 | ⟨k, hk, hk', t, h_spec, h_reduced hZ⟩ |
| 953 | -- Finally, density in `A`: the points `x₀ w` are among the `x n v`, having the same coordinates. |
| 954 | refine ⟨mk z, N, x, |
| 955 | { isProjEmbedding := h_emb |
| 956 | flat := h_flat |
| 957 | isHomogeneousCoords := hx |
| 958 | isSeparatingFamily_fibre := fun n ↦ ⟨h_reduced (h_fib n), h_fibre_dense n⟩ |
| 959 | allSpecializeTo_isReduced := h_specialize |
| 960 | isSeparatingFamily := ⟨hA_red, h_dense.mono ?_⟩ }⟩ |
| 961 | have h_eq (a : ι) (v : W) : x₀ (a, v) = (x (j a) v).left := |
| 962 | h_emb.eq_of_isHomogeneousCoords ((h_over (a, v)).trans (x (j a) v).w.symm) (h_coords (a, v)) |
| 963 | (hx (j a) v) (LineBundle.exists_landsIn _ _) |
| 964 | simp [Set.range_subset_iff, h_eq] |
| 965 | |
| 966 | end FlatClosure |
| 967 | |
| 968 | end New.Variety.ThetaNull |
| 969 | |
| 970 | end |