definition example

For an object of a Category , the endomorphism monoid is with composition as multiplication and as unit. Its invertible elements form the automorphism group . In other words, is the full Subcategory of on the single object — a one-object category, i.e. a Monoid (CTfS Slogan 4.2.1.2) — and is its largest sub-Groupoid.

Sources: CTfS §4.2.1 (Exercises 4.2.1.8–4.2.1.11), Slogans 4.2.1.2, 4.2.1.5; 7 Sketches §3.2 (monoids as one-object categories).

Examples

  • Functions on a finite set (CTfS Exercise 4.2.1.10): for in , has elements, while is the symmetric group with elements. The inclusion is a proper submonoid: a monoid need not be the underlying monoid of any group.
  • Symmetries of a square (CTfS Exercise 4.2.1.11): in take the graph with vertices and arrows in both directions along the 4-cycle . Its automorphisms are the vertex permutations preserving adjacency — the 8 symmetries of a square, the dihedral group of Group Action.
  • A monoid as a category: if is a monoid viewed as a one-object category with object , then — every monoid is an endomorphism monoid. Every monoid is even an endomorphism monoid in : embeds in by (Cayley).
  • Linear maps: is the monoid of matrices under multiplication; .
  • In a preorder every hom-set has at most one element, so .

Why it matters

A Monoid Action of on is the same thing as a monoid homomorphism , and a Group Action of is a group homomorphism — this is the proof of the Finite State Machine proposition. More generally, acts on every hom-set by precomposition, and a Functor restricts to homomorphisms and (functors preserve isomorphisms). “Symmetry” in the categorical sense means an automorphism group.

Docs: FinSets · C-set morphisms · ACSets API · Graphs

using Catlab
# End(S) and Aut(S) for S = {1,2,3,4} (CTfS Exercise 4.2.1.10)
S = FinSet(4)
endos = [FinFunction(collect(f), S, S) for f in Iterators.product(fill(1:4, 4)...)]
autos = filter(f -> allunique(collect(f)), endos)
length(endos), length(autos)                                 # (256, 24)
# Aut of the symmetric 4-cycle 1-2-4-3-1 (CTfS Exercise 4.2.1.11): graph automorphisms
C4 = @acset Graph begin V = 4; E = 8
  src = [1, 2, 1, 3, 2, 4, 3, 4]; tgt = [2, 1, 3, 1, 4, 2, 4, 3] end
length(isomorphisms(C4, C4))                                  # 8 = |D₄|
import Mathlib
open CategoryTheory
#check @End         -- End X := X ⟶ X, a Monoid under composition
#check @Aut         -- Aut X := X ≅ X, a Group
#check @Aut.unitsEndEquivAut   -- (End X)ˣ ≃* Aut X: automorphisms are the invertible endomorphisms
example : Fintype.card (Equiv.Perm (Fin 4)) = 24 := by simp [Fintype.card_perm]
example : Fintype.card (Fin 4 → Fin 4) = 256 := by simp
import Data.List (permutations, nub)
import Data.Monoid (Endo(..))       -- the endomorphism monoid of a Haskell type
 
-- End({1,2,3,4}) as lookup tables, Aut as the bijective ones
endos :: [[Int]]
endos = sequence (replicate 4 [1..4])
autos :: [[Int]]
autos = filter (\f -> length (nub f) == 4) endos
-- (length endos, length autos) == (256, 24); autos == permutations [1..4] up to order
 
twiceThenInc :: Endo Int
twiceThenInc = Endo (+1) <> Endo (*2)   -- composition: appEndo twiceThenInc 5 == 11