fact
stringlengths
6
3.84k
type
stringclasses
11 values
library
stringclasses
32 values
imports
listlengths
1
14
filename
stringlengths
20
95
symbolic_name
stringlengths
1
90
docstring
stringlengths
7
20k
@[simps] toTransport (x : Grothendieck F) {c : C} (t : x.base ⟶ c) : x ⟶ x.transport t := ⟨t, 𝟙 _⟩
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
toTransport
If `F : C ⥤ Cat` is a functor and `t : c ⟶ d` is a morphism in `C`, then `transport` maps each `c`-based element `x` of `Grothendieck F` to a `d`-based element `x.transport t`. `toTransport` is the morphism `x ⟶ x.transport t` induced by `t` and the identity on fibers.
@[simps] isoMk {X Y : Grothendieck F} (e₁ : X.base ≅ Y.base) (e₂ : (F.map e₁.hom).obj X.fiber ≅ Y.fiber) : X ≅ Y where hom := ⟨e₁.hom, e₂.hom⟩ inv := ⟨e₁.inv, (F.map e₁.inv).map e₂.inv ≫ eqToHom (Functor.congr_obj (F.mapIso e₁).hom_inv_id X.fiber)⟩ hom_inv_id := Grothendieck.ext _ _ (by simp) (by simp) inv_hom_id := Grothendieck.ext _ _ (by simp) (by have := Functor.congr_hom (F.mapIso e₁).inv_hom_id e₂.inv dsimp at this simp [this])
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
isoMk
Construct an isomorphism in a Grothendieck construction from isomorphisms in its base and fiber.
@[simps!] transportIso (x : Grothendieck F) {c : C} (α : x.base ≅ c) : x.transport α.hom ≅ x := (isoMk α (Iso.refl _)).symm
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
transportIso
If `F : C ⥤ Cat` and `x : Grothendieck F`, then every `C`-isomorphism `α : x.base ≅ c` induces an isomorphism between `x` and its transport along `α`
@[simps!] forget : Grothendieck F ⥤ C where obj X := X.1 map f := f.1
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
forget
The forgetful functor from `Grothendieck F` to the source category.
@[simps!] map (α : F ⟶ G) : Grothendieck F ⥤ Grothendieck G where obj X := { base := X.base fiber := (α.app X.base).obj X.fiber } map {X Y} f := { base := f.base fiber := (eqToHom (α.naturality f.base).symm).app X.fiber ≫ (α.app Y.base).map f.fiber } map_id X := by simp only [Cat.eqToHom_app, id_fiber, eqToHom_map, eqToHom_trans]; rfl map_comp {X Y Z} f g := by dsimp congr 1 simp only [← Category.assoc, Functor.map_comp, eqToHom_map] congr 1 simp only [Cat.eqToHom_app, Cat.comp_obj, eqToHom_trans, eqToHom_map, Category.assoc, ← Cat.comp_map] rw [Functor.congr_hom (α.naturality g.base).symm f.fiber] simp
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
map
The Grothendieck construction is functorial: a natural transformation `α : F ⟶ G` induces a functor `Grothendieck.map : Grothendieck F ⥤ Grothendieck G`.
map_obj {α : F ⟶ G} (X : Grothendieck F) : (Grothendieck.map α).obj X = ⟨X.base, (α.app X.base).obj X.fiber⟩ := rfl
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
map_obj
null
map_map {α : F ⟶ G} {X Y : Grothendieck F} {f : X ⟶ Y} : (Grothendieck.map α).map f = ⟨f.base, (eqToHom (α.naturality f.base).symm).app X.fiber ≫ (α.app Y.base).map f.fiber⟩ := rfl
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
map_map
null
functor_comp_forget {α : F ⟶ G} : Grothendieck.map α ⋙ Grothendieck.forget G = Grothendieck.forget F := rfl
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
functor_comp_forget
The functor `Grothendieck.map α : Grothendieck F ⥤ Grothendieck G` lies over `C`.
map_id_eq : map (𝟙 F) = 𝟙 (Cat.of <| Grothendieck <| F) := by fapply Functor.ext · intro X rfl · intro X Y f simp [map_map] rfl
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
map_id_eq
null
mapIdIso : map (𝟙 F) ≅ 𝟙 (Cat.of <| Grothendieck <| F) := eqToIso map_id_eq variable {H : C ⥤ Cat}
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
mapIdIso
Making the equality of functors into an isomorphism. Note: we should avoid equality of functors if possible, and we should prefer `mapIdIso` to `map_id_eq` whenever we can.
map_comp_eq (α : F ⟶ G) (β : G ⟶ H) : map (α ≫ β) = map α ⋙ map β := by fapply Functor.ext · intro X rfl · intro X Y f simp only [map_map, map_obj_base, NatTrans.comp_app, Cat.comp_obj, Cat.comp_map, eqToHom_refl, Functor.comp_map, Functor.map_comp, Category.comp_id, Category.id_comp] fapply Grothendieck.ext · rfl · simp
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
map_comp_eq
null
mapCompIso (α : F ⟶ G) (β : G ⟶ H) : map (α ≫ β) ≅ map α ⋙ map β := eqToIso (map_comp_eq α β) variable (F)
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
mapCompIso
Making the equality of functors into an isomorphism. Note: we should avoid equality of functors if possible, and we should prefer `map_comp_iso` to `map_comp_eq` whenever we can.
@[simps] compAsSmallFunctorEquivalenceInverse : Grothendieck F ⥤ Grothendieck (F ⋙ Cat.asSmallFunctor.{w}) where obj X := ⟨X.base, AsSmall.up.obj X.fiber⟩ map f := ⟨f.base, AsSmall.up.map f.fiber⟩
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
compAsSmallFunctorEquivalenceInverse
The inverse functor to build the equivalence `compAsSmallFunctorEquivalence`.
@[simps] compAsSmallFunctorEquivalenceFunctor : Grothendieck (F ⋙ Cat.asSmallFunctor.{w}) ⥤ Grothendieck F where obj X := ⟨X.base, AsSmall.down.obj X.fiber⟩ map f := ⟨f.base, AsSmall.down.map f.fiber⟩ map_id _ := by apply Grothendieck.ext <;> simp map_comp _ _ := by apply Grothendieck.ext <;> simp [down_comp]
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
compAsSmallFunctorEquivalenceFunctor
The functor to build the equivalence `compAsSmallFunctorEquivalence`.
@[simps] compAsSmallFunctorEquivalence : Grothendieck (F ⋙ Cat.asSmallFunctor.{w}) ≌ Grothendieck F where functor := compAsSmallFunctorEquivalenceFunctor F inverse := compAsSmallFunctorEquivalenceInverse F counitIso := Iso.refl _ unitIso := Iso.refl _ variable {F} in
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
compAsSmallFunctorEquivalence
Taking the Grothendieck construction on `F ⋙ asSmallFunctor`, where `asSmallFunctor : Cat ⥤ Cat` is the functor which turns each category into a small category of a (potentially) larger universe, is equivalent to the Grothendieck construction on `F` itself.
mapWhiskerRightAsSmallFunctor (α : F ⟶ G) : map (whiskerRight α Cat.asSmallFunctor.{w}) ≅ (compAsSmallFunctorEquivalence F).functor ⋙ map α ⋙ (compAsSmallFunctorEquivalence G).inverse := NatIso.ofComponents (fun X => Iso.refl _) (fun f => by fapply Grothendieck.ext · simp [compAsSmallFunctorEquivalenceInverse] · simp only [compAsSmallFunctorEquivalence_functor, compAsSmallFunctorEquivalence_inverse, Functor.comp_obj, compAsSmallFunctorEquivalenceInverse_obj_base, map_obj_base, compAsSmallFunctorEquivalenceFunctor_obj_base, Cat.asSmallFunctor_obj, Cat.of_α, Iso.refl_hom, Functor.comp_map, comp_base, id_base, compAsSmallFunctorEquivalenceInverse_map_base, map_map_base, compAsSmallFunctorEquivalenceFunctor_map_base, Cat.asSmallFunctor_map, map_obj_fiber, whiskerRight_app, AsSmall.down_obj, AsSmall.up_obj_down, compAsSmallFunctorEquivalenceInverse_obj_fiber, compAsSmallFunctorEquivalenceFunctor_obj_fiber, comp_fiber, map_map_fiber, AsSmall.down_map, down_comp, eqToHom_down, AsSmall.up_map_down, Functor.map_comp, eqToHom_map, id_fiber, Category.assoc, eqToHom_trans_assoc, compAsSmallFunctorEquivalenceInverse_map_fiber, compAsSmallFunctorEquivalenceFunctor_map_fiber, eqToHom_comp_iff, comp_eqToHom_iff] simp only [conj_eqToHom_iff_heq'] rw [G.map_id] simp )
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
mapWhiskerRightAsSmallFunctor
Mapping a Grothendieck construction along the whiskering of any natural transformation `α : F ⟶ G` with the functor `asSmallFunctor : Cat ⥤ Cat` is naturally isomorphic to conjugating `map α` with the equivalence between `Grothendieck (F ⋙ asSmallFunctor)` and `Grothendieck F`.
functor {E : Cat.{v, u}} : (E ⥤ Cat.{v,u}) ⥤ Over (T := Cat.{v,u}) E where obj F := Over.mk (X := E) (Y := Cat.of (Grothendieck F)) (Grothendieck.forget F) map {_ _} α := Over.homMk (X:= E) (Grothendieck.map α) Grothendieck.functor_comp_forget map_id F := by ext exact Grothendieck.map_id_eq (F := F) map_comp α β := by simp [Grothendieck.map_comp_eq α β] rfl variable (G : C ⥤ Type w)
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
functor
The Grothendieck construction as a functor from the functor category `E ⥤ Cat` to the over category `Over E`.
@[simps!] grothendieckTypeToCatFunctor : Grothendieck (G ⋙ typeToCat) ⥤ G.Elements where obj X := ⟨X.1, X.2.as⟩ map f := ⟨f.1, f.2.1.1⟩
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
grothendieckTypeToCatFunctor
Auxiliary definition for `grothendieckTypeToCat`, to speed up elaboration.
@[simps!] grothendieckTypeToCatInverse : G.Elements ⥤ Grothendieck (G ⋙ typeToCat) where obj X := ⟨X.1, ⟨X.2⟩⟩ map f := ⟨f.1, ⟨⟨f.2⟩⟩⟩
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
grothendieckTypeToCatInverse
Auxiliary definition for `grothendieckTypeToCat`, to speed up elaboration.
@[simps!] grothendieckTypeToCat : Grothendieck (G ⋙ typeToCat) ≌ G.Elements where functor := grothendieckTypeToCatFunctor G inverse := grothendieckTypeToCatInverse G unitIso := NatIso.ofComponents (fun X => by rcases X with ⟨_, ⟨⟩⟩ exact Iso.refl _) (by rintro ⟨_, ⟨⟩⟩ ⟨_, ⟨⟩⟩ ⟨base, ⟨⟨f⟩⟩⟩ dsimp at * simp rfl) counitIso := NatIso.ofComponents (fun X => by cases X exact Iso.refl _) (by rintro ⟨⟩ ⟨⟩ ⟨f, e⟩ dsimp at * simp rfl) functor_unitIso_comp := by rintro ⟨_, ⟨⟩⟩ simp rfl
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
grothendieckTypeToCat
The Grothendieck construction applied to a functor to `Type` (thought of as a functor to `Cat` by realising a type as a discrete category) is the same as the 'category of elements' construction.
@[simps] pre (G : D ⥤ C) : Grothendieck (G ⋙ F) ⥤ Grothendieck F where obj X := ⟨G.obj X.base, X.fiber⟩ map f := ⟨G.map f.base, f.fiber⟩ map_id X := Grothendieck.ext _ _ (G.map_id _) (by simp) map_comp f g := Grothendieck.ext _ _ (G.map_comp _ _) (by simp) @[simp]
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
pre
Applying a functor `G : D ⥤ C` to the base of the Grothendieck construction induces a functor `Grothendieck (G ⋙ F) ⥤ Grothendieck F`.
pre_id : pre F (𝟭 C) = 𝟭 _ := rfl
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
pre_id
null
preNatIso {G H : D ⥤ C} (α : G ≅ H) : pre F G ≅ map (whiskerRight α.hom F) ⋙ (pre F H) := NatIso.ofComponents (fun X => (transportIso ⟨G.obj X.base, X.fiber⟩ (α.app X.base)).symm) (fun f => by fapply Grothendieck.ext <;> simp)
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
preNatIso
An natural isomorphism between functors `G ≅ H` induces a natural isomorphism between the canonical morphism `pre F G` and `pre F H`, up to composition with `Grothendieck (G ⋙ F) ⥤ Grothendieck (H ⋙ F)`.
preInv (G : D ≌ C) : Grothendieck F ⥤ Grothendieck (G.functor ⋙ F) := map (whiskerRight G.counitInv F) ⋙ Grothendieck.pre (G.functor ⋙ F) G.inverse variable {F} in
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
preInv
Given an equivalence of categories `G`, `preInv _ G` is the (weak) inverse of the `pre _ G.functor`.
pre_comp_map (G : D ⥤ C) {H : C ⥤ Cat} (α : F ⟶ H) : pre F G ⋙ map α = map (whiskerLeft G α) ⋙ pre H G := rfl variable {F} in
lemma
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
pre_comp_map
null
pre_comp_map_assoc (G : D ⥤ C) {H : C ⥤ Cat} (α : F ⟶ H) {E : Type*} [Category E] (K : Grothendieck H ⥤ E) : pre F G ⋙ map α ⋙ K= map (whiskerLeft G α) ⋙ pre H G ⋙ K := rfl variable {E : Type*} [Category E] in @[simp]
lemma
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
pre_comp_map_assoc
null
pre_comp (G : D ⥤ C) (H : E ⥤ D) : pre F (H ⋙ G) = pre (G ⋙ F) H ⋙ pre F G := rfl
lemma
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
pre_comp
null
protected preUnitIso (G : D ≌ C) : map (whiskerRight G.unitInv _) ≅ pre (G.functor ⋙ F) (G.functor ⋙ G.inverse) := preNatIso _ G.unitIso.symm |>.symm
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
preUnitIso
Let `G` be an equivalence of categories. The functor induced via `pre` by `G.functor ⋙ G.inverse` is naturally isomorphic to the functor induced via `map` by a whiskered version of `G`'s inverse unit.
preEquivalence (G : D ≌ C) : Grothendieck (G.functor ⋙ F) ≌ Grothendieck F where functor := pre F G.functor inverse := preInv F G unitIso := by refine (eqToIso ?_) ≪≫ (Grothendieck.preUnitIso F G |> isoWhiskerLeft (map _)) ≪≫ (pre_comp_map_assoc G.functor _ _ |> Eq.symm |> eqToIso) calc _ = map (𝟙 _) := map_id_eq.symm _ = map _ := ?_ _ = map _ ⋙ map _ := map_comp_eq _ _ congr; ext X simp only [Functor.comp_obj, Functor.comp_map, ← Functor.map_comp, Functor.id_obj, Functor.map_id, NatTrans.comp_app, NatTrans.id_app, whiskerLeft_app, whiskerRight_app, Equivalence.counitInv_functor_comp] counitIso := preNatIso F G.counitIso.symm |>.symm functor_unitIso_comp := by intro X simp only [preInv, Grothendieck.preUnitIso, pre_id, Iso.trans_hom, eqToIso.hom, eqToHom_app, eqToHom_refl, isoWhiskerLeft_hom, NatTrans.comp_app] fapply Grothendieck.ext <;> simp [preNatIso, transportIso] variable {F} in
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
preEquivalence
Given a functor `F : C ⥤ Cat` and an equivalence of categories `G : D ≌ C`, the functor `pre F G.functor` is an equivalence between `Grothendieck (G.functor ⋙ F)` and `Grothendieck F`.
mapWhiskerLeftIsoConjPreMap {F' : C ⥤ Cat} (G : D ≌ C) (α : F ⟶ F') : map (whiskerLeft G.functor α) ≅ (preEquivalence F G).functor ⋙ map α ⋙ (preEquivalence F' G).inverse := (Functor.rightUnitor _).symm ≪≫ isoWhiskerLeft _ (preEquivalence F' G).unitIso
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
mapWhiskerLeftIsoConjPreMap
Let `F, F' : C ⥤ Cat` be functor, `G : D ≌ C` an equivalence and `α : F ⟶ F'` a natural transformation. Left-whiskering `α` by `G` and then taking the Grothendieck construction is, up to isomorphism, the same as taking the Grothendieck construction of `α` and using the equivalences `pre F G` and `pre F' G` to match the expected type: ``` Grothendieck (G.functor ⋙ F) ≌ Grothendieck F ⥤ Grothendieck F' ≌ Grothendieck (G.functor ⋙ F') ```
@[simps obj map] ι (c : C) : F.obj c ⥤ Grothendieck F where obj d := ⟨c, d⟩ map f := ⟨𝟙 _, eqToHom (by simp) ≫ f⟩ map_id d := by dsimp congr simp only [Category.comp_id] map_comp f g := by apply Grothendieck.ext _ _ (by simp) simp only [comp_base, ← Category.assoc, eqToHom_trans, comp_fiber, Functor.map_comp, eqToHom_map] congr 1 simp only [eqToHom_comp_iff, Category.assoc, eqToHom_trans_assoc] apply Functor.congr_hom (F.map_id _).symm
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
ι
The inclusion of a fiber `F.obj c` of a functor `F : C ⥤ Cat` into its Grothendieck construction.
faithful_ι (c : C) : (ι F c).Faithful where map_injective f := by injection f with _ f rwa [cancel_epi] at f
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
faithful_ι
null
@[simps] ιNatTrans {X Y : C} (f : X ⟶ Y) : ι F X ⟶ F.map f ⋙ ι F Y where app d := ⟨f, 𝟙 _⟩ naturality _ _ _ := by simp only [ι, Functor.comp_obj, Functor.comp_map] exact Grothendieck.ext _ _ (by simp) (by simp [eqToHom_map]) variable (fib : ∀ c, F.obj c ⥤ E) (hom : ∀ {c c' : C} (f : c ⟶ c'), fib c ⟶ F.map f ⋙ fib c') variable (hom_id : ∀ c, hom (𝟙 c) = eqToHom (by simp only [Functor.map_id]; rfl)) variable (hom_comp : ∀ c₁ c₂ c₃ (f : c₁ ⟶ c₂) (g : c₂ ⟶ c₃), hom (f ≫ g) = hom f ≫ whiskerLeft (F.map f) (hom g) ≫ eqToHom (by simp only [Functor.map_comp]; rfl))
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
ιNatTrans
Every morphism `f : X ⟶ Y` in the base category induces a natural transformation from the fiber inclusion `ι F X` to the composition `F.map f ⋙ ι F Y`.
@[simps] functorFrom : Grothendieck F ⥤ E where obj X := (fib X.base).obj X.fiber map {X Y} f := (hom f.base).app X.fiber ≫ (fib Y.base).map f.fiber map_id X := by simp [hom_id] map_comp f g := by simp [hom_comp]
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
functorFrom
Construct a functor from `Grothendieck F` to another category `E` by providing a family of functors on the fibers of `Grothendieck F`, a family of natural transformations on morphisms in the base of `Grothendieck F` and coherence data for this family of natural transformations.
ιCompFunctorFrom (c : C) : ι F c ⋙ (functorFrom fib hom hom_id hom_comp) ≅ fib c := NatIso.ofComponents (fun _ => Iso.refl _) (fun f => by simp [hom_id])
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
ιCompFunctorFrom
`Grothendieck.ι F c` composed with `Grothendieck.functorFrom` is isomorphic a functor on a fiber on `F` supplied as the first argument to `Grothendieck.functorFrom`.
@[simps!] ιCompMap {F' : C ⥤ Cat} (α : F ⟶ F') (c : C) : ι F c ⋙ map α ≅ α.app c ⋙ ι F' c := NatIso.ofComponents (fun X => Iso.refl _) (fun f => by simp [map])
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.Cat.AsSmall", "Mathlib.CategoryTheory.Elements", "Mathlib.CategoryTheory.Comma.Over.Basic" ]
Mathlib/CategoryTheory/Grothendieck.lean
ιCompMap
The fiber inclusion `ι F c` composed with `map α` is isomorphic to `α.app c ⋙ ι F' c`.
Groupoid (obj : Type u) : Type max u (v + 1) extends Category.{v} obj where /-- The inverse morphism -/ inv : ∀ {X Y : obj}, (X ⟶ Y) → (Y ⟶ X) /-- `inv f` composed `f` is the identity -/ inv_comp : ∀ {X Y : obj} (f : X ⟶ Y), comp (inv f) f = id Y := by cat_disch /-- `f` composed with `inv f` is the identity -/ comp_inv : ∀ {X Y : obj} (f : X ⟶ Y), comp f (inv f) = id X := by cat_disch initialize_simps_projections Groupoid (-Hom)
class
CategoryTheory
[ "Mathlib.CategoryTheory.ObjectProperty.FullSubcategory", "Mathlib.CategoryTheory.Products.Basic", "Mathlib.CategoryTheory.Pi.Basic", "Mathlib.CategoryTheory.Category.Basic", "Mathlib.Combinatorics.Quiver.Symmetric", "Mathlib.CategoryTheory.Functor.ReflectsIso.Basic" ]
Mathlib/CategoryTheory/Groupoid.lean
Groupoid
A `Groupoid` is a category such that all morphisms are isomorphisms.
LargeGroupoid (C : Type (u + 1)) : Type (u + 1) := Groupoid.{u} C
abbrev
CategoryTheory
[ "Mathlib.CategoryTheory.ObjectProperty.FullSubcategory", "Mathlib.CategoryTheory.Products.Basic", "Mathlib.CategoryTheory.Pi.Basic", "Mathlib.CategoryTheory.Category.Basic", "Mathlib.Combinatorics.Quiver.Symmetric", "Mathlib.CategoryTheory.Functor.ReflectsIso.Basic" ]
Mathlib/CategoryTheory/Groupoid.lean
LargeGroupoid
A `LargeGroupoid` is a groupoid where the objects live in `Type (u+1)` while the morphisms live in `Type u`.
SmallGroupoid (C : Type u) : Type (u + 1) := Groupoid.{u} C
abbrev
CategoryTheory
[ "Mathlib.CategoryTheory.ObjectProperty.FullSubcategory", "Mathlib.CategoryTheory.Products.Basic", "Mathlib.CategoryTheory.Pi.Basic", "Mathlib.CategoryTheory.Category.Basic", "Mathlib.Combinatorics.Quiver.Symmetric", "Mathlib.CategoryTheory.Functor.ReflectsIso.Basic" ]
Mathlib/CategoryTheory/Groupoid.lean
SmallGroupoid
A `SmallGroupoid` is a groupoid where the objects and morphisms live in the same universe.
@[simp] Groupoid.inv_eq_inv (f : X ⟶ Y) : Groupoid.inv f = CategoryTheory.inv f := IsIso.eq_inv_of_hom_inv_id <| Groupoid.comp_inv f
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.ObjectProperty.FullSubcategory", "Mathlib.CategoryTheory.Products.Basic", "Mathlib.CategoryTheory.Pi.Basic", "Mathlib.CategoryTheory.Category.Basic", "Mathlib.Combinatorics.Quiver.Symmetric", "Mathlib.CategoryTheory.Functor.ReflectsIso.Basic" ]
Mathlib/CategoryTheory/Groupoid.lean
Groupoid.inv_eq_inv
null
@[simps] Groupoid.invEquiv : (X ⟶ Y) ≃ (Y ⟶ X) := ⟨Groupoid.inv, Groupoid.inv, fun f => by simp, fun f => by simp⟩
def
CategoryTheory
[ "Mathlib.CategoryTheory.ObjectProperty.FullSubcategory", "Mathlib.CategoryTheory.Products.Basic", "Mathlib.CategoryTheory.Pi.Basic", "Mathlib.CategoryTheory.Category.Basic", "Mathlib.Combinatorics.Quiver.Symmetric", "Mathlib.CategoryTheory.Functor.ReflectsIso.Basic" ]
Mathlib/CategoryTheory/Groupoid.lean
Groupoid.invEquiv
`Groupoid.inv` is involutive.
@[simp] Groupoid.reverse_eq_inv (f : X ⟶ Y) : Quiver.reverse f = Groupoid.inv f := rfl
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.ObjectProperty.FullSubcategory", "Mathlib.CategoryTheory.Products.Basic", "Mathlib.CategoryTheory.Pi.Basic", "Mathlib.CategoryTheory.Category.Basic", "Mathlib.Combinatorics.Quiver.Symmetric", "Mathlib.CategoryTheory.Functor.ReflectsIso.Basic" ]
Mathlib/CategoryTheory/Groupoid.lean
Groupoid.reverse_eq_inv
null
functorMapReverse {D : Type*} [Groupoid D] (F : C ⥤ D) : F.toPrefunctor.MapReverse where map_reverse' f := by simp variable (X Y)
instance
CategoryTheory
[ "Mathlib.CategoryTheory.ObjectProperty.FullSubcategory", "Mathlib.CategoryTheory.Products.Basic", "Mathlib.CategoryTheory.Pi.Basic", "Mathlib.CategoryTheory.Category.Basic", "Mathlib.Combinatorics.Quiver.Symmetric", "Mathlib.CategoryTheory.Functor.ReflectsIso.Basic" ]
Mathlib/CategoryTheory/Groupoid.lean
functorMapReverse
null
@[simps!] Groupoid.isoEquivHom : (X ≅ Y) ≃ (X ⟶ Y) where toFun := Iso.hom invFun f := ⟨f, Groupoid.inv f, (by simp), (by simp)⟩ variable (C)
def
CategoryTheory
[ "Mathlib.CategoryTheory.ObjectProperty.FullSubcategory", "Mathlib.CategoryTheory.Products.Basic", "Mathlib.CategoryTheory.Pi.Basic", "Mathlib.CategoryTheory.Category.Basic", "Mathlib.Combinatorics.Quiver.Symmetric", "Mathlib.CategoryTheory.Functor.ReflectsIso.Basic" ]
Mathlib/CategoryTheory/Groupoid.lean
Groupoid.isoEquivHom
In a groupoid, isomorphisms are equivalent to morphisms.
@[simps] noncomputable Groupoid.invFunctor : C ⥤ Cᵒᵖ where obj := Opposite.op map {_ _} f := (inv f).op
def
CategoryTheory
[ "Mathlib.CategoryTheory.ObjectProperty.FullSubcategory", "Mathlib.CategoryTheory.Products.Basic", "Mathlib.CategoryTheory.Pi.Basic", "Mathlib.CategoryTheory.Category.Basic", "Mathlib.Combinatorics.Quiver.Symmetric", "Mathlib.CategoryTheory.Functor.ReflectsIso.Basic" ]
Mathlib/CategoryTheory/Groupoid.lean
Groupoid.invFunctor
The functor from a groupoid `C` to its opposite sending every morphism to its inverse.
IsGroupoid (C : Type u) [Category.{v} C] : Prop where all_isIso {X Y : C} (f : X ⟶ Y) : IsIso f := by infer_instance attribute [instance] IsGroupoid.all_isIso
class
CategoryTheory
[ "Mathlib.CategoryTheory.ObjectProperty.FullSubcategory", "Mathlib.CategoryTheory.Products.Basic", "Mathlib.CategoryTheory.Pi.Basic", "Mathlib.CategoryTheory.Category.Basic", "Mathlib.Combinatorics.Quiver.Symmetric", "Mathlib.CategoryTheory.Functor.ReflectsIso.Basic" ]
Mathlib/CategoryTheory/Groupoid.lean
IsGroupoid
A Prop-valued typeclass asserting that a given category is a groupoid.
noncomputable Groupoid.ofIsGroupoid [IsGroupoid C] : Groupoid.{v} C where inv := fun f => CategoryTheory.inv f
def
CategoryTheory
[ "Mathlib.CategoryTheory.ObjectProperty.FullSubcategory", "Mathlib.CategoryTheory.Products.Basic", "Mathlib.CategoryTheory.Pi.Basic", "Mathlib.CategoryTheory.Category.Basic", "Mathlib.Combinatorics.Quiver.Symmetric", "Mathlib.CategoryTheory.Functor.ReflectsIso.Basic" ]
Mathlib/CategoryTheory/Groupoid.lean
Groupoid.ofIsGroupoid
Promote (noncomputably) an `IsGroupoid` to a `Groupoid` structure.
noncomputable Groupoid.ofIsIso (all_is_iso : ∀ {X Y : C} (f : X ⟶ Y), IsIso f) : Groupoid.{v} C where inv := fun f => CategoryTheory.inv f inv_comp := fun f => Classical.choose_spec (all_is_iso f).out|>.right
def
CategoryTheory
[ "Mathlib.CategoryTheory.ObjectProperty.FullSubcategory", "Mathlib.CategoryTheory.Products.Basic", "Mathlib.CategoryTheory.Pi.Basic", "Mathlib.CategoryTheory.Category.Basic", "Mathlib.Combinatorics.Quiver.Symmetric", "Mathlib.CategoryTheory.Functor.ReflectsIso.Basic" ]
Mathlib/CategoryTheory/Groupoid.lean
Groupoid.ofIsIso
A category where every morphism `IsIso` is a groupoid.
Groupoid.ofHomUnique (all_unique : ∀ {X Y : C}, Unique (X ⟶ Y)) : Groupoid.{v} C where inv _ := all_unique.default
def
CategoryTheory
[ "Mathlib.CategoryTheory.ObjectProperty.FullSubcategory", "Mathlib.CategoryTheory.Products.Basic", "Mathlib.CategoryTheory.Pi.Basic", "Mathlib.CategoryTheory.Category.Basic", "Mathlib.Combinatorics.Quiver.Symmetric", "Mathlib.CategoryTheory.Functor.ReflectsIso.Basic" ]
Mathlib/CategoryTheory/Groupoid.lean
Groupoid.ofHomUnique
A category with a unique morphism between any two objects is a groupoid
isGroupoid_of_reflects_iso {C D : Type*} [Category C] [Category D] (F : C ⥤ D) [F.ReflectsIsomorphisms] [IsGroupoid D] : IsGroupoid C where all_isIso _ := isIso_of_reflects_iso _ F
lemma
CategoryTheory
[ "Mathlib.CategoryTheory.ObjectProperty.FullSubcategory", "Mathlib.CategoryTheory.Products.Basic", "Mathlib.CategoryTheory.Pi.Basic", "Mathlib.CategoryTheory.Category.Basic", "Mathlib.Combinatorics.Quiver.Symmetric", "Mathlib.CategoryTheory.Functor.ReflectsIso.Basic" ]
Mathlib/CategoryTheory/Groupoid.lean
isGroupoid_of_reflects_iso
null
Groupoid.ofFullyFaithfulToGroupoid {C : Type*} [𝒞 : Category C] {D : Type u} [Groupoid.{v} D] (F : C ⥤ D) (h : F.FullyFaithful) : Groupoid C := { 𝒞 with inv f := h.preimage <| Groupoid.inv (F.map f) inv_comp f := by apply h.map_injective simp comp_inv f := by apply h.map_injective simp }
def
CategoryTheory
[ "Mathlib.CategoryTheory.ObjectProperty.FullSubcategory", "Mathlib.CategoryTheory.Products.Basic", "Mathlib.CategoryTheory.Pi.Basic", "Mathlib.CategoryTheory.Category.Basic", "Mathlib.Combinatorics.Quiver.Symmetric", "Mathlib.CategoryTheory.Functor.ReflectsIso.Basic" ]
Mathlib/CategoryTheory/Groupoid.lean
Groupoid.ofFullyFaithfulToGroupoid
A category equipped with a fully faithful functor to a groupoid is fully faithful
InducedCategory.groupoid {C : Type u} (D : Type u₂) [Groupoid.{v} D] (F : C → D) : Groupoid.{v} (InducedCategory D F) := Groupoid.ofFullyFaithfulToGroupoid (inducedFunctor F) (fullyFaithfulInducedFunctor F)
instance
CategoryTheory
[ "Mathlib.CategoryTheory.ObjectProperty.FullSubcategory", "Mathlib.CategoryTheory.Products.Basic", "Mathlib.CategoryTheory.Pi.Basic", "Mathlib.CategoryTheory.Category.Basic", "Mathlib.Combinatorics.Quiver.Symmetric", "Mathlib.CategoryTheory.Functor.ReflectsIso.Basic" ]
Mathlib/CategoryTheory/Groupoid.lean
InducedCategory.groupoid
null
InducedCategory.isGroupoid {C : Type u} (D : Type u₂) [Category.{v} D] [IsGroupoid D] (F : C → D) : IsGroupoid (InducedCategory D F) := isGroupoid_of_reflects_iso (inducedFunctor F)
instance
CategoryTheory
[ "Mathlib.CategoryTheory.ObjectProperty.FullSubcategory", "Mathlib.CategoryTheory.Products.Basic", "Mathlib.CategoryTheory.Pi.Basic", "Mathlib.CategoryTheory.Category.Basic", "Mathlib.Combinatorics.Quiver.Symmetric", "Mathlib.CategoryTheory.Functor.ReflectsIso.Basic" ]
Mathlib/CategoryTheory/Groupoid.lean
InducedCategory.isGroupoid
null
groupoidPi {I : Type u} {J : I → Type u₂} [∀ i, Groupoid.{v} (J i)] : Groupoid.{max u v} (∀ i : I, J i) where inv f := fun i : I => Groupoid.inv (f i) comp_inv := fun f => by funext i; apply Groupoid.comp_inv inv_comp := fun f => by funext i; apply Groupoid.inv_comp
instance
CategoryTheory
[ "Mathlib.CategoryTheory.ObjectProperty.FullSubcategory", "Mathlib.CategoryTheory.Products.Basic", "Mathlib.CategoryTheory.Pi.Basic", "Mathlib.CategoryTheory.Category.Basic", "Mathlib.Combinatorics.Quiver.Symmetric", "Mathlib.CategoryTheory.Functor.ReflectsIso.Basic" ]
Mathlib/CategoryTheory/Groupoid.lean
groupoidPi
null
groupoidProd {α : Type u} {β : Type v} [Groupoid.{u₂} α] [Groupoid.{v₂} β] : Groupoid.{max u₂ v₂} (α × β) where inv f := (Groupoid.inv f.1, Groupoid.inv f.2)
instance
CategoryTheory
[ "Mathlib.CategoryTheory.ObjectProperty.FullSubcategory", "Mathlib.CategoryTheory.Products.Basic", "Mathlib.CategoryTheory.Pi.Basic", "Mathlib.CategoryTheory.Category.Basic", "Mathlib.Combinatorics.Quiver.Symmetric", "Mathlib.CategoryTheory.Functor.ReflectsIso.Basic" ]
Mathlib/CategoryTheory/Groupoid.lean
groupoidProd
null
isGroupoidPi {I : Type u} {J : I → Type u₂} [∀ i, Category.{v} (J i)] [∀ i, IsGroupoid (J i)] : IsGroupoid (∀ i : I, J i) where all_isIso f := (isIso_pi_iff f).mpr (fun _ ↦ inferInstance)
instance
CategoryTheory
[ "Mathlib.CategoryTheory.ObjectProperty.FullSubcategory", "Mathlib.CategoryTheory.Products.Basic", "Mathlib.CategoryTheory.Pi.Basic", "Mathlib.CategoryTheory.Category.Basic", "Mathlib.Combinatorics.Quiver.Symmetric", "Mathlib.CategoryTheory.Functor.ReflectsIso.Basic" ]
Mathlib/CategoryTheory/Groupoid.lean
isGroupoidPi
null
isGroupoidProd {α : Type u} {β : Type u₂} [Category.{v} α] [Category.{v₂} β] [IsGroupoid α] [IsGroupoid β] : IsGroupoid (α × β) where all_isIso f := (isIso_prod_iff (f := f)).mpr ⟨inferInstance, inferInstance⟩
instance
CategoryTheory
[ "Mathlib.CategoryTheory.ObjectProperty.FullSubcategory", "Mathlib.CategoryTheory.Products.Basic", "Mathlib.CategoryTheory.Pi.Basic", "Mathlib.CategoryTheory.Category.Basic", "Mathlib.Combinatorics.Quiver.Symmetric", "Mathlib.CategoryTheory.Functor.ReflectsIso.Basic" ]
Mathlib/CategoryTheory/Groupoid.lean
isGroupoidProd
null
@[simps] homCongr {X Y X₁ Y₁ : C} (α : X ≅ X₁) (β : Y ≅ Y₁) : (X ⟶ Y) ≃ (X₁ ⟶ Y₁) where toFun f := α.inv ≫ f ≫ β.hom invFun f := α.hom ≫ f ≫ β.inv left_inv f := show α.hom ≫ (α.inv ≫ f ≫ β.hom) ≫ β.inv = f by rw [Category.assoc, Category.assoc, β.hom_inv_id, α.hom_inv_id_assoc, Category.comp_id] right_inv f := show α.inv ≫ (α.hom ≫ f ≫ β.inv) ≫ β.hom = f by rw [Category.assoc, Category.assoc, β.inv_hom_id, α.inv_hom_id_assoc, Category.comp_id]
def
CategoryTheory
[ "Mathlib.CategoryTheory.Iso" ]
Mathlib/CategoryTheory/HomCongr.lean
homCongr
If `X` is isomorphic to `X₁` and `Y` is isomorphic to `Y₁`, then there is a natural bijection between `X ⟶ Y` and `X₁ ⟶ Y₁`. See also `Equiv.arrowCongr`.
homCongr_comp {X Y Z X₁ Y₁ Z₁ : C} (α : X ≅ X₁) (β : Y ≅ Y₁) (γ : Z ≅ Z₁) (f : X ⟶ Y) (g : Y ⟶ Z) : α.homCongr γ (f ≫ g) = α.homCongr β f ≫ β.homCongr γ g := by simp
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Iso" ]
Mathlib/CategoryTheory/HomCongr.lean
homCongr_comp
null
homCongr_refl {X Y : C} (f : X ⟶ Y) : (Iso.refl X).homCongr (Iso.refl Y) f = f := by simp
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Iso" ]
Mathlib/CategoryTheory/HomCongr.lean
homCongr_refl
null
homCongr_trans {X₁ Y₁ X₂ Y₂ X₃ Y₃ : C} (α₁ : X₁ ≅ X₂) (β₁ : Y₁ ≅ Y₂) (α₂ : X₂ ≅ X₃) (β₂ : Y₂ ≅ Y₃) (f : X₁ ⟶ Y₁) : (α₁ ≪≫ α₂).homCongr (β₁ ≪≫ β₂) f = (α₁.homCongr β₁).trans (α₂.homCongr β₂) f := by simp @[simp]
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Iso" ]
Mathlib/CategoryTheory/HomCongr.lean
homCongr_trans
null
homCongr_symm {X₁ Y₁ X₂ Y₂ : C} (α : X₁ ≅ X₂) (β : Y₁ ≅ Y₂) : (α.homCongr β).symm = α.symm.homCongr β.symm := rfl attribute [grind _=_] Iso.trans_assoc attribute [grind =] Iso.symm_self_id Iso.self_symm_id Iso.refl_trans Iso.trans_refl attribute [local grind =] Function.LeftInverse Function.RightInverse in
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Iso" ]
Mathlib/CategoryTheory/HomCongr.lean
homCongr_symm
null
@[simps] isoCongr {X₁ Y₁ X₂ Y₂ : C} (f : X₁ ≅ X₂) (g : Y₁ ≅ Y₂) : (X₁ ≅ Y₁) ≃ (X₂ ≅ Y₂) where toFun h := f.symm.trans <| h.trans <| g invFun h := f.trans <| h.trans <| g.symm left_inv := by cat_disch right_inv := by cat_disch
def
CategoryTheory
[ "Mathlib.CategoryTheory.Iso" ]
Mathlib/CategoryTheory/HomCongr.lean
isoCongr
If `X` is isomorphic to `X₁` and `Y` is isomorphic to `Y₁`, then there is a bijection between `X ≅ Y` and `X₁ ≅ Y₁`.
isoCongrLeft {X₁ X₂ Y : C} (f : X₁ ≅ X₂) : (X₁ ≅ Y) ≃ (X₂ ≅ Y) := isoCongr f (Iso.refl _)
def
CategoryTheory
[ "Mathlib.CategoryTheory.Iso" ]
Mathlib/CategoryTheory/HomCongr.lean
isoCongrLeft
If `X₁` is isomorphic to `X₂`, then there is a bijection between `X₁ ≅ Y` and `X₂ ≅ Y`.
isoCongrRight {X Y₁ Y₂ : C} (g : Y₁ ≅ Y₂) : (X ≅ Y₁) ≃ (X ≅ Y₂) := isoCongr (Iso.refl _) g
def
CategoryTheory
[ "Mathlib.CategoryTheory.Iso" ]
Mathlib/CategoryTheory/HomCongr.lean
isoCongrRight
If `Y₁` is isomorphic to `Y₂`, then there is a bijection between `X ≅ Y₁` and `X ≅ Y₂`.
map_homCongr {X Y X₁ Y₁ : C} (α : X ≅ X₁) (β : Y ≅ Y₁) (f : X ⟶ Y) : F.map (Iso.homCongr α β f) = Iso.homCongr (F.mapIso α) (F.mapIso β) (F.map f) := by simp
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Iso" ]
Mathlib/CategoryTheory/HomCongr.lean
map_homCongr
null
map_isoCongr {X Y X₁ Y₁ : C} (α : X ≅ X₁) (β : Y ≅ Y₁) (f : X ≅ Y) : F.mapIso (Iso.isoCongr α β f) = Iso.isoCongr (F.mapIso α) (F.mapIso β) (F.mapIso f) := by simp
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Iso" ]
Mathlib/CategoryTheory/HomCongr.lean
map_isoCongr
null
@[nolint unusedArguments] InducedCategory (_F : C → D) : Type u₁ := C variable {D}
def
CategoryTheory
[ "Mathlib.CategoryTheory.Functor.FullyFaithful" ]
Mathlib/CategoryTheory/InducedCategory.lean
InducedCategory
`InducedCategory D F`, where `F : C → D`, is a typeclass synonym for `C`, which provides a category structure so that the morphisms `X ⟶ Y` are the morphisms in `D` from `F X` to `F Y`.
InducedCategory.hasCoeToSort {α : Sort*} [CoeSort D α] : CoeSort (InducedCategory D F) α := ⟨fun c => F c⟩
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Functor.FullyFaithful" ]
Mathlib/CategoryTheory/InducedCategory.lean
InducedCategory.hasCoeToSort
null
InducedCategory.category : Category.{v} (InducedCategory D F) where Hom X Y := F X ⟶ F Y id X := 𝟙 (F X) comp f g := f ≫ g variable {F} in
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Functor.FullyFaithful" ]
Mathlib/CategoryTheory/InducedCategory.lean
InducedCategory.category
null
@[simps] InducedCategory.isoMk {X Y : InducedCategory D F} (f : F X ≅ F Y) : X ≅ Y where hom := f.hom inv := f.inv hom_inv_id := f.hom_inv_id inv_hom_id := f.inv_hom_id
def
CategoryTheory
[ "Mathlib.CategoryTheory.Functor.FullyFaithful" ]
Mathlib/CategoryTheory/InducedCategory.lean
InducedCategory.isoMk
Construct an isomorphism in the induced category from an isomorphism in the original category.
@[simps] inducedFunctor : InducedCategory D F ⥤ D where obj := F map f := f
def
CategoryTheory
[ "Mathlib.CategoryTheory.Functor.FullyFaithful" ]
Mathlib/CategoryTheory/InducedCategory.lean
inducedFunctor
The forgetful functor from an induced category to the original category, forgetting the extra data.
fullyFaithfulInducedFunctor : (inducedFunctor F).FullyFaithful where preimage f := f
def
CategoryTheory
[ "Mathlib.CategoryTheory.Functor.FullyFaithful" ]
Mathlib/CategoryTheory/InducedCategory.lean
fullyFaithfulInducedFunctor
The induced functor `inducedFunctor F : InducedCategory D F ⥤ D` is fully faithful.
InducedCategory.full : (inducedFunctor F).Full := (fullyFaithfulInducedFunctor F).full
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Functor.FullyFaithful" ]
Mathlib/CategoryTheory/InducedCategory.lean
InducedCategory.full
null
InducedCategory.faithful : (inducedFunctor F).Faithful := (fullyFaithfulInducedFunctor F).faithful
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Functor.FullyFaithful" ]
Mathlib/CategoryTheory/InducedCategory.lean
InducedCategory.faithful
null
IsPreconnected (J : Type u₁) [Category.{v₁} J] : Prop where iso_constant : ∀ {α : Type u₁} (F : J ⥤ Discrete α) (j : J), Nonempty (F ≅ (Functor.const J).obj (F.obj j)) attribute [inherit_doc IsPreconnected] IsPreconnected.iso_constant
class
CategoryTheory
[ "Mathlib.Data.List.Chain", "Mathlib.CategoryTheory.PUnit", "Mathlib.CategoryTheory.Groupoid", "Mathlib.CategoryTheory.Category.ULift" ]
Mathlib/CategoryTheory/IsConnected.lean
IsPreconnected
A possibly empty category for which every functor to a discrete category is constant.
@[stacks 002S] IsConnected (J : Type u₁) [Category.{v₁} J] : Prop extends IsPreconnected J where [is_nonempty : Nonempty J] attribute [instance 100] IsConnected.is_nonempty variable {J : Type u₁} [Category.{v₁} J] variable {K : Type u₂} [Category.{v₂} K]
class
CategoryTheory
[ "Mathlib.Data.List.Chain", "Mathlib.CategoryTheory.PUnit", "Mathlib.CategoryTheory.Groupoid", "Mathlib.CategoryTheory.Category.ULift" ]
Mathlib/CategoryTheory/IsConnected.lean
IsConnected
We define a connected category as a _nonempty_ category for which every functor to a discrete category is constant. NB. Some authors include the empty category as connected, we do not. We instead are interested in categories with exactly one 'connected component'. This allows us to show that the functor X ⨯ - preserves connected limits.
private liftToDiscrete {α : Type u₂} (F : J ⥤ Discrete α) : J ⥤ Discrete J where obj j := have := Nonempty.intro j Discrete.mk (Function.invFun F.obj (F.obj j)) map {j _} f := have := Nonempty.intro j ⟨⟨congr_arg (Function.invFun F.obj) (Discrete.ext (Discrete.eq_of_hom (F.map f)))⟩⟩
def
CategoryTheory
[ "Mathlib.Data.List.Chain", "Mathlib.CategoryTheory.PUnit", "Mathlib.CategoryTheory.Groupoid", "Mathlib.CategoryTheory.Category.ULift" ]
Mathlib/CategoryTheory/IsConnected.lean
liftToDiscrete
Implementation detail of `isoConstant`.
private factorThroughDiscrete {α : Type u₂} (F : J ⥤ Discrete α) : liftToDiscrete F ⋙ Discrete.functor F.obj ≅ F := NatIso.ofComponents (fun _ => eqToIso Function.apply_invFun_apply) (by cat_disch)
def
CategoryTheory
[ "Mathlib.Data.List.Chain", "Mathlib.CategoryTheory.PUnit", "Mathlib.CategoryTheory.Groupoid", "Mathlib.CategoryTheory.Category.ULift" ]
Mathlib/CategoryTheory/IsConnected.lean
factorThroughDiscrete
Implementation detail of `isoConstant`.
isoConstant [IsPreconnected J] {α : Type u₂} (F : J ⥤ Discrete α) (j : J) : F ≅ (Functor.const J).obj (F.obj j) := (IsPreconnected.IsoConstantAux.factorThroughDiscrete F).symm ≪≫ isoWhiskerRight (IsPreconnected.iso_constant _ j).some _ ≪≫ NatIso.ofComponents (fun _ => eqToIso Function.apply_invFun_apply) (by simp)
def
CategoryTheory
[ "Mathlib.Data.List.Chain", "Mathlib.CategoryTheory.PUnit", "Mathlib.CategoryTheory.Groupoid", "Mathlib.CategoryTheory.Category.ULift" ]
Mathlib/CategoryTheory/IsConnected.lean
isoConstant
If `J` is connected, any functor `F : J ⥤ Discrete α` is isomorphic to the constant functor with value `F.obj j` (for any choice of `j`).
any_functor_const_on_obj [IsPreconnected J] {α : Type u₂} (F : J ⥤ Discrete α) (j j' : J) : F.obj j = F.obj j' := by ext; exact ((isoConstant F j').hom.app j).down.1
theorem
CategoryTheory
[ "Mathlib.Data.List.Chain", "Mathlib.CategoryTheory.PUnit", "Mathlib.CategoryTheory.Groupoid", "Mathlib.CategoryTheory.Category.ULift" ]
Mathlib/CategoryTheory/IsConnected.lean
any_functor_const_on_obj
If `J` is connected, any functor to a discrete category is constant on objects. The converse is given in `IsConnected.of_any_functor_const_on_obj`.
IsPreconnected.of_any_functor_const_on_obj (h : ∀ {α : Type u₁} (F : J ⥤ Discrete α), ∀ j j' : J, F.obj j = F.obj j') : IsPreconnected J where iso_constant := fun F j' => ⟨NatIso.ofComponents fun j => eqToIso (h F j j')⟩
theorem
CategoryTheory
[ "Mathlib.Data.List.Chain", "Mathlib.CategoryTheory.PUnit", "Mathlib.CategoryTheory.Groupoid", "Mathlib.CategoryTheory.Category.ULift" ]
Mathlib/CategoryTheory/IsConnected.lean
IsPreconnected.of_any_functor_const_on_obj
If any functor to a discrete category is constant on objects, J is connected. The converse of `any_functor_const_on_obj`.
IsPreconnected.prod [IsPreconnected J] [IsPreconnected K] : IsPreconnected (J × K) := by refine .of_any_functor_const_on_obj (fun {a} F ⟨j, k⟩ ⟨j', k'⟩ => ?_) exact (any_functor_const_on_obj (Prod.sectL J k ⋙ F) j j').trans (any_functor_const_on_obj (Prod.sectR j' K ⋙ F) k k')
instance
CategoryTheory
[ "Mathlib.Data.List.Chain", "Mathlib.CategoryTheory.PUnit", "Mathlib.CategoryTheory.Groupoid", "Mathlib.CategoryTheory.Category.ULift" ]
Mathlib/CategoryTheory/IsConnected.lean
IsPreconnected.prod
null
IsConnected.prod [IsConnected J] [IsConnected K] : IsConnected (J × K) where
instance
CategoryTheory
[ "Mathlib.Data.List.Chain", "Mathlib.CategoryTheory.PUnit", "Mathlib.CategoryTheory.Groupoid", "Mathlib.CategoryTheory.Category.ULift" ]
Mathlib/CategoryTheory/IsConnected.lean
IsConnected.prod
null
IsConnected.of_any_functor_const_on_obj [Nonempty J] (h : ∀ {α : Type u₁} (F : J ⥤ Discrete α), ∀ j j' : J, F.obj j = F.obj j') : IsConnected J := { IsPreconnected.of_any_functor_const_on_obj h with }
theorem
CategoryTheory
[ "Mathlib.Data.List.Chain", "Mathlib.CategoryTheory.PUnit", "Mathlib.CategoryTheory.Groupoid", "Mathlib.CategoryTheory.Category.ULift" ]
Mathlib/CategoryTheory/IsConnected.lean
IsConnected.of_any_functor_const_on_obj
If any functor to a discrete category is constant on objects, J is connected. The converse of `any_functor_const_on_obj`.
constant_of_preserves_morphisms [IsPreconnected J] {α : Type u₂} (F : J → α) (h : ∀ (j₁ j₂ : J) (_ : j₁ ⟶ j₂), F j₁ = F j₂) (j j' : J) : F j = F j' := by simpa using any_functor_const_on_obj { obj := Discrete.mk ∘ F map := fun f => eqToHom (by ext; exact h _ _ f) } j j'
theorem
CategoryTheory
[ "Mathlib.Data.List.Chain", "Mathlib.CategoryTheory.PUnit", "Mathlib.CategoryTheory.Groupoid", "Mathlib.CategoryTheory.Category.ULift" ]
Mathlib/CategoryTheory/IsConnected.lean
constant_of_preserves_morphisms
If `J` is connected, then given any function `F` such that the presence of a morphism `j₁ ⟶ j₂` implies `F j₁ = F j₂`, we have that `F` is constant. This can be thought of as a local-to-global property. The converse is shown in `IsConnected.of_constant_of_preserves_morphisms`
IsPreconnected.of_constant_of_preserves_morphisms (h : ∀ {α : Type u₁} (F : J → α), (∀ {j₁ j₂ : J} (_ : j₁ ⟶ j₂), F j₁ = F j₂) → ∀ j j' : J, F j = F j') : IsPreconnected J := IsPreconnected.of_any_functor_const_on_obj fun F => h F.obj fun f => by ext; exact Discrete.eq_of_hom (F.map f)
theorem
CategoryTheory
[ "Mathlib.Data.List.Chain", "Mathlib.CategoryTheory.PUnit", "Mathlib.CategoryTheory.Groupoid", "Mathlib.CategoryTheory.Category.ULift" ]
Mathlib/CategoryTheory/IsConnected.lean
IsPreconnected.of_constant_of_preserves_morphisms
`J` is connected if: given any function `F : J → α` which is constant for any `j₁, j₂` for which there is a morphism `j₁ ⟶ j₂`, then `F` is constant. This can be thought of as a local-to-global property. The converse of `constant_of_preserves_morphisms`.
IsConnected.of_constant_of_preserves_morphisms [Nonempty J] (h : ∀ {α : Type u₁} (F : J → α), (∀ {j₁ j₂ : J} (_ : j₁ ⟶ j₂), F j₁ = F j₂) → ∀ j j' : J, F j = F j') : IsConnected J := { IsPreconnected.of_constant_of_preserves_morphisms h with }
theorem
CategoryTheory
[ "Mathlib.Data.List.Chain", "Mathlib.CategoryTheory.PUnit", "Mathlib.CategoryTheory.Groupoid", "Mathlib.CategoryTheory.Category.ULift" ]
Mathlib/CategoryTheory/IsConnected.lean
IsConnected.of_constant_of_preserves_morphisms
`J` is connected if: given any function `F : J → α` which is constant for any `j₁, j₂` for which there is a morphism `j₁ ⟶ j₂`, then `F` is constant. This can be thought of as a local-to-global property. The converse of `constant_of_preserves_morphisms`.
induct_on_objects [IsPreconnected J] (p : Set J) {j₀ : J} (h0 : j₀ ∈ p) (h1 : ∀ {j₁ j₂ : J} (_ : j₁ ⟶ j₂), j₁ ∈ p ↔ j₂ ∈ p) (j : J) : j ∈ p := by let aux (j₁ j₂ : J) (f : j₁ ⟶ j₂) := congrArg ULift.up <| (h1 f).eq injection constant_of_preserves_morphisms (fun k => ULift.up.{u₁} (k ∈ p)) aux j j₀ with i rwa [i]
theorem
CategoryTheory
[ "Mathlib.Data.List.Chain", "Mathlib.CategoryTheory.PUnit", "Mathlib.CategoryTheory.Groupoid", "Mathlib.CategoryTheory.Category.ULift" ]
Mathlib/CategoryTheory/IsConnected.lean
induct_on_objects
An inductive-like property for the objects of a connected category. If the set `p` is nonempty, and `p` is closed under morphisms of `J`, then `p` contains all of `J`. The converse is given in `IsConnected.of_induct`.
IsConnected.of_induct {j₀ : J} (h : ∀ p : Set J, j₀ ∈ p → (∀ {j₁ j₂ : J} (_ : j₁ ⟶ j₂), j₁ ∈ p ↔ j₂ ∈ p) → ∀ j : J, j ∈ p) : IsConnected J := have := Nonempty.intro j₀ IsConnected.of_constant_of_preserves_morphisms fun {α} F a => by have w := h { j | F j = F j₀ } rfl (fun {j₁} {j₂} f => by change F j₁ = F j₀ ↔ F j₂ = F j₀ simp [a f]) intro j j' rw [w j, w j'] attribute [local instance] uliftCategory in
theorem
CategoryTheory
[ "Mathlib.Data.List.Chain", "Mathlib.CategoryTheory.PUnit", "Mathlib.CategoryTheory.Groupoid", "Mathlib.CategoryTheory.Category.ULift" ]
Mathlib/CategoryTheory/IsConnected.lean
IsConnected.of_induct
If any maximal connected component containing some element j₀ of J is all of J, then J is connected. The converse of `induct_on_objects`.
isPreconnected_induction [IsPreconnected J] (Z : J → Sort*) (h₁ : ∀ {j₁ j₂ : J} (_ : j₁ ⟶ j₂), Z j₁ → Z j₂) (h₂ : ∀ {j₁ j₂ : J} (_ : j₁ ⟶ j₂), Z j₂ → Z j₁) {j₀ : J} (x : Z j₀) (j : J) : Nonempty (Z j) := (induct_on_objects { j | Nonempty (Z j) } ⟨x⟩ (fun f => ⟨by rintro ⟨y⟩; exact ⟨h₁ f y⟩, by rintro ⟨y⟩; exact ⟨h₂ f y⟩⟩) j :)
theorem
CategoryTheory
[ "Mathlib.Data.List.Chain", "Mathlib.CategoryTheory.PUnit", "Mathlib.CategoryTheory.Groupoid", "Mathlib.CategoryTheory.Category.ULift" ]
Mathlib/CategoryTheory/IsConnected.lean
isPreconnected_induction
Lifting the universe level of morphisms and objects preserves connectedness. -/ instance [hc : IsConnected J] : IsConnected (ULiftHom.{v₂} (ULift.{u₂} J)) := by apply IsConnected.of_induct · rintro p hj₀ h ⟨j⟩ let p' : Set J := {j : J | p ⟨j⟩} have hj₀' : Classical.choice hc.is_nonempty ∈ p' := by simp only [p'] exact hj₀ apply induct_on_objects p' hj₀' fun f => h ((ULiftHomULiftCategory.equiv J).functor.map f) /-- Another induction principle for `IsPreconnected J`: given a type family `Z : J → Sort*` and a rule for transporting in *both* directions along a morphism in `J`, we can transport an `x : Z j₀` to a point in `Z j` for any `j`.
isPreconnected_of_equivalent {K : Type u₂} [Category.{v₂} K] [IsPreconnected J] (e : J ≌ K) : IsPreconnected K where iso_constant F k := ⟨calc F ≅ e.inverse ⋙ e.functor ⋙ F := (e.invFunIdAssoc F).symm _ ≅ e.inverse ⋙ (Functor.const J).obj ((e.functor ⋙ F).obj (e.inverse.obj k)) := isoWhiskerLeft e.inverse (isoConstant (e.functor ⋙ F) (e.inverse.obj k)) _ ≅ e.inverse ⋙ (Functor.const J).obj (F.obj k) := isoWhiskerLeft _ ((F ⋙ Functor.const J).mapIso (e.counitIso.app k)) _ ≅ (Functor.const K).obj (F.obj k) := NatIso.ofComponents fun _ => Iso.refl _⟩
theorem
CategoryTheory
[ "Mathlib.Data.List.Chain", "Mathlib.CategoryTheory.PUnit", "Mathlib.CategoryTheory.Groupoid", "Mathlib.CategoryTheory.Category.ULift" ]
Mathlib/CategoryTheory/IsConnected.lean
isPreconnected_of_equivalent
If `J` and `K` are equivalent, then if `J` is preconnected then `K` is as well.
isPreconnected_iff_of_equivalence {K : Type u₂} [Category.{v₂} K] (e : J ≌ K) : IsPreconnected J ↔ IsPreconnected K := ⟨fun _ => isPreconnected_of_equivalent e, fun _ => isPreconnected_of_equivalent e.symm⟩
lemma
CategoryTheory
[ "Mathlib.Data.List.Chain", "Mathlib.CategoryTheory.PUnit", "Mathlib.CategoryTheory.Groupoid", "Mathlib.CategoryTheory.Category.ULift" ]
Mathlib/CategoryTheory/IsConnected.lean
isPreconnected_iff_of_equivalence
null
isConnected_of_equivalent {K : Type u₂} [Category.{v₂} K] (e : J ≌ K) [IsConnected J] : IsConnected K := { is_nonempty := Nonempty.map e.functor.obj (by infer_instance) toIsPreconnected := isPreconnected_of_equivalent e }
theorem
CategoryTheory
[ "Mathlib.Data.List.Chain", "Mathlib.CategoryTheory.PUnit", "Mathlib.CategoryTheory.Groupoid", "Mathlib.CategoryTheory.Category.ULift" ]
Mathlib/CategoryTheory/IsConnected.lean
isConnected_of_equivalent
If `J` and `K` are equivalent, then if `J` is connected then `K` is as well.
isConnected_iff_of_equivalence {K : Type u₂} [Category.{v₂} K] (e : J ≌ K) : IsConnected J ↔ IsConnected K := ⟨fun _ => isConnected_of_equivalent e, fun _ => isConnected_of_equivalent e.symm⟩
lemma
CategoryTheory
[ "Mathlib.Data.List.Chain", "Mathlib.CategoryTheory.PUnit", "Mathlib.CategoryTheory.Groupoid", "Mathlib.CategoryTheory.Category.ULift" ]
Mathlib/CategoryTheory/IsConnected.lean
isConnected_iff_of_equivalence
null
isPreconnected_op [IsPreconnected J] : IsPreconnected Jᵒᵖ where iso_constant := fun {α} F X => ⟨NatIso.ofComponents fun Y => eqToIso (Discrete.ext (Discrete.eq_of_hom ((Nonempty.some (IsPreconnected.iso_constant (F.rightOp ⋙ (Discrete.opposite α).functor) (unop X))).app (unop Y)).hom))⟩
instance
CategoryTheory
[ "Mathlib.Data.List.Chain", "Mathlib.CategoryTheory.PUnit", "Mathlib.CategoryTheory.Groupoid", "Mathlib.CategoryTheory.Category.ULift" ]
Mathlib/CategoryTheory/IsConnected.lean
isPreconnected_op
If `J` is preconnected, then `Jᵒᵖ` is preconnected as well.
isConnected_op [IsConnected J] : IsConnected Jᵒᵖ where is_nonempty := Nonempty.intro (op (Classical.arbitrary J))
instance
CategoryTheory
[ "Mathlib.Data.List.Chain", "Mathlib.CategoryTheory.PUnit", "Mathlib.CategoryTheory.Groupoid", "Mathlib.CategoryTheory.Category.ULift" ]
Mathlib/CategoryTheory/IsConnected.lean
isConnected_op
If `J` is connected, then `Jᵒᵖ` is connected as well.
isPreconnected_of_isPreconnected_op [IsPreconnected Jᵒᵖ] : IsPreconnected J := isPreconnected_of_equivalent (opOpEquivalence J)
theorem
CategoryTheory
[ "Mathlib.Data.List.Chain", "Mathlib.CategoryTheory.PUnit", "Mathlib.CategoryTheory.Groupoid", "Mathlib.CategoryTheory.Category.ULift" ]
Mathlib/CategoryTheory/IsConnected.lean
isPreconnected_of_isPreconnected_op
null
isConnected_of_isConnected_op [IsConnected Jᵒᵖ] : IsConnected J := isConnected_of_equivalent (opOpEquivalence J) variable (J) in @[simp]
theorem
CategoryTheory
[ "Mathlib.Data.List.Chain", "Mathlib.CategoryTheory.PUnit", "Mathlib.CategoryTheory.Groupoid", "Mathlib.CategoryTheory.Category.ULift" ]
Mathlib/CategoryTheory/IsConnected.lean
isConnected_of_isConnected_op
null
isConnected_op_iff_isConnected : IsConnected Jᵒᵖ ↔ IsConnected J := ⟨fun _ => isConnected_of_isConnected_op, fun _ => isConnected_op⟩
theorem
CategoryTheory
[ "Mathlib.Data.List.Chain", "Mathlib.CategoryTheory.PUnit", "Mathlib.CategoryTheory.Groupoid", "Mathlib.CategoryTheory.Category.ULift" ]
Mathlib/CategoryTheory/IsConnected.lean
isConnected_op_iff_isConnected
null