This commit is contained in:
Enrique Artal Bartolo 2024-03-06 08:33:54 +01:00
commit 65ef72659b
7 changed files with 2983 additions and 1 deletions

View File

@ -1151,7 +1151,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "SageMath 10.3.rc1",
"display_name": "SageMath 10.3.rc2",
"language": "sage",
"name": "sagemath-devel"
},

Binary file not shown.

578
Tutorial.ipynb Normal file
View File

@ -0,0 +1,578 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "8994f467-b227-46a1-bf32-890ddee38553",
"metadata": {},
"source": [
"Hay que cargar estos dos ficheros. Yo he comentado el segundo, pero vosotros no."
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "9be1e47f-b0bd-47c1-a333-96a7652032fa",
"metadata": {},
"outputs": [],
"source": [
"load(\"zetas_triples.py\")\n",
"# load(\"ZetaFunctionsNewtonND.py\")"
]
},
{
"cell_type": "markdown",
"id": "d0dc4e17-343c-4b42-911a-13f7d4781718",
"metadata": {},
"source": [
"Datos de una resolución y anillos"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "2ec2eea6-7796-41c9-bb7a-7c29633cc72c",
"metadata": {},
"outputs": [],
"source": [
"R.<x, y, z> = QQ[]\n",
"S.<s> = QQ[]\n",
"T.<t> = QQ[]\n",
"A = Matrix(QQ, 17, [-13, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, -2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -4, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -4, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1])\n",
"Vf = vector(4 * [0] + [1] + 7 * [0] + [1] + 4 * [0])\n",
"Vg = vector(8 * [0] + [1] + 7 * [0] + [1])\n",
"Vd = vector([13] + 7 * [0] + [1] + 7 * [0] + [1])"
]
},
{
"cell_type": "markdown",
"id": "8a8a49b1-a7c1-4872-b56c-d1b18bf74030",
"metadata": {},
"source": [
"Aquí se dan el número de explosiones, las multiplicidades de cada función, el vector de las características de Euler, el divisor *canónico* y el diccionario con los datos de cada estratificación"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "6679dcd4-8155-41ac-b691-aeb32fd66e76",
"metadata": {},
"outputs": [],
"source": [
"n, Nf, Ng, Nd, euler, nus, pols = trinomiales(A, Vf, Vg, Vd)"
]
},
{
"cell_type": "markdown",
"id": "bd0f6802-d0b9-4525-aa3c-93e2844812a9",
"metadata": {},
"source": [
"Mostramos los polinomios de cada estrato, con los pesos y las características de Euler"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "272abf46-628b-419a-beed-ee1eec602809",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0\n",
"Polinomio: z^3 + x^4*z^2 + x^13\n",
"Pesos: (2, 1, 1)\n",
"Característica de Euler: -13\n",
"====================\n",
"1\n",
"Polinomio: z^3 + x^10*z + x^13\n",
"Pesos: (3, 1, 1)\n",
"Característica de Euler: 1\n",
"====================\n",
"2\n",
"Polinomio: z^3 + x^20*z + x^26\n",
"Pesos: (5, 1, 1)\n",
"Característica de Euler: -1\n",
"====================\n",
"3\n",
"Polinomio: z^3 + x^21*z + x^26\n",
"Pesos: (6, 1, 1)\n",
"Característica de Euler: 1\n",
"====================\n",
"4\n",
"Polinomio: z^3 + x^42*z + x^52\n",
"Pesos: (11, 1, 1)\n",
"Característica de Euler: -1\n",
"====================\n",
"5\n",
"Polinomio: z^3 + x^28*z + x^39\n",
"Pesos: (7, 1, 1)\n",
"Característica de Euler: 0\n",
"====================\n",
"6\n",
"Polinomio: z^3 + x^36*z + x^52\n",
"Pesos: (9, 1, 1)\n",
"Característica de Euler: 0\n",
"====================\n",
"7\n",
"Polinomio: z^3 + x^44*z + x^65\n",
"Pesos: (11, 1, 1)\n",
"Característica de Euler: 0\n",
"====================\n",
"8\n",
"Polinomio: z^3 + x^52*z + x^78\n",
"Pesos: (13, 1, 1)\n",
"Característica de Euler: -2\n",
"====================\n",
"9\n",
"Polinomio: z^3 + x^10*z + x^13\n",
"Pesos: (3, 1, 1)\n",
"Característica de Euler: 1\n",
"====================\n",
"10\n",
"Polinomio: z^3 + x^20*z + x^26\n",
"Pesos: (5, 1, 1)\n",
"Característica de Euler: -1\n",
"====================\n",
"11\n",
"Polinomio: z^3 + x^21*z + x^26\n",
"Pesos: (6, 1, 1)\n",
"Característica de Euler: 1\n",
"====================\n",
"12\n",
"Polinomio: z^3 + x^42*z + x^52\n",
"Pesos: (11, 1, 1)\n",
"Característica de Euler: -1\n",
"====================\n",
"13\n",
"Polinomio: z^3 + x^28*z + x^39\n",
"Pesos: (7, 1, 1)\n",
"Característica de Euler: 0\n",
"====================\n",
"14\n",
"Polinomio: z^3 + x^36*z + x^52\n",
"Pesos: (9, 1, 1)\n",
"Característica de Euler: 0\n",
"====================\n",
"15\n",
"Polinomio: z^3 + x^44*z + x^65\n",
"Pesos: (11, 1, 1)\n",
"Característica de Euler: 0\n",
"====================\n",
"16\n",
"Polinomio: z^3 + x^52*z + x^78\n",
"Pesos: (13, 1, 1)\n",
"Característica de Euler: -2\n",
"====================\n",
"(0, 8)\n",
"Polinomio: z^3 + x^4*y^26*z^2 + x^13*y^78\n",
"Pesos: (2, 13, 1)\n",
"Característica de Euler: 1\n",
"====================\n",
"(0, 16)\n",
"Polinomio: z^3 + x^4*y^26*z^2 + x^13*y^78\n",
"Pesos: (2, 13, 1)\n",
"Característica de Euler: 1\n",
"====================\n",
"(1, 2)\n",
"Polinomio: z^3 + x^10*y^20*z + x^13*y^26\n",
"Pesos: (3, 5, 1)\n",
"Característica de Euler: 1\n",
"====================\n",
"(2, 4)\n",
"Polinomio: z^3 + x^20*y^42*z + x^26*y^52\n",
"Pesos: (5, 11, 1)\n",
"Característica de Euler: 1\n",
"====================\n",
"(2, 5)\n",
"Polinomio: z^3 + x^20*y^28*z + x^26*y^39\n",
"Pesos: (5, 7, 1)\n",
"Característica de Euler: 1\n",
"====================\n",
"(3, 4)\n",
"Polinomio: z^3 + x^21*y^42*z + x^26*y^52\n",
"Pesos: (6, 11, 1)\n",
"Característica de Euler: 1\n",
"====================\n",
"(5, 6)\n",
"Polinomio: z^3 + x^28*y^36*z + x^39*y^52\n",
"Pesos: (7, 9, 1)\n",
"Característica de Euler: 1\n",
"====================\n",
"(6, 7)\n",
"Polinomio: z^3 + x^36*y^44*z + x^52*y^65\n",
"Pesos: (9, 11, 1)\n",
"Característica de Euler: 1\n",
"====================\n",
"(7, 8)\n",
"Polinomio: z^3 + x^44*y^52*z + x^65*y^78\n",
"Pesos: (11, 13, 1)\n",
"Característica de Euler: 1\n",
"====================\n",
"(9, 10)\n",
"Polinomio: z^3 + x^10*y^20*z + x^13*y^26\n",
"Pesos: (3, 5, 1)\n",
"Característica de Euler: 1\n",
"====================\n",
"(10, 12)\n",
"Polinomio: z^3 + x^20*y^42*z + x^26*y^52\n",
"Pesos: (5, 11, 1)\n",
"Característica de Euler: 1\n",
"====================\n",
"(10, 13)\n",
"Polinomio: z^3 + x^20*y^28*z + x^26*y^39\n",
"Pesos: (5, 7, 1)\n",
"Característica de Euler: 1\n",
"====================\n",
"(11, 12)\n",
"Polinomio: z^3 + x^21*y^42*z + x^26*y^52\n",
"Pesos: (6, 11, 1)\n",
"Característica de Euler: 1\n",
"====================\n",
"(13, 14)\n",
"Polinomio: z^3 + x^28*y^36*z + x^39*y^52\n",
"Pesos: (7, 9, 1)\n",
"Característica de Euler: 1\n",
"====================\n",
"(14, 15)\n",
"Polinomio: z^3 + x^36*y^44*z + x^52*y^65\n",
"Pesos: (9, 11, 1)\n",
"Característica de Euler: 1\n",
"====================\n",
"(15, 16)\n",
"Polinomio: z^3 + x^44*y^52*z + x^65*y^78\n",
"Pesos: (11, 13, 1)\n",
"Característica de Euler: 1\n",
"====================\n",
"(0, 'd')\n",
"Polinomio: z^3 + x^4*z^2 + x^13*y\n",
"Pesos: (2, 1, 1)\n",
"Característica de Euler: 13\n",
"====================\n",
"(4, 'f')\n",
"Polinomio: z^3 + x^42*y*z + x^52\n",
"Pesos: (11, 1, 1)\n",
"Característica de Euler: 1\n",
"====================\n",
"(8, 'g')\n",
"Polinomio: z^3 + x^52*z + x^78*y\n",
"Pesos: (13, 1, 1)\n",
"Característica de Euler: 1\n",
"====================\n",
"(8, 'd')\n",
"Polinomio: z^3 + x^26*z^2 + x^78*y\n",
"Pesos: (13, 1, 1)\n",
"Característica de Euler: 1\n",
"====================\n",
"(12, 'f')\n",
"Polinomio: z^3 + x^42*y*z + x^52\n",
"Pesos: (11, 1, 1)\n",
"Característica de Euler: 1\n",
"====================\n",
"(16, 'g')\n",
"Polinomio: z^3 + x^52*z + x^78*y\n",
"Pesos: (13, 1, 1)\n",
"Característica de Euler: 1\n",
"====================\n",
"(16, 'd')\n",
"Polinomio: z^3 + x^26*z^2 + x^78*y\n",
"Pesos: (13, 1, 1)\n",
"Característica de Euler: 1\n",
"====================\n"
]
}
],
"source": [
"for k in pols:\n",
" p, w, e = pols[k]\n",
" print(k)\n",
" print(\"Polinomio:\", p)\n",
" print(\"Pesos:\", w)\n",
" print(\"Característica de Euler:\", e)\n",
" print(\"====================\")"
]
},
{
"cell_type": "markdown",
"id": "1e5ab1ea-ea53-40e9-af0e-1755931776ef",
"metadata": {},
"source": [
"Y ahora calculamos las funciones zeta."
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "50b8eb49-214f-4c48-9a5b-38abf04701ac",
"metadata": {},
"outputs": [],
"source": [
"zt, zm, dic = zetas(n, pols, info=True)"
]
},
{
"cell_type": "markdown",
"id": "16b7ca3c-9e71-4980-b1b6-61e686e3150e",
"metadata": {},
"source": [
"Lo siguiente es la descomposición en fracciones parciales de la función zeta topológica"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "44921d20-57c0-4e2b-85e3-ea096dc8e3ea",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"el cociente es 0\n"
]
},
{
"data": {
"text/html": [
"<html>\\(\\displaystyle \\left(-\\frac{1580}{1521}\\right) \\cdot (s + 1)^{-1}\\)</html>"
],
"text/latex": [
"$\\displaystyle \\left(-\\frac{1580}{1521}\\right) \\cdot (s + 1)^{-1}$"
],
"text/plain": [
"(-1580/1521) * (s + 1)^-1"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<html>\\(\\displaystyle \\left(\\frac{3043}{3042}\\right) \\cdot (s + \\frac{1}{2})^{-1}\\)</html>"
],
"text/latex": [
"$\\displaystyle \\left(\\frac{3043}{3042}\\right) \\cdot (s + \\frac{1}{2})^{-1}$"
],
"text/plain": [
"(3043/3042) * (s + 1/2)^-1"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<html>\\(\\displaystyle \\left(\\frac{19}{2028}\\right) \\cdot (s + \\frac{1}{2})^{-2}\\)</html>"
],
"text/latex": [
"$\\displaystyle \\left(\\frac{19}{2028}\\right) \\cdot (s + \\frac{1}{2})^{-2}$"
],
"text/plain": [
"(19/2028) * (s + 1/2)^-2"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<html>\\(\\displaystyle \\left(\\frac{1}{12168}\\right) \\cdot (s + \\frac{1}{2})^{-3}\\)</html>"
],
"text/latex": [
"$\\displaystyle \\left(\\frac{1}{12168}\\right) \\cdot (s + \\frac{1}{2})^{-3}$"
],
"text/plain": [
"(1/12168) * (s + 1/2)^-3"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"quo, desc = zt.partial_fraction_decomposition(decompose_powers=True)\n",
"print(\"el cociente es \", quo)\n",
"for p in desc:\n",
" show(p.factor())"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "87e4fc8d-a73c-4561-95c5-f8032aa2e366",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"El factor ciclotómico de 1 tiene multiplicidad 3\n",
"El factor ciclotómico de 2 tiene multiplicidad 15\n",
"El factor ciclotómico de 3 tiene multiplicidad 1\n",
"El factor ciclotómico de 6 tiene multiplicidad 2\n",
"El factor ciclotómico de 13 tiene multiplicidad 2\n",
"El factor ciclotómico de 26 tiene multiplicidad 15\n",
"El factor ciclotómico de 78 tiene multiplicidad 2\n"
]
}
],
"source": [
"for j in dic:\n",
" print(\"El factor ciclotómico de \", j, \"tiene multiplicidad \", dic[j])"
]
},
{
"cell_type": "markdown",
"id": "b33a65cb-a5a3-4cd6-9092-9e7e10792e67",
"metadata": {},
"source": [
"Ahora se calcula usando la estratificación sin las transformadas estrictas de $f, g$ y se comprueba que el resultado es el mismo (`total=False`)."
]
},
{
"cell_type": "code",
"execution_count": 18,
"id": "479db410-d72b-4fa4-b7d9-0306fcd0378d",
"metadata": {},
"outputs": [],
"source": [
"n1, Nf1, Ng1, Nd1, euler1, nus1, pols1 = trinomiales(A, Vf, Vg, Vd, total=False)"
]
},
{
"cell_type": "code",
"execution_count": 19,
"id": "8bcbddf5-79de-44d3-b45a-c967b294fde8",
"metadata": {},
"outputs": [],
"source": [
"zt1, zm1, dic1 = zetas(n1, pols1, info=True)"
]
},
{
"cell_type": "code",
"execution_count": 20,
"id": "c0abd797-77e2-4043-929b-36bc19d56e5e",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"zt == zt1 and zm == zm1 and dic == dic1"
]
},
{
"cell_type": "markdown",
"id": "7be374dc-b6b5-4a72-bed7-c91e4f60e078",
"metadata": {},
"source": [
"Consideramos ahora solo la resolución del discriminante."
]
},
{
"cell_type": "code",
"execution_count": 21,
"id": "8f0a31df-57aa-4c03-bf54-bb3b0e1a450a",
"metadata": {},
"outputs": [],
"source": [
"B = A.delete_columns([3, 4, 11, 12]).delete_rows([3, 4, 11, 12])\n",
"B[2, 2] = -2\n",
"B[8, 8] = -2\n",
"Wf = vector(Vf.list()[:2] + [2] + Vf.list()[5:10] + [2] + Vf.list()[13:])\n",
"Wg = vector(Vg.list()[:3] + Vg.list()[5:11] + Vg.list()[13:])\n",
"Wd = vector(Vd.list()[:3] + Vd.list()[5:11] + Vd.list()[13:])"
]
},
{
"cell_type": "markdown",
"id": "dc309ca1-52b9-45e2-b2e3-c1e0f5335ce6",
"metadata": {},
"source": [
"Ahora `total=False` es obligatorio. También sale lo mismo."
]
},
{
"cell_type": "code",
"execution_count": 22,
"id": "68a3394b-7fe7-497f-aaef-35e5f5482e3a",
"metadata": {},
"outputs": [],
"source": [
"n2, Nf2, Ng2, Nd2, euler2, nus2, pols2 = trinomiales(B, Wf, Wg, Wd, total=False)"
]
},
{
"cell_type": "code",
"execution_count": 23,
"id": "91e225b1-8f78-4a53-9c50-1efe533c7fd3",
"metadata": {},
"outputs": [],
"source": [
"zt2, zm2, dic2 = zetas(n2, pols2, info=True)"
]
},
{
"cell_type": "code",
"execution_count": 24,
"id": "2514344c-769b-45d0-8738-173f2b31adb6",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"zt == zt1 and zm == zm1 and dic == dic1"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "cea9ce6e-46d4-4c37-a61a-f6cf6c2d1680",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "SageMath 10.3.rc1",
"language": "sage",
"name": "sagemath-310"
},
"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.2"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

1843
ZetaFunctionsNewtonND.py Normal file

File diff suppressed because it is too large Load Diff

320
resolucion.ipynb Normal file
View File

@ -0,0 +1,320 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "8565ca20-c37d-4b6c-8aa0-a32074c8e6e2",
"metadata": {},
"outputs": [],
"source": [
"# g = Graph(17)\n",
"# a = graph_editor(g)\n",
"# a.show()"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "118f3510-30b1-4a0c-81e3-146325f5c8d4",
"metadata": {},
"outputs": [],
"source": [
"# A =g.adjacency_matrix()\n",
"# A[0, 0] = -13\n",
"# for i in (1, 3, 5, 6, 7):\n",
"# A[i, i] = -2\n",
"# A[i + 8, i + 8] = -2\n",
"# for i in (2,):\n",
"# A[i, i] = -4\n",
"# A[i + 8, i + 8] = -4\n",
"# for i in (4, 8):\n",
"# A[i, i] = -1\n",
"# A[i + 8, i + 8] = -1\n",
"# # A = A.change_ring(QQ)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "1c1485e6-9433-4b5b-93c4-20dc6d95926c",
"metadata": {},
"outputs": [],
"source": [
"A = Matrix(QQ, 17, [-13, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, -2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -4, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -4, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1])\n",
"Vf = vector(4 * [0] + [1] + 7 * [0] + [1] + 4 * [0])\n",
"Vg = vector(8 * [0] + [1] + 7 * [0] + [1])\n",
"Vd = vector([13] + 7 * [0] + [1] + 7 * [0] + [1])\n",
"R.<x, y, z> = QQ[]\n",
"S.<s> = QQ[]\n",
"T.<t> = QQ[]"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "2d89bcf0-311e-4799-872c-72b29b23ee83",
"metadata": {},
"outputs": [],
"source": [
"def trinomiales(A, Vf, Vg, Vd, total=True):\n",
" n = A.nrows()\n",
" A1 = -A^-1\n",
" Nf, Ng, Nd = [A1 * N0 for N0 in (Vf, Vg, Vd)]\n",
" diag = vector(A.diagonal())\n",
" unos = vector(n * [1])\n",
" if total:\n",
" VV = Vf + Vg\n",
" else:\n",
" VV = Vf.parent()(0)\n",
" euler = (-A + 2 * identity_matrix(n)) * unos + diag - VV - Vd\n",
" nus = A1 * (diag + 2 * unos) + unos\n",
" expos = {}\n",
" for j in range(n):\n",
" a, b = (Nf[j], Ng[j])\n",
" eq = 3 * Nf[j] == 2 * Ng[j]\n",
" nnd = min(3 * Nf[j], 2 * Ng[j]) == Nd[j]\n",
" if nnd:\n",
" expos[j] = ((a, b), (a, b), nus[j], eq, nnd)\n",
" else:\n",
" expos[j] = ((a, b), (Nf[j], Nd[j] - Ng[j]), nus[j], eq, nnd)\n",
" cadenas = ('d',)\n",
" if total:\n",
" expos['f'] = ((1, 0), (0, 0), 1, False, True)\n",
" expos['g'] = ((0, 1), (0, 0), 1, False, True)\n",
" cadenas = ('f', 'g') + cadenas\n",
" expos['d'] = ((0, 0), (0, 1), 1, True, False)\n",
" pols = {}\n",
" for j in range(n):\n",
" if expos[j][-1]:\n",
" a, b = expos[j][0]\n",
" pols[j] = (z^3 + x^a * z + x^b, (expos[j][2], 1, 1), euler[j])\n",
" else:\n",
" a, b = expos[j][1]\n",
" pols[j] = (z^3 + x^a * z^2 + x^b, (expos[j][2], 1, 1), euler[j])\n",
" interdiv = [(i, j) for i, j in Combinations(n, 2) if A[i, j] != 0]\n",
" interstrict = [(i, j) for i in range(n) for j in cadenas if eval('V' + j)[i] != 0]\n",
" for i,j in interdiv + interstrict:\n",
" if j in ZZ:\n",
" ep = 1\n",
" else:\n",
" ep = eval('V' + j)[i]\n",
" eqi, nndi = expos[i][-2:]\n",
" eqj, nndj = expos[j][-2:]\n",
" nd = eqi and eqj and not (nndi and nndj)\n",
" if not nd:\n",
" ai, bi = expos[i][0]\n",
" aj, bj = expos[j][0]\n",
" pols[i, j] = (z^3 + x^ai * y^aj * z + x^bi * y^bj,\n",
" (expos[i][2], expos[j][2], 1), ep)\n",
" else:\n",
" ai, bi = expos[i][1]\n",
" aj, bj = expos[j][1]\n",
" pols[i, j] = (z^3 + x^ai * y^aj * z^2 + x^bi * y^bj, \n",
" (expos[i][2], expos[j][2], 1), ep)\n",
" return n, Nf, Ng, Nd, euler, nus, expos, pols\n",
"\n",
"def estrato(pol, pesos, euler):\n",
" Z1 = ZetaFunctions(pol)\n",
" zetatop = euler * Z1.topological_zeta(local=True, weights=pesos)\n",
" zetamon = Z1.monodromy_zeta()^euler\n",
" return zetatop, zetamon\n",
"\n",
"def zetas(n, pols):\n",
" zetatop=0\n",
" zetamon=1\n",
" for k in pols:\n",
" zt, zm = estrato(*pols[k])\n",
" zetatop += zt\n",
" zetamon *= zm\n",
" return zetatop, zetamon / (1 - t^3)^n"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "779f6c34-62bc-4484-8caa-f5ef789693a2",
"metadata": {},
"outputs": [],
"source": [
"n, Nf, Ng, Nd, euler, nus, expos, pols = trinomiales(A, Vf, Vg, Vd)\n",
"zt0, zm0 = zetas(n, pols)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "5d85cf37-2286-4a0a-a13a-3e5cd781d450",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(-7/39) * (s + 19/39)^-1 * (s + 1/2)^-1 * (s + 1)^-1 * (s^2 - 1207/546*s - 19/14)"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"zt0.factor()"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "ae05ef5a-5687-43a8-bac6-7cc9361149d3",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2 4\n",
"1 5\n",
"6 4\n",
"3 16\n",
"26 4\n",
"13 4\n",
"78 4\n",
"39 15\n"
]
}
],
"source": [
"for p, j in zm0.factor():\n",
" print(p.is_cyclotomic(certificate=True), j)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "016e3e91-9506-4223-9010-1b72c474175d",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(0, [76/65/(s + 19/39), -2/39/(s + 1/2), -253/195/(s + 1)])"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"zt0.partial_fraction_decomposition()"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "cb10bd5c-a177-4d82-8dec-ce05bd9491bf",
"metadata": {},
"outputs": [],
"source": [
"n1, Nf1, Ng1, Nd1, euler1, nus1, expos1, pols1 = trinomiales(A, Vf, Vg, Vd, total=False)\n",
"zt1, zm1 = zetas(n1, pols1)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "d03c12a4-58ef-414a-ba00-e5566f8b2201",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(0, 1)"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"zt0 - zt1, zm0 / zm1"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "9ee974ba-af17-4998-85a9-d806a92a7242",
"metadata": {},
"outputs": [],
"source": [
"B = A.delete_columns([3, 4, 11, 12]).delete_rows([3, 4, 11, 12])\n",
"B[2, 2] = -2\n",
"B[8, 8] = -2\n",
"Wf = vector(Vf.list()[:2] + [2] + Vf.list()[5:10] + [2] + Vf.list()[13:])\n",
"Wg = vector(Vg.list()[:3] + Vg.list()[5:11] + Vg.list()[13:])\n",
"Wd = vector(Vd.list()[:3] + Vd.list()[5:11] + Vd.list()[13:])"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "e0e38fde-16ba-4e5b-826e-088da1bd1200",
"metadata": {},
"outputs": [],
"source": [
"n2, Nf2, Ng2, Nd2, euler2, nus2, expos2, pols2 = trinomiales(B, Wf, Wg, Wd, total=False)\n",
"zt2, zm2 = zetas(n2, pols2)"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "de6c6fe8-c3b6-4e9e-b65f-10a41dc2ed05",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(0, 1)"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"zt0 - zt2, zm1 / zm2"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f09d5d7e-c788-4e6d-96b4-8cf999675ff8",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "SageMath 10.3.rc1",
"language": "sage",
"name": "sagemath-310"
},
"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.2"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

240
zetas_triples.py Normal file
View File

@ -0,0 +1,240 @@
def trinomiales(A, Vf, Vg, Vd, total=True):
r"""
Return data necessary to compute the zeta functions of
a triple singularity defined by :math:`z^3 -3 f z^2 + 2 g`, where
:math:`f, g` are polynomials in two variables.
We consider an embedded resolution of :math:`fg(f^3 - g^2)` with
a stratification of the exceptional divisor:
- :math:`\check{E}_i`: the smooth part of the total divisor
- :math:`E_i\cap E_j`: the double points of the divisor
- :math:`E_i\cap \{f=0\}`: the intersections with the strict
transform of :math:`f`
- :math:`E_i\cap \{g=0\}`: the intersections with the strict
transform of :math:`g`
- :math:`E_i\cap \{f^3=g^2\}`: the intersections with the strict
transform of :math:`f^3-g^2`
It is also possible to forget the strict transforms of :math:`f, g`
and even to consider only resolutions of :math:`f^3 - g^2`.
INPUT:
- ``A`` -- the incidence matrix of a resolution
- ``Vf`` -- the vector with the intersection numbers of the strict
transform of :math:`f` with the divisors of the resolution
- ``Vg`` -- the vector with the intersection numbers of the strict
transform of :math:`g` with the divisors of the resolution
- ``Vd`` -- the vector with the intersection numbers of the strict
transform of :math:`f^3 - g^2` with the divisors of the resolution
- ``total`` -- boolean (default: ``True``), whether we consider also
the strata corresponding to the strict transforms of :math:`f, g`.
OUTPUT:
Polynomials :math:`z^3 + M_1 z + M_0` or :math:`z^3 + M_2 z^2 + M_0` are
assigned to each strata. The monomials are of the form :math:`x^k` for the
smooth parts of the divisors and :math:`x^k y^l` for the double points.
Each variable is associated to a divisor or to a strict transform
- ``n`` -- the number of irreducible components of the exceptional divisor
- ``Nf`` -- the vector in :math:`\mathbb{Z}^n` of the multiplicities for
the total transform of :math:`f`
- ``Ng`` -- the vector in :math:`\mathbb{Z}^n` of the multiplicities for
the total transform of :math:`g`
- ``Nd`` -- the vector in :math:`\mathbb{Z}^n` of the multiplicities for
the total transform of :math:`f^3 - g^2`
- ``euler`` -- the vector in :math:`\mathbb{Z}^n` of the Euler
characteristic of the smooth part of the strata. If ``total=True`` this
smooth part does not contain the intersections with total transform
of :math:`f, g`
- ``nus`` -- the vector in :math:`\mathbb{Z}^n` of the canonical
multiplicities
- ``pols`` -- a dictionary with keys ``(i, )``, ``(i, j)``, ``(i, 'f')``
(if ``total=True``), ``(i, 'g')`` (if ``total=True``), and ``(i, 'd')``
assigning the polynomial of the stratum (non-degenerated with respect
to its Newton polytope), the weights ``(nui, nuj, 1)`` coding
the form
:math:`x^{\nu_i-1}y^{\nu_j-1}\operatorname{d}\! x \operatorname{d}\! y \operatorname{d}\! z`
EXAMPLES::
sage: R.<x, y, z> = QQ[]
sage: f, g = (x, y)
sage: A = Matrix(QQ, 3, [-3, 0, 1, 0, -2, 1, 1, 1, -1])
sage: Vf = vector(QQ, [1, 0, 0])
sage: Vg = vector(QQ, [0, 1, 0])
sage: Vd = vector(QQ, [0, 0, 1])
sage: trinomiales(A, Vf, Vg, Vd)
(3, (1, 1, 2), (1, 2, 3), (2, 3, 6), (0, 0, -1), (2, 3, 5),
{(0, 'f'): (x + x*y*z + z^3, (2, 1, 1), 1),
(0, 2): (z^3 + x*y^3 + x*y^2*z, (2, 5, 1), 1),
(1, 'g'): (x*z + x^2*y + z^3, (3, 1, 1), 1),
(1, 2): (z^3 + x*y^2*z + x^2*y^3, (3, 5, 1), 1),
(2, 'd'): (x*z^2 + z^3 + x^3*y, (5, 1, 1), 1),
0: (x + x*z + z^3, (2, 1, 1), 0),
1: (x^2 + x*z + z^3, (3, 1, 1), 0),
2: (x^3 + x^2*z + z^3, (5, 1, 1), -1)})
sage: trinomiales(A, Vf, Vg, Vd, total=False)
(3, (1, 1, 2), (1, 2, 3), (2, 3, 6), (1, 1, -1), (2, 3, 5),
{(0, 2): (z^3 + x*y^3 + x*y^2*z, (2, 5, 1), 1),
(1, 2): (z^3 + x*y^2*z + x^2*y^3, (3, 5, 1), 1),
(2, 'd'): (x*z^2 + z^3 + x^3*y, (5, 1, 1), 1),
0: (x + x*z + z^3, (2, 1, 1), 1),
1: (x^2 + x*z + z^3, (3, 1, 1), 1),
2: (x^3 + x^2*z + z^3, (5, 1, 1), -1)})
"""
R = PolynomialRing(QQ, 'x, y, z', order='negdeglex')
x, y, z = R.gens()
n = A.nrows()
A1 = -A ** -1
Nf, Ng, Nd = [A1 * N0 for N0 in (Vf, Vg, Vd)]
diag = vector(A.diagonal())
unos = vector(n * [1])
if total:
VV = Vf + Vg
else:
VV = Vf.parent()(0)
euler = (-A + 2 * identity_matrix(n)) * unos + diag - VV - Vd
nus = A1 * (diag + 2 * unos) + unos
expos = {}
for j in range(n):
a, b = (Nf[j], Ng[j])
eq = 3 * a == 2 * Ng[j]
nnd = min(3 * a, 2 * b) == Nd[j]
if nnd:
expos[j] = ((a, b), (a / 2, b), nus[j], eq, nnd)
else:
expos[j] = ((a, b), (a / 2, Nd[j] - b), nus[j], eq, nnd)
cadenas = ('d',)
if total:
expos['f'] = ((1, 0), (0, 0), 1, False, True)
expos['g'] = ((0, 1), (0, 0), 1, False, True)
cadenas = ('f', 'g') + cadenas
expos['d'] = ((0, 0), (0, 1), 1, True, False)
pols = {}
for j in range(n):
if expos[j][-1]:
a, b = expos[j][0]
pols[j] = (z ** 3 + x ** a * z + x ** b, (expos[j][2], 1, 1),
euler[j])
else:
a, b = expos[j][1]
pols[j] = (z ** 3 + x ** a * z ** 2 + x ** b,
(expos[j][2], 1, 1), euler[j])
interdiv = [(i, j) for i, j in Combinations(n, 2) if A[i, j] != 0]
interstrict = [(i, j) for i in range(n) for j in cadenas
if eval('V' + j)[i] != 0]
for i, j in interdiv + interstrict:
if j in ZZ:
ep = 1
else:
ep = eval('V' + j)[i]
eqi, nndi = expos[i][-2:]
eqj, nndj = expos[j][-2:]
nd = eqi and eqj and not (nndi and nndj)
if not nd:
ai, bi = expos[i][0]
aj, bj = expos[j][0]
pols[i, j] = (z ** 3 + x ** ai * y ** aj * z + x ** bi * y ** bj,
(expos[i][2], expos[j][2], 1), ep)
else:
ai, bi = expos[i][1]
aj, bj = expos[j][1]
pols[i, j] = (z ** 3 + x ** ai * y ** aj * z ** 2 +
x ** bi * y ** bj, (expos[i][2], expos[j][2], 1), ep)
return n, Nf, Ng, Nd, euler, nus, pols
def estrato(pol, pesos, euler, info=False):
r"""
Return the topological and Igusa zeta functions associated to a stratum
INPUT:
- ``pol`` -- a trinomial non degenerated with respect to its Newton
polyhedron
- ``pesos`` -- the canonical weights :math:`\nu:i`
- `euler`` -- the Euler characteristic of the stratum
- ``info`` -- boolean (default: False), if ``True`` a dictionary giving
the powers of cyclotomic polynomials for the monodromy zeta function
is given
EXAMPLES::
sage: R.<x, y, z> = QQ[]
sage: F = z^3 + x^4 * y^6 * z + x^7 * y^9
sage: estrato(F, (1, 1, 1), 1, info=True)
((1/3*s^2 + 1/2*s + 2/9)/(s^3 + 35/18*s^2 + 7/6*s + 2/9), -t^3 + 1,
{1: 1, 3: 1})
"""
Z1 = ZetaFunctions(pol)
zetatop = euler * Z1.topological_zeta(local=True, weights=pesos)
zetamon = Z1.monodromy_zeta() ** euler
if info:
dic = {}
for p, j in zetamon.factor():
c = p.is_cyclotomic(certificate=True)
dic[c] = j
return zetatop, zetamon, dic
return zetatop, zetamon
def zetas(n, pols, info=False):
r"""
Return the topological and Igusa zeta functions from the data of
a stratification
INPUT:
- ``n`` -- the number of exceptional divisors
- ``pols`` -- a dictionary from ``trinomiales``
- ``info`` -- boolean (default: False), if ``True`` a dictionary giving
the powers of cyclotomic polynomials for the monodromy zeta function
is given
EXAMPLES::
sage: A = Matrix(QQ, 3, [-3, 0, 1, 0, -2, 1, 1, 1, -1])
sage: Vf = vector(QQ, [1, 0, 0])
sage: Vg = vector(QQ, [0, 1, 0])
sage: Vd = vector(QQ, [0, 0, 1])
sage: n, Nf, Ng, Nd, euler, nus, pols = trinomiales(A, Vf, Vg, Vd)
sage: zetas(n, pols, info=True)
(1/(s + 1), -t + 1, {1: 1})
"""
zetatop = 0
T = PolynomialRing(QQ, 't')
t = T.gen(0)
zetamon = 1 / (1 - t ** 3) ** n
for k in pols:
zt, zm = estrato(*pols[k])
zetatop += zt
zetamon *= zm
if info:
dic = {}
for p, j in zetamon.factor():
c = p.is_cyclotomic(certificate=True)
dic[c] = j
return zetatop, zetamon, dic
return zetatop, zetamon

1
zetas_triples.sage Symbolic link
View File

@ -0,0 +1 @@
zetas_triples.py