Theorem 7.4.16 (Riemann–Hurwitz formula) in Qing Liu's Algebraic Geometry and Arithmetic Curves

I have a question about a part from the proof of Theorem 7.4.16 on page 290 from Liu's "Algebraic Geometry and Arithmetic Curves". The claim is

Theorem 7.4.16 Let $f : X \to Y$ be a finite morphism of normal projective curves over $k$. We suppose that $f$ is separable of degree $n$. Then we have an equality

$$ 2p_a(X) -2 = n(2p_a(Y)-2) + \sum_x(e'_x-1)[k(x):k], $$

where the sum takes place over the closed point $x \in X$, $e'_x$ is an integer $\le e_x$, and $e'_x= e_x$ if and only if f is tamely ramified at $x$.

I'm not going to explain what $p_a, e_x, ...$ are, because the part in the proof I not understand and going to discuss here don't uses them. The part I not understand is the following:

Let $\omega_f$ be the dualizing sheaf for $f : X \to Y$. (it is discussed in Chapter rigorously).

It's important property which we accept as black box here we are going to use is this:

The $f$ separable hypothesis implies that we have an injective canonical homomorphism $\mathcal{O}_X \to \omega_f$ (Exercise 6.4.7(e)), with cokernel with finite support. [...]

Let $x \in X, y=f(x), A:= \mathcal{O}_{Y,y}$, $B:= (f_* \mathcal{O}_X)_y$. Then $(f_* \omega_f)_y= \operatorname{Hom}_A(B,A)$ (again Ex. 6.4.7, accept it as black box). Let $\hat{A}$ be the $\mathfrak{m}_y$-adic completion of $\mathcal{O}_{Y,y}$. Then

$$ \operatorname{Hom}_A(B,A) \otimes_A \hat{A} = \operatorname{Hom}_{\hat{A}}(B \otimes_A \hat{A},\hat{A}) , \ \ \ \ B \otimes_A \hat{A} = \oplus_{z \in f^{-1}(y)} \widehat{\mathcal{O}_{X,z}}$$

(proved in Exercises 1.2.8 and 4.3.17). Let $\hat{B}:= \widehat{\mathcal{O}_{X,x}}$. Then we have

$$ (\omega_f/ \mathcal{O}_X)_x = \operatorname{Hom}_{\hat{A}}(B \otimes_A \hat{A},\hat{A}) /\hat{B} $$

[...]

Problem: The last equality I not understand. By above we know

$$ (f_* \omega_f)_y \otimes_A \hat{A} = \operatorname{Hom}_{\hat{A}} (B \otimes_A \hat{A},\hat{A}) =\oplus_{z \in f^{-1}(y)}\operatorname{Hom}_{\hat{A}}(\widehat{\mathcal{O}_{X,z}},\hat{A}) $$

Then we can pick out the summand $\operatorname{Hom}_{\hat{A}}(\hat{\mathcal{O}_{X,x}},\hat{A}) = \operatorname{Hom}_{\hat{A}}(\hat{B},\hat{A})$ and consider the quotient modulo $\hat{B}$, that's our right side. What about left side. Does $(f_* \mathcal{O}_X)_y \otimes_A \hat{A}$ equal $\oplus_{z \in f^{-1}(y)} (\widehat{\omega_f/ \mathcal{O}_X})_x$?
I doubt so, if $\mathcal{F}$ is a $\mathcal{O}_X$-module, then I don't think that it should be in general true that

$$ (f_* \mathcal{F})_y \otimes_{\mathcal{O}_{Y,y}} \widehat{\mathcal{O}_{Y,y}} = \oplus_{z \in f^{-1}(y)} \hat{\mathcal{F}_z}$$

Any idea how to resolve the problem?


Solution 1:

Maybe I have figured out a solution. We write down the sequence

$$ 0 \to \mathcal{O}_X \to \omega_f \to (\omega_f/ \mathcal{O}_X) \to 0 $$

and apply $f_*$ to it. In general $f_*\omega_f \to f_*(\omega_f/ \mathcal{O}_X)$ is not surjective any more, but $f$ is finite and therefore affine, therefore the exactness is preserved. Therefore

$$ f_*\omega_f/(f_* \mathcal{O}_X) = f_*(\omega_f/ \mathcal{O}_X) $$

We analyze now the stalks at $y \in Y$ separately. Since $\omega_f/ \mathcal{O}_X$ has finite support (so that's a skyscraper sheaf) we have (at least I think so)

$$ f_*(\omega_f/ \mathcal{O}_X)_y = \oplus_{z \in f^{-1}(y)} (\omega_f/ \mathcal{O}_X)_z $$

Tensor the three involved stalks with $\hat{A}$ we obtain

$$ f_* \omega_f \otimes_A \hat{A} =\oplus_{z \in f^{-1}(y)}\operatorname{Hom}_{\hat{A}}(\widehat{\mathcal{O}_{X,z}},\hat{A}) $$

and

$$ (f_*\mathcal{O}_X)_y \otimes_A \hat{A} = \oplus_{z \in f^{-1}(y)} \widehat{\mathcal{O}_{X,z}} $$

If we put everything together we should get

$$ \oplus_{z \in f^{-1}(y)} \operatorname{Hom}_{\hat{A}}(\widehat{\mathcal{O}_{X,z}},\hat{A}) /\widehat{\mathcal{O}_{X,z}} = \oplus_{z \in f^{-1}(y)} (\omega_f/ \mathcal{O}_X)_z \otimes \hat{A} $$

We know that $(\omega_f/ \mathcal{O}_X)_z$ is a finite $A$-module, therefore $(\omega_f/ \mathcal{O}_X)_z \otimes \hat{A}= (\omega_f/ \mathcal{O}_X)_z$. Comparing $z$-terms in the sums finishes the argument. Is the proof correct?

The only part about which I'm not sure is the equation

$$ f_*(\omega_f/ \mathcal{O}_X)_y = \oplus_{z \in f^{-1}(y)} (\omega_f/ \mathcal{O}_X)_z $$

Is it generally true that if $F$ is a skyscraper sheaf on $O_X$, so it has finite support, then for stalks the following identity holds

$$ (f_*F)_y = \oplus_{z \in f^{-1}(y)} (F)_z $$

? Is finiteness of $f$ neccessary for last identity or does it suffice to require that $f$ is quasi-finite (therefore not affine) ?