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

| 1 | module |
| 2 | |
| 3 | import Aesop.Frontend.Attribute |
| 4 | import Mathlib.RingTheory.Coalgebra.CoassocSimps |
| 5 | public import Lib.Cohomology.Hodge.CupProduct |
| 6 | |
| 7 | /-! |
| 8 | # The Leray–Hirsch map as a map of δ-functors, and dévissage from representable functors |
| 9 | |
| 10 | A family θ of classes θ_i in Ext^{d_i}(Φ G, F), for an exact functor Φ, defines the Leray–Hirsch map |
| 11 | w ↦ Σ Φ(w_i) · θ_i. The file shows that its bijectivity at S can be proved by dévissage in S. |
| 12 | |
| 13 | * `New.Variety.lerayHirsch`, `New.Variety.IsLerayHirschBasis`: the map, from finitely supported |
| 14 | families in Ext(S, G) to Ext(Φ S, F), and its bijectivity. |
| 15 | * `New.Variety.isLerayHirschBasis_iff_allBijective_truncMap`: it is bijective iff its truncations to |
| 16 | total degree below n all are. |
| 17 | * `New.Variety.Devissage.allBijective_of_allBijective_sigma_reprBy`: from disjoint unions of |
| 18 | representable functors to all functors. |
| 19 | * `New.Variety.isLerayHirschBasis_of_reprBy`: from representable functors to all functors, for |
| 20 | finitely many classes and Φ the restriction along a functor. |
| 21 | |
| 22 | Notions from other files: |
| 23 | * `New.Variety.H`: The group Ext^n(N,F) in the category of functors from C to abelian groups; |
| 24 | `TotalH N F` is their direct sum over n, `x.toTotalH` is x placed in its degree, and |
| 25 | `mapThenComp Φ t x` is the Yoneda product t ∘ Φ(x). |
| 26 | * `New.Variety.freeAb`: The functor sending a set-valued functor Y to ℤ[Y], whose value at A is the |
| 27 | free abelian group on Y(A). |
| 28 | * `New.Variety.Devissage`: The five and four lemmas for a family of maps f_{N,n} : A N n → B N n, |
| 29 | indexed by functors N : D → Ab and degrees n, as for a map of contravariant δ-functors. |
| 30 | |
| 31 | ## Relation to the literature |
| 32 | |
| 33 | Known result: Leray–Hirsch theorem that a local basis of cohomology classes is a global basis. The |
| 34 | theorem is stated abstractly for Ext groups of functors and finitely many classes. It says that if |
| 35 | the Leray–Hirsch map is bijective on ℤ[h_c] for every representable functor h_c, then it is |
| 36 | bijective on every functor. Source: Leray, Hirsch; Hatcher, Algebraic Topology, Thm 4D.1; SGA 5 VII |
| 37 | (projective bundle formula). |
| 38 | -/ |
| 39 | |
| 40 | @[expose] public section |
| 41 | |
| 42 | noncomputable section |
| 43 | |
| 44 | namespace New.Variety |
| 45 | |
| 46 | open CategoryTheory Function DirectSum TotalH Finsupp H |
| 47 | |
| 48 | variable {A C : Type 1} [Category A] [Category C] |
| 49 | {Φ : (A ⥤ Ab) ⥤ AbFunctor C} [@IsExactFunctor A C _ _ Φ] {G : A ⥤ Ab} {S S' : AbFunctor A} |
| 50 | {n e : ℕ} {F N M : AbFunctor C} {I : Type _} [DecidableEq I] {d : I → ℕ} |
| 51 | (θ : ∀ i : I, H (Φ G) F (d i)) {X : ShortComplex (AbFunctor A)} (h : X.ShortExact) |
| 52 | |
| 53 | /-! ### The map and its naturality -/ |
| 54 | |
| 55 | /-- For classes θ_i in Ext^{d_i}(ΦG, F), the Leray–Hirsch map w ↦ Σ θ_i∘Φ(w_i) from finitely |
| 56 | supported families in total Ext(S, G) to total Ext(ΦS, F). -/ |
| 57 | def lerayHirsch (S : AbFunctor A) : (I →₀ TotalH S G) →ₗ[ℤ] TotalH (Φ S) F := |
| 58 | lsum ℤ fun i ↦ (mapThenComp Φ (θ i).toTotalH).toIntLinearMap |
| 59 | |
| 60 | /-- The Leray–Hirsch property for S: the Leray–Hirsch map `New.Variety.lerayHirsch` of θ at S is |
| 61 | bijective. -/ |
| 62 | abbrev IsLerayHirschBasis (S : AbFunctor A) : Prop := Bijective (lerayHirsch θ S) |
| 63 | |
| 64 | section |
| 65 | |
| 66 | omit [DecidableEq I] |
| 67 | |
| 68 | lemma lerayHirsch_single (i : I) (x : TotalH S G) : |
| 69 | lerayHirsch θ S (.single i x) = .comp (.map Φ x) (θ i).toTotalH := by |
| 70 | simp [lerayHirsch, mapThenComp] |
| 71 | |
| 72 | /-- Additive maps r, r' that intertwine the maps x ↦ Φ(x) · θ_i and x ↦ Φ'(x) · θ'_i for each i |
| 73 | intertwine the two Leray–Hirsch maps. -/ |
| 74 | lemma lerayHirsch_naturality {A' C' : Type 1} [Category A'] [Category C'] |
| 75 | {Φ' : (A' ⥤ Ab) ⥤ AbFunctor C'} [@IsExactFunctor A' C' _ _ Φ'] {G' T : AbFunctor A'} |
| 76 | {F' : AbFunctor C'} {θ' : (i : I) → H (Φ'.obj G') F' (d i)} (r : TotalH S G →+ TotalH T G') |
| 77 | {r' : TotalH (Φ.obj S) F →+ TotalH (Φ'.obj T) F'} (h_intertwine : ∀ (i : I) (x : TotalH S G), |
| 78 | mapThenComp Φ' (of (H (Φ'.obj G') F') (d i) (θ' i)) (r x) = |
| 79 | r' (mapThenComp Φ (θ i).toTotalH x)) |
| 80 | (w : I →₀ TotalH S G) : |
| 81 | lerayHirsch θ' T (w.mapRange r r.map_zero) = r' (lerayHirsch θ S w) := by |
| 82 | simp_all [lerayHirsch, sum_mapRange_index, map_finsuppSum] |
| 83 | |
| 84 | /-- The Leray–Hirsch map is natural in S for Yoneda products: precomposing each w_i with ξ |
| 85 | corresponds to precomposing the image with Φ(ξ). -/ |
| 86 | lemma lerayHirsch_mapRange_comp {ξ : TotalH S' S} {ζ : TotalH (Φ.obj S') (Φ.obj S)} |
| 87 | (hξ : TotalH.map Φ ξ = ζ) (w : I →₀ TotalH S G) : |
| 88 | lerayHirsch θ S' (w.mapRange (TotalH.comp ξ) (TotalH.comp ξ).map_zero) = |
| 89 | .comp ζ (lerayHirsch θ S w) := |
| 90 | -- precomposing with `ξ` before the product with `θ i` is precomposing with `ζ = Φ ξ` after it |
| 91 | have h_inter : ∀ (i : I) (x : TotalH S G), |
| 92 | mapThenComp Φ (of (H (Φ.obj G) F) (d i) (θ i)) (TotalH.comp ξ x) = |
| 93 | TotalH.comp ζ (mapThenComp Φ (θ i).toTotalH x) := by |
| 94 | simp [map_comp_assoc, hξ, mapThenComp] |
| 95 | lerayHirsch_naturality _ _ h_inter w |
| 96 | |
| 97 | end |
| 98 | |
| 99 | /-! ### Truncation by total degree -/ |
| 100 | |
| 101 | open scoped Classical in |
| 102 | /-- The truncation of finitely supported families (w_i) in total Ext(S, G) to total degree below |
| 103 | n: in w_i, keep the components of degree e with e + d_i < n. It is a ℤ-linear endomorphism of the |
| 104 | families `I →₀ TotalH S G`. -/ |
| 105 | @[aesop simp] |
| 106 | def degreeTrunc (d : I → ℕ) (n : ℕ) := |
| 107 | (finsuppLequivDFinsupp (M := TotalH S G) ℤ).symm.conj |
| 108 | (DFinsupp.mapRange.linearMap fun i ↦ lmap fun m ↦ if m + d i < n then .id else 0) |
| 109 | |
| 110 | /-- Precomposition with a class ξ of degree e commutes with truncation, up to the shift by e: for |
| 111 | the map `φ` of families `(I →₀ TotalH N F) → (I →₀ TotalH M F)` given by `ξ`, truncating below `n` |
| 112 | and then applying `φ` is applying `φ` and then truncating below `n + e`. -/ |
| 113 | lemma degreeTrunc_comp_precomp (ξ : H (C := C) M N e) : |
| 114 | have φ := mapRange.linearMap (TotalH.comp (F := F) ξ.toTotalH).toIntLinearMap |
| 115 | φ ∘ₗ degreeTrunc d n = degreeTrunc d (n + e) ∘ₗ φ := by |
| 116 | aesop (add simp [lof_eq_of, comp_of]) (add safe (by omega)) |
| 117 | |
| 118 | /-- The Leray–Hirsch map commutes with truncation. Its target is viewed as families indexed by one |
| 119 | point, with degree shift 0, so that `New.Variety.degreeTrunc` applies to it: `φ` is the map |
| 120 | `(I →₀ TotalH S G) → (Unit →₀ TotalH (Φ S) F)`. -/ |
| 121 | lemma degreeTrunc_comp_lerayHirsch (S : AbFunctor A) (n : ℕ) : |
| 122 | have φ := lsingle () ∘ₗ lerayHirsch θ S |
| 123 | φ ∘ₗ degreeTrunc d n = degreeTrunc 0 n ∘ₗ φ := by |
| 124 | aesop (add simp lerayHirsch) (add simp [mapThenComp, lof_eq_of, comp_of]) |
| 125 | |
| 126 | /-- For a linear map φ from families `I →₀ TotalH S G` to families `J →₀ TotalH N F`, commuting with |
| 127 | the truncations (below n with shifts d, below m with shifts b) `New.Variety.degreeTrunc`, its |
| 128 | restriction from families of total degree below n to families of total degree below m. -/ |
| 129 | def truncMap {J b m φ} [DecidableEq J] |
| 130 | (h : φ ∘ₗ degreeTrunc (A := A) (G := G) (S := S) (I := I) d n = |
| 131 | degreeTrunc (A := C) (G := F) (S := N) (I := J) b m ∘ₗ φ) : |
| 132 | (.of (degreeTrunc (A := A) (G := G) (S := S) (I := I) d n).range : Ab) →+ |
| 133 | (.of (degreeTrunc (A := C) (G := F) (S := N) (I := J) b m).range : Ab) := |
| 134 | -- `φ` sends `degreeTrunc d n w` to `degreeTrunc b m (φ w)` |
| 135 | show (.of (degreeTrunc d n).range : Ab) →+ (.of (degreeTrunc b m).range : Ab) from |
| 136 | (φ.restrict (by |
| 137 | rintro _ ⟨w, rfl⟩ |
| 138 | exact ⟨φ w, congr($h w).symm⟩)).toAddMonoidHom |
| 139 | |
| 140 | variable {θ} |
| 141 | |
| 142 | /-- The Leray–Hirsch map at S is bijective iff, for every n, its restriction to families of total |
| 143 | degree below n is a bijection onto the classes of degree below n. Here `S`, `G` are functors |
| 144 | `A ⥤ Ab`, `F` is a functor `C ⥤ Ab`, and the classes `θ i` are indexed by a type `I`. -/ |
| 145 | lemma isLerayHirschBasis_iff_allBijective_truncMap : IsLerayHirschBasis θ S ↔ |
| 146 | AllBijective fun n : ℕ ↦ truncMap (degreeTrunc_comp_lerayHirsch θ S n) := by |
| 147 | have comm (n : ℕ) (a : I →₀ TotalH S G) : |
| 148 | single () (lerayHirsch θ S (degreeTrunc d n a)) = |
| 149 | degreeTrunc 0 n (single () (lerayHirsch θ S a)) := |
| 150 | LinearMap.congr_fun (degreeTrunc_comp_lerayHirsch θ S n) a |
| 151 | simp [AllBijective, Bijective, truncMap, injective_iff_map_eq_zero, Surjective, |
| 152 | LinearMap.restrict_apply] |
| 153 | refine ⟨fun ⟨h_inj, h_surj⟩ n ↦ ⟨fun a ↦ h_inj _, fun z ↦ ?_⟩, |
| 154 | fun h_trunc ↦ ⟨fun a ha ↦ ?_, fun b ↦ ?_⟩⟩ |
| 155 | · -- Truncate a preimage of `z`. |
| 156 | obtain ⟨a, ha⟩ := h_surj (z ()) |
| 157 | exact ⟨a, by rw [comm, ha, ← unique_single]⟩ |
| 158 | · -- Every truncation of `a` is in the kernel, hence zero; the component of `a i` in degree `m` |
| 159 | -- survives truncation at `m + d i + 1`. |
| 160 | ext i m |
| 161 | have h0 := (h_trunc (m + d i + 1)).1 a (by simpa [ha] using comm _ a) |
| 162 | simpa [degreeTrunc] using congr_arg (fun f ↦ f i m) h0 |
| 163 | · -- The range is a submodule, so it is enough to reach a homogeneous class `z` of degree `n`, |
| 164 | -- which is unchanged by truncation at `n + 1`. |
| 165 | induction b using DirectSum.induction_on with |
| 166 | | zero => exact ⟨0, map_zero _⟩ |
| 167 | | of n z => |
| 168 | obtain ⟨a, ha⟩ := (h_trunc (n + 1)).2 (single () (of _ n z)) |
| 169 | exact ⟨degreeTrunc d (n + 1) a, by simpa [degreeTrunc] using congr_arg (fun f ↦ f ()) ha⟩ |
| 170 | | add x y hx hy => exact (lerayHirsch θ S).range.add_mem hx hy |
| 171 | |
| 172 | /-! ### Long exact sequences of truncated families -/ |
| 173 | |
| 174 | /-- If precomposition with ξ and with ζ is exact on total Ext groups, it is exact on the truncated |
| 175 | families. Here `S`, `M`, `N`, `F` are functors `C ⥤ Ab`, and `ξ`, `ζ` are classes of degrees `e` |
| 176 | and `n`. -/ |
| 177 | lemma truncMap.exact_of_exact {S : AbFunctor C} {n e : ℕ} {F N M : AbFunctor C} {I : Type _} |
| 178 | [DecidableEq I] {d : I → ℕ} {ξ : H M N e} {ζ : H S M n} |
| 179 | (h_exact : Exact (TotalH.comp (F := F) (of (H M N) e ξ)) |
| 180 | (TotalH.comp (C := C) (of (H S M) n ζ))) (m : ℕ) : |
| 181 | Exact (truncMap (degreeTrunc_comp_precomp (n := m) (F := F) (d := d) ξ)) |
| 182 | (truncMap (degreeTrunc_comp_precomp ζ)) := by |
| 183 | -- On elements: a truncated family is killed by `ζ` iff it comes from a truncated family by `ξ`. |
| 184 | suffices key : ∀ a : I →₀ TotalH M F, |
| 185 | mapRange (TotalH.comp (of (H S M) n ζ)) (map_zero _) (degreeTrunc d (m + e) a) = 0 ↔ |
| 186 | ∃ y : I →₀ TotalH N F, |
| 187 | mapRange (TotalH.comp (of (H M N) e ξ)) (map_zero _) (degreeTrunc d m y) = |
| 188 | degreeTrunc d (m + e) a by simpa [Exact, truncMap, LinearMap.restrict_apply] using key |
| 189 | refine fun a ↦ ⟨fun ha ↦ ?_, fun ⟨y, hy⟩ ↦ ?_⟩ |
| 190 | · -- By `h_exact` each component of the truncation of `a` comes from a class by `ξ`. |
| 191 | obtain ⟨y, hy⟩ : |
| 192 | ∃ y, mapRange (TotalH.comp (of _ _ ξ)) (map_zero _) y = degreeTrunc d (m + e) a := |
| 193 | (range_mapRange _ _).ge fun i ↦ (h_exact _).mp (DFunLike.congr_fun ha i) |
| 194 | -- Truncate the preimage: `ξ` shifts truncation by `e`, it carries `y` to the truncation of |
| 195 | -- `a` (`hy`), and truncating twice is truncating once. |
| 196 | refine ⟨y, (LinearMap.congr_fun (degreeTrunc_comp_precomp ξ) y).trans ?_⟩ |
| 197 | have h_idem : degreeTrunc d (m + e) (degreeTrunc d (m + e) a) = degreeTrunc d (m + e) a := by |
| 198 | ext i k |
| 199 | by_cases h : k + d i < m + e <;> simp [degreeTrunc, h] |
| 200 | simpa [hy] using h_idem |
| 201 | · -- Conversely `ζ` kills what comes from `ξ`, component by component. |
| 202 | simp [← hy, Finsupp.ext_iff, h_exact.apply_apply_eq_zero] |
| 203 | |
| 204 | /-- For a short exact sequence X, the long exact sequence whose n-th terms are the finitely |
| 205 | supported families in total Ext(X₃, G), Ext(X₂, G), Ext(X₁, G) of total degree below n; its maps A |
| 206 | n → B n → C n → A (n+1) are precomposition with X.g, with X.f, and with the extension class of X |
| 207 | (degree 1). -/ |
| 208 | def truncMap.longExact : LongExactSeq where |
| 209 | -- the shifts `+ 0` are the degrees of the classes of `X.g` and `X.f` |
| 210 | A n := .of (degreeTrunc (S := X.X₃) (G := G) d n).range |
| 211 | B n := .of (degreeTrunc (S := X.X₂) (G := G) d (n + 0)).range |
| 212 | C n := .of (degreeTrunc (S := X.X₁) (G := G) d (n + 0 + 0)).range |
| 213 | f _ := truncMap (degreeTrunc_comp_precomp (.mk₀ X.g)) |
| 214 | g _ := truncMap (degreeTrunc_comp_precomp (.mk₀ X.f)) |
| 215 | δ _ := truncMap (degreeTrunc_comp_precomp h.extClass) |
| 216 | -- a family of total degree below `0` is zero |
| 217 | injective_f := by |
| 218 | rintro ⟨_, a, rfl⟩ ⟨_, b, rfl⟩ - |
| 219 | ext |
| 220 | simp [degreeTrunc] |
| 221 | exact_f_g := exact_of_exact (exact_triangle h G).1 |
| 222 | exact_g_delta := exact_of_exact (exact_triangle h G).2.1 |
| 223 | exact_delta_f := exact_of_exact (exact_triangle h G).2.2 |
| 224 | |
| 225 | /-- For a short exact sequence X, the Leray–Hirsch maps of θ, truncated to total degree below n, |
| 226 | form a morphism (the same maps t on all three kinds of terms, commuting with f, g and δ) from the |
| 227 | long exact sequence `New.Variety.truncMap.longExact` of families in Ext(X, G) to that of total |
| 228 | Ext(ΦX, F), truncated likewise. -/ |
| 229 | lemma lerayHirsch.longExact_hom : |
| 230 | have t {S : AbFunctor A} (n : ℕ) := truncMap (degreeTrunc_comp_lerayHirsch θ S n) |
| 231 | (truncMap.longExact h).Hom (truncMap.longExact (h.map_of_exact Φ)) t t t := by |
| 232 | -- Each square is `lerayHirsch_mapRange_comp`; it remains to see that `Φ` carries the classes of |
| 233 | -- `X.g`, `X.f` and the extension class of `X` to the corresponding classes of `X.map Φ`. |
| 234 | refine ⟨fun n x ↦ ?_, fun n x ↦ ?_, fun n x ↦ ?_⟩ <;> |
| 235 | refine Subtype.ext <| |
| 236 | (congrArg (single ()) (lerayHirsch_mapRange_comp θ ?_ _)).trans |
| 237 | (mapRange_single (hf := map_zero _)).symm |
| 238 | · exact map_homClass |
| 239 | · exact map_homClass |
| 240 | · -- `Φ` carries the extension class of `X` to that of `X.map Φ` |
| 241 | aesop (add simp Abelian.Ext.mapExactFunctor_extClass) |
| 242 | |
| 243 | /-- The Leray–Hirsch maps of θ, truncated to total degree below n, satisfy `New.Variety.Devissage`: |
| 244 | the five lemma and the four lemmas hold for them along short exact sequences of functors S. -/ |
| 245 | lemma lerayHirsch.devissage : |
| 246 | Devissage fun (S : A ⥤ Ab) (n : ℕ) ↦ truncMap (degreeTrunc_comp_lerayHirsch θ S n) := by |
| 247 | -- The four lemma and the five lemma are applied to the ladder `longExact_hom`; the class must |
| 248 | -- also contain the zero functors. |
| 249 | refine |
| 250 | { bijectiveUpTo_quotient := fun hX ↦ (longExact_hom hX).four_lemma |
| 251 | isClosedClass := |
| 252 | ⟨fun S hS ↦ isLerayHirschBasis_iff_allBijective_truncMap.mp ?_, fun X hX ↦ |
| 253 | (longExact_hom hX).five_lemma⟩ } |
| 254 | -- If `S = 0`, then `Φ S = 0` too, and both sides of `lerayHirsch θ S` are trivial. |
| 255 | have h_src : ∀ (G : A ⥤ Ab) (n : ℕ), Subsingleton (H S G n) := subsingleton_of_id_eq_zero hS |
| 256 | have h_id_zero : 𝟙 (Φ.obj S) = 0 := by simpa using Φ.congr_map hS |
| 257 | have h_tgt : ∀ n : ℕ, Subsingleton (H (Φ S) F n) := subsingleton_of_id_eq_zero h_id_zero F |
| 258 | -- a map between groups with one element is bijective |
| 259 | aesop |
| 260 | |
| 261 | omit [DecidableEq I] in |
| 262 | /-- The functors `S` at which `θ` is a Leray–Hirsch basis form a closed class |
| 263 | (`New.Variety.IsClosedClass`): the class contains the zero functors, and along a short exact |
| 264 | sequence whose subobject is in it, the middle term is in it exactly when the quotient is. -/ |
| 265 | lemma isClosedClass_isLerayHirschBasis : IsClosedClass fun S : A ⥤ Ab ↦ IsLerayHirschBasis θ S := by |
| 266 | classical |
| 267 | simp [isLerayHirschBasis_iff_allBijective_truncMap, lerayHirsch.devissage.isClosedClass] |
| 268 | |
| 269 | /-! ### Dévissage from representable functors -/ |
| 270 | |
| 271 | /-- Dévissage. Let f(S, n) be maps with the five- and four-lemma properties `New.Variety.Devissage`. |
| 272 | If f(S, n) is bijective for all n whenever S = ℤ[Y] with Y a disjoint union of representable |
| 273 | functors, then f(S, n) is bijective for every S and n. -/ |
| 274 | lemma Devissage.allBijective_of_allBijective_sigma_reprBy {A B : C ⥤ Ab → ℕ → Type _} |
| 275 | {f : (N : C ⥤ Ab) → (n : ℕ) → A N n → B N n} (hf : Devissage (D := C) (A := A) (B := B) f) |
| 276 | (h_sum : ∀ (ι : Type 1) (c : ι → C), |
| 277 | AllBijective (f (freeAb.obj (sigma fun i : ι ↦ reprBy (c i))))) (S : C ⥤ Ab) : |
| 278 | AllBijective (f S) := by |
| 279 | -- Induction on the number `r` of conditions in `BijectiveUpTo`, for all functors at once. |
| 280 | refine allBijective_iff_forall_bijectiveUpTo.mpr fun r ↦ ?_ |
| 281 | induction r generalizing S with |
| 282 | | zero => tauto |
| 283 | | succ r ih => |
| 284 | -- cover `S` by a sum of representables: the cover satisfies every condition, the kernel |
| 285 | -- the first `r`, so `S` satisfies the first `r + 1` |
| 286 | obtain ⟨ι, c, g, h_exact, -⟩ := exists_acyclic_cover S |
| 287 | exact hf.bijectiveUpTo_quotient h_exact |
| 288 | (allBijective_iff_forall_bijectiveUpTo.mp (h_sum ι c) (r + 1)) (ih _) |
| 289 | |
| 290 | /-- Let `Y` be a family, indexed by `ι`, of set-valued functors on a category `D`, and let `K` be |
| 291 | an abelian-group-valued functor on `D`. Then a total cohomology class on the free abelian functor |
| 292 | of the disjoint union of the `Y c`, with coefficients in `K`, is determined by its restrictions to |
| 293 | the summands `Y c`. -/ |
| 294 | private lemma injective_pullbackAlong_sigma {D : Type 1} [Category D] {ι : Type 1} |
| 295 | (Y : ι → D ⥤ Type 1) (K : AbFunctor D) : |
| 296 | Injective fun (x : TotalH (freeAb (sigma Y)) K) c ↦ |
| 297 | pullbackAlong (freeAb.map (sigma.ι Y c)) x := by |
| 298 | -- by `H.sigma_bijective` (cohomology turns disjoint unions into products), a total class on a |
| 299 | -- disjoint union is determined by its restrictions to the summands |
| 300 | intro x x' h_eq |
| 301 | ext m |
| 302 | refine (sigma_bijective Y K m).injective (funext fun c ↦ ?_) |
| 303 | -- in degree `m`, the restrictions of `x` and `x'` to the summand `c` agree |
| 304 | have h_eq_m : pullbackAlong (freeAb.map (sigma.ι Y c)) x m = |
| 305 | pullbackAlong (freeAb.map (sigma.ι Y c)) x' m := DFunLike.congr_fun (congrFun h_eq c) m |
| 306 | simpa [pullbackAlong_eq_map] using h_eq_m |
| 307 | |
| 308 | omit [DecidableEq I] in |
| 309 | /-- Let θ be a finite family of classes in Ext(G∘φ, F), for a functor φ. If the Leray–Hirsch map |
| 310 | `New.Variety.lerayHirsch` is bijective at ℤ[h_c], the free abelian functor on h_c = Hom(c, −), for |
| 311 | every object c of the target of φ, it is bijective at every S. Here `S`, `G` are functors `A ⥤ Ab`, |
| 312 | `F` is a functor `C ⥤ Ab`, and `I` is the finite index type of the classes. -/ |
| 313 | lemma isLerayHirschBasis_of_reprBy [Finite I] {φ : C ⥤ A} |
| 314 | {θ : ∀ i : I, H (restrictAlong φ G) F (d i)} |
| 315 | (h_repr : ∀ c : A, IsLerayHirschBasis θ (freeAb (reprBy c))) (S : AbFunctor A) : |
| 316 | IsLerayHirschBasis θ S := by |
| 317 | classical |
| 318 | -- By dévissage it suffices to treat a disjoint union of representable functors `reprBy (X c)`. |
| 319 | -- Restriction to the summands turns both sides into products, where `h_repr` applies factorwise. |
| 320 | refine isLerayHirschBasis_iff_allBijective_truncMap.mpr |
| 321 | (lerayHirsch.devissage.allBijective_of_allBijective_sigma_reprBy |
| 322 | (fun ι X ↦ isLerayHirschBasis_iff_allBijective_truncMap.mp ?_) S) |
| 323 | -- restriction of families of classes to the summands |
| 324 | let Y (c : ι) : A ⥤ Type 1 := reprBy (X c) |
| 325 | let restr (x : I →₀ TotalH (freeAb (sigma Y)) G) (c : ι) : I →₀ TotalH (freeAb (Y c)) G := |
| 326 | x.mapRange _ (pullbackAlong (freeAb.map (sigma.ι Y c))).map_zero |
| 327 | have h_restr : Bijective restr := by |
| 328 | refine ⟨fun x x' h_eq ↦ Finsupp.ext fun i ↦ ?_, fun w ↦ ?_⟩ |
| 329 | · exact injective_pullbackAlong_sigma Y G |
| 330 | (funext fun c ↦ DFunLike.congr_fun (congrFun h_eq c) i) |
| 331 | -- representable functors have cohomology in degree 0 only, so glue the degree 0 parts; |
| 332 | -- `I` is finite, so the glued family has finite support |
| 333 | have h_glue (i : I) : ∃ y : H (freeAb (sigma Y)) G 0, |
| 334 | (fun c ↦ H.map G (freeAb.map (sigma.ι Y c)) 0 y) = fun c ↦ w c i 0 := |
| 335 | (sigma_bijective Y G 0).surjective fun c ↦ w c i 0 |
| 336 | choose y hy using h_glue |
| 337 | refine ⟨equivFunOnFinite.symm fun i ↦ of _ 0 (y i), ?_⟩ |
| 338 | ext c i (_ | m) |
| 339 | · simpa [restr, pullbackAlong_eq_map] using congrFun (hy i) c |
| 340 | · subsingleton |
| 341 | -- `lerayHirsch θ` commutes with restriction |
| 342 | have h_comm (x : I →₀ TotalH (freeAb (sigma Y)) G) (c : ι) : lerayHirsch θ _ (restr x c) = |
| 343 | pullbackAlong (freeAb.map (sigma.ι (fun c ↦ φ ⋙ Y c) c)) (lerayHirsch θ _ x) := |
| 344 | lerayHirsch_mapRange_comp θ map_homClass x |
| 345 | have h_prod : Bijective fun x c ↦ lerayHirsch θ _ (restr x c) := |
| 346 | (Bijective.piMap fun c ↦ h_repr (X c)).comp h_restr |
| 347 | -- so `lerayHirsch θ` followed by the injective restriction map is bijective, hence so is |
| 348 | -- `lerayHirsch θ` |
| 349 | refine .of_comp_left ?_ (injective_pullbackAlong_sigma (fun c ↦ φ ⋙ Y c) F) |
| 350 | rwa [funext₂ h_comm] at h_prod |
| 351 | |
| 352 | end New.Variety |
| 353 | |
| 354 | end |