dodalem_klase fraction polynomial - x oraz X razem
This commit is contained in:
parent
4bc545d6ab
commit
bb63124a4c
@ -2,7 +2,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 61,
|
||||
"execution_count": 83,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
@ -47,15 +47,31 @@
|
||||
" def __sub__(self, other):\n",
|
||||
" return self + (-1)*other\n",
|
||||
"\n",
|
||||
"class fraction_pol:\n",
|
||||
" def __init__(self, g):\n",
|
||||
" RxX.<x, X> = PolynomialRing(QQ)\n",
|
||||
" g = RxX(g)\n",
|
||||
" result = 0\n",
|
||||
" for a in g.monomials():\n",
|
||||
" c = g.coefficient(a)\n",
|
||||
" c = c%9\n",
|
||||
" dX = a.degree(X)\n",
|
||||
" dx = a.degree(x)\n",
|
||||
" if dX%p == 0:\n",
|
||||
" result += c*x^(dX//p + dx)\n",
|
||||
" else:\n",
|
||||
" result += c*X^(dX + dx*p)\n",
|
||||
" self.function = result\n",
|
||||
" \n",
|
||||
"def teichmuller(f):\n",
|
||||
" Rx.<x> = PolynomialRing(QQ)\n",
|
||||
" RXp.<Xp> = PolynomialRing(QQ)\n",
|
||||
" RxX.<x, X> = PolynomialRing(QQ, 2)\n",
|
||||
" f = Rx(f)\n",
|
||||
" ff = witt([f, 0])\n",
|
||||
" coeffs = f.coefficients(sparse=false)\n",
|
||||
" for i in range(0, len(coeffs)):\n",
|
||||
" ff -= coeffs[i]*witt([Rx(x^i), 0])\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]*RxX(x^(i)) for i in range(0, len(coeffs))) + p*RxX(ff.coordinates[1](x = X))\n",
|
||||
" #RXp.<Xp> = PolynomialRing(Integers(p^2))\n",
|
||||
" #f1 = RXp(f1)\n",
|
||||
" return f1"
|
||||
@ -63,7 +79,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 72,
|
||||
"execution_count": 74,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
@ -94,9 +110,6 @@
|
||||
" 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",
|
||||
@ -164,8 +177,8 @@
|
||||
"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",
|
||||
" RxXy.<x, X, y> = PolynomialRing(QQ, 3)\n",
|
||||
" FxXy = FractionField(RXy)\n",
|
||||
" f = C.polynomial\n",
|
||||
" r = f.degree()\n",
|
||||
" m = C.exponent\n",
|
||||
@ -180,10 +193,10 @@
|
||||
" 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",
|
||||
" RxX.<x,X> = PolynomialRing(QQ, 2)\n",
|
||||
" FxX.<x> = FractionField(RxX)\n",
|
||||
" FxXRy.<y> = PolynomialRing(FxX)\n",
|
||||
" g = FxXRy(g)\n",
|
||||
" return coff(g, j)\n",
|
||||
" \n",
|
||||
" def __add__(self, other):\n",
|
||||
@ -219,12 +232,12 @@
|
||||
" 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",
|
||||
" RXy.<X, y> = PolynomialRing(QQ, 2)\n",
|
||||
" FXy = FractionField(RXy)\n",
|
||||
" g = RXy(g)\n",
|
||||
" A = g.derivative(X)*X^(-(p-1))/p\n",
|
||||
" t = teichmuller(f)\n",
|
||||
" B = g.derivative(y)*t.derivative()/(m*y^(m-1))*Xp^(-(p-1))/p\n",
|
||||
" B = g.derivative(y)*t.derivative()/(m*y^(m-1))*X^(-(p-1))/p\n",
|
||||
" return superelliptic_form(C, A+B)\n",
|
||||
" \n",
|
||||
"class superelliptic_form:\n",
|
||||
@ -662,6 +675,76 @@
|
||||
"t.differentiate(Xp)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 75,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"outputs": [
|
||||
],
|
||||
"source": [
|
||||
"RxX.<x, X> = PolynomialRing(QQ)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 76,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"outputs": [
|
||||
],
|
||||
"source": [
|
||||
"g = RxX(x*X + 2*x*X^3)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 82,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"3"
|
||||
]
|
||||
},
|
||||
"execution_count": 82,
|
||||
"metadata": {
|
||||
},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"g.monomials()[0].degree(X)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 78,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"2"
|
||||
]
|
||||
},
|
||||
"execution_count": 78,
|
||||
"metadata": {
|
||||
},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"g.coefficient(x*X^3)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 0,
|
||||
|
Loading…
Reference in New Issue
Block a user