Calculating the Divisor of a Line
Let our elliptic curve \(C\)be defined by \(y^2 = x^3 + cx +d\). We calculate the divisors \((y-ax-b)\)and \((x-c)\)in terms of the intersection points which we will label \(P, Q, R\)(so that \(\ominus R = P \oplus Q\)).
There are a couple of ways we could approach this, possibly the shortest route would be found by computing the order of \(y-ax -b\)at \(\mathcal{O} = [0 : 1 : 0]\)to be \(-3\), then using that a principal divisor has degree zero, and that each of the three intersection points, \(P, Q, R\)have order at least \(1\)so that overall \((y - ax -b) = 1 (P) + 1 (Q) + 1 (R) - 3 ( \mathcal{O})\).
Computing the order at infinity is quick if we use that one of the coordinate functions must be a uniformizer there. We consider our curve in projective space and then map to the affine patch containing \(\mathcal{O} = [0 : 1 : 0]\). There \(C\)is defined by \(Z = X^3+cXZ + dZ^3\), our line becomes \(1 = aX + bZ\)and \(\mathcal{O} = (0,0)\)(using the transformation \(X = x/y, Z = z/y\)). Then we know one of \(X\)or \(Z\)is a uniformizer, and it is just a matter of determining which has the lower order. We have \(Ord_\mathcal{O}(Z) \geq \min\{ 3 Ord_\mathcal{O}(X), Ord_\mathcal{O}(X) + Ord_\mathcal{O}(Z), 3 Ord_\mathcal{O}(Z) \} \) with equality if the minimum is unique. If we assume that the minimum is not unique then \(Ord_\mathcal{O}(Z) \neq 0\)implies \(Ord_\mathcal{O}(Z) < 3 Ord_\mathcal{O}(Z)\)so the minimum must be \(3 Ord_\mathcal{O}(X) = Ord_\mathcal{O}(X) + Ord_\mathcal{O}(Z)\). But then \(2 Ord_\mathcal{O}(X) = Ord_\mathcal{O}(Z) \geq 3 Ord_\mathcal{O}(X) \), a contradiction because \(Ord_\mathcal{O}(X) \neq 0\). Thus the minimum is unique and to avoid a contradiction must be \(3 Ord_\mathcal{O}(X)\). Thus \(X\)is the uniformizer and \(Z\)order \(3\). Back in projective coordinates this implies \(Ord_\mathcal{O}(x/y) = 1\)and \(Ord_\mathcal{O}(z/y) = 3\)and so in our original affine patch (\(z=1\)) \(Ord_\mathcal{O}(y) = -3\)and \(Ord_\mathcal{O}(x) = 1\)and \(Ord_\mathcal{O}(y - ax -b) = \min\{ -3, 1\} = -3\).
Okay, that was slightly longer than the author expected once written down. And there is more to follow (readers are advised to proceed at their own risk).
Let \(P = (\alpha, \beta)\)be an intersection point of \(y = ax + b\)and \(C\).
\textbf{Case 1 \(\beta \neq 0\):} We first show that \(x - \alpha\)is a uniformizer. To see this expand \(y^2 = x^3 + cx + d = C_0 + C_1(x- \alpha) + C_2(x - \alpha)^2 + C_3(x - \alpha)^3\). Then evaluating at \((\alpha, \beta)\)we see \(\beta^2 = C_0\), and so can rearrange \((y - \beta)(y + \beta) = y^2 - \beta^2 = C_1 (x - \alpha) + C_2 (x-\alpha)^2 + C_3(x - \alpha)^3\). Because \(\beta \neq 0\), \(y + \beta \( is a unit and we have
$$(y - \beta) = \frac{C_1 (x - \alpha) + C_2 (x-\alpha)^2 + C_3(x - \alpha)^3}{(y + \beta) }.$$
Clearly the right hand side is contained in \(\langle x - \alpha \rangle\). Thus the maximal ideal of \(\mathcal{O}_{C,P}\), a priory generated by \(\langle y - \beta, x - \alpha \rangle\)may in fact be written \(\langle x - \alpha \rangle\), implying \((x - \alpha)\)is a uniformizer.
Given this we can compute:
$$ (y - ax -b) (-y -ax -b) $$
$$ = -y^2 +a^2x^2 + 2abx + b^2 $$
$$ = a^2 x^2 + 2 a b x + b^2 - c x - d - x^3 $$
$$ = (b^2 - d + 2 a b \alpha - c \alpha + a^2 \alpha^2 - \alpha^3) + (2 a b - c + 2 a^2 \alpha - 3 \alpha^2) (x - \alpha) $$
$$ \hspace{8cm} + (a^2 - 3 \alpha) (x - \alpha)^2 - (x - \alpha)^3 $$
$$ = (x - \alpha)\left[(2 a b - c + 2 a^2 \alpha - 3 \alpha^2) + (a^2 - 3 \alpha) (x - \alpha)- (x - \alpha)^2 \right].$$
Where we have used in the last line that \(b^2 - d + 2 a b \alpha - c \alpha + a^2 \alpha^2 - \alpha^3 = (a\alpha + b)^2 - \alpha^3 - c \alpha^2 - d = \beta^2 - \beta^2 = 0\). Note that \(-y - a x - b\)is a unit (using our assumption \(\beta \neq 0\)). Suppose that \(y = ax + b\)is not tangent to \(C\), in this case the reader can confirm (by taking a derivative) that \(2 a b - c + 2 a^2 \alpha - 3 \alpha^2 \neq 0\)must hold. Thus:
$$u(x,y) : = \frac{\left[ (2 a b - c + 2 a^2 \alpha - 3 \alpha^2) + (a^2 - 3 \alpha) (x - \alpha)- (x - \alpha)^2 \right]}{(-y -ax -b) }$$
is a unit in \(\mathcal{O}_{C, P}\). And we have \((y - ax -b ) = u(x,y) (x - \alpha)\), giving us \(ord_P(y - ax - b) = 1\)as expected.
Alternatively, if we allow \(y = ax + b\)to be tangent, we see \(2 a b - c + 2 a^2 \alpha - 3 \alpha^2 = 0\)and so
$$(y - ax -b ) = (x- \alpha)^2 \frac{\left[ (a^2 - 3 \alpha) - (x - \alpha) \right]}{(-y -ax -b) }.$$
If \(a^2 \neq 3 \alpha \) we have that \(ord_P(y-ax-b) = ord_P((x-\alpha)^2) = 2\), else \(ord_P(y-ax-b) = ord_P((x-\alpha)^3) = 3\). In the first case we know (because \(deg(Div(y-ax-b)) = 0\)) that \(y-ax-b\)meets \(C\)at two distinct points, \(P, R = \ominus(P \oplus P)\), while in the second case all three of our intersection points are in fact the same point, \(P\).
\textbf{Case 2 \(\beta = 0\):} We claim that \(y\)is a uniformizer, and \(x - \alpha\)has order \(2\). Since \(\alpha^3 + c \alpha + d = 0\)our taylor expansion loses its constant term: \(y^2 = C_1 (x-\alpha) + C_2 (x - \alpha)^2 + C_3 (x - \alpha)^3 = (x-\alpha) \left[ C_1 + C_2 (x - \alpha) + C_3 (x - \alpha)^2 \right]\). Note \(C_1 \neq 0\)else our cubic is singular - thus the \(C_1 + C_2 (x - \alpha) + C_3 (x - \alpha)^2\)factor is a unit, so that:
$$(x - \alpha) = y^2 / (C_1 + C_2 (x - \alpha) + C_3 (x - \alpha)^2). $$
Since the maximal idea of \(\mathcal{O}_{C,P}\)was generated by \(\langle y, x- \alpha \rangle\), and we have just seen \(x - \alpha \in \langle y \rangle\), we have that \(y\)is in fact a uniformizer, while \(2 \cdot ord_{P} (y) = ord_{P} (x- \alpha) + 0\)implies the order of \(x - \alpha\)is \(2\).
Given this, we write \(y - ax - b = y - a(x - \alpha)\)(using that \(\alpha a + b = 0\)). Thus \(ord_{P}(y - ax - b) = \min \{ ord_{P}(y), ord_{P}(x-\alpha)\} = 1\)(using that the minimum is achieved when the two orders are distinct).
Thus we have found that for an intersection point \(P\), \(ord_{P}(y - ax - b) = 1, 2, \) or \(3\)depending on if \(y = ax + b\)is tangent to \(C\)at \(P\). Noting that a principal divisor has degree zero, and \(\mathcal{O}\)the only possible pole, we see then that \((y - ax - b) = 1 (P) + 1 (Q) + 1 (R) - 3 (\mathcal{O})\), where \(P, Q, R\)may in fact be the same point in some cases (in which case \((y - ax - b) = 2 (P) + 1 (R) - 3 (\mathcal{O})\)or \(3 (P) - 3 (\mathcal{O})\)).
\textbf{Vertical line case: \(x - r_x\)}. Yes dear reader, believe it or not, we have still not even answered the whole question. Luckily in this case much of our previous work applies. Here we are supposing our third intersection point \(Q = (r_x, r_y)\), and to begin with we will assume \(r_y \neq 0\). Then the derivations from Case 1 above apply and we have that \(x - r_x\)is a uniformizer, thus \(Ord_R(x-r_x) = 1\). By the same argument \(\ominus R = (r_x, -r_y)\)has identical uniformizer \(x-r_x\), so \(Ord_{\ominus R}(x-r_x) = 1\). Because these are the only two intersection points, and \(\mathcal{O}\)the only possible pole, we have \((x - r_x) = 1 (Q) + 1 (\ominus Q) - 2 (\mathcal{O})\).
If we assume \(r_y = 0\), then the derivations of case \(2\)apply and we have \(ord_R(x-r_x) = 2\). Note also that \(R = \ominus R\), and so there is only one intersection point and we have \((x - r_x) = 2 ( R ) - 2 (\mathcal{O})\).