/- Copyright 2026 The Formal Conjectures Authors. Released under Apache 2.0 license as described in the file LICENSE. This file has been modified. -/ import OAI.Algebra.Homology.Notation import OAI.AlgebraicTopology.Support.FlasqueComparison import OAI.AlgebraicTopology.Sheaf.OpenInjectiveTo import OAI.AlgebraicTopology.Sheaf.FlasqueExtendNat import OAI.AlgebraicTopology.Singular.SheafCochainResolution /-! # Singular Flasque Model -/ namespace OAI.AlgebraicTopology.Support.SingularFlasqueModel.Singular noncomputable section /-! # Singular-cochain models for supported injective resolutions On a space with a contractible open basis, the singular-cochain augmentation resolves the constant rational sheaf, and we extend that augmentation to the fixed injective resolution with a strict normalization. On a hereditarily paracompact Hausdorff space the singular model is termwise flasque, so the supported comparison is a quasi-isomorphism on sheaves and on every open set. The contractible basis is a hypothesis of these generic topological lemmas, constructed for the smooth complex-point application below. -/ open _root_.CategoryTheory Limits _root_.TopologicalSpace _root_.HomologicalComplex variable (X : TopCat.{0}) /-- Let `X` be a topological space. This complex of sheaves is obtained by sheafifying the presheaves of rational singular cochains degree by degree. Its differential is induced by the singular coboundary, and it is extended by zero to negative integer degrees. -/ def rationalSingularCochainComplex : CochainComplex (TopCat.Sheaf AddCommGrpCat X) ℤ := (Singular.SheafCochain.singularCochainSheafComplex ℚ X).extend ComplexShape.embeddingUpNat /-- Let `X` be a topological space. This is the integer-indexed complex in a chosen injective resolution `ℚ_X → I^•` of the constant rational sheaf, with zero terms in negative degrees. -/ def rationalConstantInjectiveComplex : CochainComplex (TopCat.Sheaf AddCommGrpCat X) ℤ := -- An injective resolution `ℚ_X → I^•`. (AlgebraicTopology.Sheaf.OpenInjectiveResolution.TopCat.ambientConstantInjectiveResolution X (AddCommGrpCat.of ℚ)).cocomplex.extend ComplexShape.embeddingUpNat instance rationalSingularCochainComplex_isStrictlyGE : (rationalSingularCochainComplex X).IsStrictlyGE 0 := by dsimp [rationalSingularCochainComplex] infer_instance instance rationalConstantInjectiveComplex_isStrictlyGE : (rationalConstantInjectiveComplex X).IsStrictlyGE 0 := by dsimp [rationalConstantInjectiveComplex] infer_instance instance rationalConstantInjectiveComplex_injective (n : ℤ) : Injective ((rationalConstantInjectiveComplex X).X n) := Algebra.Homology.LiftToInjective.CochainComplex.injective_extend_nat _ (AlgebraicTopology.Sheaf.OpenInjectiveResolution.TopCat.ambientConstantInjectiveResolution X (AddCommGrpCat.of ℚ)).injective n variable (hX : ∀ (x : X) (V : Opens X), x ∈ V → ∃ (W : Opens X), x ∈ W ∧ ContractibleSpace W ∧ W ≤ V) /-- Let `X` be a topological space with a basis of contractible open sets. Write `C^•` for the sheafified rational singular cochains and `ℚ_X → I^•` for a chosen injective resolution. This chooses a map `C^• → I^•` whose composite with the constant-cochain inclusion `ℚ_X[0] → C^•` equals the resolution augmentation. Complexes are indexed by natural numbers. -/ def singularToConstantInjectiveResolution : Singular.SheafCochain.singularCochainSheafComplex ℚ X ⟶ (AlgebraicTopology.Sheaf.OpenInjectiveResolution.TopCat.ambientConstantInjectiveResolution X (AddCommGrpCat.of ℚ)).cocomplex := letI : Mono (Singular.SheafCochain.constantsToSingularCochainSheafComplex ℚ X) := Singular.SheafCochainResolution.constantsToSingularCochainSheafComplex_mono ℚ X letI : QuasiIso (Singular.SheafCochain.constantsToSingularCochainSheafComplex ℚ X) := Singular.SheafCochainResolution.constantsToSingularCochainSheafComplex_quasiIso_of_contractibleOpenBasis ℚ hX Algebra.Homology.LiftToInjective.CochainComplex.liftToInjectiveNat (Singular.SheafCochain.constantsToSingularCochainSheafComplex ℚ X) (AlgebraicTopology.Sheaf.OpenInjectiveResolution.TopCat.ambientConstantInjectiveResolution X (AddCommGrpCat.of ℚ)).ι (AlgebraicTopology.Sheaf.OpenInjectiveResolution.TopCat.ambientConstantInjectiveResolution X (AddCommGrpCat.of ℚ)).injective /-- The comparison fixes the prescribed rational constant augmentation exactly. -/ @[reassoc (attr := simp)] lemma constants_comp_singularToConstantInjectiveResolution : Singular.SheafCochain.constantsToSingularCochainSheafComplex ℚ X ≫ singularToConstantInjectiveResolution X hX = (AlgebraicTopology.Sheaf.OpenInjectiveResolution.TopCat.ambientConstantInjectiveResolution X (AddCommGrpCat.of ℚ)).ι := by let : Mono (Singular.SheafCochain.constantsToSingularCochainSheafComplex ℚ X) := Singular.SheafCochainResolution.constantsToSingularCochainSheafComplex_mono ℚ X let : QuasiIso (Singular.SheafCochain.constantsToSingularCochainSheafComplex ℚ X) := Singular.SheafCochainResolution.constantsToSingularCochainSheafComplex_quasiIso_of_contractibleOpenBasis ℚ hX exact AlgebraicTopology.Sheaf.OpenInjectiveTo.CochainComplex.comp_liftToInjectiveNat _ _ (AlgebraicTopology.Sheaf.OpenInjectiveResolution.TopCat.ambientConstantInjectiveResolution X (AddCommGrpCat.of ℚ)).injective instance singularToConstantInjectiveResolution_quasiIso : QuasiIso (singularToConstantInjectiveResolution X hX) := by let a := Singular.SheafCochain.constantsToSingularCochainSheafComplex ℚ X let : QuasiIso a := Singular.SheafCochainResolution.constantsToSingularCochainSheafComplex_quasiIso_of_contractibleOpenBasis ℚ hX have : QuasiIso (a ≫ singularToConstantInjectiveResolution X hX) := by rw [constants_comp_singularToConstantInjectiveResolution] exact (AlgebraicTopology.Sheaf.OpenInjectiveResolution.TopCat.ambientConstantInjectiveResolution X (AddCommGrpCat.of ℚ)).quasiIso exact quasiIso_of_comp_left a _ /-- Let `X` be a topological space with a basis of contractible open sets. This map from sheafified rational singular cochains to a chosen injective resolution of `ℚ_X` extends the identity on constant coefficients. Both complexes are indexed by integers and zero in negative degrees. -/ def singularToConstantInjectiveComplex : rationalSingularCochainComplex X ⟶ rationalConstantInjectiveComplex X := HomologicalComplex.extendMap (singularToConstantInjectiveResolution X hX) ComplexShape.embeddingUpNat instance singularToConstantInjectiveComplex_quasiIso : QuasiIso (singularToConstantInjectiveComplex X hX) := (HomologicalComplex.quasiIso_extendMap_iff _ _).mpr inferInstance /-- Let `X` be a topological space and `U ⊆ X` open. In each nonnegative degree, take the kernel of restriction of the sheafified rational singular cochains to `U`. These are the sheaf sections supported in the closed set `X \ U`. Singular coboundaries give the differentials, and negative-degree terms are zero. -/ def supportedRationalSingularCochainComplex (U : Opens X) : CochainComplex (TopCat.Sheaf AddCommGrpCat X) ℤ := -- `Γ_{X \ U}` applied to the sheaf complex of rational singular cochains. ((DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutside X U).mapHomologicalComplex ℤᵘᵖ).obj -- The sheaf complex `C^•_sing(-; ℚ)`. (rationalSingularCochainComplex X) /-- Let `X` have a basis of contractible open sets and let `U ⊆ X` be open. This map `Γ_{X \ U}(C^•) → Γ_{X \ U}(I^•)` restricts the augmentation-preserving comparison from sheafified rational singular cochains `C^•` to an injective resolution `I^•` of `ℚ_X` to the subsheaves of sections vanishing on `U`. -/ def supportedSingularToInjectiveComplex (U : Opens X) : supportedRationalSingularCochainComplex X U ⟶ ((DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutside X U).mapHomologicalComplex ℤᵘᵖ).obj (rationalConstantInjectiveComplex X) := ((DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutside X U).mapHomologicalComplex ℤᵘᵖ).map (singularToConstantInjectiveComplex X hX) variable [T2Space X] [∀ V : Opens X, ParacompactSpace V] instance rationalSingularCochainComplex_isFlasque (n : ℤ) : ((rationalSingularCochainComplex X).X n).IsFlasque := by apply AlgebraicTopology.Sheaf.FlasqueExtendNat.TopCat.extendNat_term_isFlasque intro m change (Singular.SheafCochain.singularCochainSheaf ℚ X m).IsFlasque infer_instance /-- Supported singular cochains compute the supported injective model, at the level of sheaf complexes. -/ instance supportedSingularToInjectiveComplex_quasiIso (U : Opens X) : QuasiIso (supportedSingularToInjectiveComplex X hX U) := FlasqueComparison.TopCat.Sheaf.sheafSectionsSupportedOutside_map_quasiIso_of_flasque X U (singularToConstantInjectiveComplex X hX) 0 0 (fun _ => inferInstance) (fun _ => inferInstance) end end OAI.AlgebraicTopology.Support.SingularFlasqueModel.Singular