2021-08-18 15:44:03 +02:00
|
|
|
{
|
|
|
|
"cells": [
|
2021-08-18 16:08:25 +02:00
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
2022-05-05 10:48:52 +02:00
|
|
|
"metadata": {
|
|
|
|
"collapsed": false
|
|
|
|
},
|
2021-08-18 16:08:25 +02:00
|
|
|
"source": [
|
|
|
|
"# Theory\n",
|
|
|
|
"Let $C : y^m = f(x)$. Then:\n",
|
|
|
|
"\n",
|
|
|
|
" - the basis of $H^0(C, \\Omega_{C/k})$ is given by:\n",
|
|
|
|
" $$x^{i-1} dx/y^j,$$\n",
|
|
|
|
" where $1 \\le i \\le r-1$, $1 \\le j \\le m-1$, $-mi + rj \\ge \\delta$ and $\\delta := GCD(m, r)$, $r := \\deg f$.\n",
|
|
|
|
" \n",
|
2021-08-19 13:10:23 +02:00
|
|
|
" - the above forms along with\n",
|
|
|
|
" $$\\lambda_{ij} = \\left[ \\left( \\frac{\\psi_{ij} \\, dx}{m x^{i+1} y^{m - j}},\n",
|
|
|
|
" \\frac{-\\phi_{ij} \\, dx}{m x^{i+1} y^{m - j}}, \\frac{y^j}{x^i} \\right) \\right]$$\n",
|
|
|
|
" (where $s_{ij} = jx f'(x) - mi f(x)$, \n",
|
|
|
|
" $\\psi_{ij}(x) = s_{ij}^{\\ge i+1}$,\n",
|
|
|
|
" $\\phi_{ij}(x) = s_{ij}^{< i+1}$)\n",
|
|
|
|
"form a basis of $H^1_{dR}(C/K)$."
|
2021-08-18 16:08:25 +02:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2021-08-23 14:55:37 +02:00
|
|
|
"execution_count": 2,
|
2022-05-05 10:48:52 +02:00
|
|
|
"metadata": {
|
|
|
|
"collapsed": false
|
|
|
|
},
|
|
|
|
"outputs": [
|
|
|
|
],
|
2021-08-18 16:08:25 +02:00
|
|
|
"source": [
|
|
|
|
"# The program computes the basis of holomorphic differentials of y^m = f(x) in char p.\n",
|
|
|
|
"# The coefficient j means that we compute the j-th eigenpart, i.e.\n",
|
|
|
|
"# forms y^j * f(x) dx. Output is [f(x), 0]\n",
|
|
|
|
"\n",
|
|
|
|
"def baza_holo(m, f, j, p):\n",
|
|
|
|
" R.<x> = PolynomialRing(GF(p))\n",
|
|
|
|
" f = R(f)\n",
|
|
|
|
" r = f.degree()\n",
|
|
|
|
" delta = GCD(m, r)\n",
|
|
|
|
" baza = {}\n",
|
|
|
|
" k = 0\n",
|
|
|
|
" for i in range(1, r):\n",
|
|
|
|
" if (r*j - m*i >= delta):\n",
|
2021-08-19 21:59:58 +02:00
|
|
|
" baza[k] = [x^(i-1), R(0), j]\n",
|
2021-08-18 16:08:25 +02:00
|
|
|
" k = k+1\n",
|
|
|
|
" return baza"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2021-08-23 14:55:37 +02:00
|
|
|
"execution_count": 3,
|
2022-05-05 10:48:52 +02:00
|
|
|
"metadata": {
|
|
|
|
"collapsed": false
|
|
|
|
},
|
|
|
|
"outputs": [
|
|
|
|
],
|
2021-08-18 16:08:25 +02:00
|
|
|
"source": [
|
|
|
|
"# The program computes the basis of de Rham cohomology of y^m = f(x) in char p.\n",
|
|
|
|
"# We treat them as pairs [omega, f], where omega is regular on the affine part\n",
|
|
|
|
"# and omega - df is regular on the second atlas.\n",
|
|
|
|
"# The coefficient j means that we compute the j-th eigenpart, i.e.\n",
|
2021-08-19 13:10:23 +02:00
|
|
|
"# [f(x) dx/y^j, y^(m-j)*g(x)]. Output is [f(x), g(x)]\n",
|
2021-08-18 16:08:25 +02:00
|
|
|
"\n",
|
|
|
|
"def baza_dr(m, f, j, p):\n",
|
|
|
|
" R.<x> = PolynomialRing(GF(p))\n",
|
|
|
|
" f = R(f) \n",
|
|
|
|
" r = f.degree()\n",
|
|
|
|
" delta = GCD(m, r)\n",
|
|
|
|
" baza = {}\n",
|
|
|
|
" holo = baza_holo(m, f, j, p)\n",
|
|
|
|
" for k in range(0, len(holo)):\n",
|
|
|
|
" baza[k] = holo[k]\n",
|
|
|
|
" \n",
|
|
|
|
" k = len(baza)\n",
|
|
|
|
" \n",
|
|
|
|
" for i in range(1, r):\n",
|
|
|
|
" if (r*(m-j) - m*i >= delta):\n",
|
|
|
|
" s = R(m-j)*R(x)*R(f.derivative()) - R(m)*R(i)*f\n",
|
|
|
|
" psi = R(obciecie(s, i, p))\n",
|
2021-08-19 21:59:58 +02:00
|
|
|
" baza[k] = [psi, R(m)/x^i, j]\n",
|
2021-08-18 16:08:25 +02:00
|
|
|
" k = k+1\n",
|
|
|
|
" return baza"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2021-08-23 14:55:37 +02:00
|
|
|
"execution_count": 4,
|
2022-05-05 10:48:52 +02:00
|
|
|
"metadata": {
|
|
|
|
"collapsed": false
|
|
|
|
},
|
|
|
|
"outputs": [
|
|
|
|
],
|
2021-08-18 16:08:25 +02:00
|
|
|
"source": [
|
|
|
|
"#auxiliary programs\n",
|
|
|
|
"def stopnie_bazy_holo(m, f, j, p):\n",
|
|
|
|
" baza = baza_holo(m, f, j, p)\n",
|
|
|
|
" stopnie = {}\n",
|
|
|
|
" for k in range(0, len(baza)):\n",
|
|
|
|
" stopnie[k] = baza[k][0].degree()\n",
|
|
|
|
" return stopnie\n",
|
|
|
|
"\n",
|
|
|
|
"def stopnie_bazy_dr(m, f, j, p):\n",
|
|
|
|
" baza = baza_dr(m, f, j, p)\n",
|
|
|
|
" stopnie = {}\n",
|
|
|
|
" for k in range(0, len(baza)):\n",
|
|
|
|
" stopnie[k] = baza[k][0].degree()\n",
|
|
|
|
" return stopnie\n",
|
|
|
|
"\n",
|
|
|
|
"def stopnie_drugiej_wspolrzednej_bazy_dr(m, f, j, p):\n",
|
|
|
|
" baza = baza_dr(m, f, j, p)\n",
|
|
|
|
" stopnie = {}\n",
|
|
|
|
" for k in range(0, len(baza)):\n",
|
|
|
|
" if baza[k][1] != 0:\n",
|
|
|
|
" stopnie[k] = baza[k][1].denominator().degree()\n",
|
|
|
|
" return stopnie\n",
|
|
|
|
"\n",
|
|
|
|
"def obciecie(f, i, p):\n",
|
|
|
|
" R.<x> = PolynomialRing(GF(p))\n",
|
|
|
|
" f = R(f)\n",
|
|
|
|
" coeff = f.coefficients(sparse = false)\n",
|
|
|
|
" return sum(x^(j-i-1) * coeff[j] for j in range(i+1, f.degree() + 1))\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"#Any element [f dx, g] is represented as a combination of the basis vectors.\n",
|
|
|
|
"\n",
|
2021-08-19 21:59:58 +02:00
|
|
|
"def zapis_w_bazie_dr(elt, m, f, p):\n",
|
|
|
|
" j = elt[2]\n",
|
2021-08-18 16:08:25 +02:00
|
|
|
" R.<x> = PolynomialRing(GF(p))\n",
|
2021-08-18 21:16:08 +02:00
|
|
|
" RR = FractionField(R)\n",
|
2021-08-18 20:37:06 +02:00
|
|
|
" f = R(f)\n",
|
2021-08-18 16:08:25 +02:00
|
|
|
" r = f.degree()\n",
|
|
|
|
" delta = GCD(m, r)\n",
|
|
|
|
" baza = baza_dr(m, f, j, p)\n",
|
|
|
|
" wymiar = len(baza)\n",
|
|
|
|
" zapis = vector([GF(p)(0) for i in baza])\n",
|
|
|
|
" stopnie = stopnie_bazy_dr(m, f, j, p)\n",
|
|
|
|
" inv_stopnie = {v: k for k, v in stopnie.items()}\n",
|
|
|
|
" stopnie_holo = stopnie_bazy_holo(m, f, j, p)\n",
|
|
|
|
" inv_stopnie_holo = {v: k for k, v in stopnie_holo.items()} \n",
|
|
|
|
" \n",
|
|
|
|
" ## zmiana\n",
|
|
|
|
" if elt[0]== 0 and elt[1] == 0:\n",
|
|
|
|
" return zapis\n",
|
|
|
|
" \n",
|
|
|
|
" if elt[1] == 0:\n",
|
2021-08-18 20:37:06 +02:00
|
|
|
" elt[0] = R(elt[0])\n",
|
2021-08-18 16:08:25 +02:00
|
|
|
" d = elt[0].degree()\n",
|
|
|
|
" a = elt[0].coefficients(sparse = false)[d]\n",
|
|
|
|
" k = inv_stopnie_holo[d] #ktory element bazy jest stopnia d? ten o indeksie k\n",
|
|
|
|
" \n",
|
|
|
|
" a1 = baza[k][0].coefficients(sparse = false)[d]\n",
|
2021-08-19 21:59:58 +02:00
|
|
|
" elt1 = [R(0),R(0),j]\n",
|
2021-08-18 16:08:25 +02:00
|
|
|
" elt1[0] = elt[0] - a/a1 * baza[k][0]\n",
|
|
|
|
" elt1[1] = R(0)\n",
|
2021-08-19 21:59:58 +02:00
|
|
|
" return zapis_w_bazie_dr(elt1, m, f, p) + vector([a/a1*GF(p)(i == k) for i in range(0, len(baza))])\n",
|
2021-08-18 16:08:25 +02:00
|
|
|
"\n",
|
|
|
|
" g = elt[1]\n",
|
2021-08-19 13:10:23 +02:00
|
|
|
" a = wspolczynnik_wiodacy(g)\n",
|
|
|
|
" d = -stopien_roznica(g)\n",
|
2021-08-18 21:16:08 +02:00
|
|
|
" Rr = r/delta\n",
|
2021-08-19 13:10:23 +02:00
|
|
|
" Mm = m/delta\n",
|
|
|
|
" \n",
|
2021-08-18 21:16:08 +02:00
|
|
|
" stopnie2 = stopnie_drugiej_wspolrzednej_bazy_dr(m, f, j, p)\n",
|
2021-08-19 13:17:24 +02:00
|
|
|
" inv_stopnie2 = {v: k for k, v in stopnie2.items()}\n",
|
2021-08-19 13:10:23 +02:00
|
|
|
" if (d not in stopnie2.values()):\n",
|
2021-08-19 13:17:24 +02:00
|
|
|
" if d> 0:\n",
|
2021-08-19 13:10:23 +02:00
|
|
|
" j1 = m-j\n",
|
2021-08-19 21:59:58 +02:00
|
|
|
" elt1 = [elt[0], RR(elt[1]) - a*1/R(x^d), j]\n",
|
2021-08-18 21:16:08 +02:00
|
|
|
" else:\n",
|
2021-08-19 13:10:23 +02:00
|
|
|
" d1 = -d\n",
|
|
|
|
" j1 = m-j\n",
|
2021-08-19 21:59:58 +02:00
|
|
|
" elt1 = [elt[0] - a*(j1*x^(d1) * f.derivative()/m + d1*f*x^(d1 - 1)), RR(elt[1]) - a*R(x^(d1)), j]\n",
|
|
|
|
" return zapis_w_bazie_dr(elt1, m, f, p)\n",
|
2021-08-18 16:08:25 +02:00
|
|
|
" \n",
|
|
|
|
" k = inv_stopnie2[d]\n",
|
2021-08-19 13:10:23 +02:00
|
|
|
" b = wspolczynnik_wiodacy(baza[k][1])\n",
|
2021-08-19 21:59:58 +02:00
|
|
|
" elt1 = [R(0), R(0), j]\n",
|
2021-08-19 13:10:23 +02:00
|
|
|
" elt1[0] = elt[0] - a/b*baza[k][0]\n",
|
|
|
|
" elt1[1] = elt[1] - a/b*baza[k][1]\n",
|
2021-08-19 21:59:58 +02:00
|
|
|
" return zapis_w_bazie_dr(elt1, m, f, p) + vector([a*GF(p)(i == k) for i in range(0, len(baza))])\n",
|
2021-08-18 16:08:25 +02:00
|
|
|
" \n",
|
|
|
|
" \n",
|
2021-08-19 21:59:58 +02:00
|
|
|
"def zapis_w_bazie_holo(elt, m, f, p):\n",
|
|
|
|
" j = elt[2]\n",
|
2021-08-18 16:08:25 +02:00
|
|
|
" R.<x> = PolynomialRing(GF(p))\n",
|
|
|
|
" f = R(f) \n",
|
|
|
|
" r = f.degree()\n",
|
|
|
|
" delta = GCD(m, r)\n",
|
|
|
|
" baza = baza_holo(m, f, j, p)\n",
|
|
|
|
" wymiar = len(baza)\n",
|
|
|
|
" zapis = vector([GF(p)(0) for i in baza])\n",
|
|
|
|
" stopnie = stopnie_bazy_holo(m, f, j, p)\n",
|
|
|
|
" inv_stopnie = {v: k for k, v in stopnie.items()}\n",
|
|
|
|
" \n",
|
|
|
|
" if elt[0] == 0:\n",
|
|
|
|
" return zapis\n",
|
|
|
|
" \n",
|
|
|
|
" d = elt[0].degree()\n",
|
|
|
|
" a = elt[0].coefficients(sparse = false)[d]\n",
|
|
|
|
" \n",
|
|
|
|
" k = inv_stopnie[d] #ktory element bazy jest stopnia d? ten o indeksie k\n",
|
|
|
|
" \n",
|
|
|
|
" a1 = baza[k][0].coefficients(sparse = false)[d]\n",
|
2021-08-19 21:59:58 +02:00
|
|
|
" elt1 = [R(0),R(0), j]\n",
|
2021-08-18 16:08:25 +02:00
|
|
|
" elt1[0] = elt[0] - a/a1 * baza[k][0]\n",
|
|
|
|
" \n",
|
2021-08-19 21:59:58 +02:00
|
|
|
" return zapis_w_bazie_holo(elt1, m, f, p) + vector([a/a1 * GF(p)(i == k) for i in range(0, len(baza))])\n"
|
2021-08-18 16:08:25 +02:00
|
|
|
]
|
|
|
|
},
|
2021-08-18 20:37:06 +02:00
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
2022-05-05 10:48:52 +02:00
|
|
|
"metadata": {
|
|
|
|
"collapsed": false
|
|
|
|
},
|
2021-08-18 20:37:06 +02:00
|
|
|
"source": [
|
|
|
|
"We have: $V(\\omega, f) = (C(\\omega), 0)$ and $F(\\omega, f) = (0, f^p)$, where C denotes the Cartier operator. Moreover:\n",
|
|
|
|
"\n",
|
|
|
|
"let $t = multord_m(p)$, $M := (p^t - 1)/m$. Then: $y^{p^t - 1} = f(x)^M$ and $1/y = f(x)^M/y^{p^t}$. Thus:\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"$$ C(P(x) \\, dx / y^j) = C(P(x) \\, f(x)^{M \\cdot j} \\, dx /y^{p^t \\cdot j}) = \\frac{1}{y^{p^{t - 1} \\cdot j}} C(P(x) \\, f(x)^{M \\cdot j} \\, dx) = \\frac{1}{y^{(p^{t - 1} \\cdot j) \\, mod \\, m}} \\cdot \\frac{1}{f(x)^{[p^{t - 1} \\cdot j/m]}} \\cdot C(P(x) \\, f(x)^{M \\cdot j} \\, dx)$$\n"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2021-08-23 14:55:37 +02:00
|
|
|
"execution_count": 5,
|
2022-05-05 10:48:52 +02:00
|
|
|
"metadata": {
|
|
|
|
"collapsed": false
|
|
|
|
},
|
|
|
|
"outputs": [
|
|
|
|
],
|
2021-08-18 20:37:06 +02:00
|
|
|
"source": [
|
|
|
|
"def czesc_wielomianu(p, h):\n",
|
|
|
|
" R.<x> = PolynomialRing(GF(p))\n",
|
|
|
|
" h = R(h)\n",
|
|
|
|
" wynik = R(0)\n",
|
|
|
|
" for i in range(0, h.degree()+1):\n",
|
|
|
|
" if (i%p) == p-1:\n",
|
|
|
|
" potega = Integer((i-(p-1))/p)\n",
|
|
|
|
" wynik = wynik + Integer(h[i]) * x^(potega) \n",
|
|
|
|
" return wynik\n",
|
|
|
|
"\n",
|
|
|
|
"def cartier_dr(p, m, f, elt, j): #Cartier na y^m = f dla elt = [forma rozniczkowa, fkcja]\n",
|
|
|
|
" R.<x> = PolynomialRing(GF(p))\n",
|
|
|
|
" f = R(f)\n",
|
|
|
|
" r = f.degree()\n",
|
|
|
|
" delta = GCD(m, r)\n",
|
|
|
|
" rzad = Integers(m)(p).multiplicative_order()\n",
|
|
|
|
" M = Integer((p^(rzad)-1)/m)\n",
|
|
|
|
" W = R(elt[0])\n",
|
|
|
|
" h = R(W*f^(M*j))\n",
|
|
|
|
" B = floor(p^(rzad-1)*j/m)\n",
|
|
|
|
" g = czesc_wielomianu(p, h)/f^B\n",
|
|
|
|
" jj = (p^(rzad-1)*j)%m\n",
|
|
|
|
" #jj = Integers(m)(j/p)\n",
|
2021-08-19 21:59:58 +02:00
|
|
|
" return [g, 0, jj] #jest to w czesci indeksowanej jj\n",
|
2021-08-18 20:37:06 +02:00
|
|
|
"\n",
|
|
|
|
"def macierz_cartier_dr(p, m, f, j):\n",
|
|
|
|
" baza = baza_dr(m, f, j, p)\n",
|
|
|
|
" A = matrix(GF(p), len(baza), len(baza))\n",
|
|
|
|
" for k in range(0, len(baza)):\n",
|
|
|
|
" cart = cartier_dr(p, m, f, baza[k], j)\n",
|
2021-08-19 21:59:58 +02:00
|
|
|
" v = zapis_w_bazie_dr(cart, m, f, p)\n",
|
2021-08-18 20:37:06 +02:00
|
|
|
" A[k, :] = matrix(v)\n",
|
|
|
|
" return A.transpose()"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
2022-05-05 10:48:52 +02:00
|
|
|
"metadata": {
|
|
|
|
"collapsed": false
|
|
|
|
},
|
2021-08-18 20:37:06 +02:00
|
|
|
"source": [
|
|
|
|
"$F((\\omega, P(x) \\cdot y^j)) = (0, P(x)^p \\cdot y^{p \\cdot j}) = (0, P(x)^p \\cdot f(x)^{[p \\cdot j/m]} \\cdot y^{(p \\cdot j) \\, mod \\, m})$"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2021-08-23 14:55:37 +02:00
|
|
|
"execution_count": 6,
|
2022-05-05 10:48:52 +02:00
|
|
|
"metadata": {
|
|
|
|
"collapsed": false
|
|
|
|
},
|
|
|
|
"outputs": [
|
|
|
|
],
|
2021-08-18 20:37:06 +02:00
|
|
|
"source": [
|
|
|
|
"def frobenius_dr(p, m, f, elt, j): #Cartier na y^m = f dla elt = [forma rozniczkowa, fkcja]\n",
|
|
|
|
" R.<x> = PolynomialRing(GF(p))\n",
|
|
|
|
" RR = FractionField(R)\n",
|
|
|
|
" f = R(f)\n",
|
2021-08-19 13:10:23 +02:00
|
|
|
" j1 = m-j\n",
|
|
|
|
" M = floor(j1*p/m)\n",
|
2021-08-19 21:59:58 +02:00
|
|
|
" return [0, f^M * RR(elt[1])^p, (j1*p)%m] #eigenspace = j1*p mod m\n",
|
2021-08-18 20:37:06 +02:00
|
|
|
"\n",
|
|
|
|
"def macierz_frob_dr(p, m, f, j):\n",
|
|
|
|
" baza = baza_dr(m, f, j, p)\n",
|
|
|
|
" A = matrix(GF(p), len(baza), len(baza))\n",
|
|
|
|
" for k in range(0, len(baza)):\n",
|
|
|
|
" frob = frobenius_dr(p, m, f, baza[k], j)\n",
|
2021-08-19 21:59:58 +02:00
|
|
|
" v = zapis_w_bazie_dr(frob, m, f, p)\n",
|
2021-08-18 20:37:06 +02:00
|
|
|
" A[k, :] = matrix(v)\n",
|
2021-08-19 13:10:23 +02:00
|
|
|
" return A.transpose()\n",
|
|
|
|
"\n",
|
|
|
|
"def wspolczynnik_wiodacy(f):\n",
|
|
|
|
" R.<x> = PolynomialRing(GF(p))\n",
|
|
|
|
" RR = FractionField(R)\n",
|
|
|
|
" f = RR(f)\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 stopien_roznica(f):\n",
|
|
|
|
" R.<x> = PolynomialRing(GF(p))\n",
|
|
|
|
" RR = FractionField(R)\n",
|
|
|
|
" f = RR(f)\n",
|
|
|
|
" f1 = f.numerator()\n",
|
|
|
|
" f2 = f.denominator()\n",
|
|
|
|
" d1 = f1.degree()\n",
|
|
|
|
" d2 = f2.degree()\n",
|
|
|
|
" return(d1 - d2)\n",
|
|
|
|
"\n",
|
|
|
|
"def czy_w_de_rhamie(elt, m, f, j, p):\n",
|
|
|
|
" j1 = m - j\n",
|
|
|
|
" R.<x> = PolynomialRing(GF(p))\n",
|
|
|
|
" RR = FractionField(R)\n",
|
|
|
|
" f = R(f)\n",
|
|
|
|
" elt = [RR(elt[0]), RR(elt[1])]\n",
|
|
|
|
" auxiliary = elt[0] - j1/m*elt[1]*f.derivative() - f*elt[1].derivative()\n",
|
|
|
|
" deg = stopien_roznica(auxiliary)\n",
|
|
|
|
" \n",
|
|
|
|
" r = f.degree()\n",
|
|
|
|
" delta = GCD(r, m)\n",
|
|
|
|
" Rr = r/delta\n",
|
|
|
|
" Mm = m/delta\n",
|
2021-08-19 21:59:58 +02:00
|
|
|
" return(j*Rr - deg*Mm >= 0)\n",
|
|
|
|
"\n",
|
|
|
|
"def full_cartier(m, f, p):\n",
|
|
|
|
" R.<x> = PolynomialRing(GF(p))\n",
|
|
|
|
" f = R(f)\n",
|
|
|
|
" r = f.degree()\n",
|
|
|
|
" delta = GCD(m, r)\n",
|
|
|
|
" g = 1/2*((m-1)*(r-1) - delta)\n",
|
|
|
|
" print(g)\n",
|
|
|
|
" \n",
|
|
|
|
" wymiary = [0]+[len(baza_holo(m, f, j, p)) for j in range(1, m)]\n",
|
|
|
|
" print(wymiary)\n",
|
|
|
|
" for j1 in range(1, m):\n",
|
|
|
|
" for j2 in range(1, m):\n",
|
|
|
|
" print(j1, j2)\n",
|
|
|
|
" print(matrix(GF(p), wymiary[j1], wymiary[j2]))\n",
|
|
|
|
" lista = [[matrix(GF(p), wymiary[j1], wymiary[j2]) for j1 in range(0, m)] for j2 in range(0, m)]\n",
|
|
|
|
" rzad = Integers(m)(p).multiplicative_order()\n",
|
|
|
|
" \n",
|
|
|
|
" for j in range(1, m):\n",
|
|
|
|
" jj = (p^(rzad-1)*j)%m\n",
|
|
|
|
" print(j, jj)\n",
|
|
|
|
" print('wymiary', macierz_cartier_dr(p, m, f, j).dimensions(), wymiary[j], wymiary[jj])\n",
|
|
|
|
" lista[j][jj] = macierz_cartier_dr(p, m, f, j)\n",
|
|
|
|
" return lista \n",
|
|
|
|
" return block_matrix(lista)"
|
2021-08-18 20:37:06 +02:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2021-08-19 21:59:58 +02:00
|
|
|
"execution_count": 243,
|
2022-05-05 10:48:52 +02:00
|
|
|
"metadata": {
|
|
|
|
"collapsed": false
|
|
|
|
},
|
2021-08-18 20:37:06 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
2021-08-19 21:59:58 +02:00
|
|
|
"5/2\n",
|
|
|
|
"[0, 0, 1, 2]\n",
|
|
|
|
"1 1\n",
|
|
|
|
"[]\n",
|
|
|
|
"1 2\n",
|
|
|
|
"[]\n",
|
|
|
|
"1 3\n",
|
|
|
|
"[]\n",
|
|
|
|
"2 1\n",
|
|
|
|
"[]\n",
|
|
|
|
"2 2\n",
|
|
|
|
"[0]\n",
|
|
|
|
"2 3\n",
|
|
|
|
"[0 0]\n",
|
|
|
|
"3 1\n",
|
|
|
|
"[]\n",
|
|
|
|
"3 2\n",
|
|
|
|
"[0]\n",
|
|
|
|
"[0]\n",
|
|
|
|
"3 3\n",
|
|
|
|
"[0 0]\n",
|
|
|
|
"[0 0]\n",
|
|
|
|
"1 1\n",
|
|
|
|
"wymiary (2, 2) 0 0\n",
|
|
|
|
"2 2\n",
|
|
|
|
"wymiary (2, 2) 1 1\n",
|
|
|
|
"3 3\n",
|
|
|
|
"wymiary (2, 2) 2 2\n"
|
2021-08-18 20:37:06 +02:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
2021-08-19 21:59:58 +02:00
|
|
|
"m = 4\n",
|
|
|
|
"p = 5\n",
|
|
|
|
"f = x^3 + x+2\n",
|
|
|
|
"lista = full_cartier(m, f, p)"
|
2021-08-18 20:37:06 +02:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2021-08-19 21:59:58 +02:00
|
|
|
"execution_count": 241,
|
2022-05-05 10:48:52 +02:00
|
|
|
"metadata": {
|
|
|
|
"collapsed": false
|
|
|
|
},
|
2021-08-18 20:37:06 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"text/plain": [
|
2021-08-19 21:59:58 +02:00
|
|
|
"[\n",
|
|
|
|
" [2 3] [0]\n",
|
|
|
|
"[], [], [0 0], [0]\n",
|
|
|
|
"]"
|
2021-08-18 20:37:06 +02:00
|
|
|
]
|
|
|
|
},
|
2021-08-19 21:59:58 +02:00
|
|
|
"execution_count": 241,
|
2022-05-05 10:48:52 +02:00
|
|
|
"metadata": {
|
|
|
|
},
|
2021-08-18 20:37:06 +02:00
|
|
|
"output_type": "execute_result"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
2021-08-19 21:59:58 +02:00
|
|
|
"lista[2]"
|
2021-08-19 13:10:23 +02:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2021-08-19 21:59:58 +02:00
|
|
|
"execution_count": 247,
|
2022-05-05 10:48:52 +02:00
|
|
|
"metadata": {
|
|
|
|
"collapsed": false
|
|
|
|
},
|
2021-08-19 13:10:23 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
2021-08-19 13:17:24 +02:00
|
|
|
"data": {
|
|
|
|
"text/plain": [
|
2021-08-19 21:59:58 +02:00
|
|
|
"[0 0]\n",
|
|
|
|
"[0 0]"
|
2021-08-19 13:17:24 +02:00
|
|
|
]
|
|
|
|
},
|
2021-08-19 21:59:58 +02:00
|
|
|
"execution_count": 247,
|
2022-05-05 10:48:52 +02:00
|
|
|
"metadata": {
|
|
|
|
},
|
2021-08-19 13:17:24 +02:00
|
|
|
"output_type": "execute_result"
|
2021-08-19 13:10:23 +02:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
2021-08-19 21:59:58 +02:00
|
|
|
"macierz_cartier_dr(p, m, f, 1)"
|
2021-08-18 20:37:06 +02:00
|
|
|
]
|
|
|
|
},
|
2021-08-18 16:08:25 +02:00
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2021-08-19 21:59:58 +02:00
|
|
|
"execution_count": 249,
|
2022-05-05 10:48:52 +02:00
|
|
|
"metadata": {
|
|
|
|
"collapsed": false
|
|
|
|
},
|
2021-08-18 16:08:25 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"text/plain": [
|
2021-08-19 21:59:58 +02:00
|
|
|
"{0: [3*x, 4/x, 0], 1: [4, 4/x^2, 0]}"
|
2021-08-18 16:08:25 +02:00
|
|
|
]
|
|
|
|
},
|
2021-08-19 21:59:58 +02:00
|
|
|
"execution_count": 249,
|
2022-05-05 10:48:52 +02:00
|
|
|
"metadata": {
|
|
|
|
},
|
2021-08-18 16:08:25 +02:00
|
|
|
"output_type": "execute_result"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
2021-08-19 21:59:58 +02:00
|
|
|
"baza_dr(m, f, 0, p)"
|
2021-08-18 16:08:25 +02:00
|
|
|
]
|
|
|
|
},
|
2021-08-23 14:55:37 +02:00
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": 8,
|
2022-05-05 10:48:52 +02:00
|
|
|
"metadata": {
|
|
|
|
"collapsed": false
|
|
|
|
},
|
2021-08-23 14:55:37 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"text/plain": [
|
|
|
|
"{0: [1, 0, 3], 1: [0, 2/x, 3]}"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"execution_count": 8,
|
2022-05-05 10:48:52 +02:00
|
|
|
"metadata": {
|
|
|
|
},
|
2021-08-23 14:55:37 +02:00
|
|
|
"output_type": "execute_result"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"p = 5\n",
|
|
|
|
"R.<x> = PolynomialRing(GF(p))\n",
|
|
|
|
"f = x^3 + x + 2\n",
|
|
|
|
"m = 7\n",
|
|
|
|
"baza_dr(m, f, 3, p)"
|
|
|
|
]
|
|
|
|
},
|
2021-08-18 15:44:03 +02:00
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2022-05-05 10:48:52 +02:00
|
|
|
"execution_count": 0,
|
|
|
|
"metadata": {
|
|
|
|
"collapsed": false
|
|
|
|
},
|
|
|
|
"outputs": [
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
]
|
2021-08-18 15:44:03 +02:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"kernelspec": {
|
2022-05-05 10:48:52 +02:00
|
|
|
"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"
|
2021-08-18 15:44:03 +02:00
|
|
|
},
|
|
|
|
"language_info": {
|
|
|
|
"codemirror_mode": {
|
|
|
|
"name": "ipython",
|
|
|
|
"version": 3
|
|
|
|
},
|
|
|
|
"file_extension": ".py",
|
|
|
|
"mimetype": "text/x-python",
|
|
|
|
"name": "python",
|
|
|
|
"nbconvert_exporter": "python",
|
|
|
|
"pygments_lexer": "ipython3",
|
|
|
|
"version": "3.7.3"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"nbformat": 4,
|
2022-05-05 10:48:52 +02:00
|
|
|
"nbformat_minor": 4
|
|
|
|
}
|