File: Mathlib/CategoryTheory/SingleObj.lean

full_name: CategoryTheory.SingleObj
code: /-- Abbreviation that allows writing `CategoryTheory.SingleObj` rather than `Quiver.SingleObj`.
-/
abbrev SingleObj 
goal: Type u_1 → Type

full_name: CategoryTheory.SingleObj.categoryStruct
code: /-- One and `flip (*)` become `id` and `comp` for morphisms of the single object category. -/
instance categoryStruct [One M] [Mul M] : CategoryStruct (SingleObj M) 
goal: CategoryTheory.CategoryStruct.{u, 0} (CategoryTheory.SingleObj M)

full_name: CategoryTheory.SingleObj.category
code: /-- Monoid laws become category laws for the single object category. -/
instance category : Category (SingleObj M) 
goal: CategoryTheory.Category.{u, 0} (CategoryTheory.SingleObj M)

full_name: CategoryTheory.SingleObj.id_as_one
code: theorem id_as_one (x : SingleObj M) : 𝟙 x = 1 
goal: 𝟙 x = 1

full_name: CategoryTheory.SingleObj.comp_as_mul
code: theorem comp_as_mul {x y z : SingleObj M} (f : x ⟶ y) (g : y ⟶ z) : f ≫ g = g * f 
goal: f ≫ g = g * f

full_name: CategoryTheory.SingleObj.finCategoryOfFintype
code: /-- If `M` is finite and in universe zero, then `SingleObj M` is a `FinCategory`. -/
instance finCategoryOfFintype (M : Type) [Fintype M] [Monoid M] : FinCategory (SingleObj M) 
goal: CategoryTheory.FinCategory (CategoryTheory.SingleObj M)

full_name: CategoryTheory.SingleObj.groupoid
code: /-- Groupoid structure on `SingleObj M`.

See <https://stacks.math.columbia.edu/tag/0019>.
-/
instance groupoid : Groupoid (SingleObj G) 
goal: CategoryTheory.Groupoid (CategoryTheory.SingleObj G)

full_name: CategoryTheory.SingleObj.inv_as_inv
code: theorem inv_as_inv {x y : SingleObj G} (f : x ⟶ y) : inv f = f⁻¹ 
goal: CategoryTheory.inv f = f⁻¹

full_name: CategoryTheory.SingleObj.star
code: /-- Abbreviation that allows writing `CategoryTheory.SingleObj.star` rather than
`Quiver.SingleObj.star`.
-/
abbrev star : SingleObj M 
goal: CategoryTheory.SingleObj M

full_name: CategoryTheory.SingleObj.toEnd
code: /-- The endomorphisms monoid of the only object in `SingleObj M` is equivalent to the original
     monoid M. -/
def toEnd : M ≃* End (SingleObj.star M) 
goal: M ≃* CategoryTheory.End (CategoryTheory.SingleObj.star M)

full_name: CategoryTheory.SingleObj.toEnd_def
code: theorem toEnd_def (x : M) : toEnd M x = x 
goal: (CategoryTheory.SingleObj.toEnd M) x = x

full_name: CategoryTheory.SingleObj.mapHom
code: /-- There is a 1-1 correspondence between monoid homomorphisms `M → N` and functors between the
    corresponding single-object categories. It means that `SingleObj` is a fully faithful
    functor.

See <https://stacks.math.columbia.edu/tag/001F> --
although we do not characterize when the functor is full or faithful.
-/
def mapHom : (M →* N) ≃ SingleObj M ⥤ SingleObj N 
goal: (M →* N) ≃ CategoryTheory.SingleObj M ⥤ CategoryTheory.SingleObj N

full_name: CategoryTheory.SingleObj.mapHom_id
code: theorem mapHom_id : mapHom M M (MonoidHom.id M) = 𝟭 _ 
goal: (CategoryTheory.SingleObj.mapHom M M) (MonoidHom.id M) = 𝟭 (CategoryTheory.SingleObj M)

full_name: CategoryTheory.SingleObj.mapHom_comp
code: theorem mapHom_comp (f : M →* N) {P : Type w} [Monoid P] (g : N →* P) :
    mapHom M P (g.comp f) = mapHom M N f ⋙ mapHom N P g 
goal: (CategoryTheory.SingleObj.mapHom M P) (g.comp f) =
  (CategoryTheory.SingleObj.mapHom M N) f ⋙ (CategoryTheory.SingleObj.mapHom N P) g

full_name: CategoryTheory.SingleObj.differenceFunctor_obj
code: /-- Given a function `f : C → G` from a category to a group, we get a functor
    `C ⥤ G` sending any morphism `x ⟶ y` to `f y * (f x)⁻¹`. -/
@[simps]
def differenceFunctor (f : C → G) : C ⥤ SingleObj G 
goal: ∀ (x : C), (CategoryTheory.SingleObj.differenceFunctor f).obj x = ()

full_name: CategoryTheory.SingleObj.differenceFunctor
code: /-- Given a function `f : C → G` from a category to a group, we get a functor
    `C ⥤ G` sending any morphism `x ⟶ y` to `f y * (f x)⁻¹`. -/
@[simps]
def differenceFunctor (f : C → G) : C ⥤ SingleObj G 
goal: C ⥤ CategoryTheory.SingleObj G

full_name: CategoryTheory.SingleObj.differenceFunctor_map
code: /-- Given a function `f : C → G` from a category to a group, we get a functor
    `C ⥤ G` sending any morphism `x ⟶ y` to `f y * (f x)⁻¹`. -/
@[simps]
def differenceFunctor (f : C → G) : C ⥤ SingleObj G 
goal: ∀ (x_1 : x ⟶ y), (CategoryTheory.SingleObj.differenceFunctor f).map x_1 = f y * (f x)⁻¹

full_name: CategoryTheory.SingleObj.functor_obj
code: /-- A monoid homomorphism `f: M → End X` into the endomorphisms of an object `X` of a category `C`
induces a functor `SingleObj M ⥤ C`. -/
@[simps]
def functor {X : C} (f : M →* End X) : SingleObj M ⥤ C 
goal: ∀ (x : CategoryTheory.SingleObj M), (CategoryTheory.SingleObj.functor f).obj x = X

full_name: CategoryTheory.SingleObj.functor
code: /-- A monoid homomorphism `f: M → End X` into the endomorphisms of an object `X` of a category `C`
induces a functor `SingleObj M ⥤ C`. -/
@[simps]
def functor {X : C} (f : M →* End X) : SingleObj M ⥤ C 
goal: CategoryTheory.SingleObj M ⥤ C

full_name: CategoryTheory.SingleObj.functor_map
code: /-- A monoid homomorphism `f: M → End X` into the endomorphisms of an object `X` of a category `C`
induces a functor `SingleObj M ⥤ C`. -/
@[simps]
def functor {X : C} (f : M →* End X) : SingleObj M ⥤ C 
goal: ∀ {X_1 Y : CategoryTheory.SingleObj M} (a : X_1 ⟶ Y), (CategoryTheory.SingleObj.functor f).map a = f a

full_name: CategoryTheory.SingleObj.natTrans_app
code: /-- Construct a natural transformation between functors `SingleObj M ⥤ C` by
giving a compatible morphism `SingleObj.star M`. -/
@[simps]
def natTrans {F G : SingleObj M ⥤ C} (u : F.obj (SingleObj.star M) ⟶ G.obj (SingleObj.star M))
    (h : ∀ a : M, F.map a ≫ u = u ≫ G.map a) : F ⟶ G 
goal: ∀ (x : CategoryTheory.SingleObj M), (CategoryTheory.SingleObj.natTrans u h).app x = u

full_name: CategoryTheory.SingleObj.natTrans
code: /-- Construct a natural transformation between functors `SingleObj M ⥤ C` by
giving a compatible morphism `SingleObj.star M`. -/
@[simps]
def natTrans {F G : SingleObj M ⥤ C} (u : F.obj (SingleObj.star M) ⟶ G.obj (SingleObj.star M))
    (h : ∀ a : M, F.map a ≫ u = u ≫ G.map a) : F ⟶ G 
goal: F ⟶ G

full_name: MonoidHom.toFunctor
code: /-- Reinterpret a monoid homomorphism `f : M → N` as a functor `(single_obj M) ⥤ (single_obj N)`.
See also `CategoryTheory.SingleObj.mapHom` for an equivalence between these types. -/
abbrev toFunctor (f : M →* N) : SingleObj M ⥤ SingleObj N 
goal: CategoryTheory.SingleObj M ⥤ CategoryTheory.SingleObj N

full_name: MonoidHom.comp_toFunctor
code: @[simp]
theorem comp_toFunctor (f : M →* N) {P : Type w} [Monoid P] (g : N →* P) :
    (g.comp f).toFunctor = f.toFunctor ⋙ g.toFunctor 
goal: (g.comp f).toFunctor = f.toFunctor ⋙ g.toFunctor

full_name: MonoidHom.id_toFunctor
code: @[simp]
theorem id_toFunctor : (id M).toFunctor = 𝟭 _ 
goal: (MonoidHom.id M).toFunctor = 𝟭 (CategoryTheory.SingleObj M)

full_name: MulEquiv.toSingleObjEquiv_functor_map
code: /-- Reinterpret a monoid isomorphism `f : M ≃* N` as an equivalence `SingleObj M ≌ SingleObj N`. -/
@[simps!]
def toSingleObjEquiv (e : M ≃* N) : SingleObj M ≌ SingleObj N 
goal: ∀ {X Y : CategoryTheory.SingleObj M} (a : M), e.toSingleObjEquiv.functor.map a = e a

full_name: MulEquiv.toSingleObjEquiv_unitIso_inv
code: /-- Reinterpret a monoid isomorphism `f : M ≃* N` as an equivalence `SingleObj M ≌ SingleObj N`. -/
@[simps!]
def toSingleObjEquiv (e : M ≃* N) : SingleObj M ≌ SingleObj N 
goal: e.toSingleObjEquiv.unitIso.inv = CategoryTheory.eqToHom ⋯

full_name: MulEquiv.toSingleObjEquiv_inverse_obj
code: /-- Reinterpret a monoid isomorphism `f : M ≃* N` as an equivalence `SingleObj M ≌ SingleObj N`. -/
@[simps!]
def toSingleObjEquiv (e : M ≃* N) : SingleObj M ≌ SingleObj N 
goal: e.toSingleObjEquiv.inverse.obj a = a

full_name: MulEquiv.toSingleObjEquiv_inverse_map
code: /-- Reinterpret a monoid isomorphism `f : M ≃* N` as an equivalence `SingleObj M ≌ SingleObj N`. -/
@[simps!]
def toSingleObjEquiv (e : M ≃* N) : SingleObj M ≌ SingleObj N 
goal: ∀ {X Y : CategoryTheory.SingleObj N} (a : N), e.toSingleObjEquiv.inverse.map a = e.symm a

full_name: MulEquiv.toSingleObjEquiv_counitIso_inv
code: /-- Reinterpret a monoid isomorphism `f : M ≃* N` as an equivalence `SingleObj M ≌ SingleObj N`. -/
@[simps!]
def toSingleObjEquiv (e : M ≃* N) : SingleObj M ≌ SingleObj N 
goal: e.toSingleObjEquiv.counitIso.inv = CategoryTheory.eqToHom ⋯

full_name: MulEquiv.toSingleObjEquiv_functor_obj
code: /-- Reinterpret a monoid isomorphism `f : M ≃* N` as an equivalence `SingleObj M ≌ SingleObj N`. -/
@[simps!]
def toSingleObjEquiv (e : M ≃* N) : SingleObj M ≌ SingleObj N 
goal: e.toSingleObjEquiv.functor.obj a = a

full_name: MulEquiv.toSingleObjEquiv_unitIso_hom
code: /-- Reinterpret a monoid isomorphism `f : M ≃* N` as an equivalence `SingleObj M ≌ SingleObj N`. -/
@[simps!]
def toSingleObjEquiv (e : M ≃* N) : SingleObj M ≌ SingleObj N 
goal: e.toSingleObjEquiv.unitIso.hom = CategoryTheory.eqToHom ⋯

full_name: MulEquiv.toSingleObjEquiv
code: /-- Reinterpret a monoid isomorphism `f : M ≃* N` as an equivalence `SingleObj M ≌ SingleObj N`. -/
@[simps!]
def toSingleObjEquiv (e : M ≃* N) : SingleObj M ≌ SingleObj N 
goal: CategoryTheory.SingleObj M ≌ CategoryTheory.SingleObj N

full_name: MulEquiv.toSingleObjEquiv_counitIso_hom
code: /-- Reinterpret a monoid isomorphism `f : M ≃* N` as an equivalence `SingleObj M ≌ SingleObj N`. -/
@[simps!]
def toSingleObjEquiv (e : M ≃* N) : SingleObj M ≌ SingleObj N 
goal: e.toSingleObjEquiv.counitIso.hom = CategoryTheory.eqToHom ⋯

full_name: Units.toAut
code: /-- The units in a monoid are (multiplicatively) equivalent to
the automorphisms of `star` when we think of the monoid as a single-object category. -/
def toAut : Mˣ ≃* Aut (SingleObj.star M) 
goal: Mˣ ≃* CategoryTheory.Aut (CategoryTheory.SingleObj.star M)

full_name: Units.toAut_hom
code: @[simp]
theorem toAut_hom (x : Mˣ) : (toAut M x).hom = SingleObj.toEnd M x 
goal: ((Units.toAut M) x).hom = (CategoryTheory.SingleObj.toEnd M) ↑x

full_name: Units.toAut_inv
code: @[simp]
theorem toAut_inv (x : Mˣ) : (toAut M x).inv = SingleObj.toEnd M (x⁻¹ : Mˣ) 
goal: ((Units.toAut M) x).inv = (CategoryTheory.SingleObj.toEnd M) ↑x⁻¹

full_name: MonCat.toCat
code: /-- The fully faithful functor from `MonCat` to `Cat`. -/
def toCat : MonCat ⥤ Cat 
goal: MonCat ⥤ CategoryTheory.Cat

full_name: MonCat.toCat_full
code: instance toCat_full : toCat.Full  
goal: MonCat.toCat.Full

full_name: MonCat.toCat_faithful
code: instance toCat_faithful : toCat.Faithful 
goal: MonCat.toCat.Faithful