{ "cells": [ { "cell_type": "markdown", "id": "82fca0f8", "metadata": {}, "source": [ "# 極座標のホッジラプラシアン\n", "\n", "このNotebookでは、計量と微分形式の演算子からスカラーに対するホッジラプラシアンを\n", "導出します。$r>0$ の極座標 $(r,\\theta)$ では、\n", "\n", "$$g=dr^2+r^2d\\theta^2.$$\n", "\n", "となります。以下で採用する余微分の規約では、結果は通常の座標表示による\n", "正符号のラプラス作用素に負号を付けたものになります。\n" ] }, { "cell_type": "markdown", "id": "3a37b734", "metadata": {}, "source": [ "## 極座標の計量\n", "\n", "共変計量と反変計量の両方にテンソルの添字を明示します。これによりEgisonは、\n", "ホッジスターの公式に現れる縮約を自動的に処理できます。\n" ] }, { "cell_type": "code", "execution_count": 1, "id": "1a4aa201", "metadata": {}, "outputs": [], "source": [ "declare symbol r, θ : MathValue\n", "\n", "def N : Integer := 2\n", "def x : Vector MathValue := [| r, θ |]\n", "\n", "def g_i_j : Matrix MathValue :=\n", " [| [| 1, 0 |], [| 0, r ^ 2 |] |]_i_j\n", "def g~i~j : Matrix MathValue :=\n", " [| [| 1, 0 |], [| 0, r ^ (-2) |] |]~i~j\n" ] }, { "cell_type": "code", "execution_count": 2, "id": "8cab770d", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$\\begin{pmatrix} 1 & 0 \\\\ 0 & r^{2} \\\\ \\end{pmatrix}_{\\#\\#}^{\\;\\;}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "g_#_#\n" ] }, { "cell_type": "markdown", "id": "9508b31a", "metadata": {}, "source": [ "## 外微分とホッジスター\n", "\n", "ホッジスターは、レヴィ・チヴィタテンソル、逆計量、体積密度\n", "$\\sqrt{|g|}=r$ を組み合わせて定義されます。\n" ] }, { "cell_type": "code", "execution_count": 3, "id": "6aa28359", "metadata": {}, "outputs": [], "source": [ "def d (A : Tensor MathValue) : Tensor MathValue :=\n", " !(flip ∂/∂) x A\n", "\n", "def hodge (A : Tensor MathValue) : Tensor MathValue :=\n", " let k := dfOrder A\n", " in withSymbols [i, j]\n", " sqrt (M.det g_#_#) *\n", " foldl\n", " (.)\n", " ((subrefs A (map 1#j_$1 (between 1 k))) .\n", " (subrefs (ε' N k) (map 1#i_$1 (between 1 N))))\n", " (map 1#g~(i_$1)~(j_$1) [1..k])\n" ] }, { "cell_type": "markdown", "id": "5893c721", "metadata": {}, "source": [ "## 余微分とラプラシアン\n", "\n", "余微分は $d$ の計量に関する随伴であり、二つのホッジスターを用いて表せます。\n", "形式の次数を調べることで、0形式と最高次形式に適した端点の公式を選択します。\n" ] }, { "cell_type": "code", "execution_count": 4, "id": "faddc387", "metadata": {}, "outputs": [], "source": [ "def δ (A : Tensor MathValue) : Tensor MathValue :=\n", " let k := dfOrder A\n", " in (-1) ^ (N * (k + 1) + 1) * (hodge (d (hodge A)))\n", "\n", "def Δ (A : Tensor MathValue) : Tensor MathValue :=\n", " match (dfOrder A) as integer with\n", " | #0 -> δ (d A)\n", " | #N -> d (δ A)\n", " | _ -> d (δ A) + δ (d A)\n", "\n", "def f : MathValue := function (r, θ)\n" ] }, { "cell_type": "markdown", "id": "8840f8f2", "metadata": {}, "source": [ "任意のスカラー関数に作用素を適用し、導関数を記号のまま残すことで、\n", "座標表示の公式を直接確認できます。\n" ] }, { "cell_type": "code", "execution_count": 5, "id": "04b501b1", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$-\\frac{\\partial^2 f}{\\partial 1^2} - \\frac{\\partial f}{\\partial 1} r^{-1} - \\frac{\\partial^2 f}{\\partial 2^2} r^{-2}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "Δ f\n" ] }, { "cell_type": "markdown", "id": "bf201951", "metadata": {}, "source": [ "表示される式は\n", "\n", "$$\n", "\\Delta f=-\\left(\n", " \\frac{\\partial^2f}{\\partial r^2}\n", " +\\frac1r\\frac{\\partial f}{\\partial r}\n", " +\\frac1{r^2}\\frac{\\partial^2f}{\\partial\\theta^2}\n", "\\right).\n", "$$\n", "\n", "です。$1/r$ と $1/r^2$ の項を手作業で加えているわけではありません。\n", "これらはホッジスターに含まれる計量の行列式と逆計量から現れます。\n" ] } ], "metadata": { "kernelspec": { "display_name": "Egison", "language": "egison", "name": "egison" }, "language_info": { "codemirror_mode": "egison", "file_extension": ".egi", "mimetype": "text/x-egison", "name": "egison" } }, "nbformat": 4, "nbformat_minor": 5 }