Documentation

Mathlib.CategoryTheory.Sums.Basic

Binary disjoint unions of categories #

We define the category instance on C ⊕ D when C and D are categories.

We define:

We further define sums of functors and natural transformations, written F.sum G and α.sum β.

sum C D gives the direct sum of two categories.

Equations

inl_ is the functor X ↦ inl X.

Equations
Instances For
    @[simp]
    theorem CategoryTheory.Sum.inl__map (C : Type u₁) [Category.{v₁, u₁} C] (D : Type u₁) [Category.{v₁, u₁} D] {x✝ x✝¹ : C} (f : x✝ x✝¹) :
    (inl_ C D).map f = f
    @[simp]
    theorem CategoryTheory.Sum.inl__obj (C : Type u₁) [Category.{v₁, u₁} C] (D : Type u₁) [Category.{v₁, u₁} D] (X : C) :
    (inl_ C D).obj X = Sum.inl X

    inr_ is the functor X ↦ inr X.

    Equations
    Instances For
      @[simp]
      theorem CategoryTheory.Sum.inr__obj (C : Type u₁) [Category.{v₁, u₁} C] (D : Type u₁) [Category.{v₁, u₁} D] (X : D) :
      (inr_ C D).obj X = Sum.inr X
      @[simp]
      theorem CategoryTheory.Sum.inr__map (C : Type u₁) [Category.{v₁, u₁} C] (D : Type u₁) [Category.{v₁, u₁} D] {x✝ x✝¹ : D} (f : x✝ x✝¹) :
      (inr_ C D).map f = f

      The functor exchanging two direct summand categories.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        @[simp]
        theorem CategoryTheory.Sum.swap_obj_inl (C : Type u₁) [Category.{v₁, u₁} C] (D : Type u₁) [Category.{v₁, u₁} D] (X : C) :
        (swap C D).obj (Sum.inl X) = Sum.inr X
        @[simp]
        theorem CategoryTheory.Sum.swap_obj_inr (C : Type u₁) [Category.{v₁, u₁} C] (D : Type u₁) [Category.{v₁, u₁} D] (X : D) :
        (swap C D).obj (Sum.inr X) = Sum.inl X
        @[simp]
        theorem CategoryTheory.Sum.swap_map_inl (C : Type u₁) [Category.{v₁, u₁} C] (D : Type u₁) [Category.{v₁, u₁} D] {X Y : C} {f : Sum.inl X Sum.inl Y} :
        (swap C D).map f = f
        @[simp]
        theorem CategoryTheory.Sum.swap_map_inr (C : Type u₁) [Category.{v₁, u₁} C] (D : Type u₁) [Category.{v₁, u₁} D] {X Y : D} {f : Sum.inr X Sum.inr Y} :
        (swap C D).map f = f

        swap gives an equivalence between C ⊕ D and D ⊕ C.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          instance CategoryTheory.Sum.Swap.isEquivalence (C : Type u₁) [Category.{v₁, u₁} C] (D : Type u₁) [Category.{v₁, u₁} D] :
          (swap C D).IsEquivalence

          The double swap on C ⊕ D is naturally isomorphic to the identity functor.

          Equations
          Instances For
            def CategoryTheory.Functor.sum {A : Type u₁} [Category.{v₁, u₁} A] {B : Type u₁} [Category.{v₁, u₁} B] {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₁} [Category.{v₁, u₁} D] (F : Functor A B) (G : Functor C D) :
            Functor (A C) (B D)

            The sum of two functors.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              def CategoryTheory.Functor.sum' {A : Type u₁} [Category.{v₁, u₁} A] {B : Type u₁} [Category.{v₁, u₁} B] {C : Type u₁} [Category.{v₁, u₁} C] (F : Functor A C) (G : Functor B C) :
              Functor (A B) C

              Similar to sum, but both functors land in the same category C

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                def CategoryTheory.Functor.inlCompSum' {A : Type u₁} [Category.{v₁, u₁} A] {B : Type u₁} [Category.{v₁, u₁} B] {C : Type u₁} [Category.{v₁, u₁} C] (F : Functor A C) (G : Functor B C) :
                (Sum.inl_ A B).comp (F.sum' G) F

                The sum F.sum' G precomposed with the left inclusion functor is isomorphic to F

                Equations
                Instances For
                  @[simp]
                  theorem CategoryTheory.Functor.inlCompSum'_inv_app {A : Type u₁} [Category.{v₁, u₁} A] {B : Type u₁} [Category.{v₁, u₁} B] {C : Type u₁} [Category.{v₁, u₁} C] (F : Functor A C) (G : Functor B C) (X : A) :
                  (F.inlCompSum' G).inv.app X = CategoryStruct.id ((F.sum' G).obj (Sum.inl X))
                  @[simp]
                  theorem CategoryTheory.Functor.inlCompSum'_hom_app {A : Type u₁} [Category.{v₁, u₁} A] {B : Type u₁} [Category.{v₁, u₁} B] {C : Type u₁} [Category.{v₁, u₁} C] (F : Functor A C) (G : Functor B C) (X : A) :
                  (F.inlCompSum' G).hom.app X = CategoryStruct.id ((F.sum' G).obj (Sum.inl X))
                  def CategoryTheory.Functor.inrCompSum' {A : Type u₁} [Category.{v₁, u₁} A] {B : Type u₁} [Category.{v₁, u₁} B] {C : Type u₁} [Category.{v₁, u₁} C] (F : Functor A C) (G : Functor B C) :
                  (Sum.inr_ A B).comp (F.sum' G) G

                  The sum F.sum' G precomposed with the right inclusion functor is isomorphic to G

                  Equations
                  Instances For
                    @[simp]
                    theorem CategoryTheory.Functor.inrCompSum'_inv_app {A : Type u₁} [Category.{v₁, u₁} A] {B : Type u₁} [Category.{v₁, u₁} B] {C : Type u₁} [Category.{v₁, u₁} C] (F : Functor A C) (G : Functor B C) (X : B) :
                    (F.inrCompSum' G).inv.app X = CategoryStruct.id ((F.sum' G).obj (Sum.inr X))
                    @[simp]
                    theorem CategoryTheory.Functor.inrCompSum'_hom_app {A : Type u₁} [Category.{v₁, u₁} A] {B : Type u₁} [Category.{v₁, u₁} B] {C : Type u₁} [Category.{v₁, u₁} C] (F : Functor A C) (G : Functor B C) (X : B) :
                    (F.inrCompSum' G).hom.app X = CategoryStruct.id ((F.sum' G).obj (Sum.inr X))
                    @[simp]
                    theorem CategoryTheory.Functor.sum_obj_inl {A : Type u₁} [Category.{v₁, u₁} A] {B : Type u₁} [Category.{v₁, u₁} B] {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₁} [Category.{v₁, u₁} D] (F : Functor A B) (G : Functor C D) (a : A) :
                    (F.sum G).obj (Sum.inl a) = Sum.inl (F.obj a)
                    @[simp]
                    theorem CategoryTheory.Functor.sum_obj_inr {A : Type u₁} [Category.{v₁, u₁} A] {B : Type u₁} [Category.{v₁, u₁} B] {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₁} [Category.{v₁, u₁} D] (F : Functor A B) (G : Functor C D) (c : C) :
                    (F.sum G).obj (Sum.inr c) = Sum.inr (G.obj c)
                    @[simp]
                    theorem CategoryTheory.Functor.sum_map_inl {A : Type u₁} [Category.{v₁, u₁} A] {B : Type u₁} [Category.{v₁, u₁} B] {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₁} [Category.{v₁, u₁} D] (F : Functor A B) (G : Functor C D) {a a' : A} (f : Sum.inl a Sum.inl a') :
                    (F.sum G).map f = F.map f
                    @[simp]
                    theorem CategoryTheory.Functor.sum_map_inr {A : Type u₁} [Category.{v₁, u₁} A] {B : Type u₁} [Category.{v₁, u₁} B] {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₁} [Category.{v₁, u₁} D] (F : Functor A B) (G : Functor C D) {c c' : C} (f : Sum.inr c Sum.inr c') :
                    (F.sum G).map f = G.map f
                    def CategoryTheory.NatTrans.sum {A : Type u₁} [Category.{v₁, u₁} A] {B : Type u₁} [Category.{v₁, u₁} B] {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₁} [Category.{v₁, u₁} D] {F G : Functor A B} {H I : Functor C D} (α : F G) (β : H I) :
                    F.sum H G.sum I

                    The sum of two natural transformations.

                    Equations
                    Instances For
                      @[simp]
                      theorem CategoryTheory.NatTrans.sum_app_inl {A : Type u₁} [Category.{v₁, u₁} A] {B : Type u₁} [Category.{v₁, u₁} B] {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₁} [Category.{v₁, u₁} D] {F G : Functor A B} {H I : Functor C D} (α : F G) (β : H I) (a : A) :
                      (sum α β).app (Sum.inl a) = α.app a
                      @[simp]
                      theorem CategoryTheory.NatTrans.sum_app_inr {A : Type u₁} [Category.{v₁, u₁} A] {B : Type u₁} [Category.{v₁, u₁} B] {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₁} [Category.{v₁, u₁} D] {F G : Functor A B} {H I : Functor C D} (α : F G) (β : H I) (c : C) :
                      (sum α β).app (Sum.inr c) = β.app c