This doesn't answer your question, but I just wanted to offer an algebraic/categorical viewpoint on what's going on here. In particular, I want to answer the question:
Where does this map into infinite-dimensional space come from?
First, some notation: given a set $X$:
- write $\mathbb{N}^X$ for the set of all functions $\mathbb{N} \leftarrow X$
- $\mathbb{N}^X_\mathrm{fin}$ for the set of all functions $\mathbb{N} \leftarrow X$ that are finitely supported.
That is, $\mathbb{N}^X_\mathrm{fin}$ is the set of all functions $f : \mathbb{N} \leftarrow X$ such that $\{x \in X \mid 0_\mathbb{N}=f(x)\}$ is cofinite. Now thinking of $\mathbb{N}$ as an additively denoted commutative monoid, it is clear that $\mathbb{N}^X$ is also an additively denoted commutative monoid with respect to pointwise addition. We can think of $\mathbb{N}^X$ as consisting of all $\mathbb{N}$-valued multisets in $X$.
Since $\mathbb{N}^X_\mathrm{fin}$ is a submonoid of $\mathbb{N}^X$, therefore, it can be viewed as a commutative monoid in its own right; its elements are precisely those $\mathbb{N}$-valued multisets in $X$ that are finitely supported. Now it is well known the commutative monoid $\mathbb{N}^X_\mathrm{fin}$ satisfies the universal property of "free (additively denoted) commutative monoid on $X$." In fact, not only is $X$ a basis of $\mathbb{N}^X_\mathrm{fin},$ but in fact, it is the only basis. Hence:
Proposition. Every commutative monoid $C$ has at most one basis.
(The concept "idempotent commutative monoid" also has this remarkable property.)
Of course, this holds even if we change from additive to multiplicative notation; so, writing $\mathbb{N}^\times$ for the set $\mathbb{N} \setminus \{0\}$ viewed a commutative monoid with respect to multiplication, we may conclude that $\mathbb{N}^\times$ has at most one basis. Now let $Q$ denote an arbitrary subset of $\mathbb{N}$. There is function
$$\pi_Q : \mathbb{N}^\times \leftarrow \mathbb{N}^Q_\mathrm{fin}$$
given by taking the product; for example, if $Q=\{2,4,93\},$ then $$\pi_Q(\{2,2,4\}) = 2 \times 2 \times 4.$$
Now clearly, $\pi_Q$ is always a homomorphism; for example, $$\pi_Q(\{2\} + \{2,4\}) = \pi_Q(\{2,2,4\}) = 2 \times 2 \times 4 = 2 \times (2 \times 4) = \pi_Q(\{2\}) \times \pi_Q(\{2,4\}).$$
Furthermore:
Lemma. For all $Q \subseteq \mathbb{N}^\times$, $Q$ is a basis for $\mathbb{N}^\times$ iff $\pi_Q$ is an isomorphism.
(But why? I'm a little confused about this point. Hmmmm.)
Anyway, we conclude that there is at most one $Q \subseteq \mathbb{N}^\times$ for which $\pi_Q$ is an isomorphism. Now write $\mathbb{P}$ for the subset of $\mathbb{N}^\times$ consisting of all prime numbers. We have:
Theorem. (Fundamental theorem of arithmetic for $\mathbb{N}$). The function $\pi_\mathbb{P}$ is an isomorphism. Hence, $\mathbb{N}^\times$ is free, and its unique basis is given by the set of prime numbers.
The map described in your question, which lands us in infinite-dimensional space, is $\pi_\mathbb{P}^{-1}$.
In summary:
- An element of $\mathbb{N}^\times$ can always be made into a finitely-supported $\mathbb{N}$-valued multiset of prime numbers by applying $\pi_\mathbb{P}^{-1}.$
- A finitely-supported $\mathbb{N}$-valued multiset of prime numbers can always be made into an element of $\mathbb{N}^\times$ by applying $\pi_\mathbb{P}.$
- These operations are homomorphisms, and inverses.