I'm trying to calculate the valuation of a function in a the function field of a coordinate ring $K(V) = { f / g : f, g \in K[x, y] }$.

My first attempt is to construct the coordinate ring $K[V] = K[x, y] / \langle C(x, y) \rangle$

```
sage: K.<x, y> = Integers(11)[]
sage: S = K.quotient(y^2 - x^3 - 4*x)
sage: S
Quotient of Multivariate Polynomial Ring in x, y over Ring of integers modulo 11 by the ideal (10*x^3 + y^2 + 7*x)
```

Now I want to see if a function $f = y - 2x$ lies in the ideal $I = \langle u \rangle$ where $u = x - 2$.

```
sage: I = S.ideal(x - 2)
sage: S(y - 2*x) in I
False
```

But sage is wrong. $y - 2x \in \langle x - 2 \rangle$ as shown by the following code:

```
sage: f1 = S(y - 2*x)
sage: f1
9*xbar + ybar
sage: f2 = S(
....: (x - 2) * (
....: (x - 2)^2*(y + 4) - 5*(x - 2)*(y + 4) - 2*((x - 2)^3 - 5*(x - 2)^2 + 5*(x - 2)
....: ))) / S((y + 4)^2)
sage: f2
9*xbar + ybar
sage: bool(f1 == f2)
True
```

As plainly visible, f2 has the factor $(x - 2)$.

How can I calculate this in sage without having to factor the polynomial myself?

Is there a way to construct local rings and maximal ideals? Or a way to calculate valuations (order of vanishing for poles and zeros) on elliptic curves?

Thanks