[guided]**Unramified primes.** For $p \nmid q$, Step 2 gives the prime-by-prime identity
\begin{align*}
(1 - p^{-fs})^{-\varphi(q)/f} = \prod_i (1 - \chi_i(p) p^{-s})^{-1}.
\end{align*}
The left side is the Euler factor of $\zeta_L$ at $p$ (Step 1); the right side is the product of Euler factors of the $L(\chi_i, s)$ at $p$. So for unramified $p$:
\begin{align*}
\text{Euler factor of } \zeta_L \text{ at } p = \prod_i \text{Euler factor of } L(\chi_i, s) \text{ at } p.
\end{align*}
**Ramified primes.** For $p \mid q$:
- The character values $\chi_i(p) = 0$ (since $\gcd(p, q) > 1$). Hence the Euler factor of the naively-defined $L(\chi_i, s) = \prod_{p'}(1 - \chi_i(p') p'^{-s})^{-1}$ at $p$ is $(1 - 0 \cdot p^{-s})^{-1} = 1$.
- The Euler factor of $\zeta_L$ at $p$, however, is in general not $1$: the prime $p$ may split with non-trivial ramification, giving a factor $\prod_i (1 - p^{-f_i s})^{-1}$ reflecting the primes above $p$.
**Convention.** The statement of [Theorem 1623](/theorems/1623) uses a modified $L$-function $L(\chi_i, s)$ that, at ramified primes, absorbs exactly the correction needed to make the prime-by-prime identity hold. This is standard in analytic number theory. Concretely, the modified Euler factor at $p \mid q$ is
\begin{align*}
\text{modified } L(\chi_i, s)_p = \bigl(\text{actual } L(\chi_i, s)_p\bigr) \cdot (\text{ramified correction}_{i,p}),
\end{align*}
where the ramified corrections are chosen so that $\prod_i \text{modified } L(\chi_i, s)_p = \zeta_L(s)_p$ at each ramified $p$.
**Interchanging the order of products.** On $\{\operatorname{Re}(s) > 1\}$, the Euler products $\prod_p$ converge absolutely, and the products $\prod_i$ are finite (only $\varphi(q)$ factors), so we may interchange:
\begin{align*}
\prod_p \prod_i f_{i,p}(s) = \prod_i \prod_p f_{i,p}(s),
\end{align*}
with $f_{i,p}(s)$ denoting the Euler factor of $L(\chi_i, s)$ at $p$. Each inner product $\prod_p f_{i,p}(s) = L(\chi_i, s)$ by definition.
**Identity.** We obtain $\zeta_L(s) = \prod_{i = 1}^{\varphi(q)} L(\chi_i, s)$ on $\{\operatorname{Re}(s) > 1\}$. Both sides are meromorphic functions on $\mathbb{C}$ (after analytic continuation of each factor), so the identity extends by the identity theorem to the common domain of definition.[/guided]