From 1e22e5966564a317a4bf03140a621ed5993078cf Mon Sep 17 00:00:00 2001 From: jgarnek Date: Mon, 7 Mar 2022 12:48:30 +0000 Subject: [PATCH] znowu dziala. Przed zmiana do Fxy(xi) --- superelliptic.ipynb | 441 +++++++++++++++++++++++++++----------- superelliptic_alpha.ipynb | 173 ++++++++++----- 2 files changed, 438 insertions(+), 176 deletions(-) diff --git a/superelliptic.ipynb b/superelliptic.ipynb index f0ef55f..d988054 100644 --- a/superelliptic.ipynb +++ b/superelliptic.ipynb @@ -3,8 +3,11 @@ { "cell_type": "code", "execution_count": 1, - "metadata": {}, - "outputs": [], + "metadata": { + "collapsed": false + }, + "outputs": [ + ], "source": [ "def basis_holomorphic_differentials_degree(f, m, p):\n", " r = f.degree()\n", @@ -561,8 +564,11 @@ { "cell_type": "code", "execution_count": 2, - "metadata": {}, - "outputs": [], + "metadata": { + "collapsed": false + }, + "outputs": [ + ], "source": [ "def preimage(U, V, M): #preimage of subspace U under M\n", " basis_preimage = M.right_kernel().basis()\n", @@ -650,16 +656,37 @@ { "cell_type": "code", "execution_count": 8, - "metadata": {}, - "outputs": [], + "metadata": { + "collapsed": false + }, + "outputs": [ + ], "source": [ "from datetime import datetime" ] }, + { + "cell_type": "code", + "execution_count": 5, + "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": 13, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "name": "stdout", @@ -691,8 +718,11 @@ { "cell_type": "code", "execution_count": 15, - "metadata": {}, - "outputs": [], + "metadata": { + "collapsed": false + }, + "outputs": [ + ], "source": [ "def p_cov(C):\n", " m = C.exponent\n", @@ -705,7 +735,7 @@ "cell_type": "code", "execution_count": 26, "metadata": { - "scrolled": false + "collapsed": false }, "outputs": [ { @@ -727,7 +757,9 @@ { "cell_type": "code", "execution_count": 29, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "name": "stdout", @@ -750,7 +782,9 @@ { "cell_type": "code", "execution_count": 24, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "data": { @@ -759,7 +793,8 @@ ] }, "execution_count": 24, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], @@ -770,7 +805,9 @@ { "cell_type": "code", "execution_count": 10, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "name": "stdout", @@ -919,7 +956,9 @@ { "cell_type": "code", "execution_count": 7, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "name": "stdout", @@ -939,6 +978,7 @@ "cell_type": "code", "execution_count": 81, "metadata": { + "collapsed": false, "scrolled": true }, "outputs": [ @@ -963,7 +1003,9 @@ { "cell_type": "code", "execution_count": 58, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "data": { @@ -979,7 +1021,8 @@ ] }, "execution_count": 58, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], @@ -990,7 +1033,9 @@ { "cell_type": "code", "execution_count": 62, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "name": "stdout", @@ -1007,7 +1052,8 @@ ] }, "execution_count": 62, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], @@ -1019,6 +1065,7 @@ "cell_type": "code", "execution_count": 24, "metadata": { + "collapsed": false, "scrolled": true }, "outputs": [ @@ -1044,7 +1091,9 @@ { "cell_type": "code", "execution_count": 26, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "name": "stdout", @@ -1065,7 +1114,9 @@ { "cell_type": "code", "execution_count": 31, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "data": { @@ -1074,7 +1125,8 @@ ] }, "execution_count": 31, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], @@ -1085,7 +1137,9 @@ { "cell_type": "code", "execution_count": 73, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "data": { @@ -1096,7 +1150,8 @@ ] }, "execution_count": 73, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], @@ -1110,8 +1165,11 @@ { "cell_type": "code", "execution_count": 77, - "metadata": {}, - "outputs": [], + "metadata": { + "collapsed": false + }, + "outputs": [ + ], "source": [ "l = U.basis()\n", "l = l +[(1, 1/3)]" @@ -1120,8 +1178,11 @@ { "cell_type": "code", "execution_count": 24, - "metadata": {}, - "outputs": [], + "metadata": { + "collapsed": false + }, + "outputs": [ + ], "source": [ "###fragment kodu do obliczania residuuow w niesk - zaniechany\n", "#def more_v(f, prec):\n", @@ -1151,7 +1212,9 @@ { "cell_type": "code", "execution_count": 211, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "name": "stdout", @@ -1175,15 +1238,21 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] + "execution_count": 0, + "metadata": { + "collapsed": false + }, + "outputs": [ + ], + "source": [ + ] }, { "cell_type": "code", "execution_count": 212, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "data": { @@ -1199,7 +1268,8 @@ ] }, "execution_count": 212, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], @@ -1211,7 +1281,7 @@ "cell_type": "code", "execution_count": 213, "metadata": { - "scrolled": false + "collapsed": false }, "outputs": [ { @@ -1228,7 +1298,8 @@ ] }, "execution_count": 213, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], @@ -1239,8 +1310,11 @@ { "cell_type": "code", "execution_count": 214, - "metadata": {}, - "outputs": [], + "metadata": { + "collapsed": false + }, + "outputs": [ + ], "source": [ "A = C.frobenius_matrix()\n", "B = C.verschiebung_matrix()" @@ -1249,7 +1323,9 @@ { "cell_type": "code", "execution_count": 227, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "data": { @@ -1258,7 +1334,8 @@ ] }, "execution_count": 227, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], @@ -1269,7 +1346,9 @@ { "cell_type": "code", "execution_count": 228, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "data": { @@ -1278,7 +1357,8 @@ ] }, "execution_count": 228, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], @@ -1289,7 +1369,9 @@ { "cell_type": "code", "execution_count": 225, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "data": { @@ -1298,7 +1380,8 @@ ] }, "execution_count": 225, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], @@ -1309,8 +1392,11 @@ { "cell_type": "code", "execution_count": 83, - "metadata": {}, - "outputs": [], + "metadata": { + "collapsed": false + }, + "outputs": [ + ], "source": [ "omega = diffn(superelliptic_function(C, y^2))" ] @@ -1318,7 +1404,9 @@ { "cell_type": "code", "execution_count": 84, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "data": { @@ -1327,7 +1415,8 @@ ] }, "execution_count": 84, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], @@ -1338,7 +1427,9 @@ { "cell_type": "code", "execution_count": 85, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "data": { @@ -1347,7 +1438,8 @@ ] }, "execution_count": 85, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], @@ -1365,8 +1457,11 @@ { "cell_type": "code", "execution_count": 86, - "metadata": {}, - "outputs": [], + "metadata": { + "collapsed": false + }, + "outputs": [ + ], "source": [ "H = HyperellipticCurve(x^5 - x + 1)" ] @@ -1374,7 +1469,9 @@ { "cell_type": "code", "execution_count": 40, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "data": { @@ -1383,7 +1480,8 @@ ] }, "execution_count": 40, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], @@ -1394,8 +1492,11 @@ { "cell_type": "code", "execution_count": 84, - "metadata": {}, - "outputs": [], + "metadata": { + "collapsed": false + }, + "outputs": [ + ], "source": [ "f = x^3 + x + 2" ] @@ -1403,7 +1504,9 @@ { "cell_type": "code", "execution_count": 86, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "data": { @@ -1412,7 +1515,8 @@ ] }, "execution_count": 86, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], @@ -1423,8 +1527,11 @@ { "cell_type": "code", "execution_count": 3, - "metadata": {}, - "outputs": [], + "metadata": { + "collapsed": false + }, + "outputs": [ + ], "source": [ "p = 5\n", "R1. = PolynomialRing(GF(p))\n", @@ -1437,7 +1544,9 @@ { "cell_type": "code", "execution_count": 4, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "data": { @@ -1446,7 +1555,8 @@ ] }, "execution_count": 4, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], @@ -1458,7 +1568,9 @@ { "cell_type": "code", "execution_count": 57, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "data": { @@ -1467,7 +1579,8 @@ ] }, "execution_count": 57, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], @@ -1478,7 +1591,9 @@ { "cell_type": "code", "execution_count": 62, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "ename": "AttributeError", @@ -1502,7 +1617,9 @@ { "cell_type": "code", "execution_count": 35, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "data": { @@ -1511,7 +1628,8 @@ ] }, "execution_count": 35, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], @@ -1522,7 +1640,9 @@ { "cell_type": "code", "execution_count": 36, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "data": { @@ -1531,7 +1651,8 @@ ] }, "execution_count": 36, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], @@ -1542,8 +1663,11 @@ { "cell_type": "code", "execution_count": 37, - "metadata": {}, - "outputs": [], + "metadata": { + "collapsed": false + }, + "outputs": [ + ], "source": [ "R. = PolynomialRing(GF(5))" ] @@ -1551,8 +1675,11 @@ { "cell_type": "code", "execution_count": 39, - "metadata": {}, - "outputs": [], + "metadata": { + "collapsed": false + }, + "outputs": [ + ], "source": [ "R = (x^3+x).parent()" ] @@ -1560,8 +1687,11 @@ { "cell_type": "code", "execution_count": 44, - "metadata": {}, - "outputs": [], + "metadata": { + "collapsed": false + }, + "outputs": [ + ], "source": [ "R. = PolynomialRing(GF(5))\n", "RR = FractionField(R)\n", @@ -1571,7 +1701,9 @@ { "cell_type": "code", "execution_count": 45, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "data": { @@ -1580,7 +1712,8 @@ ] }, "execution_count": 45, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], @@ -1591,8 +1724,11 @@ { "cell_type": "code", "execution_count": 42, - "metadata": {}, - "outputs": [], + "metadata": { + "collapsed": false + }, + "outputs": [ + ], "source": [ "dict1 = {}\n", "dict1[3] = 5\n", @@ -1602,8 +1738,11 @@ { "cell_type": "code", "execution_count": 46, - "metadata": {}, - "outputs": [], + "metadata": { + "collapsed": false + }, + "outputs": [ + ], "source": [ "degrees1_inv = {b:a for a, b in dict1.items()}" ] @@ -1611,7 +1750,9 @@ { "cell_type": "code", "execution_count": 47, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "data": { @@ -1620,7 +1761,8 @@ ] }, "execution_count": 47, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], @@ -1631,7 +1773,9 @@ { "cell_type": "code", "execution_count": 28, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "data": { @@ -1640,7 +1784,8 @@ ] }, "execution_count": 28, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], @@ -1651,8 +1796,11 @@ { "cell_type": "code", "execution_count": 29, - "metadata": {}, - "outputs": [], + "metadata": { + "collapsed": false + }, + "outputs": [ + ], "source": [ "basis = C.basis_de_rham()" ] @@ -1660,7 +1808,9 @@ { "cell_type": "code", "execution_count": 32, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "data": { @@ -1669,7 +1819,8 @@ ] }, "execution_count": 32, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], @@ -1680,7 +1831,9 @@ { "cell_type": "code", "execution_count": 9, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "data": { @@ -1689,7 +1842,8 @@ ] }, "execution_count": 9, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], @@ -1704,7 +1858,9 @@ { "cell_type": "code", "execution_count": 10, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "data": { @@ -1713,7 +1869,8 @@ ] }, "execution_count": 10, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], @@ -1724,8 +1881,11 @@ { "cell_type": "code", "execution_count": 11, - "metadata": {}, - "outputs": [], + "metadata": { + "collapsed": false + }, + "outputs": [ + ], "source": [ "Fpbar = GF(5).algebraic_closure()\n", "z = Fpbar.zeta(7)" @@ -1734,7 +1894,9 @@ { "cell_type": "code", "execution_count": 23, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "ename": "TypeError", @@ -1761,7 +1923,9 @@ { "cell_type": "code", "execution_count": 21, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "data": { @@ -1770,7 +1934,8 @@ ] }, "execution_count": 21, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], @@ -1781,8 +1946,11 @@ { "cell_type": "code", "execution_count": 7, - "metadata": {}, - "outputs": [], + "metadata": { + "collapsed": false + }, + "outputs": [ + ], "source": [ "Rx. = PolynomialRing(QQ)\n", "f = sum((i+1)*x^i for i in range(0, 10))" @@ -1791,7 +1959,9 @@ { "cell_type": "code", "execution_count": 8, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "data": { @@ -1800,7 +1970,8 @@ ] }, "execution_count": 8, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], @@ -1811,7 +1982,9 @@ { "cell_type": "code", "execution_count": 9, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "data": { @@ -1820,7 +1993,8 @@ ] }, "execution_count": 9, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], @@ -1831,7 +2005,9 @@ { "cell_type": "code", "execution_count": 45, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "name": "stdout", @@ -1851,7 +2027,9 @@ { "cell_type": "code", "execution_count": 41, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "data": { @@ -1860,7 +2038,8 @@ ] }, "execution_count": 41, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], @@ -1871,7 +2050,9 @@ { "cell_type": "code", "execution_count": 42, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "data": { @@ -1880,16 +2061,20 @@ ] }, "execution_count": 42, - "metadata": {}, + "metadata": { + }, "output_type": "execute_result" } ], - "source": [] + "source": [ + ] }, { "cell_type": "code", "execution_count": 30, - "metadata": {}, + "metadata": { + "collapsed": false + }, "outputs": [ { "name": "stdout", @@ -1920,17 +2105,29 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] + "execution_count": 0, + "metadata": { + "collapsed": false + }, + "outputs": [ + ], + "source": [ + ] } ], "metadata": { "kernelspec": { - "display_name": "SageMath 9.1", - "language": "sage", - "name": "sagemath" + "display_name": "SageMath 9.5", + "language": "sagemath", + "metadata": { + "cocalc": { + "description": "Open-source mathematical software system", + "priority": 10, + "url": "https://www.sagemath.org/" + } + }, + "name": "sage-9.5", + "resource_dir": "/ext/jupyter/kernels/sage-9.5" }, "language_info": { "codemirror_mode": { @@ -1942,9 +2139,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.3" + "version": "3.9.9" } }, "nbformat": 4, - "nbformat_minor": 2 -} + "nbformat_minor": 4 +} \ No newline at end of file diff --git a/superelliptic_alpha.ipynb b/superelliptic_alpha.ipynb index e187325..47ec631 100644 --- a/superelliptic_alpha.ipynb +++ b/superelliptic_alpha.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 6, + "execution_count": 5, "metadata": { "collapsed": false }, @@ -10,13 +10,10 @@ ], "source": [ "def basis_holomorphic_differentials_degree(f, m, p):\n", - " kxi1. = PolynomialRing(GF(p))\n", - " kxi = kxi1.quotient(xi1^p)\n", - " xi = kxi(xi1)\n", " r = f.degree()\n", " delta = GCD(r, m)\n", - " Rx. = PolynomialRing(kxi)\n", - " Rxy. = PolynomialRing(kxi, 2)\n", + " Rx. = PolynomialRing(GF(p))\n", + " Rxy. = PolynomialRing(GF(p), 2)\n", " Fxy = FractionField(Rxy)\n", " #########basis of holomorphic differentials and de Rham\n", " \n", @@ -44,11 +41,8 @@ "def basis_de_rham_degrees(f, m, p):\n", " r = f.degree()\n", " delta = GCD(r, m)\n", - " kxi1. = PolynomialRing(GF(p))\n", - " kxi = kxi1.quotient(xi1^p)\n", - " xi = kxi(xi1)\n", - " Rx. = PolynomialRing(kxi)\n", - " Rxy. = PolynomialRing(kxi, 2)\n", + " Rx. = PolynomialRing(GF(p))\n", + " Rxy. = PolynomialRing(GF(p), 2)\n", " Fxy = FractionField(Rxy)\n", " basis_holo = holomorphic_differentials_basis(f, m, p)\n", " basis = []\n", @@ -86,11 +80,8 @@ "class superelliptic:\n", " \n", " def __init__(self, f, m, p):\n", - " kxi1. = PolynomialRing(GF(p))\n", - " kxi = kxi1.quotient(xi1^p)\n", - " xi = kxi(xi1)\n", - " Rx. = PolynomialRing(kxi)\n", - " Rxy. = PolynomialRing(kxi, 2)\n", + " Rx. = PolynomialRing(GF(p))\n", + " Rxy. = PolynomialRing(GF(p), 2)\n", " Fxy = FractionField(Rxy)\n", " self.polynomial = Rx(f)\n", " self.exponent = m\n", @@ -162,10 +153,10 @@ " basis = self.basis_holomorphic_differentials\n", " g = self.genus()\n", " p = self.characteristic\n", - " kxi1. = PolynomialRing(GF(p))\n", - " kxi = kxi1.quotient(xi1^p)\n", - " xi = kxi(xi1)\n", - " M = matrix(kxi, g, g)\n", + " \n", + " \n", + " \n", + " M = matrix(GF(p), g, g)\n", " for i in range(0, len(basis)):\n", " w = basis[i]\n", " v = w.cartier().coordinates()\n", @@ -183,10 +174,7 @@ " \n", "def reduction(C, g):\n", " p = C.characteristic\n", - " kxi1. = PolynomialRing(GF(p))\n", - " kxi = kxi1.quotient(xi1^p)\n", - " xi = kxi(xi1)\n", - " Rxy. = PolynomialRing(kxi, 2)\n", + " Rxy. = PolynomialRing(GF(p), 2)\n", " Fxy = FractionField(Rxy)\n", " f = C.polynomial\n", " r = f.degree()\n", @@ -211,10 +199,7 @@ "\n", "def reduction_form(C, g):\n", " p = C.characteristic\n", - " kxi1. = PolynomialRing(GF(p))\n", - " kxi = kxi1.quotient(xi1^p)\n", - " xi = kxi(xi1)\n", - " Rxy. = PolynomialRing(kxi, 2)\n", + " Rxy. = PolynomialRing(GF(p), 2)\n", " Fxy = FractionField(Rxy)\n", " f = C.polynomial\n", " r = f.degree()\n", @@ -222,7 +207,7 @@ " g = reduction(C, g)\n", "\n", " g1 = Rxy(0)\n", - " Rx. = PolynomialRing(kxi)\n", + " Rx. = PolynomialRing(GF(p))\n", " Fx = FractionField(Rx)\n", " FxRy. = PolynomialRing(Fx)\n", " \n", @@ -239,10 +224,7 @@ "class superelliptic_function:\n", " def __init__(self, C, g):\n", " p = C.characteristic\n", - " kxi1. = PolynomialRing(GF(p))\n", - " kxi = kxi1.quotient(xi1^p)\n", - " xi = kxi(xi1)\n", - " Rxy. = PolynomialRing(kxi, 2)\n", + " Rxy. = PolynomialRing(GF(p), 2)\n", " Fxy = FractionField(Rxy)\n", " f = C.polynomial\n", " r = f.degree()\n", @@ -584,7 +566,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 6, "metadata": { "collapsed": false }, @@ -2251,38 +2233,121 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + ], + "source": [ + "p = 5\n", + "Rx. = PolynomialRing(GF(p))\n", + "Rxy. = PolynomialRing(GF(p), 2)\n", + "Fxy = FractionField(Rxy)\n", + "kxi1. = PolynomialRing(Fxy)\n", + "kxi = kxi1.quotient(xi1^p)\n", + "xi = kxi(xi1)\n", + "\n", + "f1 = Rx(x^3 + x + 1)\n", + "f = Rx(f1(x^p))\n", + "m = 2\n", + "C = superelliptic(f, m, p)" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + ], + "source": [ + "omega = C.basis_holomorphic_differentials[2]" + ] + }, + { + "cell_type": "code", + "execution_count": 12, "metadata": { "collapsed": false }, "outputs": [ { - "ename": "NotImplementedError", - "evalue": "", + "data": { + "text/plain": [ + "x^2/y" + ] + }, + "execution_count": 12, + "metadata": { + }, + "output_type": "execute_result" + } + ], + "source": [ + "omega.form" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/plain": [ + "1/y*xi1bar^2 + 2*x/y*xi1bar + x^2/y" + ] + }, + "execution_count": 14, + "metadata": { + }, + "output_type": "execute_result" + } + ], + "source": [ + "omega.form(x = x+xi, y = y)" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "ename": "TypeError", + "evalue": "cannot convert 1/y*xi1bar^2 + 2*x/y*xi1bar + x^2/y/1 to an element of Fraction Field of Multivariate Polynomial Ring in x, y over Finite Field of size 5", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mNotImplementedError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m/tmp/ipykernel_968/1691347420.py\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 8\u001b[0m \u001b[0mf\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mf1\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\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 9\u001b[0m \u001b[0mm\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[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 10\u001b[0;31m \u001b[0mC\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0msuperelliptic\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mm\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[0m", - "\u001b[0;32m/tmp/ipykernel_968/2781228428.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, f, m, p)\u001b[0m\n\u001b[1;32m 81\u001b[0m \u001b[0mRx\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mPolynomialRing\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkxi\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)\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[0;34m)\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mRx\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_first_ngens\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[0m\n\u001b[1;32m 82\u001b[0m \u001b[0mRxy\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mPolynomialRing\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkxi\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[0;32m---> 83\u001b[0;31m \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[0m\u001b[1;32m 84\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpolynomial\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mRx\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 85\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexponent\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mm\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/ext/sage/9.5/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/rings/fraction_field.py\u001b[0m in \u001b[0;36mFractionField\u001b[0;34m(R, names)\u001b[0m\n\u001b[1;32m 129\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mring\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mis_Ring\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mR\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 130\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mTypeError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"R must be a ring\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 131\u001b[0;31m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mR\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mis_integral_domain\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 132\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mTypeError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"R must be an integral domain.\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 133\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mR\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfraction_field\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/ext/sage/9.5/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/rings/polynomial/multi_polynomial_ring_base.pyx\u001b[0m in \u001b[0;36msage.rings.polynomial.multi_polynomial_ring_base.MPolynomialRing_base.is_integral_domain (build/cythonized/sage/rings/polynomial/multi_polynomial_ring_base.c:4294)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 107\u001b[0m \u001b[0;32mFalse\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 108\u001b[0m \"\"\"\n\u001b[0;32m--> 109\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbase_ring\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mis_integral_domain\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mproof\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 110\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 111\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mis_noetherian\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/ext/sage/9.5/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/rings/ring.pyx\u001b[0m in \u001b[0;36msage.rings.ring.Ring.is_integral_domain (build/cythonized/sage/rings/ring.c:8605)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 999\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1000\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mproof\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1001\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mNotImplementedError\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1002\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 1003\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0;32mFalse\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mNotImplementedError\u001b[0m: " + "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m/ext/sage/9.5/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/rings/fraction_field.py\u001b[0m in \u001b[0;36m_element_constructor_\u001b[0;34m(self, x, y, coerce)\u001b[0m\n\u001b[1;32m 695\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--> 696\u001b[0;31m \u001b[0mx\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0my\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mresolve_fractions\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx0\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0my0\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 697\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mAttributeError\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mTypeError\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/ext/sage/9.5/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/rings/fraction_field.py\u001b[0m in \u001b[0;36mresolve_fractions\u001b[0;34m(x, y)\u001b[0m\n\u001b[1;32m 672\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mresolve_fractions\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[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 673\u001b[0;31m \u001b[0mxn\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[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 674\u001b[0m \u001b[0mxd\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[0m\n", + "\u001b[0;32m/ext/sage/9.5/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/structure/element.pyx\u001b[0m in \u001b[0;36msage.structure.element.Element.__getattr__ (build/cythonized/sage/structure/element.c:4754)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 493\u001b[0m \"\"\"\n\u001b[0;32m--> 494\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 495\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/ext/sage/9.5/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/structure/element.pyx\u001b[0m in \u001b[0;36msage.structure.element.Element.getattr_from_category (build/cythonized/sage/structure/element.c:4866)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 506\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--> 507\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 508\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/ext/sage/9.5/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/cpython/getattr.pyx\u001b[0m in \u001b[0;36msage.cpython.getattr.getattr_from_other_class (build/cythonized/sage/cpython/getattr.c:2566)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 355\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--> 356\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 357\u001b[0m \u001b[0mcdef\u001b[0m \u001b[0mPyObject\u001b[0m\u001b[0;34m*\u001b[0m \u001b[0mattr\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0minstance_getattr\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[0;31mAttributeError\u001b[0m: 'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomialRing_libsingular' object has no attribute '__custom_name'", + "\nDuring handling of the above exception, another exception occurred:\n", + "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m/tmp/ipykernel_1899/916120484.py\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0momega1\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[0momega\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mform\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mx\u001b[0m\u001b[0;34m+\u001b[0m\u001b[0mxi\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0my\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[0;34m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[0;32m/tmp/ipykernel_1899/3188561669.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, C, g)\u001b[0m\n\u001b[1;32m 283\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 284\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--> 285\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 286\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 287\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/tmp/ipykernel_1899/3188561669.py\u001b[0m in \u001b[0;36mreduction_form\u001b[0;34m(C, g)\u001b[0m\n\u001b[1;32m 194\u001b[0m \u001b[0mr\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdegree\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 195\u001b[0m \u001b[0mm\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mC\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexponent\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 196\u001b[0;31m \u001b[0mg\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mreduction\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[0m\n\u001b[0m\u001b[1;32m 197\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 198\u001b[0m \u001b[0mg1\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mRxy\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/tmp/ipykernel_1899/3188561669.py\u001b[0m in \u001b[0;36mreduction\u001b[0;34m(C, g)\u001b[0m\n\u001b[1;32m 169\u001b[0m \u001b[0mr\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdegree\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 170\u001b[0m \u001b[0mm\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mC\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexponent\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 171\u001b[0;31m \u001b[0mg\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mFxy\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 172\u001b[0m \u001b[0mg1\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mg\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[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 173\u001b[0m \u001b[0mg2\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mg\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[0m\n", + "\u001b[0;32m/ext/sage/9.5/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/structure/parent.pyx\u001b[0m in \u001b[0;36msage.structure.parent.Parent.__call__ (build/cythonized/sage/structure/parent.c:9388)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 896\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 897\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--> 898\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 899\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 900\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/ext/sage/9.5/local/var/lib/sage/venv-python3.9.9/lib/python3.9/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:4665)\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/ext/sage/9.5/local/var/lib/sage/venv-python3.9.9/lib/python3.9/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:4557)\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/ext/sage/9.5/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/rings/fraction_field.py\u001b[0m in \u001b[0;36m_element_constructor_\u001b[0;34m(self, x, y, coerce)\u001b[0m\n\u001b[1;32m 696\u001b[0m \u001b[0mx\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0my\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mresolve_fractions\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx0\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0my0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 697\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mAttributeError\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mTypeError\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--> 698\u001b[0;31m raise TypeError(\"cannot convert {!r}/{!r} to an element of {}\".format(\n\u001b[0m\u001b[1;32m 699\u001b[0m x0, y0, self))\n\u001b[1;32m 700\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;31mTypeError\u001b[0m: cannot convert 1/y*xi1bar^2 + 2*x/y*xi1bar + x^2/y/1 to an element of Fraction Field of Multivariate Polynomial Ring in x, y over Finite Field of size 5" ] } ], "source": [ - "p = 5\n", - "kxi1. = PolynomialRing(GF(p))\n", - "kxi = kxi1.quotient(xi1^p)\n", - "xi = kxi(xi1)\n", - "Rx. = PolynomialRing(kxi)\n", - "\n", - "f1 = x^3 + x + 1\n", - "f = f1(x^p)\n", - "m = 2\n", - "C = superelliptic(f, m, p)" + "omega1 = superelliptic_form(C, omega.form(x = x+xi, y = y))" ] }, {