Re: Einstein Summation with Utilities`Notation`

*To*: mathgroup at smc.vnet.net*Subject*: [mg61030] Re: [mg61003] Einstein Summation with Utilities`Notation`*From*: "David Park" <djmp at earthlink.net>*Date*: Sat, 8 Oct 2005 02:48:36 -0400 (EDT)*Sender*: owner-wri-mathgroup at wolfram.com

Steven, You could try the Tensorial package at my web site below. It has EinsteinSummation, EinsteinArray and EinsteinArgument and variations for summing and expanding tensor expressions. Also complete documentation. David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: Steven T. Hatton [mailto:hattons at globalsymmetry.com] To: mathgroup at smc.vnet.net Has anybody worked out an implementation of Einstein summation notation using Mathematica's Utilities`Notation` package? I started toying with the idea and realized it could become rather tedious to write all the possible combinations of raised and lowered indices for tensors of higher order. It is also mathematical blasphemy to write this out explicitly for each instance. It appears to me that the ideal way of producing notations is to use vi or better (a.k.a. (X)Emacs). That is, the form produced using the Mathematica front end is virtually unintelligible for modestly complex notations. I'm confident that creating notations with a traditional text editor can be done using NotationBoxTag, though I haven't worked out the general approach. This is the general idea of what I've been attempting as it appears in Notebookese: \!\(\* RowBox[{ RowBox[{"Symbolize", "[", TagBox[\(e\&^\), NotationBoxTag, TagStyle->"NotationTemplateStyle"], "]"}], "\[IndentingNewLine]", RowBox[{"Notation", "[", RowBox[{ TagBox[\(\(e_\&^\)\_i_\), NotationBoxTag, TagStyle->"NotationTemplateStyle"], " ", "\[DoubleLongLeftRightArrow]", " ", TagBox[\(\(e_\&^\)\[LeftDoubleBracket]i_\[RightDoubleBracket]\), NotationBoxTag, TagStyle->"NotationTemplateStyle"]}], "]"}], "\[IndentingNewLine]", RowBox[{"Notation", "[", RowBox[{ TagBox[\(\(e_\&^\)\_\(i_, j_\)\), NotationBoxTag, TagStyle->"NotationTemplateStyle"], " ", "\[DoubleLongLeftRightArrow]", " ", TagBox[\(\(e_\&^\)\[LeftDoubleBracket]i_, j_\[RightDoubleBracket]\), NotationBoxTag, TagStyle->"NotationTemplateStyle"]}], "]"}], "\[IndentingNewLine]", \(Bases[x_: e1, y_: e2, z_: e3] := {x, y, z}\)}]\) -- "Philosophy is written in this grand book, The Universe. ... But the book cannot be understood unless one first learns to comprehend the language... in which it is written. It is written in the language of mathematics, ...; without which wanders about in a dark labyrinth." The Lion of Gaul