--- title: Exercises in Category Theory — 1.1 published: 2016-01-29 tags: Category Theory ---
Sets and functions do form a category $\ca{Set}$.
The objects of $\ca{Set}$ are sets and its arrows are functions. For any set $A$ we construct $id_A$ by restricting $id$ to $A$: $$id_A = id \upharpoonright A$$ $\circ$ is indeed associative.
Each [poset](https://en.wikipedia.org/wiki/Partially_ordered_set) is a category.
The objects of each poset are its elements and we construct an arrow $\leq: a \to b$ for every pair of objects $(a, b)$ iff $a \leq b$. Reflexivity ($a \leq a$) and transitivity ($a \leq b \land b \leq c \implies a \leq c$) provide a construction for $id_a$ and $\circ$, respectively.
Each [monoid](https://en.wikipedia.org/wiki/Monoid) is a category.
The objects of each monoid are its elements and we construct for every pair of elements $(a, b)$ an arrow $\cdot b : a \to a \cdot b$. The existence of an identity element and associativity, as required by the monoid structure, immediately provide us with a construction for $id$ and associativity of $\circ$.