The term *ramification* was the one that had befuddled me longer than most others, in my studies of algebraic geometry. Let's take a morphism $\pi:Y\to X$ of schemes, and let us assume that it is finite and surjective. We will call a morphism of this kind a **covering** and although I am not sure whether this terminology is standard, I think it's very appropriate. Here, I document some notes I took to connect the various results from several books I know. It helped me to get a better idea and better tools to work with coverings. Now, what does it mean for $\pi$ to *ramify*? Let us try to get an idea by staring at the following
**Example 1**. Consider $A=k[x,y]/(x)=k[y]$ and $B=k[x,y]/(y-x^2)$ over some field $k$. Now $X=\mathrm{Spec}(A)$ is the ordinate and $Y=\mathrm{Spec}(B)$ is a parabola intersecting the ordinate in the origin $P=(x,y)\in\mathbb{A}_k^2$. Now, consider the morphism $\pi^\sharp:A\to B$ given by mapping the residue class of $y$ to the residue class of $y$. It yields a finite, dominant morphism $\pi:Y\to X$ which is just the projection from the parabola $Y$ onto the ordinate $X$.
Intuitively, the point $P$ is where two *"branches"* of the curve $Y$ meet: The cardinality of $\pi^{-1}(P)$ is one, but everywhere else, the fibers of $\pi$ have cardinality two. This is why we say that $\pi$ *ramifies* at $P$.
However, we would like to understand an algebraic characterization for this sort of behaviour and make it a formal notion. Observe that the residue class of $x$ in $B$ is a square root of $y$. Also observe that this root is a unit on all of $Y$, except at the point $P$. Hence, $P$ is the unique point where the maximal ideal of the local ring of $Y$ contains an element which is outside the reach of $\pi^\sharp$. This whole example might be a bit confusing because we sometimes understand $P$ as a point of $X$ and sometimes, as a point of $Y$. Let's stop the confusion and do some math.
**Definition 2**. Let $\pi:Y\to X$ be a finite, surjective morphism of schemes. Let $Q\in Y$ be any point and $P:=\pi(Q)$. We say that $\pi$ is **unramified** at $Q$ if
\[
\pi^\sharp_Q:\mathcal{O}_{X,P}\longrightarrow\mathcal{O}_{Y,Q}
\]
satisfies $\pi^\sharp_Q(\mathfrak{m}_P)\cdot\mathcal{O}_{Y,Q}=\mathfrak{m}_Q$. Otherwise, we say that $\pi$ is **ramified** at $Q$. Denote by $R_\pi\subseteq Y$ the set of points where $\pi$ is ramified and call it the **ramification locus** of $\pi$. The set $B_\pi:=\pi(R_\pi)$ is called the **branch locus** of $\pi$. The morphism $\pi$ is called **unramified** if $R_\pi=\emptyset$.
Furthermore, let $Y_P:=Y\times_X\mathrm{Spec}(k(P))$ be the **scheme-theoretic fiber** of $P$ under $\pi$. It is well-known that $Y_P$, as a topological space, is homeomorphic to $\pi^{-1}(P)$, see Exercise II.3.10 in Hartshorne ((Robin Hartshorne. *Algebraic Geometry*. Springer, New York, 2006.)) . We then define
\[
e_\pi(Q) := \mathrm{len}_{\mathcal{O}_{Y_P,Q}}(\mathcal{O}_{Y_P,Q})
\]
and call it the **ramification index** of $\pi$ at $Q$. If $\mathrm{char}(k)$ is nonzero and divides $e_\pi(Q)$, we say that the ramification at $Q$ is **wild**, otherwise it is **tame**.
**Proposition 3**. With notation as above, $\mathcal{O}_{Y,Q}/(\mathfrak{m}_P\cdot\mathcal{O}_{Y,Q})\cong\mathcal{O}_{Y_P,Q}$.

**Proof**. We may assume that $X=\mathrm{Spec}(A)$ and hence, $Y=\pi^{-1}(X)=\mathrm{Spec}(B)$ are both affine. By definition, $\mathcal{O}_{Y_P,Q}=(B\otimes_A k(P))_Q$. Furthermore, \[ \begin{array}{rcl}(B\otimes_A k(P))_Q = (B\otimes_A(A_P/\mathfrak{m}_P))_Q &\longrightarrow & B_Q/(\mathfrak{m}_P\cdot B_Q) \\[1.5ex] \frac{b\otimes (a\bmod\mathfrak{m}_P)}{h} &\longmapsto& \frac{a\cdot b}{h}\bmod(\mathfrak{m}_P\cdot B_Q) \end{array} \] is an isomorphism. It is obviously well-defined and surjective. For injectivity, note that $ab\in\mathfrak{m}_P\cdot B_Q$ implies $ab=a'b'$ with $a'\in\mathfrak{m}_P$ and $b'\in B_Q$, but then \[ b\otimes(a\bmod\mathfrak{m}_P)=b'\otimes(a'\bmod\mathfrak{m}_P)=0. \] --- **Corollary 4**. We have $e_\pi(Q)=1$ if and only if $\pi$ is unramified at $Q$.

**Proof**. Note that $\mathcal{O}_{Y_P,Q}$ has length $1$ over itself if and only if it is a field, i.e. if and only if it is equal to $k(Q)$. By the above Proposition 3, this is equivalent to \[ \mathcal{O}_{Y,Q}/(\mathfrak{m}_P\cdot\mathcal{O}_{Y,Q})=\mathcal{O}_{Y_P,Q}=k(Q)=\mathcal{O}_{Y,Q}/\mathfrak{m}_Q. \] --- By the *Purity of the Branch Locus* ((Oscar Zariski. On the purity of the branch locus of algebraic functions. In *Proceedings of the National Academy of Sciences of the United States of America*, volume 44, pages 791‐796, 1958)), the two sets $R_\pi$ and $B_\pi$ can be understood as effective divisors. In other words, $R_\pi$ consists of the closure of a finite number of points of codimension one. The following corollary connects our definition of the ramification index with the one given in Hartshorne for curves: **Corollary 5**. Assume now that $X$ and $Y$ are regular, integral schemes. Assume furthermore that $Q\in Y$ is a point of codimension one. thus, $P=\pi(Q)$ is also a point of codimension one and the maximal ideal $\mathfrak{m}_P$ is generated by a single element $f$. Let $v_Q:k(Y)\to\mathbb{Z}$ denote the valuation corresponding to $\mathcal{O}_{Y,Q}$. Then, $e_\pi(Q)=v_Q(\pi^\sharp_Q(f))$.

**Proof.** By Proposition 11.1 in Eisenbud ((David Eisenbud. *Commutative Algebra with a View Toward Algebraic Geometry*. Springer, New York, 1994)) , $v_Q$ can be evaluated on $\mathcal{O}_{Y,Q}$ as follows: If $g$ is a generator of $\mathfrak{m}_Q$ then any element $\alpha\in\mathcal{O}_{Y,Q}$ can be written as $\alpha=ug^v$ for some unit $u$ and $v=v_Q(\alpha)$. Let $e:=v_Q(\pi^\sharp_Q(f))$, then Proposition 3 yields \[ \mathcal{O}_{Y_P,Q} = \left.\mathcal{O}_{Y,Q}\Bigr/\left(\pi^\sharp_Q(f)\right)\right. = \mathcal{O}_{Y,Q}/\left(g^e\right), \] which is easily seen to have length $e$ over itself. --- **Definition 6**. If $Q\in Y$ is, again, *an* closed point and $P=\pi(Q)$, we call \[ f_\pi(Q):=[k(Q):k(P)] \] the **inertia degree** of $\pi$ at $Q$. With the above terminology, one can prove the following very useful **Theorem 7 (Degree Formula)**. Let $\pi:Y\to X$ be a finite, surjective morphism of integral regular schemes. Then, for any closed point $P\in X$, \[ \deg(\pi) = \sum_{\pi(Q)=P} e_\pi(Q)\cdot f_\pi(Q) \] **Metaproof**. This is Formula (12.6.2) from page 329 of Görtz & Wedhorn ((Ulrich Görtz and Torsten Wedhorn. *Algebraic Geometry I*. Vieweg + Teubner, Wiesbaden, 2010)) which we may apply because any finite surjective morphism between integral regular schemes is flat, see Remark 4.3.11 in Qing Liu's book ((Qing Liu. *Algebraic Geometry and Arithmetic Curves*. Oxford University Press, Oxford, 2008.)) . --- **Corollary 8**. Let $k$ be algebraically closed. If $\pi:Y\to X$ is an unramified, finite and surjective morphism of nonsingular $k$-varieties, then $\left\vert\pi^{-1}(P)\right\vert=\deg(\pi)$ for each closed point $P\in X$.

**Proof**. Since $\pi$ is unramified, Theorem 7 and Corollary 5 imply \[ \deg(\pi)=\sum_{\pi(Q)=P} [k(Q):k(P)] = \sum_{\pi(Q)=P} 1 = \left\vert\pi^{-1}(P)\right\vert. \] Note that $k(Q)\cong k(P)\cong k$ since $k$ is algebraically closed. --- In particular, over $k=\mathbb{C}$, a morphism as above is a $\deg(\pi)$-sheeted covering space. Informally speaking; if the sheets were to cross, you'd get ramification.

**Proof**. We may assume that $X=\mathrm{Spec}(A)$ and hence, $Y=\pi^{-1}(X)=\mathrm{Spec}(B)$ are both affine. By definition, $\mathcal{O}_{Y_P,Q}=(B\otimes_A k(P))_Q$. Furthermore, \[ \begin{array}{rcl}(B\otimes_A k(P))_Q = (B\otimes_A(A_P/\mathfrak{m}_P))_Q &\longrightarrow & B_Q/(\mathfrak{m}_P\cdot B_Q) \\[1.5ex] \frac{b\otimes (a\bmod\mathfrak{m}_P)}{h} &\longmapsto& \frac{a\cdot b}{h}\bmod(\mathfrak{m}_P\cdot B_Q) \end{array} \] is an isomorphism. It is obviously well-defined and surjective. For injectivity, note that $ab\in\mathfrak{m}_P\cdot B_Q$ implies $ab=a'b'$ with $a'\in\mathfrak{m}_P$ and $b'\in B_Q$, but then \[ b\otimes(a\bmod\mathfrak{m}_P)=b'\otimes(a'\bmod\mathfrak{m}_P)=0. \] --- **Corollary 4**. We have $e_\pi(Q)=1$ if and only if $\pi$ is unramified at $Q$.

**Proof**. Note that $\mathcal{O}_{Y_P,Q}$ has length $1$ over itself if and only if it is a field, i.e. if and only if it is equal to $k(Q)$. By the above Proposition 3, this is equivalent to \[ \mathcal{O}_{Y,Q}/(\mathfrak{m}_P\cdot\mathcal{O}_{Y,Q})=\mathcal{O}_{Y_P,Q}=k(Q)=\mathcal{O}_{Y,Q}/\mathfrak{m}_Q. \] --- By the *Purity of the Branch Locus* ((Oscar Zariski. On the purity of the branch locus of algebraic functions. In *Proceedings of the National Academy of Sciences of the United States of America*, volume 44, pages 791‐796, 1958)), the two sets $R_\pi$ and $B_\pi$ can be understood as effective divisors. In other words, $R_\pi$ consists of the closure of a finite number of points of codimension one. The following corollary connects our definition of the ramification index with the one given in Hartshorne for curves: **Corollary 5**. Assume now that $X$ and $Y$ are regular, integral schemes. Assume furthermore that $Q\in Y$ is a point of codimension one. thus, $P=\pi(Q)$ is also a point of codimension one and the maximal ideal $\mathfrak{m}_P$ is generated by a single element $f$. Let $v_Q:k(Y)\to\mathbb{Z}$ denote the valuation corresponding to $\mathcal{O}_{Y,Q}$. Then, $e_\pi(Q)=v_Q(\pi^\sharp_Q(f))$.

**Proof.** By Proposition 11.1 in Eisenbud ((David Eisenbud. *Commutative Algebra with a View Toward Algebraic Geometry*. Springer, New York, 1994)) , $v_Q$ can be evaluated on $\mathcal{O}_{Y,Q}$ as follows: If $g$ is a generator of $\mathfrak{m}_Q$ then any element $\alpha\in\mathcal{O}_{Y,Q}$ can be written as $\alpha=ug^v$ for some unit $u$ and $v=v_Q(\alpha)$. Let $e:=v_Q(\pi^\sharp_Q(f))$, then Proposition 3 yields \[ \mathcal{O}_{Y_P,Q} = \left.\mathcal{O}_{Y,Q}\Bigr/\left(\pi^\sharp_Q(f)\right)\right. = \mathcal{O}_{Y,Q}/\left(g^e\right), \] which is easily seen to have length $e$ over itself. --- **Definition 6**. If $Q\in Y$ is, again, *an* closed point and $P=\pi(Q)$, we call \[ f_\pi(Q):=[k(Q):k(P)] \] the **inertia degree** of $\pi$ at $Q$. With the above terminology, one can prove the following very useful **Theorem 7 (Degree Formula)**. Let $\pi:Y\to X$ be a finite, surjective morphism of integral regular schemes. Then, for any closed point $P\in X$, \[ \deg(\pi) = \sum_{\pi(Q)=P} e_\pi(Q)\cdot f_\pi(Q) \] **Metaproof**. This is Formula (12.6.2) from page 329 of Görtz & Wedhorn ((Ulrich Görtz and Torsten Wedhorn. *Algebraic Geometry I*. Vieweg + Teubner, Wiesbaden, 2010)) which we may apply because any finite surjective morphism between integral regular schemes is flat, see Remark 4.3.11 in Qing Liu's book ((Qing Liu. *Algebraic Geometry and Arithmetic Curves*. Oxford University Press, Oxford, 2008.)) . --- **Corollary 8**. Let $k$ be algebraically closed. If $\pi:Y\to X$ is an unramified, finite and surjective morphism of nonsingular $k$-varieties, then $\left\vert\pi^{-1}(P)\right\vert=\deg(\pi)$ for each closed point $P\in X$.

**Proof**. Since $\pi$ is unramified, Theorem 7 and Corollary 5 imply \[ \deg(\pi)=\sum_{\pi(Q)=P} [k(Q):k(P)] = \sum_{\pi(Q)=P} 1 = \left\vert\pi^{-1}(P)\right\vert. \] Note that $k(Q)\cong k(P)\cong k$ since $k$ is algebraically closed. --- In particular, over $k=\mathbb{C}$, a morphism as above is a $\deg(\pi)$-sheeted covering space. Informally speaking; if the sheets were to cross, you'd get ramification.