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:XYf : X\rightarrow Y is injective if x,yX:f(x)=f(y)    x=y\forall x, y\in X: f(x) = f(y) \implies x=y

[def 3] a function f:XYf : X\rightarrow Y is surjective if yY,xX:f(x)=y\forall y\in Y, \exists x\in X: f(x) = y

[def 4] a function f:XYf : X\rightarrow Y is monic if g,h:ZX,fg=fh    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:XYf : X\rightarrow Y is epic if g,h:YZ,gf=hf    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:CAf: C\rightarrow A and g:CBg: C\rightarrow B, there exists a unique arrow: f,g:CA×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., π1f,g=f\pi_1 \circ \lang f, g\rang = f and π2f,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:CDF: \mathcal{C}\rightarrow \mathcal{D} assigns:

An object ACA\in \mathcal{C} is initial for every object BCB\in \mathcal{C} there exists a unique arrow ABA\rightarrow B. An object ACA\in \mathcal{C} is final if for any object BCB\in \mathcal{C} there exists a unique arrow BAB\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.