Toggle navigation
Egison
ドキュメント
デモ
オンライン・デモ
ポーカーの役判定
麻雀の上がり判定
双子素数の列挙
ツリー
グラフ
3-SATを解く乱択アルゴリズム
時系列データ解析
オンライン・ツール
オンライン Egison
オンライン・チュートリアル
数式処理
ブログ
コミュニティ
`U(1)`ゲージ理論のヤンミルズ方程式
2017年11月2日
-- -- Yang-Mills equation of U(1) gauge theory (Electromagnetism) -- def N := 4 def g := [|[|-1, 0, 0, 0|], [|0, 1, 0, 0|], [|0, 0, 1, 0|], [|0, 0, 0, 1|]|] def d X := WedgeApplyExpr (ApplyExpr (VarExpr "flip") [VarExpr "\8706/\8706"]) [VectorExpr [VarExpr "t",VarExpr "x",VarExpr "y",VarExpr "z"],VarExpr "X"] def hodge A := let k := dfOrder A in withSymbols [i, j] sqrt (abs (M.det g_#_#)) * foldl (.) ((ε' N k)_(i_1)..._(i_N) . A..._(j_1)..._(j_k)) (map (\n -> g~(i_n)~(j_n)) (between 1 k)) def δ A := let r := dfOrder A in (-1) ^ (N * r + 1) * hodge (d (hodge A)) def Δ A := match dfOrder A as integer with | #0 -> δ (d A) | #4 -> d (δ A) | _ -> d (δ A) + δ (d A) def normalize2 A := withSymbols [t1, t2] A_t1_t2 - A_t2_t1 assertEqual "Hodge star of dt ∧ dx" (hodge (wedge [|1, 0, 0, 0|] [|0, 1, 0, 0|])) [| [| 0, 0, 0, 0 |], [| 0, 0, 0, 0 |], [| 0, 0, 0, 1 |], [| 0, 0, -1, 0 |] |] assertEqual "Hodge star of dy ∧ dz" (hodge (wedge [|0, 0, 1, 0|] [|0, 0, 0, 1|])) [| [| 0, 1, 0, 0 |], [| -1, 0, 0, 0 |], [| 0, 0, 0, 0 |], [| 0, 0, 0, 0 |] |] -- Exterior derivative of potential 1-form assertEqual "d(A)" (dfNormalize (d [|φ t x y z, Ax t x y z, Ay t x y z, Az t x y z|])) [| [| 0, Ax|1 t x y z - φ|2 t x y z, Ay|1 t x y z - φ|3 t x y z, Az|1 t x y z - φ|4 t x y z |] , [| 0, 0, Ay|2 t x y z - Ax|3 t x y z, Az|2 t x y z - Ax|4 t x y z |] , [| 0, 0, 0, Az|3 t x y z - Ay|4 t x y z |] , [| 0, 0, 0, 0 |] |] -- Electromagnetic field tensor def F := [|[|0, Ex t x y z, Ey t x y z, Ez t x y z|] , [|- Ex t x y z, 0, Bz t x y z, - By t x y z|] , [|- Ey t x y z, - Bz t x y z, 0, Bx t x y z|] , [|- Ez t x y z, By t x y z, - Bx t x y z, 0|]|] -- Bianchi identity: dF = 0 (Hodge dual of dF gives magnetic current = 0) -- Source equation: δF = J (codifferential of F gives electric current)
リンク
Egison 数学ノート目次に戻る
404 Not Found
404 Not Found
nginx/1.14.0 (Ubuntu)