{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "75dee015-1de0-4841-9c6b-ffa779a52a34",
   "metadata": {},
   "source": [
    "定理 ラマヌジャンのテータ関数$f(-q)=\\prod_{n=1}^{\\infty}(1-q^n)$について$a,b\\gt 1$, $a\\,b=\\pi^2$の時次の変換公式が成り立つ:\n",
    "$$ b^{\\frac{1}{4}}\\,e^ {- \\frac{b}{12} }\\,f\\left(-e^{- 2\\,b\\,n }\\right)=a^{\\frac{1}{4}}\\,e^ {- \\frac{a}{12} }\\,f\\left(-e^ {- 2\\,a\\,n }\\right)$$\n",
    "
\n",
    "\n",
    "証明の方針はデデキントのイータ関数$\\eta\\left(z\\right)=e^{\\frac{i\\,\\pi\\,z}{12}}\\,\\prod_{n=1}^{\\infty }{\\left(1-e^{2\\,i\\,\\pi\\,n\\,z}\\right)}$の保型性を表す次の式から式変形で導きます。\n",
    "$$\\eta\\left(-\\frac{1}{z}\\right)=\\sqrt{-i\\,z}\\,\\eta\\left(z\\right)$$\n",
    "この式の$z$に何を代入すれば良いのかが問題です。最初は$\\frac{a}{\\pi}=\\frac{\\pi}{b}$などを試していたのですが、式のあちこちに虚数単位が残りうまく行きませんでした。そもそもそれだとイータ関数の引数が実数になってしまい、定義域を外れているのですね。というわけで何か虚数を$z$に代入する必要があります。そこで安直に両辺に虚数単位をかけたものを代入してみるとビンゴでした。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "655cc869-8b34-4249-b5df-dd52aa5d704d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "\\[\\tag{${\\it \\%o}_{0}$}\\eta\\left(-\\frac{1}{z}\\right)=\\sqrt{-i\\,z}\\,\\eta\\left(z\\right)\\]"
      ],
      "text/plain": [
       "                              1\n",
       "(%o0)                   eta(- -) = sqrt(- %i z) eta(z)\n",
       "                              z"
      ],
      "text/x-maxima": [
       "eta(-1/z) = sqrt(-%i*z)*eta(z)"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "EM:eta(-1/z)=sqrt(-%i*z)*eta(z);"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "fe1ea2d6-29e7-4055-87fe-fe24863bf9c5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "\\[\\tag{${\\it \\%o}_{1}$}\\pi^2=a\\,b\\]"
      ],
      "text/plain": [
       "                                     2\n",
       "(%o1)                             %pi  = a b"
      ],
      "text/x-maxima": [
       "%pi^2 = a*b"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "C1:%pi^2=a*b;"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "a2a12d61-66de-46dd-b73e-e9a477c2a577",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "\\[\\tag{${\\it \\%o}_{2}$}\\frac{i\\,\\pi}{b}=\\frac{i\\,a}{\\pi}\\]"
      ],
      "text/plain": [
       "                                 %i %pi   %i a\n",
       "(%o2)                            ------ = ----\n",
       "                                   b      %pi"
      ],
      "text/x-maxima": [
       "(%i*%pi)/b = (%i*a)/%pi"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "C2:C1/(%pi*b)*%i;"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f3d26b2b-e585-437c-a625-39d36773bc23",
   "metadata": {},
   "source": [
    "$EM$の左辺の$z$に$C2$の左辺を、$EM$の右辺の$z$に$C2$の右辺を代入します。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "2412e17b-07a3-4e7a-9190-9c8b99520005",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "\\[\\tag{${\\it \\%o}_{3}$}\\eta\\left(\\frac{i\\,b}{\\pi}\\right)=\\frac{\\sqrt{a}\\,\\eta\\left(\\frac{i\\,a}{\\pi}\\right)}{\\sqrt{\\pi}}\\]"
      ],
      "text/plain": [
       "                                                 %i a\n",
       "                                     sqrt(a) eta(----)\n",
       "                             %i b                %pi\n",
       "(%o3)                    eta(----) = -----------------\n",
       "                             %pi         sqrt(%pi)"
      ],
      "text/x-maxima": [
       "eta((%i*b)/%pi) = (sqrt(a)*eta((%i*a)/%pi))/sqrt(%pi)"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "EM2:ev(lhs(EM),z=lhs(C2))=ev(rhs(EM),z=rhs(C2));"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c269229e-4d5d-4a49-9ece-6b15770b4b28",
   "metadata": {},
   "source": [
    "イータ関数をその定義で置き換えます。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "403bcda3-6af2-4aaf-8743-ff0795ab9223",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "\\[\\tag{${\\it \\%o}_{4}$}e^ {- \\frac{b}{12} }\\,\\prod_{n=1}^{\\infty }{\\left(1-e^ {- 2\\,b\\,n }\\right)}=\\frac{\\sqrt{a}\\,e^ {- \\frac{a}{12} }\\,\\prod_{n=1}^{\\infty }{\\left(1-e^ {- 2\\,a\\,n }\\right)}}{\\sqrt{\\pi}}\\]"
      ],
      "text/plain": [
       "                                                         inf\n",
       "                                                        /===\\\n",
       "                                                 - a/12  ! !         - 2 a n\n",
       "                inf                    sqrt(a) %e        ! !  (1 - %e       )\n",
       "               /===\\                                     ! !\n",
       "        - b/12  ! !         - 2 b n                     n = 1\n",
       "(%o4) %e        ! !  (1 - %e       ) = --------------------------------------\n",
       "                ! !                                  sqrt(%pi)\n",
       "               n = 1"
      ],
      "text/x-maxima": [
       "%e^-(b/12)*'product(1-%e^-(2*b*n),n,1,inf)\n",
       "  = (sqrt(a)*%e^-(a/12)*'product(1-%e^-(2*a*n),n,1,inf))/sqrt(%pi)"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "EM3:EM2,eta(z):=exp(2*%i*%pi*z/24)*product(1-exp(2*%pi*%i*z*n),n,1,inf);"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "bd6538e0-6a9d-4684-915e-d0566b9f4eb4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "\\[\\tag{${\\it \\%o}_{5}$}\\frac{b^{\\frac{1}{4}}}{\\pi^{\\frac{1}{4}}}=\\frac{\\pi^{\\frac{1}{4}}}{a^{\\frac{1}{4}}}\\]"
      ],
      "text/plain": [
       "                                  1/4       1/4\n",
       "                                 b       %pi\n",
       "(%o5)                           ------ = ------\n",
       "                                   1/4     1/4\n",
       "                                %pi       a"
      ],
      "text/x-maxima": [
       "b^(1/4)/%pi^(1/4) = %pi^(1/4)/a^(1/4)"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "C3:(b*%pi/C1)^(1/4);"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7602d9ed-6759-4cad-b9ba-e2714678fba9",
   "metadata": {},
   "source": [
    "$C3$の左辺と$EM3$の左辺をかけ、$C3$の右辺と$EM3$の右辺をかけたものは等しくなります。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "ff33d4b6-abfa-4854-a656-c8b506a7f4de",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "\\[\\tag{${\\it \\%o}_{6}$}\\frac{b^{\\frac{1}{4}}\\,e^ {- \\frac{b}{12} }\\,\\prod_{n=1}^{\\infty }{\\left(1-e^ {- 2\\,b\\,n }\\right)}}{\\pi^{\\frac{1}{4}}}=\\frac{a^{\\frac{1}{4}}\\,e^ {- \\frac{a}{12} }\\,\\prod_{n=1}^{\\infty }{\\left(1-e^ {- 2\\,a\\,n }\\right)}}{\\pi^{\\frac{1}{4}}}\\]"
      ],
      "text/plain": [
       "                     inf                                   inf\n",
       "                    /===\\                                 /===\\\n",
       "       1/4   - b/12  ! !         - 2 b n     1/4   - a/12  ! !         - 2 a n\n",
       "      b    %e        ! !  (1 - %e       )   a    %e        ! !  (1 - %e       )\n",
       "                     ! !                                   ! !\n",
       "                    n = 1                                 n = 1\n",
       "(%o6) ----------------------------------- = -----------------------------------\n",
       "                       1/4                                   1/4\n",
       "                    %pi                                   %pi"
      ],
      "text/x-maxima": [
       "(b^(1/4)*%e^-(b/12)*'product(1-%e^-(2*b*n),n,1,inf))/%pi^(1/4)\n",
       "  = (a^(1/4)*%e^-(a/12)*'product(1-%e^-(2*a*n),n,1,inf))/%pi^(1/4)"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "lhs(C3)*lhs(EM3)=rhs(C3)*rhs(EM3);"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "9d1977ce-3575-4afd-9259-ea2eb298977b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "\\[\\tag{${\\it \\%o}_{7}$}b^{\\frac{1}{4}}\\,e^ {- \\frac{b}{12} }\\,\\prod_{n=1}^{\\infty }{\\left(1-e^ {- 2\\,b\\,n }\\right)}=a^{\\frac{1}{4}}\\,e^ {- \\frac{a}{12} }\\,\\prod_{n=1}^{\\infty }{\\left(1-e^ {- 2\\,a\\,n }\\right)}\\]"
      ],
      "text/plain": [
       "                     inf                                   inf\n",
       "                    /===\\                                 /===\\\n",
       "       1/4   - b/12  ! !         - 2 b n     1/4   - a/12  ! !         - 2 a n\n",
       "(%o7) b    %e        ! !  (1 - %e       ) = a    %e        ! !  (1 - %e       )\n",
       "                     ! !                                   ! !\n",
       "                    n = 1                                 n = 1"
      ],
      "text/x-maxima": [
       "b^(1/4)*%e^-(b/12)*'product(1-%e^-(2*b*n),n,1,inf)\n",
       "  = a^(1/4)*%e^-(a/12)*'product(1-%e^-(2*a*n),n,1,inf)"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "%*%pi^(1/4);"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "54f0978f-375e-4d97-8e1c-daa312610fa8",
   "metadata": {},
   "source": [
    "これで証明は終了です。簡単なものでもちゃんと証明できると嬉しいですね。
\n",
    "\n",
    "\n",
    "\n",
    "ところで途中で現れた$EM2$に対して$C3$を掛けて整理するとイータ関数に関する対称な式が得られます。やってみましょう。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "214a3a47-8f5d-4a34-a545-fbdff5da121b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "\\[\\tag{${\\it \\%o}_{8}$}\\frac{b^{\\frac{1}{4}}\\,\\eta\\left(\\frac{i\\,b}{\\pi}\\right)}{\\pi^{\\frac{1}{4}}}=\\frac{a^{\\frac{1}{4}}\\,\\eta\\left(\\frac{i\\,a}{\\pi}\\right)}{\\pi^{\\frac{1}{4}}}\\]"
      ],
      "text/plain": [
       "                         1/4     %i b     1/4     %i a\n",
       "                        b    eta(----)   a    eta(----)\n",
       "                                 %pi              %pi\n",
       "(%o8)                   -------------- = --------------\n",
       "                               1/4              1/4\n",
       "                            %pi              %pi"
      ],
      "text/x-maxima": [
       "(b^(1/4)*eta((%i*b)/%pi))/%pi^(1/4) = (a^(1/4)*eta((%i*a)/%pi))/%pi^(1/4)"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "lhs(C3)*lhs(EM2)=rhs(C3)*rhs(EM2);"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "9fb7678e-3581-4dd0-85be-37fed08c43c1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "\\[\\tag{${\\it \\%o}_{9}$}b^{\\frac{1}{4}}\\,\\eta\\left(\\frac{i\\,b}{\\pi}\\right)=a^{\\frac{1}{4}}\\,\\eta\\left(\\frac{i\\,a}{\\pi}\\right)\\]"
      ],
      "text/plain": [
       "                         1/4     %i b     1/4     %i a\n",
       "(%o9)                   b    eta(----) = a    eta(----)\n",
       "                                 %pi              %pi"
      ],
      "text/x-maxima": [
       "b^(1/4)*eta((%i*b)/%pi) = a^(1/4)*eta((%i*a)/%pi)"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "%*%pi^(1/4);"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6ccd3c93-c598-4da6-b9e1-c15aefac9d00",
   "metadata": {},
   "source": [
    "デデキントのイータ関数の保型性を出来るだけ対称な形で書こうとすると上記の式が綺麗ではないでしょうか。もちろん$a,b$の条件は$a,b\\gt 1$, $a\\,b=\\pi^2$です。ただこんな感じで書いてある例は見たことがありませんが、、、。"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Maxima",
   "language": "maxima",
   "name": "maxima"
  },
  "language_info": {
   "codemirror_mode": "maxima",
   "file_extension": ".mac",
   "mimetype": "text/x-maxima",
   "name": "maxima",
   "pygments_lexer": "maxima",
   "version": "5.44.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}