# Elliptic Curve and Divisor Example help (Step 1)

I have an elliptic curve $E$ over $\mathbb{F}_{11}$ defined by $y^2=x^3+4x$ with the point at infinity $\mathcal{O}$

I have a divisor of $E$, defined by $$D=\left[(0,0)\right]+\left[(2,4)\right]+\left[(4,5)\right]+\left[(6,3)\right]-4\left[\mathcal{O}\right]$$

I know that $\text{deg}(D)=1+1+1+1-4=0$ and it is clear that $\text{sum}(D)=\infty$

Therefore $D$ is the divisor of a function - we want to find this function

I am given \begin{align}\text{div}(y-2x)&=\left[(0,0)\right]+2\left[(2,4)\right]-3\left[\mathcal{O}\right]\\ \text{div}(x-2)&=\left[(2,4)\right]+\left[(2,-4)\right]-2\left[\mathcal{O}\right] \end{align}

I am then told that we can express $D$ as follows:

$$D = \left[(2,4)\right]+\text{div}\left(\frac{y-2x}{x-2}\right)+\left[(4,5)\right]+\left[(6,3)\right]-3\left[\mathcal{O}\right]$$

However, when I expand this back out, I get the following:

\begin{align}D &= \left[(2,4)\right]+\text{div}\left(\frac{y-2x}{x-2}\right)+\left[(4,5)\right]+\left[(6,3)\right]-3\left[\mathcal{O}\right]\\ &= \left[(2,4)\right]+\text{div}(y-2x)-\text{div}(x-2)+\left[\left(4,5\right)\right]+\left[(6,3)\right]-3\left[\mathcal{O}\right]\\ &= \left[(2,4)\right]+\left(\left[(0,0)\right]+2\left[(2,4)\right]-3\left[\mathcal{O}\right]\right)-\left(\left[(2,4)\right]+\left[(2,-4)\right]-2\left[\mathcal{O}\right]\right)+\left[\left(4,5\right)\right]+\left[(6,3)\right]-3\left[\mathcal{O}\right]\\ &= \left[(0,0)\right]+2\left[(2,4)\right]+\left[(4,5)\right]+\left[(6,3)\right]+2\left[\mathcal{O}\right]-\left[(2,-4)\right] \end{align}

which clearly isn't equivalent to the original $D$ unless $$\left[(2,4)\right]+2\left[\mathcal{O}\right]-\left[(2,-4)\right]=-4\left[\mathcal{O}\right]$$

Can anyone either explain what I've done wrong or show me how I can obtain the above equation please

This question comes in three parts:

I believe the correct statement should be $$D= [(2,-4)]+div\left(\dfrac{y-2x}{x-2}\right)+[(4,5)]+[(6,3)]-3[\mathcal{O}].$$
On your third to forth line, you should have $-4[\mathcal{O}]$ not $2[\mathcal{O}]$ and then correcting the typo of $[(2,4)]$ with $[(2,-4)]$ should fix things.
Now note $D- div\left(\dfrac{y-2x}{x-2}\right)= [(2,-4)] + [(4,5)]+ [(6,3)]-3[\mathcal{O}]$ is the divisor of the line passing through those three points, i.e. $y=-x+9$. (Note $(2,-4)$ is indeed on this line over $\mathbb{F}_{11}$).
Hence $D- div\left(\dfrac{y-2x}{x-2}\right)=div(y+x-9)$ so $$D=div\left(\dfrac{(y-2x)(y+x-9)}{x-2}\right)=div\left(\dfrac{y^2-xy-2x^2+2y-4x}{x-2}\right),$$ where I have altered the coefficients slightly using that we are in $\mathbb{F}_{11}$.