The following question is taken from Arrows, Structures and Functors the categorical imperative by Arbib and Manes
In chapter 7 of Arbib and Manes about Functors. The authors introduce the category of generalised monoid as motivation and precursor to introducing functors.
- We have seen that a one-object category is a monoid, let us now see ia sense in which any category is a $\textit{generalized}$ monoid. Given $\textbf{K},$ let $$\textbf{M}_{\textbf{k}}=\coprod_{A,B\in {Obj}\textbf{K}}\textbf{K}(A,B)$$ be the collection of all $\textbf{K}-$morphisms. Composition definees a $\textit{partial}$ function $$\textbf{M}_{\textbf{k}}\times\textbf{M}_{\textbf{k}}\to\textbf{M}_{\textbf{k}}:(f,g)\mapsto g\circ f.$$
Let us see how we may recapture the identities of $\textbf{K}$ from this function: We say that $u$ is an identity if $g\circ u=g$ whenever $g\circ u$ is defined, and if $u\circ f=f$ whenever $u\circ f$ is defined. As before, each $f$ has exactly one identity $u$ such that $u\circ f$ is defined, call it $C(f)$ for the identity of the $\textit{codomain}$ of $f$; and exactly one $v$ such that $f\circ v$ is defined, call it $D(f)$ for the $\textit{domain}$ of $f.$ Thus our partial function $\textbf{M}_{\textbf{k}}\times \textbf{M}_{\textbf{k}} \to \textbf{M}_{\textbf{k}}$ satisfies the conditions:
$1.$ There are total functions $$C,D: \textbf{M}_{\textbf{k}}\to \text{identities of } \textbf{M}_{\textbf{k}}$$
for which
$$D(D(f))=D(f)=C(D(f));$$ $$\quad D(C(f))=C(f)=C(C(f)); \quad \text{and}$$ $$f\circ D(f)=f=C(f)\circ f.$$
$2.$ $g\circ f$ is defined iff $C(f)=D(g).$ If $g\circ f$ is defined then $D(g\circ f)=D(f)$ and $C(g\circ f)=C(g).$ Moreover, if either $(h\circ g)\circ f$ or $h\circ (g\circ f)$ is defined, then both are defined and $(h\circ g)\circ f=h\circ (g\circ f).$ [In fact, given a partial function satisfying $1$ and $2$ we can reconstitute a category, with objects being the identities.]
Questions about notations.
In the first definition $\textbf{M}_{\textbf{k}}=\coprod_{A,B\in {Obf}\textbf{K}}\textbf{K}(A,B)$, in $\coprod_{A,B\in {Obj}\textbf{K}}$ is it $\coprod$ (coproduct) or $\prod$ (product). The two symbols look very similar in the book.
I am having difficulty understanding the notation $D(D(f))=D(f)=C(D(f))$ because I am having trouble deciphering the sentence: "As before, each $f$ has exactly one identity $u$ such that $u\circ f$ is defined, call it $C(f)$ for the identity of the $\textit{codomain}$ of $f$; and exactly one $v$ such that $f\circ v$ is defined, call it $D(f)$ for the $\textit{domain}$ of $f.$"
I understand both $u,v$ are identity maps/functions where $u$ maps from $A$ to $A$ in $g\circ u=g$ or it is defined as a map from $B$ to $B$ in $u\circ f=f$ But the notation $C(f)$, is it $C(f):=u$ or $C(f):=u:A\to A$ or $C(f):={id}_A,$ which is stem from not able to understand what $\text{identities of } \textbf{M}_{\textbf{k}}.$ Same issues apply to how $D(f)$ for $v$ is used.
Thank you in advance
They are trying to avoid any mention of objects, to make it all more like a monoid as you see in abstract algebra. That’s why they don’t say $u: A \to A$. As long as you understand that point, that the objects are totally optional, feel free to substitute them if you prefer
$D(f)= D(D(f))$ means the domain of the identity is the same as the domain of any arrow that it may precompose with
The collection of all arrows is viewed as a coproduct (disjoint union) not product, of all the homsets