How does one compute pushforward sheaves? For simplicity let's work with smooth projective varieties over $\mathbb C.$ I'm wondering how to compute the pushforward of a sheaf by a finite map $f:X\to Y.$ [The actual example I care about is with the double cover of $\mathbb P^2$ branched over a smooth sextic, but I would rather figure this out on my own. My intuition says that the pushforward of the structure sheaf in this case is $\mathcal O_{\mathbb P^2}\oplus\mathcal O_{\mathbb P^2}(3),$ but the cohomology is not of the correct rank if this were true.]
Let's take for example the map $t:\mathbb P^1\to \mathbb P^1$ given by $t(Z:W)=(Z^2:W^2).$ Then I can show that $t_*\mathcal O_{\mathbb P^2}$ is locally free of rank 2 (I know this is a theorem but it's not one I have seen yet). However I'm having trouble figuring out the global picture. For example, near the point $(0:1)$ with $z=Z/W$ we have the induced map $t^*:\mathbb C[z]\to \mathbb C[z]$ which sends $z\mapsto z^2$ and as a module, the codomain splits as $1t^*(\mathbb C[z])\oplus zt^*(\mathbb C[z])$ and hence has rank 2. But now I want to compute how the section $z$ transforms into the other affine piece of $\mathbb P^1$ and I'm at a loss. How do you compute the transition functions in this case?
When I told my advisor that I'm trying to look at this simple example to get an understanding for how to do this he looked at it and instantly said that it was $\mathcal O_{\mathbb P^1}\oplus\mathcal O_{\mathbb P^1}(-1).$ I will ask him at our next meeting, but I'm also wondering if there are any good heuristics for computing these pushforwards. Right now I have no intuition for how this should go.
I have no knowledge of schemes so if any explanation could avoid that language I would appreciate it.
 A: Some simple facts. Let $f:X\to Y$ be a double cover of smooth varieties over complex numbers. Then $f_*O_X$ is a rank two vector bundle and you have the natural map $O_Y\to f_*O_X$ which splits using trace. So, $f_*O_X=O_Y\oplus L$ for a line bundle $L$ on $Y$. Now, let us specialize to the case when $Y$ is a projective space and then $L=O_Y(n)$ for some $n$. If $Y=\mathbb{P}^m$, then $H^m(X, O_X)=H^m(Y, O_Y\oplus O_Y(n))=H^m(Y, O_Y(n))$. There can be at most one $n$ as a solution since the dimension of these vector spaces are distinct most of the time.
In your $m=1$ case, since $H^1(X,O_X)=0$, we must have $H^1(O_Y, O_Y(n))=0$ and thus $n\geq -1$. But $n\leq -1$ since $H^0(X,O_X)$ is one dimensional.
Similarly in your $m=2$ case, $n\leq -1$ is forced since $H^0(X,O_X)$ is one dimensional. Since ramification locus is a sextic, you can check that $H^2(X,O_X)$ is one dimensional and thus $H^2(O_Y(n))$ is one dimensional. The only $n$ with that property is $n=-3$.
This is just to answer the OP's three questions below.

*

*I will stick to the case of a double cover, though this is much more general. In this case the map $f$ is got as the quotient of an an involution, $\sigma$ acting on $X$. Then one has a trace map $T:f_*\mathcal{O}_X\to \mathcal{O}_Y$, defined as $s\mapsto \frac{1}{2} (s+\sigma(s))$. Notice that if $s\in\mathcal{O}_Y$, then $T(s)=s$ and so this gives a splitting.


*Using the above, one gets $f_*\mathcal{O}_X=\mathcal{O}_Y\oplus L$ for a line bundle $L$ on $Y$, where $L$ is the kernel of $T$.


*If $f:X\to \mathbb{P}^2$ is a double cover branched along a degree $2n$ curve in the plane, the canonical bundle formula says $K_X=f^*(K_{\mathbb{P}^2}+nH)$ (you can find in any standard book dealing with covers). So, in your case $n=3$ and since $K_{\mathbb{P}^2}=-3H$, one gets that $K_X=\mathcal{O}_X$. Since $H^1(\mathcal{O}_X)=H^1(f_*\mathcal{O}_X)=H^1(\mathcal{O}_{\mathbb{P}^2}\oplus L)=0$, we see that $X$ is a $K3$ surface.
