Someone's Intermediate Representation

0%

Sets, maps and the map composition will be talked about in this note.

## Maps and Diagrams

An object in finite category means a finite set or collection.

A map $f$ in a category consists of three things:

• set $A$ called domain of the map
• set $B$ called codomain of the map
• A rule assigning to each element $a$ in domain, an element $b$ in codomain.

A map where domain and codomain are the same object is called endomap.

If $\forall a \in A$, $f(a) = a$, this means $f$ is an identity map, or simply $1_A$.

External Diagram is a scheme to keep track of domain and codomain, without indicating all the detail in map. Each external diagram can correspond to some map:

• $f$ that has $A$ be domain and $B$ as codomain:
$$\require{AMScd} \begin{CD} A @>{f}>> B \end{CD}$$

• $g$ being an endomap on $A$:
$$\require{AMScd} \begin{CD} A @>{g}>> A \end{CD}\\ A^{\huge{\circlearrowright}^{\Large g}}$$

• $1_A$ being an identity map:
$$\require{AMScd} \begin{CD} A @>{1_A}>> A \end{CD}\\ A^{\huge{\circlearrowright}^{\normalsize 1_A}}$$

The composition of two maps, with forms of
$$\require{AMScd} \begin{CD} X @>{g}>> Y @>{f}>> Z \end{CD}$$
can be written into $f \circ g$, which is in internal diagram form like
$$\require{AMScd} \begin{CD} X @>{f \circ g}>> Z \end{CD}$$
A singleton set is a set with exactly one element, and we can donate that set with $\boldsymbol{1}$.

A point of set $X$ is a map $\boldsymbol{1} \longrightarrow X$.

## Composing Maps and Laws

Identity law was defined as $f: A\longrightarrow B, 1_B \circ f\equiv f \circ 1_A \equiv f$.

Associative law was defined as $f : A\longrightarrow B, g:B \longrightarrow C, h: C \longrightarrow D, h\circ(g\circ f) \equiv (h\circ g)\circ f$.