Isomorphism between $Hom(\mathbb{N}^{+}, M)$ and $M$, where $M$ is a monoid

I'm trying to prove this isomorphism. I defined this function

$$\psi: M \rightarrow Hom(\mathbb{N}^{+}, M) \\ m \mapsto \phi(n)$$ where $$\phi(n) = \begin{cases} e_M, & \text{if }n\text{ is even} \\ m, & \text{if }n\text{ is odd} \end{cases}$$

$\psi$ is obviously injective, and this shows that $|Hom(\mathbb{N^{+}}, M)| \ge |M|$. I have yet to show surjectivity, I've been told to use right inverse definition of surjectivity but I don't quite understand what to do.

edit- $\phi$ is definitely not a homomorphism, oops.

So the question is how would one define this homomorphism and then prove bijectivity.

-
Are you sure $\phi$ is a monoidhommorphism $\mathbb N^+\to M$? – Hagen von Eitzen Dec 21 '12 at 23:37
@HagenvonEitzen Huh, $\phi$ is clearly not a monoid homomorphism, not sure how I messed up that badly. – Herp Derpington Dec 21 '12 at 23:46
Is there a difference between $\mathbb{N}^+$ and plain old $\mathbb{N}$ here? – MartianInvader Dec 21 '12 at 23:55
@MartianInvader Just to be more explicit that it's $\mathbb{N} \cup 0$ – Herp Derpington Dec 21 '12 at 23:56
@HerpDerpington Actually, the notation $\mathbb N^+$ would suggest (to me at least) rather that $0\notin\mathbb N^+$, whereas $\mathbb N_0$ would sucggest $0\in \mathbb N_0$. In the context of (additive) mopnoids, however, it should clearly be $\mathbb N\cap\{0\}$. – Hagen von Eitzen Dec 22 '12 at 6:33

The map $\psi$ cannot possibly be surjective. When $M = \mathbb{N}^+$, what element of $M$ would map to the identity of $\mathbb{N}^+$?

There is a standard isomorphism for these structures. Let $Hom_{mon}(A,B)$ stand for the set of monoid homomorphisms $A \to B$ where $A$ and $B$ are monoids, and let $\mathbb{N}^+ = \{0, 1, 2, 3, \ldots\}$ be the natural numbers as an additive monoid.

$$\psi : M \to Hom_{mon}(\mathbb{N}^+, M)$$ where $\psi(m) : \mathbb{N}^+ \to M$ is the map defined by $\psi(m)(n) = n\cdot m = \underbrace{m + m + m +\cdots + m}_n$.

It should be fairly straightforward to show both injectivity and surjectivity of this mapping.

Hope this helps!

-
$0 \mapsto id_{Hom(\mathbb{N}^{+}, M)}$. I don't see the problem? – Herp Derpington Dec 21 '12 at 23:40
@HerpDerpington No, according to your definition, $0$ maps to the homomorphism that takes each $n$ to $0$ (since both $e_M$ and $m$ are zero in this case). More importantly, it takes $1$ to a function that is not a homomorphism $\mathbb{N}^+ \rightarrow \mathbb{N}^+$. – MartianInvader Dec 21 '12 at 23:43
Two problems: $0 \notin \mathbb{N}^+$, and according to your definition, $0$ would map to the function $\phi$ defined by $\phi(n) = 1$ if $n$ is even, and $\phi(n) = 0$ if $n$ is odd. Then since $\phi(1) \neq 1$ (and in fact $\phi(x) \neq x$ for all $x$), this $\phi$ is not the identity of $\mathbb{N}^+$. – Shaun Ault Dec 21 '12 at 23:46
@ShaunAult Nevermind, this construction is clearly wrong, can you hint me on the right approach? Also surely $0 \in \mathbb{N}^{+}$ since it is the identity. – Herp Derpington Dec 21 '12 at 23:50
@ShaunAult If you're not including zero then $\mathbb{N}^+$ isn't a monoid... I think from context $\mathbb{N}^+$ is meant to be the nonnegative integers. – MartianInvader Dec 21 '12 at 23:50