/-
Copyright (c) 2024 Calle Sönne. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Calle Sönne, Paul Lezeau
-/
module
public import Mathlib.CategoryTheory.FiberedCategory.HomLift
/-!
# Fibers of functors
In this file we define, for a functor `p : ⥤ `, the fiber categories `Fiber p S` for every
`S : ` as follows
- An object in `Fiber p S` is a pair `(a, ha)` where `a : ` and `ha : p.obj a = S`.
- A morphism in `Fiber p S` is a morphism `φ : a ⟶ b` in such that `p.map φ = S`.
For any category `C` equipped with a functor `F : C ⥤ ` such that `F ⋙ p` is constant at `S`,
we define a functor `inducedFunctor : C ⥤ Fiber p S` that `F` factors through.
-/
@[expose] public section
universe v₁ u₁ v₂ u₂ v₃ u₃
namespace CategoryTheory
open IsHomLift
namespace Functor
variable { : Type u₁} { : Type u₂} [Category.{v₁} ] [Category.{v₂} ]
/-- `Fiber p S` is the type of elements of `` mapping to `S` via `p`. -/
def Fiber (p : ⥤ ) (S : ) := { a : // p.obj a = S }
namespace Fiber
variable {p : ⥤ } {S : }
/-- `Fiber p S` has the structure of a category with morphisms being those lying over ` S`. -/
instance fiberCategory : Category (Fiber p S) where
Hom a b := {φ : a.1 ⟶ b.1 // IsHomLift p ( S) φ}
id a := ⟨ a.1, IsHomLift.id a.2⟩
comp φ ψ := ⟨φ.val ≫ ψ.val, by have := φ.2; have := ψ.2; infer_instance⟩
/-- The functor including `Fiber p S` into ``. -/
def fiberInclusion : Fiber p S ⥤ where
obj a := a.1
map φ := φ.1
instance {a b : Fiber p S} (φ : a ⟶ b) : IsHomLift p ( S) (fiberInclusion.map φ) := φ.2
@[ext]
lemma hom_ext {a b : Fiber p S} {φ ψ : a ⟶ b}
(h : fiberInclusion.map φ = fiberInclusion.map ψ) : φ = ψ :=
Subtype.ext h
instance : (fiberInclusion : Fiber p S ⥤ _).Faithful where
lemma fiberInclusion_obj_inj : (fiberInclusion : Fiber p S ⥤ _).obj.Injective :=
fun _ _ f ↦ Subtype.val_inj.1 f
set_option backward.isDefEq.respectTransparency.types false in
/-- For fixed `S : ` this is the natural isomorphism between `fiberInclusion ⋙ p` and the constant
function valued at `S`. -/
@[simps!]
def fiberInclusionCompIsoConst : fiberInclusion ⋙ p ≅ (const (Fiber p S)).obj S :=
NatIso.ofComponents (fun X ↦ eqToIso X.2)
(fun φ ↦ by simp [IsHomLift.fac' p ( S) (fiberInclusion.map φ)])
lemma fiberInclusion_comp_eq_const : fiberInclusion ⋙ p = (const (Fiber p S)).obj S :=
Functor.ext_of_iso fiberInclusionCompIsoConst (fun x ↦ x.2)
/-- The object of the fiber over `S` corresponding to a `a : ` such that `p(a) = S`. -/
def mk {p : ⥤ } {S : } {a : } (ha : p.obj a = S) : Fiber p S := ⟨a, ha⟩
@[simp]
lemma fiberInclusion_mk {p : ⥤ } {S : } {a : } (ha : p.obj a = S) :
fiberInclusion.obj (mk ha) = a :=
rfl
set_option backward.isDefEq.respectTransparency false in
/-- The morphism in the fiber over `S` corresponding to a morphism in `` lifting ` S`. -/
def homMk (p : ⥤ ) (S : ) {a b : } (φ : a ⟶ b) [IsHomLift p ( S) φ] :
mk (domain_eq p ( S) φ) ⟶ mk (codomain_eq p ( S) φ) :=
⟨φ, inferInstance⟩
@[simp]
lemma fiberInclusion_homMk (p : ⥤ ) (S : ) {a b : } (φ : a ⟶ b) [IsHomLift p ( S) φ] :
fiberInclusion.map (homMk p S φ) = φ :=
rfl
@[simp]
lemma homMk_id (p : ⥤ ) (S : ) (a : ) [IsHomLift p ( S) ( a)] :
homMk p S ( a) = (mk (domain_eq p ( S) ( a))) :=
rfl
@[simp]
lemma homMk_comp {a b c : } (φ : a ⟶ b) (ψ : b ⟶ c) [IsHomLift p ( S) φ]
[IsHomLift p ( S) ψ] : homMk p S φ ≫ homMk p S ψ = homMk p S (φ ≫ ψ) :=
rfl
section
variable {p : ⥤ } {S : } {C : Type u₃} [Category.{v₃} C] {F : C ⥤ }
(hF : F ⋙ p = (const C).obj S)
/-- Given a functor `F : C ⥤ ` such that `F ⋙ p` is constant at some `S : `, then
we get an induced functor `C ⥤ Fiber p S` that `F` factors through. -/
def inducedFunctor : C ⥤ Fiber p S where
obj x := ⟨F.obj x, by simp only [← comp_obj, hF, const_obj_obj]⟩
map φ := ⟨F.map φ, of_commsq _ _ _ (congr_obj hF _) (congr_obj hF _) <|
by simpa using (eqToIso hF).hom.naturality φ⟩
/-- Given a functor `F : C ⥤ ` such that `F ⋙ p` is constant at some `S : `, then
we get a natural isomorphism between `inducedFunctor _ ⋙ fiberInclusion` and `F`. -/
@[simps!]
def inducedFunctorCompIsoSelf : (inducedFunctor hF) ⋙ fiberInclusion ≅ F := .refl _
lemma inducedFunctor_comp : (inducedFunctor hF) ⋙ fiberInclusion = F := rfl
@[simp]
lemma inducedFunctor_comp_obj (X : C) :
fiberInclusion.obj ((inducedFunctor hF).obj X) = F.obj X := rfl
@[simp]
lemma inducedFunctor_comp_map {X Y : C} (f : X ⟶ Y) :
fiberInclusion.map ((inducedFunctor hF).map f) = F.map f := rfl
end
end Fiber
end Functor
end CategoryTheory
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet am 2026-11-24)
¤
*© Formatika GbR, Deutschland