# Help with the proof that $A^*$ has the UMP of the free monoid

In the following proof $A^*$ here is a Kleele closure and $*$ is a product of $a$'s or "concatanation":

Proposition 1.9. $A^*$ has the UMP of the free monoid on A.
Proof. Given $f:A\to|N|$, define $\bar{f}:A^* \to N$ by
$\bar{f}(-) = u_N$, the unit of $N$
$\bar{f}(a_1 ... a_i) = f(a_1) \cdot_N ... \cdot_N f(a_i)$

Then $\bar{f}$ is clearly a homomorphism with
$\bar{f}(a) = f(a)$ for all $a \in A$

If $g:A^* \to N$ also satisfies $g(a)=f(a)$ for all $a\in A$, then for all $a_1 ... a_i \in A^*$:

$$g(a_1 ... a_i) = g(a_1 * ... * a_i)) \\ =g(a_1) \cdot_N ... \cdot_N g(a_i)$$

How does the author get from $*$ to $\cdot_N$?
I mean how does the author know that $g$ also has a $\cdot_N$ operator in $N$?

-

The operation $\cdot_N$ is the monoid operation in $N$; it has nothing to do specifically with $f$ or $g$. In that last line the objects $g(a_1),\dots,g(a_i)$ are elements of $N$, simply because $N$ is the codomain of $g$, so they can be combined using the operation $\cdot_N$ of $N$, just like any other elements of $N$.
Yeah, but how does he know that $g(a_1)*g(a_2)$ equals $g(a_1)\cdot_N g(a_2)$ and not, say, $g(a_3)\cdot_N g(a_5)$? – drozzy Nov 13 '12 at 5:19
@drozzy: Because $g$ satisfies $g(a)=f(a)$ for all $a\in A$ (though you accidentally left that out the $=f(a)$ part of that) and is a monoid homomorphism, so necessarily $g(a_1\ast a_2)=g(a_1)\cdot_N g(a_2)$. The proof is by induction on the number of letters: $g(a)=f(a)$ for $a\in A$ takes care of single letters, and the homomorphism property gives you the induction step. – Brian M. Scott Nov 13 '12 at 5:29
Ooh shoot. I forgot that $A^*$ was a monoid! I thought it was just a set! And I completely forgot the definition of the homomorphism for categories. Thanks for correcting me twice! – drozzy Nov 13 '12 at 5:35