# Splitting of primes in extension of integral domains

Let $A$ and $B$ be integrally closed, commutative Noetherian integral domains, and let $f: A \to B$ be a finite étale injective homomorphism. Let $d$ be the degree of $f$ (i.e. the rank of $B$ as an $A$-module).

If $p$ is a height 1 prime ideal of $A$, and $q$ is a prime ideal of $B$ lying above $p$, then $B/qB$ is a finite extension of $A/pA$. Is it true that the sum of the local degrees $[B / qB : A/pA]$ over all primes $q$ above $p$ is equal to $d$? If not, are there additional conditions on $A$, $B$ and $f$ which would make this work?

(This is a very familiar statement if $A$ and $B$ are Dedekind domains, but I'm interested in the case when $A$ and $B$ are the coordinate rings of affine algebraic surfaces.)

$A$ is a Krull ring, so the localization $A_p$ is a DVR, thus it is a Dedekind domain, so the statement is true for $A_p$. Since $B_p$ is etale over $A_p$ and the splitting of $p$ in $B_p$ is the same as the splitting of $p$ in $B$, this statement is also true for $A$.
You may assume that $A$ is local with maximal ideal $p$. Then $B$ is a free $A$ module of rank $d$. Since $B$ is etale over $A$, $B\otimes_A A/p \cong \prod B/q_i$ where the $q_i$ run through all the primes in $B$ over $p$. This gives you your desired formula.