I'm an undergrad, and I've been presented with the following problem:
Fundamental Theorem of Arithmetic: Let $\mathbb{N}_{>0}$ be the monoid of positive integers with binary operation given by ordinary multiplication, let $P$ be the set of primes in $\mathbb{N}$, let $M$ be a commutative monoid and let $g : P → M$ be a function. Prove that there is a unique monoid homomorphism $G : \mathbb{N}_{>0} → M$ such that $G(p) = g(p)$ for every prime $p ∈ P$.
So far, I've been able to come up with this:
Let $G: \mathbb{N}_{>0} \to M$ be such that $G(p) = g(p)$ for all $p \in P$. Since $G$ isn't explicitly defined for non-prime numbers, we can just say that $G(1) = e$, where $e \in M$ is the identity. Let $x, y$ be positive integers. We want to show that $G(xy) = G(x)G(y)$.
Am I right in just declaring $G$ to be what I want it to be and then showing it's a monoid homomorphism? Does my logic for the identities make sense? How do I attack the last part (with $G(xy) = G(x)G(y)$)? Or am I completely wrong and I should erase what I have and start over? And what does the fundamental theorem of arithmetic have to do with any of this?