przed powrotem obliczania bazy do srodka klasy

This commit is contained in:
jgarnek 2022-10-10 16:09:01 +00:00
parent 15036ab49f
commit 4277b74355
3 changed files with 208 additions and 28 deletions

View File

@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 110,
"execution_count": 1,
"metadata": {
"collapsed": false
},
@ -79,7 +79,7 @@
},
{
"cell_type": "code",
"execution_count": 99,
"execution_count": 2,
"metadata": {
"collapsed": false
},
@ -203,22 +203,20 @@
" C = self.curve\n",
" g1 = self.function\n",
" g2 = other.function\n",
" g = reduction(C, g1 + g2)\n",
" return superelliptic_function(C, g)\n",
" return superelliptic_function(C, g1+g2)\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",
" return superelliptic_function(C, g1 - g2)\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",
" #g = reduction(C, g1 * g2)\n",
" return superelliptic_function(C, g1*g2)\n",
" \n",
" def __truediv__(self, other):\n",
" C = self.curve\n",
@ -232,13 +230,14 @@
" m = C.exponent\n",
" p = C.characteristic\n",
" g = self.function\n",
" RXy.<X, y> = PolynomialRing(QQ, 2)\n",
" FXy = FractionField(RXy)\n",
" g = RXy(g)\n",
" RxXy.<x, X, y> = PolynomialRing(QQ, 3)\n",
" FxXy = FractionField(RXy)\n",
" g = RxXy(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))*X^(-(p-1))/p\n",
" return superelliptic_form(C, A+B)\n",
" A1 = 0\n",
" return superelliptic_form(C, A+A1+B)\n",
" \n",
"class superelliptic_form:\n",
" def __init__(self, C, g):\n",
@ -484,25 +483,18 @@
},
{
"cell_type": "code",
"execution_count": 109,
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"-720*X^9 - 15312*X^7 - 107160*X^5 + x^3 - 249984*X^3 - x\n"
]
},
{
"data": {
"text/plain": [
"6*X^7 + 3*X^5 + x^3 + 8*x"
"6*X^2 + x + 3*X + 8"
]
},
"execution_count": 109,
"execution_count": 4,
"metadata": {
},
"output_type": "execute_result"
@ -510,7 +502,7 @@
],
"source": [
"Rx.<x> = PolynomialRing(QQ)\n",
"f = Rx(x^3 - x)\n",
"f = Rx(x - 1)\n",
"teichmuller(f)"
]
},

View File

@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 8,
"metadata": {
"collapsed": false
},
@ -160,8 +160,12 @@
" M[i, :] = v\n",
" return M \n",
" \n",
" def p_rank(self):\n",
" return self.cartier_matrix().rank()\n",
"# def p_rank(self):\n",
"# return self.cartier_matrix().rank()\n",
" \n",
" def a_number(self):\n",
" g = C.genus()\n",
" return g - self.cartier_matrix().rank()\n",
" \n",
" def final_type(self, test = 0):\n",
" F = self.frobenius_matrix()\n",
@ -2496,6 +2500,161 @@
"o4"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"m = 2\n",
"p = 3\n",
"R.<x> = PolynomialRing(GF(p))\n",
"f = x^3 - x\n",
"C = superelliptic(f, m, p)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"g = f(x^3 - x)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"x^9 + x^3 + x"
]
},
"execution_count": 7,
"metadata": {
},
"output_type": "execute_result"
}
],
"source": [
"g"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"C1 = superelliptic(g, m, p)"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"Superelliptic curve with the equation y^2 = x^9 + x^3 + x over finite field with 3 elements."
]
},
"execution_count": 9,
"metadata": {
},
"output_type": "execute_result"
}
],
"source": [
"C1"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"[((1/y) dx, 0, (1/y) dx),\n",
" ((x/y) dx, 0, (x/y) dx),\n",
" ((x^2/y) dx, 0, (x^2/y) dx),\n",
" ((x^3/y) dx, 0, (x^3/y) dx),\n",
" (((x^7 + x)/y) dx, 2/x*y, (1/(x*y)) dx),\n",
" (((-x^6 - 1)/y) dx, 2/x^2*y, 0 dx),\n",
" (0 dx, 2/x^3*y, ((-1)/(x^3*y)) dx),\n",
" ((x^4/y) dx, 2/x^4*y, ((-x^2 + 1)/(x^4*y)) dx)]"
]
},
"execution_count": 10,
"metadata": {
},
"output_type": "execute_result"
}
],
"source": [
"C1.basis_de_rham"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"p = 5\n",
"R.<x> = PolynomialRing(GF(p))\n",
"m = 3\n",
"f = x^4 + x + 1\n",
"C = superelliptic(f, m, p)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"1"
]
},
"execution_count": 10,
"metadata": {
},
"output_type": "execute_result"
}
],
"source": [
"C.a_number()"
]
},
{
"cell_type": "code",
"execution_count": 0,
@ -2515,7 +2674,7 @@
"metadata": {
"cocalc": {
"description": "Open-source mathematical software system",
"priority": 10,
"priority": 1,
"url": "https://www.sagemath.org/"
}
},

View File

@ -1116,6 +1116,35 @@
"E = EllipticCurve(GF(3), [1,1])"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"[2 0]\n",
"[2 0]"
]
},
"execution_count": 2,
"metadata": {
},
"output_type": "execute_result"
}
],
"source": [
"p = 5\n",
"R.<x> = PolynomialRing(GF(p))\n",
"f = x^3 + x + 1\n",
"m = 2\n",
"C = superelliptic(f, m, p)\n",
"C.verschiebung_matrix()"
]
},
{
"cell_type": "code",
"execution_count": 0,
@ -1135,7 +1164,7 @@
"metadata": {
"cocalc": {
"description": "Open-source mathematical software system",
"priority": 10,
"priority": 1,
"url": "https://www.sagemath.org/"
}
},