DeRhamComputation/deRhamComputation.ipynb

705 lines
21 KiB
Plaintext
Raw Normal View History

2021-08-18 15:44:03 +02:00
{
"cells": [
2021-08-18 16:08:25 +02:00
{
"cell_type": "markdown",
"metadata": {},
"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-19 13:10:23 +02:00
"execution_count": 5,
2021-08-18 16:08:25 +02:00
"metadata": {},
"outputs": [],
"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",
" baza[k] = [x^(i-1), R(0)]\n",
" k = k+1\n",
" return baza"
]
},
{
"cell_type": "code",
2021-08-19 13:10:23 +02:00
"execution_count": 6,
2021-08-18 16:08:25 +02:00
"metadata": {},
"outputs": [],
"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",
" baza[k] = [psi, R(m)/x^i]\n",
" k = k+1\n",
" return baza"
]
},
{
"cell_type": "code",
"execution_count": 142,
2021-08-18 16:08:25 +02:00
"metadata": {},
"outputs": [],
"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",
"def zapis_w_bazie_dr(elt, m, f, j, p):\n",
" R.<x> = PolynomialRing(GF(p))\n",
" RR = FractionField(R)\n",
" 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",
" 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",
" elt1 = [R(0),R(0)]\n",
" elt1[0] = elt[0] - a/a1 * baza[k][0]\n",
" elt1[1] = R(0)\n",
" return zapis_w_bazie_dr(elt1, m, f, j, p) + vector([a/a1*GF(p)(i == k) for i in range(0, len(baza))])\n",
"\n",
" g = elt[1]\n",
2021-08-19 13:10:23 +02:00
" a = wspolczynnik_wiodacy(g)\n",
" d = -stopien_roznica(g)\n",
" Rr = r/delta\n",
2021-08-19 13:10:23 +02:00
" Mm = m/delta\n",
" \n",
" stopnie2 = stopnie_drugiej_wspolrzednej_bazy_dr(m, f, j, p)\n",
" 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",
" print('p3')\n",
" if d> 0:\n",
2021-08-19 13:10:23 +02:00
" print('p3a')\n",
" j1 = m-j\n",
" print('?', -j1*Rr+d*Mm)\n",
" elt1 = [elt[0], RR(elt[1]) - a*1/R(x^d)]\n",
" else:\n",
2021-08-19 13:10:23 +02:00
" print('p3b')\n",
" d1 = -d\n",
" j1 = m-j\n",
" elt1 = [elt[0] - a*(j1*x^(d1) * f.derivative()/m + d1*f*x^(d1 - 1)), RR(elt[1]) - a*R(x^(d1))]\n",
2021-08-18 16:08:25 +02:00
" return zapis_w_bazie_dr(elt1, m, f, j, p)\n",
" \n",
" print('p4')\n",
2021-08-18 16:08:25 +02:00
" k = inv_stopnie2[d]\n",
2021-08-19 13:10:23 +02:00
" b = wspolczynnik_wiodacy(baza[k][1])\n",
" print('k', k, 'a', a)\n",
2021-08-18 16:08:25 +02:00
" elt1 = [R(0), R(0)]\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-18 16:08:25 +02:00
" return zapis_w_bazie_dr(elt1, m, f, j, p) + vector([a*GF(p)(i == k) for i in range(0, len(baza))])\n",
" \n",
" \n",
"def zapis_w_bazie_holo(elt, 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 = 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",
" elt1 = [R(0),R(0)]\n",
" elt1[0] = elt[0] - a/a1 * baza[k][0]\n",
" \n",
" return zapis_w_bazie_holo(elt1, m, f, j, p) + vector([a/a1 * GF(p)(i == k) for i in range(0, len(baza))])\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"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-19 13:10:23 +02:00
"execution_count": 131,
"metadata": {},
"outputs": [],
"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",
" return [g, 0] #jest to w czesci indeksowanej jj\n",
"\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",
" v = zapis_w_bazie_dr(cart, m, f, j, p)\n",
" A[k, :] = matrix(v)\n",
" return A.transpose()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"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-19 13:10:23 +02:00
"execution_count": 132,
"metadata": {},
"outputs": [],
"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",
" return [0, f^M * RR(elt[1])^p] #eigenspace = j1*p mod m\n",
"\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",
" v = zapis_w_bazie_dr(frob, m, f, j, p)\n",
" 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",
" return(j*Rr - deg*Mm >= 0)"
]
},
{
"cell_type": "code",
2021-08-19 13:10:23 +02:00
"execution_count": 134,
"metadata": {
"scrolled": true
},
"outputs": [
2021-08-19 13:10:23 +02:00
{
"name": "stdout",
"output_type": "stream",
"text": [
"{0: [1, 0], 1: [x, 2/x]}\n",
"[0, 0] czy w dr True\n",
"p1\n",
"[0, (2*x^6 + 4*x^4 + 2*x^3 + 2*x^2 + 2*x + 3)/x^5] czy w dr True\n",
"d -1 a 2 dostepne: {1: 1} czy w stopnie 2 True\n",
"p3\n",
"[2*x + 4, (4*x^4 + 2*x^3 + 2*x^2 + 2*x + 3)/x^5] czy w dr True\n",
"d 1 a 4 dostepne: {1: 1} czy w stopnie 2 False\n",
"p4\n",
"k 1 a 4\n",
"[4, (2*x^3 + 2*x^2 + 2*x + 3)/x^5] czy w dr True\n",
"d 2 a 2 dostepne: {1: 1} czy w stopnie 2 True\n",
"p3\n",
"? 1\n",
"[4, (2*x^2 + 2*x + 3)/x^5] czy w dr True\n",
"d 3 a 2 dostepne: {1: 1} czy w stopnie 2 True\n",
"p3\n",
"? 3\n",
"[4, (2*x + 3)/x^5] czy w dr True\n",
"d 4 a 2 dostepne: {1: 1} czy w stopnie 2 True\n",
"p3\n",
"? 5\n",
"[4, 3/x^5] czy w dr True\n",
"d 5 a 3 dostepne: {1: 1} czy w stopnie 2 True\n",
"p3\n",
"? 7\n",
"[4, 0] czy w dr True\n",
"p2\n",
"[0, 0] czy w dr True\n",
"p1\n"
]
},
{
"data": {
"text/plain": [
2021-08-19 13:10:23 +02:00
"[0 4]\n",
"[0 4]"
]
},
2021-08-19 13:10:23 +02:00
"execution_count": 134,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"m = 2\n",
"j = 1\n",
"p = 5\n",
"f = x^3 + x+3\n",
2021-08-19 13:10:23 +02:00
"print(baza_dr(m, f, j, p))\n",
"macierz_frob_dr(p, m, f, j)"
]
},
{
"cell_type": "code",
2021-08-19 13:10:23 +02:00
"execution_count": 135,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[0, (2*x^6 + 4*x^4 + 2*x^3 + 2*x^2 + 2*x + 3)/x^5]"
]
},
2021-08-19 13:10:23 +02:00
"execution_count": 135,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"frobenius_dr(p, m, f, [x, 2/x], j)"
]
},
{
"cell_type": "code",
2021-08-19 13:10:23 +02:00
"execution_count": 136,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
2021-08-19 13:10:23 +02:00
"[0, (2*x^6 + 4*x^4 + 2*x^3 + 2*x^2 + 2*x + 3)/x^5] czy w dr True\n",
"d -1 a 2 dostepne: {1: 1} czy w stopnie 2 True\n",
"p3\n",
2021-08-19 13:10:23 +02:00
"[2*x + 4, (4*x^4 + 2*x^3 + 2*x^2 + 2*x + 3)/x^5] czy w dr True\n",
"d 1 a 4 dostepne: {1: 1} czy w stopnie 2 False\n",
"p4\n",
2021-08-19 13:10:23 +02:00
"k 1 a 4\n",
"[4, (2*x^3 + 2*x^2 + 2*x + 3)/x^5] czy w dr True\n",
"d 2 a 2 dostepne: {1: 1} czy w stopnie 2 True\n",
"p3\n",
"? 1\n",
"[4, (2*x^2 + 2*x + 3)/x^5] czy w dr True\n",
"d 3 a 2 dostepne: {1: 1} czy w stopnie 2 True\n",
"p3\n",
"? 3\n",
"[4, (2*x + 3)/x^5] czy w dr True\n",
"d 4 a 2 dostepne: {1: 1} czy w stopnie 2 True\n",
"p3\n",
"? 5\n",
"[4, 3/x^5] czy w dr True\n",
"d 5 a 3 dostepne: {1: 1} czy w stopnie 2 True\n",
"p3\n",
"? 7\n",
"[4, 0] czy w dr True\n",
"p2\n",
"[0, 0] czy w dr True\n",
"p1\n"
]
},
{
2021-08-19 13:10:23 +02:00
"data": {
"text/plain": [
"(4, 4)"
]
},
"execution_count": 136,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"zapis_w_bazie_dr([0, (2*x^6 + 4*x^4 + 2*x^3 + 2*x^2 + 2*x + 3)/x^5], m, f, j, p)"
]
},
{
"cell_type": "code",
2021-08-19 13:10:23 +02:00
"execution_count": 137,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"4*x^4 + 4*x^3 + 4*x^2 + 4*x + 4"
]
},
2021-08-19 13:10:23 +02:00
"execution_count": 137,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"h = sum(i*x^i for i in range(0, p^2))\n",
"czesc_wielomianu(p, h)"
]
},
{
"cell_type": "code",
2021-08-19 13:10:23 +02:00
"execution_count": 138,
"metadata": {},
"outputs": [
2021-08-19 13:10:23 +02:00
{
"name": "stdout",
"output_type": "stream",
"text": [
"{0: [0, 4/x], 1: [1, 4/x^2]}\n",
"{0: 1, 1: 2}\n"
]
},
{
"data": {
"text/plain": [
2021-08-19 13:10:23 +02:00
"True"
]
},
2021-08-19 13:10:23 +02:00
"execution_count": 138,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
2021-08-19 13:10:23 +02:00
"m = 4\n",
"j = 1\n",
"p = 5\n",
2021-08-19 13:10:23 +02:00
"f = x^3 + x+2\n",
"print(baza_dr(m, f, j, p))\n",
"print(stopnie_drugiej_wspolrzednej_bazy_dr(m, f, j, p))\n",
"t = stopnie_drugiej_wspolrzednej_bazy_dr(m, f, j, p)\n",
"1 in t.values()"
]
},
{
"cell_type": "code",
"execution_count": 143,
2021-08-19 13:10:23 +02:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[0, (4*x^9 + 2*x^7 + 4*x^6 + 2*x^5 + 3*x^4 + 2*x^3 + 4*x^2 + 3*x + 2)/x^5] czy w dr True\n",
"d -4 a 4 dostepne: {0: 1, 1: 2} czy w stopnie 2 True\n",
"p3\n",
"p3b\n",
"[x^4 + 3*x^3, (2*x^7 + 4*x^6 + 2*x^5 + 3*x^4 + 2*x^3 + 4*x^2 + 3*x + 2)/x^5] czy w dr True\n",
"d -2 a 2 dostepne: {0: 1, 1: 2} czy w stopnie 2 True\n",
"p3\n",
"p3b\n",
"[3*x^3 + 2*x^2 + 2*x, (4*x^6 + 2*x^5 + 3*x^4 + 2*x^3 + 4*x^2 + 3*x + 2)/x^5] czy w dr True\n",
"d -1 a 4 dostepne: {0: 1, 1: 2} czy w stopnie 2 True\n",
"p3\n",
"p3b\n",
"[2*x^2 + 2, (2*x^5 + 3*x^4 + 2*x^3 + 4*x^2 + 3*x + 2)/x^5] czy w dr True\n",
"d 0 a 2 dostepne: {0: 1, 1: 2} czy w stopnie 2 False\n",
"p3\n",
"p3b\n",
"[3, (3*x^4 + 2*x^3 + 4*x^2 + 3*x + 2)/x^5] czy w dr True\n",
2021-08-19 13:10:23 +02:00
"d 1 a 3 dostepne: {0: 1, 1: 2} czy w stopnie 2 False\n",
"p4\n",
"k 0 a 3\n",
"[3, (2*x^3 + 4*x^2 + 3*x + 2)/x^5] czy w dr True\n",
2021-08-19 13:10:23 +02:00
"d 2 a 2 dostepne: {0: 1, 1: 2} czy w stopnie 2 True\n",
"p4\n",
"k 1 a 2\n",
"[0, (4*x^2 + 3*x + 2)/x^5] czy w dr True\n",
2021-08-19 13:10:23 +02:00
"d 3 a 4 dostepne: {0: 1, 1: 2} czy w stopnie 2 True\n",
"p3\n",
"p3a\n",
"? 3\n",
"[0, (3*x + 2)/x^5] czy w dr True\n",
2021-08-19 13:10:23 +02:00
"d 4 a 3 dostepne: {0: 1, 1: 2} czy w stopnie 2 True\n",
"p3\n",
"p3a\n",
"? 7\n",
"[0, 2/x^5] czy w dr True\n",
2021-08-19 13:10:23 +02:00
"d 5 a 2 dostepne: {0: 1, 1: 2} czy w stopnie 2 True\n",
"p3\n",
"p3a\n",
"? 11\n",
"[0, 0] czy w dr True\n",
"p1\n",
"[0, (4*x^9 + 2*x^7 + 4*x^6 + 2*x^5 + 3*x^4 + 2*x^3 + 4*x^2 + 3*x + 2)/x^10] czy w dr True\n",
"d 1 a 4 dostepne: {0: 1, 1: 2} czy w stopnie 2 False\n",
"p4\n",
"k 0 a 4\n",
"[0, (2*x^7 + 4*x^6 + 2*x^5 + 3*x^4 + 2*x^3 + 4*x^2 + 3*x + 2)/x^10] czy w dr True\n",
"d 3 a 2 dostepne: {0: 1, 1: 2} czy w stopnie 2 True\n",
"p3\n",
"p3a\n",
"? 3\n",
"[0, (4*x^6 + 2*x^5 + 3*x^4 + 2*x^3 + 4*x^2 + 3*x + 2)/x^10] czy w dr True\n",
"d 4 a 4 dostepne: {0: 1, 1: 2} czy w stopnie 2 True\n",
"p3\n",
"p3a\n",
"? 7\n",
"[0, (2*x^5 + 3*x^4 + 2*x^3 + 4*x^2 + 3*x + 2)/x^10] czy w dr True\n",
"d 5 a 2 dostepne: {0: 1, 1: 2} czy w stopnie 2 True\n",
"p3\n",
"p3a\n",
"? 11\n",
"[0, (3*x^4 + 2*x^3 + 4*x^2 + 3*x + 2)/x^10] czy w dr True\n",
"d 6 a 3 dostepne: {0: 1, 1: 2} czy w stopnie 2 True\n",
"p3\n",
"p3a\n",
"? 15\n",
"[0, (2*x^3 + 4*x^2 + 3*x + 2)/x^10] czy w dr True\n",
"d 7 a 2 dostepne: {0: 1, 1: 2} czy w stopnie 2 True\n",
"p3\n",
"p3a\n",
"? 19\n",
"[0, (4*x^2 + 3*x + 2)/x^10] czy w dr True\n",
"d 8 a 4 dostepne: {0: 1, 1: 2} czy w stopnie 2 True\n",
"p3\n",
"p3a\n",
"? 23\n",
"[0, (3*x + 2)/x^10] czy w dr True\n",
"d 9 a 3 dostepne: {0: 1, 1: 2} czy w stopnie 2 True\n",
"p3\n",
"p3a\n",
"? 27\n",
"[0, 2/x^10] czy w dr True\n",
"d 10 a 2 dostepne: {0: 1, 1: 2} czy w stopnie 2 True\n",
"p3\n",
"p3a\n",
"? 31\n",
"[0, 0] czy w dr True\n",
"p1\n"
2021-08-19 13:10:23 +02:00
]
},
{
"data": {
"text/plain": [
"[3 4]\n",
"[2 0]"
]
},
"execution_count": 143,
"metadata": {},
"output_type": "execute_result"
2021-08-19 13:10:23 +02:00
}
],
"source": [
"macierz_frob_dr(p, m, f, 1)"
]
},
2021-08-18 16:08:25 +02:00
{
"cell_type": "code",
2021-08-19 13:10:23 +02:00
"execution_count": 96,
2021-08-18 16:08:25 +02:00
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
2021-08-19 13:10:23 +02:00
"2"
2021-08-18 16:08:25 +02:00
]
},
2021-08-19 13:10:23 +02:00
"execution_count": 96,
2021-08-18 16:08:25 +02:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
2021-08-19 13:10:23 +02:00
"wspolczynnik_wiodacy(2/x)"
]
},
{
"cell_type": "code",
"execution_count": 97,
"metadata": {},
"outputs": [
{
"ename": "TypeError",
"evalue": "degree() takes exactly one argument (0 given)",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-97-2687f469fb6b>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \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[0mx\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdegree\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;31mTypeError\u001b[0m: degree() takes exactly one argument (0 given)"
]
}
],
"source": [
"(2/x).degree()"
2021-08-18 16:08:25 +02:00
]
},
2021-08-18 15:44:03 +02:00
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "SageMath 9.1",
"language": "sage",
"name": "sagemath"
},
"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,
"nbformat_minor": 2
}