Solution (source code)

= Solution

The product formula places every unit logarithm in
$$
H=\left\{x\in\mathbb R^{r+s}:\sum_{j=1}^{r+s}x_j=0\right\}.
$$
For a fundamental system $u_1,\ldots,u_m$, where $m=r+s-1$, the vectors
$$
\operatorname{Log}(u_1),\ldots,\operatorname{Log}(u_m)
$$
are linearly independent, form a real basis of $H$, and generate the full lattice
$$
\operatorname{Log}(\mathcal O_K^\times)
=\bigoplus_{i=1}^m\mathbb Z\operatorname{Log}(u_i).
$$
This is the <Dirichlet unit lattice>.