{ "cells": [ { "cell_type": "markdown", "id": "a6a83522-f953-4884-a2b4-da2b1ed5f484", "metadata": {}, "source": [] }, { "cell_type": "code", "execution_count": 59, "id": "731aa3f2-2822-491a-b5c8-150ad760c626", "metadata": {}, "outputs": [], "source": [ "# load(\"ZetaFunctionsNewtonND.py\")\n", "load(\"zetas_triples_general.py\")\n", "R. = QQ[]\n", "f=(y^2-x^3)^2+x^5*y\n", "g=(y^2-x^3)^3+x^10\n", "d=f^3-g^2" ] }, { "cell_type": "code", "execution_count": 2, "id": "a49fdf82-1388-403c-8cd5-4bbd7e3bafd3", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "-x^20 + 2*x^19 + 3*x^17*y - 3*x^16*y^2 + x^15*y^3 - 12*x^14*y^3 + 18*x^11*y^5 + x^10*y^6 - 12*x^8*y^7 + 3*x^5*y^9" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "d" ] }, { "cell_type": "code", "execution_count": 34, "id": "3be58442-a908-4fb2-ba36-1894bd963e12", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Newton's polyhedron of -x^20 + 2*x^19 + 3*x^17*y - 3*x^16*y^2 + x^15*y^3 - 12*x^14*y^3 + 18*x^11*y^5 + x^10*y^6 - 12*x^8*y^7 + 3*x^5*y^9:\n", " support points = [(20, 0, 0), (19, 0, 0), (17, 1, 0), (16, 2, 0), (15, 3, 0), (14, 3, 0), (11, 5, 0), (10, 6, 0), (8, 7, 0), (5, 9, 0)]\n", " vertices = [(5, 9, 0), (19, 0, 0), (17, 1, 0)]\n", " number of proper faces = 15\n", " Facet 0: x + 2*y - 19 >= 0\n", " Facet 1: 2*x + 3*y - 37 >= 0\n", " Facet 2: x - 5 >= 0\n", " Facet 3: y >= 0\n", " Facet 4: z >= 0\n" ] } ], "source": [ "Zd=ZetaFunctions(d)\n", "Zd.give_info_newton(faces=False, cones=False, compact = False)" ] }, { "cell_type": "code", "execution_count": 35, "id": "bcc41b1a-ea09-4f75-9e53-71b87a47d0e2", "metadata": {}, "outputs": [], "source": [ "f1 = R(f(x=x^2, y=x^3 * (y + 1)) / x^12)\n", "g1 = R(g(x=x^2, y=x^3 * (y - 1)) / x^18)\n", "d1 = R(d(x=x^2, y=x^3 * (y - 1)) / x^37)" ] }, { "cell_type": "code", "execution_count": 36, "id": "328f85f7-6cd6-40ed-9d60-c1be613e32ea", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "y^4 + 4*y^3 + x*y + 4*y^2 + x" ] }, "execution_count": 36, "metadata": {}, "output_type": "execute_result" } ], "source": [ "f1" ] }, { "cell_type": "code", "execution_count": 37, "id": "2eb04dbc-e5eb-4631-9531-92b01fe8f37d", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "y^6 - 6*y^5 + 12*y^4 - 8*y^3 + x^2" ] }, "execution_count": 37, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g1" ] }, { "cell_type": "code", "execution_count": 38, "id": "b502dd16-e5fc-41dd-894d-c4744b1fc1b4", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "3*y^9 - 27*y^8 + x*y^6 + 96*y^7 - 6*x*y^5 - 168*y^6 + x^2*y^3 + 15*x*y^4 + 144*y^5 - 3*x^2*y^2 - 20*x*y^3 - 48*y^4 - x^3 + 3*x^2*y + 12*x*y^2 - x^2" ] }, "execution_count": 38, "metadata": {}, "output_type": "execute_result" } ], "source": [ "d1" ] }, { "cell_type": "code", "execution_count": 39, "id": "113114bc-af4a-4c9e-b3bf-93541e3ad24f", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Newton's polyhedron of 3*y^9 - 27*y^8 + x*y^6 + 96*y^7 - 6*x*y^5 - 168*y^6 + x^2*y^3 + 15*x*y^4 + 144*y^5 - 3*x^2*y^2 - 20*x*y^3 - 48*y^4 - x^3 + 3*x^2*y + 12*x*y^2 - x^2:\n", " support points = [(0, 9, 0), (0, 8, 0), (1, 6, 0), (0, 7, 0), (1, 5, 0), (0, 6, 0), (2, 3, 0), (1, 4, 0), (0, 5, 0), (2, 2, 0), (1, 3, 0), (0, 4, 0), (3, 0, 0), (2, 1, 0), (1, 2, 0), (2, 0, 0)]\n", " vertices = [(0, 4, 0), (2, 0, 0)]\n", " number of proper faces = 11\n", " Facet 0: 2*x + y - 4 >= 0\n", " Facet 1: x >= 0\n", " Facet 2: y >= 0\n", " Facet 3: z >= 0\n" ] } ], "source": [ "Zd1=ZetaFunctions(d1)\n", "Zd1.give_info_newton(faces=False, cones=False, compact = False)" ] }, { "cell_type": "code", "execution_count": 40, "id": "5ff51403-dcee-4f63-936a-e4311f2e6ac3", "metadata": {}, "outputs": [], "source": [ "A = Matrix(QQ, 6, [ [-3, 0, 1, 0, 0, 0], [0, -2, 1, 0, 0, 0], [1, 1, -3, 0, 1, 0], [0, 0, 0, -3, 0, 1], [0, 0, 1, 0, -2, 1], [0, 0, 0, 1, 1, -1] ])\n", "Vf = vector(4 * [0] + [1] + [0] )\n", "Vg = vector( 5 * [0] + [1] )\n", "Vd = vector([5] + [1] + 2 * [0] + [2] + [0] )" ] }, { "cell_type": "code", "execution_count": 41, "id": "13ba1ce2-83c5-4a88-9785-a769a2e32f73", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1" ] }, "execution_count": 41, "metadata": {}, "output_type": "execute_result" } ], "source": [ "det(-A)" ] }, { "cell_type": "code", "execution_count": 45, "id": "733c243c-b7c1-454b-bd6e-e88aba1e74d5", "metadata": {}, "outputs": [], "source": [ "n, Nf, Ng, Nd, Nhs, euler, nus, pols = trinomiales_general(A, Vf, Vg, [], Vd, total=False)" ] }, { "cell_type": "code", "execution_count": 46, "id": "69fa70da-afa4-4cca-91e8-c723aae47e68", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "((4, 6, 12, 13, 26, 39), (6, 9, 18, 20, 39, 60), (14, 19, 37, 39, 78, 117))" ] }, "execution_count": 46, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Nf, Ng, Nd" ] }, { "cell_type": "code", "execution_count": 47, "id": "0fb421e2-8ad0-40f8-ab3f-a1048ec3a12a", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{0: (z^3 + x^2*z^2 + x^8, (2, 1, 1), -4),\n", " 1: (z^3 + x^3*z^2 + x^10, (3, 1, 1), 0),\n", " 2: (z^3 + x^6*z^2 + x^19, (5, 1, 1), -1),\n", " 3: (z^3 + x^13*z + x^20, (6, 1, 1), 1),\n", " 4: (z^3 + x^26*z + x^39, (11, 1, 1), -2),\n", " 5: (z^3 + x^39*z + x^60, (17, 1, 1), 0),\n", " (0, 2): (z^3 + x^2*y^6*z^2 + x^8*y^19, (2, 5, 1), 1),\n", " (1, 2): (z^3 + x^3*y^6*z^2 + x^10*y^19, (3, 5, 1), 1),\n", " (2, 4): (z^3 + x^6*y^13*z^2 + x^19*y^39, (5, 11, 1), 1),\n", " (3, 5): (z^3 + x^13*y^39*z + x^20*y^60, (6, 17, 1), 1),\n", " (4, 5): (z^3 + x^26*y^39*z + x^39*y^60, (11, 17, 1), 1),\n", " (0, 'd'): (z^3 + x^2*z^2 + x^8*y, (2, 1, 1), 5),\n", " (1, 'd'): (z^3 + x^3*z^2 + x^10*y, (3, 1, 1), 1),\n", " (4, 'd'): (z^3 + x^13*z^2 + x^39*y, (11, 1, 1), 2)}" ] }, "execution_count": 47, "metadata": {}, "output_type": "execute_result" } ], "source": [ "pols" ] }, { "cell_type": "code", "execution_count": 48, "id": "116a3b7e-17a1-45dd-a501-2d7430385922", "metadata": {}, "outputs": [], "source": [ "zt, zm, dic = zetas(n, pols, info=True)" ] }, { "cell_type": "code", "execution_count": 49, "id": "8ca2025c-c4c4-40f5-a690-74ed194507f4", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(1357/2223) * (s + 23/38)^-1 * (s + 11/18)^-1 * (s + 8/13)^-1 * (s + 5/8)^-1 * (s + 1)^-1 * (s^4 + 182245/65136*s^3 + 126929/43424*s^2 + 175993/130272*s + 55/236)" ] }, "execution_count": 49, "metadata": {}, "output_type": "execute_result" } ], "source": [ "zt.factor()" ] }, { "cell_type": "code", "execution_count": 50, "id": "d5321785-1e6d-48ab-b02c-d81f3b514034", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{1: 5, 2: 5, 3: 1, 4: 4, 8: 4, 18: 1, 13: 1, 38: 1, 39: 1}" ] }, "execution_count": 50, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dic" ] }, { "cell_type": "code", "execution_count": 51, "id": "d82d56e7-1f23-448b-b8af-16751f7d5db1", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "El factor ciclotómico de 1 tiene multiplicidad 5\n", "El factor ciclotómico de 2 tiene multiplicidad 5\n", "El factor ciclotómico de 3 tiene multiplicidad 1\n", "El factor ciclotómico de 4 tiene multiplicidad 4\n", "El factor ciclotómico de 8 tiene multiplicidad 4\n", "El factor ciclotómico de 18 tiene multiplicidad 1\n", "El factor ciclotómico de 13 tiene multiplicidad 1\n", "El factor ciclotómico de 38 tiene multiplicidad 1\n", "El factor ciclotómico de 39 tiene multiplicidad 1\n" ] } ], "source": [ "for j in dic:\n", " print(\"El factor ciclotómico de \", j, \"tiene multiplicidad \", dic[j])" ] }, { "cell_type": "code", "execution_count": 60, "id": "18c07685-494b-4b67-8358-c322028d700e", "metadata": {}, "outputs": [], "source": [ "componentes = zetas_components(n, pols, A, Vf, Vg, Vd, Nf, Ng, Nd, info=True)" ] }, { "cell_type": "code", "execution_count": 61, "id": "bd6ac3c0-019a-4153-81f6-0e145158997c", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "('polos', (3, 5, (3, 5), (4, 5)))\n", "(5/143) * (s + 8/13)^-1 * (s + 1)^-1 * (s + 16/5)\n", "{13: -1, 39: -1}\n", "=================\n", "('unos', (0, 2, 1, (0, 2), (1, 2), (2, 4), (0, 'd'), (1, 'd')))\n", "(986/1881) * (s + 23/38)^-1 * (s + 11/18)^-1 * (s + 8/13)^-1 * (s + 5/8)^-1 * (s + 1)^-1 * (s^4 + 99233/36192*s^3 + 119869/42432*s^2 + 265381/205088*s + 11385/51272)\n", "{1: 4, 2: 5, 4: 4, 8: 4, 18: 1, 38: 1}\n", "=================\n", "('unos', ((4, 'd'),))\n", "(4/429) * (s + 8/13)^-1 * (s + 1)^-1 * (s + 12)\n", "{13: -2, 39: -2}\n", "=================\n", "('dic', (4,))\n", "(6/143) * (s + 8/13)^-1 * (s + 1)^-1 * (s - 8/3)\n", "{1: 1, 3: 1, 13: 4, 39: 4}\n", "=================\n" ] } ], "source": [ "for a in componentes:\n", " zetatop, zetamon, dic = componentes[a]\n", " print(a)\n", " print(zetatop.factor())\n", " print(dic)\n", " print(\"=================\")" ] }, { "cell_type": "code", "execution_count": 22, "id": "1ba9bd3d-e05b-4f00-80c9-9f543a622ee2", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(5, 1, 0, 0, 2, 0)" ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Vd" ] }, { "cell_type": "code", "execution_count": 18, "id": "ac643c88-e81a-47a9-aa65-71094947049e", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(32/855*s^2 + 491/3420*s + 253/3420)/(s^3 + 379/171*s^2 + 1085/684*s + 253/684)" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "f2=z^3 + x^6*z^2 + x^19\n", "zf2=ZetaFunctions(f2)\n", "zf2.topological_zeta(local=true, weights=[5,1,1])" ] }, { "cell_type": "code", "execution_count": 19, "id": "fe441461-5766-438d-9b0f-151db04e4b9b", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(s + 23/38) * (s + 11/18) * (s + 1)" ] }, "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ "(s^3 + 379/171*s^2 + 1085/684*s + 253/684).factor()" ] }, { "cell_type": "code", "execution_count": 20, "id": "8d480cde-88b7-43ce-bc01-a90c66eab0c7", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(-3/143*s + 8/143)/(s^2 + 21/13*s + 8/13)" ] }, "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "f4=z^3 + x^26*z + x^39\n", "zf4=ZetaFunctions(f4)\n", "zf4.topological_zeta(local=true, weights=[11,1,1])" ] }, { "cell_type": "code", "execution_count": 21, "id": "07b6c70f-84c8-48a8-95ef-21fa53ebce2f", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(22/1989*s + 73/1989)/(s^2 + 190/117*s + 73/117)" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "f5=z^3 + x^39*z + x^60\n", "zf5=ZetaFunctions(f5)\n", "zf5.topological_zeta(local=true, weights=[17,1,1])" ] }, { "cell_type": "code", "execution_count": 22, "id": "aafa5255-b9a6-493b-b8e0-30bade89c987", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(7/234*s + 25/234)/(s^2 + 64/39*s + 25/39)" ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "f3=z^3 + x^13*z + x^20\n", "zf3=ZetaFunctions(f3)\n", "zf3.topological_zeta(local=true, weights=[6,1,1])" ] }, { "cell_type": "code", "execution_count": 23, "id": "e71214a3-4cf7-4ff7-b691-9bc0f077bc3b", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(-1/8*s + 5/16)/(s^2 + 13/8*s + 5/8)" ] }, "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ "f0=z^3 + x^2*z^2 + x^8\n", "zf0=ZetaFunctions(f0)\n", "zf0.topological_zeta(local=true, weights=[2,1,1])" ] }, { "cell_type": "code", "execution_count": 24, "id": "3b080c43-5e06-49c8-b649-5659c9a1acd7", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(1/20*s + 13/60)/(s^2 + 33/20*s + 13/20)" ] }, "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ "f1=z^3 + x^3*z^2 + x^10\n", "zf1=ZetaFunctions(f1)\n", "zf1.topological_zeta(local=true, weights=[3,1,1])" ] }, { "cell_type": "code", "execution_count": null, "id": "14950aeb-aa98-494b-b0f6-d6f02cbaec13", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "SageMath 10.5.beta8", "language": "sage", "name": "sagemath-devel" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.7" } }, "nbformat": 4, "nbformat_minor": 5 }