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

View File

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