{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false } }, "outputs": [], "source": [ "# load('ZetaFunctionsNewtonND.py')\n", "R. = PolynomialRing(QQ, order='neglex')\n", "S. = PolynomialRing(QQ, order='neglex')\n", "S. = PolynomialRing(QQ)\n", "f = u^5 + v^6\n", "F = z^10 + f(u=x, v=y)\n", "ZF = ZetaFunctions(F)\n", "Zf = ZetaFunctions(f)\n", "dd = (1, 2, 3, 4, 5, 6, 8, 10, 15, 30)\n", "K = {d: ZF.topological_zeta(local=True, d=d) for d in dd}\n", "k = {d: Zf.topological_zeta(local=True, d=d) for d in dd}" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "1\n" ] }, { "data": { "text/html": [ "\\(\\displaystyle \\left(\\frac{1}{5}\\right) \\cdot (s + \\frac{7}{15})^{-1} \\cdot (s + 1)^{-1} \\cdot (s + \\frac{7}{3})\\)" ], "text/latex": [ "$\\displaystyle \\left(\\frac{1}{5}\\right) \\cdot (s + \\frac{7}{15})^{-1} \\cdot (s + 1)^{-1} \\cdot (s + \\frac{7}{3})$" ], "text/plain": [ "(1/5) * (s + 7/15)^-1 * (s + 1)^-1 * (s + 7/3)" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "========================\n", "2\n" ] }, { "data": { "text/html": [ "\\(\\displaystyle 0\\)" ], "text/latex": [ "$\\displaystyle 0$" ], "text/plain": [ "0" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "========================\n", "3\n" ] }, { "data": { "text/html": [ "\\(\\displaystyle \\left(\\frac{2}{5}\\right) \\cdot (s + \\frac{7}{15})^{-1}\\)" ], "text/latex": [ "$\\displaystyle \\left(\\frac{2}{5}\\right) \\cdot (s + \\frac{7}{15})^{-1}$" ], "text/plain": [ "(2/5) * (s + 7/15)^-1" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "========================\n", "4\n" ] }, { "data": { "text/html": [ "\\(\\displaystyle 0\\)" ], "text/latex": [ "$\\displaystyle 0$" ], "text/plain": [ "0" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "========================\n", "5\n" ] }, { "data": { "text/html": [ "\\(\\displaystyle \\left(\\frac{1}{30}\\right) \\cdot (s + \\frac{7}{15})^{-1}\\)" ], "text/latex": [ "$\\displaystyle \\left(\\frac{1}{30}\\right) \\cdot (s + \\frac{7}{15})^{-1}$" ], "text/plain": [ "(1/30) * (s + 7/15)^-1" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "========================\n", "6\n" ] }, { "data": { "text/html": [ "\\(\\displaystyle \\left(\\frac{2}{5}\\right) \\cdot (s + \\frac{7}{15})^{-1}\\)" ], "text/latex": [ "$\\displaystyle \\left(\\frac{2}{5}\\right) \\cdot (s + \\frac{7}{15})^{-1}$" ], "text/plain": [ "(2/5) * (s + 7/15)^-1" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "========================\n", "8\n" ] }, { "data": { "text/html": [ "\\(\\displaystyle 0\\)" ], "text/latex": [ "$\\displaystyle 0$" ], "text/plain": [ "0" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "========================\n", "10\n" ] }, { "data": { "text/html": [ "\\(\\displaystyle \\left(-\\frac{1}{6}\\right) \\cdot (s + \\frac{7}{15})^{-1}\\)" ], "text/latex": [ "$\\displaystyle \\left(-\\frac{1}{6}\\right) \\cdot (s + \\frac{7}{15})^{-1}$" ], "text/plain": [ "(-1/6) * (s + 7/15)^-1" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "========================\n", "15\n" ] }, { "data": { "text/html": [ "\\(\\displaystyle \\left(\\frac{7}{30}\\right) \\cdot (s + \\frac{7}{15})^{-1}\\)" ], "text/latex": [ "$\\displaystyle \\left(\\frac{7}{30}\\right) \\cdot (s + \\frac{7}{15})^{-1}$" ], "text/plain": [ "(7/30) * (s + 7/15)^-1" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "========================\n", "30\n" ] }, { "data": { "text/html": [ "\\(\\displaystyle \\left(\\frac{7}{30}\\right) \\cdot (s + \\frac{7}{15})^{-1}\\)" ], "text/latex": [ "$\\displaystyle \\left(\\frac{7}{30}\\right) \\cdot (s + \\frac{7}{15})^{-1}$" ], "text/plain": [ "(7/30) * (s + 7/15)^-1" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "========================\n" ] } ], "source": [ "for d in dd:\n", " if K[d] == 0:\n", " print(d)\n", " show(0)\n", " else:\n", " print(d)\n", " show(K[d].factor())\n", " print(\"========================\")" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "1\n" ] }, { "data": { "text/html": [ "\\(\\displaystyle \\left(\\frac{1}{3}\\right) \\cdot (s + \\frac{11}{30})^{-1} \\cdot (s + 1)^{-1} \\cdot (s + \\frac{11}{10})\\)" ], "text/latex": [ "$\\displaystyle \\left(\\frac{1}{3}\\right) \\cdot (s + \\frac{11}{30})^{-1} \\cdot (s + 1)^{-1} \\cdot (s + \\frac{11}{10})$" ], "text/plain": [ "(1/3) * (s + 11/30)^-1 * (s + 1)^-1 * (s + 11/10)" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "========================\n", "2\n" ] }, { "data": { "text/html": [ "\\(\\displaystyle \\left(\\frac{2}{15}\\right) \\cdot (s + \\frac{11}{30})^{-1}\\)" ], "text/latex": [ "$\\displaystyle \\left(\\frac{2}{15}\\right) \\cdot (s + \\frac{11}{30})^{-1}$" ], "text/plain": [ "(2/15) * (s + 11/30)^-1" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "========================\n", "3\n" ] }, { "data": { "text/html": [ "\\(\\displaystyle \\left(\\frac{2}{15}\\right) \\cdot (s + \\frac{11}{30})^{-1}\\)" ], "text/latex": [ "$\\displaystyle \\left(\\frac{2}{15}\\right) \\cdot (s + \\frac{11}{30})^{-1}$" ], "text/plain": [ "(2/15) * (s + 11/30)^-1" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "========================\n", "4\n" ] }, { "data": { "text/html": [ "\\(\\displaystyle 0\\)" ], "text/latex": [ "$\\displaystyle 0$" ], "text/plain": [ "0" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "========================\n", "5\n" ] }, { "data": { "text/html": [ "\\(\\displaystyle \\left(\\frac{1}{6}\\right) \\cdot (s + \\frac{11}{30})^{-1}\\)" ], "text/latex": [ "$\\displaystyle \\left(\\frac{1}{6}\\right) \\cdot (s + \\frac{11}{30})^{-1}$" ], "text/plain": [ "(1/6) * (s + 11/30)^-1" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "========================\n", "6\n" ] }, { "data": { "text/html": [ "\\(\\displaystyle \\left(\\frac{2}{15}\\right) \\cdot (s + \\frac{11}{30})^{-1}\\)" ], "text/latex": [ "$\\displaystyle \\left(\\frac{2}{15}\\right) \\cdot (s + \\frac{11}{30})^{-1}$" ], "text/plain": [ "(2/15) * (s + 11/30)^-1" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "========================\n", "8\n" ] }, { "data": { "text/html": [ "\\(\\displaystyle 0\\)" ], "text/latex": [ "$\\displaystyle 0$" ], "text/plain": [ "0" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "========================\n", "10\n" ] }, { "data": { "text/html": [ "\\(\\displaystyle \\left(-\\frac{1}{30}\\right) \\cdot (s + \\frac{11}{30})^{-1}\\)" ], "text/latex": [ "$\\displaystyle \\left(-\\frac{1}{30}\\right) \\cdot (s + \\frac{11}{30})^{-1}$" ], "text/plain": [ "(-1/30) * (s + 11/30)^-1" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "========================\n", "15\n" ] }, { "data": { "text/html": [ "\\(\\displaystyle \\left(-\\frac{1}{30}\\right) \\cdot (s + \\frac{11}{30})^{-1}\\)" ], "text/latex": [ "$\\displaystyle \\left(-\\frac{1}{30}\\right) \\cdot (s + \\frac{11}{30})^{-1}$" ], "text/plain": [ "(-1/30) * (s + 11/30)^-1" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "========================\n", "30\n" ] }, { "data": { "text/html": [ "\\(\\displaystyle \\left(-\\frac{1}{30}\\right) \\cdot (s + \\frac{11}{30})^{-1}\\)" ], "text/latex": [ "$\\displaystyle \\left(-\\frac{1}{30}\\right) \\cdot (s + \\frac{11}{30})^{-1}$" ], "text/plain": [ "(-1/30) * (s + 11/30)^-1" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "========================\n" ] } ], "source": [ "for d in dd:\n", " if k[d] == 0:\n", " print(d)\n", " show(0)\n", " else:\n", " print(d)\n", " show(k[d].factor())\n", " print(\"========================\")" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[1, 5]" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "divisors(5)" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "def corchete(fz, e, N):\n", " res = 0\n", " for l0 in divisors(N / e):\n", " l = l0 * e\n", " res += moebius(l0) * fz[l]\n", " return res" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1/6/(s + 7/15)" ] }, "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "corchete(k, 2, 10)(s=s + 1 / 10)" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1/5/(s + 7/15)" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "corchete(k, 5, 10)(s=s + 1 / 10)" ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "-1/30/(s + 7/15)" ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "corchete(k, 10, 10)(s=s + 1 / 10)" ] }, { "cell_type": "code", "execution_count": 23, "metadata": {}, "outputs": [], "source": [ "def Ztopmanuel(dic, N):\n", " res = 1 / (N * s + 1) \n", " res += (N - 1) / N * s / (s+1) * ((N * s+ N + 1)/ (N * s + 1)) * dic[1](s=s + 1 / N)\n", " div = [e for e in divisors(N) if e != 1]\n", " for e in div:\n", " res += -s / (s + 1) * (e^2 - 1) / N * corchete(dic, e, N)(s=s + 1 / N)\n", " return res" ] }, { "cell_type": "code", "execution_count": 25, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0" ] }, "execution_count": 25, "metadata": {}, "output_type": "execute_result" } ], "source": [ "(Ztopmanuel(k, 10) - K[1])" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false } }, "outputs": [ { "data": { "text/plain": [ "(4/15/(s^2 + 22/15*s + 7/15),\n", " 0,\n", " 0,\n", " 1/5/(s + 7/15),\n", " 1/6/(s + 7/15),\n", " -2/5/(s + 7/15),\n", " 0,\n", " (7/30) * (s + 7/15)^-1)" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "AK10t30 = K10t30\n", "AK10t15 = K10t15 - AK10t30\n", "AK10t10 = K10t10 - AK10t30\n", "AK10t6 = K10t6 - AK10t30\n", "AK10t5 = K10t5 - AK10t10 - AK10t15 - AK10t30\n", "AK10t3 = K10t3 - AK10t6 - AK10t30\n", "AK10t2 = K10t2 - AK10t6 - AK10t10 - AK10t30\n", "AK10 = K10 - AK10t3 - AK10t5 - AK10t6 - AK10t10 - AK10t30\n", "\n", "AK10, AK10t2, AK10t3, AK10t5, AK10t6, AK10t10, AK10t15, AK10t30" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false } }, "outputs": [ { "data": { "text/plain": [ "0" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "K10- AK10 - AK10t5 - AK10t6 - AK10t10 - AK10t30" ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false } }, "outputs": [ { "data": { "text/plain": [ "((1/3*s + 2/5)/(s^2 + 47/30*s + 77/150),\n", " 2/15/(s + 7/15),\n", " 2/15/(s + 7/15),\n", " 0,\n", " 1/6/(s + 7/15),\n", " 2/15/(s + 7/15),\n", " 0,\n", " -1/30/(s + 7/15),\n", " -1/30/(s + 7/15),\n", " -1/30/(s + 7/15))" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g=x^5 + y^6\n", "Zg = ZetaFunctions(g)\n", "G=Zg.topological_zeta(local=True).value()\n", "GS=G(s=s+1/10)\n", "G2=Zg.topological_zeta(local=True, d=2).value()\n", "GS2=G2(s=s+1/10)\n", "G3=Zg.topological_zeta(local=True, d=3).value()\n", "GS3=G3(s=s+1/10)\n", "G4=Zg.topological_zeta(local=True, d=4)\n", "GS4=G4(s=s+1/10)\n", "G5=Zg.topological_zeta(local=True, d=5).value()\n", "GS5=G5(s=s+1/10)\n", "G6=Zg.topological_zeta(local=True, d=6).value()\n", "GS6=G6(s=s+1/10)\n", "G8=Zg.topological_zeta(local=True, d=8)\n", "GS8=G8(s=s+1/10)\n", "G10=Zg.topological_zeta(local=True, d=10).value()\n", "GS10=G10(s=s+1/10)\n", "G15=Zg.topological_zeta(local=True, d=15).value()\n", "GS15=G15(s=s+1/10)\n", "G30=Zg.topological_zeta(local=True, d=30).value()\n", "GS30=G30(s=s+1/10)\n", "GS, GS2, GS3, GS4, GS5, GS6, GS8, GS10, GS15, GS30" ] }, { "cell_type": "code", "execution_count": 20, "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false } }, "outputs": [ { "data": { "text/plain": [ "(1/30/(s^2 + 47/30*s + 77/150),\n", " 0,\n", " 0,\n", " 1/5/(s + 7/15),\n", " 1/6/(s + 7/15),\n", " 0,\n", " 0,\n", " -1/30/(s + 7/15))" ] }, "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "AGS30 = GS30\n", "AGS15 = GS15 - AGS30\n", "AGS10 = GS10 - AGS30\n", "AGS6 = GS6 - AGS30\n", "AGS5 = GS5 - AGS10 - AGS15 - AGS30\n", "AGS3 = GS3 - AGS6 - AGS30\n", "AGS2 = GS2 - AGS6 - AGS10 - AGS30\n", "AGS = GS - AGS2 - AGS3 - AGS5 - AGS6 - AGS10 - AGS15 - AGS30\n", "\n", "AGS, AGS2, AGS3, AGS5, AGS6, AGS10, AGS15, AGS30" ] }, { "cell_type": "code", "execution_count": 22, "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false } }, "outputs": [ { "data": { "text/plain": [ "0" ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "GS - AGS - AGS5 - AGS6 - AGS30 " ] }, { "cell_type": "code", "execution_count": 24, "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false } }, "outputs": [ { "data": { "text/plain": [ "0" ] }, "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ "aux = K10 - 1/((10*s+1)) - (9/10)*(s/(s+1))*((10*s+11)/(10*s+1))*GS + (3/10)*(s/(s+1))*AGS6 + (24/10)*(s/(s+1))*AGS5 + (99/10)*(s/(s+1))*AGS30\n", "aux" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false } }, "outputs": [ { "data": { "text/plain": [ "\u001b[0;31mSignature:\u001b[0m \u001b[0mmoebius\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mn\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;31mType:\u001b[0m Moebius\n", "\u001b[0;31mString form:\u001b[0m The Moebius function\n", "\u001b[0;31mFile:\u001b[0m /usr/local/sagedev/src/sage/arith/misc.py\n", "\u001b[0;31mDocstring:\u001b[0m \n", " Return the value of the Möbius function of abs(n), where n is an\n", " integer.\n", "\n", " DEFINITION: \\mu(n) is 0 if n is not square free, and otherwise\n", " equals (-1)^r, where n has r distinct prime factors.\n", "\n", " For simplicity, if n=0 we define \\mu(n) = 0.\n", "\n", " IMPLEMENTATION: Factors or - for integers - uses the PARI C\n", " library.\n", "\n", " INPUT:\n", "\n", " * \"n\" - anything that can be factored.\n", "\n", " OUTPUT: 0, 1, or -1\n", "\n", " EXAMPLES:\n", "\n", " sage: moebius(-5)\n", " -1\n", " sage: moebius(9)\n", " 0\n", " sage: moebius(12)\n", " 0\n", " sage: moebius(-35)\n", " 1\n", " sage: moebius(-1)\n", " 1\n", " sage: moebius(7)\n", " -1\n", "\n", " sage: moebius(0) # potentially nonstandard!\n", " 0\n", "\n", " The moebius function even makes sense for non-integer inputs.\n", "\n", " sage: x = GF(7)['x'].0\n", " sage: moebius(x + 2)\n", " -1\n", "\n", " Tests with numpy and gmpy2 numbers:\n", "\n", " sage: from numpy import int8\n", " sage: moebius(int8(-5))\n", " -1\n", " sage: from gmpy2 import mpz\n", " sage: moebius(mpz(-5))\n", " -1\n", "\u001b[0;31mInit docstring:\u001b[0m Initialize self. See help(type(self)) for accurate signature.\n", "\u001b[0;31mCall docstring:\u001b[0m\n", " EXAMPLES:\n", "\n", " sage: from sage.arith.misc import Moebius\n", " sage: Moebius().__call__(7)\n", " -1" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "moebius?" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(-1, -1)" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "moebius(5), moebius(-5)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "SageMath 10.4.beta3", "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.2" } }, "nbformat": 4, "nbformat_minor": 4 }