zaczete klasy

This commit is contained in:
jgarnek 2021-08-19 21:59:58 +02:00
parent d071f53aae
commit 1c74b2b0d2

View File

@ -22,7 +22,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 5, "execution_count": 169,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -39,14 +39,14 @@
" k = 0\n", " k = 0\n",
" for i in range(1, r):\n", " for i in range(1, r):\n",
" if (r*j - m*i >= delta):\n", " if (r*j - m*i >= delta):\n",
" baza[k] = [x^(i-1), R(0)]\n", " baza[k] = [x^(i-1), R(0), j]\n",
" k = k+1\n", " k = k+1\n",
" return baza" " return baza"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 6, "execution_count": 170,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -72,14 +72,14 @@
" if (r*(m-j) - m*i >= delta):\n", " if (r*(m-j) - m*i >= delta):\n",
" s = R(m-j)*R(x)*R(f.derivative()) - R(m)*R(i)*f\n", " s = R(m-j)*R(x)*R(f.derivative()) - R(m)*R(i)*f\n",
" psi = R(obciecie(s, i, p))\n", " psi = R(obciecie(s, i, p))\n",
" baza[k] = [psi, R(m)/x^i]\n", " baza[k] = [psi, R(m)/x^i, j]\n",
" k = k+1\n", " k = k+1\n",
" return baza" " return baza"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 142, "execution_count": 208,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -115,7 +115,8 @@
"\n", "\n",
"#Any element [f dx, g] is represented as a combination of the basis vectors.\n", "#Any element [f dx, g] is represented as a combination of the basis vectors.\n",
"\n", "\n",
"def zapis_w_bazie_dr(elt, m, f, j, p):\n", "def zapis_w_bazie_dr(elt, m, f, p):\n",
" j = elt[2]\n",
" R.<x> = PolynomialRing(GF(p))\n", " R.<x> = PolynomialRing(GF(p))\n",
" RR = FractionField(R)\n", " RR = FractionField(R)\n",
" f = R(f)\n", " f = R(f)\n",
@ -140,10 +141,10 @@
" k = inv_stopnie_holo[d] #ktory element bazy jest stopnia d? ten o indeksie k\n", " k = inv_stopnie_holo[d] #ktory element bazy jest stopnia d? ten o indeksie k\n",
" \n", " \n",
" a1 = baza[k][0].coefficients(sparse = false)[d]\n", " a1 = baza[k][0].coefficients(sparse = false)[d]\n",
" elt1 = [R(0),R(0)]\n", " elt1 = [R(0),R(0),j]\n",
" elt1[0] = elt[0] - a/a1 * baza[k][0]\n", " elt1[0] = elt[0] - a/a1 * baza[k][0]\n",
" elt1[1] = R(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", " return zapis_w_bazie_dr(elt1, m, f, p) + vector([a/a1*GF(p)(i == k) for i in range(0, len(baza))])\n",
"\n", "\n",
" g = elt[1]\n", " g = elt[1]\n",
" a = wspolczynnik_wiodacy(g)\n", " a = wspolczynnik_wiodacy(g)\n",
@ -154,30 +155,25 @@
" stopnie2 = stopnie_drugiej_wspolrzednej_bazy_dr(m, f, j, p)\n", " stopnie2 = stopnie_drugiej_wspolrzednej_bazy_dr(m, f, j, p)\n",
" inv_stopnie2 = {v: k for k, v in stopnie2.items()}\n", " inv_stopnie2 = {v: k for k, v in stopnie2.items()}\n",
" if (d not in stopnie2.values()):\n", " if (d not in stopnie2.values()):\n",
" print('p3')\n",
" if d> 0:\n", " if d> 0:\n",
" print('p3a')\n",
" j1 = m-j\n", " j1 = m-j\n",
" print('?', -j1*Rr+d*Mm)\n", " elt1 = [elt[0], RR(elt[1]) - a*1/R(x^d), j]\n",
" elt1 = [elt[0], RR(elt[1]) - a*1/R(x^d)]\n",
" else:\n", " else:\n",
" print('p3b')\n",
" d1 = -d\n", " d1 = -d\n",
" j1 = m-j\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", " 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, j, p)\n", " return zapis_w_bazie_dr(elt1, m, f, p)\n",
" \n", " \n",
" print('p4')\n",
" k = inv_stopnie2[d]\n", " k = inv_stopnie2[d]\n",
" b = wspolczynnik_wiodacy(baza[k][1])\n", " b = wspolczynnik_wiodacy(baza[k][1])\n",
" print('k', k, 'a', a)\n", " elt1 = [R(0), R(0), j]\n",
" elt1 = [R(0), R(0)]\n",
" elt1[0] = elt[0] - a/b*baza[k][0]\n", " elt1[0] = elt[0] - a/b*baza[k][0]\n",
" elt1[1] = elt[1] - a/b*baza[k][1]\n", " elt1[1] = elt[1] - a/b*baza[k][1]\n",
" return zapis_w_bazie_dr(elt1, m, f, j, p) + vector([a*GF(p)(i == k) for i in range(0, len(baza))])\n", " return zapis_w_bazie_dr(elt1, m, f, p) + vector([a*GF(p)(i == k) for i in range(0, len(baza))])\n",
" \n", " \n",
" \n", " \n",
"def zapis_w_bazie_holo(elt, m, f, j, p):\n", "def zapis_w_bazie_holo(elt, m, f, p):\n",
" j = elt[2]\n",
" R.<x> = PolynomialRing(GF(p))\n", " R.<x> = PolynomialRing(GF(p))\n",
" f = R(f) \n", " f = R(f) \n",
" r = f.degree()\n", " r = f.degree()\n",
@ -197,10 +193,10 @@
" k = inv_stopnie[d] #ktory element bazy jest stopnia d? ten o indeksie k\n", " k = inv_stopnie[d] #ktory element bazy jest stopnia d? ten o indeksie k\n",
" \n", " \n",
" a1 = baza[k][0].coefficients(sparse = false)[d]\n", " a1 = baza[k][0].coefficients(sparse = false)[d]\n",
" elt1 = [R(0),R(0)]\n", " elt1 = [R(0),R(0), j]\n",
" elt1[0] = elt[0] - a/a1 * baza[k][0]\n", " elt1[0] = elt[0] - a/a1 * baza[k][0]\n",
" \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" " return zapis_w_bazie_holo(elt1, m, f, p) + vector([a/a1 * GF(p)(i == k) for i in range(0, len(baza))])\n"
] ]
}, },
{ {
@ -217,7 +213,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 131, "execution_count": 209,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -244,14 +240,14 @@
" g = czesc_wielomianu(p, h)/f^B\n", " g = czesc_wielomianu(p, h)/f^B\n",
" jj = (p^(rzad-1)*j)%m\n", " jj = (p^(rzad-1)*j)%m\n",
" #jj = Integers(m)(j/p)\n", " #jj = Integers(m)(j/p)\n",
" return [g, 0] #jest to w czesci indeksowanej jj\n", " return [g, 0, jj] #jest to w czesci indeksowanej jj\n",
"\n", "\n",
"def macierz_cartier_dr(p, m, f, j):\n", "def macierz_cartier_dr(p, m, f, j):\n",
" baza = baza_dr(m, f, j, p)\n", " baza = baza_dr(m, f, j, p)\n",
" A = matrix(GF(p), len(baza), len(baza))\n", " A = matrix(GF(p), len(baza), len(baza))\n",
" for k in range(0, len(baza)):\n", " for k in range(0, len(baza)):\n",
" cart = cartier_dr(p, m, f, baza[k], j)\n", " cart = cartier_dr(p, m, f, baza[k], j)\n",
" v = zapis_w_bazie_dr(cart, m, f, j, p)\n", " v = zapis_w_bazie_dr(cart, m, f, p)\n",
" A[k, :] = matrix(v)\n", " A[k, :] = matrix(v)\n",
" return A.transpose()" " return A.transpose()"
] ]
@ -265,7 +261,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 132, "execution_count": 242,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -275,14 +271,14 @@
" f = R(f)\n", " f = R(f)\n",
" j1 = m-j\n", " j1 = m-j\n",
" M = floor(j1*p/m)\n", " M = floor(j1*p/m)\n",
" return [0, f^M * RR(elt[1])^p] #eigenspace = j1*p mod m\n", " return [0, f^M * RR(elt[1])^p, (j1*p)%m] #eigenspace = j1*p mod m\n",
"\n", "\n",
"def macierz_frob_dr(p, m, f, j):\n", "def macierz_frob_dr(p, m, f, j):\n",
" baza = baza_dr(m, f, j, p)\n", " baza = baza_dr(m, f, j, p)\n",
" A = matrix(GF(p), len(baza), len(baza))\n", " A = matrix(GF(p), len(baza), len(baza))\n",
" for k in range(0, len(baza)):\n", " for k in range(0, len(baza)):\n",
" frob = frobenius_dr(p, m, f, baza[k], j)\n", " frob = frobenius_dr(p, m, f, baza[k], j)\n",
" v = zapis_w_bazie_dr(frob, m, f, j, p)\n", " v = zapis_w_bazie_dr(frob, m, f, p)\n",
" A[k, :] = matrix(v)\n", " A[k, :] = matrix(v)\n",
" return A.transpose()\n", " return A.transpose()\n",
"\n", "\n",
@ -321,355 +317,143 @@
" delta = GCD(r, m)\n", " delta = GCD(r, m)\n",
" Rr = r/delta\n", " Rr = r/delta\n",
" Mm = m/delta\n", " Mm = m/delta\n",
" return(j*Rr - deg*Mm >= 0)" " 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)"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 134, "execution_count": 243,
"metadata": {
"scrolled": true
},
"outputs": [
{
"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": [
"[0 4]\n",
"[0 4]"
]
},
"execution_count": 134,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"m = 2\n",
"j = 1\n",
"p = 5\n",
"f = x^3 + x+3\n",
"print(baza_dr(m, f, j, p))\n",
"macierz_frob_dr(p, m, f, j)"
]
},
{
"cell_type": "code",
"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]"
]
},
"execution_count": 135,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"frobenius_dr(p, m, f, [x, 2/x], j)"
]
},
{
"cell_type": "code",
"execution_count": 136,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"name": "stdout", "name": "stdout",
"output_type": "stream", "output_type": "stream",
"text": [ "text": [
"[0, (2*x^6 + 4*x^4 + 2*x^3 + 2*x^2 + 2*x + 3)/x^5] czy w dr True\n", "5/2\n",
"d -1 a 2 dostepne: {1: 1} czy w stopnie 2 True\n", "[0, 0, 1, 2]\n",
"p3\n", "1 1\n",
"[2*x + 4, (4*x^4 + 2*x^3 + 2*x^2 + 2*x + 3)/x^5] czy w dr True\n", "[]\n",
"d 1 a 4 dostepne: {1: 1} czy w stopnie 2 False\n", "1 2\n",
"p4\n", "[]\n",
"k 1 a 4\n", "1 3\n",
"[4, (2*x^3 + 2*x^2 + 2*x + 3)/x^5] czy w dr True\n", "[]\n",
"d 2 a 2 dostepne: {1: 1} czy w stopnie 2 True\n", "2 1\n",
"p3\n", "[]\n",
"? 1\n", "2 2\n",
"[4, (2*x^2 + 2*x + 3)/x^5] czy w dr True\n", "[0]\n",
"d 3 a 2 dostepne: {1: 1} czy w stopnie 2 True\n", "2 3\n",
"p3\n", "[0 0]\n",
"? 3\n", "3 1\n",
"[4, (2*x + 3)/x^5] czy w dr True\n", "[]\n",
"d 4 a 2 dostepne: {1: 1} czy w stopnie 2 True\n", "3 2\n",
"p3\n", "[0]\n",
"? 5\n", "[0]\n",
"[4, 3/x^5] czy w dr True\n", "3 3\n",
"d 5 a 3 dostepne: {1: 1} czy w stopnie 2 True\n", "[0 0]\n",
"p3\n", "[0 0]\n",
"? 7\n", "1 1\n",
"[4, 0] czy w dr True\n", "wymiary (2, 2) 0 0\n",
"p2\n", "2 2\n",
"[0, 0] czy w dr True\n", "wymiary (2, 2) 1 1\n",
"p1\n" "3 3\n",
"wymiary (2, 2) 2 2\n"
] ]
},
{
"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",
"execution_count": 137,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"4*x^4 + 4*x^3 + 4*x^2 + 4*x + 4"
]
},
"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",
"execution_count": 138,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{0: [0, 4/x], 1: [1, 4/x^2]}\n",
"{0: 1, 1: 2}\n"
]
},
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 138,
"metadata": {},
"output_type": "execute_result"
} }
], ],
"source": [ "source": [
"m = 4\n", "m = 4\n",
"j = 1\n",
"p = 5\n", "p = 5\n",
"f = x^3 + x+2\n", "f = x^3 + x+2\n",
"print(baza_dr(m, f, j, p))\n", "lista = full_cartier(m, f, p)"
"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", "cell_type": "code",
"execution_count": 143, "execution_count": 241,
"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",
"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",
"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",
"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",
"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",
"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"
]
},
{
"data": {
"text/plain": [
"[3 4]\n",
"[2 0]"
]
},
"execution_count": 143,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"macierz_frob_dr(p, m, f, 1)"
]
},
{
"cell_type": "code",
"execution_count": 96,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"2" "[\n",
" [2 3] [0]\n",
"[], [], [0 0], [0]\n",
"]"
] ]
}, },
"execution_count": 96, "execution_count": 241,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
], ],
"source": [ "source": [
"wspolczynnik_wiodacy(2/x)" "lista[2]"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 97, "execution_count": 247,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"ename": "TypeError", "data": {
"evalue": "degree() takes exactly one argument (0 given)", "text/plain": [
"output_type": "error", "[0 0]\n",
"traceback": [ "[0 0]"
"\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)"
] ]
},
"execution_count": 247,
"metadata": {},
"output_type": "execute_result"
} }
], ],
"source": [ "source": [
"(2/x).degree()" "macierz_cartier_dr(p, m, f, 1)"
]
},
{
"cell_type": "code",
"execution_count": 249,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{0: [3*x, 4/x, 0], 1: [4, 4/x^2, 0]}"
]
},
"execution_count": 249,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"baza_dr(m, f, 0, p)"
] ]
}, },
{ {