File: Mathlib/CategoryTheory/Sums/Basic.lean

full_name: CategoryTheory.sum
code: /-- `sum C D` gives the direct sum of two categories.
-/
instance sum : Category.{v₁} (C ⊕ D) 
goal: CategoryTheory.Category.{v₁, u₁} (C ⊕ D)

full_name: CategoryTheory.hom_inl_inr_false
code: @[aesop norm -10 destruct (rule_sets := [CategoryTheory])]
theorem hom_inl_inr_false {X : C} {Y : D} (f : Sum.inl X ⟶ Sum.inr Y) : False 
goal: False

full_name: CategoryTheory.hom_inr_inl_false
code: @[aesop norm -10 destruct (rule_sets := [CategoryTheory])]
theorem hom_inr_inl_false {X : C} {Y : D} (f : Sum.inr X ⟶ Sum.inl Y) : False 
goal: False

full_name: CategoryTheory.sum_comp_inl
code: theorem sum_comp_inl {P Q R : C} (f : (inl P : C ⊕ D) ⟶ inl Q) (g : (inl Q : C ⊕ D) ⟶ inl R) :
    @CategoryStruct.comp _ _ P Q R (f : P ⟶ Q) (g : Q ⟶ R) =
      @CategoryStruct.comp _ _ (inl P) (inl Q) (inl R) (f : P ⟶ Q) (g : Q ⟶ R) 
goal: CategoryTheory.CategoryStruct.comp f g = CategoryTheory.CategoryStruct.comp f g

full_name: CategoryTheory.sum_comp_inr
code: theorem sum_comp_inr {P Q R : D} (f : (inr P : C ⊕ D) ⟶ inr Q) (g : (inr Q : C ⊕ D) ⟶ inr R) :
    @CategoryStruct.comp _ _ P Q R (f : P ⟶ Q) (g : Q ⟶ R) =
      @CategoryStruct.comp _ _ (inr P) (inr Q) (inr R) (f : P ⟶ Q) (g : Q ⟶ R) 
goal: CategoryTheory.CategoryStruct.comp f g = CategoryTheory.CategoryStruct.comp f g

full_name: CategoryTheory.Sum.inl__map
code: /-- `inl_` is the functor `X ↦ inl X`. -/
@[simps]
def inl_ : C ⥤ C ⊕ D 
goal: (CategoryTheory.Sum.inl_ C D).map f = f

full_name: CategoryTheory.Sum.inl_
code: /-- `inl_` is the functor `X ↦ inl X`. -/
@[simps]
def inl_ : C ⥤ C ⊕ D 
goal: CategoryTheory.Functor C (C ⊕ D)

full_name: CategoryTheory.Sum.inl__obj
code: /-- `inl_` is the functor `X ↦ inl X`. -/
@[simps]
def inl_ : C ⥤ C ⊕ D 
goal: (CategoryTheory.Sum.inl_ C D).obj X = Sum.inl X

full_name: CategoryTheory.Sum.inr_
code: /-- `inr_` is the functor `X ↦ inr X`. -/
@[simps]
def inr_ : D ⥤ C ⊕ D 
goal: CategoryTheory.Functor D (C ⊕ D)

full_name: CategoryTheory.Sum.inr__map
code: /-- `inr_` is the functor `X ↦ inr X`. -/
@[simps]
def inr_ : D ⥤ C ⊕ D 
goal: (CategoryTheory.Sum.inr_ C D).map f = f

full_name: CategoryTheory.Sum.inr__obj
code: /-- `inr_` is the functor `X ↦ inr X`. -/
@[simps]
def inr_ : D ⥤ C ⊕ D 
goal: (CategoryTheory.Sum.inr_ C D).obj X = Sum.inr X

full_name: CategoryTheory.Sum.swap
code: /-- The functor exchanging two direct summand categories. -/
def swap : C ⊕ D ⥤ D ⊕ C 
goal: CategoryTheory.Functor (C ⊕ D) (D ⊕ C)

full_name: CategoryTheory.Sum.swap_obj_inl
code: @[simp]
theorem swap_obj_inl (X : C) : (swap C D).obj (inl X) = inr X 
goal: (CategoryTheory.Sum.swap C D).obj (Sum.inl X) = Sum.inr X

full_name: CategoryTheory.Sum.swap_obj_inr
code: @[simp]
theorem swap_obj_inr (X : D) : (swap C D).obj (inr X) = inl X 
goal: (CategoryTheory.Sum.swap C D).obj (Sum.inr X) = Sum.inl X

full_name: CategoryTheory.Sum.swap_map_inl
code: @[simp]
theorem swap_map_inl {X Y : C} {f : inl X ⟶ inl Y} : (swap C D).map f = f 
goal: (CategoryTheory.Sum.swap C D).map f = f

full_name: CategoryTheory.Sum.swap_map_inr
code: @[simp]
theorem swap_map_inr {X Y : D} {f : inr X ⟶ inr Y} : (swap C D).map f = f 
goal: (CategoryTheory.Sum.swap C D).map f = f

full_name: CategoryTheory.Sum.Swap.equivalence
code: /-- `swap` gives an equivalence between `C ⊕ D` and `D ⊕ C`. -/
def equivalence : C ⊕ D ≌ D ⊕ C 
goal: C ⊕ D ≌ D ⊕ C

full_name: CategoryTheory.Sum.Swap.isEquivalence
code: instance isEquivalence : (swap C D).IsEquivalence 
goal: (CategoryTheory.Sum.swap C D).IsEquivalence

full_name: CategoryTheory.Sum.Swap.symmetry
code: /-- The double swap on `C ⊕ D` is naturally isomorphic to the identity functor. -/
def symmetry : swap C D ⋙ swap D C ≅ 𝟭 (C ⊕ D) 
goal: (CategoryTheory.Sum.swap C D).comp (CategoryTheory.Sum.swap D C) ≅ CategoryTheory.Functor.id (C ⊕ D)

full_name: CategoryTheory.Functor.sum
code: /-- The sum of two functors. -/
def sum (F : A ⥤ B) (G : C ⥤ D) : A ⊕ C ⥤ B ⊕ D 
goal: CategoryTheory.Functor (A ⊕ C) (B ⊕ D)

full_name: CategoryTheory.Functor.sum'
code: /-- Similar to `sum`, but both functors land in the same category `C` -/
def sum' (F : A ⥤ C) (G : B ⥤ C) : A ⊕ B ⥤ C 
goal: CategoryTheory.Functor (A ⊕ B) C

full_name: CategoryTheory.Functor.inlCompSum'_hom_app
code: /-- The sum `F.sum' G` precomposed with the left inclusion functor is isomorphic to `F` -/
@[simps!]
def inlCompSum' (F : A ⥤ C) (G : B ⥤ C) : Sum.inl_ A B ⋙ F.sum' G ≅ F 
goal: (F.inlCompSum' G).hom.app X = CategoryTheory.CategoryStruct.id ((F.sum' G).obj (Sum.inl X))

full_name: CategoryTheory.Functor.inlCompSum'_inv_app
code: /-- The sum `F.sum' G` precomposed with the left inclusion functor is isomorphic to `F` -/
@[simps!]
def inlCompSum' (F : A ⥤ C) (G : B ⥤ C) : Sum.inl_ A B ⋙ F.sum' G ≅ F 
goal: (F.inlCompSum' G).inv.app X = CategoryTheory.CategoryStruct.id ((F.sum' G).obj (Sum.inl X))

full_name: CategoryTheory.Functor.inlCompSum'
code: /-- The sum `F.sum' G` precomposed with the left inclusion functor is isomorphic to `F` -/
@[simps!]
def inlCompSum' (F : A ⥤ C) (G : B ⥤ C) : Sum.inl_ A B ⋙ F.sum' G ≅ F 
goal: (CategoryTheory.Sum.inl_ A B).comp (F.sum' G) ≅ F

full_name: CategoryTheory.Functor.inrCompSum'_hom_app
code: /-- The sum `F.sum' G` precomposed with the right inclusion functor is isomorphic to `G` -/
@[simps!]
def inrCompSum' (F : A ⥤ C) (G : B ⥤ C) : Sum.inr_ A B ⋙ F.sum' G ≅ G 
goal: (F.inrCompSum' G).hom.app X = CategoryTheory.CategoryStruct.id ((F.sum' G).obj (Sum.inr X))

full_name: CategoryTheory.Functor.inrCompSum'
code: /-- The sum `F.sum' G` precomposed with the right inclusion functor is isomorphic to `G` -/
@[simps!]
def inrCompSum' (F : A ⥤ C) (G : B ⥤ C) : Sum.inr_ A B ⋙ F.sum' G ≅ G 
goal: (CategoryTheory.Sum.inr_ A B).comp (F.sum' G) ≅ G

full_name: CategoryTheory.Functor.inrCompSum'_inv_app
code: /-- The sum `F.sum' G` precomposed with the right inclusion functor is isomorphic to `G` -/
@[simps!]
def inrCompSum' (F : A ⥤ C) (G : B ⥤ C) : Sum.inr_ A B ⋙ F.sum' G ≅ G 
goal: (F.inrCompSum' G).inv.app X = CategoryTheory.CategoryStruct.id ((F.sum' G).obj (Sum.inr X))

full_name: CategoryTheory.Functor.sum_obj_inl
code: @[simp]
theorem sum_obj_inl (F : A ⥤ B) (G : C ⥤ D) (a : A) : (F.sum G).obj (inl a) = inl (F.obj a) 
goal: (F.sum G).obj (Sum.inl a) = Sum.inl (F.obj a)

full_name: CategoryTheory.Functor.sum_obj_inr
code: @[simp]
theorem sum_obj_inr (F : A ⥤ B) (G : C ⥤ D) (c : C) : (F.sum G).obj (inr c) = inr (G.obj c) 
goal: (F.sum G).obj (Sum.inr c) = Sum.inr (G.obj c)

full_name: CategoryTheory.Functor.sum_map_inl
code: @[simp]
theorem sum_map_inl (F : A ⥤ B) (G : C ⥤ D) {a a' : A} (f : inl a ⟶ inl a') :
    (F.sum G).map f = F.map f 
goal: (F.sum G).map f = F.map f

full_name: CategoryTheory.Functor.sum_map_inr
code: @[simp]
theorem sum_map_inr (F : A ⥤ B) (G : C ⥤ D) {c c' : C} (f : inr c ⟶ inr c') :
    (F.sum G).map f = G.map f 
goal: (F.sum G).map f = G.map f

full_name: CategoryTheory.NatTrans.sum
code: /-- The sum of two natural transformations. -/
def sum {F G : A ⥤ B} {H I : C ⥤ D} (α : F ⟶ G) (β : H ⟶ I) : F.sum H ⟶ G.sum I 
goal: F.sum H ⟶ G.sum I

full_name: CategoryTheory.NatTrans.sum_app_inl
code: @[simp]
theorem sum_app_inl {F G : A ⥤ B} {H I : C ⥤ D} (α : F ⟶ G) (β : H ⟶ I) (a : A) :
    (sum α β).app (inl a) = α.app a 
goal: (CategoryTheory.NatTrans.sum α β).app (Sum.inl a) = α.app a

full_name: CategoryTheory.NatTrans.sum_app_inr
code: @[simp]
theorem sum_app_inr {F G : A ⥤ B} {H I : C ⥤ D} (α : F ⟶ G) (β : H ⟶ I) (c : C) :
    (sum α β).app (inr c) = β.app c 
goal: (CategoryTheory.NatTrans.sum α β).app (Sum.inr c) = β.app c