on genus of divisor on surface

Harthshorne page-$366$, Exercise $1.3(a)$ states that if $D$ is an effective divisor on a surface $X$ one can use Riemann-Roch Theorem for line bundles on surface to show that $2P_a(D) -2= D.(D+K)$ where $K$ is the canonical divisor on $X$.

But if we start with the definition $P_a(D) =1- \chi (\mathcal O_X(D))$, then using Riemann-Roch one can deduce $1-P_a(D)= \frac{1}{2}D.(D-K) + \chi(\mathcal O_X)$. Till now I haven't used anywhere that $D$ is effective.

Could anyone indicate the brief argument regarding how to use effectivity of $D$ to reach to the desired expression of $P_a(D)$ from here?


Solution 1:

Your definition of $p_a(D)$ is incorrect, you confused the structure sheaf of $D$ as a scheme, written $\mathcal{O}_D$, with $\mathcal{O}_X(D)$, a line bundle on $X$ corresponding to the divisor $D$.

Note that you have the exact sequence $$0\to \mathcal{O}_X(-D)\to\mathcal{O}_X\to\mathcal{O}_D\to0$$

The sheaf on the right here is considered as a sheaf on $X$, but we can also consider it as a sheaf on $D$ and this doesn't affect cohomology. By the additivity of the Euler characteristic, we find

$$\chi(\mathcal{O}_X(-D))-\chi(\mathcal{O}_X)+\chi(\mathcal{O}_D)=0,$$

which can be written in terms of the $p_a$ of $X$ and $D$ as

$$\chi(\mathcal{O}_X(-D))+p_a(X)=p_a(D).$$

And now by Riemann-Roch we have $\chi(\mathcal{O}_X(-D))= \frac{1}{2}(-D).(-D-K) + 1-p_a(X).$ If you plug this in, you get the result.

The effectivity of $D$ is important for the statement: the genus is defined for a scheme, not a divisor, so the statement would make no sense for something like $D=-H$ on $X=\mathbb{P}^2$.