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.RingTheory.Etale.StandardEtale |
| 4 | import Mathlib.Algebra.Polynomial.Identities |
| 5 | import Mathlib.CategoryTheory.EffectiveEpi.Comp |
| 6 | import Mathlib.CategoryTheory.ExtremalEpi |
| 7 | public import Lib.Cohomology.ProjectiveLine.TiltedLineFormula |
| 8 | public import Lib.PadicComparison.Duality.LineIntegration |
| 9 | import Lib.Cohomology.Etale.DenseSubfunctors |
| 10 | import Lib.PadicComparison.Descent.TestCovers |
| 11 | |
| 12 | /-! |
| 13 | # Good pairs: excision, Thom retraction and Alexander duality for principal opens |
| 14 | |
| 15 | Spaces are set-valued functors on the tests over `A` (`New.Variety.TestOver`, the full subcategory |
| 16 | of `A`-algebras satisfying `IsTest`). A pair `(Y, U)` is the functor |
| 17 | `New.Variety.relFreeAb U = ℤ[Y] / ℤ[U]`. The pair is good, |
| 18 | `New.Variety.ComparedTheory.IsFiniteLerayHirsch D`, if its cohomology with locally constant |
| 19 | `ℤ/ℓ`-coefficients is finite and compares bijectively with the theory `D`. Here |
| 20 | `New.Variety.offClosedFiber Y` is the part of `Y` on tests where the maximal ideal of `A` generates |
| 21 | the unit ideal. |
| 22 | |
| 23 | * `New.Variety.ComparedTheory.isFiniteLerayHirsch_iff_of_locally_bijective`: excision along a map |
| 24 | that is Zariski-locally bijective on pairs. |
| 25 | * `New.Variety.ComparedTheory.isFiniteLerayHirsch_of_prod_projLine`: goodness descends from the |
| 26 | product with `(ℙ¹, ℙ¹ ∖ (0 : 1))`. |
| 27 | * `New.Variety.ComparedTheory.isFiniteLerayHirsch_principal_open`: principal opens of affine space |
| 28 | inside `(ℙ¹)^d`, by Alexander duality. |
| 29 | * `New.Variety.ComparedTheory.isFiniteLerayHirsch_standard_etale`: standard étale charts, by two |
| 30 | excisions. |
| 31 | |
| 32 | Notions from other files: |
| 33 | * `New.Variety.projLine.unimodularRow`: homogeneous coordinates (1 + uv, v) of a point of P¹(B) with |
| 34 | chosen representative (u, v); `New.Variety.projLine.affinePt x` is the point (x : 1). |
| 35 | * `New.Variety.ComparedTheory`: a theory along g with morphisms to its coefficient from the locally |
| 36 | constant ℤ/ℓ-valued functions, such that it and `New.Variety.Theory.locallyConstant` satisfy the |
| 37 | projective line formula. |
| 38 | * `New.Variety.IsZariskiLocallyTop ι U`: every point of `Y` lies in `U` after inverting some element |
| 39 | outside any given maximal ideal, that is, `U` is all of `Y` Zariski-locally. |
| 40 | |
| 41 | ## Relation to the literature |
| 42 | |
| 43 | Known result: Comparison of cohomology theories by duality, via a diagonal kernel on products of P¹. |
| 44 | This step is common to several comparison theorems. It concerns torsion coefficient theories in |
| 45 | which the projective line is computed. In these theories, a class supported on the diagonal of |
| 46 | (P¹)^d carries finiteness and comparison from the point to standard étale charts over affine space. |
| 47 | Sources for the theorems: SGA 4 XVI, SGA 4½ Finitude/Dualité; Faltings, Scholze primitive |
| 48 | comparison. The proof is in the spirit of Dold–Puppe dualisability. |
| 49 | -/ |
| 50 | |
| 51 | @[expose] public section |
| 52 | |
| 53 | noncomputable section |
| 54 | |
| 55 | namespace New.Variety |
| 56 | |
| 57 | open CategoryTheory MonoidalCategory CartesianMonoidalCategory Finset IsLocalRing CommAlgCat TotalH |
| 58 | projLine Ideal Subfunctor relFreeAb |
| 59 | open Polynomial hiding comp |
| 60 | |
| 61 | variable {Γ : Type 1} [Category Γ] {ℓ d : ℕ} {A B R T : Type} [CommRing A] |
| 62 | {g : Γ ⥤ TestOver A} [CommRing B] [CommRing R] {E Y : TestOver A ⥤ Type 1} |
| 63 | {U V : Subfunctor Y} [CommRing T] [Algebra A T] (e : MvPolynomial (Fin d) A ≃ₐ[A] T) |
| 64 | |
| 65 | /-! ### Points of the line, principal open sets and the ideal of their complement -/ |
| 66 | |
| 67 | /-- The ideal of `B` generated by the image of `J` under `φ` and by the multihomogeneous form of |
| 68 | `Φ` (of degree `Φ.degreeOf i` in the `i`-th pair of coordinates) evaluated at the rows `r i`, |
| 69 | times the product of the second entries of the rows. -/ |
| 70 | def multihomogeneousIdeal (Φ : MvPolynomial (Fin d) A) (J : Ideal A) (φ : A →+* B) |
| 71 | (r : Fin d → B × B) : Ideal B := |
| 72 | span |
| 73 | {(∑ m ∈ Φ.support, |
| 74 | φ (Φ.coeff m) * ∏ i : Fin d, (r i).1 ^ m i * (r i).2 ^ (Φ.degreeOf i - m i)) * |
| 75 | ∏ i : Fin d, (r i).2} ⊔ |
| 76 | Ideal.map φ J |
| 77 | |
| 78 | /-- The ideals `multihomogeneousIdeal` are compatible with ring maps that carry the rows `r i` to |
| 79 | unit multiples of the rows `r' i`. -/ |
| 80 | lemma map_multihomogeneousIdeal (Φ : MvPolynomial (Fin d) A) {J : Ideal A} {φ : A →+* B} |
| 81 | (f : B →+* R) {r : Fin d → B × B} {r' : Fin d → R × R} {l : Fin d → Rˣ} |
| 82 | (h_row : ∀ i : Fin d, (r i).map f f = (l i : R) • r' i) : |
| 83 | (multihomogeneousIdeal Φ J φ r).map f = multihomogeneousIdeal Φ J (f.comp φ) r' := by |
| 84 | -- The generator is homogeneous of degree `Φ.degreeOf i + 1` in the `i`-th row, so rescaling the |
| 85 | -- rows by the units `l i` multiplies it by a unit, which does not change the ideal. |
| 86 | rw [multihomogeneousIdeal, multihomogeneousIdeal, Ideal.map_sup, Ideal.map_map, map_span, |
| 87 | Set.image_singleton] |
| 88 | conv_rhs => rw [← span_singleton_mul_right_unit (∏ i, l i * l i ^ Φ.degreeOf i).isUnit] |
| 89 | congr 3 |
| 90 | have h_fst (i : Fin d) : f (r i).1 = l i * (r' i).1 := congrArg Prod.fst (h_row i) |
| 91 | have h_snd (i : Fin d) : f (r i).2 = l i * (r' i).2 := congrArg Prod.snd (h_row i) |
| 92 | simp only [map_mul, map_sum, map_prod, map_pow, RingHom.comp_apply, h_fst, h_snd, sum_mul, |
| 93 | Units.coe_prod, Units.val_mul, Units.val_pow_eq_pow_val, mul_assoc, ← prod_mul_distrib] |
| 94 | -- Compare the generators monomial by monomial and row by row. |
| 95 | refine sum_congr rfl fun m hm ↦ congrArg _ (prod_congr rfl fun i _ ↦ ?_) |
| 96 | rw [← pow_mul_pow_sub (l i : R) (Φ.monomial_le_degreeOf i hm)] |
| 97 | ring |
| 98 | |
| 99 | /-- For an A-algebra T, its functor of points c ↦ Hom_A(T, c) on tests over A. -/ |
| 100 | abbrev testSpec (A T : Type) [CommRing A] [CommRing T] [Algebra A T] : |
| 101 | (ObjectProperty.FullSubcategory fun (x : CommAlg A) ↦ IsTest x) ⥤ Type 1 := |
| 102 | (ObjectProperty.ι _ : TestOver A ⥤ CommAlg A) ⋙ reprBy (of A T) |
| 103 | |
| 104 | /-- A point ψ of Spec T with values in a test A-algebra c, viewed as an A-algebra homomorphism |
| 105 | T → c. -/ |
| 106 | abbrev testSpec.asAlgHom {c : ObjectProperty.FullSubcategory fun (x : CommAlg A) ↦ IsTest x} |
| 107 | (ψ : testSpec A T c) : T →ₐ[A] c.obj := ψ.down.hom |
| 108 | |
| 109 | /-- For a in T, the subfunctor of Spec T (on tests over A) of the points ψ at which ψ(a) is a |
| 110 | unit. -/ |
| 111 | def testUnitLocus (a : T) : Subfunctor (testSpec A T) where |
| 112 | obj _ := {ψ | IsUnit (testSpec.asAlgHom ψ a)} |
| 113 | map f _ h_unit := h_unit.map f.hom.hom |
| 114 | |
| 115 | /-- The unit locus of a product is the intersection of the unit loci of its factors. -/ |
| 116 | lemma testUnitLocus_mul (a b : T) : |
| 117 | (testUnitLocus (a * b) : Subfunctor (testSpec A T)) = testUnitLocus a ⊓ testUnitLocus b := by |
| 118 | ext c ψ |
| 119 | simp [testUnitLocus, IsUnit.mul_iff] |
| 120 | |
| 121 | open IsLocalization Away Algebra in |
| 122 | /-- Let `L` be a localization of `T` away from `a` (`Localization.Away a` unless `L` is given). Then |
| 123 | the functor of points of `L` on tests over `A` is isomorphic to the unit locus `testUnitLocus a` of |
| 124 | `a` in Spec `T`. -/ |
| 125 | lemma testUnitLocus.nonempty_iso_away (a : T) (L : Type := Localization.Away a) [CommRing L] |
| 126 | [Algebra A L] [Algebra T L] [IsScalarTower A T L] [IsLocalization.Away a L] : |
| 127 | Nonempty (testSpec A L ≅ (testUnitLocus a).toFunctor) := |
| 128 | -- The universal property of the localization: a map out of `L` is the same as a map out of `T` |
| 129 | -- that sends `a` to a unit. |
| 130 | ⟨NatIso.ofComponents fun c ↦ Equiv.toIso |
| 131 | { toFun φ := ⟨⟨ofHom (algHom A T L) ≫ φ.down⟩, (algebraMap_isUnit a).map φ.down.hom⟩ |
| 132 | invFun ψ := ⟨ofHom (liftAlgHom a ψ.property)⟩ |
| 133 | -- Two maps out of `L` that agree on `T` are equal. |
| 134 | left_inv φ := ULift.down_injective <| CommAlgCat.hom_ext <| |
| 135 | algHom_ext (.powers a) (AlgHom.ext (lift_eq (S := L) _)) |
| 136 | right_inv ψ := Subtype.ext <| ULift.down_injective <| CommAlgCat.hom_ext <| |
| 137 | AlgHom.ext fun t ↦ IsLocalization.lift_eq .. }⟩ |
| 138 | |
| 139 | /-- For e: A[X_1,…,X_d] ≅ T, the map from Spec T to (P¹)^d on tests over A sending ψ to the |
| 140 | points (ψ(e X_i) : 1). -/ |
| 141 | def affineToLines : testSpec A T ⟶ ringOf (𝟭 _) ⋙ projLinePow (Fin d) where |
| 142 | app _c := ↾fun ψ i ↦ affinePt (testSpec.asAlgHom ψ (e (.X i))) |
| 143 | -- A ring map sends the point `(x : 1)` to the point `(f x : 1)`. |
| 144 | naturality _ _ _ := congr(↾fun _ _ ↦ $(.symm (map_affinePt ..))) |
| 145 | |
| 146 | /-- `affineToLines e` is a monomorphism: a point of Spec `T` is determined by its values at the |
| 147 | generators `e (X i)`. -/ |
| 148 | instance : Mono (affineToLines e) := |
| 149 | mono_of_app_injective fun c ψ χ h_app_eq ↦ by |
| 150 | -- Two points with the same image agree on the generators `e (X i)` of `T`. |
| 151 | refine ULift.down_injective ((cancel_epi (CommAlgCat.isoMk e).hom).mp ?_) |
| 152 | ext i |
| 153 | exact affinePt_injective (congrFun h_app_eq i) |
| 154 | |
| 155 | /-- At a point `ψ` of the affine space `testSpec A T` over the test `c`, the ideal |
| 156 | `multihomogeneousIdeal (e.symm a) ⊥` of the rows of `affineToLines e` at `ψ` is the unit ideal |
| 157 | exactly when `ψ` lies in `testUnitLocus a`: up to units the rows are `(ψ (e (X i)), 1)`, so the |
| 158 | ideal is generated by `ψ a`. -/ |
| 159 | private lemma multihomogeneousIdeal_affineToLines_eq_top_iff {a : T} {c : TestOver A} |
| 160 | (ψ : testSpec A T c) : |
| 161 | multihomogeneousIdeal (e.symm a) ⊥ (algebraMap A c.obj) |
| 162 | (fun i ↦ unimodularRow ((affineToLines e).app c ψ i)) = ⊤ ↔ |
| 163 | ψ ∈ (testUnitLocus a).obj c := by |
| 164 | -- By `map_multihomogeneousIdeal` the ideal is the image under `χ` of the one for the rows |
| 165 | -- `(X i, 1)`. |
| 166 | let χ : MvPolynomial (Fin d) A →+* c.obj := ((testSpec.asAlgHom ψ).comp e.toAlgHom).toRingHom |
| 167 | have h_row (i : Fin d) : ∃ ε : ((ringOf (𝟭 (TestOver A))).obj c)ˣ, |
| 168 | (MvPolynomial.X i, 1).map χ χ = ε.val • unimodularRow ((affineToLines e).app c ψ i) := by |
| 169 | refine (exists_unit_smul_unimodularRow (B := (ringOf (𝟭 (TestOver A))).obj c) |
| 170 | ((χ (.X i) - 1 : c.obj), 1)).imp fun ε hε ↦ ?_ |
| 171 | change (MvPolynomial.X i, 1).map χ χ = |
| 172 | ε.val • unimodularRow (affinePt (B := (ringOf (𝟭 (TestOver A))).obj c) (χ (.X i))) |
| 173 | dsimp only [affinePt] |
| 174 | rw [Prod.map_apply, map_one] |
| 175 | refine Eq.trans ?_ hε |
| 176 | exact Prod.ext (by change (χ (.X i) : c.obj) = 1 + (χ (.X i) - 1) * 1; ring) rfl |
| 177 | choose ε hε using h_row |
| 178 | have h_alg : χ.comp (algebraMap A (MvPolynomial (Fin d) A)) = algebraMap A c.obj := |
| 179 | ((testSpec.asAlgHom ψ).comp e.toAlgHom).comp_algebraMap |
| 180 | rw [← h_alg, ← map_multihomogeneousIdeal (J := ⊥) (e.symm a) χ hε] |
| 181 | -- Over `A[X]` the generator is `e.symm a` itself, and `χ (e.symm a) = ψ a`. |
| 182 | simp [χ, multihomogeneousIdeal, ← MvPolynomial.eval₂_eq', map_span, testUnitLocus] |
| 183 | |
| 184 | /-- For `a : T` and a point `q` of `(ℙ¹)^d` over the test `c`, consider the ideal of `c` generated |
| 185 | by the multihomogeneous form of `e.symm a`, evaluated at the rows `unimodularRow (q i)` and |
| 186 | multiplied by the product of their second entries (the `⊥` adds no other generators). This ideal is |
| 187 | the unit ideal exactly when `q` is the image under `affineToLines e` of a point of |
| 188 | `testUnitLocus a`, i.e. when `q` lies in the affine space and `a` is a unit there. -/ |
| 189 | lemma multihomogeneousIdeal_eq_top_iff {a : T} {c : TestOver A} |
| 190 | {q : (ringOf (𝟭 (TestOver A)) ⋙ projLinePow (Fin d)).obj c} : |
| 191 | multihomogeneousIdeal (e.symm a) ⊥ (algebraMap A c.obj) (fun i : Fin d ↦ unimodularRow (q i)) = |
| 192 | ⊤ ↔ |
| 193 | q ∈ Subfunctor.range ((testUnitLocus a).ι ≫ affineToLines e) c := by |
| 194 | constructor |
| 195 | · intro h_top |
| 196 | -- The ideal is spanned by one element, which is then a unit. The second entries of the rows |
| 197 | -- divide it, so they are units, and every `q i` is an affine point `affinePt (x i)`. |
| 198 | have h_snd (i : Fin d) : IsUnit (unimodularRow (q i)).2 := by |
| 199 | unfold multihomogeneousIdeal at h_top |
| 200 | rw [Ideal.map_bot, sup_bot_eq, Ideal.span_singleton_eq_top] at h_top |
| 201 | exact isUnit_of_dvd_unit (dvd_mul_of_dvd_right |
| 202 | (dvd_prod_of_mem (fun j ↦ (unimodularRow (q j)).2) (mem_univ i)) _) h_top |
| 203 | have h_affine (i : Fin d) : |
| 204 | ∃ x : c.obj, affinePt (B := (ringOf (𝟭 (TestOver A))).obj c) x = projLine.map (𝟙 _) (q i) := |
| 205 | (h_snd i).dvd.imp (affinePt_eq_map (𝟙 _) (q := q i)) |
| 206 | choose x hx using h_affine |
| 207 | have h_pt : (affineToLines e).app c ⟨ofHom (.comp (MvPolynomial.aeval x) e.symm)⟩ = q := by |
| 208 | funext i |
| 209 | change affinePt (B := (ringOf (𝟭 (TestOver A))).obj c) |
| 210 | (MvPolynomial.aeval x (e.symm (e (.X i)))) = q i |
| 211 | rw [AlgEquiv.symm_apply_apply, MvPolynomial.aeval_X] |
| 212 | simpa using hx i |
| 213 | subst h_pt |
| 214 | exact ⟨⟨_, (multihomogeneousIdeal_affineToLines_eq_top_iff e _).mp h_top⟩, rfl⟩ |
| 215 | · rintro ⟨⟨ψ, hψ⟩, rfl⟩ |
| 216 | -- A point of the unit locus: `multihomogeneousIdeal_affineToLines_eq_top_iff`. |
| 217 | exact (multihomogeneousIdeal_affineToLines_eq_top_iff e ψ).mpr hψ |
| 218 | |
| 219 | /-- At a point `(q, φ)` of `(ℙ¹)^d × Spec A`, the ideal `multihomogeneousIdeal Φ J` for the ring map |
| 220 | `φ` and the unimodular rows of `q`. It is an `IdealFamily` on the elements `(B, q, φ)` over rings |
| 221 | `B`: one ideal of `B` for each element, compatible with ring maps (`map_eq`). -/ |
| 222 | def multihomFamily (Φ : MvPolynomial (Fin d) A) (J : Ideal A) : |
| 223 | IdealFamily (elementsProj (projLinePow (Fin d) ⊗ reprBy (CommRingCat.of A))) where |
| 224 | ideal x := multihomogeneousIdeal Φ J x.val.2.down.hom fun i ↦ unimodularRow (x.val.1 i) |
| 225 | map_eq := by |
| 226 | rintro @⟨B, q, ⟨φ⟩⟩ @⟨B', x⟩ ⟨f : B ⟶ B', hf⟩ |
| 227 | obtain rfl : (projLinePow (Fin d) ⊗ reprBy (CommRingCat.of A)).map f (q, ⟨φ⟩) = x := hf |
| 228 | exact map_multihomogeneousIdeal Φ f.hom fun i ↦ unimodularRow_map f (q i) |
| 229 | |
| 230 | variable [InvertsPrime A ℓ] (D : ComparedTheory g) |
| 231 | |
| 232 | /-- The part of `Y` on the tests in which the maximal ideal of `A` generates the unit ideal, that |
| 233 | is the part away from the special fibre. -/ |
| 234 | abbrev offClosedFiber (Y : TestOver A ⥤ Type 1) : Subfunctor Y := |
| 235 | (IdealFamily.ofMaximalIdeal (A := A)).topLocus.preimage (toUnit Y) |
| 236 | |
| 237 | /-- The pairs of points of `E` with the same image under `u` that have the same class in |
| 238 | `ℤ E / ℤ (u⁻¹ U)`. -/ |
| 239 | def sameClassLocus (u : E ⟶ Y) (U : Subfunctor Y) : Subfunctor (fiberProd u u) where |
| 240 | obj c := {x : (fiberProd u u).obj c | |
| 241 | relFreeAb.mk (U.preimage u) ((fiberProd.fst u u).app c x) = |
| 242 | relFreeAb.mk (U.preimage u) ((fiberProd.snd u u).app c x)} |
| 243 | map f _ := congrArg ((relFreeAb (U.preimage u)).map f) |
| 244 | |
| 245 | /-- If `u` is injective on every test, then two points of `E` with the same image under `u` are |
| 246 | equal, so they have the same class and the locus `sameClassLocus u U` is all of `fiberProd u u`; |
| 247 | in particular it is everything Zariski-locally. -/ |
| 248 | lemma isZariskiLocallyTop_sameClassLocus_of_injective (u : E ⟶ Y) (U : Subfunctor Y) |
| 249 | (hu : ∀ c : TestOver A, Function.Injective (u.app c)) : |
| 250 | IsZariskiLocallyTop (ringOf (𝟭 (TestOver A))) (sameClassLocus u U) := by |
| 251 | rintro c ⟨⟨a, b⟩, h_image⟩ m hm |
| 252 | obtain rfl : a = b := hu c h_image |
| 253 | exact ⟨1, m.one_notMem, fun B f _ ↦ rfl⟩ |
| 254 | |
| 255 | namespace ComparedTheory |
| 256 | |
| 257 | /-! ### Excision and the Thom retraction -/ |
| 258 | |
| 259 | /-- Excision along a locally bijective map of pairs. Locally every point of `Y` lies in the image |
| 260 | of `u` or in `U` (`h_surj`), and locally two points of `E` with the same image have the same class |
| 261 | modulo the preimage of `U` (`h_inj`). Then the pair `(E, u⁻¹ U)` is good for the compared theory |
| 262 | `D` iff `(Y, U)` is. Here `E` and `Y` are set-valued functors on the tests over `A`, `u : E ⟶ Y` |
| 263 | and `U` is a subfunctor of `Y`. -/ |
| 264 | lemma isFiniteLerayHirsch_iff_of_locally_bijective (u : E ⟶ Y) |
| 265 | (h_surj : IsZariskiLocallyTop (ringOf (𝟭 (TestOver A))) (Subfunctor.range u ⊔ U)) |
| 266 | (h_inj : IsZariskiLocallyTop (ringOf (𝟭 (TestOver A))) (sameClassLocus u U)) : |
| 267 | D.IsFiniteLerayHirsch (relFreeAb (U.preimage u)) ↔ D.IsFiniteLerayHirsch (relFreeAb U) := by |
| 268 | -- Under Zariski descent it suffices that the kernel and cokernel of `relFreeAb.map u` are |
| 269 | -- locally zero. |
| 270 | exact D.isFiniteLerayHirsch_iff_of_isCohomEquiv (relFreeAb.map u le_rfl) fun g' h_zar ↦ |
| 271 | LocalIso.isCohomEquiv ⟨fun _ ↦ Quot.ind <| relFreeAb.mem_of_map_eq_zero u (relFreeAb.π _) _ |
| 272 | (fun x y hxy ↦ (h_zar (h_inj.whisker g')).of_preimage_le (pointMap ⟨(x, y), hxy⟩) |
| 273 | fun _ _ ↦ sub_eq_zero.mpr) |
| 274 | fun x hx ↦ (show (relFreeAb.π (U.preimage u)).app _ _ = 0 from |
| 275 | relFreeAb.mk_eq_zero hx).symm ▸ zero_mem _, |
| 276 | fun _ ↦ relFreeAb.mem_of_mk_mem (U := U.whisker g') (.comap _ (locallyZero ..)) fun y ↦ |
| 277 | (h_zar (h_surj.whisker g')).of_preimage_le (pointMap y) fun _ _ h ↦ |
| 278 | (QuotientAddGroup.eq_zero_iff _).mpr <| Or.elim h |
| 279 | (fun ⟨x, hx⟩ ↦ ⟨relFreeAb.mk (U.preimage u) x, congrArg (relFreeAb.mk U) hx⟩) |
| 280 | fun hU ↦ ⟨0, (relFreeAb.mk_eq_zero hU).symm⟩⟩ |
| 281 | |
| 282 | /-- For a flat functor `N`, a class `ξ` in the total Ext from `P` to the Tate module, a map |
| 283 | `p : N' ⟶ N ⊗ P` and a map `π : N ⟶ K`: the operation `y ↦ p^*((π^* y) · ξ)` from the total Ext of |
| 284 | `K ∘ g` to that of `N' ∘ g`, with coefficients in a theory `Θ` along `g`, natural in `Θ`. -/ |
| 285 | def mulClassOp {N N' K P : AbFunctor (TestOver A)} [HasFlatValues N] |
| 286 | (ξ : TotalH P (tateModule (𝟭 (TestOver A)))) (p : N' ⟶ abTensor N P) (π : N ⟶ K) : |
| 287 | NaturalOp 0 K N' where |
| 288 | -- pull back along `π`, multiply by `ξ`, pull back along `p` |
| 289 | app t := |
| 290 | (pullbackAlong (t.toTestOver.whiskerLeft p)).comp |
| 291 | -- `S` is named: the product is composed with the pull-back along `π` before it is applied, |
| 292 | -- and only that pull-back determines `S`. |
| 293 | ((t.theory.mulClass (S := t.toTestOver ⋙ N) |
| 294 | (TotalH.map (restrictAlong t.toTestOver) ξ)).comp |
| 295 | (pullbackAlong (t.toTestOver.whiskerLeft π))) |
| 296 | naturality := by |
| 297 | intro C _ t φ Θ l b x |
| 298 | let ξt : TotalH (t.toTestOver ⋙ P) (tateModule t.toTestOver) := |
| 299 | TotalH.map (restrictAlong t.toTestOver) ξ |
| 300 | let ξφ : TotalH ((φ ⋙ t.toTestOver) ⋙ P) (tateModule (φ ⋙ t.toTestOver)) := |
| 301 | TotalH.map (restrictAlong (φ ⋙ t.toTestOver)) ξ |
| 302 | let y := pullbackAlong (t.toTestOver.whiskerLeft π) x |
| 303 | change mapThenComp (restrictAlong φ) b |
| 304 | (pullbackAlong (t.toTestOver.whiskerLeft p) (t.theory.mulClass ξt y)) = |
| 305 | pullbackAlong ((φ ⋙ t.toTestOver).whiskerLeft p) |
| 306 | (Θ.mulClass ξφ (pullbackAlong ((φ ⋙ t.toTestOver).whiskerLeft π) |
| 307 | (mapThenComp (restrictAlong φ) b x))) |
| 308 | refine (mapThenComp_comp map_homClass).trans ?_ |
| 309 | refine congrArg (pullbackAlong ((φ ⋙ t.toTestOver).whiskerLeft p)) ?_ |
| 310 | refine (t.theory.mulClass_naturality φ Θ.toTorsionCoeff b ξt y).trans ?_ |
| 311 | have hξ : (TotalH.map (restrictAlong φ)) ξt = ξφ := |
| 312 | map_restrictAlong_restrictAlong _ _ ξ |
| 313 | rw [hξ] |
| 314 | exact congrArg (Θ.mulClass ξφ) (mapThenComp_comp map_homClass) |
| 315 | |
| 316 | -- Keeps definitional checks from unfolding the Ext groups. |
| 317 | seal CategoryTheory.Abelian.Ext in |
| 318 | /-- A pair is a retract of its product with `(ℙ¹, S)`, where `S ≅ 𝔸¹` is the complement |
| 319 | `affineChart` of `(0 : 1)`. Let `V` be a subfunctor of `Y`. If the product pair |
| 320 | `(Y × ℙ¹, V × ℙ¹ ∪ Y × S)` is good for the compared theory `D` (`h_prod`), so is `(Y, V)`. -/ |
| 321 | lemma isFiniteLerayHirsch_of_prod_projLine |
| 322 | (h_prod : D.IsFiniteLerayHirsch (relFreeAb |
| 323 | (V.preimage (fst Y (ringOf (𝟭 (TestOver A)) ⋙ projLine)) ⊔ |
| 324 | (affineChart.whisker (ringOf (𝟭 (TestOver A)))).preimage |
| 325 | (snd Y (ringOf (𝟭 (TestOver A)) ⋙ projLine))))) : |
| 326 | D.IsFiniteLerayHirsch (relFreeAb V) := by |
| 327 | -- Let `N'` be the pair of the product. Multiplying by a relative lift `ξ` of `etaClass` (the |
| 328 | -- Chern class of `O(1)`), restricting to the graph of the tautological point of the line and |
| 329 | -- integrating over the line sends a class on the quotient of `relFreeAb V` by `ℓ` to its |
| 330 | -- pull-back to `relFreeAb V`, so `isFiniteLerayHirsch_of_retract` applies. |
| 331 | let S' : Subfunctor (projLineAlong (𝟭 (TestOver A))) := affineChart.whisker _ |
| 332 | let N' : AbFunctor (TestOver A) := relFreeAb |
| 333 | (V.preimage (fst Y (projLineAlong (𝟭 _))) ⊔ S'.preimage (snd Y (projLineAlong (𝟭 _)))) |
| 334 | -- `etaClass` dies on `S'`, where the first entry of the row is a unit, so it comes from the pair. |
| 335 | obtain ⟨w, h_short⟩ := relFreeAb.shortExact S' |
| 336 | obtain ⟨h_exact_mid, -, -⟩ := TotalH.exact_triangle h_short (tateModule (𝟭 (TestOver A))) |
| 337 | obtain ⟨ξ, hξ⟩ : |
| 338 | ∃ ξ : TotalH (relFreeAb S') (tateModule (𝟭 _)), |
| 339 | pullbackAlong (relFreeAb.π S') ξ = (etaClass (𝟭 _)).toTotalH := |
| 340 | (h_exact_mid _).mp (pullbackAlong_etaClass_eq_zero_of_isUnit S'.ι fun c x ↦ x.property) |
| 341 | -- restriction along `y ↦ (y, points)` for the parameter `points` in the line |
| 342 | let restrict : NaturalOp 1 N' (relFreeAb V) := |
| 343 | { app t := pullbackAlong (relFreeAb.map (U := .whisker (_ ⊔ _) t.toTestOver) |
| 344 | (U' := V.whisker t.toTestOver) |
| 345 | (lift (𝟙 _) (toUnit _ ≫ sectionMap (projLinePow.component t.points 0))) fun _ _ ↦ .inl) |
| 346 | naturality := by |
| 347 | intros |
| 348 | exact mapThenComp_comp map_homClass } |
| 349 | refine D.isFiniteLerayHirsch_of_retract ![mulClassOp ξ (relFreeAb.prod V S') (abCoker.π _)] |
| 350 | ![restrict.integrate] (fun t x ↦ ?_) h_prod |
| 351 | -- The integral of `y · eta` is `y` (`integrate_mul_cupClass`), so it is enough to show that the |
| 352 | -- integrand is the pull-back of `x` times `eta`. |
| 353 | rw [Fin.sum_univ_one] |
| 354 | refine .trans (congrArg t.line_formula.integrate ?_) (t.line_formula.integrate_mul_cupClass _ 0) |
| 355 | refine (congrArg _ map_pullbackAlong).trans ?_ |
| 356 | -- Write the product with `eta` as `sliceEquiv` of the product with `etaClass`, and `etaClass` in |
| 357 | -- terms of `ξ`. |
| 358 | rw [map_zero, add_zero] |
| 359 | refine .trans ?_ (t.theory.toTorsionCoeff.sliceEquiv_mulClass _) |
| 360 | let ξt : TotalH (t.toTestOver ⋙ relFreeAb S') (tateModule t.toTestOver) := |
| 361 | TotalH.map (restrictAlong t.toTestOver) ξ |
| 362 | let y := pullbackAlong (t.toTestOver.whiskerLeft (abCoker.π (ℓ • 𝟙 (relFreeAb V)))) x |
| 363 | have hη : (etaClass t.toTestOver).toTotalH = |
| 364 | pullbackAlong ((restrictAlong t.toTestOver).map (π S')) ξt := |
| 365 | (map_restrictAlong_etaClass (g := 𝟭 (TestOver A)) t.toTestOver).symm.trans |
| 366 | ((congrArg (TotalH.map (restrictAlong t.toTestOver)) hξ.symm).trans map_pullbackAlong) |
| 367 | have h_mul : t.theory.mulClass (etaClass t.toTestOver).toTotalH y = |
| 368 | pullbackAlong ((abTensor _).map ((restrictAlong t.toTestOver).map (π S'))) |
| 369 | (t.theory.mulClass ξt y) := |
| 370 | (congrArg (t.theory.mulClass · y) hη).trans |
| 371 | ((congrArg (comp · _) map_pullbackAlong).trans (TotalH.comp_assoc ..)) |
| 372 | refine .trans ?_ (congrArg sliceEquiv h_mul.symm) |
| 373 | have h_res := map_pullbackAlong (Φ := restrictAlong (elementsProj (projLineAlong t.toTestOver))) |
| 374 | (f := (abTensor _).map ((restrictAlong t.toTestOver).map (π S'))) |
| 375 | (x := t.theory.mulClass ξt y) |
| 376 | refine .trans ?_ (congrArg |
| 377 | (fun z ↦ comp (homClass ((tensorPoint (freeAbMap tautologicalSection)).app _)) z) h_res.symm) |
| 378 | refine TotalH.comp_assoc_of_sq ?_ _ |
| 379 | -- What remains is a square of morphisms of functors, which commutes on generators. |
| 380 | exact (homClass_comp ..).symm.trans |
| 381 | ((congrArg homClass (relFreeAb.hom_ext (U := .whisker ..))).trans (homClass_comp ..)) |
| 382 | |
| 383 | variable [Algebra A R] (P : StandardEtalePair R) |
| 384 | |
| 385 | open AdjoinRoot Ideal.Quotient testSpec Finsupp |
| 386 | |
| 387 | /-! ### Standard étale charts -/ |
| 388 | |
| 389 | /-- For a standard étale pair `P = (f, g)` over `R`, the pairs `(w, ψ)` of a point `w` of |
| 390 | `Spec (R[X] / f)[1 / g]` and a point `ψ` of `Spec R[X][1 / g]` that agree on `R` and such that |
| 391 | `f x` is an associate of `x - y`, where `y = w (root f)` and `x = ψ X`. So `y` is a root of `f`, |
| 392 | and `g` is a unit at `y` and at `x`. -/ |
| 393 | def rootPairs : |
| 394 | Subfunctor |
| 395 | ((testUnitLocus (A := A) (AdjoinRoot.mk P.f P.g)).toFunctor ⊗ |
| 396 | (testUnitLocus P.g).toFunctor) where |
| 397 | obj _ := |
| 398 | Set.ofPred fun (w, ψ) ↦ |
| 399 | Associated (asAlgHom ψ.val P.f) (asAlgHom ψ.val X - asAlgHom w.val (root P.f)) ∧ |
| 400 | ∀ r : R, asAlgHom w.val (AdjoinRoot.of P.f r) = asAlgHom ψ.val (C r) |
| 401 | map f := by |
| 402 | rintro ⟨w, ψ⟩ ⟨h_assoc, h_const⟩ |
| 403 | refine ⟨?_, fun r ↦ congrArg f.hom.hom (h_const r)⟩ |
| 404 | change Associated (f.hom.hom (asAlgHom ψ.val P.f)) |
| 405 | (f.hom.hom (asAlgHom ψ.val X) - f.hom.hom (asAlgHom w.val (root P.f))) |
| 406 | simpa only [map_sub] using h_assoc.map f.hom.hom |
| 407 | |
| 408 | /-- Taylor expansion at a root of `P.f`, to first order. Let `w` be a root of `P.f` and `ψ` a |
| 409 | point of `Spec R[X]` with values in the same ring that agree on `R` (`hC`), with |
| 410 | `ψ X = w (root P.f) + t` (`hX`) and `t ∈ m`. Then every `ψ p` is `w p + s * t` for some `s` |
| 411 | that is congruent to `ψ p'` modulo `m`. -/ |
| 412 | private lemma exists_eq_add_mul_and_sub_derivative_mem {P : StandardEtalePair R} {c : TestOver A} |
| 413 | {t : c.obj} {m : Ideal c.obj} (w : AdjoinRoot P.f →ₐ[A] c.obj) (ψ : R[X] →ₐ[A] c.obj) |
| 414 | (ht : t ∈ m) (hX : ψ X = w (root P.f) + t) (hC : ∀ r : R, w r = ψ (C r)) (p : R[X]) : |
| 415 | ∃ s : c.obj, ψ p = w (AdjoinRoot.mk P.f p) + s * t ∧ s - ψ (derivative p) ∈ m := by |
| 416 | let coeff := ψ.toRingHom.comp C |
| 417 | have eval_at (φ : R[X] →+* c.obj) (hφ : φ.comp C = coeff) (q : R[X]) : |
| 418 | (q.map coeff).eval (φ X) = φ q := by |
| 419 | rw [eval_map, ← hφ, ← hom_eval₂, eval₂_C_X] |
| 420 | have eval_ψ (q : R[X]) : (q.map coeff).eval (ψ X) = ψ q := eval_at ψ.toRingHom rfl q |
| 421 | have eval_w : (p.map coeff).eval (w (root P.f)) = w (AdjoinRoot.mk P.f p) := |
| 422 | eval_at (w.toRingHom.comp (AdjoinRoot.mk P.f)) (RingHom.ext hC) p |
| 423 | obtain ⟨k, hk⟩ := (p.map coeff).binomExpansion (ψ X) (-t) |
| 424 | simp only [show ψ X + -t = w (root P.f) by simp [hX], eval_w, derivative_map, eval_ψ] at hk |
| 425 | refine ⟨ψ (derivative p) - k * t, ?_, ?_⟩ |
| 426 | · linear_combination -hk |
| 427 | · simpa using m.neg_mem (m.mul_mem_left k ht) |
| 428 | |
| 429 | /-- Near the prime `m` of the test ring, the pair `(w, ψ)` lies in `rootPairs P`: `w` is a root of |
| 430 | `P.f`, `ψ` a point of `Spec R[X]`, they agree on `R` (`hC`), `ψ X = w (root P.f) + t` with |
| 431 | `t ∈ m` (`hX`), and `P.g` is a unit at `w` or at `ψ`. So if a property `S` of maps `f` out of |
| 432 | `c` holds wherever `ε ∉ m` is a unit and `f` sends `(w, ψ)` into `rootPairs P` (`hS`), then there |
| 433 | is `a ∉ m` such that `S` holds along every `f` that makes `a` a unit. -/ |
| 434 | lemma exists_notMem_of_rootPairs {P : StandardEtalePair R} {c : TestOver A} {t : c.obj} |
| 435 | {m : Ideal c.obj} {ε : c.obj} (w : AdjoinRoot P.f →ₐ[A] c.obj) (ψ : R[X] →ₐ[A] c.obj) |
| 436 | [IsPrime m] (h_unit : IsUnit (w (AdjoinRoot.mk P.f P.g)) ∨ IsUnit (ψ P.g)) |
| 437 | {S : ∀ d : TestOver A, (c ⟶ d) → Prop} (hε : ε ∉ m) (ht : t ∈ m) |
| 438 | (hS : ∀ (d : TestOver A) (f : c ⟶ d) |
| 439 | (hw : ⟨ofHom w ≫ f.hom⟩ ∈ (testUnitLocus (AdjoinRoot.mk P.f P.g)).obj d) |
| 440 | (hψ : ⟨ofHom ψ ≫ f.hom⟩ ∈ (testUnitLocus P.g).obj d), IsUnit (f.hom.hom ε) → |
| 441 | (⟨⟨ofHom w ≫ f.hom⟩, hw⟩, ⟨⟨ofHom ψ ≫ f.hom⟩, hψ⟩) ∈ rootPairs P d → S d f) |
| 442 | (hX : ψ X = w (root P.f) + t) (hC : ∀ r : R, w r = ψ (C r)) : |
| 443 | ∃ a ∉ m, ∀ (d : TestOver A) (f : c ⟶ d), IsUnit (f.hom.hom a) → S d f := by |
| 444 | -- Write `ψ P.f = r * t`. The étale condition shows `r ∉ m`, and where `r`, `ε` and both values of |
| 445 | -- `P.g` are units the pair `(w, ψ)` lies in `rootPairs P`, so that `hS` applies. |
| 446 | obtain ⟨r, h_f_taylor, h_r_slope⟩ := exists_eq_add_mul_and_sub_derivative_mem w ψ ht hX hC P.f |
| 447 | obtain ⟨r', h_g_taylor, -⟩ := exists_eq_add_mul_and_sub_derivative_mem w ψ ht hX hC P.g |
| 448 | -- The étale condition: `f'` and `f` generate a power of `g`. |
| 449 | obtain ⟨p₁, p₂, N, h_etale⟩ : |
| 450 | ∃ (p₁ p₂ : R[X]) (N : ℕ), derivative P.f * p₁ + P.f * p₂ = P.g ^ N := |
| 451 | P.cond |
| 452 | have hg_notMem : w (.mk _ P.g) ∉ m ∨ ψ P.g ∉ m := h_unit.imp m.notMem_of_isUnit m.notMem_of_isUnit |
| 453 | refine ⟨w (.mk _ P.g) * ψ P.g * ε * r, fun h_mem ↦ ?_, fun d f ha ↦ ?_⟩ |
| 454 | · -- Modulo the prime `m` the two values of `P.g` agree, so neither lies in `m`. And `r ∉ m`: |
| 455 | -- else `ψ (derivative P.f) ∈ m` and `ψ P.f = r * t ∈ m` would put `ψ P.g ^ N` in `m`. |
| 456 | have h_g_sub : ψ P.g - w (AdjoinRoot.mk P.f P.g) ∈ m := by |
| 457 | simpa [h_g_taylor] using m.mul_mem_left r' ht |
| 458 | obtain ⟨h_wg, h_ψg⟩ : w (AdjoinRoot.mk P.f P.g) ∉ m ∧ ψ P.g ∉ m := |
| 459 | hg_notMem.elim |
| 460 | (fun h ↦ ⟨h, fun h' ↦ h ((m.sub_mem_iff_right h').mp h_g_sub)⟩) |
| 461 | (fun h ↦ ⟨fun h' ↦ h ((m.sub_mem_iff_left h').mp h_g_sub), h⟩) |
| 462 | have h_r : r ∉ m := fun h_r ↦ h_ψg <| IsPrime.mem_of_pow_mem inferInstance N <| by |
| 463 | have h_deriv : ψ (derivative P.f) ∈ m := (m.sub_mem_iff_right h_r).mp h_r_slope |
| 464 | have h_f : ψ P.f ∈ m := by simpa [h_f_taylor] using m.mul_mem_left r ht |
| 465 | rw [← map_pow, ← h_etale, map_add, map_mul, map_mul] |
| 466 | exact m.add_mem (m.mul_mem_right _ h_deriv) (m.mul_mem_right _ h_f) |
| 467 | have h_prime : m.IsPrime := inferInstance |
| 468 | exact h_prime.mul_notMem (h_prime.mul_notMem (h_prime.mul_notMem h_wg h_ψg) hε) h_r h_mem |
| 469 | · -- Where `a` is a unit, so are its four factors, and `(w, ψ)` lies in `rootPairs P`. |
| 470 | simp only [map_mul, IsUnit.mul_iff] at ha |
| 471 | obtain ⟨⟨⟨hw, hψ⟩, hε_unit⟩, hr_unit⟩ := ha |
| 472 | have h_assoc : |
| 473 | Associated (f.hom.hom (ψ P.f)) (f.hom.hom (ψ X) - f.hom.hom (w (root P.f))) := by |
| 474 | simp [h_f_taylor, hX, hr_unit, associated_unit_mul_left] |
| 475 | exact hS d f hw hψ hε_unit ⟨h_assoc, fun r₀ ↦ congrArg f.hom.hom (hC r₀)⟩ |
| 476 | |
| 477 | /-- For a standard étale pair `P = (f, g)` over `R`, the map from `rootPairs P` to `Y × ℙ¹`, where |
| 478 | `Y = Spec (R[X] / f)[1 / g]`, that sends a pair `(y, x)` to `(y, (x - y : 1))`. -/ |
| 479 | private def rootPairsToProdLine : |
| 480 | (rootPairs P).toFunctor ⟶ |
| 481 | (testUnitLocus (A := A) (AdjoinRoot.mk P.f P.g)).toFunctor ⊗ |
| 482 | projLineAlong (𝟭 (TestOver A)) where |
| 483 | app c := ↾fun ⟨(w, ψ), _⟩ ↦ (w, affinePt (asAlgHom ψ.val X - asAlgHom w.val (root _))) |
| 484 | naturality _ _ f := by |
| 485 | refine congr(↾fun _ ↦ (_, $(?_))) |
| 486 | -- The component of the map of tests matches `map_affinePt` only after unfolding. |
| 487 | exact .symm ((map_affinePt ..).trans (congrArg affinePt (map_sub ..))) |
| 488 | |
| 489 | /-- The map `(y, x) ↦ (y, (x - y : 1))` from `rootPairs P` to `Y × ℙ¹` is injective on every test: |
| 490 | `y` and `x - y` determine `x`. -/ |
| 491 | private lemma rootPairsToProdLine_app_injective (c : TestOver A) : |
| 492 | Function.Injective ((rootPairsToProdLine P).app c) := by |
| 493 | rintro ⟨⟨w, ψ, _⟩, _, hψ⟩ ⟨⟨w', χ, _⟩, _, hχ⟩ h |
| 494 | obtain rfl : w = w' := congrArg Prod.fst h |
| 495 | congr |
| 496 | -- `ψ` and `χ` agree on `R`, and on `X` since `x - y` and `y` determine `x`. |
| 497 | have h_X : asAlgHom ψ X = asAlgHom χ X := |
| 498 | sub_left_inj.mp (affinePt_injective (congrArg Prod.snd h)) |
| 499 | exact ULift.down_injective |
| 500 | (CommAlgCat.hom_ext (algHom_ext' (AlgHom.ext fun r ↦ (hψ r).symm.trans (hχ r)) h_X)) |
| 501 | |
| 502 | /-- For a standard étale pair `P = (f, g)` over `R`, locally every point `(y, q)` of `Y × ℙ¹`, |
| 503 | `Y = Spec (R[X] / f)[1 / g]`, is the image `(y, (x - y : 1))` of a pair of `rootPairs P`, or lies in |
| 504 | `offClosedFiber Y × ℙ¹` or in `Y × (ℙ¹ ∖ (0 : 1))`. -/ |
| 505 | private lemma isZariskiLocallyTop_range_rootPairsToProdLine_sup : |
| 506 | IsZariskiLocallyTop (ringOf (𝟭 (TestOver A))) |
| 507 | (.range (rootPairsToProdLine P) ⊔ |
| 508 | ((offClosedFiber (testUnitLocus (A := A) (AdjoinRoot.mk P.f P.g)).toFunctor).preimage |
| 509 | (fst ..) ⊔ |
| 510 | (affineChart.whisker (ringOf (𝟭 (TestOver A)))).preimage (snd ..))) := by |
| 511 | rintro c ⟨w, q : projLine (.of c.obj)⟩ m hm |
| 512 | let m' : Ideal c.obj := m |
| 513 | have hm' : m'.IsMaximal := hm |
| 514 | have : m'.IsPrime := hm'.isPrime |
| 515 | obtain h_fst | h_fst := em' ((unimodularRow q).1 ∈ m') |
| 516 | · exact ⟨_, h_fst, fun _ _ h ↦ .inr (.inr (isUnit_fst_unimodularRow_map _ _ h))⟩ |
| 517 | -- Otherwise `q = (t : 1)` with `t ∈ m` where an idempotent `ε ∉ m` is a unit; take `x = y + t`. |
| 518 | have h_snd : (unimodularRow q).2 ∉ m' := fun h₂ ↦ hm'.ne_top <| |
| 519 | (Ideal.eq_top_iff_one m').mpr <| by |
| 520 | have h1 : (1 : c.obj) = (unimodularRow q).1 - q.down.out.1 * (unimodularRow q).2 := by |
| 521 | simp [unimodularRow] |
| 522 | rw [h1] |
| 523 | exact m'.sub_mem h_fst (m'.mul_mem_left _ h₂) |
| 524 | obtain ⟨ε, hε, h_idem, z, hz⟩ := |
| 525 | exists_dvd_idempotent_of_notMem c.property.isComparableRing hm' h_snd |
| 526 | let ψ : R[X] →ₐ[A] c.obj := |
| 527 | aevalTower ((asAlgHom w.val).comp (ofAlgHom ..)) |
| 528 | (asAlgHom w.val (root _) + z * (unimodularRow q).1) |
| 529 | have hψ_X : ψ X = asAlgHom w.val (root P.f) + z * (unimodularRow q).1 := by simp [ψ] |
| 530 | refine exists_notMem_of_rootPairs _ ψ (.inl w.property) hε (m'.mul_mem_left z h_fst) |
| 531 | (fun _d f _hw _hψ h_unit h_mem ↦ ?_) hψ_X (by simp [ψ]) |
| 532 | -- Where `ε` is a unit, `f q₁ = f q₂ * (x - y)`, so `(x - y : 1)` is the image of `q`. |
| 533 | have h_one : f.hom.hom ε = 1 := h_unit.mul_eq_left.mp (h_idem.map _) |
| 534 | have h_row : f.hom.hom (unimodularRow q).1 = f.hom.hom (unimodularRow q).2 * |
| 535 | (f.hom.hom (ψ X) - f.hom.hom (asAlgHom w.val (root P.f))) := by |
| 536 | rw [hψ_X, map_add, add_sub_cancel_left, map_mul, ← mul_assoc, ← map_mul f.hom.hom, ← hz, |
| 537 | h_one, one_mul] |
| 538 | exact .inl ⟨⟨_, h_mem⟩, Prod.ext rfl (affinePt_eq_map _ _ _ h_row)⟩ |
| 539 | |
| 540 | /-! ### Principal open sets of affine space and standard étale charts -/ |
| 541 | |
| 542 | /-- Alexander duality for a principal open set of `Spec T ⊆ (ℙ¹)^d`, embedded by the presentation |
| 543 | `e` of `T` as a polynomial ring. `D.IsFiniteLerayHirsch N` requires, among other things, that |
| 544 | `w ↦ ∑ i, (w i restricted along g) · D.comparison i` be a bijection from families in total |
| 545 | Ext(`N`, locally constant `ℤ/ℓ`) onto total Ext(`g ⋙ N`, coefficient of `D`). If this holds for |
| 546 | ℤ[pt]/ℤ[pt away from the special fibre] (`L`), it holds for ℤ[(ℙ¹)^d]/ℤ[`Spec T[1/a]` ∪ complement |
| 547 | of the special fibre]. -/ |
| 548 | lemma isFiniteLerayHirsch_principal_open |
| 549 | (L : D.IsFiniteLerayHirsch (relFreeAb (IdealFamily.ofMaximalIdeal (A := A)).topLocus)) (a : T) : |
| 550 | D.IsFiniteLerayHirsch (relFreeAb (Subfunctor.range ((testUnitLocus a).ι ≫ affineToLines e) ⊔ |
| 551 | offClosedFiber (ringOf (𝟭 (TestOver A)) ⋙ projLinePow (Fin d)))) := by |
| 552 | classical |
| 553 | -- Up to Zariski descent the open set `U` of the statement is `W.topPoints`, the complement in |
| 554 | -- `(ℙ¹)^d` of the zeros of the generator of `multihomogeneousIdeal` that lie in the special |
| 555 | -- fibre. By duality (`isFiniteLerayHirsch_topPoints_of_surjective`) it suffices to find classes |
| 556 | -- `θ` from `G` to `F` whose Leray–Hirsch map is onto at `relFreeAb W.topPoints` (proper base |
| 557 | -- change provides them), and to show `D.IsFiniteLerayHirsch G` (it follows from `L`). |
| 558 | let I (J : Ideal A) := multihomFamily (e.symm a) J |
| 559 | let Q := IdealFamily.ofMaximalIdeal (A := A) |
| 560 | let X := ringOf (𝟭 (TestOver A)) ⋙ projLinePow (Fin d) |
| 561 | let p := testOfPoint A (projLinePow (Fin d)) |
| 562 | let W := (I (maximalIdeal A)).pullToTests |
| 563 | -- `F`: locally constant functions restricted to that zero set; `G`: the same for the special |
| 564 | -- fibre of `Spec A`. |
| 565 | let F := W.zerosCoeff (Theory.locallyConstant.onElements (X := X)).functor |
| 566 | let G := Q.zerosCoeff (locConstAlong (𝟭 (TestOver A))) |
| 567 | have dense_zeros : IsCohomDense F W.botLocus := |
| 568 | Theory.locallyConstant.onElements.isCohomDense_botLocus W |
| 569 | have dense_fibre : IsCohomDense F (Q.botLocus.whisker p) := |
| 570 | dense_zeros.mono fun _ _ ↦ eq_bot_mono le_sup_right |
| 571 | -- Proper base change gives classes whose Leray–Hirsch map is bijective at tests killing `𝔪_A`. |
| 572 | obtain ⟨ι, -, h_basis⟩ := exists_isLerayHirschBasis_of_isCohomDense |
| 573 | (Theory.locallyConstant.onElements.onZeros W) |
| 574 | ((I _).isDetectedAtPoints_of_proper (isProperOver_projLinePow _) _ |
| 575 | (IdealFamily.bijective_toZerosCoeff _ _) dense_zeros) dense_fibre ⟨0, 0⟩ |
| 576 | -- They come from classes `θ` with source `G`, since `Q.toZerosCoeff` is bijective on the special |
| 577 | -- fibre. |
| 578 | have h_quot : IsCohomEquiv F ((restrictAlong p).map (Q.toZerosCoeff (locConstAlong (𝟭 _)))) := |
| 579 | dense_fibre.isCohomEquiv_of_bijective_on fun _ ↦ Q.bijective_toZerosCoeff _ _ |
| 580 | choose θ hθ using fun i : ι ↦ (h_quot _).2 i.val.2 |
| 581 | -- Source and target of `lerayHirsch θ` only see the special fibre. |
| 582 | have transfer {E Y : TestOver A ⥤ Type 1} (u : E ⟶ Y) |
| 583 | (hu : ∀ c, Q.ideal c = ⊥ → Function.Bijective (u.app c)) : |
| 584 | IsLerayHirschBasis θ (freeAb E) → IsLerayHirschBasis θ (freeAb Y) := by |
| 585 | have hZ (c : TestOver A) (hc : Q.ideal c = ⊥) : Function.Bijective ((freeAb.map u).app c) := |
| 586 | (FreeAddCommGroup.equivOfEquiv (.ofBijective _ (hu c hc))).bijective |
| 587 | have h_source : IsCohomEquiv G (freeAb.map u) := |
| 588 | (Theory.locallyConstant.isCohomDense_botLocus Q).isCohomEquiv_of_bijective_on hZ |
| 589 | have h_target : IsCohomEquiv F ((restrictAlong p).map (freeAb.map u)) := |
| 590 | dense_fibre.isCohomEquiv_of_bijective_on fun _ ↦ hZ _ |
| 591 | exact (Comparison.bijective_iff_of_comm_sq (lerayHirsch_mapRange_comp θ map_homClass) |
| 592 | (mapRange_bijective _ _ h_source.bijective_pullbackAlong) h_target.bijective_pullbackAlong).2 |
| 593 | have lh_fibre (c : TestOver A) (hc : Q.ideal c = ⊥) : |
| 594 | IsLerayHirschBasis θ (freeAb (reprBy c)) := by |
| 595 | -- The bijective map of `h_basis` factors as `lerayHirsch θ` after a surjection `r`. |
| 596 | let r : TotalH (freeAb (reprBy c)) (locConstAlong (𝟭 _)) →+ TotalH (freeAb (reprBy c)) G := |
| 597 | comp.flip (.homClass (Q.toZerosCoeff _)) |
| 598 | have hr : Function.Surjective r := by |
| 599 | refine (sectionEquiv ..).surjective.forall.2 (Quot.ind fun s ↦ ⟨sectionEquiv _ _ s, ?_⟩) |
| 600 | exact (of_comp_homClass ..).trans (congrArg _ (push_homReprEquiv_symm ..)) |
| 601 | have factor : lerayHirsch θ _ ∘ mapRange r r.map_zero = lerayHirsch (fun i : ι ↦ i.1.2) _ := by |
| 602 | refine _root_.funext (lerayHirsch_naturality _ r (r' := .id _) fun i x ↦ ?_) |
| 603 | let Φ : AbFunctor (TestOver A) ⥤ AbFunctor X.Elements := restrictAlong p |
| 604 | let π := Q.toZerosCoeff (locConstAlong (𝟭 (TestOver A))) |
| 605 | change comp (TotalH.map Φ (comp x (homClass π))) (θ i).toTotalH = |
| 606 | comp (TotalH.map Φ x) i.val.2.toTotalH |
| 607 | refine (map_comp_assoc Φ (θ i).toTotalH).trans (congrArg (comp (TotalH.map Φ x)) ?_) |
| 608 | refine (congrArg (fun y ↦ comp y (θ i).toTotalH) (map_homClass (f := π) (Φ := Φ))).trans ?_ |
| 609 | exact (pullbackAlong_of (f := Φ.map π) (θ i)).trans |
| 610 | (congrArg (DirectSum.of _ _) (hθ i)) |
| 611 | have h_comp : (lerayHirsch θ _ ∘ mapRange r r.map_zero).Bijective := by |
| 612 | rw [factor] |
| 613 | exact h_basis c hc |
| 614 | exact ⟨h_comp.1.of_comp_right (mapRange_surjective _ _ hr), h_comp.2.of_comp⟩ |
| 615 | have lh_rep (c : TestOver A) : IsLerayHirschBasis θ (freeAb (reprBy c)) := by |
| 616 | -- Pass to the reduced quotient `q : c ⟶ c'` by `𝔪_A`, which has the same points in the fibre. |
| 617 | obtain ⟨c', q, -, -, h_univ, hq⟩ := TestOver.exists_quotient c (Q.ideal c) |
| 618 | have hc' : Q.ideal c' = ⊥ := (Q.map_eq q).symm.trans hq |
| 619 | refine transfer (reprFunctor.map q.op) (fun _ h ↦ ULift.map_bijective.2 ?_) (lh_fibre c' hc') |
| 620 | exact (Function.bijective_iff_existsUnique _).2 fun f ↦ h_univ _ f ((Q.map_eq f).trans h) |
| 621 | -- By dévissage `lerayHirsch θ` is then bijective on every functor covered by affine schemes. |
| 622 | have lh_qc {Y} (hY : IsAffinelyCovered (ObjectProperty.ι _ : TestOver A ⥤ _) Y) : |
| 623 | IsLerayHirschBasis θ (freeAb (ObjectProperty.ι _ ⋙ Y)) := |
| 624 | isLerayHirschBasis_iff_allBijective_truncMap.2 |
| 625 | (IsAffinelyCovered.devissage_bijective lerayHirsch.devissage |
| 626 | (fun c ↦ isLerayHirschBasis_iff_allBijective_truncMap.1 (lh_rep c)) hY) |
| 627 | let U : Subfunctor X := .range ((testUnitLocus a).ι ≫ affineToLines e) ⊔ offClosedFiber X |
| 628 | have h_le : U ≤ W.topPoints := by |
| 629 | rintro c q (hq | hq) |
| 630 | · exact eq_top_mono (sup_le_sup_left (map_mono bot_le) _) |
| 631 | ((multihomogeneousIdeal_eq_top_iff ..).2 hq) |
| 632 | · exact eq_top_mono le_sup_right hq |
| 633 | -- Zariski-locally the reverse inclusion holds: near `m` either `𝔪_A` generates the unit ideal, |
| 634 | -- or the generator of `multihomogeneousIdeal` becomes a unit. |
| 635 | have h_descent : D.IsFiniteLerayHirsch (relFreeAb U) ↔ |
| 636 | D.IsFiniteLerayHirsch (relFreeAb W.topPoints) := by |
| 637 | refine D.isFiniteLerayHirsch_iff_of_isCohomEquiv (relFreeAb.map (𝟙 _) h_le) fun g h_zar ↦ |
| 638 | relFreeAb.isCohomEquiv_of_le (U := W.topPoints.whisker g) (U' := U.whisker g) |
| 639 | (fun _ ↦ h_le _) (h_zar fun c q m hm ↦ ?_) |
| 640 | by_cases h_fibre : (Q.whisker g).ideal c ≤ m |
| 641 | · have h_form : ¬(I ⊥).pullToTests.ideal (.mk (obj := g.obj c) q.val) ≤ m := |
| 642 | fun h ↦ hm.ne_top (eq_top_mono (sup_le (le_sup_left.trans h) h_fibre) q.property) |
| 643 | obtain ⟨b, hb, h_unit⟩ := (I ⊥).pullToTests.exists_notMem_eq_top h_form |
| 644 | exact ⟨b, hb, fun c' f hf ↦ |
| 645 | .inl ((multihomogeneousIdeal_eq_top_iff ..).1 |
| 646 | (h_unit (.mk (obj := g.obj c') _) ⟨g.map f, rfl⟩ hf))⟩ |
| 647 | · obtain ⟨b, hb, h_top⟩ := (Q.whisker g).exists_notMem_eq_top h_fibre |
| 648 | exact ⟨b, hb, fun c' f hf ↦ .inr (h_top c' f hf)⟩ |
| 649 | -- `lerayHirsch θ` is bijective at `Spec T[1/a]`, hence at `W.topPoints`: they agree on the |
| 650 | -- special fibre. |
| 651 | have lh_open : IsLerayHirschBasis θ (freeAb W.topPoints.toFunctor) := by |
| 652 | refine transfer (homOfLe (le_sup_left.trans h_le)) |
| 653 | (fun c hc ↦ ⟨injective_of_mono _, fun q ↦ |
| 654 | ⟨⟨_, (multihomogeneousIdeal_eq_top_iff ..).1 ?_⟩, rfl⟩⟩) ?_ |
| 655 | · exact eq_top_mono (sup_le le_sup_left (hc.trans_le bot_le)) q.property |
| 656 | · obtain ⟨iso⟩ := testUnitLocus.nonempty_iso_away (A := A) a |
| 657 | exact (isClosedClass_isLerayHirschBasis.iff_of_isIso (freeAb.map (iso.hom ≫ toRange _))).1 |
| 658 | (lh_qc (isAffinelyCovered_reprBy _)) |
| 659 | have lh_lines : IsLerayHirschBasis θ (freeAb X) := (lh_qc isAffinelyCovered_projLinePow :) |
| 660 | have lh_rel : IsLerayHirschBasis θ (relFreeAb W.topPoints) := |
| 661 | (isClosedClass_isLerayHirschBasis.2 _ (relFreeAb.shortExact _).2 lh_open).1 lh_lines |
| 662 | -- `G` is equivalent to `(ℤ[pt] / ℤ[Q.topLocus]) / ℓ`, which is good by `L`. |
| 663 | have hG : D.IsFiniteLerayHirsch G := |
| 664 | (D.isFiniteLerayHirsch_iff_of_isCohomEquiv Q.constToZeros fun g ↦ |
| 665 | Q.isCohomEquiv_constToZeros g .locallyConstant rfl).1 |
| 666 | ((D.isClosedClass_isFiniteLerayHirsch.2 _ |
| 667 | (shortExact_nsmul_abCoker (N := relFreeAb _)).2 L).1 L) |
| 668 | exact h_descent.2 (D.isFiniteLerayHirsch_topPoints_of_surjective W lh_rel.2 hG) |
| 669 | |
| 670 | /-- Assume `L`: the pair of the point and its part away from the special fibre is good for `D`. |
| 671 | Let `e` present `R[X]` as the polynomial ring in `d` variables over `A`, and let `P = (f, g)` be |
| 672 | a standard étale pair over `R`. In `Spec R[X][1 / g]`, let `U` be the union of the part where `f` |
| 673 | is a unit and the part `offClosedFiber` away from the special fibre. Then the pair of |
| 674 | `Spec R[X][1 / g]` and `U` is good for `D`. -/ |
| 675 | lemma isFiniteLerayHirsch_offClosedFiber_sup_testUnitLocus_preimage |
| 676 | (L : D.IsFiniteLerayHirsch (relFreeAb (IdealFamily.ofMaximalIdeal (A := A)).topLocus)) |
| 677 | (P : StandardEtalePair R) (e : MvPolynomial (Fin d) A ≃ₐ[A] R[X]) : |
| 678 | D.IsFiniteLerayHirsch (relFreeAb ((offClosedFiber (testSpec A R[X]) ⊔ testUnitLocus |
| 679 | P.f).preimage (testUnitLocus (A := A) P.g).ι)) := by |
| 680 | -- Embed everything in the product of lines. With `W x` the union of `testUnitLocus x` and |
| 681 | -- `offClosedFiber`, the pairs given by `W (g * f)` and `W g` are good by |
| 682 | -- `isFiniteLerayHirsch_principal_open`, hence so is the first term of the short exact sequence |
| 683 | -- `relFreeAb.shortExact_triple`, which is the pair of the statement. |
| 684 | let j (x : R[X]) : (testUnitLocus (A := A) x).toFunctor ⟶ |
| 685 | ringOf (𝟭 (TestOver A)) ⋙ projLinePow (Fin d) := (testUnitLocus x).ι ≫ affineToLines e |
| 686 | let W (x : R[X]) : Subfunctor (ringOf (𝟭 (TestOver A)) ⋙ projLinePow (Fin d)) := |
| 687 | Subfunctor.range (j x) ⊔ offClosedFiber (ringOf (𝟭 _) ⋙ projLinePow (Fin d)) |
| 688 | have h_range_le : Subfunctor.range (j (P.g * P.f)) ≤ Subfunctor.range (j P.g) := by |
| 689 | simp only [j, range_comp, range_ι, testUnitLocus_mul] |
| 690 | exact fun _ _ ⟨ψ, hψ, h_eq⟩ ↦ ⟨ψ, hψ.1, h_eq⟩ |
| 691 | have h_sup : Subfunctor.range (j P.g) ⊔ W (P.g * P.f) = W P.g := by |
| 692 | simp only [W, ← sup_assoc, sup_eq_left.2 h_range_le] |
| 693 | have h_pre : (W (P.g * P.f)).preimage (j P.g) = |
| 694 | (offClosedFiber (testSpec A R[X]) ⊔ testUnitLocus P.f).preimage |
| 695 | (testUnitLocus (A := A) P.g).ι := by |
| 696 | ext c ⟨ψ, hψg⟩ |
| 697 | simp only [W, j, range_comp, range_ι, testUnitLocus_mul] |
| 698 | constructor |
| 699 | · rintro (⟨ψ', ⟨_, hψ'f⟩, h_eq⟩ | h) |
| 700 | · have hψ_eq : ψ' = ψ := injective_of_mono ((affineToLines e).app c) h_eq |
| 701 | exact .inr (hψ_eq ▸ hψ'f) |
| 702 | · exact .inl h |
| 703 | · rintro (h | hψf) |
| 704 | · exact .inr h |
| 705 | · exact .inl ⟨ψ, ⟨hψg, hψf⟩, rfl⟩ |
| 706 | rw [← h_pre] |
| 707 | -- Elaborated without the goal, whose unification with the result unfolds the cokernels. |
| 708 | exact (D.isFiniteLerayHirsch_of_shortExact (relFreeAb.shortExact_triple (j P.g) (W (P.g * P.f))).2 |
| 709 | (D.isFiniteLerayHirsch_principal_open e L (P.g * P.f)) |
| 710 | (by simpa only [h_sup, W] using D.isFiniteLerayHirsch_principal_open e L P.g) :) |
| 711 | |
| 712 | /-- Standard étale charts are good. A pair `U ⊆ Y` is good for the compared theory `D` if |
| 713 | `D.IsFiniteLerayHirsch` holds for `ℤ[Y]/ℤ[U]`: in particular |
| 714 | `w ↦ ∑ i, (w i restricted along g) · D.comparison i` is bijective on total Ext. Let `e` present |
| 715 | `R[X]` as the polynomial ring in `d` variables over `A`, and let `P = (f, g)` be a standard étale |
| 716 | pair over `R`. Assume `L`: the pair of the point and its part `offClosedFiber` away from the special |
| 717 | fibre is good for `D`. Then the pair of `Y = Spec (R[X] / f)[1 / g]` and `offClosedFiber Y` is |
| 718 | good. -/ |
| 719 | lemma isFiniteLerayHirsch_standard_etale |
| 720 | (L : D.IsFiniteLerayHirsch (relFreeAb (IdealFamily.ofMaximalIdeal (A := A)).topLocus)) |
| 721 | (P : StandardEtalePair R) (e : MvPolynomial (Fin d) A ≃ₐ[A] R[X]) : |
| 722 | D.IsFiniteLerayHirsch (relFreeAb (offClosedFiber |
| 723 | (testUnitLocus (AdjoinRoot.mk P.f P.g)).toFunctor)) := by |
| 724 | -- The pairs `(y, x)` of `rootPairs P` map by `u` to the points `x` of `Spec R[X][1/g]` and by `v` |
| 725 | -- to the points `(y, x - y)` of `Y × ℙ¹`. Both maps satisfy excision |
| 726 | -- (`isFiniteLerayHirsch_iff_of_locally_bijective`), for subfunctors `U`, `V` with the same |
| 727 | -- preimage; `U` is handled by `isFiniteLerayHirsch_offClosedFiber_sup_testUnitLocus_preimage`, |
| 728 | -- and `isFiniteLerayHirsch_of_prod_projLine` descends from `V` to `Y`. |
| 729 | let Y : TestOver A ⥤ Type 1 := (testUnitLocus (A := A) (AdjoinRoot.mk P.f P.g)).toFunctor |
| 730 | let G : Subfunctor (testSpec A R[X]) := testUnitLocus P.g |
| 731 | let U : Subfunctor G.toFunctor := (offClosedFiber _ ⊔ testUnitLocus P.f).preimage G.ι |
| 732 | let V : Subfunctor (Y ⊗ projLineAlong (𝟭 _)) := |
| 733 | (offClosedFiber Y).preimage (fst ..) ⊔ (affineChart.whisker (ringOf (𝟭 _))).preimage (snd ..) |
| 734 | let u : (rootPairs P).toFunctor ⟶ G.toFunctor := (rootPairs P).ι ≫ snd .. |
| 735 | let v : (rootPairs P).toFunctor ⟶ Y ⊗ projLineAlong (𝟭 _) := rootPairsToProdLine P |
| 736 | have u_surj : IsZariskiLocallyTop (ringOf (𝟭 _)) (.range u ⊔ U) := by |
| 737 | intro c ψ m hm |
| 738 | let m' : Ideal c.obj := m |
| 739 | have hm' : m'.IsMaximal := hm |
| 740 | have : m'.IsPrime := hm'.isPrime |
| 741 | obtain hf | hf := em' (asAlgHom ψ.val P.f ∈ m') |
| 742 | · exact ⟨_, hf, fun _ _ h_unit ↦ .inr (.inr h_unit)⟩ |
| 743 | -- Otherwise `x` is a root of `f` modulo `m`, and it lifts to a root `y` in the test ring. |
| 744 | have h_root_mod : (P.f.map ((asAlgHom ψ.val).comp CAlgHom).toRingHom).eval₂ |
| 745 | (Ideal.Quotient.mk m') (Ideal.Quotient.mk m' (asAlgHom ψ.val X)) = 0 := by |
| 746 | rw [eval₂_map, ← hom_eval₂] |
| 747 | change Ideal.Quotient.mk m' |
| 748 | (P.f.eval₂ ((asAlgHom ψ.val).toRingHom.comp C) ((asAlgHom ψ.val).toRingHom X)) = 0 |
| 749 | rw [← hom_eval₂, eval₂_C_X] |
| 750 | exact eq_zero_iff_mem.mpr hf |
| 751 | obtain ⟨y, hy, h_lift⟩ := c.property.exists_root_map_eq (f := Ideal.Quotient.mk m') |
| 752 | (x := Ideal.Quotient.mk m' (asAlgHom ψ.val X)) |
| 753 | (P.monic_f.map ((asAlgHom ψ.val).comp CAlgHom).toRingHom) h_root_mod |
| 754 | let w := liftAlgHom P.f ((asAlgHom ψ.val).comp CAlgHom) y ((eval₂_eq_eval_map _).trans hy) |
| 755 | exact exists_notMem_of_rootPairs w (asAlgHom ψ.val) (.inr ψ.property) m'.one_notMem |
| 756 | ((Ideal.Quotient.eq (I := m')).mp h_lift.symm) |
| 757 | (fun _d _f _hw _hψ _h_unit h_mem ↦ .inl ⟨⟨_, h_mem⟩, rfl⟩) (by simp [w]) (by simp [w]) |
| 758 | -- On `rootPairs P`, `f x` is a unit exactly when `x - y` is. |
| 759 | have h_preimage : V.preimage v = U.preimage u := by |
| 760 | ext c ψ |
| 761 | exact or_congr_right (isUnit_unimodularRow_affinePt_iff.trans ψ.property.1.isUnit_iff.symm) |
| 762 | have excision_u : D.IsFiniteLerayHirsch (relFreeAb (U.preimage u)) ↔ |
| 763 | D.IsFiniteLerayHirsch (relFreeAb U) := by |
| 764 | -- `u` is locally injective: two roots `y`, `y'` paired with the same `x` agree near `m`, unless |
| 765 | -- `f x ∉ m`, when both pairs are locally in `U`. |
| 766 | refine D.isFiniteLerayHirsch_iff_of_locally_bijective u u_surj fun c |
| 767 | ⟨⟨⟨(w, ψ), hw, hw_C⟩, (χ, _), hχ, hχ_C⟩, rfl⟩ m hm ↦ ?_ |
| 768 | let m' : Ideal c.obj := m |
| 769 | have hm' : m'.IsMaximal := hm |
| 770 | have : m'.IsPrime := hm'.isPrime |
| 771 | obtain hf | hf := em' (asAlgHom ψ.val P.f ∈ m') |
| 772 | · exact ⟨_, hf, fun _ _ h ↦ |
| 773 | .trans (relFreeAb.mk_eq_zero (.inr h)) (.symm (relFreeAb.mk_eq_zero (.inr h)))⟩ |
| 774 | have h_diff : asAlgHom w.val (root _) - asAlgHom (c := c) χ.val (root _) ∈ m' := by |
| 775 | -- `f x` divides both `x - y` and `x - y'`, and `f x ∈ m`. |
| 776 | simpa using m'.mem_of_dvd (hχ.dvd.sub hw.dvd) hf |
| 777 | refine exists_notMem_of_rootPairs (asAlgHom χ.val) |
| 778 | ((asAlgHom w.val).comp ((mkₐ P.f).restrictScalars A)) (.inl χ.property) m'.one_notMem h_diff |
| 779 | (fun _d f _hw _hψ _h_unit ⟨h_assoc, h_const⟩ ↦ ?_) |
| 780 | (by simp) (fun r ↦ by simpa using (hχ_C r).trans (hw_C r).symm) |
| 781 | -- `(y', y)` is locally in `rootPairs P`, so `f y = 0` divides `y - y'`: after `f` the roots |
| 782 | -- `y`, `y'` agree, hence so do the two pairs and their classes. |
| 783 | have h_roots_eq : f.hom.hom.comp (asAlgHom w.val) = f.hom.hom.comp (asAlgHom χ.val) := by |
| 784 | refine algHom_ext' (AlgHom.ext fun r ↦ (h_const r).symm) ?_ |
| 785 | have h_f_zero : f.hom.hom (asAlgHom w.val (AdjoinRoot.mk P.f P.f)) = 0 := by simp |
| 786 | exact sub_eq_zero.mp (h_assoc.eq_zero_iff.mp h_f_zero) |
| 787 | exact congr(relFreeAb.mk _ ⟨(⟨⟨ofHom $h_roots_eq⟩, _⟩, _), _⟩) |
| 788 | have excision_v : D.IsFiniteLerayHirsch (relFreeAb (V.preimage v)) ↔ |
| 789 | D.IsFiniteLerayHirsch (relFreeAb V) := |
| 790 | D.isFiniteLerayHirsch_iff_of_locally_bijective v |
| 791 | (isZariskiLocallyTop_range_rootPairsToProdLine_sup P) |
| 792 | (isZariskiLocallyTop_sameClassLocus_of_injective v V (rootPairsToProdLine_app_injective P)) |
| 793 | refine D.isFiniteLerayHirsch_of_prod_projLine (excision_v.mp ?_) |
| 794 | rw [h_preimage, excision_u] |
| 795 | exact D.isFiniteLerayHirsch_offClosedFiber_sup_testUnitLocus_preimage L P e |
| 796 | |
| 797 | end ComparedTheory |
| 798 | |
| 799 | end New.Variety |
| 800 | |
| 801 | end |