Lemma 49.9.6. Let $f : Y \to X$ be a flat quasi-finite morphism of Noetherian schemes. The closed subscheme $R \subset Y$ defined by the different $\mathfrak {D}_ f$ is exactly the set of points where $f$ is not étale (equivalently not unramified).

Proof. Since $f$ is of finite presentation and flat, we see that it is étale at a point if and only if it is unramified at that point. Moreover, the formation of the locus of ramified points commutes with base change. See Morphisms, Section 29.36 and especially Morphisms, Lemma 29.36.17. By Lemma 49.9.4 the formation of $R$ commutes set theoretically with base change. Hence it suffices to prove the lemma when $X$ is the spectrum of a field. On the other hand, the construction of $(\omega _{Y/X}, \tau _{Y/X})$ is local on $Y$. Since $Y$ is a finite discrete space (being quasi-finite over a field), we may assume $Y$ has a unique point.

Say $X = \mathop{\mathrm{Spec}}(k)$ and $Y = \mathop{\mathrm{Spec}}(B)$ where $k$ is a field and $B$ is a finite local $k$-algebra. If $Y \to X$ is étale, then $B$ is a finite separable extension of $k$, and the trace element $\text{Trace}_{B/k}$ is a basis element of $\omega _{B/k}$ by Fields, Lemma 9.20.7. Thus $\mathfrak {D}_{B/k} = B$ in this case. Conversely, if $\mathfrak {D}_{B/k} = B$, then we see from Lemma 49.9.5 and the fact that the norm of $1$ equals $1$ that the discriminant is empty. Hence $Y \to X$ is étale by Lemma 49.3.1. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).