The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V24. Category theory

Mathlib.CategoryTheory.Inserter.Basic

38 declarations. Mathlib docs · Source

Inserter categories

Let F G : C ⥤ D be a parallel pair of functors. In this file, we define a category Inserter F G. Objects of Inserter F G correspond to pairs (K : C) × (F.obj K ⟶ G.obj K). Such categories can be used to encode data such as algebra for endofunctors. They are also a basic building block for bicategorical limits of categories.

Main constructions

  • Inserter F G: the inserter category
  • Inserter.proj: the projection functor Inserter F G ⥤ C
  • Inserter.τ: the structure morphism of the inserter as a natural transformation proj F G ⋙ F ⟶ proj F G ⋙ G.

References

TODO

  • Link Inserter F (𝟭 C) with Endofunctor.Algebra F when F is an endofunctor.
  • Link Inserter (𝟭 C) F with Endofunctor.Coalgebra F when F is an endofunctor.
  • Show that Inserter F G is an accessible category when F and G are accessible functors.

theorem CategoryTheory.Inserter.Hom.mk.inj E1 #

∀ {C : Type u_1} {D : Type u_2} {inst : CategoryTheory.Category.{v_1, u_1} C}
  {inst_1 : CategoryTheory.Category.{v_2, u_2} D} {F G : CategoryTheory.Functor C D} {x y : CategoryTheory.Inserter F G}
  {hom : x.obj ⟶ y.obj}
  {comm :
    autoParam
      (CategoryTheory.CategoryStruct.comp (F.map hom) y.hom = CategoryTheory.CategoryStruct.comp x.hom (G.map hom))
      CategoryTheory.Inserter.Hom.comm._autoParam}
  {hom_1 : x.obj ⟶ y.obj}
  {comm_1 :
    autoParam
      (CategoryTheory.CategoryStruct.comp (F.map hom_1) y.hom = CategoryTheory.CategoryStruct.comp x.hom (G.map hom_1))
      CategoryTheory.Inserter.Hom.comm._autoParam},
  { hom := hom, comm := comm } = { hom := hom_1, comm := comm_1 } → hom = hom_1

theorem CategoryTheory.Inserter.mk.inj E1 #

∀ {C : Type u_1} {D : Type u_2} {inst : CategoryTheory.Category.{v_1, u_1} C}
  {inst_1 : CategoryTheory.Category.{v_2, u_2} D} {F G : CategoryTheory.Functor C D} {obj : C}
  {hom : F.obj obj ⟶ G.obj obj} {obj_1 : C} {hom_1 : F.obj obj_1 ⟶ G.obj obj_1},
  { obj := obj, hom := hom } = { obj := obj_1, hom := hom_1 } → obj = obj_1 ∧ hom ≍ hom_1

def CategoryTheory.Inserter.Hom.ctorIdx E1 #

{C : Type u_1} →
  {D : Type u_2} →
    {inst : CategoryTheory.Category.{v_1, u_1} C} →
      {inst_1 : CategoryTheory.Category.{v_2, u_2} D} →
        {F G : CategoryTheory.Functor C D} → {x y : CategoryTheory.Inserter F G} → x.Hom y → ℕ

theorem CategoryTheory.Inserter.mk.injEq E0 #

∀ {C : Type u_1} {D : Type u_2} [inst : CategoryTheory.Category.{v_1, u_1} C]
  [inst_1 : CategoryTheory.Category.{v_2, u_2} D] {F G : CategoryTheory.Functor C D} {obj : C}
  (hom : F.obj obj ⟶ G.obj obj) (obj_1 : C) (hom_1 : F.obj obj_1 ⟶ G.obj obj_1),
  ({ obj := obj, hom := hom } = { obj := obj_1, hom := hom_1 }) = (obj = obj_1 ∧ hom ≍ hom_1)

theorem CategoryTheory.Inserter.Hom.mk.injEq E0 #

∀ {C : Type u_1} {D : Type u_2} [inst : CategoryTheory.Category.{v_1, u_1} C]
  [inst_1 : CategoryTheory.Category.{v_2, u_2} D] {F G : CategoryTheory.Functor C D} {x y : CategoryTheory.Inserter F G}
  (hom : x.obj ⟶ y.obj)
  (comm :
    autoParam
      (CategoryTheory.CategoryStruct.comp (F.map hom) y.hom = CategoryTheory.CategoryStruct.comp x.hom (G.map hom))
      CategoryTheory.Inserter.Hom.comm._autoParam)
  (hom_1 : x.obj ⟶ y.obj)
  (comm_1 :
    autoParam
      (CategoryTheory.CategoryStruct.comp (F.map hom_1) y.hom = CategoryTheory.CategoryStruct.comp x.hom (G.map hom_1))
      CategoryTheory.Inserter.Hom.comm._autoParam),
  ({ hom := hom, comm := comm } = { hom := hom_1, comm := comm_1 }) = (hom = hom_1)

def CategoryTheory.Inserter.ctorIdx E1 #

{C : Type u_1} →
  {D : Type u_2} →
    {inst : CategoryTheory.Category.{v_1, u_1} C} →
      {inst_1 : CategoryTheory.Category.{v_2, u_2} D} →
        {F G : CategoryTheory.Functor C D} → CategoryTheory.Inserter F G → ℕ

theorem CategoryTheory.Inserter.Hom.mk.congr_simp E1 #

∀ {C : Type u_1} {D : Type u_2} [inst : CategoryTheory.Category.{v_1, u_1} C]
  [inst_1 : CategoryTheory.Category.{v_2, u_2} D] {F G : CategoryTheory.Functor C D} {x y : CategoryTheory.Inserter F G}
  (hom hom_1 : x.obj ⟶ y.obj) (e_hom : hom = hom_1)
  (comm : CategoryTheory.CategoryStruct.comp (F.map hom) y.hom = CategoryTheory.CategoryStruct.comp x.hom (G.map hom)),
  { hom := hom, comm := comm } = { hom := hom_1, comm := ⋯ }

structure CategoryTheory.Inserter E1 #

{C : Type u_1} →
  {D : Type u_2} →
    [inst : CategoryTheory.Category.{v_1, u_1} C] →
      [inst_1 : CategoryTheory.Category.{v_2, u_2} D] →
        CategoryTheory.Functor C D → CategoryTheory.Functor C D → Type (max u_1 v_2)

The inserter of a pair of parallel functors F G : C ⥤ D is the category of arrows F.obj K ⟶ G.obj K, with morphisms K ⟶ K' making the obvious square commute as morphims.

ctor CategoryTheory.Inserter.mk E0 #

{C : Type u_1} →
  {D : Type u_2} →
    [inst : CategoryTheory.Category.{v_1, u_1} C] →
      [inst_1 : CategoryTheory.Category.{v_2, u_2} D] →
        {F G : CategoryTheory.Functor C D} → {obj : C} → (F.obj obj ⟶ G.obj obj) → CategoryTheory.Inserter F G

abbrev CategoryTheory.Inserter.obj E1 #

{C : Type u_1} →
  {D : Type u_2} →
    [inst : CategoryTheory.Category.{v_1, u_1} C] →
      [inst_1 : CategoryTheory.Category.{v_2, u_2} D] →
        {F G : CategoryTheory.Functor C D} → CategoryTheory.Inserter F G → C

the object of C underlying the object

abbrev CategoryTheory.Inserter.hom E1 #

{C : Type u_1} →
  {D : Type u_2} →
    [inst : CategoryTheory.Category.{v_1, u_1} C] →
      [inst_1 : CategoryTheory.Category.{v_2, u_2} D] →
        {F G : CategoryTheory.Functor C D} → (self : CategoryTheory.Inserter F G) → F.obj self.obj ⟶ G.obj self.obj

the morphism F.obj obj ⟶ G.obj obj corresponding to the object

structure CategoryTheory.Inserter.Hom E1 #

{C : Type u_1} →
  {D : Type u_2} →
    [inst : CategoryTheory.Category.{v_1, u_1} C] →
      [inst_1 : CategoryTheory.Category.{v_2, u_2} D] →
        {F G : CategoryTheory.Functor C D} → CategoryTheory.Inserter F G → CategoryTheory.Inserter F G → Type v_1

Morphisms in the inserter category are given by morphisms between the underlying objects that make the obvious square commute.

ctor CategoryTheory.Inserter.Hom.mk E0 #

{C : Type u_1} →
  {D : Type u_2} →
    [inst : CategoryTheory.Category.{v_1, u_1} C] →
      [inst_1 : CategoryTheory.Category.{v_2, u_2} D] →
        {F G : CategoryTheory.Functor C D} →
          {x y : CategoryTheory.Inserter F G} →
            (hom : x.obj ⟶ y.obj) →
              autoParam
                  (CategoryTheory.CategoryStruct.comp (F.map hom) y.hom =
                    CategoryTheory.CategoryStruct.comp x.hom (G.map hom))
                  CategoryTheory.Inserter.Hom.comm._autoParam →
                x.Hom y

abbrev CategoryTheory.Inserter.Hom.hom E1 #

{C : Type u_1} →
  {D : Type u_2} →
    [inst : CategoryTheory.Category.{v_1, u_1} C] →
      [inst_1 : CategoryTheory.Category.{v_2, u_2} D] →
        {F G : CategoryTheory.Functor C D} → {x y : CategoryTheory.Inserter F G} → x.Hom y → (x.obj ⟶ y.obj)

The morphism between the underlying objects.

theorem CategoryTheory.Inserter.Hom.comm E1 #

∀ {C : Type u_1} {D : Type u_2} [inst : CategoryTheory.Category.{v_1, u_1} C]
  [inst_1 : CategoryTheory.Category.{v_2, u_2} D] {F G : CategoryTheory.Functor C D} {x y : CategoryTheory.Inserter F G}
  (self : x.Hom y),
  CategoryTheory.CategoryStruct.comp (F.map self.hom) y.hom = CategoryTheory.CategoryStruct.comp x.hom (G.map self.hom)

theorem CategoryTheory.Inserter.Hom.ext_iff E0 #

∀ {C : Type u_1} {D : Type u_2} {inst : CategoryTheory.Category.{v_1, u_1} C}
  {inst_1 : CategoryTheory.Category.{v_2, u_2} D} {F G : CategoryTheory.Functor C D} {x y : CategoryTheory.Inserter F G}
  {x_1 y_1 : x.Hom y}, x_1 = y_1 ↔ x_1.hom = y_1.hom

theorem CategoryTheory.Inserter.Hom.ext E1 #

∀ {C : Type u_1} {D : Type u_2} {inst : CategoryTheory.Category.{v_1, u_1} C}
  {inst_1 : CategoryTheory.Category.{v_2, u_2} D} {F G : CategoryTheory.Functor C D} {x y : CategoryTheory.Inserter F G}
  {x_1 y_1 : x.Hom y}, x_1.hom = y_1.hom → x_1 = y_1

theorem CategoryTheory.Inserter.id_hom E0 #

∀ {C : Type u_1} {D : Type u_2} [inst : CategoryTheory.Category.{v_1, u_1} C]
  [inst_1 : CategoryTheory.Category.{v_2, u_2} D] {F G : CategoryTheory.Functor C D} (x : CategoryTheory.Inserter F G),
  (CategoryTheory.CategoryStruct.id x).hom = CategoryTheory.CategoryStruct.id x.obj

instance CategoryTheory.Inserter.instCategory E0 #

{C : Type u_1} →
  {D : Type u_2} →
    [inst : CategoryTheory.Category.{v_1, u_1} C] →
      [inst_1 : CategoryTheory.Category.{v_2, u_2} D] →
        {F G : CategoryTheory.Functor C D} → CategoryTheory.Category.{v_1, max v_2 u_1} (CategoryTheory.Inserter F G)

theorem CategoryTheory.Inserter.comp_hom E0 #

∀ {C : Type u_1} {D : Type u_2} [inst : CategoryTheory.Category.{v_1, u_1} C]
  [inst_1 : CategoryTheory.Category.{v_2, u_2} D] {F G : CategoryTheory.Functor C D}
  {x y z : CategoryTheory.Inserter F G} (f : x ⟶ y) (g : y ⟶ z),
  (CategoryTheory.CategoryStruct.comp f g).hom = CategoryTheory.CategoryStruct.comp f.hom g.hom

theorem CategoryTheory.Inserter.comp_hom_assoc E1 #

∀ {C : Type u_1} {D : Type u_2} [inst : CategoryTheory.Category.{v_1, u_1} C]
  [inst_1 : CategoryTheory.Category.{v_2, u_2} D] {F G : CategoryTheory.Functor C D}
  {x y z : CategoryTheory.Inserter F G} (f : x ⟶ y) (g : y ⟶ z) {Z : C} (h : z.obj ⟶ Z),
  CategoryTheory.CategoryStruct.comp (CategoryTheory.CategoryStruct.comp f g).hom h =
    CategoryTheory.CategoryStruct.comp f.hom (CategoryTheory.CategoryStruct.comp g.hom h)

theorem CategoryTheory.Inserter.comm E0 #

∀ {C : Type u_1} {D : Type u_2} [inst : CategoryTheory.Category.{v_1, u_1} C]
  [inst_1 : CategoryTheory.Category.{v_2, u_2} D] {F G : CategoryTheory.Functor C D} {x y : CategoryTheory.Inserter F G}
  (f : x ⟶ y),
  CategoryTheory.CategoryStruct.comp (F.map f.hom) y.hom = CategoryTheory.CategoryStruct.comp x.hom (G.map f.hom)

theorem CategoryTheory.Inserter.comm_assoc E0 #

∀ {C : Type u_1} {D : Type u_2} [inst : CategoryTheory.Category.{v_1, u_1} C]
  [inst_1 : CategoryTheory.Category.{v_2, u_2} D] {F G : CategoryTheory.Functor C D} {x y : CategoryTheory.Inserter F G}
  (f : x ⟶ y) {Z : D} (h : G.obj y.obj ⟶ Z),
  CategoryTheory.CategoryStruct.comp (F.map f.hom) (CategoryTheory.CategoryStruct.comp y.hom h) =
    CategoryTheory.CategoryStruct.comp x.hom (CategoryTheory.CategoryStruct.comp (G.map f.hom) h)

theorem CategoryTheory.Inserter.hom_ext E1 #

∀ {C : Type u_1} {D : Type u_2} [inst : CategoryTheory.Category.{v_1, u_1} C]
  [inst_1 : CategoryTheory.Category.{v_2, u_2} D] {F G : CategoryTheory.Functor C D} {x y : CategoryTheory.Inserter F G}
  {f g : x ⟶ y}, f.hom = g.hom → f = g

theorem CategoryTheory.Inserter.hom_ext_iff E0 #

∀ {C : Type u_1} {D : Type u_2} [inst : CategoryTheory.Category.{v_1, u_1} C]
  [inst_1 : CategoryTheory.Category.{v_2, u_2} D] {F G : CategoryTheory.Functor C D} {x y : CategoryTheory.Inserter F G}
  {f g : x ⟶ y}, f = g ↔ f.hom = g.hom

def CategoryTheory.Inserter.proj E3 #

{C : Type u_1} →
  {D : Type u_2} →
    [inst : CategoryTheory.Category.{v_1, u_1} C] →
      [inst_1 : CategoryTheory.Category.{v_2, u_2} D] →
        (F G : CategoryTheory.Functor C D) → CategoryTheory.Functor (CategoryTheory.Inserter F G) C

The projection Inserter F G ⥤ C that sends an object to its underlying object of C.

theorem CategoryTheory.Inserter.proj_map E0 #

∀ {C : Type u_1} {D : Type u_2} [inst : CategoryTheory.Category.{v_1, u_1} C]
  [inst_1 : CategoryTheory.Category.{v_2, u_2} D] (F G : CategoryTheory.Functor C D) {X Y : CategoryTheory.Inserter F G}
  (f : X ⟶ Y), (CategoryTheory.Inserter.proj F G).map f = f.hom

theorem CategoryTheory.Inserter.proj_obj E0 #

∀ {C : Type u_1} {D : Type u_2} [inst : CategoryTheory.Category.{v_1, u_1} C]
  [inst_1 : CategoryTheory.Category.{v_2, u_2} D] (F G : CategoryTheory.Functor C D) (x : CategoryTheory.Inserter F G),
  (CategoryTheory.Inserter.proj F G).obj x = x.obj

instance CategoryTheory.Inserter.instFaithfulProj E0 #

∀ {C : Type u_1} {D : Type u_2} [inst : CategoryTheory.Category.{v_1, u_1} C]
  [inst_1 : CategoryTheory.Category.{v_2, u_2} D] (F G : CategoryTheory.Functor C D),
  (CategoryTheory.Inserter.proj F G).Faithful

def CategoryTheory.Inserter.τ E3 #

{C : Type u_1} →
  {D : Type u_2} →
    [inst : CategoryTheory.Category.{v_1, u_1} C] →
      [inst_1 : CategoryTheory.Category.{v_2, u_2} D] →
        (F G : CategoryTheory.Functor C D) →
          (CategoryTheory.Inserter.proj F G).comp F ⟶ (CategoryTheory.Inserter.proj F G).comp G

The structure morphisms of objects of the inserter assemble into a natural transformation proj ⋙ F ⟶ proj ⋙ G.

theorem CategoryTheory.Inserter.τ_app E0 #

∀ {C : Type u_1} {D : Type u_2} [inst : CategoryTheory.Category.{v_1, u_1} C]
  [inst_1 : CategoryTheory.Category.{v_2, u_2} D] (F G : CategoryTheory.Functor C D) (x : CategoryTheory.Inserter F G),
  (CategoryTheory.Inserter.τ F G).app x = x.hom

def CategoryTheory.Inserter.mkIso E1 #

{C : Type u_1} →
  {D : Type u_2} →
    [inst : CategoryTheory.Category.{v_1, u_1} C] →
      [inst_1 : CategoryTheory.Category.{v_2, u_2} D] →
        {F G : CategoryTheory.Functor C D} →
          {E E' : CategoryTheory.Inserter F G} →
            (e : E.obj ≅ E'.obj) →
              autoParam
                  (CategoryTheory.CategoryStruct.comp (F.map e.hom) E'.hom =
                    CategoryTheory.CategoryStruct.comp E.hom (G.map e.hom))
                  CategoryTheory.Inserter.mkIso._auto_1 →
                (E ≅ E')

Construct an isomorphism of inserters from an isomorphism of the underlying objects

theorem CategoryTheory.Inserter.mkIso_inv_hom E0 #

∀ {C : Type u_1} {D : Type u_2} [inst : CategoryTheory.Category.{v_1, u_1} C]
  [inst_1 : CategoryTheory.Category.{v_2, u_2} D] {F G : CategoryTheory.Functor C D}
  {E E' : CategoryTheory.Inserter F G} (e : E.obj ≅ E'.obj)
  (he :
    autoParam
      (CategoryTheory.CategoryStruct.comp (F.map e.hom) E'.hom = CategoryTheory.CategoryStruct.comp E.hom (G.map e.hom))
      CategoryTheory.Inserter.mkIso._auto_1),
  (CategoryTheory.Inserter.mkIso e he).inv.hom = e.inv

theorem CategoryTheory.Inserter.mkIso_hom_hom E0 #

∀ {C : Type u_1} {D : Type u_2} [inst : CategoryTheory.Category.{v_1, u_1} C]
  [inst_1 : CategoryTheory.Category.{v_2, u_2} D] {F G : CategoryTheory.Functor C D}
  {E E' : CategoryTheory.Inserter F G} (e : E.obj ≅ E'.obj)
  (he :
    autoParam
      (CategoryTheory.CategoryStruct.comp (F.map e.hom) E'.hom = CategoryTheory.CategoryStruct.comp E.hom (G.map e.hom))
      CategoryTheory.Inserter.mkIso._auto_1),
  (CategoryTheory.Inserter.mkIso e he).hom.hom = e.hom

instance CategoryTheory.Inserter.instIsIsoHom E0 #

∀ {C : Type u_1} {D : Type u_2} [inst : CategoryTheory.Category.{v_1, u_1} C]
  [inst_1 : CategoryTheory.Category.{v_2, u_2} D] (F G : CategoryTheory.Functor C D)
  {E E' : CategoryTheory.Inserter F G} (f : E ⟶ E') [CategoryTheory.IsIso f], CategoryTheory.IsIso f.hom

theorem CategoryTheory.Inserter.inv_hom E0 #

∀ {C : Type u_1} {D : Type u_2} [inst : CategoryTheory.Category.{v_1, u_1} C]
  [inst_1 : CategoryTheory.Category.{v_2, u_2} D] (F G : CategoryTheory.Functor C D)
  {E E' : CategoryTheory.Inserter F G} (f : E ⟶ E') [inst_2 : CategoryTheory.IsIso f],
  (CategoryTheory.inv f).hom = CategoryTheory.inv f.hom

instance CategoryTheory.Inserter.instReflectsIsomorphismsProj E0 #

∀ {C : Type u_1} {D : Type u_2} [inst : CategoryTheory.Category.{v_1, u_1} C]
  [inst_1 : CategoryTheory.Category.{v_2, u_2} D] (F G : CategoryTheory.Functor C D),
  (CategoryTheory.Inserter.proj F G).ReflectsIsomorphisms

theorem CategoryTheory.Inserter.isIso_iff E0 #

∀ {C : Type u_1} {D : Type u_2} [inst : CategoryTheory.Category.{v_1, u_1} C]
  [inst_1 : CategoryTheory.Category.{v_2, u_2} D] (F G : CategoryTheory.Functor C D)
  {E E' : CategoryTheory.Inserter F G} (f : E ⟶ E'), CategoryTheory.IsIso f ↔ CategoryTheory.IsIso f.hom