Consider $E$ be an elliptic curve and $k$ a field. I read that one way to show that $E(k)$ has an abelian group structure can be derived using Riemann Roch. Could anybody explain how it concretely provides the desired result?
My considerations:
We have a group of divisors $Div(E)$ where the divisors are formal sums $\sum_{P \in E(k)} n_P (P)$ with $n_P \in \mathbb{Z}$ and the principal divisors $div(f) = \sum_P ord_P(f) (P)$ form a subgroup of $Div(E)$; denote it by $PrDiv(E)$.
The divisor class group is the quotient $Cl(E)= Div(E)/PrDiv(E)$.
We can define canonically a map $E(k) \to Cl(E), p \to (P)-(O)$ where $O$ is the special point (=neutral element).
Obviously it suffice to show that every divisor $D$ obtained from intersection of a line $L$ with $E$ has three points (counted we multiplicies). Or in language of divisors: For $D:= L \cap E$ we have to show that $deg(D)=3$, so $D= (P) + (Q) +(R) + div(f)$ for some principal divisor $div(f)$. This would settle $P+Q=-R$.
But I have some problems to derive it with Riemann Roch:
The RR-formula is:
$$l(D)-l(K-D) = deg(D) +g-1$$
Since $E$ elliptic $g=1$ so it suffice to show $l(D)-l(K-D)=3$.
And here I stuck. I know that $l(D) := dim_kH^0(D, \mathcal{O}_D)$ but this doesn't help me. Futhermore what to do with $l(K-D)$?
Remark: I know that there are a lot of other ways to derive the group law but the point of this question is to derive it using Riemann Roch.
Background on my question: @Awenshi's comment in https://mathoverflow.net/questions/6870/why-is-an-elliptic-curve-a-group