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.SingleObj

47 declarations and 2 deprecated aliases. Mathlib docs · Source

Single-object category

Single object category with a given monoid of endomorphisms. It is defined to facilitate transferring some definitions and lemmas (e.g., conjugacy etc.) from category theory to monoids and groups.

Main definitions

Given a type M with a monoid structure, SingleObj M is Unit type with Category structure such that End (SingleObj M).star is the monoid M. This can be extended to a functor MonCat ⥤ Cat.

If M is a group, then SingleObj M is a groupoid.

An element x : M can be reinterpreted as an element of End (SingleObj.star M) using SingleObj.toEnd.

Implementation notes

  • categoryStruct.comp on End (SingleObj.star M) is flip (*), not (*). This way multiplication on End agrees with the multiplication on M.

  • By default, Lean puts instances into CategoryTheory namespace instead of CategoryTheory.SingleObj, so we give all names explicitly.

abbrev CategoryTheory.SingleObj E1 #

Type u_1 → Type

Abbreviation that allows writing CategoryTheory.SingleObj rather than Quiver.SingleObj.

instance CategoryTheory.SingleObj.categoryStruct E0 #

(M : Type u) → [One M] → [Mul M] → CategoryTheory.CategoryStruct.{u, 0} (CategoryTheory.SingleObj M)

One and flip (*) become id and comp for morphisms of the single object category.

instance CategoryTheory.SingleObj.category E0 #

(M : Type u) → [Monoid M] → CategoryTheory.Category.{u, 0} (CategoryTheory.SingleObj M)

Monoid laws become category laws for the single object category.

theorem CategoryTheory.SingleObj.id_as_one E1 #

∀ (M : Type u) [inst : Monoid M] (x : CategoryTheory.SingleObj M), CategoryTheory.CategoryStruct.id x = 1

theorem CategoryTheory.SingleObj.comp_as_mul E1 #

∀ (M : Type u) [inst : Monoid M] {x y z : CategoryTheory.SingleObj M} (f : x ⟶ y) (g : y ⟶ z),
  CategoryTheory.CategoryStruct.comp f g = g * f

instance CategoryTheory.SingleObj.finCategoryOfFintype E0 #

(M : Type) → [Fintype M] → [inst : Monoid M] → CategoryTheory.FinCategory (CategoryTheory.SingleObj M)

If M is finite and in universe zero, then SingleObj M is a FinCategory.

instance CategoryTheory.SingleObj.groupoid E0 #

(G : Type u) → [Group G] → CategoryTheory.Groupoid (CategoryTheory.SingleObj G)

Groupoid structure on SingleObj M.

theorem CategoryTheory.SingleObj.inv_as_inv E1 #

∀ (G : Type u) [inst : Group G] {x y : CategoryTheory.SingleObj G} (f : x ⟶ y), CategoryTheory.inv f = f⁻¹

abbrev CategoryTheory.SingleObj.star E1 #

(M : Type u) → CategoryTheory.SingleObj M

Abbreviation that allows writing CategoryTheory.SingleObj.star rather than Quiver.SingleObj.star.

def CategoryTheory.SingleObj.toEnd E3 #

(M : Type u) → [inst : Monoid M] → M ≃* CategoryTheory.End (CategoryTheory.SingleObj.star M)

The endomorphisms monoid of the only object in SingleObj M is equivalent to the original monoid M.

theorem CategoryTheory.SingleObj.toEnd_apply_asHom E1 #

∀ (M : Type u) [inst : Monoid M] (a : CategoryTheory.SingleObj.star M ⟶ CategoryTheory.SingleObj.star M),
  ((CategoryTheory.SingleObj.toEnd M) a).asHom = a

theorem CategoryTheory.SingleObj.toEnd_symm_apply E0 #

∀ (M : Type u) [inst : Monoid M] (a : CategoryTheory.End (CategoryTheory.SingleObj.star M)),
  (CategoryTheory.SingleObj.toEnd M).symm a = a.asHom

theorem CategoryTheory.SingleObj.toEnd_def E0 #

∀ (M : Type u) [inst : Monoid M] (x : M), (CategoryTheory.SingleObj.toEnd M) x = { asHom := x }

def CategoryTheory.SingleObj.mapHom E1 #

(M : Type u) →
  [inst : Monoid M] →
    (N : Type v) →
      [inst_1 : Monoid N] → (M →* N) ≃ CategoryTheory.Functor (CategoryTheory.SingleObj M) (CategoryTheory.SingleObj N)

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.

theorem CategoryTheory.SingleObj.mapHom_apply_map E0 #

∀ (M : Type u) [inst : Monoid M] (N : Type v) [inst_1 : Monoid N] (f : M →* N) {X Y : CategoryTheory.SingleObj M}
  (a : M), ((CategoryTheory.SingleObj.mapHom M N) f).map a = f a

theorem CategoryTheory.SingleObj.mapHom_apply_obj E0 #

∀ (M : Type u) [inst : Monoid M] (N : Type v) [inst_1 : Monoid N] (f : M →* N) (a : CategoryTheory.SingleObj M),
  ((CategoryTheory.SingleObj.mapHom M N) f).obj a = id a

theorem CategoryTheory.SingleObj.mapHom_symm_apply_apply E0 #

∀ (M : Type u) [inst : Monoid M] (N : Type v) [inst_1 : Monoid N]
  (f : CategoryTheory.Functor (CategoryTheory.SingleObj M) (CategoryTheory.SingleObj N)) (x : M),
  ((CategoryTheory.SingleObj.mapHom M N).symm f) x =
    ((CategoryTheory.Functor.mapEnd (CategoryTheory.SingleObj.star M) f) ((CategoryTheory.SingleObj.toEnd M) x)).asHom

theorem CategoryTheory.SingleObj.mapHom_id E1 #

∀ (M : Type u) [inst : Monoid M],
  (CategoryTheory.SingleObj.mapHom M M) (MonoidHom.id M) = CategoryTheory.Functor.id (CategoryTheory.SingleObj M)

theorem CategoryTheory.SingleObj.mapHom_comp E1 #

∀ {M : Type u} [inst : Monoid M] {N : Type v} [inst_1 : Monoid N] (f : M →* N) {P : Type w} [inst_2 : Monoid P]
  (g : N →* P),
  (CategoryTheory.SingleObj.mapHom M P) (g.comp f) =
    ((CategoryTheory.SingleObj.mapHom M N) f).comp ((CategoryTheory.SingleObj.mapHom N P) g)

def CategoryTheory.SingleObj.differenceFunctor E1 #

{G : Type u} →
  [inst : Group G] →
    {C : Type v} →
      [inst_1 : CategoryTheory.Category.{w, v} C] → (C → G) → CategoryTheory.Functor C (CategoryTheory.SingleObj G)

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)⁻¹.

theorem CategoryTheory.SingleObj.differenceFunctor_map E0 #

∀ {G : Type u} [inst : Group G] {C : Type v} [inst_1 : CategoryTheory.Category.{w, v} C] (f : C → G) {x y : C}
  (x_1 : x ⟶ y), (CategoryTheory.SingleObj.differenceFunctor f).map x_1 = f y * (f x)⁻¹

theorem CategoryTheory.SingleObj.differenceFunctor_obj E0 #

∀ {G : Type u} [inst : Group G] {C : Type v} [inst_1 : CategoryTheory.Category.{w, v} C] (f : C → G) (x : C),
  (CategoryTheory.SingleObj.differenceFunctor f).obj x = ()

def CategoryTheory.SingleObj.functor E1 #

{M : Type u} →
  [inst : Monoid M] →
    {C : Type v} →
      [inst_1 : CategoryTheory.Category.{w, v} C] →
        {X : C} → (M →* CategoryTheory.End X) → CategoryTheory.Functor (CategoryTheory.SingleObj M) C

A monoid homomorphism f: M → End X into the endomorphisms of an object X of a category C induces a functor SingleObj M ⥤ C.

theorem CategoryTheory.SingleObj.functor_map E0 #

∀ {M : Type u} [inst : Monoid M] {C : Type v} [inst_1 : CategoryTheory.Category.{w, v} C] {X : C}
  (f : M →* CategoryTheory.End X) {X_1 Y : CategoryTheory.SingleObj M} (a : X_1 ⟶ Y),
  (CategoryTheory.SingleObj.functor f).map a = (f a).asHom

theorem CategoryTheory.SingleObj.functor_obj E0 #

∀ {M : Type u} [inst : Monoid M] {C : Type v} [inst_1 : CategoryTheory.Category.{w, v} C] {X : C}
  (f : M →* CategoryTheory.End X) (x : CategoryTheory.SingleObj M), (CategoryTheory.SingleObj.functor f).obj x = X

def CategoryTheory.SingleObj.natTrans E1 #

{M : Type u} →
  [inst : Monoid M] →
    {C : Type v} →
      [inst_1 : CategoryTheory.Category.{w, v} C] →
        {F G : CategoryTheory.Functor (CategoryTheory.SingleObj M) C} →
          (u : F.obj (CategoryTheory.SingleObj.star M) ⟶ G.obj (CategoryTheory.SingleObj.star M)) →
            (∀ (a : M),
                CategoryTheory.CategoryStruct.comp (F.map a) u = CategoryTheory.CategoryStruct.comp u (G.map a)) →
              (F ⟶ G)

Construct a natural transformation between functors SingleObj M ⥤ C by giving a compatible morphism SingleObj.star M.

theorem CategoryTheory.SingleObj.natTrans_app E0 #

∀ {M : Type u} [inst : Monoid M] {C : Type v} [inst_1 : CategoryTheory.Category.{w, v} C]
  {F G : CategoryTheory.Functor (CategoryTheory.SingleObj M) C}
  (u : F.obj (CategoryTheory.SingleObj.star M) ⟶ G.obj (CategoryTheory.SingleObj.star M))
  (h : ∀ (a : M), CategoryTheory.CategoryStruct.comp (F.map a) u = CategoryTheory.CategoryStruct.comp u (G.map a))
  (x : CategoryTheory.SingleObj M), (CategoryTheory.SingleObj.natTrans u h).app x = u

abbrev MonoidHom.toFunctor E1 #

{M : Type u} →
  {N : Type v} →
    [inst : Monoid M] →
      [inst_1 : Monoid N] → (M →* N) → CategoryTheory.Functor (CategoryTheory.SingleObj M) (CategoryTheory.SingleObj N)

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.

theorem MonoidHom.comp_toFunctor E0 #

∀ {M : Type u} {N : Type v} [inst : Monoid M] [inst_1 : Monoid N] (f : M →* N) {P : Type w} [inst_2 : Monoid P]
  (g : N →* P), (g.comp f).toFunctor = f.toFunctor.comp g.toFunctor

theorem MonoidHom.id_toFunctor E0 #

∀ (M : Type u) [inst : Monoid M], (MonoidHom.id M).toFunctor = CategoryTheory.Functor.id (CategoryTheory.SingleObj M)

def MulEquiv.toSingleObjEquiv E1 #

{M : Type u} →
  {N : Type v} →
    [inst : Monoid M] → [inst_1 : Monoid N] → M ≃* N → (CategoryTheory.SingleObj M ≌ CategoryTheory.SingleObj N)

Reinterpret a monoid isomorphism f : M ≃* N as an equivalence SingleObj M ≌ SingleObj N.

theorem MulEquiv.toSingleObjEquiv_unitIso_hom_app E0 #

∀ {M : Type u} {N : Type v} [inst : Monoid M] [inst_1 : Monoid N] (e : M ≃* N) (X : CategoryTheory.SingleObj M),
  e.toSingleObjEquiv.unitIso.hom.app X = CategoryTheory.CategoryStruct.id X

theorem MulEquiv.toSingleObjEquiv_inverse_map E0 #

∀ {M : Type u} {N : Type v} [inst : Monoid M] [inst_1 : Monoid N] (e : M ≃* N) {X Y : CategoryTheory.SingleObj N}
  (a : N), e.toSingleObjEquiv.inverse.map a = e.symm a

theorem MulEquiv.toSingleObjEquiv_counitIso_inv_app E0 #

∀ {M : Type u} {N : Type v} [inst : Monoid M] [inst_1 : Monoid N] (e : M ≃* N) (X : CategoryTheory.SingleObj N),
  e.toSingleObjEquiv.counitIso.inv.app X = CategoryTheory.CategoryStruct.id X

theorem MulEquiv.toSingleObjEquiv_functor_obj E0 #

∀ {M : Type u} {N : Type v} [inst : Monoid M] [inst_1 : Monoid N] (e : M ≃* N) (a : CategoryTheory.SingleObj M),
  e.toSingleObjEquiv.functor.obj a = a

theorem MulEquiv.toSingleObjEquiv_inverse_obj E0 #

∀ {M : Type u} {N : Type v} [inst : Monoid M] [inst_1 : Monoid N] (e : M ≃* N) (a : CategoryTheory.SingleObj N),
  e.toSingleObjEquiv.inverse.obj a = a

theorem MulEquiv.toSingleObjEquiv_counitIso_hom_app E0 #

∀ {M : Type u} {N : Type v} [inst : Monoid M] [inst_1 : Monoid N] (e : M ≃* N) (X : CategoryTheory.SingleObj N),
  e.toSingleObjEquiv.counitIso.hom.app X = CategoryTheory.CategoryStruct.id X

theorem MulEquiv.toSingleObjEquiv_unitIso_inv_app E0 #

∀ {M : Type u} {N : Type v} [inst : Monoid M] [inst_1 : Monoid N] (e : M ≃* N) (X : CategoryTheory.SingleObj M),
  e.toSingleObjEquiv.unitIso.inv.app X = CategoryTheory.CategoryStruct.id X

theorem MulEquiv.toSingleObjEquiv_functor_map E0 #

∀ {M : Type u} {N : Type v} [inst : Monoid M] [inst_1 : Monoid N] (e : M ≃* N) {X Y : CategoryTheory.SingleObj M}
  (a : M), e.toSingleObjEquiv.functor.map a = e a

def Units.toAut E1 #

(M : Type u) → [inst : Monoid M] → Mˣ ≃* CategoryTheory.Aut (CategoryTheory.SingleObj.star M)

The units in a monoid are (multiplicatively) equivalent to the automorphisms of star when we think of the monoid as a single-object category.

theorem Units.toAut_apply_asIso_hom E0 #

∀ (M : Type u) [inst : Monoid M] (a : Mˣ), ((Units.toAut M) a).asIso.hom = ((CategoryTheory.SingleObj.toEnd M) ↑a).asHom

theorem Units.toAut_apply_asIso_inv E0 #

∀ (M : Type u) [inst : Monoid M] (a : Mˣ),
  ((Units.toAut M) a).asIso.inv = (↑((Units.mapEquiv (CategoryTheory.SingleObj.toEnd M)) a)⁻¹).asHom

theorem Units.val_inv_toAut_symm_apply E0 #

∀ (M : Type u) [inst : Monoid M] (a : CategoryTheory.Aut (CategoryTheory.SingleObj.star M)),
  ↑((Units.toAut M).symm a)⁻¹ =
    (CategoryTheory.SingleObj.toEnd M).symm
      ↑((CategoryTheory.Aut.unitsEndEquivAut (CategoryTheory.SingleObj.star M)).symm a)⁻¹

theorem Units.val_toAut_symm_apply E0 #

∀ (M : Type u) [inst : Monoid M] (a : CategoryTheory.Aut (CategoryTheory.SingleObj.star M)),
  ↑((Units.toAut M).symm a) =
    (CategoryTheory.SingleObj.toEnd M).symm
      ↑((CategoryTheory.Aut.unitsEndEquivAut (CategoryTheory.SingleObj.star M)).symm a)

def MonCat.toCat E1 #

CategoryTheory.Functor MonCat CategoryTheory.Cat

The fully faithful functor from MonCat to Cat.

instance MonCat.toCat_full E0 #

MonCat.toCat.Full

instance MonCat.toCat_faithful E0 #

MonCat.toCat.Faithful

Deprecated aliases

NameNew nameSince
Units.toAut_homUnits.toAut_apply_asIso_hom2026-09-12
Units.toAut_invUnits.toAut_apply_asIso_inv2026-09-12