better fix of algebraic closure

This commit is contained in:
jgarnek 2023-11-29 10:13:36 +00:00
parent 2705221dbf
commit 02a78921b3
2 changed files with 27 additions and 32 deletions

View File

@ -1,7 +1,7 @@
p = 3
F = GF(p^2, 'a')
p = 5
F = GF(p).algebraic_closure('t')
#F1 = F.algebraic_closure('t')
a = F.gens()[0]
a = F.gen(2)
R.<x> = PolynomialRing(F)
P1 = superelliptic(x, 1)
AS = as_cover(P1, [P1.x^2, a*P1.x^2])

View File

@ -238,38 +238,34 @@ class superelliptic:
b += M
return (C.x)^a/(C.y)^b
def reduction(curve, g):
def reduction(C, g):
'''Auxilliary. Given a superelliptic curve C : y^m = f(x) and a polynomial g(x, y)
it replaces repeteadly all y^m's in g(x, y) by f(x). As a result
you obtain sum_{i = 0}^{m-1} y^i g_i(x).'''
p = curve.characteristic
F = curve.base_ring
Fxy, Rxy, x, y = curve.fct_field
f = curve.polynomial
p = C.characteristic
F = C.base_ring
Rxy.<x, y> = PolynomialRing(F, 2)
Fxy = FractionField(Rxy)
f = C.polynomial
r = f.degree()
m = curve.exponent
m = C.exponent
g = Fxy(g)
g1 = g.numerator()
g2 = g.denominator()
Rx.<x> = PolynomialRing(F)
Rx.<x1> = PolynomialRing(F)
Fx = FractionField(Rx)
FxRy1.<y> = PolynomialRing(Fx, 1) #coercion problems from Rxy to FxRy
FxRy.<y2> = PolynomialRing(Fx) #coercion problems from Rxy to FxRy
(A, B, C) = xgcd(FxRy(FxRy1(g2)(y = y2)), FxRy(FxRy1(y^m - f)(y = y2))) #coercion problems from Rxy to FxRy
g = FxRy(FxRy1(g1)(y = y2))*B/A
g = FxRy(g)
FxRy.<y1> = PolynomialRing(Fx)
(A, B, C) = xgcd(FxRy(g2(x=x1, y=y1)), y1^m - FxRy(f(x=x1)))
g = FxRy(FxRy(g1(x=x1, y=y1))*B/A)
while(g.degree(y2) >= m):
d = g.degree(y2)
while(g.degree(y1) >= m):
d = g.degree(y1)
G = coff(g, d)
i = floor(d/m)
g = g - G*y2^d + f^i * y2^(d%m) *G
Rxy1.<x3, y3> = PolynomialRing(F, 2)
Fxy1 = FractionField(Rxy1)
g = sum(Fxy(y3)^i*Fx(coff(g, i)) for i in range(0, m))
g = Fxy(g)
return(g)
g = g - G*y1^d + Rx(f(x=x1)^i) * y1^(d%m) *G
return(Fxy(g(x1=x, y1 = y)))
def reduction_form(C, g):
'''Auxilliary. Given a superelliptic curve C : y^m = f(x) and a polynomial g(x, y)
@ -284,18 +280,17 @@ def reduction_form(C, g):
m = C.exponent
g = reduction(C, g)
g1 = Rxy(0)
Rx.<x> = PolynomialRing(F)
Rx.<x1> = PolynomialRing(F)
Fx = FractionField(Rx)
FxRy1.<y> = PolynomialRing(Fx, 1)
FxRy.<y2> = PolynomialRing(Fx)
g = FxRy(FxRy1(g)(y = y2))
FxRy.<y1> = PolynomialRing(Fx)
g1 = FxRy(0)
g = FxRy(g(x = x1, y=y1))
for j in range(0, m):
if j==0:
G = coff(g, 0)
g1 += Fxy(Fx(G))
g1 += FxRy(G(x=x1))
else:
G = coff(g, j)
g1 += Fxy(y)^(j-m)*Fxy(Fx(f*G))
g1 += y1^(j-m)*FxRy(f(x=x1)*G)
g1 = Fxy(g1(x1 = x, y1 = y))
return(g1)