Clarification about Riemann-Roch for non-reduced curves This is exercise 18.4.S in Vakil's Foundations of Algebraic Geometry.
Let $C$ be a projective curve over a field $k$ (possibly singular), with irreducible components $C_1, ... C_n$,  with generic points $\eta_1, .. \eta_n$, $L$ be an invertible sheaf and $F$ be a coherent sheaf on $C$. 
Then, show that $\chi(L \otimes F) - \chi(F)$ is the sum $\sum_{i=1}^n \deg(L\text{ on } C_i^{\operatorname{red}}) \cdot \operatorname{length}(F_{\eta_i})$ over $O_{C, \eta_i}$. 
One hint is to reduce to when $F$ is scheme-theoretically supported on $C^{\operatorname{red}}$, so we reduce to when $C$ is reduced.
Another hint given is to write $L = O(\sum n_j p_j)$ , where the $p_j$ are regular points different from the associated points on $F$.
There are a few things I don't understand about this exercise.


*

*What exactly does "$L$ on $C_i^{\operatorname{red}}$" mean? $L$ is a sheaf on $C$, not $C_i^{\operatorname{red}}$. Is it that we take $\deg(i^* L)$ where $i : C_i^{\operatorname{red}} \rightarrow C$ is the usual closed immersion?

*What does it mean that "$F$ is scheme-theoreteically supported on $C^{\operatorname{red}}$? Does this mean that $F$ is the pushforward of a sheaf $G$ on $C^{\operatorname{red}}$ along $i : C^{\operatorname{red}} \rightarrow C$?

*I don't know what $L = O(\sum n_j p_j)$ means nor why we can write it like this. Is $\sum n_j p_j$ a Weil divisor? The problem is that $C$ can be singular. The chapter on Weil divisors had a standing assumption that the scheme is regular in codimension 1. I don't know how to generalize Weil divisors to schemes that can be singular.

*Another question about $L = O(\sum n_j p_j)$. The part about $p_j$ different from the associated points of $F$. This suggests a relationship between $L$ and $F$. What is that relationship? Since $L$ can be any invertible sheaf and $F$ can be any coherent sheaf, I'd expect no relationship at all. 
 A: *

*Exactly what you said. I'm pretty sure whenever you have a projective curve $C$ inside of any scheme $X$ with a line bundle $L$, the "degree of $L$ on $C$" always means the degree of the pullback of $L$ to $C$.

*Exactly what you said. I guess this is defined in exercise 18.9.B

*You can take the $p_j$'s to be regular points, so it's a Cartier divisor, as in 14.3. Doing this means you don't have to worry about Weil divisors which might not be Cartier.

*This doesn't come from a relationship between $L$ and $F$, I think. He only wants to use that the sets of singular points and associated points of $F$ are both finite. Then, you can write $L$ as a difference of two hyperplane divisors (using the fact that $C$ is projective), and you can find a hyperplane avoiding a finite set.



Here's how to write $L$ as $\sum n_jp_j$:
First, $C$ is projective, so it has a very ample line bundle $\mathcal O(1)$. Then, for a big enough $n$, $L\otimes \mathcal O(1)=:L(n)$ is very ample (16.6.E), and in particular it is effective (16.6.B). So we can write $L$ as the difference of $A= L(n)$ and $B=\mathcal O(n)$, which we can assume are both very ample (I mean $L = A\otimes B^{-1}$).
Section 14.3 tells us that effective line bundles correspond to Cartier divisors. In particular, if $A$ (resp. $B$) is very ample, the divisor is a hyperplane class: it is made of $H\cap C$, where $C$ is embedded in $\mathbb P^N$ (according to 16.4.1.), and $H$ is a hyperplane in $\mathbb P^N$. Now, the embedded points of $C$ and its singular points form a finite set, so there is a hyperplane avoiding them (maybe you need to be  careful here if the field is finite). This means that $A = \mathcal O(C\cap H) = \mathcal O(n_jP_j)$ for some $n_j\ge 0$ and $P_j$ which are smooth points.
Applying the same reasoning to $B$, $B= \mathcal O(n_j'P_j')$, and then
$$
L = A\otimes B^{-1} = \mathcal O(n_jP_j)\otimes \mathcal O(n_j'P_j')^{-1} = \mathcal O(\sum_j n_jP_j-n_j'P_j').
$$
This is what Vakil claims we can find.
