From 64d8abe97875c97cd5fdb0bcf56ed95bcd0c96a1 Mon Sep 17 00:00:00 2001 From: jgarnek Date: Tue, 1 Nov 2022 17:40:44 +0000 Subject: [PATCH] przed malymi porzadkami --- ...ntary_covers_of_superelliptic_curves.ipynb | 361 +++++++++--------- 1 file changed, 184 insertions(+), 177 deletions(-) diff --git a/elementary_covers_of_superelliptic_curves.ipynb b/elementary_covers_of_superelliptic_curves.ipynb index 8ff7310..fa5f730 100644 --- a/elementary_covers_of_superelliptic_curves.ipynb +++ b/elementary_covers_of_superelliptic_curves.ipynb @@ -846,10 +846,13 @@ " \n", " if len(forms) < self.genus():\n", " print(\"I haven't found all forms.\")\n", + " return holomorphic_differentials_basis(self, parameter = parameter + 1)\n", + " if len(forms) > self.genus():\n", + " print(\"Increase precision.\")\n", " return forms\n", " \n", " ##find fcts with pole order in infty's at most pole_order\n", - " def at_most_poles(self, pole_order):\n", + " def at_most_poles(self, pole_order, parameter = 8):\n", " from itertools import product\n", " x_series = self.x\n", " y_series = self.y\n", @@ -874,7 +877,7 @@ " S = []\n", " RQxyz = FractionField(Rxyz)\n", " pr = [list(GF(p)) for _ in range(n)]\n", - " for i in range(0, 10*r):\n", + " for i in range(0, parameter*r):\n", " for j in range(0, m):\n", " for k in product(*pr):\n", " eta = as_function(self, x^i * prod(z[i1]^(k[i1]) for i1 in range(n))*y^j)\n", @@ -889,16 +892,16 @@ " \n", " return forms\n", " \n", - " def magical_element(self):\n", - " list_of_elts = self.at_most_poles(self.exponent_of_different_prim())\n", + " def magical_element(self, parameter = 8):\n", + " list_of_elts = self.at_most_poles(self.exponent_of_different_prim(), parameter)\n", " result = []\n", " for a in list_of_elts:\n", " if a.trace().function != 0:\n", " result += [a]\n", " return result\n", "\n", - " def pseudo_magical_element(self):\n", - " list_of_elts = self.at_most_poles(self.exponent_of_different())\n", + " def pseudo_magical_element(self, parameter = 8):\n", + " list_of_elts = self.at_most_poles(self.exponent_of_different(), parameter)\n", " result = []\n", " for a in list_of_elts:\n", " if a.trace().function != 0:\n", @@ -906,7 +909,7 @@ " return result\n", " \n", " ##find fcts with pole order in infty's at most pole_order\n", - " def at_most_poles_forms(self, pole_order):\n", + " def at_most_poles_forms(self, pole_order, parameter = 8):\n", " from itertools import product\n", " x_series = self.x\n", " y_series = self.y\n", @@ -931,7 +934,7 @@ " S = []\n", " RQxyz = FractionField(Rxyz)\n", " pr = [list(GF(p)) for _ in range(n)]\n", - " for i in range(0, 12*r):\n", + " for i in range(0, parameter*r):\n", " for j in range(0, m):\n", " for k in product(*pr):\n", " eta = as_form(self, x^i * prod(z[i1]^(k[i1]) for i1 in range(n))/y^j)\n", @@ -1144,34 +1147,9 @@ " sub_list = {x : x, y : y} | {z[j] : z[j]+ZN_tuple[j] for j in range(n)}\n", " g = self.form\n", " return as_form(C, g.substitute(sub_list))\n", - " \n", - " def coordinates(self):\n", - " C = self.curve\n", - " n = C.height\n", - " gC = C.genus()\n", - " F = C.base_ring\n", - " holo = C.holomorphic_differentials_basis()\n", - " nb_of_coeffs = 2*gC\n", - " holo_exp = [omega.expansion_at_infty() for omega in holo]\n", - " list_of_coeffs = []\n", - " for omega in holo_exp:\n", - " a = omega.valuation()\n", - " added_list = list(omega)[:nb_of_coeffs]\n", - " added_list = a*[0] + added_list\n", - " added_list = added_list[:nb_of_coeffs]\n", - " list_of_coeffs += [added_list]\n", - " M = matrix(F, list_of_coeffs)\n", - " M = M.transpose()\n", - " omega = self.expansion_at_infty()\n", - " a = omega.valuation()\n", - " v = list(omega)[:nb_of_coeffs]\n", - " v = a*[0] + v\n", - " v = v[:nb_of_coeffs]\n", - " v = vector(v)\n", - " v1 = M.solve_right(v)\n", - " return v1\n", - " \n", - " def coordinates2(self, holo):\n", + "\n", + " #Find coordinates of the given form self in terms of the basis forms in a list \"holo\"\n", + " def coordinates(self, holo):\n", " C = self.curve\n", " n = C.height\n", " gC = C.genus()\n", @@ -1271,23 +1249,6 @@ " return is_linearly_dependent([Rxyz(denominators*omega.form) for omega in set_of_forms])\n", "\n", "def group_action_matrices(C_AS):\n", - " holo = C_AS.holomorphic_differentials_basis()\n", - " F = C_AS.base_ring\n", - " n = C_AS.height\n", - " A = [[] for i in range(n)]\n", - " for omega in holo:\n", - " for i in range(n):\n", - " ei = n*[0]\n", - " ei[i] = 1\n", - " omega1 = omega.group_action(ei)\n", - " v1 = omega1.coordinates()\n", - " A[i] += [v1]\n", - " for i in range(n):\n", - " A[i] = matrix(F, A[i])\n", - " A[i] = A[i].transpose()\n", - " return A\n", - "\n", - "def group_action_matrices2(C_AS):\n", " F = C_AS.base_ring\n", " n = C_AS.height\n", " holo = C_AS.holomorphic_differentials_basis()\n", @@ -1307,14 +1268,14 @@ " ei[i] = 1\n", " omega1 = omega.group_action(ei)\n", " omega1 = denom * omega1\n", - " v1 = omega1.coordinates2(holo_forms)\n", + " v1 = omega1.coordinates(holo_forms)\n", " A[i] += [v1]\n", " for i in range(n):\n", " A[i] = matrix(F, A[i])\n", " A[i] = A[i].transpose()\n", " return A\n", "\n", - "def group_action_matrices2_log(C_AS):\n", + "def group_action_matrices_log(C_AS):\n", " F = C_AS.base_ring\n", " n = C_AS.height\n", " holo = C_AS.at_most_poles_forms(1)\n", @@ -1334,7 +1295,7 @@ " ei[i] = 1\n", " omega1 = omega.group_action(ei)\n", " omega1 = denom * omega1\n", - " v1 = omega1.coordinates2(holo_forms)\n", + " v1 = omega1.coordinates(holo_forms)\n", " A[i] += [v1]\n", " for i in range(n):\n", " A[i] = matrix(F, A[i])\n", @@ -1418,7 +1379,23 @@ " for a in list2:\n", " if not(are_forms_linearly_dependent(list1 + result + [a])):\n", " result += [a]\n", - " return result" + " return result\n", + "\n", + "#find decomposition into indecomposables using magma\n", + "def magmathis(A, B, p, deg = 1):\n", + " n = A.dimensions()[0]\n", + " A = str(list(A))\n", + " B = str(list(B))\n", + " A = A.replace(\"(\", \"\")\n", + " A = A.replace(\")\", \"\")\n", + " B = B.replace(\"(\", \"\")\n", + " B = B.replace(\")\", \"\")\n", + " result = \"A := MatrixAlgebra;\"\n", + " result += \"M := RModule(RSpace(GF(\"+str(p)+\"^\" + str(deg)+\"),\" + str(n) + \"), A);\"\n", + " result += \"IndecomposableSummands(M);\"\n", + " print(magma_free(result))" ] }, { @@ -1746,7 +1723,31 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + ], + "source": [ + "p = 7\n", + "m = 2\n", + "F = GF(p)\n", + "Rx. = PolynomialRing(F)\n", + "f = x^3 + 1\n", + "C_super = superelliptic(f, m)\n", + "\n", + "Rxy. = PolynomialRing(F, 2)\n", + "f1 = superelliptic_function(C_super, x^2*y)\n", + "f2 = superelliptic_function(C_super, x^3)\n", + "AS = as_cover(C_super, [f1, f2], prec=1000)\n", + "#print(AS.magical_element())\n", + "#print(AS.pseudo_magical_element())" + ] + }, + { + "cell_type": "code", + "execution_count": 19, "metadata": { "collapsed": false }, @@ -1755,46 +1756,48 @@ "name": "stdout", "output_type": "stream", "text": [ - "t^-10 + O(1)\n" + "True\n", + "True\n", + "True\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + } + ], + "source": [ + "#A, B = group_action_matrices2_log(AS1)\n", + "A, B = group_action_matrices2(AS)\n", + "n = A.dimensions()[0]\n", + "print(A*B == B*A)\n", + "print(A^p == identity_matrix(n))\n", + "print(B^p == identity_matrix(n))\n", + "magmathis(A, B, p, deg = 1)" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "t^-5 + 2*t + O(t^5)\n", + "t^-6 + 3 + O(t^4)\n" ] } ], "source": [ - "p = 5\n", - "m = 8\n", - "F = GF(p)\n", - "Rx. = PolynomialRing(F)\n", - "f = x^6 + 1\n", - "C_super = superelliptic(f, m)\n", - "\n", - "Rxy. = PolynomialRing(F, 2)\n", - "f1 = superelliptic_function(C_super, x*y^2)\n", "print(f1.expansion_at_infty())\n", - "AS = as_cover(C_super, [f1], prec=500)" - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "lll = AS.holomorphic_differentials_basis()" - ] - }, - { - "cell_type": "code", - "execution_count": 29, - "metadata": { - "collapsed": false - }, - "outputs": [ - ], - "source": [ - "f = AS.holomorphic_differentials_basis()[0].trace()" + "print(f2.expansion_at_infty())" ] }, { @@ -1846,28 +1849,14 @@ }, { "cell_type": "code", - "execution_count": 54, + "execution_count": 16, "metadata": { "collapsed": false }, "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[-2*x^10 + 2*x^9*y + 2*x^8 - x^7*y + z0^4*z1^4, -2*x^7*z0^4*z1^4 + 2*x^6*y*z0^4*z1^4 + 2*x^5*z0^4*z1^4 - x^4*y*z0^4*z1^4 + y*z0^4*z1^4, -2*x^7*z0^4*z1^4 + 2*x^6*y*z0^4*z1^4 + 2*x^5*z0^4*z1^4 - x^4*y*z0^4*z1^4 + x*z0^4*z1^4, x^6*z0^4*z1^4 - x^5*y*z0^4*z1^4 + 2*x^4*z0^4*z1^4 + x^10 - x^9*y + x*y*z0^4*z1^4 - x^8 - 2*x^7*y, x^6*z0^4*z1^4 - x^5*y*z0^4*z1^4 + 2*x^4*z0^4*z1^4 + x^2*z0^4*z1^4, 2*x^7*z0^4*z1^4 - 2*x^6*y*z0^4*z1^4 + x^5*z0^4*z1^4 - 2*x^4*y*z0^4*z1^4 + x^2*y*z0^4*z1^4, x^7*z0^4*z1^4 - x^6*y*z0^4*z1^4 + 2*x^5*z0^4*z1^4 + x^3*z0^4*z1^4, 2*x^6*z0^4*z1^4 - 2*x^5*y*z0^4*z1^4 - 2*x^4*z0^4*z1^4 + x^3*y*z0^4*z1^4 - 2*x^10 + 2*x^9*y + 2*x^8 - x^7*y]\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[-x^9*z0*z1^3 + x^8*y*z0*z1^3 + 2*x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 + 2*x^8*y - x^6*z0^3 - 2*x^5*z0^4 - x^7*z1^2 - 2*x^5*z0^2*z1^2 - 2*x^7*z1 + x^5*y*z0*z1 - 2*x^5*z0^2*z1 + 2*x^4*y*z0^2*z1 - x^6*y, 2*x^6*z0^4*z1^4 - 2*x^5*y*z0^4*z1^4 + 2*x^9*z0*z1^3 - 2*x^8*y*z0*z1^3 + 2*x^7*z0^3*z1^3 - 2*x^6*y*z0^3*z1^3 + x^9*z0^3 - x^8*y*z0^3 + 2*x^10*z1^2 - 2*x^9*y*z1^2 + 2*x^8*z0^2*z1^2 - 2*x^7*y*z0^2*z1^2 - 2*x^4*z0^4*z1^4 + x^3*y*z0^4*z1^4 + 2*x^10*z1 - 2*x^9*y*z1 + 2*x^9*z0*z1 - 2*x^8*y*z0*z1 - x^7*z0*z1^3 - 2*x^5*z0^3*z1^3 + x^4*y*z0^3*z1^3 + x^10 - x^9*y + 2*x^7*z0^3 - x^8*z1^2 - 2*x^6*z0^2*z1^2 + x^5*y*z0^2*z1^2 + 2*x^8*z1 + 2*x^7*y*z1 - 2*x^7*z0*z1 + x^6*y*z0*z1 + 2*x^5*z0*z1^3 - x^8 - 2*x^7*y + x^5*z0^3 + 2*x^6*z1^2 - x^6*z1 - x^5*y*z1 + x^6 - x^5*y]\n" - ] - } ], "source": [ - "p = 5\n", + "p = 3\n", "m = 2\n", "F = GF(p)\n", "#F = GF(p^2, 'a')\n", @@ -1877,42 +1866,24 @@ "C_super = superelliptic(f, m)\n", "\n", "Rxy. = PolynomialRing(F, 2)\n", - "f1 = superelliptic_function(C_super, x^3)\n", + "f1 = superelliptic_function(C_super, x)\n", "f2 = superelliptic_function(C_super, x^2)\n", "AS1 = as_cover(C_super, [f1, f2], prec=300)\n", - "print(AS1.pseudo_magical_element())\n", - "print(AS1.magical_element())" + "#print(AS1.pseudo_magical_element())\n", + "#print(AS1.magical_element())" ] }, { "cell_type": "code", - "execution_count": 55, + "execution_count": 17, "metadata": { "collapsed": false }, "outputs": [ - { - "ename": "ZeroDivisionError", - "evalue": "inverse of Mod(0, 5) does not exist", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mZeroDivisionError\u001b[0m Traceback (most recent call last)", - "Input \u001b[0;32mIn [55]\u001b[0m, in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m#A, B = group_action_matrices2_log(AS1)\u001b[39;00m\n\u001b[0;32m----> 2\u001b[0m A, B \u001b[38;5;241m=\u001b[39m \u001b[43mgroup_action_matrices2\u001b[49m\u001b[43m(\u001b[49m\u001b[43mAS1\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 3\u001b[0m magmathis(A, B, Integer(\u001b[38;5;241m3\u001b[39m), deg \u001b[38;5;241m=\u001b[39m Integer(\u001b[38;5;241m1\u001b[39m))\n", - "Input \u001b[0;32mIn [2]\u001b[0m, in \u001b[0;36mgroup_action_matrices2\u001b[0;34m(C_AS)\u001b[0m\n\u001b[1;32m 586\u001b[0m omega1 \u001b[38;5;241m=\u001b[39m omega\u001b[38;5;241m.\u001b[39mgroup_action(ei)\n\u001b[1;32m 587\u001b[0m omega1 \u001b[38;5;241m=\u001b[39m denom \u001b[38;5;241m*\u001b[39m omega1\n\u001b[0;32m--> 588\u001b[0m v1 \u001b[38;5;241m=\u001b[39m \u001b[43momega1\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcoordinates2\u001b[49m\u001b[43m(\u001b[49m\u001b[43mholo_forms\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 589\u001b[0m A[i] \u001b[38;5;241m+\u001b[39m\u001b[38;5;241m=\u001b[39m [v1]\n\u001b[1;32m 590\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m i \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mrange\u001b[39m(n):\n", - "Input \u001b[0;32mIn [2]\u001b[0m, in \u001b[0;36mas_form.coordinates2\u001b[0;34m(self, holo)\u001b[0m\n\u001b[1;32m 462\u001b[0m z \u001b[38;5;241m=\u001b[39m Rxyz\u001b[38;5;241m.\u001b[39mgens()[Integer(\u001b[38;5;241m2\u001b[39m):]\n\u001b[1;32m 463\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01msage\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mrings\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mpolynomial\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mtoy_variety\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m linear_representation\n\u001b[0;32m--> 464\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mlinear_representation\u001b[49m\u001b[43m(\u001b[49m\u001b[43mRxyz\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mform\u001b[49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mholo\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m/ext/sage/9.7/src/sage/rings/polynomial/toy_variety.py:220\u001b[0m, in \u001b[0;36mlinear_representation\u001b[0;34m(p, polys)\u001b[0m\n\u001b[1;32m 218\u001b[0m n \u001b[38;5;241m=\u001b[39m M\u001b[38;5;241m.\u001b[39mnrows() \u001b[38;5;241m-\u001b[39m \u001b[38;5;241m1\u001b[39m\n\u001b[1;32m 219\u001b[0m offset \u001b[38;5;241m=\u001b[39m M\u001b[38;5;241m.\u001b[39mncols() \u001b[38;5;241m-\u001b[39m M\u001b[38;5;241m.\u001b[39mnrows()\n\u001b[0;32m--> 220\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m [M[n, offset \u001b[38;5;241m+\u001b[39m each] \u001b[38;5;241m/\u001b[39m (\u001b[38;5;241m-\u001b[39mM[n, j]) \u001b[38;5;28;01mfor\u001b[39;00m each \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mrange\u001b[39m(\u001b[38;5;28mlen\u001b[39m(polys))]\n", - "File \u001b[0;32m/ext/sage/9.7/src/sage/rings/polynomial/toy_variety.py:220\u001b[0m, in \u001b[0;36m\u001b[0;34m(.0)\u001b[0m\n\u001b[1;32m 218\u001b[0m n \u001b[38;5;241m=\u001b[39m M\u001b[38;5;241m.\u001b[39mnrows() \u001b[38;5;241m-\u001b[39m \u001b[38;5;241m1\u001b[39m\n\u001b[1;32m 219\u001b[0m offset \u001b[38;5;241m=\u001b[39m M\u001b[38;5;241m.\u001b[39mncols() \u001b[38;5;241m-\u001b[39m M\u001b[38;5;241m.\u001b[39mnrows()\n\u001b[0;32m--> 220\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m [\u001b[43mM\u001b[49m\u001b[43m[\u001b[49m\u001b[43mn\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43moffset\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m+\u001b[39;49m\u001b[43m \u001b[49m\u001b[43meach\u001b[49m\u001b[43m]\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m/\u001b[39;49m\u001b[43m \u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m-\u001b[39;49m\u001b[43mM\u001b[49m\u001b[43m[\u001b[49m\u001b[43mn\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mj\u001b[49m\u001b[43m]\u001b[49m\u001b[43m)\u001b[49m \u001b[38;5;28;01mfor\u001b[39;00m each \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mrange\u001b[39m(\u001b[38;5;28mlen\u001b[39m(polys))]\n", - "File \u001b[0;32m/ext/sage/9.7/src/sage/structure/element.pyx:1737\u001b[0m, in \u001b[0;36msage.structure.element.Element.__truediv__\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1735\u001b[0m cdef int cl = classify_elements(left, right)\n\u001b[1;32m 1736\u001b[0m if HAVE_SAME_PARENT(cl):\n\u001b[0;32m-> 1737\u001b[0m return (left)._div_(right)\n\u001b[1;32m 1738\u001b[0m if BOTH_ARE_ELEMENT(cl):\n\u001b[1;32m 1739\u001b[0m return coercion_model.bin_op(left, right, truediv)\n", - "File \u001b[0;32m/ext/sage/9.7/src/sage/rings/finite_rings/integer_mod.pyx:2623\u001b[0m, in \u001b[0;36msage.rings.finite_rings.integer_mod.IntegerMod_int._div_\u001b[0;34m()\u001b[0m\n\u001b[1;32m 2621\u001b[0m right_inverse = self.__modulus.inverses[(right).ivalue]\n\u001b[1;32m 2622\u001b[0m if right_inverse is None:\n\u001b[0;32m-> 2623\u001b[0m raise ZeroDivisionError(f\"inverse of Mod({right}, {self.__modulus.sageInteger}) does not exist\")\n\u001b[1;32m 2624\u001b[0m else:\n\u001b[1;32m 2625\u001b[0m return self._new_c((self.ivalue * (right_inverse).ivalue) % self.__modulus.int32)\n", - "\u001b[0;31mZeroDivisionError\u001b[0m: inverse of Mod(0, 5) does not exist" - ] - } ], "source": [ "#A, B = group_action_matrices2_log(AS1)\n", - "A, B = group_action_matrices2(AS1)\n", - "magmathis(A, B, 3, deg = 1)" + "A, B = group_action_matrices(AS1)" ] }, { @@ -1964,11 +1935,22 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [ + { + "ename": "NameError", + "evalue": "name 'AS1' is not defined", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", + "Input \u001b[0;32mIn [6]\u001b[0m, in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m#A, B = group_action_matrices2_log(AS1)\u001b[39;00m\n\u001b[0;32m----> 2\u001b[0m A, B \u001b[38;5;241m=\u001b[39m group_action_matrices2(\u001b[43mAS1\u001b[49m)\n", + "\u001b[0;31mNameError\u001b[0m: name 'AS1' is not defined" + ] + } ], "source": [ "#A, B = group_action_matrices2_log(AS1)\n", @@ -1977,7 +1959,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 18, "metadata": { "collapsed": false }, @@ -2024,27 +2006,13 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 7, "metadata": { "collapsed": false }, "outputs": [ ], "source": [ - "def magmathis(A, B, p, deg = 1):\n", - " n = A.dimensions()[0]\n", - " A = str(list(A))\n", - " B = str(list(B))\n", - " A = A.replace(\"(\", \"\")\n", - " A = A.replace(\")\", \"\")\n", - " B = B.replace(\"(\", \"\")\n", - " B = B.replace(\")\", \"\")\n", - " result = \"A := MatrixAlgebra;\"\n", - " result += \"M := RModule(RSpace(GF(\"+str(p)+\"^\" + str(deg)+\"),\" + str(n) + \"), A);\"\n", - " result += \"IndecomposableSummands(M);\"\n", - " print(magma_free(result))" ] }, { @@ -2076,53 +2044,66 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 9, "metadata": { "collapsed": false }, "outputs": [ - { - "data": { - "text/plain": [ - ">> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n", - " ^\n", - "Runtime error in 'RModule': Arguments have incompatible coefficient rings\n", - ">> IndecomposableSummands(M);\n", - " ^\n", - "User error: Identifier 'M' has not been declared or assigned" - ] - }, - "execution_count": 23, - "metadata": { - }, - "output_type": "execute_result" - } ], "source": [ - "magma_free(\"A := MatrixAlgebra; M := RModule(RSpace(GF(3),29), A); IndecomposableSummands(M);\")" + "def magmatxt(A, B, p, deg = 1):\n", + " n = A.dimensions()[0]\n", + " A = str(list(A))\n", + " B = str(list(B))\n", + " A = A.replace(\"(\", \"\")\n", + " A = A.replace(\")\", \"\")\n", + " B = B.replace(\"(\", \"\")\n", + " B = B.replace(\")\", \"\")\n", + " result = \"A := MatrixAlgebra;\"\n", + " result += \"M := RModule(RSpace(GF(\"+str(p)+\"^\" + str(deg)+\"),\" + str(n) + \"), A);\"\n", + " result += \"IndecomposableSummands(M);\"\n", + " print(result)" ] }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 19, "metadata": { "collapsed": false }, "outputs": [ { - "ename": "SyntaxError", - "evalue": "unterminated string literal (detected at line 1) (524777058.py, line 1)", - "output_type": "error", - "traceback": [ - "\u001b[0;36m Input \u001b[0;32mIn [13]\u001b[0;36m\u001b[0m\n\u001b[0;31m hh = \"A := MatrixAlgebra;M := RModule(RSpace(GF(3^1),14), A);IndecomposableSummands(M);\n" ] } ], "source": [ - "hh = \"A := MatrixAlgebra; \n", - "M := RModule(RSpace(GF(3),29), A); \n", - "IndecomposableSummands(M);\"" + "magmatxt(A, B, p)" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false, + "scrolled": true + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING: Some output was deleted.\n" + ] + } + ], + "source": [ + "magmatxtx(A, B, p)" ] }, { @@ -2134,6 +2115,32 @@ "outputs": [ ], "source": [ + "def magmathis(A, B, p, deg = 1):\n", + " n = A.dimensions()[0]\n", + " A = str(list(A))\n", + " B = str(list(B))\n", + " A = A.replace(\"(\", \"\")\n", + " A = A.replace(\")\", \"\")\n", + " B = B.replace(\"(\", \"\")\n", + " B = B.replace(\")\", \"\")\n", + " result = \"A := MatrixAlgebra;\"\n", + " result += \"M := RModule(RSpace(GF(\"+str(p)+\"^\" + str(deg)+\"),\" + str(n) + \"), A);\"\n", + " result += \"IndecomposableSummands(M);\"\n", + " print(magma_free(result))" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "A := MatrixAlgebra;\n", + "M := RModule(RSpace(GF(3^1),14), A);\n", + "lll := IndecomposableSummands(M);\n", + "Morphism(lll[2], M);" ] } ],