From 0e34637387736f05d499b8b9a034dcefaee75771 Mon Sep 17 00:00:00 2001 From: jgarnek Date: Mon, 7 Mar 2022 15:17:06 +0000 Subject: [PATCH] zmiana do Fxy(xi); nie dziala --- superelliptic_alpha.ipynb | 840 +++++++++++++++++++++++++++++++++++--- 1 file changed, 783 insertions(+), 57 deletions(-) diff --git a/superelliptic_alpha.ipynb b/superelliptic_alpha.ipynb index 47ec631..7e9ad11 100644 --- a/superelliptic_alpha.ipynb +++ b/superelliptic_alpha.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 5, + "execution_count": 71, "metadata": { "collapsed": false }, @@ -12,8 +12,10 @@ "def basis_holomorphic_differentials_degree(f, m, p):\n", " r = f.degree()\n", " delta = GCD(r, m)\n", - " Rx. = PolynomialRing(GF(p))\n", - " Rxy. = PolynomialRing(GF(p), 2)\n", + " Rxi. = PolynomialRing(GF(p))\n", + " kxi = FractionField(Rxi)\n", + " Rx. = PolynomialRing(kxi)\n", + " Rxy. = PolynomialRing(kxi, 2)\n", " Fxy = FractionField(Rxy)\n", " #########basis of holomorphic differentials and de Rham\n", " \n", @@ -41,8 +43,10 @@ "def basis_de_rham_degrees(f, m, p):\n", " r = f.degree()\n", " delta = GCD(r, m)\n", - " Rx. = PolynomialRing(GF(p))\n", - " Rxy. = PolynomialRing(GF(p), 2)\n", + " Rxi. = PolynomialRing(GF(p))\n", + " kxi = FractionField(Rxi)\n", + " Rx. = PolynomialRing(kxi)\n", + " Rxy. = PolynomialRing(kxi, 2)\n", " Fxy = FractionField(Rxy)\n", " basis_holo = holomorphic_differentials_basis(f, m, p)\n", " basis = []\n", @@ -80,10 +84,13 @@ "class superelliptic:\n", " \n", " def __init__(self, f, m, p):\n", - " Rx. = PolynomialRing(GF(p))\n", - " Rxy. = PolynomialRing(GF(p), 2)\n", + " Rxi. = PolynomialRing(GF(p))\n", + " kxi = FractionField(Rxi)\n", + " Rx. = PolynomialRing(kxi)\n", + " Rxy. = PolynomialRing(kxi, 2)\n", " Fxy = FractionField(Rxy)\n", " self.polynomial = Rx(f)\n", + " print(Rx(f))\n", " self.exponent = m\n", " self.characteristic = p\n", " \n", @@ -174,7 +181,9 @@ " \n", "def reduction(C, g):\n", " p = C.characteristic\n", - " Rxy. = PolynomialRing(GF(p), 2)\n", + " Rxi. = PolynomialRing(GF(p))\n", + " kxi = FractionField(Rxi)\n", + " Rxy. = PolynomialRing(kxi, 2)\n", " Fxy = FractionField(Rxy)\n", " f = C.polynomial\n", " r = f.degree()\n", @@ -183,7 +192,7 @@ " g1 = g.numerator()\n", " g2 = g.denominator()\n", " \n", - " Rx. = PolynomialRing(GF(p))\n", + " Rx. = PolynomialRing(kxi)\n", " Fx = FractionField(Rx)\n", " FxRy. = PolynomialRing(Fx) \n", " (A, B, C) = xgcd(FxRy(g2), FxRy(y^m - f))\n", @@ -198,8 +207,11 @@ " return(FxRy(g))\n", "\n", "def reduction_form(C, g):\n", + " print('red form', g)\n", " p = C.characteristic\n", - " Rxy. = PolynomialRing(GF(p), 2)\n", + " Rxi. = PolynomialRing(GF(p))\n", + " kxi = FractionField(Rxi)\n", + " Rxy. = PolynomialRing(kxi, 2)\n", " Fxy = FractionField(Rxy)\n", " f = C.polynomial\n", " r = f.degree()\n", @@ -207,7 +219,9 @@ " g = reduction(C, g)\n", "\n", " g1 = Rxy(0)\n", - " Rx. = PolynomialRing(GF(p))\n", + " Rxi. = PolynomialRing(GF(p))\n", + " kxi = FractionField(Rxi)\n", + " Rx. = PolynomialRing(kxi)\n", " Fx = FractionField(Rx)\n", " FxRy. = PolynomialRing(Fx)\n", " \n", @@ -216,15 +230,21 @@ " if j==0:\n", " G = coff(g, 0)\n", " g1 += FxRy(G)\n", + " print('g1 a', g1, G, FxRy(G))\n", " else:\n", " G = coff(g, j)\n", + " print('par', G.parent())\n", " g1 += Fxy(y^(j-m)*f*G)\n", + " print(y^(j-m)*f*G in Fxy)\n", + " print('g1 b', y^(j-m)*f*G, Fxy(y^(j-m)*f*G))\n", " return(g1)\n", " \n", "class superelliptic_function:\n", " def __init__(self, C, g):\n", " p = C.characteristic\n", - " Rxy. = PolynomialRing(GF(p), 2)\n", + " Rxi. = PolynomialRing(GF(p))\n", + " kxi = FractionField(Rxi)\n", + " Rxy. = PolynomialRing(kxi, 2)\n", " Fxy = FractionField(Rxy)\n", " f = C.polynomial\n", " r = f.degree()\n", @@ -241,7 +261,9 @@ " g = self.function\n", " C = self.curve\n", " p = C.characteristic\n", - " Rx. = PolynomialRing(GF(p))\n", + " Rxi. = PolynomialRing(GF(p))\n", + " kxi = FractionField(Rxi)\n", + " Rx. = PolynomialRing(kxi)\n", " Fx. = FractionField(Rx)\n", " FxRy. = PolynomialRing(Fx)\n", " g = FxRy(g)\n", @@ -281,7 +303,9 @@ " m = C.exponent\n", " p = C.characteristic\n", " g = self.function\n", - " Rxy. = PolynomialRing(GF(p), 2)\n", + " Rxi. = PolynomialRing(GF(p))\n", + " kxi = FractionField(Rxi)\n", + " Rxy. = PolynomialRing(kxi, 2)\n", " Fxy = FractionField(Rxy)\n", " g = Fxy(g)\n", " A = g.derivative(x)\n", @@ -291,8 +315,11 @@ "class superelliptic_form:\n", " def __init__(self, C, g):\n", " p = C.characteristic\n", - " Rxy. = PolynomialRing(GF(p), 2)\n", + " Rxi. = PolynomialRing(GF(p))\n", + " kxi = FractionField(Rxi)\n", + " Rxy. = PolynomialRing(kxi, 2)\n", " Fxy = FractionField(Rxy)\n", + " print('rf', reduction_form(C, g))\n", " g = Fxy(reduction_form(C, g))\n", " self.form = g\n", " self.curve = C \n", @@ -327,7 +354,9 @@ " m = C.exponent\n", " p = C.characteristic\n", " f = C.polynomial\n", - " Rx. = PolynomialRing(GF(p))\n", + " Rxi. = PolynomialRing(GF(p))\n", + " kxi = FractionField(Rxi)\n", + " Rx. = PolynomialRing(kxi)\n", " Fx = FractionField(Rx)\n", " FxRy. = PolynomialRing(Fx)\n", " Fxy = FractionField(FxRy)\n", @@ -347,7 +376,9 @@ " C = self.curve\n", " p = C.characteristic\n", " m = C.exponent\n", - " Rx. = PolynomialRing(GF(p))\n", + " Rxi. = PolynomialRing(GF(p))\n", + " kxi = FractionField(Rxi)\n", + " Rx. = PolynomialRing(kxi)\n", " Fx = FractionField(Rx)\n", " FxRy. = PolynomialRing(Fx)\n", " g = C.genus()\n", @@ -363,7 +394,7 @@ " a = coeff_of_rational_fctn(omega_j, p)\n", " a1 = coeff_of_rational_fctn(basis[index].jth_component(j), p)\n", " elt = self - (a/a1)*basis[index]\n", - " return elt.coordinates() + a/a1*vector([GF(p)(i == index) for i in range(0, g)])\n", + " return elt.coordinates() + a/a1*vector([kxi(i == index) for i in range(0, g)])\n", " \n", " return vector(g*[0])\n", " \n", @@ -371,7 +402,9 @@ " g = self.form\n", " C = self.curve\n", " p = C.characteristic\n", - " Rx. = PolynomialRing(GF(p))\n", + " Rxi. = PolynomialRing(GF(p))\n", + " kxi = FractionField(Rxi)\n", + " Rx. = PolynomialRing(kxi)\n", " Fx = FractionField(Rx)\n", " FxRy. = PolynomialRing(Fx)\n", " Fxy = FractionField(FxRy)\n", @@ -385,7 +418,9 @@ " C = self.curve\n", " p = C.characteristic\n", " m = C.exponent\n", - " Rx. = PolynomialRing(GF(p))\n", + " Rxi. = PolynomialRing(GF(p))\n", + " kxi = FractionField(Rxi)\n", + " Rx. = PolynomialRing(kxi)\n", " for j in range(1, m):\n", " if self.jth_component(j) not in Rx:\n", " return 0\n", @@ -453,7 +488,9 @@ " C = self.curve\n", " p = C.characteristic\n", " m = C.exponent\n", - " Rx. = PolynomialRing(GF(p))\n", + " Rxi. = PolynomialRing(GF(p))\n", + " kxi = FractionField(Rxi)\n", + " Rx. = PolynomialRing(kxi)\n", " Fx = FractionField(Rx)\n", " FxRy. = PolynomialRing(Fx)\n", " g = C.genus()\n", @@ -519,7 +556,9 @@ " return 0\n", " \n", "def degree_of_rational_fctn(f, p):\n", - " Rx. = PolynomialRing(GF(p))\n", + " Rxi. = PolynomialRing(GF(p))\n", + " kxi = FractionField(Rxi)\n", + " Rx. = PolynomialRing(kxi)\n", " Fx = FractionField(Rx)\n", " f = Fx(f)\n", " f1 = f.numerator()\n", @@ -529,7 +568,9 @@ " return(d1 - d2)\n", "\n", "def coeff_of_rational_fctn(f, p):\n", - " Rx. = PolynomialRing(GF(p))\n", + " Rxi. = PolynomialRing(GF(p))\n", + " kxi = FractionField(Rxi)\n", + " Rx. = PolynomialRing(kxi)\n", " Fx = FractionField(Rx)\n", " f = Fx(f)\n", " if f == Rx(0):\n", @@ -554,7 +595,9 @@ " return sum(R(x^(j-i-1)) * coeff[j] for j in range(i+1, f.degree() + 1))\n", "\n", "def polynomial_part(p, h):\n", - " Rx. = PolynomialRing(GF(p))\n", + " Rxi. = PolynomialRing(GF(p))\n", + " kxi = FractionField(Rxi)\n", + " Rx. = PolynomialRing(kxi)\n", " h = Rx(h)\n", " result = Rx(0)\n", " for i in range(0, h.degree()+1):\n", @@ -566,7 +609,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 50, "metadata": { "collapsed": false }, @@ -2197,15 +2240,678 @@ ] }, { - "cell_type": "code", - "execution_count": 8, + "cell_type": "markdown", "metadata": { "collapsed": false }, + "source": [ + "# Testy" + ] + }, + { + "cell_type": "code", + "execution_count": 72, + "metadata": { + "collapsed": false, + "scrolled": true + }, "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "x^15 + x^5 + 1\n", + "red form 1/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "False\n", + "g1 b 1/y 1/xi\n", + "rf 1/xi\n", + "red form 1/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "False\n", + "g1 b 1/y 1/xi\n", + "red form x/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x/y x/y\n", + "rf x/y\n", + "red form x/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x/y x/y\n", + "red form x^2/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x^2/y x^2/y\n", + "rf x^2/y\n", + "red form x^2/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "True\n", + "g1 b x^2/y x^2/y\n", + "red form x^3/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x^3/y x^3/y\n", + "rf x^3/y\n", + "red form x^3/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x^3/y x^3/y\n", + "red form x^4/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x^4/y x^4/y\n", + "rf x^4/y\n", + "red form x^4/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x^4/y x^4/y\n", + "red form x^5/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x^5/y x^5/y\n", + "rf x^5/y\n", + "red form x^5/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "g1 b x^5/y x^5/y\n", + "red form x^6/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x^6/y x^6/y\n", + "rf x^6/y\n", + "red form x^6/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x^6/y x^6/y\n", + "red form 1/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "False\n", + "g1 b 1/y 1/xi\n", + "rf 1/xi\n", + "red form 1/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "False\n", + "g1 b 1/y 1/xi\n", + "red form 0\n", + "g1 a 0 0 0\n", + "par Integer Ring\n", + "True\n", + "g1 b 0 0\n", + "rf 0\n", + "red form 0\n", + "g1 a 0 0 0\n", + "par Integer Ring\n", + "True\n", + "g1 b 0 0\n", + "red form 1/xi\n", + "g1 a 1/xi 1/xi 1/xi\n", + "par Integer Ring\n", + "True\n", + "g1 b 0 0\n", + "rf 1/xi\n", + "red form 1/xi\n", + "g1 a 1/xi 1/xi 1/xi\n", + "par Integer Ring\n", + "True\n", + "g1 b 0 0\n", + "red form x/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "g1 b x/y x/y\n", + "rf x/y\n", + "red form x/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x/y x/y\n", + "red form 0\n", + "g1 a 0 0 0\n", + "par Integer Ring\n", + "True\n", + "g1 b 0 0\n", + "rf 0\n", + "red form 0\n", + "g1 a 0 0 0\n", + "par Integer Ring\n", + "True\n", + "g1 b 0 0\n", + "red form (x/(x^15 + x^5 + 1))*y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x/y x/y\n", + "rf x/y\n", + "red form (x/(x^15 + x^5 + 1))*y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x/y x/y\n", + "red form x^2/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x^2/y x^2/y\n", + "rf x^2/y\n", + "red form x^2/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x^2/y x^2/y\n", + "red form 0\n", + "g1 a 0 0 0\n", + "par Integer Ring\n", + "True\n", + "g1 b 0 0\n", + "rf 0\n", + "red form 0\n", + "g1 a 0 0 0\n", + "par Integer Ring\n", + "True" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "g1 b 0 0\n", + "red form (x^2/(x^15 + x^5 + 1))*y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x^2/y x^2/y\n", + "rf x^2/y\n", + "red form (x^2/(x^15 + x^5 + 1))*y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x^2/y x^2/y\n", + "red form x^3/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x^3/y x^3/y\n", + "rf x^3/y\n", + "red form x^3/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x^3/y x^3/y\n", + "red form 0\n", + "g1 a 0 0 0\n", + "par Integer Ring\n", + "True\n", + "g1 b 0 0\n", + "rf 0\n", + "red form 0\n", + "g1 a 0 0 0\n", + "par Integer Ring\n", + "True\n", + "g1 b 0 0\n", + "red form (x^3/(x^15 + x^5 + 1))*y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x^3/y x^3/y\n", + "rf x^3/y\n", + "red form (x^3/(x^15 + x^5 + 1))*y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "True\n", + "g1 b x^3/y x^3/y\n", + "red form x^4/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x^4/y x^4/y\n", + "rf x^4/y\n", + "red form x^4/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x^4/y x^4/y\n", + "red form 0\n", + "g1 a 0 0 0\n", + "par Integer Ring\n", + "True\n", + "g1 b 0 0\n", + "rf 0\n", + "red form 0\n", + "g1 a 0 0 0\n", + "par Integer Ring\n", + "True\n", + "g1 b 0 0\n", + "red form (x^4/(x^15 + x^5 + 1))*y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x^4/y x^4/y\n", + "rf x^4/y\n", + "red form (x^4/(x^15 + x^5 + 1))*y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "g1 b x^4/y x^4/y\n", + "red form x^5/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x^5/y x^5/y\n", + "rf x^5/y\n", + "red form x^5/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x^5/y x^5/y\n", + "red form 0\n", + "g1 a 0 0 0\n", + "par Integer Ring\n", + "True\n", + "g1 b 0 0\n", + "rf 0\n", + "red form 0\n", + "g1 a 0 0 0\n", + "par Integer Ring\n", + "True\n", + "g1 b 0 0\n", + "red form (x^5/(x^15 + x^5 + 1))*y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x^5/y x^5/y\n", + "rf x^5/y\n", + "red form (x^5/(x^15 + x^5 + 1))*y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x^5/y x^5/y\n", + "red form x^6/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "True\n", + "g1 b x^6/y x^6/y\n", + "rf x^6/y\n", + "red form x^6/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x^6/y x^6/y\n", + "red form 0\n", + "g1 a 0 0 0\n", + "par Integer Ring\n", + "True\n", + "g1 b 0 0\n", + "rf 0\n", + "red form 0\n", + "g1 a 0 0 0\n", + "par Integer Ring\n", + "True\n", + "g1 b 0 0\n", + "red form (x^6/(x^15 + x^5 + 1))*y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x^6/y x^6/y\n", + "rf x^6/y\n", + "red form (x^6/(x^15 + x^5 + 1))*y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x^6/y x^6/y\n", + "red form (-2*x^13 - 2*x^3)/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b (3*x^13 + 3*x^3)/y (-2*x^13 - 2*x^3)/y\n", + "rf (3*x^13 + 3*x^3)/y\n", + "red form (-2*x^13 - 2*x^3)/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "True\n", + "g1 b (3*x^13 + 3*x^3)/y (-2*x^13 - 2*x^3)/y\n", + "red form (-2*y)/x^2\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b ((3*x^15 + 3*x^5 + 3)/x^2)/y (-2*x^15 - 2*x^5 - 2)/(x^2*y)\n", + "rf ((3*x^15 + 3*x^5 + 3)/x^2)/y\n", + "red form (-2*y)/x^2\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b ((3*x^15 + 3*x^5 + 3)/x^2)/y (-2*x^15 - 2*x^5 - 2)/(x^2*y)\n", + "red form (2/(x^17 + x^7 + x^2))*y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b 2/x^2/y 2/(x^2*y)\n", + "rf 2/x^2/y\n", + "red form (2/(x^17 + x^7 + x^2))*y\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b 2/x^2/y 2/(x^2*y)\n", + "red form (x^12 + x^2)/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b (x^12 + x^2)/y (x^12 + x^2)/y\n", + "rf (x^12 + x^2)/y\n", + "red form (x^12 + x^2)/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b (x^12 + x^2)/y (x^12 + x^2)/y\n", + "red form y/x^3\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b ((x^15 + x^5 + 1)/x^3)/y (x^15 + x^5 + 1)/(x^3*y)\n", + "rf ((x^15 + x^5 + 1)/x^3)/y\n", + "red form y/x^3\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "g1 b ((x^15 + x^5 + 1)/x^3)/y (x^15 + x^5 + 1)/(x^3*y)\n", + "red form (4/(x^18 + x^8 + x^3))*y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b 4/x^3/y (-1)/(x^3*y)\n", + "rf 4/x^3/y\n", + "red form (4/(x^18 + x^8 + x^3))*y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b 4/x^3/y (-1)/(x^3*y)\n", + "red form (-x^11 - x)/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b (4*x^11 + 4*x)/y (-x^11 - x)/y\n", + "rf (4*x^11 + 4*x)/y\n", + "red form (-x^11 - x)/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "True\n", + "g1 b (4*x^11 + 4*x)/y (-x^11 - x)/y\n", + "red form (-y)/x^4\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b ((4*x^15 + 4*x^5 + 4)/x^4)/y (-x^15 - x^5 - 1)/(x^4*y)\n", + "rf ((4*x^15 + 4*x^5 + 4)/x^4)/y\n", + "red form (-y)/x^4\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b ((4*x^15 + 4*x^5 + 4)/x^4)/y (-x^15 - x^5 - 1)/(x^4*y)\n", + "red form (1/(x^19 + x^9 + x^4))*y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b 1/x^4/y 1/(x^4*y)\n", + "rf 1/x^4/y\n", + "red form (1/(x^19 + x^9 + x^4))*y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "True\n", + "g1 b 1/x^4/y 1/(x^4*y)\n", + "red form (2*x^10 + 2)/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b (2*x^10 + 2)/y (2*x^10 + 2)/y\n", + "rf (2*x^10 + 2)/y\n", + "red form (2*x^10 + 2)/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b (2*x^10 + 2)/y (2*x^10 + 2)/y\n", + "red form 2*y/x^5\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b ((2*x^15 + 2*x^5 + 2)/x^5)/y (2*x^15 + 2*x^5 + 2)/(x^5*y)\n", + "rf ((2*x^15 + 2*x^5 + 2)/x^5)/y\n", + "red form 2*y/x^5\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b ((2*x^15 + 2*x^5 + 2)/x^5)/y (2*x^15 + 2*x^5 + 2)/(x^5*y)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "red form (3/(x^20 + x^10 + x^5))*y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b 3/x^5/y (-2)/(x^5*y)\n", + "rf 3/x^5/y\n", + "red form (3/(x^20 + x^10 + x^5))*y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b 3/x^5/y (-2)/(x^5*y)\n", + "red form 0\n", + "g1 a 0 0 0\n", + "par Integer Ring\n", + "True\n", + "g1 b 0 0\n", + "rf 0\n", + "red form 0\n", + "g1 a 0 0 0\n", + "par Integer Ring\n", + "True\n", + "g1 b 0 0\n", + "red form 0\n", + "g1 a 0 0 0\n", + "par Integer Ring\n", + "True\n", + "g1 b 0 0\n", + "rf 0\n", + "red form 0\n", + "g1 a 0 0 0\n", + "par Integer Ring\n", + "True\n", + "g1 b 0 0\n", + "red form 0\n", + "g1 a 0 0 0\n", + "par Integer Ring\n", + "True\n", + "g1 b 0 0\n", + "rf 0\n", + "red form 0\n", + "g1 a 0 0 0\n", + "par Integer Ring\n", + "True\n", + "g1 b 0 0\n", + "red form (-2*x^8)/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "g1 b 3*x^8/y (-2*x^8)/y\n", + "rf 3*x^8/y\n", + "red form (-2*x^8)/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b 3*x^8/y (-2*x^8)/y\n", + "red form (-2*y)/x^7\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b ((3*x^15 + 3*x^5 + 3)/x^7)/y (-2*x^15 - 2*x^5 - 2)/(x^7*y)\n", + "rf ((3*x^15 + 3*x^5 + 3)/x^7)/y\n", + "red form (-2*y)/x^7\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b ((3*x^15 + 3*x^5 + 3)/x^7)/y (-2*x^15 - 2*x^5 - 2)/(x^7*y)\n", + "red form ((2*x^5 + 2)/(x^22 + x^12 + x^7))*y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b ((2*x^5 + 2)/x^7)/y (2*x^5 + 2)/(x^7*y)\n", + "rf ((2*x^5 + 2)/x^7)/y\n", + "red form ((2*x^5 + 2)/(x^22 + x^12 + x^7))*y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "True\n", + "g1 b ((2*x^5 + 2)/x^7)/y (2*x^5 + 2)/(x^7*y)\n", + "red form x^7/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x^7/y x^7/y\n", + "rf x^7/y\n", + "red form x^7/y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b x^7/y x^7/y\n", + "red form y/x^8\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b ((x^15 + x^5 + 1)/x^8)/y (x^15 + x^5 + 1)/(x^8*y)\n", + "rf ((x^15 + x^5 + 1)/x^8)/y\n", + "red form y/x^8\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b ((x^15 + x^5 + 1)/x^8)/y (x^15 + x^5 + 1)/(x^8*y)\n", + "red form ((4*x^5 + 4)/(x^23 + x^13 + x^8))*y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "True\n", + "g1 b ((4*x^5 + 4)/x^8)/y (-x^5 - 1)/(x^8*y)\n", + "rf ((4*x^5 + 4)/x^8)/y\n", + "red form ((4*x^5 + 4)/(x^23 + x^13 + x^8))*y\n", + "g1 a 0 0 0\n", + "par Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in xi over Finite Field of size 5\n", + "True\n", + "g1 b ((4*x^5 + 4)/x^8)/y (-x^5 - 1)/(x^8*y)\n" + ] + } ], "source": [ - "a = 1+2*s+s^2" + "p = 5\n", + "Rxi. = PolynomialRing(GF(p))\n", + "kxi = FractionField(Rxi)\n", + "Rx. = PolynomialRing(kxi)\n", + "Rxy. = PolynomialRing(kxi, 2)\n", + "Fxy = FractionField(Rxy)\n", + "\n", + "f1 = Rx(x^3 + x + 1)\n", + "f = Rx(f1(x^p))\n", + "m = 2\n", + "C = superelliptic(f, m, p)" ] }, { @@ -2233,42 +2939,19 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 73, "metadata": { "collapsed": false }, "outputs": [ ], "source": [ - "p = 5\n", - "Rx. = PolynomialRing(GF(p))\n", - "Rxy. = PolynomialRing(GF(p), 2)\n", - "Fxy = FractionField(Rxy)\n", - "kxi1. = PolynomialRing(Fxy)\n", - "kxi = kxi1.quotient(xi1^p)\n", - "xi = kxi(xi1)\n", - "\n", - "f1 = Rx(x^3 + x + 1)\n", - "f = Rx(f1(x^p))\n", - "m = 2\n", - "C = superelliptic(f, m, p)" + "omega = C.basis_holomorphic_differentials[0]" ] }, { "cell_type": "code", - "execution_count": 11, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "omega = C.basis_holomorphic_differentials[2]" - ] - }, - { - "cell_type": "code", - "execution_count": 12, + "execution_count": 74, "metadata": { "collapsed": false }, @@ -2276,10 +2959,10 @@ { "data": { "text/plain": [ - "x^2/y" + "1/xi" ] }, - "execution_count": 12, + "execution_count": 74, "metadata": { }, "output_type": "execute_result" @@ -2316,7 +2999,8 @@ "cell_type": "code", "execution_count": 15, "metadata": { - "collapsed": false + "collapsed": false, + "scrolled": true }, "outputs": [ { @@ -2350,6 +3034,48 @@ "omega1 = superelliptic_form(C, omega.form(x = x+xi, y = y))" ] }, + { + "cell_type": "code", + "execution_count": 68, + "metadata": { + "collapsed": false + }, + "outputs": [ + ], + "source": [ + "kxi1. = PolynomialRing(GF(p))\n", + "kxi = FractionField(kxi1)\n", + "Rxy. = PolynomialRing(kxi, 2)\n", + "Fxy = FractionField(Rxy)\n", + "\n", + "Rx. = PolynomialRing(kxi)\n", + "Fx = FractionField(Rx)\n", + "FxRy. = PolynomialRing(Fx)" + ] + }, + { + "cell_type": "code", + "execution_count": 69, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/plain": [ + "x/y" + ] + }, + "execution_count": 69, + "metadata": { + }, + "output_type": "execute_result" + } + ], + "source": [ + "Fxy(FxRy(x)/y)" + ] + }, { "cell_type": "code", "execution_count": 0,