Notation Abstract Algebra On page 236 of Falko Lorenz's "Algebra Volume 1: Fields and Galois Theory", exercise 4.2(c), the author asks
$\\$ 
Let $R$ be a unique factorization domain.
If $P$ is a directory of primes of $R$ and $K =$ Frac $R$, the multiplicative group of K satisfies $K^x \cong R^x \times\mathbb{Z}^{(P)}$.
What is $\mathbb{Z}^{(P)}$? 
 A: It looks like its suggesting the direct sum of copies of $\mathbb{Z}$ indexed by the directory of primes.
Construct the map this way. Let $k$ be nonzero in $K$. Write $k$ as $a/b$ with $gcd(a,b)=1$. Uniquely factorize $a$ and $b$ and retrieve the natural numbers that are the powers of the primes in their factorizations. You may need to use units on both $a$ and $b$ to complete the factorization. 
Combine the units into $u$. For each prime $p$ that appears in the prime factorization of $a$ and $b$, you get a net result of the power that appears in the position. The thing you map $k$ to is $u$ followed by the integer powers of primes in its expression.
So for example, suppose $a=vp^2q$ and $b=wpq^3$. Then $\frac{a}{b}=\frac{vp^2q}{wpq^3}=up^1q^{-2}$.
where $\frac{v}{w}=u$. Supposing that $p$ and $q$ were the first two primes in the directory, in that order, you would map $a/b$ to $(u,1,-2,0,0,\dots)$.
With a little patience you can show this is multiplicative and preserves inverses, and is bijective, hence you have a group isomorphism.
A: $\mathbb Z^{(P)}$ denotes the set of maps $f\colon P\to\mathbb Z$ such that $f(p)=0$ for almost all $p\in P$ (i.e. $f(p)\ne 0$ for at most finitely many $p$).
This is a strict subset if $\mathbb Z^P$, the set of all maps $P\to\mathbb Z$.
