{ "cells": [ { "cell_type": "markdown", "id": "b663557d", "metadata": {}, "source": [ "# Hodge Star in Euclidean Three-Space\n", "\n", "A metric and an orientation identify $k$-forms with $(3-k)$-forms.\n", "In oriented Euclidean coordinates,\n", "\n", "$$\\star dx=dy\\wedge dz,\\qquad\n", " \\star(dx\\wedge dy)=dz.$$\n", "\n", "The Hodge star is where the metric enters differential-form calculus.\n" ] }, { "cell_type": "markdown", "id": "3d40de1d", "metadata": {}, "source": [ "## Euclidean metric and basis forms\n", "\n", "We use the identity metric on $(x,y,z)$ and the standard orientation.\n", "The metric is typed as a matrix of symbolic mathematical values so the\n", "same definition pattern also works for nonconstant metrics.\n" ] }, { "cell_type": "code", "execution_count": 1, "id": "414d7009", "metadata": {}, "outputs": [], "source": [ "declare symbol x, y, z : MathValue\n", "\n", "def N : Integer := 3\n", "def params : Vector MathValue := [| x, y, z |]\n", "def g : Matrix MathValue :=\n", " [| [| 1, 0, 0 |], [| 0, 1, 0 |], [| 0, 0, 1 |] |]\n", "\n", "def dx : DiffForm MathValue := [| 1, 0, 0 |]\n", "def dy : DiffForm MathValue := [| 0, 1, 0 |]\n", "def dz : DiffForm MathValue := [| 0, 0, 1 |]\n" ] }, { "cell_type": "markdown", "id": "d349f99b", "metadata": {}, "source": [ "## Definition of the Hodge star\n", "\n", "For a $k$-form $A$, the Levi-Civita tensor supplies the complementary\n", "indices, inverse metrics raise the contracted indices, and\n", "$\\sqrt{|\\det g|}$ supplies the volume density.\n" ] }, { "cell_type": "code", "execution_count": 2, "id": "644e647b", "metadata": {}, "outputs": [], "source": [ "def hodge (A : DiffForm MathValue) : DiffForm MathValue :=\n", " let k := dfOrder A\n", " in withSymbols [i, j]\n", " sqrt (abs (M.det g_#_#)) *\n", " foldl\n", " (.)\n", " ((ε' N k)_(i_1)..._(i_N) . A..._(j_1)..._(j_k))\n", " (map (\\n -> g~(i_n)~(j_n)) [1..k])\n" ] }, { "cell_type": "markdown", "id": "76653814", "metadata": {}, "source": [ "A one-form becomes a two-form supported in the complementary oriented\n", "plane.\n" ] }, { "cell_type": "code", "execution_count": 3, "id": "5118d224", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$\\begin{pmatrix} 0 & 0 & 0 \\\\ 0 & 0 & 1 \\\\ 0 & 0 & 0 \\\\ \\end{pmatrix}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "hodge dx\n" ] }, { "cell_type": "markdown", "id": "566cca28", "metadata": {}, "source": [ "Conversely, the oriented area form in the $xy$-plane becomes the\n", "one-form normal to that plane.\n" ] }, { "cell_type": "code", "execution_count": 4, "id": "adfb44f9", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$\\begin{pmatrix} 0 \\\\ 0 \\\\ 1\\\\ \\end{pmatrix}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "hodge (wedge dx dy)\n" ] }, { "cell_type": "markdown", "id": "23226d48", "metadata": {}, "source": [ "The two outputs are the component versions of\n", "$\\star dx=dy\\wedge dz$ and $\\star(dx\\wedge dy)=dz$. In three-dimensional\n", "Euclidean signature, applying $\\star$ twice returns a one-form or a\n", "two-form with positive sign; changing the metric signature changes that\n", "sign, as the Minkowski-space notebook demonstrates.\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 }