categories

from “the method of coalgebra”, a book by j. rutten

[def 1] a category CC consists of

graph LR
    A -- $$f$$ --> B
    B -- $$g$$ --> C
    A -- $$g\circ f$$ --> C

For example, a pre-ordered set (P,≤P,\le) is a category where:

With this example we notice that lattices are also categories!

Given that we only talk about objects and arrows, it’s important to be explicit about the types of objects (and arrows’ domain/codomain).

[def 2] a function f:X→Yf : X\rightarrow Y is injective if ∀x,y∈X:f(x)=f(y)  ⟹  x=y\forall x, y\in X: f(x) = f(y) \implies x=y

[def 3] a function f:X→Yf : X\rightarrow Y is surjective if ∀y∈Y,∃x∈X:f(x)=y\forall y\in Y, \exists x\in X: f(x) = y

[def 4] a function f:X→Yf : X\rightarrow Y is monic if ∀g,h:Z→X,f∘g=f∘h  ⟹  g=h\forall g, h : Z\rightarrow X, f\circ g = f\circ h \implies g = h

graph LR
    Z -- $$f\circ g$$ --> Y
    Z -- $$g$$ --> X
    X -- $$f$$ --> Y
    Z -- $$h$$ --> X
    Z -- $$f\circ h$$ --> Y

[def 5] a function f:X→Yf : X\rightarrow Y is epic if ∀g,h:Y→Z,g∘f=h∘f  ⟹  g=h\forall g, h : Y\rightarrow Z, g\circ f = h\circ f \implies g = h

graph LR
    X -- $$g\circ f$$ --> Z
    Y -- $$g$$ --> Z
    X -- $$f$$ --> Y
    Y -- $$h$$ --> Z
    X -- $$h\circ f$$ --> Z

ff is injective iff monic and surjective iff epic.

We care about how an object behaves and interacts with other objects, rather than how it’s constructed.

[def 6] a product of AA and BB is an object A×BA\times B with two arrows called projections:

graph
    P($$A\times B$$)
    P -- $$\pi_1$$ --> B
    P -- $$\pi_2$$ --> C

such that for all objects CC and arrows f:C→Af: C\rightarrow A and g:C→Bg: C\rightarrow B, there exists a unique arrow: ⟨f,g⟩:C→A×B\lang f,g \rang : C\rightarrow A\times B satisfying:

graph 
    P($$A\times B$$)
    Q($$\forall C$$)
    Q -- $$f$$ --> A
    P -- $$\pi_1$$ --> A
    Q -- $$\exists! \lang f, g\rang$$ --> P
    Q -- $$g$$ --> B
    P -- $$\pi_2$$ --> B

i.e., π1∘⟨f,g⟩=f\pi_1 \circ \lang f, g\rang = f and π2∘⟨f,g⟩=g\pi_2 \circ \lang f, g\rang = g, with unique ⟨f,g⟩\lang f, g\rang. Products are unique up to isomorphism!

[def 7] a functor F:C→DF: \mathcal{C}\rightarrow \mathcal{D} assigns:

An object A∈CA\in \mathcal{C} is initial for every object B∈CB\in \mathcal{C} there exists a unique arrow A→BA\rightarrow B. An object A∈CA\in \mathcal{C} is final if for any object B∈CB\in \mathcal{C} there exists a unique arrow B→AB\rightarrow A.

When reverting the arrows in a category we obtain a new property called dual. For example, reversing the monic diagram:

graph LR
    A-- $$g$$ --> B
    B -- $$f$$ --> C
    A -- $$h$$ --> B

  ⟹  g=h\implies g = h

we obtain:

graph RL
    B -- $$g$$ --> A
    C -- $$f$$ --> B
    B -- $$h$$ --> A

  ⟹  g=h\implies g = h

yields the epic diagram.