lepsze nazwy cial
This commit is contained in:
parent
7abda884fa
commit
75290c6b6a
@ -2,14 +2,14 @@
|
|||||||
"cells": [
|
"cells": [
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 4,
|
"execution_count": 19,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"class superelliptic:\n",
|
"class superelliptic:\n",
|
||||||
" def __init__(self, f, m, p):\n",
|
" def __init__(self, f, m, p):\n",
|
||||||
" R.<x> = PolynomialRing(GF(p))\n",
|
" Rx.<x> = PolynomialRing(GF(p))\n",
|
||||||
" self.polynomial = R(f)\n",
|
" self.polynomial = Rx(f)\n",
|
||||||
" self.exponent = m\n",
|
" self.exponent = m\n",
|
||||||
" self.characteristic = p\n",
|
" self.characteristic = p\n",
|
||||||
" \n",
|
" \n",
|
||||||
@ -31,8 +31,8 @@
|
|||||||
" p = self.characteristic\n",
|
" p = self.characteristic\n",
|
||||||
" r = f.degree()\n",
|
" r = f.degree()\n",
|
||||||
" delta = GCD(r, m)\n",
|
" delta = GCD(r, m)\n",
|
||||||
" R2.<x, y> = PolynomialRing(GF(p), 2)\n",
|
" Rxy.<x, y> = PolynomialRing(GF(p), 2)\n",
|
||||||
" RR = FractionField(R2)\n",
|
" Fxy = FractionField(Rxy)\n",
|
||||||
" \n",
|
" \n",
|
||||||
" basis = {}\n",
|
" basis = {}\n",
|
||||||
" if j == 'all':\n",
|
" if j == 'all':\n",
|
||||||
@ -40,14 +40,14 @@
|
|||||||
" for j in range(1, m):\n",
|
" for j in range(1, m):\n",
|
||||||
" for i in range(1, r):\n",
|
" for i in range(1, r):\n",
|
||||||
" if (r*j - m*i >= delta):\n",
|
" if (r*j - m*i >= delta):\n",
|
||||||
" basis[k] = superelliptic_form(self, RR(x^(i-1)/y^j))\n",
|
" basis[k] = superelliptic_form(self, Fxy(x^(i-1)/y^j))\n",
|
||||||
" k = k+1\n",
|
" k = k+1\n",
|
||||||
" return basis\n",
|
" return basis\n",
|
||||||
" else:\n",
|
" else:\n",
|
||||||
" k = 0\n",
|
" k = 0\n",
|
||||||
" for i in range(1, r):\n",
|
" for i in range(1, r):\n",
|
||||||
" if (r*j - m*i >= delta):\n",
|
" if (r*j - m*i >= delta):\n",
|
||||||
" basis[k] = superelliptic_form(self, RR(x^(i-1)/y^j))\n",
|
" basis[k] = superelliptic_form(self, Fxy(x^(i-1)/y^j))\n",
|
||||||
" k = k+1\n",
|
" k = k+1\n",
|
||||||
" return basis\n",
|
" return basis\n",
|
||||||
" \n",
|
" \n",
|
||||||
@ -57,79 +57,79 @@
|
|||||||
" p = self.characteristic\n",
|
" p = self.characteristic\n",
|
||||||
" r = f.degree()\n",
|
" r = f.degree()\n",
|
||||||
" delta = GCD(r, m)\n",
|
" delta = GCD(r, m)\n",
|
||||||
" R.<x> = PolynomialRing(GF(p))\n",
|
" Rx.<x> = PolynomialRing(GF(p))\n",
|
||||||
" R1.<x, y> = PolynomialRing(GF(p), 2)\n",
|
" Rxy.<x, y> = PolynomialRing(GF(p), 2)\n",
|
||||||
" RR = FractionField(R1)\n",
|
" Fxy = FractionField(Rxy)\n",
|
||||||
" basis = {}\n",
|
" basis = {}\n",
|
||||||
" if j == 'all':\n",
|
" if j == 'all':\n",
|
||||||
" for j in range(1, m):\n",
|
" for j in range(1, m):\n",
|
||||||
" holo = C.basis_holomorphic_differentials(j)\n",
|
" holo = C.basis_holomorphic_differentials(j)\n",
|
||||||
" for k in range(0, len(holo)):\n",
|
" for k in range(0, len(holo)):\n",
|
||||||
" basis[k] = superelliptic_cech(self, holo[k], superelliptic_function(self, R(0))) \n",
|
" basis[k] = superelliptic_cech(self, holo[k], superelliptic_function(self, Rx(0))) \n",
|
||||||
" k = len(basis)\n",
|
" k = len(basis)\n",
|
||||||
" \n",
|
" \n",
|
||||||
" for i in range(1, r):\n",
|
" for i in range(1, r):\n",
|
||||||
" if (r*(m-j) - m*i >= delta):\n",
|
" if (r*(m-j) - m*i >= delta):\n",
|
||||||
" s = R(m-j)*R(x)*R(f.derivative()) - R(m)*R(i)*f\n",
|
" s = Rx(m-j)*Rx(x)*Rx(f.derivative()) - Rx(m)*Rx(i)*f\n",
|
||||||
" psi = R(cut(s, i))\n",
|
" psi = Rx(cut(s, i))\n",
|
||||||
" basis[k] = superelliptic_cech(self, superelliptic_form(self, psi/y^j), superelliptic_function(self, m*y^j/x^i))\n",
|
" basis[k] = superelliptic_cech(self, superelliptic_form(self, Fxy(psi/y^j)), superelliptic_function(self, Fxy(m*y^j/x^i)))\n",
|
||||||
" k = k+1\n",
|
" k = k+1\n",
|
||||||
" return basis\n",
|
" return basis\n",
|
||||||
" \n",
|
" \n",
|
||||||
"def reduction(C, g):\n",
|
"def reduction(C, g):\n",
|
||||||
" p = C.characteristic\n",
|
" p = C.characteristic\n",
|
||||||
" R.<x, y> = PolynomialRing(GF(p), 2)\n",
|
" Rxy.<x, y> = PolynomialRing(GF(p), 2)\n",
|
||||||
" RR = FractionField(R)\n",
|
" Fxy = FractionField(Rxy)\n",
|
||||||
" f = C.polynomial\n",
|
" f = C.polynomial\n",
|
||||||
" r = f.degree()\n",
|
" r = f.degree()\n",
|
||||||
" m = C.exponent\n",
|
" m = C.exponent\n",
|
||||||
" g = RR(g)\n",
|
" g = Fxy(g)\n",
|
||||||
" g1 = g.numerator()\n",
|
" g1 = g.numerator()\n",
|
||||||
" g2 = g.denominator()\n",
|
" g2 = g.denominator()\n",
|
||||||
" \n",
|
" \n",
|
||||||
" R1.<x> = PolynomialRing(GF(p))\n",
|
" Rx.<x> = PolynomialRing(GF(p))\n",
|
||||||
" R2 = FractionField(R1)\n",
|
" Fx = FractionField(Rx)\n",
|
||||||
" R3.<y> = PolynomialRing(R2) \n",
|
" FxRy.<y> = PolynomialRing(Fx) \n",
|
||||||
" (A, B, C) = xgcd(R3(g2), R3(y^m - f))\n",
|
" (A, B, C) = xgcd(FxRy(g2), FxRy(y^m - f))\n",
|
||||||
" g = R3(g1*B/A)\n",
|
" g = FxRy(g1*B/A)\n",
|
||||||
" \n",
|
" \n",
|
||||||
" while(g.degree(R(y)) >= m):\n",
|
" while(g.degree(Rxy(y)) >= m):\n",
|
||||||
" d = g.degree(R(y))\n",
|
" d = g.degree(Rxy(y))\n",
|
||||||
" G = coff(g, d)\n",
|
" G = coff(g, d)\n",
|
||||||
" i = floor(d/m)\n",
|
" i = floor(d/m)\n",
|
||||||
" g = g - G*y^d + f^i * y^(d%m) *G\n",
|
" g = g - G*y^d + f^i * y^(d%m) *G\n",
|
||||||
" \n",
|
" \n",
|
||||||
" return(R3(g))\n",
|
" return(FxRy(g))\n",
|
||||||
"\n",
|
"\n",
|
||||||
"def reduction_form(C, g):\n",
|
"def reduction_form(C, g):\n",
|
||||||
" p = C.characteristic\n",
|
" p = C.characteristic\n",
|
||||||
" R.<x, y> = PolynomialRing(GF(p), 2)\n",
|
" Rxy.<x, y> = PolynomialRing(GF(p), 2)\n",
|
||||||
" RR = FractionField(R)\n",
|
" Fxy = FractionField(Rxy)\n",
|
||||||
" f = C.polynomial\n",
|
" f = C.polynomial\n",
|
||||||
" r = f.degree()\n",
|
" r = f.degree()\n",
|
||||||
" m = C.exponent\n",
|
" m = C.exponent\n",
|
||||||
" g = reduction(C, g)\n",
|
" g = reduction(C, g)\n",
|
||||||
"\n",
|
"\n",
|
||||||
" g1 = RR(0)\n",
|
" g1 = RR(0)\n",
|
||||||
" R1.<x> = PolynomialRing(GF(p))\n",
|
" Rx.<x> = PolynomialRing(GF(p))\n",
|
||||||
" R2 = FractionField(R1)\n",
|
" Fx = FractionField(Rx)\n",
|
||||||
" R3.<y> = PolynomialRing(R2)\n",
|
" FxRy.<y> = PolynomialRing(Fx)\n",
|
||||||
" \n",
|
" \n",
|
||||||
" g = R3(g)\n",
|
" g = FxRy(g)\n",
|
||||||
" for j in range(0, m):\n",
|
" for j in range(0, m):\n",
|
||||||
" if j==0:\n",
|
" if j==0:\n",
|
||||||
" G = coff(g, 0)\n",
|
" G = coff(g, 0)\n",
|
||||||
" g1 += G\n",
|
" g1 += G\n",
|
||||||
" else:\n",
|
" else:\n",
|
||||||
" G = coff(g, j)\n",
|
" G = coff(g, j)\n",
|
||||||
" g1 += RR(y^(j-m)*f*G)\n",
|
" g1 += Fxy(y^(j-m)*f*G)\n",
|
||||||
" return(g1)\n",
|
" return(g1)\n",
|
||||||
" \n",
|
" \n",
|
||||||
"class superelliptic_function:\n",
|
"class superelliptic_function:\n",
|
||||||
" def __init__(self, C, g):\n",
|
" def __init__(self, C, g):\n",
|
||||||
" p = C.characteristic\n",
|
" p = C.characteristic\n",
|
||||||
" R.<x, y> = PolynomialRing(GF(p), 2)\n",
|
" Rxy.<x, y> = PolynomialRing(GF(p), 2)\n",
|
||||||
" RR = FractionField(R)\n",
|
" Fxy = FractionField(Rxy)\n",
|
||||||
" f = C.polynomial\n",
|
" f = C.polynomial\n",
|
||||||
" r = f.degree()\n",
|
" r = f.degree()\n",
|
||||||
" m = C.exponent\n",
|
" m = C.exponent\n",
|
||||||
@ -143,8 +143,8 @@
|
|||||||
" \n",
|
" \n",
|
||||||
" def jth_component(self, j):\n",
|
" def jth_component(self, j):\n",
|
||||||
" g = self.function\n",
|
" g = self.function\n",
|
||||||
" R.<x, y> = PolynomialRing(GF(p), 2)\n",
|
" Rxy.<x, y> = PolynomialRing(GF(p), 2)\n",
|
||||||
" g = R(g)\n",
|
" g = Rxy(g)\n",
|
||||||
" return g.coefficient(y^j)\n",
|
" return g.coefficient(y^j)\n",
|
||||||
" \n",
|
" \n",
|
||||||
" def __add__(self, other):\n",
|
" def __add__(self, other):\n",
|
||||||
@ -181,9 +181,9 @@
|
|||||||
" m = C.exponent\n",
|
" m = C.exponent\n",
|
||||||
" p = C.characteristic\n",
|
" p = C.characteristic\n",
|
||||||
" g = self.function\n",
|
" g = self.function\n",
|
||||||
" R.<x, y> = PolynomialRing(GF(p), 2)\n",
|
" Rxy.<x, y> = PolynomialRing(GF(p), 2)\n",
|
||||||
" RR = FractionField(R)\n",
|
" Fxy = FractionField(Rxy)\n",
|
||||||
" g = RR(g)\n",
|
" g = Fxy(g)\n",
|
||||||
" A = g.derivative(x)\n",
|
" A = g.derivative(x)\n",
|
||||||
" B = g.derivative(y)*f.derivative(x)/(m*y^(m-1))\n",
|
" B = g.derivative(y)*f.derivative(x)/(m*y^(m-1))\n",
|
||||||
" return superelliptic_form(C, A+B)\n",
|
" return superelliptic_form(C, A+B)\n",
|
||||||
@ -191,9 +191,9 @@
|
|||||||
"class superelliptic_form:\n",
|
"class superelliptic_form:\n",
|
||||||
" def __init__(self, C, g):\n",
|
" def __init__(self, C, g):\n",
|
||||||
" p = C.characteristic\n",
|
" p = C.characteristic\n",
|
||||||
" R.<x, y> = PolynomialRing(GF(p), 2)\n",
|
" Rxy.<x, y> = PolynomialRing(GF(p), 2)\n",
|
||||||
" RR = FractionField(R)\n",
|
" Fxy = FractionField(Rxy)\n",
|
||||||
" g = RR(reduction_form(C, g))\n",
|
" g = Fxy(reduction_form(C, g))\n",
|
||||||
" self.form = g\n",
|
" self.form = g\n",
|
||||||
" self.curve = C \n",
|
" self.curve = C \n",
|
||||||
" \n",
|
" \n",
|
||||||
@ -219,23 +219,23 @@
|
|||||||
" \n",
|
" \n",
|
||||||
" def jth_component(self, j):\n",
|
" def jth_component(self, j):\n",
|
||||||
" g = self.form\n",
|
" g = self.form\n",
|
||||||
" R1.<x> = PolynomialRing(GF(p))\n",
|
" Rx.<x> = PolynomialRing(GF(p))\n",
|
||||||
" R2 = FractionField(R1)\n",
|
" Fx = FractionField(Rx)\n",
|
||||||
" R3.<y> = PolynomialRing(R2)\n",
|
" FxRy.<y> = PolynomialRing(Fx)\n",
|
||||||
" R4 = FractionField(R3)\n",
|
" Fxy = FractionField(FxRy)\n",
|
||||||
" R5.<y_inv> = PolynomialRing(R2)\n",
|
" Ryinv = PolynomialRing(Fx)\n",
|
||||||
" g = R4(g)\n",
|
" g = Fxy(g)\n",
|
||||||
" g = g(y = 1/y_inv)\n",
|
" g = g(y = 1/y_inv)\n",
|
||||||
" g = R5(g)\n",
|
" g = Ryinv(g)\n",
|
||||||
" return coff(g, j)\n",
|
" return coff(g, j)\n",
|
||||||
" \n",
|
" \n",
|
||||||
" def is_regular_on_U0(self):\n",
|
" def is_regular_on_U0(self):\n",
|
||||||
" C = self.curve\n",
|
" C = self.curve\n",
|
||||||
" p = C.characteristic\n",
|
" p = C.characteristic\n",
|
||||||
" m = C.exponent\n",
|
" m = C.exponent\n",
|
||||||
" R.<x> = PolynomialRing(GF(p))\n",
|
" Rx.<x> = PolynomialRing(GF(p))\n",
|
||||||
" for j in range(1, m):\n",
|
" for j in range(1, m):\n",
|
||||||
" if self.jth_component(j) not in R:\n",
|
" if self.jth_component(j) not in Rx:\n",
|
||||||
" return 0\n",
|
" return 0\n",
|
||||||
" return 1\n",
|
" return 1\n",
|
||||||
" \n",
|
" \n",
|
||||||
@ -276,9 +276,9 @@
|
|||||||
" return \"(\" + str(self.omega0) + \", \" + str(self.f) + \", \" + str(self.omega8) + \")\" \n",
|
" return \"(\" + str(self.omega0) + \", \" + str(self.f) + \", \" + str(self.omega8) + \")\" \n",
|
||||||
" \n",
|
" \n",
|
||||||
"def degree_of_rational_fctn(f):\n",
|
"def degree_of_rational_fctn(f):\n",
|
||||||
" R.<x> = PolynomialRing(GF(p))\n",
|
" Rx.<x> = PolynomialRing(GF(p))\n",
|
||||||
" RR = FractionField(R)\n",
|
" Fx = FractionField(Rx)\n",
|
||||||
" f = RR(f)\n",
|
" f = Fx(f)\n",
|
||||||
" f1 = f.numerator()\n",
|
" f1 = f.numerator()\n",
|
||||||
" f2 = f.denominator()\n",
|
" f2 = f.denominator()\n",
|
||||||
" d1 = f1.degree()\n",
|
" d1 = f1.degree()\n",
|
||||||
@ -299,38 +299,46 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 5,
|
"execution_count": 20,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"ename": "TypeError",
|
||||||
"text/plain": [
|
"evalue": "unsupported operand parent(s) for +: 'Real Field with 53 bits of precision' and 'Fraction Field of Univariate Polynomial Ring in x over Finite Field of size 5'",
|
||||||
"{0: ((1/y) dx, 0, (1/y) dx), 1: ((x/y) dx, 2/x*y, ((x - 1)/(x^2*y)) dx)}"
|
"output_type": "error",
|
||||||
|
"traceback": [
|
||||||
|
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
||||||
|
"\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)",
|
||||||
|
"\u001b[0;32m<ipython-input-20-d63657cf06e3>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0mC\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0msuperelliptic\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m3\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0mx\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[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m7\u001b[0m\u001b[0;34m)\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[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0mC\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbasis_de_rham\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 3\u001b[0m \u001b[0;31m#C.basis_holomorphic_differentials()\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
||||||
|
"\u001b[0;32m<ipython-input-19-a65119f7de4f>\u001b[0m in \u001b[0;36mbasis_de_rham\u001b[0;34m(self, j)\u001b[0m\n\u001b[1;32m 65\u001b[0m \u001b[0ms\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mRx\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mm\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0mj\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mRx\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m)\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[0mderivative\u001b[0m\u001b[0;34m(\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[0mm\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mRx\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mi\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 66\u001b[0m \u001b[0mpsi\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mRx\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcut\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0ms\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[0m\n\u001b[0;32m---> 67\u001b[0;31m \u001b[0mbasis\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0msuperelliptic_cech\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msuperelliptic_form\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mFxy\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpsi\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0my\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[0msuperelliptic_function\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mFxy\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mm\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0my\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mj\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0mx\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[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 68\u001b[0m \u001b[0mk\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mk\u001b[0m\u001b[0;34m+\u001b[0m\u001b[0mInteger\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 69\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mbasis\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
||||||
|
"\u001b[0;32m<ipython-input-19-a65119f7de4f>\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, C, g)\u001b[0m\n\u001b[1;32m 186\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 187\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--> 188\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 189\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 190\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<ipython-input-19-a65119f7de4f>\u001b[0m in \u001b[0;36mreduction_form\u001b[0;34m(C, g)\u001b[0m\n\u001b[1;32m 112\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mj\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[1;32m 113\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[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--> 114\u001b[0;31m \u001b[0mg1\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[0m\u001b[1;32m 115\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 116\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/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:11180)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1253\u001b[0m \u001b[0;31m# We should really include the underlying error.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1254\u001b[0m \u001b[0;31m# This causes so much headache.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1255\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mbin_op_exception\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mop\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 1256\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1257\u001b[0m \u001b[0mcpdef\u001b[0m \u001b[0mcanonical_coercion\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[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;31mTypeError\u001b[0m: unsupported operand parent(s) for +: 'Real Field with 53 bits of precision' and 'Fraction Field of Univariate Polynomial Ring in x over Finite Field of size 5'"
|
||||||
]
|
]
|
||||||
},
|
|
||||||
"execution_count": 5,
|
|
||||||
"metadata": {},
|
|
||||||
"output_type": "execute_result"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"C = superelliptic(x^3 + x + 2, 2, 5)\n",
|
"C = superelliptic(x^3 + x + 2, 7, 5)\n",
|
||||||
"C.basis_de_rham()\n",
|
"C.basis_de_rham()\n",
|
||||||
"#C.basis_holomorphic_differentials()"
|
"#C.basis_holomorphic_differentials()"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 50,
|
"execution_count": 7,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"name": "stdout",
|
"ename": "NameError",
|
||||||
"output_type": "stream",
|
"evalue": "name 'y' is not defined",
|
||||||
"text": [
|
"output_type": "error",
|
||||||
"(1/y) dx\n",
|
"traceback": [
|
||||||
"1 1\n",
|
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
||||||
"{0: (1/y) dx}\n"
|
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
|
||||||
|
"\u001b[0;32m<ipython-input-7-1009561bb01d>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 8\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[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 9\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mj\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;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mm\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---> 10\u001b[0;31m \u001b[0momega\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[0mx\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mi\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0my\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[0m\u001b[1;32m 11\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0momega\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mis_regular_on_U0\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0momega\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mis_regular_on_Uinfty\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[1;32m 12\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0momega\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
||||||
|
"\u001b[0;31mNameError\u001b[0m: name 'y' is not defined"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
Loading…
Reference in New Issue
Block a user