/-
Copyright (c) 2022 Kim Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kim Morrison
-/
module
public import Mathlib.CategoryTheory.Bicategory.Basic
public import Mathlib.CategoryTheory.Monoidal.Category
set_option doc.verso true
set_option doc.verso.suggestions false
/-!
# Endomorphisms of an object in a bicategory, as a monoidal category.
-/
public section
universe w v u
namespace CategoryTheory
variable {C : Type u} [Bicategory.{w, v} C]
/-- The endomorphisms of an object in a bicategory can be considered as a monoidal category. -/
abbrev EndMonoidal (X : C) :=
X ⟶ X
-- The `Category` instance should be constructed by a deriving handler.
-- https://github.com/leanprover-community/mathlib4/issues/380
instance (X : C) : Category (EndMonoidal X) :=
show Category (X ⟶ X) from inferInstance
instance (X : C) : Inhabited (EndMonoidal X) :=
⟨ X⟩
open Bicategory
open MonoidalCategory
@[simps]
instance (X : C) : MonoidalCategory (X ⟶ X)
where
tensorObj f g := f ≫ g
whiskerLeft {f _ _} η := f ◁ η
whiskerRight {_ _} η h := η ▷ h
tensorUnit := _
associator f g h := α_ f g h
leftUnitor f := λ_ f
rightUnitor f := ρ_ f
tensorHom_comp_tensorHom :=
by
intros
dsimp only
rw [Bicategory.whiskerLeft_comp, Bicategory.comp_whiskerRight, Category.assoc, Categ
ory.assoc,
Bicategory.whisker_exchange_assoc]
end CategoryTheory