8

I'm specifically interested in the TensorProduct,TensorWedge, HodgeDual and certain build in functions to do tensor arithmetic like TensorReduce, TensorExpand.

I would like to do exterior algebra calculations where I can choose to work with basis vectors as symbolic objects (and where I can choose to work without basis vectors).

To be explicit, I would like mathematica to do this input:

v = {v1, v2}; w = {w1, w2};
v\[TensorWedge]w 

desired output:

(v1 w2 - v2 v1) e1 \[TensorWedge] e2

actual output (in normal form):

{{0, -v2 w1 + v1 w2}, {v2 w1 - v1 w2, 0}}

If this is not possible what source gives the best advice on how to use mathematica to deal with exterior algebra related differential geometry topics ? A simple example code, video, guide or tutorial on the wolfram site would be optimal.

Chris Django
  • 147
  • 8
  • Iā€˜d also be interested in this! Good question – DrMrstheMonarch Jun 15 '21 at 13:07
  • 1
    For operations with basis elements your can try to look at my geometric algebra package https://github.com/ArturasAcus/GeometricAlgebra . The wedge operation here is implemented as OuterProduct. No operations without basis vectors, no differentiation. – Acus Jun 15 '21 at 13:40

2 Answers2

5

Reading the posts under the tag isn't a bad choice to learn tensor operation in Mathematica. Your specific problem can be solved as follows:

Clear[e]
$Assumptions = {v1, v2, w1, w2} ∈ Reals;
e[i_]\[TensorWedge]e[i_] ^= 0;
e[i_]\[TensorWedge]e[j_] /; ! OrderedQ@{i, j} ^:= 
 Signature@{i, j} e[#]\[TensorWedge]e[#2] & @@ Sort@{i, j}

v = v1 e@1 + v2 e@2; w = w1 e@1 + w2 e@2; Simplify@TensorExpand[v[TensorWedge]w] (* (-v2 w1 + v1 w2) e[1][TensorWedge]e[2] *)

The keypoint is to define the orthogonal basis e[i].

Related:

Expand wedge product

Derivative of real antisymmetric matrix in mathematica

how to define unit vectors in mathematica

There should be more.

xzczd
  • 65,995
  • 9
  • 163
  • 468
1

See also John Browne's Grassmann Algebra website.

TheDoctor
  • 2,832
  • 1
  • 14
  • 17