# Prove that there exists a category $\mathbf{C}$ whose objects are all functions $f:A\to\mathbb{R}$.

It is required to prove that there exists a category $\mathbf{C}$ whose objects are all functions $f:A\to\mathbb{R}$ and whose morphisms from $f:A\to\mathbb{R}$ to $g:B\to\mathbb{R}$ are functions $k:A\to B$ such that $g\circ k=f$, where $A, B$ are sets.

The following is my attempt:

Let $f,g,h\in \operatorname{Obj}(\mathbf{C})$. Suppose $k_1\in\ \operatorname{Hom}(f,g),\ \ k_2\in Hom(g,h)$. Then $$h\circ(k_2\circ k_1)=(h\circ k_2)\circ k_1=g\circ k_1=f.$$

Therefore $k_2\circ k_1\in \operatorname{Hom}(f,h)$. Obviously composition of morphisms is associative because any morphism considered here is a function.

Now suppose $f,g\in \operatorname{Obj}(\mathbf{C})$, where $f:A\to\mathbb{R}$ and $g:B\to\mathbb{R}$. Then $i:B\to B$ given by $i(x)=x$ is the identity morphism on $g$ as $g\circ i=g$ and we have $i\circ k=k$ whenever $k\in \operatorname{Hom}(f,g)$. Similarly we have $k\circ \operatorname{id}_f=k$ whenever $k\in\operatorname{Hom}(f,g)$.

I'm not sure if this proof is alright. Could someone please help? I haven't studied Category Theory in a very serious/formal manner and I only know the definition of a Category and that of Functors. Thanks.

• It looks like you are about to learn the definition of a slice category : ncatlab.org/nlab/show/over+category – Arnaud D. Jul 4 '17 at 14:21
• Your proof seems perfectly correct for me. – user171326 Jul 4 '17 at 15:09