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.CategoryTheory.Limits.Final.Type |
| 4 | public import Lib.Cohomology.ProjectiveLine.ChernClass |
| 5 | |
| 6 | /-! |
| 7 | # Integration over ℙ¹, compared cohomology theories, and moving kernel classes in (ℙ¹)^d |
| 8 | |
| 9 | The file gives the geometric step of the duality for a zero locus in (ℙ¹)^d: a kernel class is moved |
| 10 | between points one coordinate at a time. In the first section, g is a functor from C to tests over |
| 11 | A, ℓ is invertible in A, and I is a family of ideals on the points of a functor X on tests. η |
| 12 | denotes the class `New.Variety.etaClass`; `M.HasLineFormula` (the projective line formula) says |
| 13 | that, for every S, each class from S over the points of ℙ¹ is a·1 + b·η for unique a, b restricted |
| 14 | from the base. The file then sets up the formal comparison of two cohomology theories on tests over |
| 15 | `A`, using integration over `ℙ¹`. |
| 16 | |
| 17 | ## Main definitions and results |
| 18 | |
| 19 | * `New.Variety.IdealFamily.exists_move_kernel`: a class at the point t(q) is moved to t(q') by |
| 20 | multiplying with the classes η(q_j) + η(q'_j). |
| 21 | * `New.Variety.TorsionCoeff.HasLineFormula.integrate`: integration `a + η b ↦ b` over `ℙ¹`, given |
| 22 | `New.Variety.TorsionCoeff.HasLineFormula`. |
| 23 | * `New.Variety.ComparedTheory`, `New.Variety.ComparedTheory.IsFiniteLerayHirsch`: a theory with maps |
| 24 | from the locally constant `ZMod ℓ` coefficients, and the property that these maps compute its |
| 25 | cohomology from finite groups. |
| 26 | * `New.Variety.NaturalOp`: operations on cohomology, natural in the theory, with parameters in `ℙ¹`. |
| 27 | * `New.Variety.ComparedTheory.isClosedClass_isFiniteLerayHirsch`, |
| 28 | `New.Variety.ComparedTheory.isFiniteLerayHirsch_of_shortExact`, |
| 29 | `New.Variety.ComparedTheory.isFiniteLerayHirsch_iff_of_isCohomEquiv`, |
| 30 | `New.Variety.ComparedTheory.isFiniteLerayHirsch_of_retract`: the property passes along short exact |
| 31 | sequences, equivalences and retracts by operations. |
| 32 | * `New.Variety.ComparedTheory.isFiniteLerayHirsch_of_integrate_params`, |
| 33 | `New.Variety.ComparedTheory.isFiniteLerayHirsch_topPoints_of_surjective`: it passes to pairs in |
| 34 | `(ℙ¹)^m`, by self-duality. |
| 35 | |
| 36 | Notions from other files: |
| 37 | * `New.Variety.TestOver`: The category of tests over A: the full subcategory of commutative |
| 38 | A-algebras whose underlying rings are test rings. |
| 39 | * `New.Variety.TorsionCoeff`: a functor F on C to abelian groups, killed by ℓ, with Zariski descent |
| 40 | for the rings g(c). A `New.Variety.Theory` is one that also behaves well on closed loci. |
| 41 | * `New.Variety.IdealFamily`: For a functor ι from C to commutative rings, ideals I_c of ι(c) such |
| 42 | that I_b is generated by the image of I_a for every morphism a → b. |
| 43 | * `New.Variety.IdealFamily.topLocus`: the subfunctor of the one-point functor that is non-empty |
| 44 | exactly where I_c is the unit ideal. |
| 45 | |
| 46 | ## Implementation notes |
| 47 | |
| 48 | `exists_move_kernel_of_eq_imp_eq` is preceded by |
| 49 | `seal TorsionCoeff.mulClass Abelian.Ext Abelian.Ext.instAddCommGroup in`. Sealing the product |
| 50 | `mulClass`, the Ext groups and their group structure makes unification compare them by their |
| 51 | arguments instead of unfolding them into the derived category, which is slow. |
| 52 | |
| 53 | ## Relation to the literature |
| 54 | |
| 55 | Known; see `Lib.PadicComparison.Duality.GoodPairs` for sources. |
| 56 | -/ |
| 57 | |
| 58 | @[expose] public section |
| 59 | |
| 60 | noncomputable section |
| 61 | |
| 62 | namespace New.Variety |
| 63 | |
| 64 | /-! |
| 65 | ## Moving a kernel class between points of (ℙ¹)^d |
| 66 | |
| 67 | `New.Variety.TotalH` N F is the total Ext group and `New.Variety.TotalH.comp` the Yoneda product. |
| 68 | `New.Variety.relFreeAb` U is ℤ[V]/ℤ[U] for U ⊆ V. `New.Variety.TorsionCoeff.etaAt` b is the product |
| 69 | with the class η = `New.Variety.etaClass` pulled back along b, as a class in Ext²(F, F). |
| 70 | -/ |
| 71 | |
| 72 | section MovingKernel |
| 73 | |
| 74 | open CategoryTheory Fin TotalH |
| 75 | |
| 76 | variable {C : Type 1} [Category C] {ℓ : ℕ} |
| 77 | {A : Type} [CommRing A] [InvertsPrime A ℓ] {g : C ⥤ TestOver A} {d : ℕ} |
| 78 | |
| 79 | /-- For a section q of (P¹)^ι along g and i in ι, its i-th component, a section of P¹ along g. -/ |
| 80 | def projLinePow.component {ι : Type} (q : (ringOf g ⋙ projLinePow ι).sections) (i : ι) : |
| 81 | (projLineAlong g).sections := |
| 82 | ⟨fun c ↦ q.val c i, fun f ↦ congrFun (q.property f) i⟩ |
| 83 | |
| 84 | section AtSection |
| 85 | |
| 86 | variable (Θ : Theory g) |
| 87 | |
| 88 | namespace IdealFamily |
| 89 | |
| 90 | variable {X : TestOver A ⥤ Type 1} (I : IdealFamily (ringOf (elementsProj X ⋙ 𝟭 (TestOver A)))) |
| 91 | (q : (g ⋙ X).sections) |
| 92 | |
| 93 | /-- For a compatible family I of ideals on the elements of X, the subfunctor of X of points x in |
| 94 | X(c) at which I is the unit ideal. -/ |
| 95 | def topPoints : Subfunctor X where |
| 96 | obj c := {x : X.obj c | I.ideal (X.elementsMk c x) = ⊤} |
| 97 | map f _ := I.topLocus.map ⟨f, rfl⟩ (a := ⟨⟩) |
| 98 | |
| 99 | /-- The morphism ℤ[pt]/ℤ[O] → (ℤ[X]/ℤ[U])∘g induced by the section q, where U ⊆ X and O ⊆ pt |
| 100 | are the loci where I and its pull-back along q are the unit ideal. -/ |
| 101 | def atSection : relFreeAb (I.whisker (sectionLift g q)).topLocus ⟶ g ⋙ relFreeAb I.topPoints := |
| 102 | relFreeAb.map (U := I.topPoints.whisker g) (sectionMap q) le_rfl |
| 103 | |
| 104 | /-- The reduction modulo ℓ of `New.Variety.IdealFamily.atSection`: the morphism |
| 105 | (ℤ[pt]/ℤ[O])/ℓ → ((ℤ[X]/ℤ[U])∘g)/ℓ induced by the section q, where U ⊆ X and O ⊆ pt are the loci |
| 106 | where I and its pull-back along q are the unit ideal. -/ |
| 107 | def atSectionMod : |
| 108 | abCoker (ℓ • 𝟙 (relFreeAb (I.whisker (sectionLift g q)).topLocus)) ⟶ |
| 109 | abCoker (ℓ • 𝟙 (g ⋙ relFreeAb I.topPoints)) := |
| 110 | abCoker.desc (I.atSection q ≫ abCoker.π (ℓ • 𝟙 (g ⋙ relFreeAb I.topPoints))) |
| 111 | (by simpa using I.atSection q ≫= shortExact_nsmul_abCoker.1) |
| 112 | |
| 113 | /-- The isomorphism of total Ext groups into Θ given by pull-back along |
| 114 | `New.Variety.IdealFamily.constToZeros` (constants mod ℓ to functions on the zeros of I), restricted |
| 115 | along the section q. -/ |
| 116 | def zerosEquiv : |
| 117 | TotalH (sectionLift g q ⋙ zerosCoeff (locConstAlong (elementsProj X ⋙ 𝟭 (TestOver A))) I) |
| 118 | Θ.functor ≃+ |
| 119 | TotalH (sectionLift g q ⋙ abCoker (ℓ • 𝟙 (relFreeAb I.topLocus))) Θ.functor := |
| 120 | AddEquiv.ofBijective (pullbackAlong ((sectionLift g q).whiskerLeft I.constToZeros)) |
| 121 | (I.isCohomEquiv_constToZeros (sectionLift g q) (Theory.onElements Theory.locallyConstant) rfl |
| 122 | Θ.zariski_descent).bijective_pullbackAlong |
| 123 | |
| 124 | /-- From classes on (ℤ[X]/ℤ[`New.Variety.IdealFamily.topPoints`])/ℓ along g to classes on the |
| 125 | locally constant ℤ/ℓ-valued functions modulo those dying where I = 0 |
| 126 | (`New.Variety.IdealFamily.zerosCoeff`), taken along q: pull back along q, then invert |
| 127 | `New.Variety.IdealFamily.zerosEquiv`. -/ |
| 128 | def extendToZeros : |
| 129 | TotalH (abCoker (ℓ • 𝟙 (g ⋙ relFreeAb I.topPoints))) Θ.functor →+ |
| 130 | TotalH (sectionLift g q ⋙ zerosCoeff (locConstAlong (elementsProj X ⋙ 𝟭 (TestOver A))) I) |
| 131 | Θ.functor := |
| 132 | (I.zerosEquiv Θ q).symm.toAddMonoidHom.comp (pullbackAlong (I.atSectionMod q)) |
| 133 | |
| 134 | /-- The defining property of `I.extendToZeros Θ q x`: its image under `I.zerosEquiv Θ q` is the |
| 135 | pull-back of `x` along the section `q`. -/ |
| 136 | lemma zerosEquiv_extendToZeros (x : TotalH (abCoker (ℓ • 𝟙 (g ⋙ relFreeAb I.topPoints))) |
| 137 | Θ.functor) : |
| 138 | I.zerosEquiv Θ q (I.extendToZeros Θ q x) = pullbackAlong (I.atSectionMod q) x := |
| 139 | (I.zerosEquiv Θ q).apply_symm_apply _ |
| 140 | |
| 141 | /-- Let `I` be a family of ideals on the points of a functor `X` on tests, `q` a section of `X` |
| 142 | along `g`, `Θ` a theory along `g`, `φ : C' ⥤ C` a functor, `K` a theory along `φ ⋙ g`, and `b` a |
| 143 | class in the total Ext group from `φ ⋙ Θ.functor` to `K.functor`. Write `R` for the map |
| 144 | `y ↦ (y restricted along φ) · b` from classes with coefficients in `Θ.functor` to classes with |
| 145 | coefficients in `K.functor`. Then `R` commutes with `extendToZeros`: for a class `x` on |
| 146 | `(ℤ[X]/ℤ[I.topPoints])/ℓ` along `g`, the image under `R` of the extension of `x` for `Θ` and `q` is |
| 147 | the extension of `R x` for `K` and the restriction of `q` along `φ`. -/ |
| 148 | lemma extendToZeros_naturality {C' : Type 1} [Category C'] (φ : C' ⥤ C) (K : Theory (φ ⋙ g)) |
| 149 | (b : TotalH (φ ⋙ Θ.functor) K.functor) |
| 150 | (x : TotalH (g ⋙ abCoker (ℓ • 𝟙 (relFreeAb I.topPoints))) Θ.functor) : |
| 151 | mapThenComp (restrictAlong φ) b (I.extendToZeros Θ q x) = |
| 152 | I.extendToZeros K (φ.sectionsPrecomp q) (mapThenComp (restrictAlong φ) b x) := by |
| 153 | -- Apply `zerosEquiv` to both sides: each becomes `R` of the pull-back of `x` along `q`, since |
| 154 | -- `R` commutes with pull-backs and `zerosEquiv` is one. |
| 155 | let q' : ((φ ⋙ g) ⋙ X).sections := φ.sectionsPrecomp q |
| 156 | let R {N : AbFunctor C} : TotalH N Θ.functor →+ TotalH (φ ⋙ N) K.functor := |
| 157 | mapThenComp (restrictAlong φ) b |
| 158 | have R_pullback {N N' : AbFunctor C} (f : N ⟶ N') (y : TotalH N' Θ.functor) : |
| 159 | R (pullbackAlong f y) = pullbackAlong (φ.whiskerLeft f) (R y) := |
| 160 | mapThenComp_comp map_homClass |
| 161 | -- (The next facts keep the types they are born with; `apply` then compares them with the goal |
| 162 | -- once. Restating them first would repeat each of the costly definitional checks.) |
| 163 | have R_zerosEquiv := |
| 164 | R_pullback ((sectionLift g q).whiskerLeft I.constToZeros) (I.extendToZeros Θ q x) |
| 165 | have R_atSectionMod := R_pullback (I.atSectionMod q) x |
| 166 | -- `zerosEquiv K q'` of the left side is `R` of the pull-back of `x` along `q`, restricted |
| 167 | have h_left := |
| 168 | R_zerosEquiv.symm.trans |
| 169 | ((congrArg R (I.zerosEquiv_extendToZeros Θ q x)).trans R_atSectionMod) |
| 170 | -- and so is `zerosEquiv K q'` of the right side (`(R x :)`: elaborate `R x` on its own) |
| 171 | have h_right := I.zerosEquiv_extendToZeros K q' (R x :) |
| 172 | apply (I.zerosEquiv K q').injective |
| 173 | apply h_left.trans |
| 174 | apply h_right.symm |
| 175 | |
| 176 | end IdealFamily |
| 177 | |
| 178 | end AtSection |
| 179 | |
| 180 | namespace IdealFamily |
| 181 | |
| 182 | variable {X : TestOver A ⥤ Type 1} (I : IdealFamily (ringOf (elementsProj X ⋙ 𝟭 (TestOver A)))) |
| 183 | |
| 184 | /-- Let every maximal ideal `m` of a ring `g(c)` be the kernel of `g(f)` for some `f : c ⟶ c'` |
| 185 | (`h_max`), and let the families `L` and `L'` of ideals agree at every object where the family `J` is |
| 186 | zero. Then, inside the locus where `L'` is the unit ideal, the locus where `L` or `J` is the unit |
| 187 | ideal is locally everything. -/ |
| 188 | lemma isZariskiLocallyTop_preimage_topLocus_inf_sup |
| 189 | (h_max : ∀ (c : C) (m : Ideal ((ringOf g).obj c)), m.IsMaximal → |
| 190 | ∃ (c' : C) (f : c ⟶ c'), RingHom.ker ((ringOf g).map f).hom = m) |
| 191 | {L L' J : IdealFamily (ringOf g)} (h_eq : ∀ c : C, J.ideal c = ⊥ → L.ideal c = L'.ideal c) : |
| 192 | IsZariskiLocallyTop (ringOf g) |
| 193 | ((L'.topLocus ⊓ (L.topLocus ⊔ J.topLocus)).preimage L'.topLocus.ι) := by |
| 194 | intro c y m hm |
| 195 | obtain ⟨c', f, hf⟩ : ∃ (c' : C) (f : c ⟶ c'), RingHom.ker ((ringOf g).map f).hom = m := |
| 196 | h_max c m hm |
| 197 | -- a family is zero at `c'` exactly when its ideal at `c` lies in `m` |
| 198 | have bot_iff (T : IdealFamily (ringOf g)) : T.ideal c' = ⊥ ↔ T.ideal c ≤ m := by |
| 199 | rw [← T.map_eq f, ← hf, Ideal.map_eq_bot_iff_le_ker] |
| 200 | have hL'_top : L'.ideal c = ⊤ := y.property |
| 201 | -- if `L` and `J` both lay in `m`, then at `c'` the family `L'` would agree with `L` and be zero |
| 202 | have h_not : ¬L.ideal c ≤ m ∨ ¬J.ideal c ≤ m := by |
| 203 | refine not_and_or.1 fun ⟨hL_le, hJ_le⟩ ↦ hm.ne_top ?_ |
| 204 | have hL_eq : L.ideal c' = L'.ideal c' := h_eq c' ((bot_iff J).2 hJ_le) |
| 205 | have hL'_bot : L'.ideal c' = ⊥ := by |
| 206 | rw [← hL_eq] |
| 207 | exact (bot_iff L).2 hL_le |
| 208 | exact eq_top_mono ((bot_iff L').1 hL'_bot) hL'_top |
| 209 | rcases h_not with hL | hJ |
| 210 | · obtain ⟨a, ha, h_top⟩ := L.exists_notMem_eq_top hL |
| 211 | exact ⟨a, ha, fun B f hf ↦ ⟨Subtype.prop _, .inl (h_top B f hf)⟩⟩ |
| 212 | · obtain ⟨a, ha, h_top⟩ := J.exists_notMem_eq_top hJ |
| 213 | exact ⟨a, ha, fun B f hf ↦ ⟨Subtype.prop _, .inr (h_top B f hf)⟩⟩ |
| 214 | |
| 215 | seal TorsionCoeff.mulClass Abelian.Ext Abelian.Ext.instAddCommGroup in |
| 216 | /-- The one-coordinate case of `exists_move_kernel`. Let `K` be an `ℓ`-torsion coefficient along |
| 217 | `g`, and let the sections `s` and `s'` of `X` agree wherever the sections `x` and `x'` of `ℙ¹` do. |
| 218 | Let `h_max` say that each maximal ideal of a ring `g(c)` is the kernel of some `g(f)`. Then for |
| 219 | every total Ext class `δ` into `K` from ℤ[pt]/ℤ[O], with O the locus where the pull-back of `I` |
| 220 | along `s` is the unit ideal, there is a class `δ'` of the same kind for `s'` with the following |
| 221 | property. For every `φ : C' ⥤ C`, theory `Θ` along `φ ⋙ g` (a coefficient that behaves well on |
| 222 | closed loci), class `T` from `K` restricted along `φ` to `Θ`, and class `v` from |
| 223 | `ℤ[X]/ℤ[I.topPoints]` along `φ ⋙ g` to `Θ`: if the Yoneda product `δ · T` (of `δ` restricted along |
| 224 | `φ` with `T`) is the pull-back of `v` along `I.atSection s`, then `δ' · T` is that of |
| 225 | `v · (η(x) + η(x'))` along `I.atSection s'`. -/ |
| 226 | lemma exists_move_kernel_of_eq_imp_eq (K : TorsionCoeff g) |
| 227 | (h_max : ∀ (c : C) (m : Ideal ((ringOf g).obj c)), m.IsMaximal → |
| 228 | ∃ (c' : C) (f : c ⟶ c'), RingHom.ker ((ringOf g).map f).hom = m) |
| 229 | (x x' : (projLineAlong g).sections) (s s' : (g ⋙ X).sections) |
| 230 | (h_agree : ∀ c : C, x.val c = x'.val c → s.val c = s'.val c) |
| 231 | (δ : TotalH (relFreeAb (I.whisker (sectionLift g s)).topLocus) K.functor) : |
| 232 | ∃ δ' : TotalH (relFreeAb (I.whisker (sectionLift g s')).topLocus) K.functor, |
| 233 | ∀ (C' : Type 1) [Category C'] (φ : C' ⥤ C) (Θ : Theory (φ ⋙ g)) |
| 234 | (T : TotalH ((restrictAlong φ).obj K.functor) Θ.functor) |
| 235 | (v : TotalH (φ ⋙ g ⋙ relFreeAb I.topPoints) Θ.functor), |
| 236 | mapThenComp (restrictAlong φ) T δ = pullbackAlong (φ.whiskerLeft (I.atSection s)) v → |
| 237 | mapThenComp (restrictAlong φ) T δ' = |
| 238 | pullbackAlong (φ.whiskerLeft (I.atSection s')) |
| 239 | (comp.flip (Θ.etaAt |
| 240 | (φ.whiskerLeft (freeAbSectionMap x + freeAbSectionMap x'))).toTotalH v) := by |
| 241 | -- The product with a class ξ supported where `x = x'` moves δ from `s` to `s'`. Take ideals `J` |
| 242 | -- with `x = x'` where `J` is zero (`hJ`), and a class `ξ` relative to `J.topLocus` that gives |
| 243 | -- η(x) + η(x') when its support is forgotten (`hξ`). |
| 244 | obtain ⟨J, hJ, ξ, hξ⟩ := exists_etaClass_supported_diagonal x x' |
| 245 | -- `L r` is the family `I` at the section `r` of `X` |
| 246 | let L (r : (g ⋙ X).sections) : IdealFamily (ringOf g) := I.whisker (sectionLift g r) |
| 247 | -- the sections `s` and `s'` agree where `J` is zero, and so do `L s` and `L s'` |
| 248 | have hs_eq (c : C) (hc : J.ideal c = ⊥) : s.val c = s'.val c := h_agree c (hJ c hc) |
| 249 | have h_L_eq (c : C) (hc : J.ideal c = ⊥) : (L s).ideal c = (L s').ideal c := by |
| 250 | change I.ideal (X.elementsMk (g.obj c) (s.val c)) = I.ideal (X.elementsMk (g.obj c) (s'.val c)) |
| 251 | rw [hs_eq c hc] |
| 252 | -- Where `L s'` is the unit ideal, locally `L s` or `J` is the unit ideal too. |
| 253 | have h_loc : |
| 254 | IsZariskiLocallyTop (ringOf g) |
| 255 | (((L s').topLocus ⊓ ((L s).topLocus ⊔ J.topLocus)).preimage (L s').topLocus.ι) := |
| 256 | isZariskiLocallyTop_preimage_topLocus_inf_sup h_max h_L_eq |
| 257 | -- By Zariski descent, classes relative to `(L s').topLocus ⊓ ((L s).topLocus ⊔ J.topLocus)` |
| 258 | -- come from classes relative to `(L s').topLocus`. Let δ' be the class that restricts to the |
| 259 | -- product of δ and ξ, pulled back along the diagonal: a point where `L s'` is the unit ideal, |
| 260 | -- and `L s` or `J` is, lies in `((L s).topLocus ⊓ (L s').topLocus) × pt` or in `pt × J.topLocus`. |
| 261 | -- (inline: as a separate `have`, the diagonal map no longer matches the `simp only` below) |
| 262 | obtain ⟨δ', hδ'⟩ := |
| 263 | (relFreeAb.isCohomEquiv_of_le inf_le_left |
| 264 | (K.zariski_descent h_loc)).bijective_pullbackAlong.surjective |
| 265 | (pullbackAlong |
| 266 | (relFreeAb.map {app _ := ↾Function.diag} (by |
| 267 | rintro c y ⟨hy_L', hy_L | hy_J⟩ |
| 268 | · exact .inl ⟨hy_L, hy_L'⟩ |
| 269 | · exact .inr hy_J) ≫ |
| 270 | relFreeAb.prod _ J.topLocus) |
| 271 | (K.mulClass ξ.toTotalH |
| 272 | (pullbackAlong (relFreeAb.map (𝟙 _) (inf_le_left (b := (L s').topLocus))) δ))) |
| 273 | refine ⟨δ', fun C' _ φ Θ T v hv ↦ ?_⟩ |
| 274 | -- The same restriction is injective for Θ, so the claim may be checked after it. |
| 275 | apply (relFreeAb.isCohomEquiv_of_le (U := (L s').topLocus.whisker φ) (U' := .whisker (_ ⊓ _) φ) |
| 276 | (fun c y hy ↦ hy.1) (Θ.zariski_descent (h_loc.whisker φ))).bijective_pullbackAlong.injective |
| 277 | -- Restrict the defining equations of δ' and ξ along φ. (`↓`: `map_restrictAlong_etaClass` |
| 278 | -- must rewrite η before `map_of` unfolds it.) |
| 279 | replace hδ' := congrArg (mapThenComp (restrictAlong φ) T) hδ' |
| 280 | replace hξ := congrArg (TotalH.map (restrictAlong φ)) hξ |
| 281 | simp only [map_pullbackAlong, map_of, mapThenComp_comp map_homClass, |
| 282 | ↓map_restrictAlong_etaClass, K.mulClass_naturality] at hδ' hξ ⊢ |
| 283 | -- After `hδ'` and `hv`: in the product with ξ the section s may be replaced by s' |
| 284 | -- (`mulClass_congr_of_eq_on_zeros`), and the product with ξ, its support forgotten, is the |
| 285 | -- operator of η(x) + η(x') (`mulClass_eq_comp_etaAt`). |
| 286 | -- (erw: the restricted functors agree with the rewritten ones only up to definitional equality) |
| 287 | erw [hδ', hv, pullbackAlong_pullbackAlong, |
| 288 | Θ.mulClass_congr_of_eq_on_zeros (J.whisker φ) _ |
| 289 | (a' := φ.whiskerLeft (relFreeAb.map (𝟙 _) inf_le_right ≫ I.atSection _)), |
| 290 | ← Θ.mulClass_eq_comp_etaAt _ (relFreeAb.π _), pullbackAlong_pullbackAlong, |
| 291 | pullbackAlong_pullbackAlong, pullbackAlong_pullbackAlong] |
| 292 | · -- Both sides are pulled back along maps that agree on generators. (`congr(…)`: `congrArg` |
| 293 | -- elaborates the equation of maps without its expected type, and fails.) |
| 294 | exact congr(pullbackAlong |
| 295 | $(relFreeAb.hom_ext fun _ _ ↦ .refl (relFreeAb.mk I.topPoints _ ⊗ₜ _)) _) |
| 296 | · exact hξ |
| 297 | · -- the two points agree where J is zero |
| 298 | intro c hc |
| 299 | exact AddCommGrpCat.ext <| relFreeAb.mem_of_mk_mem (A := φ.obj c) |
| 300 | (AddMonoidHom.eqLocus _ _) fun _ ↦ congrArg (relFreeAb.mk _) (hs_eq _ hc) |
| 301 | |
| 302 | /-- Let `K` be a torsion coefficient along `g`. Suppose every maximal ideal of each ring `g c` is |
| 303 | the kernel of the ring map along some `c ⟶ c'` (`h_max`). Let `t` send `d` sections of `ℙ¹` to a |
| 304 | section of `g ⋙ X`, pointwise (`t_congr`). Let `δ` be a class in the total Ext group from |
| 305 | `ℤ[pt]/ℤ[O_q]` to `K.functor`, where `O_q` is where the pull-back of `I` along `t q` is the unit |
| 306 | ideal. Then some `δ'` (for `q'`) satisfies the following. Take any `φ : C' ⥤ C`, theory `Θ` along |
| 307 | `φ ⋙ g`, class `T` from `K.functor` restricted along `φ` to `Θ.functor`, and class `w` from |
| 308 | `ℤ[X]/ℤ[I.topPoints]` along `φ ⋙ g` to `Θ.functor`. If `δ · T` is the pull-back of `w` along `t q`, |
| 309 | then `δ' · T` is the pull-back along `t q'` of `w` followed by the products with `η` at `q_j + q'_j` |
| 310 | for all `j`. -/ |
| 311 | lemma exists_move_kernel (K : TorsionCoeff g) |
| 312 | (h_max : ∀ (c : C) (m : Ideal ((ringOf g).obj c)), m.IsMaximal → |
| 313 | ∃ (c' : C) (f : c ⟶ c'), RingHom.ker ((ringOf g).map f).hom = m) |
| 314 | (t : (Fin d → (projLineAlong g).sections) → (g ⋙ X).sections) |
| 315 | (t_congr : ∀ {r r' : Fin d → (projLineAlong g).sections} (c : C), |
| 316 | (∀ j : Fin d, (r j).val c = (r' j).val c) → (t r).val c = (t r').val c) : |
| 317 | ∀ (q q' : Fin d → (projLineAlong g).sections) |
| 318 | (δ : TotalH (relFreeAb (I.whisker (sectionLift g (t q))).topLocus) K.functor), |
| 319 | ∃ δ' : TotalH (relFreeAb (I.whisker (sectionLift g (t q'))).topLocus) K.functor, |
| 320 | ∀ (C' : Type 1) [Category C'] (φ : C' ⥤ C) (Θ : Theory (φ ⋙ g)) |
| 321 | (T : TotalH ((restrictAlong φ).obj K.functor) Θ.functor) |
| 322 | (w : TotalH (φ ⋙ g ⋙ relFreeAb I.topPoints) Θ.functor), |
| 323 | mapThenComp (restrictAlong φ) T δ = |
| 324 | pullbackAlong (φ.whiskerLeft (I.atSection (t q))) w → |
| 325 | mapThenComp (restrictAlong φ) T δ' = |
| 326 | pullbackAlong (φ.whiskerLeft (I.atSection (t q'))) |
| 327 | (foldr d (fun (j : Fin d) ↦ comp.flip (Θ.etaAt (φ.whiskerLeft |
| 328 | (freeAbSectionMap (q j) + freeAbSectionMap (q' j)))).toTotalH) w) := by |
| 329 | -- Induction on `d`: move the last `d` coordinates, then the first one. |
| 330 | induction d with |
| 331 | | zero => |
| 332 | -- with no coordinates the families `q` and `q'` are empty, so `t q = t q'`, and the product |
| 333 | -- over `j` is empty: take `δ' = δ` |
| 334 | simp only [forall_fin_zero_pi] |
| 335 | intro δ |
| 336 | exact ⟨δ, fun C' _ φ Θ T w hw ↦ hw⟩ |
| 337 | | succ d ih => |
| 338 | simp only [forall_fin_succ_pi] |
| 339 | intro x q x' q' δ₀ |
| 340 | have t_congr_tail : ∀ {r r' : Fin d → (projLineAlong g).sections} (c : C), |
| 341 | (∀ j : Fin d, (r j).val c = (r' j).val c) → |
| 342 | (t (cons x r)).val c = (t (cons x r')).val c := |
| 343 | fun c hr ↦ t_congr c (cases rfl hr) |
| 344 | -- the induction hypothesis moves the last `d` coordinates, with first coordinate `x` |
| 345 | obtain ⟨δ, hδ⟩ := ih (fun r ↦ t (cons x r)) t_congr_tail q q' δ₀ |
| 346 | -- the sections `t (x, q')` and `t (x', q')` agree wherever `x` and `x'` do |
| 347 | have h_agree (c : C) (hc : x.val c = x'.val c) : |
| 348 | (t (cons x q')).val c = (t (cons x' q')).val c := |
| 349 | t_congr c (cases hc fun _ ↦ rfl) |
| 350 | -- the first coordinate is moved from `x` to `x'` by the one-coordinate case |
| 351 | obtain ⟨δ', hδ'⟩ := |
| 352 | I.exists_move_kernel_of_eq_imp_eq K h_max x x' (t (cons x q')) (t (cons x' q')) h_agree δ |
| 353 | refine ⟨δ', fun C' _ φ Θ T w hw ↦ ?_⟩ |
| 354 | rw [foldr_succ] |
| 355 | exact hδ' C' φ Θ T _ (hδ C' φ Θ T w hw) |
| 356 | |
| 357 | end IdealFamily |
| 358 | |
| 359 | end MovingKernel |
| 360 | |
| 361 | /-! |
| 362 | ## Integration over the line and compared cohomology theories |
| 363 | |
| 364 | `New.Variety.lerayHirsch θ` is the map `w ↦ ∑ Φ (w i) · θ i` for an exact functor `Φ`, here a |
| 365 | restriction, where x · y = `New.Variety.TotalH.comp x y` is the Yoneda product (x followed by y). |
| 366 | -/ |
| 367 | |
| 368 | section IntegrationOverLine |
| 369 | |
| 370 | open CategoryTheory Fin TotalH Functor.Elements Finsupp |
| 371 | open Function hiding comp comp_id id_comp |
| 372 | |
| 373 | variable {C : Type 1} |
| 374 | {C' D : Type _} [Category C] [Category C'] [Category D] {ℓ : ℕ} |
| 375 | {A : Type} [CommRing A] [InvertsPrime A ℓ] |
| 376 | {g : C ⥤ TestOver A} {M : TorsionCoeff g} {S F : AbFunctor C} (φ : C' ⥤ C) (ψ : D ⥤ C') |
| 377 | (x : TotalH S F) |
| 378 | |
| 379 | /-! ### Integration over the projective line -/ |
| 380 | |
| 381 | lemma map_restrictAlong_restrictAlong : |
| 382 | TotalH.map (restrictAlong ψ) (TotalH.map (restrictAlong φ) x) = |
| 383 | TotalH.map (restrictAlong (ψ ⋙ φ)) x := |
| 384 | TotalH.map_map (restrictAlong φ) (restrictAlong ψ) x |
| 385 | |
| 386 | /-- Restriction to the points of `X` passes through a product of classes `M.etaAt (b j)` factor by |
| 387 | factor. -/ |
| 388 | lemma map_foldr_etaAt {X : C ⥤ Type 1} {J : Type*} |
| 389 | (b : J → (freeAb (onePointFunctor C) ⟶ freeAb (projLineAlong g))) (l : List J) |
| 390 | (y : TotalH S M.functor) : |
| 391 | TotalH.map (restrictAlong (elementsProj X)) |
| 392 | (l.foldr (fun j : J ↦ comp.flip (M.etaAt (b j)).toTotalH) y) = |
| 393 | l.foldr |
| 394 | (fun j : J ↦ comp.flip (M.onElements.etaAt ((elementsProj X).whiskerLeft (b j))).toTotalH) |
| 395 | (TotalH.map (restrictAlong (elementsProj X)) y) := by |
| 396 | induction l with |
| 397 | | nil => rfl |
| 398 | | cons j l ih => exact (map_comp _).trans congr(comp $ih $(M.map_etaAt_onElements X (b j))) |
| 399 | |
| 400 | variable (h : M.HasLineFormula) {φ} {M' : TorsionCoeff (φ ⋙ g)} (β : φ ⋙ M.functor ⟶ M'.functor) |
| 401 | |
| 402 | /-- Restriction along `φ` followed by the product with a class `T` from `M.functor` restricted along |
| 403 | `φ` to `M'.functor` commutes with the two maps `x ↦ x · 1` and `x ↦ x · η` to the cohomology over |
| 404 | the points of the line. -/ |
| 405 | lemma lineBasis_naturality (T : TotalH ((restrictAlong φ).obj M.functor) M'.functor) (i : Bool) |
| 406 | (x : TotalH S M.functor) : |
| 407 | mapThenComp (restrictAlong (elementsProj (projLineAlong (φ ⋙ g)))) (M'.lineBasis i).toTotalH |
| 408 | (mapThenComp (restrictAlong φ) T x) = |
| 409 | mapThenComp (F := elementsProj (projLineAlong g) ⋙ M.functor) |
| 410 | (restrictAlong (precomp φ (projLineAlong g))) |
| 411 | (TotalH.map (restrictAlong (elementsProj (φ ⋙ projLineAlong g))) T) |
| 412 | (mapThenComp (restrictAlong (elementsProj (projLineAlong g))) (M.lineBasis i).toTotalH |
| 413 | x) := by |
| 414 | -- Both sides are products of three factors, and the two restrictions of `x` agree; it remains |
| 415 | -- to commute the restriction of `T` with the member of the family. |
| 416 | let π := elementsProj (projLineAlong g) |
| 417 | let π' := elementsProj (projLineAlong (φ ⋙ g)) |
| 418 | let ψ := precomp φ (projLineAlong g) |
| 419 | change comp (map (restrictAlong π') (comp (map (restrictAlong φ) x) T)) |
| 420 | (M'.lineBasis i).toTotalH = |
| 421 | comp (map (restrictAlong ψ) (comp (map (restrictAlong π) x) (M.lineBasis i).toTotalH)) |
| 422 | (map (restrictAlong π') T) |
| 423 | rw [map_comp_assoc, map_comp_assoc, map_restrictAlong_restrictAlong, |
| 424 | map_restrictAlong_restrictAlong] |
| 425 | cases i |
| 426 | · -- `T` commutes with the class η by naturality of `TorsionCoeff.etaAt`. |
| 427 | rw [TorsionCoeff.lineBasis_false, TorsionCoeff.lineBasis_false] |
| 428 | refine congrArg (comp (map (restrictAlong (elementsProj (projLineAlong (φ ⋙ g)) ⋙ φ)) x)) ?_ |
| 429 | exact (M.onElements.etaAt_naturality (precomp φ (projLineAlong g)) M'.onElements |
| 430 | (map (restrictAlong (elementsProj (projLineAlong (φ ⋙ g)))) T) |
| 431 | (freeAb.map (tautologicalSection (X := projLineAlong g)))).symm |
| 432 | · -- the class `1` is the identity, so the products with it drop out |
| 433 | have h_id : (M.lineBasis true).toTotalH = |
| 434 | homClass (𝟙 (elementsProj (projLineAlong g) ⋙ M.functor)) := rfl |
| 435 | have h_id' : (M'.lineBasis true).toTotalH = |
| 436 | homClass (𝟙 (elementsProj (projLineAlong (φ ⋙ g)) ⋙ M'.functor)) := rfl |
| 437 | rw [h_id, h_id', map_homClass] |
| 438 | have h_map := (restrictAlong (precomp φ (projLineAlong g))).map_id |
| 439 | (elementsProj (projLineAlong g) ⋙ M.functor) |
| 440 | rw [h_map] |
| 441 | exact (congrArg (comp (map (restrictAlong (elementsProj (projLineAlong (φ ⋙ g)) ⋙ φ)) x)) |
| 442 | comp_id).trans |
| 443 | (congrArg (comp (map (restrictAlong (precomp φ (projLineAlong g) ⋙ |
| 444 | elementsProj (projLineAlong g))) x)) pullbackAlong_id).symm |
| 445 | |
| 446 | namespace TorsionCoeff.HasLineFormula |
| 447 | |
| 448 | /-- If the comparison `(φ, β)` has universal points along `u : Y' ⟶ φ ⋙ Y`, the projective line |
| 449 | formula holds for `M` at `ℤ[Y]` (each class from ℤ[Y] over the points of ℙ¹ is a·1 + b·η for unique |
| 450 | a, b from the base) if and only if it holds for `M'` at `ℤ[Y']`. -/ |
| 451 | lemma bijective_iff_of_hasUniversalPoints {Y : C ⥤ Type 1} {Y' : C' ⥤ Type 1} {u : Y' ⟶ φ ⋙ Y} |
| 452 | (hu : (Comparison.of φ β).HasUniversalPoints u) : |
| 453 | IsLerayHirschBasis M.lineBasis (freeAb Y) ↔ IsLerayHirschBasis M'.lineBasis (freeAb Y') := by |
| 454 | -- The two maps `lerayHirsch` form a commutative square with the comparison maps from `C` to `C'`, |
| 455 | -- on the base (one for each member of the family) and on the points of the line; these are |
| 456 | -- bijective by `hu`. |
| 457 | refine Comparison.bijective_iff_of_comm_sq |
| 458 | (lerayHirsch_naturality _ (.comp ..) (r' := .comp ..) fun i x ↦ ?_) |
| 459 | (mapRange_bijective _ _ hu.isBijective.bijective_totalH) |
| 460 | hu.on_elements.isBijective.bijective_totalH |
| 461 | -- The square commutes on each member of the family by `lineBasis_naturality`. |
| 462 | refine (mapThenComp_comp map_homClass).trans |
| 463 | (congrArg _ ((lineBasis_naturality (homClass β) i x).trans ?_)) |
| 464 | rw [map_homClass] |
| 465 | rfl |
| 466 | |
| 467 | /-- The projective line formula passes to categories of elements: if it holds for `M`, it holds |
| 468 | for the restriction of `M` to the category of elements of any set-valued functor `X` on `C`. -/ |
| 469 | protected lemma onElements (h : M.HasLineFormula) {X : C ⥤ Type 1} : |
| 470 | (M.onElements (X := X)).HasLineFormula := by |
| 471 | -- It suffices to treat the functors represented by points `c` of `X`; maps out of `c` are maps |
| 472 | -- out of the object under it, so this case is an instance of `h`. |
| 473 | exact isLerayHirschBasis_of_reprBy fun c ↦ |
| 474 | (bijective_iff_of_hasUniversalPoints _ (hasUniversalPoints_reprBy_elements c)).mp (h _) |
| 475 | |
| 476 | /-- Integration over the projective line: given the projective line formula for M, the map |
| 477 | sending a class a + ηb over the points of P¹ to b. -/ |
| 478 | def integrate : |
| 479 | TotalH (elementsProj (projLineAlong g) ⋙ S) (elementsProj (projLineAlong g) ⋙ M.functor) →+ |
| 480 | TotalH S M.functor := |
| 481 | (applyAddHom false).comp |
| 482 | (LinearEquiv.ofBijective (lerayHirsch M.lineBasis S) (h S)).symm.toAddMonoidHom |
| 483 | |
| 484 | /-- If additive maps `f` on the base and `f'` over the points of the line are compatible with the |
| 485 | products with `1` and with `η`, they are compatible with integration over the line. -/ |
| 486 | lemma integrate_naturality (hM' : M'.HasLineFormula) {T : AbFunctor C'} |
| 487 | {f : TotalH S M.functor →+ TotalH T M'.functor} |
| 488 | {f' : TotalH ((restrictAlong (elementsProj (projLineAlong g))).obj S) |
| 489 | (elementsProj (projLineAlong g) ⋙ M.functor) →+ |
| 490 | TotalH ((restrictAlong (elementsProj (projLineAlong (φ ⋙ g)))).obj T) |
| 491 | (elementsProj (projLineAlong (φ ⋙ g)) ⋙ M'.functor)} |
| 492 | (h_fam : ∀ w : Bool →₀ TotalH S M.functor, |
| 493 | lerayHirsch M'.lineBasis T (w.mapRange f f.map_zero) = f' (lerayHirsch M.lineBasis S w)) : |
| 494 | ∀ x : TotalH (elementsProj (projLineAlong g) ⋙ S) (elementsProj (projLineAlong g) ⋙ M.functor), |
| 495 | f (h.integrate x) = hM'.integrate (f' x) := by |
| 496 | -- Every class is `lerayHirsch M.lineBasis S w` for a pair `w`, since `h S` is onto. |
| 497 | have h_surj : Surjective (lerayHirsch M.lineBasis S) := Bijective.surjective (h S) |
| 498 | refine h_surj.forall.mpr fun w ↦ ?_ |
| 499 | -- `f'` acts on such a class by applying `f` to both entries of `w`, and on either side |
| 500 | -- `integrate` reads off the coefficient of η. |
| 501 | rw [← h_fam w] |
| 502 | simp [integrate] |
| 503 | |
| 504 | /-- The integral over the line of `y · (η + ξ)`, with η here the class `M.cupClass` placed in degree |
| 505 | 2 (η in `M.lineBasis`), is `y`, for `y` and `ξ` pulled back from the base. -/ |
| 506 | lemma integrate_mul_cupClass (y : TotalH S M.functor) (ξ : TotalH M.functor M.functor) : |
| 507 | h.integrate (S := S) |
| 508 | (comp (TotalH.map (restrictAlong (elementsProj (projLineAlong g))) y) |
| 509 | -- (`by exact`: elaborates `.of` only once the type of the sum is known. Elaborated |
| 510 | -- eagerly, its type is still unknown and Lean builds the hint of an error message |
| 511 | -- that is then discarded.) |
| 512 | ((by exact .of _ 2 M.cupClass) + |
| 513 | TotalH.map (restrictAlong (elementsProj (projLineAlong g))) ξ) :) = y := by |
| 514 | let Φ : AbFunctor C ⥤ AbFunctor (projLineAlong g).Elements := |
| 515 | restrictAlong (elementsProj (projLineAlong g)) |
| 516 | have h_eta : lerayHirsch M.lineBasis S (.single false y) = |
| 517 | comp (TotalH.map Φ y) (.of _ 2 M.cupClass) := |
| 518 | lerayHirsch_single M.lineBasis false y |
| 519 | have h_one : lerayHirsch M.lineBasis S (.single true (comp y ξ)) = |
| 520 | comp (TotalH.map Φ y) (TotalH.map Φ ξ) := |
| 521 | ((lerayHirsch_single M.lineBasis true (comp y ξ)).trans comp_id).trans (map_comp ..) |
| 522 | have h_product := (map_add (comp (TotalH.map Φ y)) _ _).trans |
| 523 | (congrArg₂ (· + ·) h_eta.symm h_one.symm) |
| 524 | refine (congrArg (h.integrate (S := S)) h_product).trans ?_ |
| 525 | refine (congrArg (h.integrate (S := S)) |
| 526 | (map_add (lerayHirsch M.lineBasis S) (single false y) (single true (comp y ξ))).symm).trans ?_ |
| 527 | simp [integrate] |
| 528 | |
| 529 | end TorsionCoeff.HasLineFormula |
| 530 | |
| 531 | end IntegrationOverLine |
| 532 | |
| 533 | section ComparedTheories |
| 534 | |
| 535 | open CategoryTheory Fin TotalH Functor.Elements Finsupp |
| 536 | open Function hiding comp comp_id id_comp |
| 537 | |
| 538 | variable {C : Type 1} [Category C] {ℓ : ℕ} {A : Type} [CommRing A] [InvertsPrime A ℓ] |
| 539 | {g : C ⥤ TestOver A} {N N' : AbFunctor (TestOver A)} {d : ℕ} {ι : Type*} [Fintype ι] |
| 540 | |
| 541 | /-! ### Compared theories and natural operations -/ |
| 542 | |
| 543 | /-- A theory along g with morphisms b i (the field `comparison`, indexed by `Index`) to its |
| 544 | coefficient F (the field `functor`) from the locally constant ℤ/ℓ-valued functions, such that it and |
| 545 | `New.Variety.Theory.locallyConstant` satisfy the projective line formula. -/ |
| 546 | structure ComparedTheory (g : C ⥤ TestOver A) extends Theory g where |
| 547 | /-- The index set of the comparison morphisms. -/ |
| 548 | Index : Type |
| 549 | /-- The morphisms from the locally constant `ℤ/ℓ`-valued functions along `g` to `functor`. -/ |
| 550 | comparison : Index → H (restrictAlong g Theory.locallyConstant.functor) functor 0 |
| 551 | /-- The coefficient `functor` satisfies the projective line formula. -/ |
| 552 | line_formula : toTorsionCoeff.HasLineFormula |
| 553 | /-- The theory of locally constant functions satisfies the projective line formula. -/ |
| 554 | line_formula_const : (Theory.locallyConstant (A := A)).HasLineFormula |
| 555 | |
| 556 | variable (A) in |
| 557 | /-- A functor g (the field `toTestOver`) from a category C (the field `Base`) to tests over A, a |
| 558 | theory Θ (the field `theory`) along g satisfying the projective line formula, and d compatible |
| 559 | points of P¹ over the rings g(c). -/ |
| 560 | structure LineStage (d : ℕ) where |
| 561 | /-- The category on which the stage lives. -/ |
| 562 | {Base : Type 1} |
| 563 | /-- The category structure on `Base`. -/ |
| 564 | [category : Category Base] |
| 565 | /-- The functor from `Base` to tests over `A`. -/ |
| 566 | {toTestOver : Base ⥤ TestOver A} |
| 567 | /-- A theory along `toTestOver`. -/ |
| 568 | theory : Theory toTestOver |
| 569 | /-- The theory satisfies the projective line formula. -/ |
| 570 | line_formula : theory.HasLineFormula |
| 571 | /-- A compatible family of points of `(ℙ¹)^d` over the rings of the tests `toTestOver.obj c`. -/ |
| 572 | points : (ringOf toTestOver ⋙ projLinePow (Fin d)).sections |
| 573 | |
| 574 | attribute [instance] LineStage.category |
| 575 | |
| 576 | /-- Operations with d parameters: additive maps from total Ext(N∘g, Θ) to total Ext(N'∘g, Θ), |
| 577 | for every g, theory Θ with the projective line formula and section of (P¹)^d, commuting with |
| 578 | comparisons along functors. -/ |
| 579 | structure NaturalOp (d : ℕ) (N N' : AbFunctor (TestOver A)) where |
| 580 | /-- For a stage `t`, with theory `Θ = t.theory` along `g = t.toTestOver`, the projective line |
| 581 | formula and the section `t.points` of `(ℙ¹)^d`, an additive map from the total cohomology of |
| 582 | `g ⋙ N` to that of `g ⋙ N'`, coefficients in `Θ.functor`. -/ |
| 583 | app (t : LineStage A d) : TotalH (t.toTestOver ⋙ N) t.theory.functor →+ TotalH (t.toTestOver ⋙ N') |
| 584 | t.theory.functor |
| 585 | /-- The maps `app` commute with restriction along a functor `φ`, followed by the product with a |
| 586 | class `b` from `φ ⋙ t.theory.functor` to `Θ.functor`. -/ |
| 587 | naturality : |
| 588 | ∀ {C : Type 1} [Category C] (t : LineStage A d) (φ : C ⥤ t.Base) |
| 589 | (Θ : Theory (φ ⋙ t.toTestOver)) |
| 590 | (l : Θ.HasLineFormula) (b : TotalH (φ ⋙ t.theory.functor) Θ.functor) |
| 591 | (x : TotalH (t.toTestOver ⋙ N) t.theory.functor), |
| 592 | mapThenComp (restrictAlong φ) b (app t x) = |
| 593 | app ⟨Θ, l, φ.sectionsPrecomp t.points⟩ (mapThenComp (restrictAlong φ) b x) |
| 594 | |
| 595 | /-- The restriction of t to the category of pairs (c, x) with x ∈ P¹(t.toTestOver(c)), with the |
| 596 | tautological point x placed before the d points of t. -/ |
| 597 | def LineStage.consTautologicalPoint (t : LineStage A d) : LineStage A (d + 1) where |
| 598 | theory := t.theory.onElements (X := projLineAlong t.toTestOver) |
| 599 | line_formula := t.line_formula.onElements |
| 600 | points := |
| 601 | ⟨fun x ↦ Fin.cons x.2 (t.points.1 ((elementsProj (projLineAlong t.toTestOver)).obj x)), fun f ↦ |
| 602 | funext (cases f.map_val (congrFun (t.points.property |
| 603 | ((elementsProj (projLineAlong t.toTestOver)).map f))))⟩ |
| 604 | |
| 605 | /-- Integrating out the first parameter of r: pull back to the points of P¹, apply r with the |
| 606 | tautological point as first parameter, and integrate over the line. -/ |
| 607 | def NaturalOp.integrate (r : NaturalOp (d + 1) N N') : NaturalOp d N N' where |
| 608 | app t := |
| 609 | t.line_formula.integrate.comp |
| 610 | ((r.app t.consTautologicalPoint).comp |
| 611 | (TotalH.map (restrictAlong (elementsProj (projLineAlong t.toTestOver))))) |
| 612 | naturality t φ K l b x := by |
| 613 | -- Integration, `r` and restriction to the line each commute with maps of theories. |
| 614 | refine (t.line_formula.integrate_naturality _ |
| 615 | (lerayHirsch_naturality _ _ (lineBasis_naturality b)) _).trans (congrArg _ ?_) |
| 616 | refine (r.naturality t.consTautologicalPoint (precomp ..) K.onElements ..).trans (congrArg _ ?_) |
| 617 | -- This is `lineBasis_naturality` for the class `1`, which is the identity. |
| 618 | exact (congrArg _ comp_id).symm.trans ((lineBasis_naturality b true x).symm.trans comp_id) |
| 619 | |
| 620 | /-- If `K → I → P` is exact at `I`, with `f` any map and `g` additive, and `K` and `P` are finite, |
| 621 | then `I` is finite. -/ |
| 622 | lemma finite_of_exact {K I P : Type*} [AddGroup I] [AddGroup P] {f : K → I} {g : I →+ P} |
| 623 | (h : Exact f g) [Finite K] [Finite P] : |
| 624 | Finite I := by |
| 625 | -- The kernel of `g` lies in the finite image of `f`, and its range lies in `P`. |
| 626 | refine g.finite_iff_finite_ker_range.mpr ⟨?_, inferInstance⟩ |
| 627 | exact (Set.finite_range f).subset fun x hx ↦ (h x).mp hx |
| 628 | |
| 629 | namespace ComparedTheory |
| 630 | |
| 631 | variable (D : ComparedTheory g) {m : ℕ} |
| 632 | (I : IdealFamily (ringOf (testOfPoint A (projLinePow (Fin m))))) |
| 633 | |
| 634 | /-! ### The comparison property and its permanence -/ |
| 635 | |
| 636 | /-- `D.IsFiniteLerayHirsch N`, for a functor `N` from tests over `A` to abelian groups. Write `L` |
| 637 | for the locally constant `ℤ/ℓ`-valued functions and `F` for the coefficient of `D`. Then (1) the |
| 638 | Leray–Hirsch map of the classes `D.comparison i`, which sends a family `(w i)` of classes in the |
| 639 | total Ext group of `N` into `L` to `∑ i, (w i restricted along g) · D.comparison i`, is a bijection |
| 640 | onto the total Ext group of `g ⋙ N` into `F`, and (2) the total Ext group of `N` into `L` is |
| 641 | finite. -/ |
| 642 | def IsFiniteLerayHirsch (N : AbFunctor (TestOver A)) : Prop := |
| 643 | IsLerayHirschBasis D.comparison N ∧ Finite (TotalH N (locConstAlong (𝟭 (TestOver A)))) |
| 644 | |
| 645 | /-- `D.IsFiniteLerayHirsch` is a closed class (`IsClosedClass`): it holds for zero functors, and in |
| 646 | a short exact sequence `0 → X₁ → X₂ → X₃ → 0` with `D.IsFiniteLerayHirsch X₁` it holds for `X₂` if |
| 647 | and only if for `X₃`. -/ |
| 648 | lemma isClosedClass_isFiniteLerayHirsch : IsClosedClass D.IsFiniteLerayHirsch := by |
| 649 | classical |
| 650 | -- The bijectivity half of `IsFiniteLerayHirsch` is `isClosedClass_isLerayHirschBasis`; it remains |
| 651 | -- to treat finiteness. |
| 652 | let L : AbFunctor (TestOver A) := locConstAlong (𝟭 (TestOver A)) |
| 653 | obtain ⟨h_LH_zero, h_LH_ses⟩ : IsClosedClass fun S ↦ IsLerayHirschBasis D.comparison S := |
| 654 | isClosedClass_isLerayHirschBasis |
| 655 | refine ⟨fun N hN ↦ ⟨h_LH_zero N hN, ?_⟩, fun X hX hX₁ ↦ ?_⟩ |
| 656 | · -- The cohomology of a zero functor is trivial in every degree. |
| 657 | have h_zero : ∀ (F : AbFunctor (TestOver A)) (n : ℕ), Subsingleton (H N F n) := |
| 658 | H.subsingleton_of_id_eq_zero hN |
| 659 | infer_instance |
| 660 | obtain ⟨h_bij₁, h_fin₁⟩ := hX₁ |
| 661 | have h_bij_iff : IsLerayHirschBasis D.comparison X.X₂ ↔ IsLerayHirschBasis D.comparison X.X₃ := |
| 662 | h_LH_ses X hX h_bij₁ |
| 663 | -- In the exact triangle, each of the groups of `X.X₂` and `X.X₃` lies between the other one |
| 664 | -- and that of `X.X₁`. |
| 665 | obtain ⟨h_exact_mid, -, h_exact_quot⟩ := exact_triangle hX L |
| 666 | have h_fin_iff : Finite (TotalH X.X₂ L) ↔ Finite (TotalH X.X₃ L) := by |
| 667 | constructor |
| 668 | · intro h_fin₂ |
| 669 | exact finite_of_exact h_exact_quot |
| 670 | · intro h_fin₃ |
| 671 | exact finite_of_exact h_exact_mid |
| 672 | exact h_bij_iff.and h_fin_iff |
| 673 | |
| 674 | /-- In a short exact sequence `0 → X₁ → X₂ → X₃ → 0` of functors on tests over `A`, if |
| 675 | `D.IsFiniteLerayHirsch` holds for `X₂` and `X₃`, it holds for `X₁`. -/ |
| 676 | lemma isFiniteLerayHirsch_of_shortExact {X : ShortComplex (AbFunctor (TestOver A))} |
| 677 | (h : ShortComplex.ShortExact X) (h_good₂ : D.IsFiniteLerayHirsch X.X₂) |
| 678 | (h_good₃ : D.IsFiniteLerayHirsch X.X₃) : |
| 679 | D.IsFiniteLerayHirsch X.X₁ := by |
| 680 | classical |
| 681 | obtain ⟨h_bij₂, h_fin₂⟩ := h_good₂ |
| 682 | obtain ⟨h_bij₃, h_fin₃⟩ := h_good₃ |
| 683 | -- Finite: in the exact triangle, the group of `X.X₁` lies between those of `X.X₂` and `X.X₃`. |
| 684 | obtain ⟨-, h_exact_sub, -⟩ := exact_triangle h (locConstAlong (𝟭 (TestOver A))) |
| 685 | have h_fin₁ : Finite (TotalH X.X₁ (locConstAlong (𝟭 (TestOver A)))) := |
| 686 | finite_of_exact h_exact_sub |
| 687 | -- Bijective: five lemma in the rotated ladder, whose terms are those of `X.X₁` (shifted by one |
| 688 | -- degree), `X.X₃` and `X.X₂`; it is applied degree by degree to the truncated maps. |
| 689 | have h_trunc₁ : ∀ n : ℕ, Bijective (truncMap |
| 690 | (degreeTrunc_comp_lerayHirsch D.comparison X.X₁ n)) := |
| 691 | fun n ↦ ((lerayHirsch.longExact_hom h).rotate.five_lemma |
| 692 | (isLerayHirschBasis_iff_allBijective_truncMap.mp h_bij₂)).mp |
| 693 | (isLerayHirschBasis_iff_allBijective_truncMap.mp h_bij₃) (n + 1) |
| 694 | exact ⟨isLerayHirschBasis_iff_allBijective_truncMap.mpr h_trunc₁, h_fin₁⟩ |
| 695 | |
| 696 | /-- Let `α : N ⟶ N'` be a map of functors on tests over `A` such that, for every functor `g` from a |
| 697 | category `C` to tests over `A` and every functor `F` on `C` with Zariski descent along `g`, |
| 698 | pull-back along `α` (restricted along `g`) is a bijection of total Ext groups into `F` |
| 699 | (`IsCohomEquiv`). Then `D.IsFiniteLerayHirsch N` holds if and only if `D.IsFiniteLerayHirsch N'` |
| 700 | holds. -/ |
| 701 | lemma isFiniteLerayHirsch_iff_of_isCohomEquiv (α : N ⟶ N') |
| 702 | (h : ∀ {C : Type 1} [Category C] {F : AbFunctor C} (g : C ⥤ TestOver A), |
| 703 | HasZariskiDescent (ringOf g) F → IsCohomEquiv F (g.whiskerLeft α)) : |
| 704 | D.IsFiniteLerayHirsch N ↔ D.IsFiniteLerayHirsch N' := by |
| 705 | classical |
| 706 | -- Pull-back along `α` is bijective in the constant theory and in `D`. |
| 707 | have h_const : Bijective (pullbackAlong (G := locConstAlong (𝟭 (TestOver A))) α) := |
| 708 | (h (𝟭 (TestOver A)) Theory.locallyConstant.zariski_descent).bijective_pullbackAlong |
| 709 | have h_D : Bijective (pullbackAlong (G := D.functor) (g.whiskerLeft α)) := |
| 710 | (h g D.zariski_descent).bijective_pullbackAlong |
| 711 | -- The two comparison maps `lerayHirsch` form a commutative square with these pull-backs. |
| 712 | have h_bij_iff : IsLerayHirschBasis D.comparison N' ↔ IsLerayHirschBasis D.comparison N := |
| 713 | Comparison.bijective_iff_of_comm_sq (lerayHirsch_mapRange_comp _ map_homClass) |
| 714 | (mapRange_bijective _ _ h_const) h_D |
| 715 | exact (h_bij_iff.and h_const.finite_iff).symm |
| 716 | |
| 717 | /-- The zero-parameter stage for the locally constant theory of `D`. -/ |
| 718 | private abbrev constStage : LineStage A 0 := |
| 719 | ⟨Theory.locallyConstant, D.line_formula_const, nofun, fun _ ↦ funext nofun⟩ |
| 720 | |
| 721 | /-- The zero-parameter stage for `D` itself, with empty point family pulled back along `g`. -/ |
| 722 | private abbrev targetStage : LineStage A 0 := |
| 723 | ⟨D.toTheory, D.line_formula, g.sectionsPrecomp D.constStage.points⟩ |
| 724 | |
| 725 | /-- A zero-parameter natural operation commutes with `lerayHirsch D.comparison` between |
| 726 | `D.constStage` and `D.targetStage`. -/ |
| 727 | private lemma lerayHirsch_mapRange_naturalOp {M M' : AbFunctor (TestOver A)} |
| 728 | (s : NaturalOp 0 M M') (w : D.Index →₀ TotalH M Theory.locallyConstant.functor) : |
| 729 | lerayHirsch D.comparison M' (w.mapRange (s.app D.constStage) (s.app D.constStage).map_zero) = |
| 730 | s.app D.targetStage (lerayHirsch D.comparison M w) := |
| 731 | -- `(… :)`: the stated type is that of `lerayHirsch_naturality` with `D.constStage` and |
| 732 | -- `D.targetStage` unfolded. |
| 733 | (lerayHirsch_naturality D.comparison (s.app D.constStage) |
| 734 | (fun i ↦ s.naturality D.constStage g _ D.line_formula (D.comparison i).toTotalH) w :) |
| 735 | |
| 736 | /-- Surjectivity of `lerayHirsch D.comparison N` in `isFiniteLerayHirsch_of_retract`: each term |
| 737 | `ρ i (r i x)` lies in the range because `lerayHirsch D.comparison N'` is surjective and commutes |
| 738 | with `ρ i`. -/ |
| 739 | private lemma lerayHirsch_surjective_of_retract [HasFlatValues N] |
| 740 | (r : ι → NaturalOp 0 (abCoker (ℓ • 𝟙 N)) N') (ρ : ι → NaturalOp 0 N' N) |
| 741 | (h_sum : ∀ x : TotalH (D.targetStage.toTestOver ⋙ abCoker (ℓ • 𝟙 N)) |
| 742 | D.targetStage.theory.functor, |
| 743 | ∑ i : ι, (ρ i).app D.targetStage ((r i).app D.targetStage x) = |
| 744 | pullbackAlong (D.targetStage.toTestOver.whiskerLeft (abCoker.π (ℓ • 𝟙 N))) x) |
| 745 | (hN'_surj : Surjective (lerayHirsch D.comparison N')) : |
| 746 | Surjective (lerayHirsch D.comparison N) := by |
| 747 | classical |
| 748 | intro y |
| 749 | obtain ⟨x, rfl⟩ := D.pullbackAlong_abCoker_pi_surjective (N := g ⋙ N) y |
| 750 | -- By `h_sum` for `D`, the pull-back of `x` is `∑ i, ρ i (r i x)`. |
| 751 | have h_mem : ∑ i, (ρ i).app D.targetStage ((r i).app D.targetStage x) ∈ |
| 752 | LinearMap.range (lerayHirsch D.comparison N) := by |
| 753 | refine (lerayHirsch D.comparison N).range.sum_mem fun i _ ↦ ?_ |
| 754 | obtain ⟨w, hw⟩ := hN'_surj ((r i).app D.targetStage x) |
| 755 | exact ⟨w.mapRange ((ρ i).app D.constStage) ((ρ i).app D.constStage).map_zero, |
| 756 | (D.lerayHirsch_mapRange_naturalOp (ρ i) w).trans (congrArg _ hw)⟩ |
| 757 | obtain ⟨a, ha⟩ := h_mem |
| 758 | exact ⟨a, ha.trans (h_sum x)⟩ |
| 759 | |
| 760 | /-- Injectivity of `lerayHirsch D.comparison N` in `isFiniteLerayHirsch_of_retract`: any kernel |
| 761 | element lifts to `N / ℓ`, becomes a coboundary `δ u` in `D`, and agrees with `δ u` after each |
| 762 | `r i` by injectivity on `N'`. -/ |
| 763 | private lemma lerayHirsch_injective_of_retract [HasFlatValues N] |
| 764 | (r : ι → NaturalOp 0 (abCoker (ℓ • 𝟙 N)) N') (ρ : ι → NaturalOp 0 N' N) |
| 765 | (hπ_sum : ∀ x : TotalH (abCoker (ℓ • 𝟙 N)) Theory.locallyConstant.functor, |
| 766 | ∑ i : ι, (ρ i).app D.constStage ((r i).app D.constStage x) = |
| 767 | pullbackAlong (abCoker.π (ℓ • 𝟙 N)) x) |
| 768 | (hN'_inj : Injective (lerayHirsch D.comparison N')) |
| 769 | (h_surj : Surjective (lerayHirsch D.comparison N)) : |
| 770 | Injective (lerayHirsch D.comparison N) := by |
| 771 | classical |
| 772 | let L : AbFunctor (TestOver A) := Theory.locallyConstant.functor |
| 773 | -- `N` is flat and the coefficients are killed by `ℓ`, so pull-back `π` from `N / ℓ` is onto. |
| 774 | let π : TotalH (abCoker (ℓ • 𝟙 N)) L →+ TotalH N L := pullbackAlong (abCoker.π (ℓ • 𝟙 N)) |
| 775 | have hπ : Surjective π := D.constStage.theory.pullbackAlong_abCoker_pi_surjective |
| 776 | refine (injective_iff_map_eq_zero _).2 |
| 777 | ((mapRange_surjective _ π.map_zero hπ).forall.mpr fun w hw ↦ Finsupp.ext fun m ↦ ?_) |
| 778 | have hw' : |
| 779 | comp (homClass ((restrictAlong g).map (abCoker.π (ℓ • 𝟙 N)))) |
| 780 | (lerayHirsch D.comparison (abCoker (ℓ • 𝟙 N)) w) = 0 := |
| 781 | (lerayHirsch_mapRange_comp D.comparison map_homClass w).symm.trans hw |
| 782 | -- `δ` is the connecting map of `0 → N → N → N / ℓ → 0`; its image is the kernel of `π`. |
| 783 | -- `h_ses` is stated in terms of `h_comp_zero`, so that fact stays in context. |
| 784 | obtain ⟨h_comp_zero, h_ses⟩ := shortExact_nsmul_abCoker (ℓ := ℓ) (N := N) |
| 785 | let δ : TotalH N L →+ TotalH (abCoker (ℓ • 𝟙 N)) L := comp h_ses.extClass.toTotalH |
| 786 | obtain ⟨-, -, h_exact⟩ := exact_triangle h_ses L |
| 787 | -- `lerayHirsch D.comparison _ w` pulls back to zero, so it is a coboundary, of some |
| 788 | -- `lerayHirsch D.comparison N u` since `lerayHirsch D.comparison N` is onto. |
| 789 | obtain ⟨-, -, h_exact_g⟩ := exact_triangle (h_ses.map_of_exact (restrictAlong g)) D.functor |
| 790 | obtain ⟨v, hv⟩ := (h_exact_g _).mp hw' |
| 791 | obtain ⟨u, hu⟩ := h_surj v |
| 792 | have h_cob : |
| 793 | lerayHirsch D.comparison (abCoker (ℓ • 𝟙 N)) (u.mapRange δ δ.map_zero) = |
| 794 | lerayHirsch D.comparison (abCoker (ℓ • 𝟙 N)) w := |
| 795 | calc lerayHirsch D.comparison (abCoker (ℓ • 𝟙 N)) (u.mapRange δ δ.map_zero) |
| 796 | _ = comp (h_ses.map_of_exact (restrictAlong g)).extClass.toTotalH |
| 797 | (lerayHirsch D.comparison N u) := |
| 798 | lerayHirsch_mapRange_comp D.comparison (map_extClass h_ses) u |
| 799 | _ = comp (h_ses.map_of_exact (restrictAlong g)).extClass.toTotalH v := by rw [hu] |
| 800 | _ = lerayHirsch D.comparison (abCoker (ℓ • 𝟙 N)) w := hv |
| 801 | have h_r (i : ι) : (r i).app D.constStage (δ (u m)) = (r i).app D.constStage (w m) := by |
| 802 | have h_image : |
| 803 | lerayHirsch D.comparison N' |
| 804 | ((u.mapRange δ δ.map_zero).mapRange ((r i).app D.constStage) |
| 805 | ((r i).app D.constStage).map_zero) = |
| 806 | lerayHirsch D.comparison N' |
| 807 | (w.mapRange ((r i).app D.constStage) ((r i).app D.constStage).map_zero) := by |
| 808 | rw [D.lerayHirsch_mapRange_naturalOp, D.lerayHirsch_mapRange_naturalOp, h_cob] |
| 809 | -- Evaluate the equality of finitely supported functions at `m`. |
| 810 | exact DFunLike.congr_fun (hN'_inj h_image) m |
| 811 | rw [Finsupp.mapRange_apply, Finsupp.zero_apply, ← hπ_sum (w m), |
| 812 | ← h_exact.apply_apply_eq_zero (u m), ← hπ_sum (δ (u m))] |
| 813 | simp only [h_r] |
| 814 | |
| 815 | /-- `D.IsFiniteLerayHirsch` passes to retracts by natural operations. Let `N` have flat values, |
| 816 | write `N / ℓ` for `abCoker (ℓ • 𝟙 N)`, and let `r i : N / ℓ → N'` and `ρ i : N' → N` be operations |
| 817 | without parameters (`NaturalOp 0`). If `∑ i, ρ i (r i x)` is always the pull-back of `x` along |
| 818 | `N → N / ℓ`, then `D.IsFiniteLerayHirsch N'` implies `D.IsFiniteLerayHirsch N`. -/ |
| 819 | lemma isFiniteLerayHirsch_of_retract [HasFlatValues N] (r : ι → NaturalOp 0 (abCoker (ℓ • 𝟙 N)) N') |
| 820 | (ρ : ι → NaturalOp 0 N' N) |
| 821 | (h_sum : ∀ (t : LineStage A 0) (x : TotalH (t.toTestOver ⋙ abCoker (ℓ • 𝟙 N)) t.theory.functor), |
| 822 | ∑ i : ι, (ρ i).app t ((r i).app t x) = |
| 823 | pullbackAlong (t.toTestOver.whiskerLeft (abCoker.π (ℓ • 𝟙 N))) x) |
| 824 | (hN' : D.IsFiniteLerayHirsch N') : |
| 825 | D.IsFiniteLerayHirsch N := by |
| 826 | obtain ⟨⟨hN'_inj, hN'_surj⟩, hN'_fin⟩ := hN' |
| 827 | have h_surj : Surjective (lerayHirsch D.comparison N) := |
| 828 | D.lerayHirsch_surjective_of_retract r ρ (h_sum D.targetStage) hN'_surj |
| 829 | have h_inj : Injective (lerayHirsch D.comparison N) := |
| 830 | D.lerayHirsch_injective_of_retract r ρ (h_sum D.constStage) hN'_inj h_surj |
| 831 | -- Finite: the cohomology of `N` is the image of a finite product of copies of that of `N'`. |
| 832 | have h_onto : Surjective fun v : ι → TotalH N' (locConstAlong (𝟭 (TestOver A))) ↦ |
| 833 | ∑ i, (ρ i).app D.constStage (v i) := by |
| 834 | intro y |
| 835 | obtain ⟨x, rfl⟩ := D.constStage.theory.pullbackAlong_abCoker_pi_surjective y |
| 836 | exact ⟨fun i ↦ (r i).app D.constStage x, h_sum D.constStage x⟩ |
| 837 | exact ⟨⟨h_inj, h_surj⟩, .of_surjective _ h_onto⟩ |
| 838 | |
| 839 | /-! ### Pairs in a power of the projective line -/ |
| 840 | |
| 841 | /-- For an ideal family `I` on `(ℙ¹)^m` over a ring `A` inverting a prime `ℓ`, a compared theory |
| 842 | `D`, a functor `N` with `D.IsFiniteLerayHirsch N`, a finite family of classes |
| 843 | `β : ι → TotalH (relFreeAb I.topPoints) N`, and zero-parameter natural operations |
| 844 | `T : ι → NaturalOp 0 (abCoker (ℓ • 𝟙 (relFreeAb I.topPoints))) N`, if for every zero-parameter |
| 845 | stage `t : LineStage A 0`, section `q'` of `(ℙ¹)^m` over `t.toTestOver`, and class `w` on the |
| 846 | quotient by `ℓ`, the pull-backs along `I.atSection q'` of `∑ i, β i · (T i).app t w` and of the |
| 847 | pull-back of `w` along `abCoker.π (ℓ • 𝟙 (relFreeAb I.topPoints))` agree, then |
| 848 | `D.IsFiniteLerayHirsch (relFreeAb I.topPoints)`. -/ |
| 849 | private lemma isFiniteLerayHirsch_of_zero_params (β : ι → TotalH (relFreeAb I.topPoints) N) |
| 850 | (hN : D.IsFiniteLerayHirsch N) |
| 851 | (T : ι → NaturalOp 0 (abCoker (ℓ • 𝟙 (relFreeAb I.topPoints))) N) |
| 852 | (h_sum_eq : ∀ (t : LineStage A 0) |
| 853 | (q' : (t.toTestOver ⋙ ringOf (𝟭 (TestOver A)) ⋙ projLinePow (Fin m)).sections) |
| 854 | (w : TotalH (t.toTestOver ⋙ abCoker (ℓ • 𝟙 (relFreeAb I.topPoints))) t.theory.functor), |
| 855 | pullbackAlong (I.atSection q') |
| 856 | (∑ i : ι, mapThenComp (restrictAlong t.toTestOver) ((T i).app t w) (β i)) = |
| 857 | pullbackAlong (I.atSection q') |
| 858 | (pullbackAlong (t.toTestOver.whiskerLeft (abCoker.π (ℓ • 𝟙 (relFreeAb I.topPoints)))) |
| 859 | w)) : |
| 860 | D.IsFiniteLerayHirsch (relFreeAb I.topPoints) := by |
| 861 | -- No parameter: `isFiniteLerayHirsch_of_retract` applies once the `T i` followed by composition |
| 862 | -- with the `β i` sum to pull-back along the projection to the cokernel of `ℓ`. |
| 863 | let ρ (i : ι) : NaturalOp 0 N (relFreeAb I.topPoints) := |
| 864 | ⟨fun t ↦ comp (map (restrictAlong t.toTestOver) (β i)), fun t φ _Θ _l _b _x ↦ |
| 865 | mapThenComp_comp (map_restrictAlong_restrictAlong t.toTestOver φ (β i))⟩ |
| 866 | refine D.isFiniteLerayHirsch_of_retract T ρ (fun t x ↦ ?_) hN |
| 867 | -- The identity may be checked after restriction `r` to the points of `X` and evaluation at |
| 868 | -- the tautological section (`isBijective_relFreeAb_tautologicalSection`): there it is `h_sum_eq`. |
| 869 | let X : t.Base ⥤ Type 1 := t.toTestOver ⋙ ringOf (𝟭 (TestOver A)) ⋙ projLinePow (Fin m) |
| 870 | let r {S : AbFunctor t.Base} : |
| 871 | TotalH S t.theory.functor →+ TotalH (elementsProj X ⋙ S) |
| 872 | (t.theory.onElements (X := X)).functor := |
| 873 | mapThenComp (restrictAlong (elementsProj X)) (.homClass (𝟙 _)) |
| 874 | let t' : LineStage A 0 := |
| 875 | ⟨t.theory.onElements (X := X), t.line_formula.onElements, |
| 876 | (elementsProj X).sectionsPrecomp t.points⟩ |
| 877 | -- `r` commutes with every operation and with pull-back from the cokernel of `ℓ`. |
| 878 | have h_nat {M M' : AbFunctor (TestOver A)} (s : NaturalOp 0 M M') |
| 879 | (y : TotalH (t.toTestOver ⋙ M) t.theory.functor) : |
| 880 | r (s.app t y) = s.app t' (r y) := |
| 881 | s.naturality t (elementsProj X) t.theory.onElements t.line_formula.onElements |
| 882 | (.homClass (𝟙 _)) y |
| 883 | have h_proj : |
| 884 | r (pullbackAlong (t.toTestOver.whiskerLeft (abCoker.π _)) x) = |
| 885 | pullbackAlong ((elementsProj X ⋙ t.toTestOver).whiskerLeft (abCoker.π _)) (r x :) := |
| 886 | mapThenComp_comp map_homClass |
| 887 | refine (isBijective_relFreeAb_tautologicalSection |
| 888 | (I.topPoints.whisker t.toTestOver)).bijective_totalH.injective ?_ |
| 889 | -- After `r`, the left side is the sum of the operations at `t'` applied to `r x`. |
| 890 | have h_sum_r : |
| 891 | r (∑ i, (ρ i).app t ((T i).app t x)) = ∑ i, (ρ i).app t' ((T i).app t' (r x :)) := by |
| 892 | rw [map_sum] |
| 893 | exact Finset.sum_congr rfl fun i _ ↦ (h_nat (ρ i) _).trans (congrArg _ (h_nat (T i) x)) |
| 894 | change comp _ (r _) = comp _ (r _) |
| 895 | refine (congrArg (comp _) h_sum_r).trans ?_ |
| 896 | refine Eq.trans ?_ (congrArg (comp _) h_proj).symm |
| 897 | -- This is `h_sum_eq` at `t'` and the tautological section `a ↦ a.2` of `X`. |
| 898 | exact h_sum_eq t' ⟨fun a ↦ a.val, fun f ↦ f.map_val⟩ (r x :) |
| 899 | |
| 900 | /-- `D.IsFiniteLerayHirsch` passes from `N` to `ℤ[(ℙ¹)^m]/ℤ[U]`, `U = I.topPoints`, given classes |
| 901 | `β i` from it to `N`, operations `T i` with `d` parameters in `ℙ¹` from its quotient by `ℓ` to `N`, |
| 902 | and `σ` sending parameters to coordinates, such that (`h_sum_eq_foldr`) for every stage `t` with |
| 903 | points `t.points`, section `q'` and class `w`, `∑ i, β i · T i (w)` and |
| 904 | `w · ∏ j, (η(t.points j) + η(q' (σ j)))` agree after pull-back along `I.atSection q'`. -/ |
| 905 | lemma isFiniteLerayHirsch_of_integrate_params (β : ι → TotalH (relFreeAb I.topPoints) N) |
| 906 | (hN : D.IsFiniteLerayHirsch N) |
| 907 | (σ : Fin d → Fin m) (T : ι → NaturalOp d (abCoker (ℓ • 𝟙 (relFreeAb I.topPoints))) N) |
| 908 | (h_sum_eq_foldr : ∀ (t : LineStage A d) |
| 909 | (q' : (t.toTestOver ⋙ ringOf (𝟭 (TestOver A)) ⋙ projLinePow (Fin m)).sections) |
| 910 | (w : TotalH (t.toTestOver ⋙ abCoker (ℓ • 𝟙 (relFreeAb I.topPoints))) t.theory.functor), |
| 911 | pullbackAlong (I.atSection q') |
| 912 | (∑ i : ι, mapThenComp (restrictAlong t.toTestOver) ((T i).app t w) (β i)) = |
| 913 | pullbackAlong (I.atSection q') |
| 914 | (foldr d |
| 915 | (fun j : Fin d ↦ |
| 916 | comp.flip |
| 917 | (t.theory.etaAt |
| 918 | (freeAbSectionMap (projLinePow.component t.points j) + |
| 919 | freeAbSectionMap (projLinePow.component q' (σ j)))).toTotalH) |
| 920 | (pullbackAlong (t.toTestOver.whiskerLeft (abCoker.π (ℓ • 𝟙 (relFreeAb I.topPoints)))) |
| 921 | w))) : |
| 922 | D.IsFiniteLerayHirsch (relFreeAb I.topPoints) := by |
| 923 | -- Induction on the number `d` of parameters: the zero-parameter case is |
| 924 | -- `isFiniteLerayHirsch_of_zero_params`, and integrating over the line removes the first one. |
| 925 | induction d with |
| 926 | | zero => |
| 927 | exact D.isFiniteLerayHirsch_of_zero_params I β hN T h_sum_eq_foldr |
| 928 | | succ d ih => |
| 929 | -- Apply the induction hypothesis to the integrated operations. |
| 930 | refine ih (fun j ↦ σ j.succ) (fun i ↦ (T i).integrate) fun t q' w ↦ ?_ |
| 931 | -- By `integrate_mul_cupClass`, the right side is the integral of its restriction to the line |
| 932 | -- times the factor of the first parameter. |
| 933 | refine Eq.trans ?_ |
| 934 | (t.line_formula.integrate_mul_cupClass _ |
| 935 | (t.theory.etaAt (freeAbSectionMap (projLinePow.component q' (σ 0)))).toTotalH) |
| 936 | -- Composition on the left commutes with integration, so the left side is an integral too. |
| 937 | have comp_int {S S' : AbFunctor t.Base} (ξ : TotalH S' S) : |
| 938 | ∀ x : TotalH (elementsProj (projLineAlong t.toTestOver) ⋙ S) |
| 939 | (elementsProj (projLineAlong t.toTestOver) ⋙ t.theory.functor), |
| 940 | comp ξ (t.line_formula.integrate x) = |
| 941 | t.line_formula.integrate |
| 942 | (comp (map (restrictAlong (elementsProj (projLineAlong t.toTestOver))) ξ) x) := |
| 943 | t.line_formula.integrate_naturality (φ := 𝟭 _) t.line_formula |
| 944 | (lerayHirsch_mapRange_comp _ rfl) |
| 945 | -- `change`: the summands match `comp_int` only after unfolding `NaturalOp.integrate`. |
| 946 | change pullbackAlong _ (∑ i, comp (map (restrictAlong t.toTestOver) (β i)) |
| 947 | (t.line_formula.integrate _)) = _ |
| 948 | rw [Finset.sum_congr rfl fun i _ ↦ comp_int .., ← map_sum, comp_int] |
| 949 | -- Push restriction into the products, split off the first factor in `h_sum_eq_foldr`, and |
| 950 | -- write the remaining products as folds over lists. |
| 951 | simp only [map_comp_assoc, map_restrictAlong_restrictAlong, map_homClass, |
| 952 | TorsionCoeff.map_etaAt_onElements, foldr_succ, foldr_eq_finRange_foldr] at h_sum_eq_foldr ⊢ |
| 953 | -- Restriction to the line passes through the fold factor by factor. |
| 954 | conv_rhs => |
| 955 | erw [← map_add, ← map_add, map_foldr_etaAt (X := projLineAlong t.toTestOver), |
| 956 | map_pullbackAlong (Φ := restrictAlong (elementsProj (projLineAlong t.toTestOver)))] |
| 957 | -- The integrands agree by `h_sum_eq_foldr` over the points of the line, with the tautological |
| 958 | -- point as first parameter. |
| 959 | -- (`apply`: compares the statement with the goal once; `exact congrArg _ (…)` does it twice) |
| 960 | refine congrArg _ ?_ |
| 961 | apply h_sum_eq_foldr t.consTautologicalPoint ((elementsProj _).sectionsPrecomp q') |
| 962 | |
| 963 | /-- Extending a class to the zeros of `I` at the section `t.points` and then pulling it back along |
| 964 | the kernel `I.constToZeros` is the same as restricting the class to the section and pulling it back |
| 965 | along `I.atSection t.points`. -/ |
| 966 | private lemma pullbackAlong_extendToZeros_eq |
| 967 | (t : LineStage A m) |
| 968 | (w : TotalH (t.toTestOver ⋙ abCoker (ℓ • 𝟙 (relFreeAb I.topPoints))) t.theory.functor) : |
| 969 | pullbackAlong ((sectionLift (X := ringOf (𝟭 (TestOver A)) ⋙ projLinePow (Fin m)) t.toTestOver |
| 970 | t.points).whiskerLeft (abCoker.π _)) |
| 971 | (pullbackAlong ((sectionLift (X := ringOf (𝟭 (TestOver A)) ⋙ projLinePow (Fin m)) t.toTestOver |
| 972 | t.points).whiskerLeft I.constToZeros) |
| 973 | (I.extendToZeros t.theory t.points w)) = |
| 974 | pullbackAlong (I.atSection t.points) |
| 975 | (pullbackAlong (t.toTestOver.whiskerLeft (abCoker.π _)) w) := by |
| 976 | refine ((congrArg (pullbackAlong _) (I.zerosEquiv_extendToZeros t.theory t.points w)).trans |
| 977 | (pullbackAlong_pullbackAlong ..)).trans ?_ |
| 978 | exact (pullbackAlong_pullbackAlong (f := I.atSection t.points) |
| 979 | (t.toTestOver.whiskerLeft (abCoker.π _)) w).symm |
| 980 | |
| 981 | /-- Let I be a compatible family of ideals on points of (P¹)^m, U the locus where I is the unit |
| 982 | ideal, and Q = ℤ[(P¹)^m]/ℤ[U]. Let `θ i` be classes of degree `d i`, over the points of (P¹)^m, from |
| 983 | N to the locally constant ℤ/ℓ-valued functions modulo those dying where I = 0 (`I.zerosCoeff`). |
| 984 | Suppose their Leray–Hirsch map, sending families `(w i)` of total Ext classes from Q to N to |
| 985 | `∑ i, θ i ∘ w i` (with `w i` restricted to points), is surjective. Then `D.IsFiniteLerayHirsch` |
| 986 | passes from N to Q; this property includes bijectivity of the analogous map built from the classes |
| 987 | `D.comparison i`. -/ |
| 988 | lemma isFiniteLerayHirsch_topPoints_of_surjective {J : Type*} {d : J → ℕ} |
| 989 | {θ : ∀ i : J, |
| 990 | H (restrictAlong (elementsProj (ringOf (𝟭 (TestOver A)) ⋙ projLinePow (Fin m))) N) |
| 991 | (I.zerosCoeff |
| 992 | (locConstAlong (elementsProj (ringOf (𝟭 (TestOver A)) ⋙ projLinePow (Fin m))))) |
| 993 | (d i)} |
| 994 | (h_surj : Surjective (lerayHirsch θ (relFreeAb I.topPoints))) |
| 995 | (hN : D.IsFiniteLerayHirsch N) : |
| 996 | D.IsFiniteLerayHirsch (relFreeAb I.topPoints) := by |
| 997 | -- `IdealFamily.exists_move_kernel` moves the kernel `I.constToZeros` from a point `points` of |
| 998 | -- `X = (ℙ¹)^m` to a second point `q'`. |
| 999 | -- The moved kernel is `∑ β i · θ i` by `h_surj`; this gives the identity that |
| 1000 | -- `isFiniteLerayHirsch_of_integrate_params` asks for, with the operations |
| 1001 | -- `T i : w ↦ θ i · I.extendToZeros w`. |
| 1002 | let X := ringOf (𝟭 (TestOver A)) ⋙ projLinePow (Fin m) |
| 1003 | -- Pulled back along `I.constToZeros`, the extension of `w` is the restriction of `w` to `points`. |
| 1004 | have h_ext (t : LineStage A m) |
| 1005 | (w : TotalH (t.toTestOver ⋙ abCoker (ℓ • 𝟙 (relFreeAb I.topPoints))) t.theory.functor) := |
| 1006 | pullbackAlong_extendToZeros_eq (t := t) (w := w) |
| 1007 | let T (i : J) : NaturalOp m (abCoker (ℓ • 𝟙 (relFreeAb I.topPoints))) N := |
| 1008 | { app t := |
| 1009 | (comp (map (restrictAlong (sectionLift (X := X) t.toTestOver t.points)) (θ i).toTotalH |
| 1010 | :)).comp |
| 1011 | (I.extendToZeros t.theory t.points) |
| 1012 | naturality t φ K _ b x := |
| 1013 | ((mapThenComp_comp (map_restrictAlong_restrictAlong |
| 1014 | (sectionLift (X := X) t.toTestOver t.points) φ |
| 1015 | (θ i).toTotalH)).trans (congrArg _ (I.extendToZeros_naturality t.theory t.points φ K b x)) |
| 1016 | :) } |
| 1017 | -- `E` is the category of tests with two points of `X`; there every maximal ideal is the kernel |
| 1018 | -- of the map to a quotient test. |
| 1019 | let E := ((elementsProj X ⋙ 𝟭 (TestOver A)) ⋙ X).Elements |
| 1020 | have h_max (c : E) (𝔪 : Ideal _) (h𝔪 : 𝔪.IsMaximal) : ∃ (c' : E) (f : c ⟶ c'), |
| 1021 | RingHom.ker ((ringOf (elementsProj _ ⋙ elementsProj X ⋙ 𝟭 _)).map f).hom = 𝔪 := by |
| 1022 | obtain ⟨_, π, hπ⟩ := TestOver.exists_quotient _ 𝔪 |
| 1023 | rw [← h𝔪.isPrime.radical] |
| 1024 | exact ⟨.mk (obj := ⟨X.map π c.obj.val⟩) (X.map π c.val), ⟨⟨π, rfl⟩, rfl⟩, hπ.1⟩ |
| 1025 | -- For the two tautological points `points`, `q'` of `E` there is a class `δ'` such that every |
| 1026 | -- class into a theory that carries the kernel to `w` at `points` carries `δ'` to |
| 1027 | -- `w · ∏ j, (η(points j) + η(q' j))` at `q'`. |
| 1028 | have h_chain := |
| 1029 | I.exists_move_kernel |
| 1030 | (((Theory.locallyConstant.onElements (X := X)).onZeros I).onElements (X := _ ⋙ X)) h_max |
| 1031 | (fun r ↦ ⟨_, fun f ↦ funext fun j ↦ (r j).property f⟩) (fun _ hr ↦ funext hr) |
| 1032 | (projLinePow.component ⟨_, fun f ↦ f.hom.map_val⟩) (projLinePow.component ⟨_, fun f ↦ f.2⟩) |
| 1033 | (pullbackAlong ((elementsProj _).whiskerLeft (abCoker.π _)) |
| 1034 | (.homClass ((elementsProj _).whiskerLeft I.constToZeros))) |
| 1035 | -- Pull-back to `E` at the second point is bijective, so the moved kernel comes from some |
| 1036 | -- `lerayHirsch θ _ β`. |
| 1037 | obtain ⟨β, hβ⟩ := |
| 1038 | ((isBijective_relFreeAb_tautologicalSection |
| 1039 | (I.topPoints.whisker (elementsProj X))).bijective_totalH.2.comp |
| 1040 | h_surj).exists.1 h_chain |
| 1041 | refine D.isFiniteLerayHirsch_of_integrate_params I (β.1.restrict β) hN id (fun i ↦ T i) fun t q' |
| 1042 | w ↦ ?_ |
| 1043 | -- The sum over the support of `β` is the pairing of `lerayHirsch θ _ β` with the extension of |
| 1044 | -- `w`. |
| 1045 | have h_sum : |
| 1046 | ∑ i : β.support, mapThenComp (restrictAlong t.toTestOver) ((T i).app t w) (β i) = |
| 1047 | comp (TotalH.map (restrictAlong (sectionLift t.toTestOver t.points)) (lerayHirsch θ _ β) :) |
| 1048 | (I.extendToZeros t.theory t.points w) := by |
| 1049 | simp_rw [show lerayHirsch θ _ β = _ from (β.support.sum_coe_sort _).symm, map_sum, |
| 1050 | AddMonoidHom.finsetSum_apply] |
| 1051 | refine Finset.sum_congr rfl fun i _ ↦ ?_ |
| 1052 | exact (mapThenComp_comp |
| 1053 | (map_restrictAlong_restrictAlong (elementsProj X) (sectionLift _ t.points) (β i))).symm |
| 1054 | -- Specialise `hβ` to the pair `(t.points, q')`; its hypothesis is `h_ext`. |
| 1055 | let s : t.Base ⥤ E := |
| 1056 | sectionLift (X := (elementsProj X ⋙ 𝟭 (TestOver A)) ⋙ X) |
| 1057 | (sectionLift (X := X) t.toTestOver t.points) q' |
| 1058 | have h_move := |
| 1059 | hβ _ s t.theory (I.extendToZeros t.theory t.points w) |
| 1060 | (pullbackAlong (t.toTestOver.whiskerLeft (abCoker.π _)) w) |
| 1061 | (by |
| 1062 | -- (`apply`: compares `h_ext t w` with the goal once; as a term it is compared twice) |
| 1063 | refine (mapThenComp_comp map_homClass).trans |
| 1064 | ((congrArg _ congr(comp $map_homClass _)).trans ?_) |
| 1065 | apply h_ext t w) |
| 1066 | refine (congrArg _ h_sum).trans (.trans (comp_assoc_of_eq (.symm ?_) _) h_move) |
| 1067 | -- The moved kernel at `(t.points, q')` is `lerayHirsch θ _ β` restricted along `t.points`, then |
| 1068 | -- pulled back by `I.atSection q'`. |
| 1069 | refine map_pullbackAlong.trans (congrArg _ ((congrArg _ comp_id).trans ?_)) |
| 1070 | exact map_restrictAlong_restrictAlong (elementsProj _) s (lerayHirsch θ _ β) |
| 1071 | |
| 1072 | end ComparedTheory |
| 1073 | |
| 1074 | end ComparedTheories |
| 1075 | |
| 1076 | end New.Variety |
| 1077 | |
| 1078 | end |