Solution (source code)

= Solution

Write $e=e(\mathfrak q/\mathfrak p)$, $f=f(\mathfrak q/\mathfrak p)$ and $g$ for the number of primes above $\mathfrak p$. The <Galois group> acts transitively on those primes, with stabilizer $D_{\mathfrak q}$. The <fundamental identity for prime decomposition> and the <orbit-stabilizer theorem> therefore give
$$
[F:K]=efg,\qquad |D_{\mathfrak q}|=[F:K]/g=ef.
$$
It remains to establish that the residue action has image of order $f$, rather than assume this in the desired equality.

Use the <decomposition group of a prime and local Galois group> identification $D_{\mathfrak q}=\operatorname{Gal}(F_{\mathfrak q}/K_{\mathfrak p})$. A generator of the <finite field extension> $k_{\mathfrak q}/k_{\mathfrak p}$ has a separable monic <minimal polynomial of an algebraic element>. Lift its coefficients to $\mathcal O_{K_{\mathfrak p}}$. The <Hensel lemma> lifts each of its distinct residue roots to $F_{\mathfrak q}$. One such lift has field degree at most $f$, while its residue generates the degree-$f$ <finite field extension>, so its field degree is exactly $f$ and its <ramification index of a prime ideal> is one. It therefore generates an <unramified extension> of degree $f$, and sending it to each of the other lifts gives its $f$ embeddings. Because $F_{\mathfrak q}/K_{\mathfrak p}$ is a <Galois extension>, these embeddings extend to its automorphisms. Their reductions realize every automorphism of $k_{\mathfrak q}/k_{\mathfrak p}$. Thus the residue action is surjective, and
$$
\boxed{|I_{\mathfrak q}|=|D_{\mathfrak q}|/f=e.}
$$

Now let $G$ be cyclic of order $\ell^2$, and let $H=\operatorname{Gal}(F/L)$ be its unique subgroup of order $\ell$. In a tower of <Galois extensions>, inertia maps onto inertia in the intermediate extension. This also follows from the just-proved order formula: its image has order $e(F/K)/e(F/L)=e(L/K)$, using multiplicativity of the <ramification index of a prime ideal> in a tower. If $\mathfrak p$ ramifies in $L/K$, this image in $G/H$ is nontrivial. Every proper subgroup of $G$ is contained in $H$, so inertia upstairs must be $G$. Hence
$$
\boxed{e(F/K)=\ell^2,\qquad \mathfrak p\text{ is totally ramified in }F/K.}
$$
The <fundamental identity for prime decomposition> then also forces a single prime above $\mathfrak p$ and <residue-field degree> one.