# Calculating divisor of function on elliptic curve

divisors-algebraic-geometryelliptic-curves

I read Pairings for Beginners by Craig Costello.
In the example 3.1.1 at 37-th page we consider $$E/F_{103} : y^2 = x^3 + 20x + 20$$, with
points $$P = (26, 20), Q = (63, 78), R = (59, 95), T = (77, 84)$$ all on $$E$$. The author defines function $$f = \frac{6y + 71x^2 + 91x + 91}{x^2 + 70x + 11}$$ and states that it's divisor is $$(f) = (P) + (Q) – (R) – (T)$$. To check that there is no zero/pole at $$\mathcal{O} = (0 : 1 : 0)$$ we look at $$f$$ in projective space $$f = \frac{6YZ + 71X^2 + 91XZ + 91Z^2}{X^2 + 70XZ + 11Z^2}$$. At infinity both the numerator and the denominator are zero and the book says that they cancels out. But I see that if we substitute $$Y=1$$ and $$X=Z \to 0$$ the numerator will tend to zero linearly while the denominator quadraticly. And that should give us first order pole at $$\mathcal{O}$$.

My version of $$f$$ is $$f' =\frac{y+4x+82}{y+75x+12}$$ and it clearly evaluates to $$1$$ at $$\mathcal{O}$$.
Do I calculating divisors wrong?

The example problem concerns an elliptic curve $$y^2 = x^3 + 20x + 20. \tag{1}$$ If $$\,x\,$$ goes to infinity, then let $$\,x=1/t^2\,$$ where $$\,t\,$$ goes to zero and then $$y = \sqrt{x^3 + 20x + 20} = 1/t^3 + 10t + 10t^3 -50t^5 +O(t^7). \tag{2}$$ Thus, $$\,x\,$$ has a pole of order $$2$$ and $$\,y\,$$ has a pole of order $$3$$ at infinity. More easily seen by eliminating all but the leading terms of equation $$(1)$$ to get $$\,y^2=x^3\,$$ and then $$\,y=1/t^3.$$
The standard parameterization $$x = X/Z,\quad y = Y/Z \tag{3}$$ obscures this. A better one often used in cryptography is "Jacobian coordinates" $$x = X/T^2,\quad y = Y/T^3. \tag{4}$$ Now, given that $$f = \frac{6y + 71x^2 + 91x + 91}{x^2 + 70x + 11}, \tag{5}$$ the new projectivization in equation $$(4)$$ gives $$f = \frac{71X^2 + 6TY + 91T^2 + 91T^4}{X^2+70XT^2+11T^4} . \tag{6}$$ The elliptic curve equation $$(1)$$ in the new parametrization is $$Y^2 = X^3+20XT^4+20T^6. \tag{7}$$ The substitution $$\,X = Y = 1\,$$ and $$\,T = 0\,$$ satisfies this equation and represents the point at infinity. It also gives $$\,f = 71.\,$$
Note that the advantage of equation $$(3)$$ is that it is homogeneous. That is, $$\,(X,Y,Z)\,$$ represents the same point as $$\,(cX,cY,cZ)\,$$ for any nonzero $$\,c.\,$$ For equation $$(4)$$ the corresponding property is that the tuple $$\,(X,Y,T)\,$$ represents the same point as $$\,(c^2X,c^3Y,cZ)\,$$ and this difference must be clearly understood.