[guided]**From containment to factorisation.** We know $\langle p \rangle \subseteq \mathfrak{p}$ from Steps 1-4. By [Divisibility Equals Containment](/theorems/1587), this is the same as $\mathfrak{p} \mid \langle p \rangle$. The [Unique Factorization of Ideals](/theorems/1589) says every nonzero ideal of $\mathcal{O}_L$ factors uniquely as a product of prime ideals. In particular, $\langle p \rangle$ has such a factorisation, and the primes appearing are exactly those dividing $\langle p \rangle$. Since $\mathfrak{p}$ is one of them, we can write
\begin{align*}
\langle p \rangle = \mathfrak{p} \cdot \mathfrak{a}
\end{align*}
for some ideal $\mathfrak{a}$ (the product of the remaining prime factors with their multiplicities).
**Taking norms.** The [Multiplicativity of the Ideal Norm](/theorems/1593) theorem states $N(\mathfrak{b}_1 \mathfrak{b}_2) = N(\mathfrak{b}_1) N(\mathfrak{b}_2)$ for nonzero ideals. Applying this,
\begin{align*}
N(\langle p \rangle) = N(\mathfrak{p})\, N(\mathfrak{a}).
\end{align*}
**Computing $N(\langle p \rangle)$.** The [Element Norm Equals Ideal Norm](/theorems/1596) theorem says $N(\langle \beta \rangle) = |N_{L/\mathbb{Q}}(\beta)|$ for $\beta \in \mathcal{O}_L$. Take $\beta = p$: we need $N_{L/\mathbb{Q}}(p)$.
The field norm $N_{L/\mathbb{Q}}(p)$ is by definition $\det(m_p)$, where $m_p: L \to L$, $x \mapsto px$. Since $p \in \mathbb{Q}$, $m_p = p \cdot \operatorname{id}_L$, so $\det(m_p) = p^{\dim_\mathbb{Q} L} = p^n$. Hence $N_{L/\mathbb{Q}}(p) = p^n$ (positive since $p > 0$), and $|N_{L/\mathbb{Q}}(p)| = p^n$.
Plugging in:
\begin{align*}
p^n = N(\mathfrak{p})\, N(\mathfrak{a}).
\end{align*}
**Extracting $N(\mathfrak{p}) = p^f$.** Both $N(\mathfrak{p})$ and $N(\mathfrak{a})$ are positive integers multiplying to $p^n$. By unique factorisation in $\mathbb{Z}$, the only divisors of $p^n$ are $1, p, p^2, \ldots, p^n$. So $N(\mathfrak{p}) = p^f$ for some integer $0 \leq f \leq n$.
**Ruling out $f = 0$.** If $f = 0$, then $N(\mathfrak{p}) = 1$, i.e., $|\mathcal{O}_L/\mathfrak{p}| = 1$, so $\mathcal{O}_L/\mathfrak{p} = \{0\}$, i.e., $\mathfrak{p} = \mathcal{O}_L$. This contradicts primality of $\mathfrak{p}$ (primes are proper ideals). Hence $f \geq 1$.
**Conclusion.** $N(\mathfrak{p}) = p^f$ with $1 \leq f \leq n$, as claimed.
**Terminology.** The integer $f$ is called the **residue degree** (or **inertial degree**) of $\mathfrak{p}$ over $p$. Geometrically, $\mathcal{O}_L/\mathfrak{p}$ is a finite field extension of $\mathbb{F}_p$ of degree $f$.[/guided]