show how to compute divisor functions for divisors with effective size 1

This commit is contained in:
narodnik
2022-07-20 12:40:21 +02:00
parent 154fbc81da
commit cd030a3c69

View File

@@ -0,0 +1,29 @@
# Lets show that div(f) = [P] - [∞]
# So any divisor with supp(D) = {P},
# with an effective size of 1 can be represented
# by the horizontal line f = y - P.y
q = 47
K = GF(q)
E = EllipticCurve(K, (0, 5))
C = E.defining_polynomial()
R.<x, y> = PolynomialRing(K)
for i in range(100):
P = E.random_point()
Px, Py = P[0], P[1]
# Skip points at infinity
if P[2] == 0:
continue
assert P[2] == 1
f = y - Py
I = Ideal([C(x, y, 1), f])
V = I.variety()
print(P, V)
assert len(V) == 1
assert V[0][x] == Px
assert V[0][y] == Py