From 7951e643322e75514ff04b8d5e0274c792eb595a Mon Sep 17 00:00:00 2001 From: jgarnek Date: Thu, 19 Aug 2021 13:10:23 +0200 Subject: [PATCH] dziala frobenius i cartier --- deRhamComputation.ipynb | 1305 +++++++++------------------------------ 1 file changed, 279 insertions(+), 1026 deletions(-) diff --git a/deRhamComputation.ipynb b/deRhamComputation.ipynb index a5f5628..9968cbd 100644 --- a/deRhamComputation.ipynb +++ b/deRhamComputation.ipynb @@ -11,12 +11,18 @@ " $$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", - " - " + " - 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)$." ] }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -40,7 +46,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ @@ -48,7 +54,7 @@ "# 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", - "# [y^j * f(x) dx, g(x)/y^j]. Output is [f(x), g(x)]\n", + "# [f(x) dx/y^j, y^(m-j)*g(x)]. Output is [f(x), g(x)]\n", "\n", "def baza_dr(m, f, j, p):\n", " R. = PolynomialRing(GF(p))\n", @@ -73,7 +79,7 @@ }, { "cell_type": "code", - "execution_count": 155, + "execution_count": 140, "metadata": {}, "outputs": [], "source": [ @@ -110,7 +116,7 @@ "#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", - " #print(elt)\n", + " print(elt, 'czy w dr', czy_w_de_rhamie(elt, m, f, j, p))\n", " R. = PolynomialRing(GF(p))\n", " RR = FractionField(R)\n", " f = R(f)\n", @@ -143,33 +149,35 @@ " 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", - " g1 = R(elt[1].numerator())\n", - " g2 = R(elt[1].denominator())\n", - " d1 = g1.degree()\n", - " d2 = g2.degree()\n", - " a1 = g1.coefficients(sparse = false)[d1]\n", - " a2 = g2.coefficients(sparse = false)[d2]\n", - " a = a1/a2\n", - " d = d2 - d1\n", + " a = wspolczynnik_wiodacy(g)\n", + " d = -stopien_roznica(g)\n", " Rr = r/delta\n", - " M = m/delta\n", - "\n", + " 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", - " \n", - " if (d not in inv_stopnie2):\n", + " print('d', d, 'a', a, 'dostepne:', stopnie2, 'czy w stopnie 2', d not in stopnie2)\n", + " if (d not in stopnie2.values()):\n", " print('p3')\n", " if d>= 0:\n", - " elt1 = [elt[0], RR(elt[1]) - a1/a2*1/R(x^d)]\n", + " 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", - " elt1 = [elt[0], RR(elt[1]) - a1/a2*R(x^(-d))]\n", + " 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", " return zapis_w_bazie_dr(elt1, m, f, j, p)\n", " \n", " print('p4')\n", " k = inv_stopnie2[d]\n", + " b = wspolczynnik_wiodacy(baza[k][1])\n", + " print('k', k, 'a', a)\n", " elt1 = [R(0), R(0)]\n", - " elt1[0] = elt[0] - a*baza[k][0]\n", - " elt1[1] = elt[1] - a*baza[k][1]\n", + " elt1[0] = elt[0] - a/b*baza[k][0]\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", " \n", " \n", @@ -213,7 +221,7 @@ }, { "cell_type": "code", - "execution_count": 156, + "execution_count": 131, "metadata": {}, "outputs": [], "source": [ @@ -261,7 +269,7 @@ }, { "cell_type": "code", - "execution_count": 157, + "execution_count": 132, "metadata": {}, "outputs": [], "source": [ @@ -269,8 +277,9 @@ " R. = PolynomialRing(GF(p))\n", " RR = FractionField(R)\n", " f = R(f)\n", - " M = floor(j*p/m)\n", - " return [0, f^M * RR(elt[1])^p] #eigenspace = j*p mod m\n", + " 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", @@ -279,21 +288,97 @@ " 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", - " return A.transpose()" + " return A.transpose()\n", + "\n", + "def wspolczynnik_wiodacy(f):\n", + " R. = 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. = 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. = 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", - "execution_count": 158, - "metadata": {}, + "execution_count": 134, + "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: [1, 0], 1: [x, 2/x]}" + "[0 4]\n", + "[0 4]" ] }, - "execution_count": 158, + "execution_count": 134, "metadata": {}, "output_type": "execute_result" } @@ -303,13 +388,13 @@ "j = 1\n", "p = 5\n", "f = x^3 + x+3\n", - "baza_dr(m, f, j, p)\n", - "#macierz_frob_dr(p, m, f, j)" + "print(baza_dr(m, f, j, p))\n", + "macierz_frob_dr(p, m, f, j)" ] }, { "cell_type": "code", - "execution_count": 159, + "execution_count": 135, "metadata": {}, "outputs": [ { @@ -318,7 +403,7 @@ "[0, (2*x^6 + 4*x^4 + 2*x^3 + 2*x^2 + 2*x + 3)/x^5]" ] }, - "execution_count": 159, + "execution_count": 135, "metadata": {}, "output_type": "execute_result" } @@ -329,993 +414,51 @@ }, { "cell_type": "code", - "execution_count": 160, + "execution_count": 136, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ + "[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", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\n", - "p4\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" ] }, { - "ename": "RecursionError", - "evalue": "maximum recursion depth exceeded while calling a Python object", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mRecursionError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mzapis_w_bazie_dr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \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[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m6\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m4\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m4\u001b[0m\u001b[0;34m)\u001b[0m \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[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m3\u001b[0m\u001b[0;34m)\u001b[0m \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[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m2\u001b[0m\u001b[0;34m)\u001b[0m \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[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m3\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m5\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mm\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;32m\u001b[0m in \u001b[0;36mzapis_w_bazie_dr\u001b[0;34m(elt, m, f, j, p)\u001b[0m\n\u001b[1;32m 85\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 86\u001b[0m \u001b[0melt1\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0melt\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mRR\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0melt\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0ma1\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0ma2\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mR\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0md\u001b[0m\u001b[0;34m)\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[0;32m---> 87\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mzapis_w_bazie_dr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0melt1\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mm\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 88\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 89\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'p4'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m\u001b[0m in \u001b[0;36mzapis_w_bazie_dr\u001b[0;34m(elt, m, f, j, p)\u001b[0m\n\u001b[1;32m 92\u001b[0m \u001b[0melt1\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0melt\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mbaza\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\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[1;32m 93\u001b[0m \u001b[0melt1\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0melt\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mbaza\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\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[0;32m---> 94\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mzapis_w_bazie_dr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0melt1\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mm\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mp\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0mvector\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0ma\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mGF\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mi\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mk\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mi\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbaza\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\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[1;32m 95\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 96\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", - "... last 1 frames repeated, from the frame below ...\n", - "\u001b[0;32m\u001b[0m in \u001b[0;36mzapis_w_bazie_dr\u001b[0;34m(elt, m, f, j, p)\u001b[0m\n\u001b[1;32m 92\u001b[0m \u001b[0melt1\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0melt\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mbaza\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\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[1;32m 93\u001b[0m \u001b[0melt1\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0melt\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mbaza\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\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[0;32m---> 94\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mzapis_w_bazie_dr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0melt1\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mm\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mp\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0mvector\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0ma\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mGF\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mi\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mk\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mi\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbaza\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\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[1;32m 95\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 96\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mRecursionError\u001b[0m: maximum recursion depth exceeded while calling a Python object" - ] + "data": { + "text/plain": [ + "(4, 4)" + ] + }, + "execution_count": 136, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ @@ -1324,7 +467,7 @@ }, { "cell_type": "code", - "execution_count": 106, + "execution_count": 137, "metadata": {}, "outputs": [ { @@ -1333,7 +476,7 @@ "4*x^4 + 4*x^3 + 4*x^2 + 4*x + 4" ] }, - "execution_count": 106, + "execution_count": 137, "metadata": {}, "output_type": "execute_result" } @@ -1345,48 +488,158 @@ }, { "cell_type": "code", - "execution_count": 60, + "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": [ - "{0: [x^2, 0], 1: [x, 0], 2: [1, 0]}" + "True" ] }, - "execution_count": 60, + "execution_count": 138, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "m = 5\n", + "m = 4\n", "j = 1\n", "p = 5\n", - "f = x^4 + x+2\n", - "baza_dr(m, f, j, p)" + "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": 61, + "execution_count": 141, + "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", + "p3a\n", + "? -9\n", + "[2*x^2 + 2, (3*x^4 + 2*x^3 + 4*x^2 + 3*x + 2)/x^5] czy w dr False\n", + "d 1 a 3 dostepne: {0: 1, 1: 2} czy w stopnie 2 False\n", + "p4\n", + "k 0 a 3\n", + "[2*x^2 + 2, (2*x^3 + 4*x^2 + 3*x + 2)/x^5] czy w dr False\n", + "d 2 a 2 dostepne: {0: 1, 1: 2} czy w stopnie 2 True\n", + "p4\n", + "k 1 a 2\n", + "[2*x^2 + 4, (4*x^2 + 3*x + 2)/x^5] czy w dr False\n", + "d 3 a 4 dostepne: {0: 1, 1: 2} czy w stopnie 2 True\n", + "p3\n", + "p3a\n", + "? 3\n", + "[2*x^2 + 4, (3*x + 2)/x^5] czy w dr False\n", + "d 4 a 3 dostepne: {0: 1, 1: 2} czy w stopnie 2 True\n", + "p3\n", + "p3a\n", + "? 7\n", + "[2*x^2 + 4, 2/x^5] czy w dr False\n", + "d 5 a 2 dostepne: {0: 1, 1: 2} czy w stopnie 2 True\n", + "p3\n", + "p3a\n", + "? 11\n", + "[2*x^2 + 4, 0] czy w dr False\n", + "p2\n" + ] + }, + { + "ename": "KeyError", + "evalue": "2", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mmacierz_frob_dr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mp\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mm\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\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;32m\u001b[0m in \u001b[0;36mmacierz_frob_dr\u001b[0;34m(p, m, f, j)\u001b[0m\n\u001b[1;32m 12\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mk\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbaza\u001b[0m\u001b[0;34m)\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[1;32m 13\u001b[0m \u001b[0mfrob\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfrobenius_dr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mp\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mm\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbaza\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mj\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 14\u001b[0;31m \u001b[0mv\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mzapis_w_bazie_dr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfrob\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mm\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 15\u001b[0m \u001b[0mA\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m:\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmatrix\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mv\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 16\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mA\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtranspose\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[0;32m\u001b[0m in \u001b[0;36mzapis_w_bazie_dr\u001b[0;34m(elt, m, f, j, p)\u001b[0m\n\u001b[1;32m 85\u001b[0m \u001b[0mj1\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mm\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0mj\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 86\u001b[0m \u001b[0melt1\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0melt\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mj1\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0md1\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mderivative\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0mm\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0md1\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0md1\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mRR\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0melt\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mR\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0md1\u001b[0m\u001b[0;34m)\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[0;32m---> 87\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mzapis_w_bazie_dr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0melt1\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mm\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 88\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 89\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'p4'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m\u001b[0m in \u001b[0;36mzapis_w_bazie_dr\u001b[0;34m(elt, m, f, j, p)\u001b[0m\n\u001b[1;32m 85\u001b[0m \u001b[0mj1\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mm\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0mj\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 86\u001b[0m \u001b[0melt1\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0melt\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mj1\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0md1\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mderivative\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0mm\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0md1\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0md1\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mRR\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0melt\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mR\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0md1\u001b[0m\u001b[0;34m)\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[0;32m---> 87\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mzapis_w_bazie_dr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0melt1\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mm\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 88\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 89\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'p4'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m\u001b[0m in \u001b[0;36mzapis_w_bazie_dr\u001b[0;34m(elt, m, f, j, p)\u001b[0m\n\u001b[1;32m 85\u001b[0m \u001b[0mj1\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mm\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0mj\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 86\u001b[0m \u001b[0melt1\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0melt\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mj1\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0md1\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mderivative\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0mm\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0md1\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0md1\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mRR\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0melt\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mR\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0md1\u001b[0m\u001b[0;34m)\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[0;32m---> 87\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mzapis_w_bazie_dr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0melt1\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mm\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 88\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 89\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'p4'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m\u001b[0m in \u001b[0;36mzapis_w_bazie_dr\u001b[0;34m(elt, m, f, j, p)\u001b[0m\n\u001b[1;32m 85\u001b[0m \u001b[0mj1\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mm\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0mj\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 86\u001b[0m \u001b[0melt1\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0melt\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mj1\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0md1\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mderivative\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0mm\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0md1\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0md1\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mRR\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0melt\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mR\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0md1\u001b[0m\u001b[0;34m)\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[0;32m---> 87\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mzapis_w_bazie_dr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0melt1\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mm\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 88\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 89\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'p4'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m\u001b[0m in \u001b[0;36mzapis_w_bazie_dr\u001b[0;34m(elt, m, f, j, p)\u001b[0m\n\u001b[1;32m 94\u001b[0m \u001b[0melt1\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0melt\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0mb\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mbaza\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\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[1;32m 95\u001b[0m \u001b[0melt1\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0melt\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0mb\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mbaza\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\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[0;32m---> 96\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mzapis_w_bazie_dr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0melt1\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mm\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mp\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0mvector\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0ma\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mGF\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mi\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mk\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mi\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbaza\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\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[1;32m 97\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 98\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m\u001b[0m in \u001b[0;36mzapis_w_bazie_dr\u001b[0;34m(elt, m, f, j, p)\u001b[0m\n\u001b[1;32m 94\u001b[0m \u001b[0melt1\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0melt\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0mb\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mbaza\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\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[1;32m 95\u001b[0m \u001b[0melt1\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0melt\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0mb\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mbaza\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\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[0;32m---> 96\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mzapis_w_bazie_dr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0melt1\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mm\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mp\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0mvector\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0ma\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mGF\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mi\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mk\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mi\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbaza\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\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[1;32m 97\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 98\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m\u001b[0m in \u001b[0;36mzapis_w_bazie_dr\u001b[0;34m(elt, m, f, j, p)\u001b[0m\n\u001b[1;32m 85\u001b[0m \u001b[0mj1\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mm\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0mj\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 86\u001b[0m \u001b[0melt1\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0melt\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mj1\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0md1\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mderivative\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0mm\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0md1\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0md1\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mRR\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0melt\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mR\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0md1\u001b[0m\u001b[0;34m)\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[0;32m---> 87\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mzapis_w_bazie_dr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0melt1\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mm\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 88\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 89\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'p4'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m\u001b[0m in \u001b[0;36mzapis_w_bazie_dr\u001b[0;34m(elt, m, f, j, p)\u001b[0m\n\u001b[1;32m 85\u001b[0m \u001b[0mj1\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mm\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0mj\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 86\u001b[0m \u001b[0melt1\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0melt\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mj1\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0md1\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mderivative\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0mm\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0md1\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0md1\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mRR\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0melt\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mR\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0md1\u001b[0m\u001b[0;34m)\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[0;32m---> 87\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mzapis_w_bazie_dr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0melt1\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mm\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 88\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 89\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'p4'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m\u001b[0m in \u001b[0;36mzapis_w_bazie_dr\u001b[0;34m(elt, m, f, j, p)\u001b[0m\n\u001b[1;32m 85\u001b[0m \u001b[0mj1\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mm\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0mj\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 86\u001b[0m \u001b[0melt1\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0melt\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mj1\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0md1\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mderivative\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0mm\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0md1\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0md1\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mRR\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0melt\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mR\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0md1\u001b[0m\u001b[0;34m)\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[0;32m---> 87\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mzapis_w_bazie_dr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0melt1\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mm\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 88\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 89\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'p4'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m\u001b[0m in \u001b[0;36mzapis_w_bazie_dr\u001b[0;34m(elt, m, f, j, p)\u001b[0m\n\u001b[1;32m 56\u001b[0m \u001b[0md\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0melt\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\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[1;32m 57\u001b[0m \u001b[0ma\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0melt\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcoefficients\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0msparse\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfalse\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0md\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 58\u001b[0;31m \u001b[0mk\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0minv_stopnie_holo\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0md\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;31m#ktory element bazy jest stopnia d? ten o indeksie k\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 59\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 60\u001b[0m \u001b[0ma1\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mbaza\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcoefficients\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0msparse\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfalse\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0md\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mKeyError\u001b[0m: 2" + ] + } + ], + "source": [ + "macierz_frob_dr(p, m, f, 1)" + ] + }, + { + "cell_type": "code", + "execution_count": 96, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "[0 0 0]\n", - "[0 0 0]\n", - "[0 0 0]" + "2" ] }, - "execution_count": 61, + "execution_count": 96, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "macierz_frob_dr(p, m, f, j)" + "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\u001b[0m in \u001b[0;36m\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()" ] }, {