/- Copyright 2026 The Formal Conjectures Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. This file has been modified. -/ import Mathlib.CategoryTheory.Sites.ConstantSheaf import Mathlib.Topology.Sheaves.Abelian /-! # Constant -/ namespace OAI.AlgebraicTopology.Sheaf.Constant noncomputable section open _root_.TopCat open _root_.TopCat.Presheaf open _root_.TopCat.Sheaf /-! # Constant presheaves and sheaves of additive groups on a topological space `CategoryTheory.constantSheaf` sheafifies the constant presheaf on a site. This file specialises the constant presheaf and its sheafification to the site of open subsets of a topological space with values in additive groups. Each has notation for the two ways the value is given: as an object `A: AddCommGrpCat`, written `๐“’แต–[X; A]` and `๐“’[X; A]`, and as a type `R` carrying an `AddCommGroup` instance โ€” a field, a ring, `โ„ค` โ€” written `๐“’แต–(X; R)` and `๐“’(X; R)`. -/ open _root_.CategoryTheory _root_.TopologicalSpace universe u namespace TopCat.Presheaf variable (X : TopCat.{u}) /-- Let `X` be a topological space and `A` an abelian group. The constant presheaf assigns `A` to every open subset of `X`, including the empty set, and the identity homomorphism to every inclusion. -/ abbrev const (A : AddCommGrpCat.{u}) : TopCat.Presheaf AddCommGrpCat.{u} X := (Functor.const (Opens X)แต’แต–).obj A @[inherit_doc Constant.TopCat.Presheaf.const] notation3 "๐“’แต–[" X "; " A "]" => OAI.AlgebraicTopology.Sheaf.Constant.TopCat.Presheaf.const X A /-- The constant presheaf on `X` with value the additive group of `R`. -/ notation3 "๐“’แต–(" X "; " R ")" => OAI.AlgebraicTopology.Sheaf.Constant.TopCat.Presheaf.const X (AddCommGrpCat.of R) end TopCat.Presheaf namespace TopCat variable (X : TopCat.{u}) /-- Let `X` be a topological space. This functor sends an abelian group `A` to the sheaf of locally constant functions from open subsets of `X` to `A`, obtained by sheafifying the constant presheaf. Group homomorphisms act by postcomposition on these functions. -/ abbrev constantFunctor : AddCommGrpCat.{u} โฅค CategoryTheory.Sheaf (Opens.grothendieckTopology X) AddCommGrpCat.{u} := CategoryTheory.constantSheaf (Opens.grothendieckTopology X) AddCommGrpCat.{u} /-- Let `X` be a topological space and `A` an abelian group. The constant sheaf `A_X` assigns to each open `U` the group of locally constant functions `U โ†’ A`, with pointwise addition and restriction of functions. It is defined by sheafifying the constant presheaf. -/ abbrev const (A : AddCommGrpCat.{u}) : TopCat.Sheaf AddCommGrpCat.{u} X := (constantFunctor X).obj A @[inherit_doc Constant.TopCat.const] notation3 "๐“’[" X "; " A "]" => OAI.AlgebraicTopology.Sheaf.Constant.TopCat.const X A /-- The constant sheaf on `X` with value the additive group of `R`. -/ notation3 "๐“’(" X "; " R ")" => OAI.AlgebraicTopology.Sheaf.Constant.TopCat.const X (AddCommGrpCat.of R) end TopCat end end OAI.AlgebraicTopology.Sheaf.Constant