Skip to main content
revise symbol, text
Source Link
creidhne
  • 5.8k
  • 6
  • 25
  • 32

I come from before the times of symbolic tensors in Mathematica, and am used to working with concrete tensors and custom commands to contract them using Transpose, Dot, etc.

I recently realized that Mathematica now allows you to work (nicely?) with symbolic tensors, but I am struggling a bit to understand the use case of purely symbolic tensors. Does anybody have a nice example of such a thing?

To elaborate, for me an obvious use case would be to consider

$Assumptions = {m ∈ Matrices[{4, 4}, Reals, Antisymmetric[{1, 2}]], v ∈ Vectors[4, Reals]}

mvv=TensorProduct[m,v,v];

TensorContract[mvv,{{1,3},{2,4}}]

and get zero. Unfortunately things do not seem to be defined for this [they are, see answer below!]. Not even (the completely obvious):

TensorContract[m,{1,2}]

gives zero.

I am not looking for an explanation of how to implement this in Mathematica, I am just wondering whether someone can point out a nice example where working with tensors symbolically offers a particular advantage.

(Also, any comments on why TensorContract does not come with a version that takes two tensors and contracts them in a given way? amAm I missing some obvious built-in function?)

I come from before the times of symbolic tensors in Mathematica, and am used to working with concrete tensors and custom commands to contract them using Transpose, Dot, etc.

I recently realized that Mathematica now allows you to work (nicely?) with symbolic tensors, but I am struggling a bit to understand the use case of purely symbolic tensors. Does anybody have a nice example of such a thing?

To elaborate, for me an obvious use case would be to consider

$Assumptions = {m ∈ Matrices[{4, 4}, Reals, Antisymmetric[{1, 2}]], v ∈ Vectors[4, Reals]}

mvv=TensorProduct[m,v,v];

TensorContract[mvv,{{1,3},{2,4}}]

and get zero. Unfortunately things do not seem to be defined for this [they are, see answer below!]. Not even (the completely obvious)

TensorContract[m,{1,2}]

gives zero.

I am not looking for an explanation of how to implement this in Mathematica, I am just wondering whether someone can point out a nice example where working with tensors symbolically offers a particular advantage.

(Also, any comments on why TensorContract does not come with a version that takes two tensors and contracts them in a given way? am I missing some obvious built-in function?)

I come from before the times of symbolic tensors in Mathematica, and am used to working with concrete tensors and custom commands to contract them using Transpose, Dot, etc.

I recently realized that Mathematica now allows you to work (nicely?) with symbolic tensors, but I am struggling a bit to understand the use case of purely symbolic tensors. Does anybody have a nice example of such a thing?

To elaborate, for me an obvious use case would be to consider

$Assumptions = {m ∈ Matrices[{4, 4}, Reals, Antisymmetric[{1, 2}]], v ∈ Vectors[4, Reals]}

mvv=TensorProduct[m,v,v];

TensorContract[mvv,{{1,3},{2,4}}]

and get zero. Unfortunately things do not seem to be defined for this [they are, see answer below!]. Not even (the completely obvious):

TensorContract[m,{1,2}]

gives zero.

I am not looking for an explanation of how to implement this in Mathematica, I am just wondering whether someone can point out a nice example where working with tensors symbolically offers a particular advantage.

(Also, any comments on why TensorContract does not come with a version that takes two tensors and contracts them in a given way? Am I missing some obvious built-in function?)

I come from before the times of symbolic tensors in Mathematica, and am used to working with concrete tensors and custom commands to contract them using Transpose, Dot, etc.

I recently realized that Mathematica now allows you to work (nicely?) with symbolic tensors, but I am struggling a bit to understand the use case of purely symbolic tensors. Does anybody have a nice example of such a thing?

To elaborate, for me an obvious use case would be to consider

$Assumptions = {m \[Element] Matrices[{4, 4}, Reals, Antisymmetric[{1, 2}]], v \[Element] Vectors[4, Reals]}

mvv=TensorProduct[m,v,v];

TensorContract[mvv,{{1,3},{2,4}}]

and get zero. Unfortunately things do not seem to be defined for this [they are, see answer below!]. Not even (the completely obvious)

TensorContract[m,{1,2}]

gives zero.

I am not looking for an explanation of how to implement this in Mathematica, I am just wondering whether someone can point out a nice example where working with tensors symbolically offers a particular advantage.

(Also, any comments on why TensorContract does not come with a version that takes two tensors and contracts them in a given way? am I missing some obvious built-in function?)

I come from before the times of symbolic tensors in Mathematica, and am used to working with concrete tensors and custom commands to contract them using Transpose, Dot, etc.

I recently realized that Mathematica now allows you to work (nicely?) with symbolic tensors, but I am struggling a bit to understand the use case of purely symbolic tensors. Does anybody have a nice example of such a thing?

To elaborate, for me an obvious use case would be to consider

$Assumptions = {m \[Element] Matrices[{4, 4}, Reals, Antisymmetric[{1, 2}]], v \[Element] Vectors[4, Reals]}

mvv=TensorProduct[m,v,v];

TensorContract[mvv,{{1,3},{2,4}}]

and get zero. Unfortunately things do not seem to be defined for this [they are, see answer below!]. Not even (the completely obvious)

TensorContract[m,{1,2}]

gives zero.

I am not looking for an explanation of how to implement this in Mathematica, I am just wondering whether someone can point out a nice example where working with tensors symbolically offers a particular advantage.

(Also, any comments on why TensorContract does not come with a version that takes two tensors and contracts them in a given way? am I missing some obvious built-in function?)

I come from before the times of symbolic tensors in Mathematica, and am used to working with concrete tensors and custom commands to contract them using Transpose, Dot, etc.

I recently realized that Mathematica now allows you to work (nicely?) with symbolic tensors, but I am struggling a bit to understand the use case of purely symbolic tensors. Does anybody have a nice example of such a thing?

To elaborate, for me an obvious use case would be to consider

$Assumptions = {m  Matrices[{4, 4}, Reals, Antisymmetric[{1, 2}]], v  Vectors[4, Reals]}

mvv=TensorProduct[m,v,v];

TensorContract[mvv,{{1,3},{2,4}}]

and get zero. Unfortunately things do not seem to be defined for this [they are, see answer below!]. Not even (the completely obvious)

TensorContract[m,{1,2}]

gives zero.

I am not looking for an explanation of how to implement this in Mathematica, I am just wondering whether someone can point out a nice example where working with tensors symbolically offers a particular advantage.

(Also, any comments on why TensorContract does not come with a version that takes two tensors and contracts them in a given way? am I missing some obvious built-in function?)

added 30 characters in body
Source Link
Stijn
  • 332
  • 1
  • 8

I come from before the times of symbolic tensors in Mathematica, and am used to working with concrete tensors and custom commands to contract them using Transpose, Dot, etc.

I recently realized that Mathematica now allows you to work (nicely?) with symbolic tensors, but I am struggling a bit to understand the use case of purely symbolic tensors. Does anybody have a nice example of such a thing?

To elaborate, for me an obvious use case would be to consider

$Assumptions = {m \[Element] Matrices[{4, 4}, Reals, Antisymmetric[{1, 2}]], v \[Element] Vectors[4, Reals]}

mvv=TensorProduct[m,v,v];

TensorContract[mvv,{{1,3},{2,4}}]

and get zero. Unfortunately things do not seem to be defined for this [they are, see answer below!]. Not even (the completely obvious)

TensorContract[m,{1,2}]

gives zero.

I am not looking for an explanation of how to implement this in Mathematica, I am just wondering whether someone can point out a nice example where working with tensors symbolically offers a particular advantage.

(Also, any comments on why TensorContract does not come with a version that takes two tensors and contracts them in a given way? am I missing some obvious built-in function?)

I come from before the times of symbolic tensors in Mathematica, and am used to working with concrete tensors and custom commands to contract them using Transpose, Dot, etc.

I recently realized that Mathematica now allows you to work (nicely?) with symbolic tensors, but I am struggling a bit to understand the use case of purely symbolic tensors. Does anybody have a nice example of such a thing?

To elaborate, for me an obvious use case would be to consider

$Assumptions = {m \[Element] Matrices[{4, 4}, Reals, Antisymmetric[{1, 2}]], v \[Element] Vectors[4, Reals]}

mvv=TensorProduct[m,v,v];

TensorContract[mvv,{{1,3},{2,4}}]

and get zero. Unfortunately things do not seem to be defined for this. Not even (the completely obvious)

TensorContract[m,{1,2}]

gives zero.

I am not looking for an explanation of how to implement this in Mathematica, I am just wondering whether someone can point out a nice example where working with tensors symbolically offers a particular advantage.

(Also, any comments on why TensorContract does not come with a version that takes two tensors and contracts them in a given way? am I missing some obvious built-in function?)

I come from before the times of symbolic tensors in Mathematica, and am used to working with concrete tensors and custom commands to contract them using Transpose, Dot, etc.

I recently realized that Mathematica now allows you to work (nicely?) with symbolic tensors, but I am struggling a bit to understand the use case of purely symbolic tensors. Does anybody have a nice example of such a thing?

To elaborate, for me an obvious use case would be to consider

$Assumptions = {m \[Element] Matrices[{4, 4}, Reals, Antisymmetric[{1, 2}]], v \[Element] Vectors[4, Reals]}

mvv=TensorProduct[m,v,v];

TensorContract[mvv,{{1,3},{2,4}}]

and get zero. Unfortunately things do not seem to be defined for this [they are, see answer below!]. Not even (the completely obvious)

TensorContract[m,{1,2}]

gives zero.

I am not looking for an explanation of how to implement this in Mathematica, I am just wondering whether someone can point out a nice example where working with tensors symbolically offers a particular advantage.

(Also, any comments on why TensorContract does not come with a version that takes two tensors and contracts them in a given way? am I missing some obvious built-in function?)

Tweeted twitter.com/StackMma/status/1336732345781645312
Source Link
Stijn
  • 332
  • 1
  • 8
Loading