PlanetPhysics/Small Category

A (small) category $$\mathcal{C}$$ consists of a set of objects $$C_0$$ and a set of arrows $$C_1$$ together with the following structure:


 * a source map $$s: C_1 \to C_0$$ assigning an object $$s(f)$$ to each arrow $$f \in C_1$$ ,
 * a target map: $$t: C_1 \to C_0$$ assigning an object t(f) to each arrow $$f \in  C_1$$ ,
 * an identity map $$1 : C_0 \to C_1$$ assigning to each object $$A$$ an arrow $$1_A$$ with $$s(1_A) = t(1_A) = A,$$
 * a composition map $$\circ : C_1 \times C_1 \to C_1$$ assigning to each pair of arrows $$f,g$$, such that $$s(g) = t(f)$$, a third arrow $$g \circ f$$ with $$s(g \circ f) = s(f)$$ and $$t(g \circ f) = t(g)$$.
 * The composition thus defined "$$\circ$$" is associative, that is, $$ h \circ (g \circ f) = (h \circ g) \circ f$$ whenever these compositions make sense.
 * the identity map satisfies $$f \circ 1_A = f $$ for any $$f$$ such that $$s(f) = A$$ and $$1_A \circ g = g$$, and any $$g$$ such that $$ t(g) = A$$.