diff --git a/deRhamComputation.ipynb b/deRhamComputation.ipynb index ef878fc..a5f5628 100644 --- a/deRhamComputation.ipynb +++ b/deRhamComputation.ipynb @@ -73,7 +73,7 @@ }, { "cell_type": "code", - "execution_count": 92, + "execution_count": 155, "metadata": {}, "outputs": [], "source": [ @@ -110,8 +110,9 @@ "#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)\n", " R. = PolynomialRing(GF(p))\n", + " RR = FractionField(R)\n", " f = R(f)\n", " r = f.degree()\n", " delta = GCD(m, r)\n", @@ -150,16 +151,21 @@ " a2 = g2.coefficients(sparse = false)[d2]\n", " a = a1/a2\n", " d = d2 - d1\n", + " Rr = r/delta\n", + " M = 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*m - (m-j)*r >= 0):\n", + " if (d not in inv_stopnie2):\n", " print('p3')\n", - " elt1 = [R(0), R(0)]\n", - " elt1[0] = elt[0]\n", + " if d>= 0:\n", + " elt1 = [elt[0], RR(elt[1]) - a1/a2*1/R(x^d)]\n", + " else:\n", + " elt1 = [elt[0], RR(elt[1]) - a1/a2*R(x^(-d))]\n", " return zapis_w_bazie_dr(elt1, m, f, j, p)\n", " \n", " print('p4')\n", - " stopnie2 = stopnie_drugiej_wspolrzednej_bazy_dr(m, f, j, p)\n", - " inv_stopnie2 = {v: k for k, v in stopnie2.items()} \n", " k = inv_stopnie2[d]\n", " elt1 = [R(0), R(0)]\n", " elt1[0] = elt[0] - a*baza[k][0]\n", @@ -207,7 +213,7 @@ }, { "cell_type": "code", - "execution_count": 93, + "execution_count": 156, "metadata": {}, "outputs": [], "source": [ @@ -255,7 +261,7 @@ }, { "cell_type": "code", - "execution_count": 94, + "execution_count": 157, "metadata": {}, "outputs": [], "source": [ @@ -278,7 +284,7 @@ }, { "cell_type": "code", - "execution_count": 95, + "execution_count": 158, "metadata": {}, "outputs": [ { @@ -287,7 +293,7 @@ "{0: [1, 0], 1: [x, 2/x]}" ] }, - "execution_count": 95, + "execution_count": 158, "metadata": {}, "output_type": "execute_result" } @@ -303,7 +309,7 @@ }, { "cell_type": "code", - "execution_count": 96, + "execution_count": 159, "metadata": {}, "outputs": [ { @@ -312,7 +318,7 @@ "[0, (2*x^6 + 4*x^4 + 2*x^3 + 2*x^2 + 2*x + 3)/x^5]" ] }, - "execution_count": 96, + "execution_count": 159, "metadata": {}, "output_type": "execute_result" } @@ -323,27 +329,992 @@ }, { "cell_type": "code", - "execution_count": 97, + "execution_count": 160, "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]\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" ] }, { - "ename": "KeyError", - "evalue": "-1", + "ename": "RecursionError", + "evalue": "maximum recursion depth exceeded while calling a Python object", "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[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 82\u001b[0m \u001b[0mstopnie2\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mstopnie_drugiej_wspolrzednej_bazy_dr\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[1;32m 83\u001b[0m \u001b[0minv_stopnie2\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m{\u001b[0m\u001b[0mv\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mk\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mk\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mv\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mstopnie2\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mitems\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---> 84\u001b[0;31m \u001b[0mk\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0minv_stopnie2\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[0m\u001b[1;32m 85\u001b[0m \u001b[0melt1\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0mR\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[0mR\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[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 86\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[0;31mKeyError\u001b[0m: -1" + "\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" ] } ], @@ -353,7 +1324,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 106, "metadata": {}, "outputs": [ { @@ -362,7 +1333,7 @@ "4*x^4 + 4*x^3 + 4*x^2 + 4*x + 4" ] }, - "execution_count": 19, + "execution_count": 106, "metadata": {}, "output_type": "execute_result" }