From f13f890270ef83aaa8d599b41da3d1cc18f9b4b0 Mon Sep 17 00:00:00 2001 From: jgarnek Date: Mon, 10 Oct 2022 18:44:49 +0000 Subject: [PATCH] dowolony base ring --- superelliptic.ipynb | 2103 ++----------------------------------------- 1 file changed, 84 insertions(+), 2019 deletions(-) diff --git a/superelliptic.ipynb b/superelliptic.ipynb index 620e462..5b97fcf 100644 --- a/superelliptic.ipynb +++ b/superelliptic.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 44, + "execution_count": 54, "metadata": { "collapsed": false }, @@ -11,13 +11,17 @@ "source": [ "class superelliptic:\n", " \n", - " def __init__(self, f, m, p):\n", - " Rx. = PolynomialRing(GF(p))\n", - " Rxy. = PolynomialRing(GF(p), 2)\n", + " def __init__(self, f, m):\n", + " Rx = f.parent()\n", + " x = Rx.gen()\n", + " F = Rx.base() \n", + " Rx. = PolynomialRing(F)\n", + " Rxy. = PolynomialRing(F, 2)\n", " Fxy = FractionField(Rxy)\n", " self.polynomial = Rx(f)\n", " self.exponent = m\n", - " self.characteristic = p\n", + " self.base_ring = F\n", + " self.characteristic = F.characteristic()\n", " \n", " r = Rx(f).degree()\n", " delta = GCD(r, m)\n", @@ -25,8 +29,8 @@ " def __repr__(self):\n", " f = self.polynomial\n", " m = self.exponent\n", - " p = self.characteristic\n", - " return 'Superelliptic curve with the equation y^' + str(m) + ' = ' + str(f)+' over finite field with ' + str(p) + ' elements.'\n", + " F = self.base_ring\n", + " return 'Superelliptic curve with the equation y^' + str(m) + ' = ' + str(f)+' over ' + str(F)\n", "\n", " \n", " def basis_holomorphic_differentials_degree(self):\n", @@ -34,8 +38,9 @@ " m = self.exponent\n", " r = f.degree()\n", " delta = GCD(r, m)\n", - " Rx. = PolynomialRing(GF(p))\n", - " Rxy. = PolynomialRing(GF(p), 2)\n", + " F = self.base_ring\n", + " Rx. = PolynomialRing(F)\n", + " Rxy. = PolynomialRing(F, 2)\n", " Fxy = FractionField(Rxy)\n", " #########basis of holomorphic differentials and de Rham\n", "\n", @@ -65,8 +70,9 @@ " m = self.exponent\n", " r = f.degree()\n", " delta = GCD(r, m)\n", - " Rx. = PolynomialRing(GF(p))\n", - " Rxy. = PolynomialRing(GF(p), 2)\n", + " F = self.base_ring\n", + " Rx. = PolynomialRing(F)\n", + " Rxy. = PolynomialRing(F, 2)\n", " Fxy = FractionField(Rxy)\n", " basis_holo = self.holomorphic_differentials_basis()\n", " basis = []\n", @@ -116,7 +122,8 @@ " basis = self.de_rham_basis()\n", " g = self.genus()\n", " p = self.characteristic\n", - " M = matrix(GF(p), 2*g, 2*g)\n", + " F = self.base_ring\n", + " M = matrix(F, 2*g, 2*g)\n", " for i in range(0, len(basis)):\n", " w = basis[i]\n", " v = w.verschiebung().coordinates()\n", @@ -127,7 +134,8 @@ " basis = self.de_rham_basis()\n", " g = self.genus()\n", " p = self.characteristic\n", - " M = matrix(GF(p), 2*g, 2*g)\n", + " F = self.base_ring\n", + " M = matrix(F, 2*g, 2*g)\n", " \n", " for i in range(0, len(basis)):\n", " w = basis[i]\n", @@ -136,10 +144,11 @@ " return M\n", "\n", " def cartier_matrix(self):\n", - " basis = self.basis_holomorphic_differentials()\n", + " basis = self.holomorphic_differentials_basis()\n", " g = self.genus()\n", " p = self.characteristic\n", - " M = matrix(GF(p), g, g)\n", + " F = self.base_ring\n", + " M = matrix(F, g, g)\n", " for i in range(0, len(basis)):\n", " w = basis[i]\n", " v = w.cartier().coordinates()\n", @@ -154,14 +163,15 @@ " return g - self.cartier_matrix().rank()\n", " \n", " def final_type(self, test = 0):\n", - " F = self.frobenius_matrix()\n", + " Fr = self.frobenius_matrix()\n", " V = self.verschiebung_matrix()\n", " p = self.characteristic\n", - " return flag(F, V, p, test)\n", + " return flag(Fr, V, p, test)\n", " \n", "def reduction(C, g):\n", " p = C.characteristic\n", - " Rxy. = PolynomialRing(GF(p), 2)\n", + " F = C.base_ring\n", + " Rxy. = PolynomialRing(F, 2)\n", " Fxy = FractionField(Rxy)\n", " f = C.polynomial\n", " r = f.degree()\n", @@ -170,7 +180,7 @@ " g1 = g.numerator()\n", " g2 = g.denominator()\n", " \n", - " Rx. = PolynomialRing(GF(p))\n", + " Rx. = PolynomialRing(F)\n", " Fx = FractionField(Rx)\n", " FxRy. = PolynomialRing(Fx) \n", " (A, B, C) = xgcd(FxRy(g2), FxRy(y^m - f))\n", @@ -185,8 +195,8 @@ " return(FxRy(g))\n", "\n", "def reduction_form(C, g):\n", - " p = C.characteristic\n", - " Rxy. = PolynomialRing(GF(p), 2)\n", + " F = C.base_ring\n", + " Rxy. = PolynomialRing(F, 2)\n", " Fxy = FractionField(Rxy)\n", " f = C.polynomial\n", " r = f.degree()\n", @@ -194,7 +204,7 @@ " g = reduction(C, g)\n", "\n", " g1 = Rxy(0)\n", - " Rx. = PolynomialRing(GF(p))\n", + " Rx. = PolynomialRing(F)\n", " Fx = FractionField(Rx)\n", " FxRy. = PolynomialRing(Fx)\n", " \n", @@ -210,8 +220,8 @@ " \n", "class superelliptic_function:\n", " def __init__(self, C, g):\n", - " p = C.characteristic\n", - " Rxy. = PolynomialRing(GF(p), 2)\n", + " F = C.base_ring\n", + " Rxy. = PolynomialRing(F, 2)\n", " Fxy = FractionField(Rxy)\n", " f = C.polynomial\n", " r = f.degree()\n", @@ -227,8 +237,8 @@ " def jth_component(self, j):\n", " g = self.function\n", " C = self.curve\n", - " p = C.characteristic\n", - " Rx. = PolynomialRing(GF(p))\n", + " F = C.base_ring\n", + " Rx. = PolynomialRing(F)\n", " Fx. = FractionField(Rx)\n", " FxRy. = PolynomialRing(Fx)\n", " g = FxRy(g)\n", @@ -266,9 +276,9 @@ " C = self.curve\n", " f = C.polynomial\n", " m = C.exponent\n", - " p = C.characteristic\n", + " F = C.base_ring\n", " g = self.function\n", - " Rxy. = PolynomialRing(GF(p), 2)\n", + " Rxy. = PolynomialRing(F, 2)\n", " Fxy = FractionField(Rxy)\n", " g = Fxy(g)\n", " A = g.derivative(x)\n", @@ -277,8 +287,8 @@ " \n", "class superelliptic_form:\n", " def __init__(self, C, g):\n", - " p = C.characteristic\n", - " Rxy. = PolynomialRing(GF(p), 2)\n", + " F = C.base_ring\n", + " Rxy. = PolynomialRing(F, 2)\n", " Fxy = FractionField(Rxy)\n", " g = Fxy(reduction_form(C, g))\n", " self.form = g\n", @@ -314,7 +324,8 @@ " m = C.exponent\n", " p = C.characteristic\n", " f = C.polynomial\n", - " Rx. = PolynomialRing(GF(p))\n", + " F = C.base_ring\n", + " Rx. = PolynomialRing(F)\n", " Fx = FractionField(Rx)\n", " FxRy. = PolynomialRing(Fx)\n", " Fxy = FractionField(FxRy)\n", @@ -332,33 +343,33 @@ " \n", " def coordinates(self):\n", " C = self.curve\n", - " p = C.characteristic\n", + " F = C.base_ring\n", " m = C.exponent\n", - " Rx. = PolynomialRing(GF(p))\n", + " Rx. = PolynomialRing(F)\n", " Fx = FractionField(Rx)\n", " FxRy. = PolynomialRing(Fx)\n", " g = C.genus()\n", " degrees_holo = C.degrees_holomorphic_differentials()\n", " degrees_holo_inv = {b:a for a, b in degrees_holo.items()}\n", - " basis = C.basis_holomorphic_differentials()\n", + " basis = C.holomorphic_differentials_basis()\n", " \n", " for j in range(1, m):\n", " omega_j = Fx(self.jth_component(j))\n", " if omega_j != Fx(0):\n", - " d = degree_of_rational_fctn(omega_j, p)\n", + " d = degree_of_rational_fctn(omega_j, F)\n", " index = degrees_holo_inv[(d, j)]\n", - " a = coeff_of_rational_fctn(omega_j, p)\n", - " a1 = coeff_of_rational_fctn(basis[index].jth_component(j), p)\n", + " a = coeff_of_rational_fctn(omega_j, F)\n", + " a1 = coeff_of_rational_fctn(basis[index].jth_component(j), F)\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([F(i == index) for i in range(0, g)])\n", " \n", " return vector(g*[0])\n", " \n", " def jth_component(self, j):\n", " g = self.form\n", " C = self.curve\n", - " p = C.characteristic\n", - " Rx. = PolynomialRing(GF(p))\n", + " F = C.base_ring\n", + " Rx. = PolynomialRing(F)\n", " Fx = FractionField(Rx)\n", " FxRy. = PolynomialRing(Fx)\n", " Fxy = FractionField(FxRy)\n", @@ -370,9 +381,9 @@ " \n", " def is_regular_on_U0(self):\n", " C = self.curve\n", - " p = C.characteristic\n", + " F = C.base_ring\n", " m = C.exponent\n", - " Rx. = PolynomialRing(GF(p))\n", + " Rx. = PolynomialRing(F)\n", " for j in range(1, m):\n", " if self.jth_component(j) not in Rx:\n", " return 0\n", @@ -380,7 +391,7 @@ " \n", " def is_regular_on_Uinfty(self):\n", " C = self.curve\n", - " p = C.characteristic\n", + " F = C.base_ring\n", " m = C.exponent\n", " f = C.polynomial\n", " r = f.degree()\n", @@ -390,7 +401,7 @@ " \n", " for j in range(1, m):\n", " A = self.jth_component(j)\n", - " d = degree_of_rational_fctn(A, p)\n", + " d = degree_of_rational_fctn(A, F)\n", " if(-d*M + j*R -(M+1)<0):\n", " return 0\n", " return 1\n", @@ -425,22 +436,22 @@ " def verschiebung(self):\n", " C = self.curve\n", " omega = self.omega0\n", - " p = C.characteristic\n", - " Rx. = PolynomialRing(GF(p))\n", + " F = C.base_ring\n", + " Rx. = PolynomialRing(F)\n", " return superelliptic_cech(C, omega.cartier(), superelliptic_function(C, Rx(0)))\n", " \n", " def frobenius(self):\n", " C = self.curve\n", " fct = self.f.function\n", " p = C.characteristic\n", - " Rx. = PolynomialRing(GF(p))\n", + " Rx. = PolynomialRing(F)\n", " return superelliptic_cech(C, superelliptic_form(C, Rx(0)), superelliptic_function(C, fct^p))\n", "\n", " def coordinates(self):\n", " C = self.curve\n", - " p = C.characteristic\n", + " F = C.base_ring\n", " m = C.exponent\n", - " Rx. = PolynomialRing(GF(p))\n", + " Rx. = PolynomialRing(F)\n", " Fx = FractionField(Rx)\n", " FxRy. = PolynomialRing(Fx)\n", " g = C.genus()\n", @@ -459,12 +470,12 @@ " for j in range(1, m):\n", " omega_j = Fx(omega.jth_component(j))\n", " if omega_j != Fx(0):\n", - " d = degree_of_rational_fctn(omega_j, p)\n", + " d = degree_of_rational_fctn(omega_j, F)\n", " index = degrees_holo_inv[(d, j)]\n", - " a = coeff_of_rational_fctn(omega_j, p)\n", - " a1 = coeff_of_rational_fctn(basis[index].omega0.jth_component(j), p)\n", + " a = coeff_of_rational_fctn(omega_j, F)\n", + " a1 = coeff_of_rational_fctn(basis[index].omega0.jth_component(j), F)\n", " elt = self - (a/a1)*basis[index]\n", - " return elt.coordinates() + a/a1*vector([GF(p)(i == index) for i in range(0, 2*g)])\n", + " return elt.coordinates() + a/a1*vector([F(i == index) for i in range(0, 2*g)])\n", " \n", " for j in range(1, m):\n", " fct_j = Fx(fct.jth_component(j))\n", @@ -473,19 +484,19 @@ " \n", " if (d, j) in degrees1.values():\n", " index = degrees1_inv[(d, j)]\n", - " a = coeff_of_rational_fctn(fct_j, p)\n", + " a = coeff_of_rational_fctn(fct_j, F)\n", " elt = self - (a/m)*basis[index]\n", - " return elt.coordinates() + a/m*vector([GF(p)(i == index) for i in range(0, 2*g)])\n", + " return elt.coordinates() + a/m*vector([F(i == index) for i in range(0, 2*g)])\n", " \n", " if d<0:\n", - " a = coeff_of_rational_fctn(fct_j, p)\n", + " a = coeff_of_rational_fctn(fct_j, F)\n", " h = superelliptic_function(C, FxRy(a*y^j*x^d))\n", " elt = superelliptic_cech(C, self.omega0, self.f - h)\n", " return elt.coordinates()\n", " \n", " if (fct_j != Rx(0)):\n", " G = superelliptic_function(C, y^j*x^d)\n", - " a = coeff_of_rational_fctn(fct_j, p)\n", + " a = coeff_of_rational_fctn(fct_j, F)\n", " elt =self - a*superelliptic_cech(C, diffn(G), G)\n", " return elt.coordinates()\n", "\n", @@ -505,8 +516,8 @@ " return 1\n", " return 0\n", " \n", - "def degree_of_rational_fctn(f, p):\n", - " Rx. = PolynomialRing(GF(p))\n", + "def degree_of_rational_fctn(f, F):\n", + " Rx. = PolynomialRing(F)\n", " Fx = FractionField(Rx)\n", " f = Fx(f)\n", " f1 = f.numerator()\n", @@ -515,8 +526,8 @@ " d2 = f2.degree()\n", " return(d1 - d2)\n", "\n", - "def coeff_of_rational_fctn(f, p):\n", - " Rx. = PolynomialRing(GF(p))\n", + "def coeff_of_rational_fctn(f, F):\n", + " Rx. = PolynomialRing(F)\n", " Fx = FractionField(Rx)\n", " f = Fx(f)\n", " if f == Rx(0):\n", @@ -541,7 +552,8 @@ " 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", + " F = GF(p)\n", + " Rx. = PolynomialRing(F)\n", " h = Rx(h)\n", " result = Rx(0)\n", " for i in range(0, h.degree()+1):\n", @@ -553,7 +565,7 @@ }, { "cell_type": "code", - "execution_count": 45, + "execution_count": 55, "metadata": { "collapsed": false }, @@ -643,364 +655,6 @@ " return 1" ] }, - { - "cell_type": "code", - "execution_count": 46, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "p = 5\n", - "R. = PolynomialRing(GF(p))\n", - "f = x^3 + x + 1\n", - "m = 2\n", - "C = superelliptic(f, m, p)" - ] - }, - { - "cell_type": "code", - "execution_count": 47, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "[1]" - ] - }, - "execution_count": 47, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "C.final_type()" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Current Time = 18:11:00\n", - "[1, 2, 3, 4, 5, 6]\n", - "Current Time = 18:11:21\n" - ] - } - ], - "source": [ - "now = datetime.now()\n", - "\n", - "current_time = now.strftime(\"%H:%M:%S\")\n", - "print(\"Current Time =\", current_time)\n", - "\n", - "p = 17\n", - "Rx. = PolynomialRing(GF(p))\n", - "C = superelliptic(x^13+x^8+x, 2, p)\n", - "print(C.final_type())\n", - "\n", - "now = datetime.now()\n", - "\n", - "current_time = now.strftime(\"%H:%M:%S\")\n", - "print(\"Current Time =\", current_time)" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "def p_cov(C):\n", - " m = C.exponent\n", - " p = C.characteristic\n", - " f = C.polynomial\n", - " return superelliptic(f(x^p - x), m, p)" - ] - }, - { - "cell_type": "code", - "execution_count": 26, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[1, 1, 2, 3] [1, 2, 3, 3, 4, 5, 6, 7, 8, 9, 10, 10, 11]\n" - ] - } - ], - "source": [ - "p = 3\n", - "Rx. = PolynomialRing(GF(p))\n", - "C = superelliptic(2*x^9+x^8+x, 2, p)\n", - "C1 = p_cov(C)\n", - "print(C.final_type(), C1.final_type())" - ] - }, - { - "cell_type": "code", - "execution_count": 29, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "( ['?', 1, 1, 2, 3, 3, 3, 4, 4] )\n", - "( ['?', '?', '?', '?', '?', 5, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, '?', 18, 19, 19, '?', 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, '?', '?', '?', '?', 22] )\n", - "[1, 1, 2, 3] [1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 19]\n" - ] - } - ], - "source": [ - "p = 5\n", - "Rx. = PolynomialRing(GF(p))\n", - "C = superelliptic(x^9+x^8+x, 2, p)\n", - "C1 = p_cov(C)\n", - "print(C.final_type(1), C1.final_type(1))" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "22" - ] - }, - "execution_count": 24, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "C1.genus()" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "x^9 + x^8 + x 3 2 0\n", - "(( ['?', '?', 2, 2, 3, 3, 4, '?', 4] ))\n", - "[1, 2, 2, 3]\n", - "x^9 + x^8 + 2*x 3 2 0\n", - "(( ['?', '?', 2, 2, 3, 3, 4, '?', 4] ))\n", - "[1, 2, 2, 3]\n", - "x^9 + x^8 + 3*x 3 2 0\n", - "(( ['?', '?', 2, 2, 3, 3, 4, '?', 4] ))\n", - "[1, 2, 2, 3]\n", - "x^9 + x^8 + 4*x 3 2 0\n", - "(( ['?', '?', 2, 2, 3, 3, 4, '?', 4] ))\n", - "[1, 2, 2, 3]\n", - "x^9 + x^8 + 5*x 3 2 0\n", - "(( ['?', '?', 2, 2, 3, 3, 4, '?', 4] ))\n", - "[1, 2, 2, 3]\n", - "x^9 + x^8 + 6*x 3 2 0\n", - "(( ['?', '?', 2, 2, 3, 3, 4, '?', 4] ))\n", - "[1, 2, 2, 3]\n", - "x^9 + x^8 + 7*x 3 2 0\n", - "(( ['?', '?', 2, 2, 3, 3, 4, '?', 4] ))\n", - "[1, 2, 2, 3]\n", - "x^9 + x^8 + 8*x 3 0 0\n", - "(( [0, 0, 1, 2, 3, 3, 3, 3, 4] ))\n", - "[0, 1, 2, 3]\n", - "x^9 + x^8 + 9*x 3 2 0\n", - "(( ['?', '?', 2, 2, 3, 3, 4, '?', 4] ))\n", - "[1, 2, 2, 3]\n", - "x^9 + x^8 + x 3 2 0\n", - "(( ['?', '?', 2, 2, 3, 3, 4, '?', 4] ))\n", - "[1, 2, 2, 3]\n", - "x^9 + x^8 + 2*x 3 2 0\n", - "(( ['?', '?', 2, 2, 3, 3, 4, '?', 4] ))\n", - "[1, 2, 2, 3]\n", - "x^9 + x^8 + 3*x 3 2 0\n", - "(( ['?', '?', 2, 2, 3, 3, 4, '?', 4] ))\n", - "[1, 2, 2, 3]\n", - "x^9 + x^8 + 4*x 3 2 0\n", - "(( ['?', '?', 2, 2, 3, 3, 4, '?', 4] ))\n", - "[1, 2, 2, 3]\n", - "x^9 + x^8 + 5*x 3 2 0\n", - "(( ['?', '?', 2, 2, 3, 3, 4, '?', 4] ))\n", - "[1, 2, 2, 3]\n", - "x^9 + x^8 + 6*x 3 2 0\n", - "(( ['?', '?', 2, 2, 3, 3, 4, '?', 4] ))\n", - "[1, 2, 2, 3]\n", - "x^9 + x^8 + 7*x 3 2 0\n", - "(( ['?', '?', 2, 2, 3, 3, 4, '?', 4] ))\n", - "[1, 2, 2, 3]\n", - "x^9 + x^8 + 8*x 3 0 0\n", - "(( [0, 0, 1, 2, 3, 3, 3, 3, 4] ))\n", - "[0, 1, 2, 3]\n", - "x^9 + x^8 + 9*x 3 2 0\n", - "(( ['?', '?', 2, 2, 3, 3, 4, '?', 4] ))\n", - "[1, 2, 2, 3]\n", - "x^9 + x^8 + x 3 2 0\n", - "(( ['?', '?', 2, 2, 3, 3, 4, '?', 4] ))\n", - "[1, 2, 2, 3]\n", - "x^9 + x^8 + 2*x 3 2 0\n", - "(( ['?', '?', 2, 2, 3, 3, 4, '?', 4] ))\n", - "[1, 2, 2, 3]\n", - "x^9 + x^8 + 3*x 3 2 0\n", - "(( ['?', '?', 2, 2, 3, 3, 4, '?', 4] ))\n", - "[1, 2, 2, 3]\n", - "x^9 + x^8 + 4*x 3 2 0\n", - "(( ['?', '?', 2, 2, 3, 3, 4, '?', 4] ))\n", - "[1, 2, 2, 3]\n", - "x^9 + x^8 + 5*x 3 2 0\n", - "(( ['?', '?', 2, 2, 3, 3, 4, '?', 4] ))\n", - "[1, 2, 2, 3]\n", - "x^9 + x^8 + 6*x 3 2 0\n", - "(( ['?', '?', 2, 2, 3, 3, 4, '?', 4] ))\n", - "[1, 2, 2, 3]\n", - "x^9 + x^8 + 7*x 3 2 0\n", - "(( ['?', '?', 2, 2, 3, 3, 4, '?', 4] ))\n", - "[1, 2, 2, 3]\n", - "x^9 + x^8 + 8*x 3 0 0\n", - "(( [0, 0, 1, 2, 3, 3, 3, 3, 4] ))\n", - "[0, 1, 2, 3]\n", - "x^9 + x^8 + 9*x 3 2 0\n", - "(( ['?', '?', 2, 2, 3, 3, 4, '?', 4] ))\n", - "[1, 2, 2, 3]\n", - "x^9 + x^8 + x 3 2 0\n", - "(( ['?', '?', 2, 2, 3, 3, 4, '?', 4] ))\n", - "[1, 2, 2, 3]\n", - "x^9 + x^8 + 2*x 3 2 0\n" - ] - }, - { - "ename": "KeyboardInterrupt", - "evalue": "", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 9\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mC\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpolynomial\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mC\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mp_rank\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mM\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m4\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrank\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m4\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mM\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0midentity_matrix\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m4\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrank\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 10\u001b[0m \u001b[0mV\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mC\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mverschiebung_matrix\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 11\u001b[0;31m \u001b[0mF\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mC\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfrobenius_matrix\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 12\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mflag\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mF\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mV\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m\u001b[0m in \u001b[0;36mfrobenius_matrix\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 135\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mi\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbasis\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 136\u001b[0m \u001b[0mw\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mbasis\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mi\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 137\u001b[0;31m \u001b[0mv\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mw\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfrobenius\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcoordinates\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 138\u001b[0m \u001b[0mM\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mi\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m:\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mv\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 139\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mM\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m\u001b[0m in \u001b[0;36mcoordinates\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 487\u001b[0m \u001b[0ma\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcoeff_of_rational_fctn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfct_j\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 488\u001b[0m \u001b[0melt\u001b[0m \u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0msuperelliptic_cech\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mC\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdiffn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mG\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mG\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 489\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0melt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcoordinates\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 490\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 491\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mvector\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m2\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mg\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m\u001b[0m in \u001b[0;36mcoordinates\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 487\u001b[0m \u001b[0ma\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcoeff_of_rational_fctn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfct_j\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 488\u001b[0m \u001b[0melt\u001b[0m \u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0msuperelliptic_cech\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mC\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdiffn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mG\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mG\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 489\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0melt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcoordinates\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 490\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 491\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mvector\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m2\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mg\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m\u001b[0m in \u001b[0;36mcoordinates\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 475\u001b[0m \u001b[0ma\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcoeff_of_rational_fctn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfct_j\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 476\u001b[0m \u001b[0melt\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0ma\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0mm\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mbasis\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mindex\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 477\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0melt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcoordinates\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0mm\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mvector\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mGF\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mi\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mindex\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mi\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m2\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mg\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 478\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 479\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0md\u001b[0m\u001b[0;34m<\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m\u001b[0m in \u001b[0;36mcoordinates\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 475\u001b[0m \u001b[0ma\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcoeff_of_rational_fctn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfct_j\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 476\u001b[0m \u001b[0melt\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0ma\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0mm\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mbasis\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mindex\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 477\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0melt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcoordinates\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0mm\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mvector\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mGF\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mi\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mindex\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mi\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m2\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mg\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 478\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 479\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0md\u001b[0m\u001b[0;34m<\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m\u001b[0m in \u001b[0;36mcoordinates\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 474\u001b[0m \u001b[0mindex\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdegrees1_inv\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0md\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mj\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 475\u001b[0m \u001b[0ma\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcoeff_of_rational_fctn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfct_j\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 476\u001b[0;31m \u001b[0melt\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0ma\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0mm\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mbasis\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mindex\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 477\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0melt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcoordinates\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0mm\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mvector\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mGF\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mi\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mindex\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mi\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m2\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mg\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 478\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/opt/sagemath-9.1/local/lib/python3.7/site-packages/sage/structure/element.pyx\u001b[0m in \u001b[0;36msage.structure.element.Element.__mul__ (build/cythonized/sage/structure/element.c:12169)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1527\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0merr\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1528\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;34m<\u001b[0m\u001b[0mElement\u001b[0m\u001b[0;34m>\u001b[0m\u001b[0mright\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_mul_long\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvalue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1529\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mcoercion_model\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbin_op\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mleft\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mright\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmul\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1530\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mTypeError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1531\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mNotImplemented\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/opt/sagemath-9.1/local/lib/python3.7/site-packages/sage/structure/coerce.pyx\u001b[0m in \u001b[0;36msage.structure.coerce.CoercionModel.bin_op (build/cythonized/sage/structure/coerce.c:11104)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1247\u001b[0m \u001b[0mmul_method\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mgetattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0my\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'__r%s__'\u001b[0m\u001b[0;34m%\u001b[0m\u001b[0mop_name\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1248\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mmul_method\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1249\u001b[0;31m \u001b[0mres\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmul_method\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1250\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mres\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mres\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mNotImplemented\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1251\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mres\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m\u001b[0m in \u001b[0;36m__rmul__\u001b[0;34m(self, constant)\u001b[0m\n\u001b[1;32m 415\u001b[0m \u001b[0mw1\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0momega0\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mform\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 416\u001b[0m \u001b[0mf1\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfunction\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 417\u001b[0;31m \u001b[0mw2\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0msuperelliptic_form\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mC\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconstant\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mw1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 418\u001b[0m \u001b[0mf2\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0msuperelliptic_function\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mC\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconstant\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mf1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 419\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0msuperelliptic_cech\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mC\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mw2\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mf2\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, C, g)\u001b[0m\n\u001b[1;32m 280\u001b[0m \u001b[0mRxy\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mPolynomialRing\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mGF\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m2\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mnames\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'x'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'y'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m;\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0my\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mRxy\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_first_ngens\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m2\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 281\u001b[0m \u001b[0mFxy\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mFractionField\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mRxy\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 282\u001b[0;31m \u001b[0mg\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mFxy\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mreduction_form\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mC\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mg\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 283\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mform\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mg\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 284\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcurve\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mC\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m\u001b[0m in \u001b[0;36mreduction_form\u001b[0;34m(C, g)\u001b[0m\n\u001b[1;32m 205\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 206\u001b[0m \u001b[0mG\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcoff\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mg\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mj\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 207\u001b[0;31m \u001b[0mg1\u001b[0m \u001b[0;34m+=\u001b[0m \u001b[0mFxy\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0my\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mj\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0mm\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mG\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 208\u001b[0m \u001b[0;32mreturn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mg1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 209\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/opt/sagemath-9.1/local/lib/python3.7/site-packages/sage/structure/element.pyx\u001b[0m in \u001b[0;36msage.structure.element.Element.__add__ (build/cythonized/sage/structure/element.c:10839)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1232\u001b[0m \u001b[0;31m# Left and right are Sage elements => use coercion model\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1233\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mBOTH_ARE_ELEMENT\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcl\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1234\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mcoercion_model\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbin_op\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mleft\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mright\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0madd\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1235\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1236\u001b[0m \u001b[0mcdef\u001b[0m \u001b[0mlong\u001b[0m \u001b[0mvalue\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/opt/sagemath-9.1/local/lib/python3.7/site-packages/sage/structure/coerce.pyx\u001b[0m in \u001b[0;36msage.structure.coerce.CoercionModel.bin_op (build/cythonized/sage/structure/coerce.c:10120)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1205\u001b[0m \u001b[0;31m# Now coerce to a common parent and do the operation there\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1206\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1207\u001b[0;31m \u001b[0mxy\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcanonical_coercion\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0my\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1208\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mTypeError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1209\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_record_exception\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/opt/sagemath-9.1/local/lib/python3.7/site-packages/sage/structure/coerce.pyx\u001b[0m in \u001b[0;36msage.structure.coerce.CoercionModel.canonical_coercion (build/cythonized/sage/structure/coerce.c:11635)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1320\u001b[0m \u001b[0mx_elt\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mx\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1321\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0my_map\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1322\u001b[0;31m \u001b[0my_elt\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;34m<\u001b[0m\u001b[0mMap\u001b[0m\u001b[0;34m>\u001b[0m\u001b[0my_map\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_call_\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0my\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1323\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1324\u001b[0m \u001b[0my_elt\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0my\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/opt/sagemath-9.1/local/lib/python3.7/site-packages/sage/structure/coerce_maps.pyx\u001b[0m in \u001b[0;36msage.structure.coerce_maps.CallableConvertMap._call_ (build/cythonized/sage/structure/coerce_maps.c:7389)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 430\u001b[0m \u001b[0my\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_func\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mC\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mx\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 431\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 432\u001b[0;31m \u001b[0my\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_func\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 433\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mException\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 434\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mprint_warnings\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/opt/sagemath-9.1/local/lib/python3.7/site-packages/sage/rings/fraction_field.py\u001b[0m in \u001b[0;36mwrapper\u001b[0;34m(x)\u001b[0m\n\u001b[1;32m 316\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 317\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mwrapper\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 318\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_element_class\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mx\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mnumerator\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mx\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdenominator\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 319\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 320\u001b[0m \u001b[0;31m# The case ``S`` being `\\QQ` requires special handling since `\\QQ` is\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/opt/sagemath-9.1/local/lib/python3.7/site-packages/sage/rings/fraction_field_element.pyx\u001b[0m in \u001b[0;36msage.rings.fraction_field_element.FractionFieldElement_1poly_field.__init__ (build/cythonized/sage/rings/fraction_field_element.c:11744)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1115\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0;36m2\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1116\u001b[0m \"\"\"\n\u001b[0;32m-> 1117\u001b[0;31m FractionFieldElement.__init__(self, parent, numerator, denominator,\n\u001b[0m\u001b[1;32m 1118\u001b[0m coerce, reduce)\n\u001b[1;32m 1119\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mreduce\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/opt/sagemath-9.1/local/lib/python3.7/site-packages/sage/rings/fraction_field_element.pyx\u001b[0m in \u001b[0;36msage.rings.fraction_field_element.FractionFieldElement.__init__ (build/cythonized/sage/rings/fraction_field_element.c:2966)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 113\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mcoerce\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 114\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__numerator\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mparent\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mring\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnumerator\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 115\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__denominator\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mparent\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mring\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdenominator\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 116\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 117\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__numerator\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mnumerator\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/opt/sagemath-9.1/local/lib/python3.7/site-packages/sage/structure/parent.pyx\u001b[0m in \u001b[0;36msage.structure.parent.Parent.__call__ (build/cythonized/sage/structure/parent.c:9218)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 898\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mmor\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 899\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mno_extra_args\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 900\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mmor\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_call_\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 901\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 902\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mmor\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_call_with_args\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwds\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/opt/sagemath-9.1/local/lib/python3.7/site-packages/sage/structure/coerce_maps.pyx\u001b[0m in \u001b[0;36msage.structure.coerce_maps.NamedConvertMap._call_ (build/cythonized/sage/structure/coerce_maps.c:5949)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 285\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mTypeError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Cannot coerce {} to {}\"\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mformat\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mC\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 286\u001b[0m \u001b[0mcdef\u001b[0m \u001b[0mMap\u001b[0m \u001b[0mm\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 287\u001b[0;31m \u001b[0mcdef\u001b[0m \u001b[0mElement\u001b[0m \u001b[0me\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmethod\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mC\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 288\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0me\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 289\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mRuntimeError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"BUG in coercion model: {} method of {} returned None\"\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mformat\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmethod_name\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/opt/sagemath-9.1/local/lib/python3.7/site-packages/sage/rings/polynomial/multi_polynomial.pyx\u001b[0m in \u001b[0;36msage.rings.polynomial.multi_polynomial.MPolynomial._polynomial_ (build/cythonized/sage/rings/polynomial/multi_polynomial.c:6311)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 205\u001b[0m \u001b[0mvar\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mR\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mvariable_name\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 206\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mvar\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_parent\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mvariable_names\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 207\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mR\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpolynomial\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_parent\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvar\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 208\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 209\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mR\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/opt/sagemath-9.1/local/lib/python3.7/site-packages/sage/rings/polynomial/multi_polynomial.pyx\u001b[0m in \u001b[0;36msage.rings.polynomial.multi_polynomial.MPolynomial.polynomial (build/cythonized/sage/rings/polynomial/multi_polynomial.c:8657)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 485\u001b[0m w = {remove_from_tuple(e, ind): val\n\u001b[1;32m 486\u001b[0m for e, val in self.dict().iteritems() if not e[ind]}\n\u001b[0;32m--> 487\u001b[0;31m \u001b[0mv\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0mB\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mw\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;31m# coefficients that don't involve var\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 488\u001b[0m \u001b[0mz\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mvar\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 489\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mi\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0md\u001b[0m\u001b[0;34m+\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/opt/sagemath-9.1/local/lib/python3.7/site-packages/sage/structure/parent.pyx\u001b[0m in \u001b[0;36msage.structure.parent.Parent.__call__ (build/cythonized/sage/structure/parent.c:9218)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 898\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mmor\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 899\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mno_extra_args\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 900\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mmor\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_call_\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 901\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 902\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mmor\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_call_with_args\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwds\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/opt/sagemath-9.1/local/lib/python3.7/site-packages/sage/structure/coerce_maps.pyx\u001b[0m in \u001b[0;36msage.structure.coerce_maps.DefaultConvertMap_unique._call_ (build/cythonized/sage/structure/coerce_maps.c:4448)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 154\u001b[0m \u001b[0mcdef\u001b[0m \u001b[0mParent\u001b[0m \u001b[0mC\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_codomain\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 155\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 156\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mC\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_element_constructor\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 157\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mException\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 158\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mprint_warnings\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/opt/sagemath-9.1/local/lib/python3.7/site-packages/sage/rings/polynomial/polynomial_ring.py\u001b[0m in \u001b[0;36m_element_constructor_\u001b[0;34m(self, x, check, is_gen, construct, **kwds)\u001b[0m\n\u001b[1;32m 466\u001b[0m \u001b[0;32melif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msage\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrings\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpower_series_ring_element\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mPowerSeries\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 467\u001b[0m \u001b[0mx\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mx\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtruncate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 468\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mC\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mx\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcheck\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mis_gen\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconstruct\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mconstruct\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwds\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 469\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 470\u001b[0m \u001b[0;34m@\u001b[0m\u001b[0mclassmethod\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32msrc/cysignals/signals.pyx\u001b[0m in \u001b[0;36mcysignals.signals.python_check_interrupt\u001b[0;34m()\u001b[0m\n", - "\u001b[0;31mKeyboardInterrupt\u001b[0m: " - ] - } - ], - "source": [ - "p = 11\n", - "for a in range(0, p):\n", - " for b in range(0, p):\n", - " for c in range(0, p):\n", - " Rx. = PolynomialRing(GF(p))\n", - " C = superelliptic(x^9+a*x^8+c*x, 2, p)\n", - " if C.is_smooth() and C.p_rank() == 3:\n", - " M = C.cartier_matrix()\n", - " print(C.polynomial, C.p_rank(), (M^4).rank(), 4 - (M-identity_matrix(4)).rank())\n", - " V = C.verschiebung_matrix()\n", - " F = C.frobenius_matrix()\n", - " print(flag(F, V, p))" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[((1/y) dx, 0, (1/y) dx), ((x/y) dx, 2/x*y, (1/(x*y)) dx)]\n" - ] - } - ], - "source": [ - "R. = PolynomialRing(GF(13))\n", - "C = superelliptic(x^3+x, 2, 13)\n", - "print(C.basis_de_rham)" - ] - }, - { - "cell_type": "code", - "execution_count": 81, - "metadata": { - "collapsed": false, - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "1\n", - "[1]\n" - ] - } - ], - "source": [ - "p = 5\n", - "Rx. = PolynomialRing(GF(p))\n", - "C = superelliptic(x^3 - x, 2, p)\n", - "if (C.is_smooth()):\n", - " print(C.p_rank())\n", - " print(C.final_type())" - ] - }, { "cell_type": "code", "execution_count": 58, @@ -1008,113 +662,16 @@ "collapsed": false }, "outputs": [ - { - "data": { - "text/plain": [ - "[0 0 0 0 0 0 0 0]\n", - "[0 0 0 0 0 0 0 0]\n", - "[0 0 0 0 0 0 0 0]\n", - "[0 0 0 0 0 0 0 0]\n", - "[0 0 0 4 2 3 3 2]\n", - "[4 0 4 4 2 0 0 4]\n", - "[0 0 4 3 0 0 1 2]\n", - "[3 0 0 0 0 1 0 0]" - ] - }, - "execution_count": 58, - "metadata": { - }, - "output_type": "execute_result" - } ], "source": [ - "C.frobenius_matrix()" + "Rx. = PolynomialRing(GF(5))\n", + "f = x^7 + x + 1\n", + "C = superelliptic(f, 2)" ] }, { "cell_type": "code", - "execution_count": 62, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "test [0, -1, -1, -1, 4, -1, -1, -1, 4]\n", - "poprawiony ft [0, 1, 2, 3, 4, 4, 4, 4, 4]\n" - ] - }, - { - "data": { - "text/plain": [ - "[1, 2, 3, 4]" - ] - }, - "execution_count": 62, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "flag(F, V, p)" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": { - "collapsed": false, - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "4*x^9 + 4*x^3 + 2*x^2 + x\n", - "4*x^9 + 2*x^3 + 4*x^2 + 4*x + 4\n" - ] - } - ], - "source": [ - "f = x^9+3*x^3+x^2+x+1\n", - "r = f.degree()\n", - "i = 2\n", - "j = 1\n", - "m = 2\n", - "print(Rx(m-j)*Rx(x)*Rx(f.derivative()))\n", - "print(Rx(m)*Rx(i)*f)" - ] - }, - { - "cell_type": "code", - "execution_count": 26, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "9\n", - "4\n", - "4*x^8 + 4*x^2 + 2*x + 1\n" - ] - } - ], - "source": [ - "print(r*(m-j))\n", - "print(m*i)\n", - "print(f.derivative())" - ] - }, - { - "cell_type": "code", - "execution_count": 31, + "execution_count": 59, "metadata": { "collapsed": false }, @@ -1122,1511 +679,19 @@ { "data": { "text/plain": [ - "2*x^3 + 3*x^2 + 2*x + 1" + "[0 0 1]\n", + "[0 2 0]\n", + "[1 2 0]" ] }, - "execution_count": 31, + "execution_count": 59, "metadata": { }, "output_type": "execute_result" } ], "source": [ - "x*f.derivative() - 2*2*f" - ] - }, - { - "cell_type": "code", - "execution_count": 73, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "Vector space of degree 2 and dimension 1 over Rational Field\n", - "Basis matrix:\n", - "[1 3]" - ] - }, - "execution_count": 73, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "M = matrix(QQ, [[1,2], [3,6]])\n", - "U = M.kernel()\n", - "V = VectorSpace(QQ,2)\n", - "M.transpose().image()" - ] - }, - { - "cell_type": "code", - "execution_count": 77, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "l = U.basis()\n", - "l = l +[(1, 1/3)]" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "###fragment kodu do obliczania residuuow w niesk - zaniechany\n", - "#def more_v(f, prec):\n", - "# C = f.curve\n", - "# f = f.vw\n", - "# g = C.polynomial8\n", - "# p = C.characteristic\n", - "# m = C.exponent\n", - "# r = C.polynomial.degree()\n", - "# delta, a, b = xgcd(m, r)\n", - "# a = -a\n", - "# M = m/delta\n", - "# R = r/delta\n", - "# \n", - "# Fpbar = GF(p).algebraic_closure()\n", - "# Ruv. = PolynomialRing(Fpbar, 2)\n", - "# if prec == 0:\n", - "# return 0\n", - "# zeta = Fpbar.zeta(m)\n", - "# a = f(v = zeta, w = 0)\n", - "# f1 = f - a\n", - "# if w.divides(f1):\n", - "# return more_v(f1/w, prec-1)\n", - " " - ] - }, - { - "cell_type": "code", - "execution_count": 211, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "4\n", - "2\n" - ] - } - ], - "source": [ - "p = 7\n", - "Rx. = PolynomialRing(GF(p))\n", - "C = superelliptic(x^3 + x + 3, 5, p)\n", - "baza = C.basis_de_rham\n", - "print(C.genus())\n", - "#E = EllipticCurve(GF(p), [1, 2])\n", - "print(E.trace_of_frobenius())\n", - "#C.basis_holomorphic_differentials( )" - ] - }, - { - "cell_type": "code", - "execution_count": 0, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - ] - }, - { - "cell_type": "code", - "execution_count": 212, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "{0: (0, 2),\n", - " 1: (0, 3),\n", - " 2: (0, 4),\n", - " 3: (1, 4),\n", - " 4: (-1, 1),\n", - " 5: (0, 1),\n", - " 6: (1, 2),\n", - " 7: (1, 3)}" - ] - }, - "execution_count": 212, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "C.degree_de_rham0" - ] - }, - { - "cell_type": "code", - "execution_count": 213, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "{0: ((1/y^2) dx, 0, (1/y^2) dx),\n", - " 1: ((1/y^3) dx, 0, (1/y^3) dx),\n", - " 2: ((1/y^4) dx, 0, (1/y^4) dx),\n", - " 3: ((x/y^4) dx, 0, (x/y^4) dx),\n", - " 4: (0 dx, 5/x*y^4, ((x + 1)/(x^2*y)) dx),\n", - " 5: ((2/y) dx, 5/x^2*y^4, ((-x + 2)/(x^3*y)) dx),\n", - " 6: (((-3*x)/y^2) dx, 5/x*y^3, ((2*x + 1)/(x^2*y^2)) dx),\n", - " 7: ((x/y^3) dx, 5/x*y^2, ((3*x + 1)/(x^2*y^3)) dx)}" - ] - }, - "execution_count": 213, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "C.basis_de_rham" - ] - }, - { - "cell_type": "code", - "execution_count": 214, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "A = C.frobenius_matrix()\n", - "B = C.verschiebung_matrix()" - ] - }, - { - "cell_type": "code", - "execution_count": 227, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "(1, 0, 0, 4, 3, 0, 2, 0)" - ] - }, - "execution_count": 227, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "A.solve_right((0, 0, 0, 0, 4, 2, 5, 3))" - ] - }, - { - "cell_type": "code", - "execution_count": 228, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "(0, 0, 0, 0, 4, 2, 5, 3)" - ] - }, - "execution_count": 228, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "A*vector((1, 0, 0, 4, 3, 0, 2, 0))" - ] - }, - { - "cell_type": "code", - "execution_count": 225, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "(1, 0, 0, 4, 3, -6, -5, -5)" - ] - }, - "execution_count": 225, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "vector((1, 0, 0, 4, 5, 0, 0, 0)) - vector((0, 0, 0, 0, 2, 6, 5, 5))" - ] - }, - { - "cell_type": "code", - "execution_count": 83, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "omega = diffn(superelliptic_function(C, y^2))" - ] - }, - { - "cell_type": "code", - "execution_count": 84, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "3*x^2 + 1" - ] - }, - "execution_count": 84, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "omega.jth_component(0)" - ] - }, - { - "cell_type": "code", - "execution_count": 85, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "y" - ] - }, - "execution_count": 85, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "R. = PolynomialRing(GF(p), 2)\n", - "g1 = x^3*y^7 + x^2*y^9\n", - "g2 = x^2*y + y^6\n", - "R1. = PolynomialRing(GF(p))\n", - "R2 = FractionField(R1)\n", - "R3. = PolynomialRing(R2)\n", - "\n", - "xgcd(R3(g1), R3(g2))[1]*R3(g1) + xgcd(R3(g1), R3(g2))[2]*R3(g2)" - ] - }, - { - "cell_type": "code", - "execution_count": 86, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "H = HyperellipticCurve(x^5 - x + 1)" - ] - }, - { - "cell_type": "code", - "execution_count": 40, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "Hyperelliptic Curve over Finite Field of size 5 defined by y^2 = x^5 + 4*x + 1" - ] - }, - "execution_count": 40, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "H" - ] - }, - { - "cell_type": "code", - "execution_count": 84, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "f = x^3 + x + 2" - ] - }, - { - "cell_type": "code", - "execution_count": 86, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "-2*x^2 + 1" - ] - }, - "execution_count": 86, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "f.derivative(x)" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "p = 5\n", - "R1. = PolynomialRing(GF(p))\n", - "R2 = FractionField(R1)\n", - "R3. = PolynomialRing(R2)\n", - "g = y^2/x + y/(x+1) \n", - "g = 1/y+x/y^2" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "x*z^2 + z" - ] - }, - "execution_count": 4, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "R3. = PolynomialRing(R2)\n", - "g(y = 1/z)" - ] - }, - { - "cell_type": "code", - "execution_count": 57, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "x^3 + x + 4" - ] - }, - "execution_count": 57, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "f" - ] - }, - { - "cell_type": "code", - "execution_count": 62, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "ename": "AttributeError", - "evalue": "'sage.rings.polynomial.polynomial_zmod_flint.Polynomial_zmod_flint' object has no attribute 'coefficient'", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcoefficient\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;32m/opt/sagemath-9.1/local/lib/python3.7/site-packages/sage/structure/element.pyx\u001b[0m in \u001b[0;36msage.structure.element.Element.__getattr__ (build/cythonized/sage/structure/element.c:4614)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 485\u001b[0m \u001b[0mAttributeError\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'LeftZeroSemigroup_with_category.element_class'\u001b[0m \u001b[0mobject\u001b[0m \u001b[0mhas\u001b[0m \u001b[0mno\u001b[0m \u001b[0mattribute\u001b[0m \u001b[0;34m'blah_blah'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 486\u001b[0m \"\"\"\n\u001b[0;32m--> 487\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mgetattr_from_category\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 488\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 489\u001b[0m \u001b[0mcdef\u001b[0m \u001b[0mgetattr_from_category\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/opt/sagemath-9.1/local/lib/python3.7/site-packages/sage/structure/element.pyx\u001b[0m in \u001b[0;36msage.structure.element.Element.getattr_from_category (build/cythonized/sage/structure/element.c:4723)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 498\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 499\u001b[0m \u001b[0mcls\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mP\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_abstract_element_class\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 500\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mgetattr_from_other_class\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcls\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 501\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 502\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m__dir__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/opt/sagemath-9.1/local/lib/python3.7/site-packages/sage/cpython/getattr.pyx\u001b[0m in \u001b[0;36msage.cpython.getattr.getattr_from_other_class (build/cythonized/sage/cpython/getattr.c:2614)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 392\u001b[0m \u001b[0mdummy_error_message\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcls\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 393\u001b[0m \u001b[0mdummy_error_message\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mname\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mname\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 394\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mAttributeError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdummy_error_message\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 395\u001b[0m \u001b[0mattribute\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m<\u001b[0m\u001b[0mobject\u001b[0m\u001b[0;34m>\u001b[0m\u001b[0mattr\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 396\u001b[0m \u001b[0;31m# Check for a descriptor (__get__ in Python)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mAttributeError\u001b[0m: 'sage.rings.polynomial.polynomial_zmod_flint.Polynomial_zmod_flint' object has no attribute 'coefficient'" - ] - } - ], - "source": [ - "f.coefficient()" - ] - }, - { - "cell_type": "code", - "execution_count": 35, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "x^3 + x + 1" - ] - }, - "execution_count": 35, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "x^3+x+1" - ] - }, - { - "cell_type": "code", - "execution_count": 36, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "Symbolic Ring" - ] - }, - "execution_count": 36, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "parent(x)" - ] - }, - { - "cell_type": "code", - "execution_count": 37, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "R. = PolynomialRing(GF(5))" - ] - }, - { - "cell_type": "code", - "execution_count": 39, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "R = (x^3+x).parent()" - ] - }, - { - "cell_type": "code", - "execution_count": 44, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "R. = PolynomialRing(GF(5))\n", - "RR = FractionField(R)\n", - "A = RR(1/(x*y))" - ] - }, - { - "cell_type": "code", - "execution_count": 45, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "(-1)/(x^2*y)" - ] - }, - "execution_count": 45, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "A.derivative(x)" - ] - }, - { - "cell_type": "code", - "execution_count": 42, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "dict1 = {}\n", - "dict1[3] = 5\n", - "dict1[6] = 121" - ] - }, - { - "cell_type": "code", - "execution_count": 46, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "degrees1_inv = {b:a for a, b in dict1.items()}" - ] - }, - { - "cell_type": "code", - "execution_count": 47, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "{5: 3, 121: 6}" - ] - }, - "execution_count": 47, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "degrees1_inv" - ] - }, - { - "cell_type": "code", - "execution_count": 28, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "Superelliptic curve with the equation y^7 = x^3 + x + 2 over finite field with 5 elements." - ] - }, - "execution_count": 28, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "C" - ] - }, - { - "cell_type": "code", - "execution_count": 29, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "basis = C.basis_de_rham()" - ] - }, - { - "cell_type": "code", - "execution_count": 32, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "dict_items([(0, ((x/y) dx, 2/x*y, ((x^3*y^5 - x^3 + x - 1)/(x^2*y^6)) dx)), (1, (((-1)/y) dx, 2/x^2*y, ((-x^3*y^5 + x^3 - 2*x - 2)/(x^3*y^6)) dx)), (2, (((-2*x)/y^2) dx, 2/x*y^2, ((-2*x^3*y^3 + x^3 - 1)/(x^2*y^5)) dx)), (3, ((1/y^2) dx, 2/x^2*y^2, ((x^3*y^3 - 2*x^3 + 2*x - 2)/(x^3*y^5)) dx)), (4, ((1/y^3) dx, 0, (1/y^3) dx)), (5, (0 dx, 2/x*y^3, ((-2*x^3 - x - 1)/(x^2*y^4)) dx)), (6, ((1/y^4) dx, 0, (1/y^4) dx)), (7, ((2*x/y^4) dx, 2/x*y^4, ((2*x^3 - 2*x*y - y)/(x^2*y^4)) dx)), (8, ((1/y^5) dx, 0, (1/y^5) dx)), (9, ((x/y^5) dx, 0, (x/y^5) dx)), (10, ((1/y^6) dx, 0, (1/y^6) dx)), (11, ((x/y^6) dx, 0, (x/y^6) dx))])" - ] - }, - "execution_count": 32, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "basis.items()" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "(3, 1, -1)" - ] - }, - "execution_count": 9, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "m = 9\n", - "r = 6\n", - "delta, a, b = xgcd(m, r)\n", - "a = -a\n", - "xgcd(9, 6)" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "(3, 3)" - ] - }, - "execution_count": 10, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "b*r -a*m, delta" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "Fpbar = GF(5).algebraic_closure()\n", - "z = Fpbar.zeta(7)" - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "ename": "TypeError", - "evalue": "unable to coerce ", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mGF\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m5\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m6\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mz\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;32m/opt/sagemath-9.1/local/lib/python3.7/site-packages/sage/structure/parent.pyx\u001b[0m in \u001b[0;36msage.structure.parent.Parent.__call__ (build/cythonized/sage/structure/parent.c:9218)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 898\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mmor\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 899\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mno_extra_args\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 900\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mmor\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_call_\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 901\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 902\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mmor\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_call_with_args\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwds\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/opt/sagemath-9.1/local/lib/python3.7/site-packages/sage/structure/coerce_maps.pyx\u001b[0m in \u001b[0;36msage.structure.coerce_maps.DefaultConvertMap_unique._call_ (build/cythonized/sage/structure/coerce_maps.c:4556)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 159\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mC\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mC\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 160\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mC\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_element_constructor\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mC\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_element_constructor\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 161\u001b[0;31m \u001b[0;32mraise\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 162\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 163\u001b[0m \u001b[0mcpdef\u001b[0m \u001b[0mElement\u001b[0m \u001b[0m_call_with_args\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mx\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwds\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m{\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/opt/sagemath-9.1/local/lib/python3.7/site-packages/sage/structure/coerce_maps.pyx\u001b[0m in \u001b[0;36msage.structure.coerce_maps.DefaultConvertMap_unique._call_ (build/cythonized/sage/structure/coerce_maps.c:4448)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 154\u001b[0m \u001b[0mcdef\u001b[0m \u001b[0mParent\u001b[0m \u001b[0mC\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_codomain\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 155\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 156\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mC\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_element_constructor\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 157\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mException\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 158\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mprint_warnings\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/opt/sagemath-9.1/local/lib/python3.7/site-packages/sage/rings/finite_rings/finite_field_givaro.py\u001b[0m in \u001b[0;36m_element_constructor_\u001b[0;34m(self, e)\u001b[0m\n\u001b[1;32m 368\u001b[0m \u001b[0;36m2\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0ma4\u001b[0m\u001b[0;34m^\u001b[0m\u001b[0;36m3\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0;36m2\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0ma4\u001b[0m\u001b[0;34m^\u001b[0m\u001b[0;36m2\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 369\u001b[0m \"\"\"\n\u001b[0;32m--> 370\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_cache\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0melement_from_data\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0me\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 371\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 372\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mgen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mn\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/opt/sagemath-9.1/local/lib/python3.7/site-packages/sage/rings/finite_rings/element_givaro.pyx\u001b[0m in \u001b[0;36msage.rings.finite_rings.element_givaro.Cache_givaro.element_from_data (build/cythonized/sage/rings/finite_rings/element_givaro.cpp:7458)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 312\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mmake_FiniteField_givaroElement\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mres\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 313\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 314\u001b[0;31m \u001b[0mcpdef\u001b[0m \u001b[0mFiniteField_givaroElement\u001b[0m \u001b[0melement_from_data\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 315\u001b[0m \"\"\"\n\u001b[1;32m 316\u001b[0m \u001b[0mCoerces\u001b[0m \u001b[0mseveral\u001b[0m \u001b[0mdata\u001b[0m \u001b[0mtypes\u001b[0m \u001b[0mto\u001b[0m\u001b[0;31m \u001b[0m\u001b[0;31m`\u001b[0m\u001b[0;31m`\u001b[0m\u001b[0mself\u001b[0m\u001b[0;31m`\u001b[0m\u001b[0;31m`\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/opt/sagemath-9.1/local/lib/python3.7/site-packages/sage/rings/finite_rings/element_givaro.pyx\u001b[0m in \u001b[0;36msage.rings.finite_rings.element_givaro.Cache_givaro.element_from_data (build/cythonized/sage/rings/finite_rings/element_givaro.cpp:7080)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 451\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 452\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 453\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mTypeError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"unable to coerce %r\"\u001b[0m \u001b[0;34m%\u001b[0m \u001b[0mtype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0me\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 454\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 455\u001b[0m \u001b[0mcdef\u001b[0m \u001b[0mGEN\u001b[0m \u001b[0mt\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mTypeError\u001b[0m: unable to coerce " - ] - } - ], - "source": [ - "GF(5^6)(z)" - ] - }, - { - "cell_type": "code", - "execution_count": 21, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "6" - ] - }, - "execution_count": 21, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "Integers(7)(5).multiplicative_order()" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "Rx. = PolynomialRing(QQ)\n", - "f = sum((i+1)*x^i for i in range(0, 10))" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "10*x^3 + 9*x^2 + 8*x + 7" - ] - }, - "execution_count": 8, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "cut(f, 5)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "10*x^9 + 9*x^8 + 8*x^7 + 7*x^6 + 6*x^5 + 5*x^4 + 4*x^3 + 3*x^2 + 2*x + 1" - ] - }, - "execution_count": 9, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "f" - ] - }, - { - "cell_type": "code", - "execution_count": 45, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Elliptic Curve defined by y^2 + y = x^3 + 1 over Finite Field of size 2\n", - "x^2 + 2\n" - ] - } - ], - "source": [ - "E = EllipticCurve(GF(2), [0,0,1,0,1])\n", - "print(E)\n", - "print(E.frobenius_polynomial())" - ] - }, - { - "cell_type": "code", - "execution_count": 41, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "Elliptic Curve defined by y^2 + y = x^3 + x over Finite Field of size 2" - ] - }, - "execution_count": 41, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "E" - ] - }, - { - "cell_type": "code", - "execution_count": 42, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "x^2 + 2*x + 2" - ] - }, - "execution_count": 42, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - ] - }, - { - "cell_type": "code", - "execution_count": 30, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Current Time = 18:56:38\n", - "[1, 2, 3, 4, 5, 6, 7, 8, 9]\n", - "Current Time = 18:57:11\n" - ] - } - ], - "source": [ - "now = datetime.now()\n", - "\n", - "current_time = now.strftime(\"%H:%M:%S\")\n", - "print(\"Current Time =\", current_time)\n", - "\n", - "p = 17\n", - "Rx. = PolynomialRing(GF(p))\n", - "C = superelliptic(x^19+x^8+x, 2, p)\n", - "print(C.final_type())\n", - "\n", - "now = datetime.now()\n", - "\n", - "current_time = now.strftime(\"%H:%M:%S\")\n", - "print(\"Current Time =\", current_time)" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "p = 7\n", - "R. = PolynomialRing(GF(p))\n", - "f = x^3 + x + 1\n", - "m = 2\n", - "C = superelliptic(f, m, p)" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "[((1/y) dx, 0, (1/y) dx), ((x/y) dx, 2/x*y, ((x + 2)/(x^2*y)) dx)]" - ] - }, - "execution_count": 13, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "C.basis_de_rham" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "w = C.basis_de_rham[1]" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "w0 = w.f" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "1" - ] - }, - "execution_count": 9, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "w0.is_regular_on_U0()" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "((x^3 - x - 2)/(x^2*y)) dx" - ] - }, - "execution_count": 11, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "diffn(w0)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "p = 7\n", - "R. = PolynomialRing(GF(p))\n", - "d = 9\n", - "f = sum(x^i * (d+1-i) for i in range(0, d+1))\n", - "m = 2\n", - "C = superelliptic(f, m, p)" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "[((1/y) dx, 0, (1/y) dx),\n", - " ((x/y) dx, 0, (x/y) dx),\n", - " ((x^2/y) dx, 0, (x^2/y) dx),\n", - " ((x^3/y) dx, 0, (x^3/y) dx),\n", - " (((-2*x^6 + x^5 + 2*x^4 + x^3 - 2*x^2)/y) dx, 2/x*y, ((2*x - 1)/(x^2*y)) dx),\n", - " (((-2*x^6 + x^5 + 2*x^4 + x^3 - 2*x^2)/y) dx, 2/x^2*y, ((2*x^2 - x - 2)/(x^3*y)) dx),\n", - " (((3*x^5 - 3*x^4 + 3*x^3 + 2*x + 2)/y) dx, 2/x^3*y, ((-3*x^2 + 3*x - 3)/(x^4*y)) dx),\n", - " (((x^4 - 3*x^2 - x - 1)/y) dx, 2/x^4*y, ((3*x^4 - x^2 + 3)/(x^5*y)) dx)]" - ] - }, - "execution_count": 10, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "C.basis_de_rham" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "[((1/y) dx, 0, (1/y) dx), ((x/y) dx, 2/x*y, (1/(x*y)) dx)]" - ] - }, - "execution_count": 17, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "p = 13\n", - "R. = PolynomialRing(GF(p))\n", - "f = x^3 + x\n", - "m = 2\n", - "C = superelliptic(f, m, p)\n", - "C.basis_de_rham" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "4" - ] - }, - "execution_count": 10, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "R(f*f(1/x)*x^3).discriminant()" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "[((1/y) dx, 0, (1/y) dx), ((x/y) dx, 2/x*y, ((x + 2)/(x^2*y)) dx)]" - ] - }, - "execution_count": 11, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "p = 19\n", - "R. = PolynomialRing(GF(p))\n", - "f = x^3 + x + 1\n", - "m = 2\n", - "C = superelliptic(f, m, p)\n", - "C.basis_de_rham" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "[((1/y) dx, 0, (1/y) dx), ((x/y) dx, 2/x*y, ((-1)/(x*y)) dx)]" - ] - }, - "execution_count": 4, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "p = 3\n", - "R. = PolynomialRing(GF(p))\n", - "f = x^3 -x\n", - "m = 2\n", - "C = superelliptic(f, m, p)\n", - "C.basis_de_rham" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "R. = PolynomialRing(GF(p), 2)\n", - "s = superelliptic_function(C, 2*y/(x*(x+1)))" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "((-x^2 - x + 1)/(x^2*y + x*y)) dx" - ] - }, - "execution_count": 9, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "diffn(s)" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "o1 = superelliptic_cech(C, superelliptic_form(C, (x+1)/y), superelliptic_function(C, 2*y/(x+1)))" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "o2 = superelliptic_cech(C, superelliptic_form(C, x/y), superelliptic_function(C, 2*y/x))" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "o3 = superelliptic_cech(C, superelliptic_form(C, 1/y), superelliptic_function(C, 0))" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "o4 = o1 - o2 - o3" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "(0 dx, (1/(x^2 + x))*y, ((-x^2 - x + 1)/(x^2*y + x*y)) dx)" - ] - }, - "execution_count": 14, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "o4" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "m = 2\n", - "p = 3\n", - "R. = PolynomialRing(GF(p))\n", - "f = x^3 - x\n", - "C = superelliptic(f, m, p)" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "g = f(x^3 - x)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "x^9 + x^3 + x" - ] - }, - "execution_count": 7, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "g" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "C1 = superelliptic(g, m, p)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "Superelliptic curve with the equation y^2 = x^9 + x^3 + x over finite field with 3 elements." - ] - }, - "execution_count": 9, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "C1" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "[((1/y) dx, 0, (1/y) dx),\n", - " ((x/y) dx, 0, (x/y) dx),\n", - " ((x^2/y) dx, 0, (x^2/y) dx),\n", - " ((x^3/y) dx, 0, (x^3/y) dx),\n", - " (((x^7 + x)/y) dx, 2/x*y, (1/(x*y)) dx),\n", - " (((-x^6 - 1)/y) dx, 2/x^2*y, 0 dx),\n", - " (0 dx, 2/x^3*y, ((-1)/(x^3*y)) dx),\n", - " ((x^4/y) dx, 2/x^4*y, ((-x^2 + 1)/(x^4*y)) dx)]" - ] - }, - "execution_count": 10, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "C1.basis_de_rham" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "p = 5\n", - "R. = PolynomialRing(GF(p))\n", - "m = 3\n", - "f = x^4 + x + 1\n", - "C = superelliptic(f, m, p)" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "1" - ] - }, - "execution_count": 10, - "metadata": { - }, - "output_type": "execute_result" - } - ], - "source": [ - "C.a_number()" + "C.cartier_matrix()" ] }, {