probujemy dodac Xp zamiast x
This commit is contained in:
parent
549609e2e0
commit
4bc545d6ab
@ -2,7 +2,7 @@
|
|||||||
"cells": [
|
"cells": [
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 28,
|
"execution_count": 61,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"collapsed": false
|
"collapsed": false
|
||||||
},
|
},
|
||||||
@ -55,34 +55,434 @@
|
|||||||
" coeffs = f.coefficients(sparse=false)\n",
|
" coeffs = f.coefficients(sparse=false)\n",
|
||||||
" for i in range(0, len(coeffs)):\n",
|
" for i in range(0, len(coeffs)):\n",
|
||||||
" ff -= coeffs[i]*witt([Rx(x^i), 0])\n",
|
" ff -= coeffs[i]*witt([Rx(x^i), 0])\n",
|
||||||
" print(ff)\n",
|
|
||||||
" f1 = sum(coeffs[i]*RXp(Xp^(3*i)) for i in range(0, len(coeffs))) + p*RXp(ff.coordinates[1](x = Xp))\n",
|
" f1 = sum(coeffs[i]*RXp(Xp^(3*i)) for i in range(0, len(coeffs))) + p*RXp(ff.coordinates[1](x = Xp))\n",
|
||||||
" RXp.<Xp> = PolynomialRing(Integers(p^2))\n",
|
" #RXp.<Xp> = PolynomialRing(Integers(p^2))\n",
|
||||||
" f1 = RXp(f1)\n",
|
" #f1 = RXp(f1)\n",
|
||||||
" return f1"
|
" return f1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 29,
|
"execution_count": 72,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"collapsed": false
|
"collapsed": false
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
],
|
||||||
"name": "stdout",
|
"source": [
|
||||||
"output_type": "stream",
|
"def basis_de_rham_degrees(f, m, p):\n",
|
||||||
"text": [
|
" r = f.degree()\n",
|
||||||
"[0, -x^7 + x^5]\n"
|
" delta = GCD(r, m)\n",
|
||||||
|
" Rx.<x> = PolynomialRing(QQ)\n",
|
||||||
|
" Rxy.<x, y> = PolynomialRing(QQ, 2)\n",
|
||||||
|
" Fxy = FractionField(Rxy)\n",
|
||||||
|
" basis_holo = holomorphic_differentials_basis(f, m, p)\n",
|
||||||
|
" basis = []\n",
|
||||||
|
" for k in range(0, len(basis_holo)):\n",
|
||||||
|
" basis += [(basis_holo[k], Rx(0))]\n",
|
||||||
|
"\n",
|
||||||
|
" ## non-holomorphic elts of H^1_dR\n",
|
||||||
|
" t = len(basis)\n",
|
||||||
|
" degrees0 = {}\n",
|
||||||
|
" degrees1 = {}\n",
|
||||||
|
" for j in range(1, m):\n",
|
||||||
|
" for i in range(1, r):\n",
|
||||||
|
" if (r*(m-j) - m*i >= delta): \n",
|
||||||
|
" s = Rx(m-j)*Rx(x)*Rx(f.derivative()) - Rx(m)*Rx(i)*f\n",
|
||||||
|
" psi = Rx(cut(s, i))\n",
|
||||||
|
" basis += [(Fxy(psi/y^j), Fxy(m*y^(m-j)/x^i))]\n",
|
||||||
|
" degrees0[t] = (psi.degree(), j)\n",
|
||||||
|
" degrees1[t] = (-i, m-j)\n",
|
||||||
|
" t += 1\n",
|
||||||
|
" RXpy.<Xp, y> = PolynomialRing(QQ, 2)\n",
|
||||||
|
" FXpy = FractionField(RXpy)\n",
|
||||||
|
" basis = [(a[0](x = Xp^p, y = y), a[1](x = Xp^p, y = y)) for a in basis]\n",
|
||||||
|
" return basis, degrees0, degrees1\n",
|
||||||
|
"\n",
|
||||||
|
"def de_rham_basis(f, m, p):\n",
|
||||||
|
" basis, degrees0, degrees1 = basis_de_rham_degrees(f, m, p)\n",
|
||||||
|
" return basis\n",
|
||||||
|
"\n",
|
||||||
|
"def degrees_de_rham0(f, m, p):\n",
|
||||||
|
" basis, degrees0, degrees1 = basis_de_rham_degrees(f, m, p)\n",
|
||||||
|
" return degrees0\n",
|
||||||
|
"\n",
|
||||||
|
"def degrees_de_rham1(f, m, p):\n",
|
||||||
|
" basis, degrees0, degrees1 = basis_de_rham_degrees(f, m, p)\n",
|
||||||
|
" return degrees1\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"class superelliptic:\n",
|
||||||
|
" \n",
|
||||||
|
" def __init__(self, f, m, p):\n",
|
||||||
|
" Rx.<x> = PolynomialRing(QQ)\n",
|
||||||
|
" Rxy.<x, y> = PolynomialRing(QQ, 2)\n",
|
||||||
|
" Fxy = FractionField(Rxy)\n",
|
||||||
|
" self.polynomial = Rx(f)\n",
|
||||||
|
" self.exponent = m\n",
|
||||||
|
" self.characteristic = p\n",
|
||||||
|
" \n",
|
||||||
|
" r = Rx(f).degree()\n",
|
||||||
|
" delta = GCD(r, m)\n",
|
||||||
|
" self.degree_holo = degrees_holomorphic_differentials(f, m, p)\n",
|
||||||
|
" self.degree_de_rham0 = degrees_de_rham0(f, m, p)\n",
|
||||||
|
" self.degree_de_rham1 = degrees_de_rham1(f, m, p)\n",
|
||||||
|
" \n",
|
||||||
|
" holo_basis = holomorphic_differentials_basis(f, m, p)\n",
|
||||||
|
" holo_basis_converted = []\n",
|
||||||
|
" for a in holo_basis:\n",
|
||||||
|
" holo_basis_converted += [superelliptic_form(self, a)]\n",
|
||||||
|
" \n",
|
||||||
|
" self.basis_holomorphic_differentials = holo_basis_converted\n",
|
||||||
|
" \n",
|
||||||
|
"\n",
|
||||||
|
" dr_basis = de_rham_basis(f, m, p)\n",
|
||||||
|
" dr_basis_converted = []\n",
|
||||||
|
" for (a, b) in dr_basis:\n",
|
||||||
|
" dr_basis_converted += [superelliptic_cech(self, superelliptic_form(self, a), superelliptic_function(self, b))]\n",
|
||||||
|
" \n",
|
||||||
|
" self.basis_de_rham = dr_basis_converted\n",
|
||||||
|
" \n",
|
||||||
|
" 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",
|
||||||
|
" \n",
|
||||||
|
" def is_smooth(self):\n",
|
||||||
|
" f = self.polynomial\n",
|
||||||
|
" if f.discriminant() == 0:\n",
|
||||||
|
" return 0\n",
|
||||||
|
" return 1\n",
|
||||||
|
" \n",
|
||||||
|
" def genus(self):\n",
|
||||||
|
" r = self.polynomial.degree()\n",
|
||||||
|
" m = self.exponent\n",
|
||||||
|
" delta = GCD(r, m)\n",
|
||||||
|
" return 1/2*((r-1)*(m-1) - delta + 1)\n",
|
||||||
|
" \n",
|
||||||
|
"class superelliptic_function:\n",
|
||||||
|
" def __init__(self, C, g):\n",
|
||||||
|
" p = C.characteristic\n",
|
||||||
|
" RXpy.<Xp, y> = PolynomialRing(QQ, 2)\n",
|
||||||
|
" FXpy = FractionField(RXpy)\n",
|
||||||
|
" f = C.polynomial\n",
|
||||||
|
" r = f.degree()\n",
|
||||||
|
" m = C.exponent\n",
|
||||||
|
" \n",
|
||||||
|
" self.curve = C\n",
|
||||||
|
" self.function = g\n",
|
||||||
|
" \n",
|
||||||
|
" def __repr__(self):\n",
|
||||||
|
" return str(self.function)\n",
|
||||||
|
" \n",
|
||||||
|
" def jth_component(self, j):\n",
|
||||||
|
" g = self.function\n",
|
||||||
|
" C = self.curve\n",
|
||||||
|
" p = C.characteristic\n",
|
||||||
|
" RXp.<Xp> = PolynomialRing(GF(p))\n",
|
||||||
|
" FXp.<x> = FractionField(RXp)\n",
|
||||||
|
" FXpRy.<y> = PolynomialRing(FXp)\n",
|
||||||
|
" g = FXpRy(g)\n",
|
||||||
|
" return coff(g, j)\n",
|
||||||
|
" \n",
|
||||||
|
" def __add__(self, other):\n",
|
||||||
|
" C = self.curve\n",
|
||||||
|
" g1 = self.function\n",
|
||||||
|
" g2 = other.function\n",
|
||||||
|
" g = reduction(C, g1 + g2)\n",
|
||||||
|
" return superelliptic_function(C, g)\n",
|
||||||
|
" \n",
|
||||||
|
" def __sub__(self, other):\n",
|
||||||
|
" C = self.curve\n",
|
||||||
|
" g1 = self.function\n",
|
||||||
|
" g2 = other.function\n",
|
||||||
|
" g = reduction(C, g1 - g2)\n",
|
||||||
|
" return superelliptic_function(C, g)\n",
|
||||||
|
" \n",
|
||||||
|
" def __mul__(self, other):\n",
|
||||||
|
" C = self.curve\n",
|
||||||
|
" g1 = self.function\n",
|
||||||
|
" g2 = other.function\n",
|
||||||
|
" g = reduction(C, g1 * g2)\n",
|
||||||
|
" return superelliptic_function(C, g)\n",
|
||||||
|
" \n",
|
||||||
|
" def __truediv__(self, other):\n",
|
||||||
|
" C = self.curve\n",
|
||||||
|
" g1 = self.function\n",
|
||||||
|
" g2 = other.function\n",
|
||||||
|
" return superelliptic_function(C, g1 / g2)\n",
|
||||||
|
" \n",
|
||||||
|
"def diffn(self):\n",
|
||||||
|
" C = self.curve\n",
|
||||||
|
" f = C.polynomial\n",
|
||||||
|
" m = C.exponent\n",
|
||||||
|
" p = C.characteristic\n",
|
||||||
|
" g = self.function\n",
|
||||||
|
" RXpy.<Xp, y> = PolynomialRing(QQ, 2)\n",
|
||||||
|
" FXpy = FractionField(RXpy)\n",
|
||||||
|
" g = RXpy(g)\n",
|
||||||
|
" A = g.derivative(Xp)*Xp^(-(p-1))/p\n",
|
||||||
|
" t = teichmuller(f)\n",
|
||||||
|
" B = g.derivative(y)*t.derivative()/(m*y^(m-1))*Xp^(-(p-1))/p\n",
|
||||||
|
" return superelliptic_form(C, A+B)\n",
|
||||||
|
" \n",
|
||||||
|
"class superelliptic_form:\n",
|
||||||
|
" def __init__(self, C, g):\n",
|
||||||
|
" p = C.characteristic\n",
|
||||||
|
" Rxy.<x, y> = PolynomialRing(QQ, 2)\n",
|
||||||
|
" Fxy = FractionField(Rxy)\n",
|
||||||
|
" g = Fxy(reduction_form(C, g))\n",
|
||||||
|
" self.form = g\n",
|
||||||
|
" self.curve = C \n",
|
||||||
|
" \n",
|
||||||
|
" def __add__(self, other):\n",
|
||||||
|
" C = self.curve\n",
|
||||||
|
" g1 = self.form\n",
|
||||||
|
" g2 = other.form\n",
|
||||||
|
" g = reduction(C, g1 + g2)\n",
|
||||||
|
" return superelliptic_form(C, g)\n",
|
||||||
|
" \n",
|
||||||
|
" def __sub__(self, other):\n",
|
||||||
|
" C = self.curve\n",
|
||||||
|
" g1 = self.form\n",
|
||||||
|
" g2 = other.form\n",
|
||||||
|
" g = reduction(C, g1 - g2)\n",
|
||||||
|
" return superelliptic_form(C, g)\n",
|
||||||
|
" \n",
|
||||||
|
" def __repr__(self):\n",
|
||||||
|
" g = self.form\n",
|
||||||
|
" if len(str(g)) == 1:\n",
|
||||||
|
" return str(g) + ' dx'\n",
|
||||||
|
" return '('+str(g) + ') dx'\n",
|
||||||
|
"\n",
|
||||||
|
" def __rmul__(self, constant):\n",
|
||||||
|
" C = self.curve\n",
|
||||||
|
" omega = self.form\n",
|
||||||
|
" return superelliptic_form(C, constant*omega) \n",
|
||||||
|
"\n",
|
||||||
|
" \n",
|
||||||
|
" def coordinates(self):\n",
|
||||||
|
" C = self.curve\n",
|
||||||
|
" p = C.characteristic\n",
|
||||||
|
" m = C.exponent\n",
|
||||||
|
" Rx.<x> = PolynomialRing(QQ)\n",
|
||||||
|
" Fx = FractionField(Rx)\n",
|
||||||
|
" FxRy.<y> = PolynomialRing(Fx)\n",
|
||||||
|
" g = C.genus()\n",
|
||||||
|
" degrees_holo = C.degree_holo\n",
|
||||||
|
" degrees_holo_inv = {b:a for a, b in degrees_holo.items()}\n",
|
||||||
|
" basis = C.basis_holomorphic_differentials\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",
|
||||||
|
" 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",
|
||||||
|
" elt = self - (a/a1)*basis[index]\n",
|
||||||
|
" return elt.coordinates() + a/a1*vector([QQ(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.<x> = PolynomialRing(QQ)\n",
|
||||||
|
" Fx = FractionField(Rx)\n",
|
||||||
|
" FxRy.<y> = PolynomialRing(Fx)\n",
|
||||||
|
" Fxy = FractionField(FxRy)\n",
|
||||||
|
" Ryinv.<y_inv> = PolynomialRing(Fx)\n",
|
||||||
|
" g = Fxy(g)\n",
|
||||||
|
" g = g(y = 1/y_inv)\n",
|
||||||
|
" g = Ryinv(g)\n",
|
||||||
|
" return coff(g, j)\n",
|
||||||
|
" \n",
|
||||||
|
" def is_regular_on_U0(self):\n",
|
||||||
|
" C = self.curve\n",
|
||||||
|
" p = C.characteristic\n",
|
||||||
|
" m = C.exponent\n",
|
||||||
|
" Rx.<x> = PolynomialRing(QQ)\n",
|
||||||
|
" for j in range(1, m):\n",
|
||||||
|
" if self.jth_component(j) not in Rx:\n",
|
||||||
|
" return 0\n",
|
||||||
|
" return 1\n",
|
||||||
|
" \n",
|
||||||
|
" def is_regular_on_Uinfty(self):\n",
|
||||||
|
" C = self.curve\n",
|
||||||
|
" p = C.characteristic\n",
|
||||||
|
" m = C.exponent\n",
|
||||||
|
" f = C.polynomial\n",
|
||||||
|
" r = f.degree()\n",
|
||||||
|
" delta = GCD(m, r)\n",
|
||||||
|
" M = m/delta\n",
|
||||||
|
" R = r/delta\n",
|
||||||
|
" \n",
|
||||||
|
" for j in range(1, m):\n",
|
||||||
|
" A = self.jth_component(j)\n",
|
||||||
|
" d = degree_of_rational_fctn(A, p)\n",
|
||||||
|
" if(-d*M + j*R -(M+1)<0):\n",
|
||||||
|
" return 0\n",
|
||||||
|
" return 1\n",
|
||||||
|
" \n",
|
||||||
|
" \n",
|
||||||
|
"class superelliptic_cech:\n",
|
||||||
|
" def __init__(self, C, omega, fct):\n",
|
||||||
|
" self.omega0 = omega\n",
|
||||||
|
" self.omega8 = omega - diffn(fct)\n",
|
||||||
|
" self.f = fct\n",
|
||||||
|
" self.curve = C\n",
|
||||||
|
" \n",
|
||||||
|
" def __add__(self, other):\n",
|
||||||
|
" C = self.curve\n",
|
||||||
|
" return superelliptic_cech(C, self.omega0 + other.omega0, self.f + other.f)\n",
|
||||||
|
" \n",
|
||||||
|
" def __sub__(self, other):\n",
|
||||||
|
" C = self.curve\n",
|
||||||
|
" return superelliptic_cech(C, self.omega0 - other.omega0, self.f - other.f)\n",
|
||||||
|
"\n",
|
||||||
|
" def __rmul__(self, constant):\n",
|
||||||
|
" C = self.curve\n",
|
||||||
|
" w1 = self.omega0.form\n",
|
||||||
|
" f1 = self.f.function\n",
|
||||||
|
" w2 = superelliptic_form(C, constant*w1)\n",
|
||||||
|
" f2 = superelliptic_function(C, constant*f1)\n",
|
||||||
|
" return superelliptic_cech(C, w2, f2) \n",
|
||||||
|
" \n",
|
||||||
|
" def __repr__(self):\n",
|
||||||
|
" return \"(\" + str(self.omega0) + \", \" + str(self.f) + \", \" + str(self.omega8) + \")\" \n",
|
||||||
|
"\n",
|
||||||
|
" def coordinates(self):\n",
|
||||||
|
" C = self.curve\n",
|
||||||
|
" p = C.characteristic\n",
|
||||||
|
" m = C.exponent\n",
|
||||||
|
" Rx.<x> = PolynomialRing(QQ)\n",
|
||||||
|
" Fx = FractionField(Rx)\n",
|
||||||
|
" FxRy.<y> = PolynomialRing(Fx)\n",
|
||||||
|
" g = C.genus()\n",
|
||||||
|
" degrees_holo = C.degree_holo\n",
|
||||||
|
" degrees_holo_inv = {b:a for a, b in degrees_holo.items()}\n",
|
||||||
|
" degrees0 = C.degree_de_rham0\n",
|
||||||
|
" degrees0_inv = {b:a for a, b in degrees0.items()}\n",
|
||||||
|
" degrees1 = C.degree_de_rham1\n",
|
||||||
|
" degrees1_inv = {b:a for a, b in degrees1.items()}\n",
|
||||||
|
" basis = C.basis_de_rham\n",
|
||||||
|
" \n",
|
||||||
|
" omega = self.omega0\n",
|
||||||
|
" fct = self.f\n",
|
||||||
|
" \n",
|
||||||
|
" if fct.function == Rx(0) and omega.form != Rx(0):\n",
|
||||||
|
" 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",
|
||||||
|
" 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",
|
||||||
|
" elt = self - (a/a1)*basis[index]\n",
|
||||||
|
" return elt.coordinates() + a/a1*vector([QQ(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",
|
||||||
|
" if (fct_j != Rx(0)):\n",
|
||||||
|
" d = degree_of_rational_fctn(fct_j, p)\n",
|
||||||
|
" \n",
|
||||||
|
" if (d, j) in degrees1.values():\n",
|
||||||
|
" index = degrees1_inv[(d, j)]\n",
|
||||||
|
" a = coeff_of_rational_fctn(fct_j, p)\n",
|
||||||
|
" elt = self - (a/m)*basis[index]\n",
|
||||||
|
" return elt.coordinates() + a/m*vector([QQ(i == index) for i in range(0, 2*g)])\n",
|
||||||
|
" \n",
|
||||||
|
" if d<0:\n",
|
||||||
|
" a = coeff_of_rational_fctn(fct_j, p)\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",
|
||||||
|
" elt =self - a*superelliptic_cech(C, diffn(G), G)\n",
|
||||||
|
" return elt.coordinates()\n",
|
||||||
|
"\n",
|
||||||
|
" return vector(2*g*[0])\n",
|
||||||
|
" \n",
|
||||||
|
" def is_cocycle(self):\n",
|
||||||
|
" w0 = self.omega0\n",
|
||||||
|
" w8 = self.omega8\n",
|
||||||
|
" fct = self.f\n",
|
||||||
|
" if not w0.is_regular_on_U0() and not w8.is_regular_on_Uinfty():\n",
|
||||||
|
" return('w0 & w8')\n",
|
||||||
|
" if not w0.is_regular_on_U0():\n",
|
||||||
|
" return('w0')\n",
|
||||||
|
" if not w8.is_regular_on_Uinfty():\n",
|
||||||
|
" return('w8')\n",
|
||||||
|
" if w0.is_regular_on_U0() and w8.is_regular_on_Uinfty():\n",
|
||||||
|
" return 1\n",
|
||||||
|
" return 0\n",
|
||||||
|
" \n",
|
||||||
|
"def degree_of_rational_fctn(f, p):\n",
|
||||||
|
" Rx.<x> = PolynomialRing(QQ)\n",
|
||||||
|
" Fx = FractionField(Rx)\n",
|
||||||
|
" f = Fx(f)\n",
|
||||||
|
" f1 = f.numerator()\n",
|
||||||
|
" f2 = f.denominator()\n",
|
||||||
|
" d1 = f1.degree()\n",
|
||||||
|
" d2 = f2.degree()\n",
|
||||||
|
" return(d1 - d2)\n",
|
||||||
|
"\n",
|
||||||
|
"def coeff_of_rational_fctn(f, p):\n",
|
||||||
|
" Rx.<x> = PolynomialRing(QQ)\n",
|
||||||
|
" Fx = FractionField(Rx)\n",
|
||||||
|
" f = Fx(f)\n",
|
||||||
|
" if f == Rx(0):\n",
|
||||||
|
" return 0\n",
|
||||||
|
" f1 = f.numerator()\n",
|
||||||
|
" f2 = f.denominator()\n",
|
||||||
|
" d1 = f1.degree()\n",
|
||||||
|
" d2 = f2.degree()\n",
|
||||||
|
" a1 = f1.coefficients(sparse = false)[d1]\n",
|
||||||
|
" a2 = f2.coefficients(sparse = false)[d2]\n",
|
||||||
|
" return(a1/a2)\n",
|
||||||
|
"\n",
|
||||||
|
"def coff(f, d):\n",
|
||||||
|
" lista = f.coefficients(sparse = false)\n",
|
||||||
|
" if len(lista) <= d:\n",
|
||||||
|
" return 0\n",
|
||||||
|
" return lista[d]\n",
|
||||||
|
"\n",
|
||||||
|
"def cut(f, i):\n",
|
||||||
|
" R = f.parent()\n",
|
||||||
|
" coeff = f.coefficients(sparse = false)\n",
|
||||||
|
" 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.<x> = PolynomialRing(QQ)\n",
|
||||||
|
" h = Rx(h)\n",
|
||||||
|
" result = Rx(0)\n",
|
||||||
|
" for i in range(0, h.degree()+1):\n",
|
||||||
|
" if (i%p) == p-1:\n",
|
||||||
|
" power = Integer((i-(p-1))/p)\n",
|
||||||
|
" result += Integer(h[i]) * x^(power) \n",
|
||||||
|
" return result"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 39,
|
||||||
|
"metadata": {
|
||||||
|
"collapsed": false
|
||||||
|
},
|
||||||
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"Xp^9 + 6*Xp^7 + 3*Xp^5 + 8*Xp^3"
|
"Xp^9 + 6*Xp^7 + 3*Xp^5 + 8*Xp^3"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 29,
|
"execution_count": 39,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
},
|
},
|
||||||
"output_type": "execute_result"
|
"output_type": "execute_result"
|
||||||
@ -96,19 +496,36 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 11,
|
"execution_count": 73,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"collapsed": false
|
"collapsed": false
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
|
{
|
||||||
|
"ename": "TypeError",
|
||||||
|
"evalue": "unsupported operand parent(s) for *: 'Multivariate Polynomial Ring in Xp, y over Rational Field' and 'Univariate Polynomial Ring in Xp over Ring of integers modulo 9'",
|
||||||
|
"output_type": "error",
|
||||||
|
"traceback": [
|
||||||
|
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
||||||
|
"\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)",
|
||||||
|
"\u001b[0;32m/tmp/ipykernel_1111/3447231159.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0mRx\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mPolynomialRing\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mQQ\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[0;32m----> 2\u001b[0;31m \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;36m3\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_1111/3436947063.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, f, m, p)\u001b[0m\n\u001b[1;32m 68\u001b[0m \u001b[0mdr_basis_converted\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 69\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0ma\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mb\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mdr_basis\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 70\u001b[0;31m \u001b[0mdr_basis_converted\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[0ma\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[0mb\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 71\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 72\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbasis_de_rham\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdr_basis_converted\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
||||||
|
"\u001b[0;32m/tmp/ipykernel_1111/3436947063.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, C, omega, fct)\u001b[0m\n\u001b[1;32m 260\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m__init__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\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[0mfct\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 261\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0momega0\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0momega\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 262\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0momega8\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0momega\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0mdiffn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfct\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 263\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mf\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfct\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 264\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_1111/3436947063.py\u001b[0m in \u001b[0;36mdiffn\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 153\u001b[0m \u001b[0mA\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mg\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mderivative\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mXp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mXp\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mp\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[0;34m/\u001b[0m\u001b[0mp\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 154\u001b[0m \u001b[0mt\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mteichmuller\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[0;32m--> 155\u001b[0;31m \u001b[0mB\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mg\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mderivative\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0my\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mt\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[0mm\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0my\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;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mXp\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mp\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[0;34m/\u001b[0m\u001b[0mp\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 156\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0msuperelliptic_form\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mC\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mA\u001b[0m\u001b[0;34m+\u001b[0m\u001b[0mB\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 157\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.__mul__ (build/cythonized/sage/structure/element.c:12253)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1514\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[0mleft\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_mul_\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mright\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1515\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-> 1516\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 1517\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1518\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/ext/sage/9.5/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/structure/coerce.pyx\u001b[0m in \u001b[0;36msage.structure.coerce.CoercionModel.bin_op (build/cythonized/sage/structure/coerce.c:11751)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1246\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[0m\n\u001b[1;32m 1247\u001b[0m \u001b[0;31m# This causes so much headache.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1248\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 1249\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1250\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 *: 'Multivariate Polynomial Ring in Xp, y over Rational Field' and 'Univariate Polynomial Ring in Xp over Ring of integers modulo 9'"
|
||||||
|
]
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"f = Rx(x^3 - x)"
|
"Rx.<x> = PolynomialRing(QQ)\n",
|
||||||
|
"C = superelliptic(x^3 - x, 2, 3)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 13,
|
"execution_count": 58,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"collapsed": false
|
"collapsed": false
|
||||||
},
|
},
|
||||||
@ -116,17 +533,133 @@
|
|||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"[0, -1, 0, 1]"
|
"[((1/y) dx, 0, (1/y) dx), ((x/y) dx, 2/x*y, ((-1)/(x*y)) dx)]"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 13,
|
"execution_count": 58,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
},
|
},
|
||||||
"output_type": "execute_result"
|
"output_type": "execute_result"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"f.coefficients(sparse=false)"
|
"C.basis_de_rham"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 52,
|
||||||
|
"metadata": {
|
||||||
|
"collapsed": false
|
||||||
|
},
|
||||||
|
"outputs": [
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"g = basis_de_rham_degrees(x^3 - x, 2, 3)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 54,
|
||||||
|
"metadata": {
|
||||||
|
"collapsed": false
|
||||||
|
},
|
||||||
|
"outputs": [
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"RXpy.<Xp, y> = PolynomialRing(QQ, 2)\n",
|
||||||
|
"FXpy = FractionField(RXpy)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 55,
|
||||||
|
"metadata": {
|
||||||
|
"collapsed": false
|
||||||
|
},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"data": {
|
||||||
|
"text/plain": [
|
||||||
|
"2*y/Xp^3"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"execution_count": 55,
|
||||||
|
"metadata": {
|
||||||
|
},
|
||||||
|
"output_type": "execute_result"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"g(x = Xp^p, y = y)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 68,
|
||||||
|
"metadata": {
|
||||||
|
"collapsed": false
|
||||||
|
},
|
||||||
|
"outputs": [
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"t = teichmuller(x^3 - x)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 71,
|
||||||
|
"metadata": {
|
||||||
|
"collapsed": false
|
||||||
|
},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"data": {
|
||||||
|
"text/plain": [
|
||||||
|
"6*Xp^6 + 6*Xp^4 + 6*Xp^2"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"execution_count": 71,
|
||||||
|
"metadata": {
|
||||||
|
},
|
||||||
|
"output_type": "execute_result"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"t.derivative()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 70,
|
||||||
|
"metadata": {
|
||||||
|
"collapsed": false
|
||||||
|
},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"ename": "ValueError",
|
||||||
|
"evalue": "cannot differentiate with respect to Xp",
|
||||||
|
"output_type": "error",
|
||||||
|
"traceback": [
|
||||||
|
"\u001b[0;31m---------------------------------------------------------------------------\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/polynomial/polynomial_element.pyx\u001b[0m in \u001b[0;36msage.rings.polynomial.polynomial_element.Polynomial._derivative (build/cythonized/sage/rings/polynomial/polynomial_element.c:33685)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 3719\u001b[0m \u001b[0;31m# call _derivative() recursively on coefficients\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 3720\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_parent\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mcoeff\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_derivative\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvar\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mcoeff\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlist\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mFalse\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 3721\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mAttributeError\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:2633)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 360\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--> 361\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 362\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[0;31mAttributeError\u001b[0m: 'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_libsingular' object has no attribute '__custom_name'",
|
||||||
|
"\nDuring handling of the above exception, another exception occurred:\n",
|
||||||
|
"\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)",
|
||||||
|
"\u001b[0;32m/tmp/ipykernel_1111/125743461.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdifferentiate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mXp\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/ext/sage/9.5/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/rings/polynomial/polynomial_element.pyx\u001b[0m in \u001b[0;36msage.rings.polynomial.polynomial_element.Polynomial.derivative (build/cythonized/sage/rings/polynomial/polynomial_element.c:33473)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 3596\u001b[0m \u001b[0;36m4\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mt\u001b[0m\u001b[0;34m^\u001b[0m\u001b[0;36m3\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m^\u001b[0m\u001b[0;36m3\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0;36m3\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mt\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;36m2\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3597\u001b[0m \"\"\"\n\u001b[0;32m-> 3598\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mmulti_derivative\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\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[0m\n\u001b[0m\u001b[1;32m 3599\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3600\u001b[0m \u001b[0;31m# add .diff(), .differentiate() as aliases for .derivative()\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/misc/derivative.pyx\u001b[0m in \u001b[0;36msage.misc.derivative.multi_derivative (build/cythonized/sage/misc/derivative.c:3218)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 220\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 221\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0marg\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mderivative_parse\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[0m\n\u001b[0;32m--> 222\u001b[0;31m \u001b[0mF\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mF\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_derivative\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0marg\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 223\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mF\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 224\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/polynomial_element.pyx\u001b[0m in \u001b[0;36msage.rings.polynomial.polynomial_element.Polynomial._derivative (build/cythonized/sage/rings/polynomial/polynomial_element.c:33782)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 3720\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_parent\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mcoeff\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_derivative\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvar\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mcoeff\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlist\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mFalse\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 3721\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mAttributeError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 3722\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mValueError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34mf'cannot differentiate with respect to {var}'\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 3723\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3724\u001b[0m \u001b[0;31m# compute formal derivative with respect to generator\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
||||||
|
"\u001b[0;31mValueError\u001b[0m: cannot differentiate with respect to Xp"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"t.differentiate(Xp)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user