Levi-Civita Density

• To: mathgroup at smc.vnet.net
• Subject: [mg20780] Levi-Civita Density
• From: Dr Dan <drdanw at my-deja.com>
• Date: Thu, 11 Nov 1999 00:22:51 -0500
• Sender: owner-wri-mathgroup at wolfram.com

```Mathematica does not supply a Levi-Cevita density function (aka,
alternating tensor, isotropic tensor rank 3, or that epsilon with 3
subscripts), although the Mathematica book does mention its similarity
to the Signature function.

For your enjoyment, here is a Levi-Cevita density function, complete
with StandardForm input and output.  Input form is allowed with either
visible or invisible commas so type

[esc]e[esc][cntl]_i[esc],[esc]j[esc],[esc]k[cntl][space]

or

[esc]e[esc][cntl]_i,j,k[cntl][space]

depending on if you want pretty or fast.

(------------ code follows ----------------)

repeated index and 1 or -1 for even or odd permutations of {1,2,3}."

Signature[{i, j, k}] /; Positive[i] && i <= 3 &&
Positive[j] && j <= 3 && Positive[k] && k <= 3;

k_], StandardForm] := SubscriptBox["\[Epsilon]",
RowBox[{MakeBoxes[i, StandardForm], "\[InvisibleComma]",
MakeBoxes[j, StandardForm], "\[InvisibleComma]",
MakeBoxes[k, StandardForm]}]];

MakeExpression[SubscriptBox["\[Epsilon]",
RowBox[{i_, "\[InvisibleComma]", j_, "\[InvisibleComma]", k_}]],
StandardForm] :=
",", j, ",", k, "]"}], StandardForm];

MakeExpression[SubscriptBox["\[Epsilon]",
RowBox[{i_, ",", j_, ",", k_}]], StandardForm] :=