Comparing CTensors

29 views
Skip to first unread message

Salva Mengual Sendra

unread,
Jun 13, 2022, 7:21:07 AM6/13/22
to xAct Tensor Computer Algebra
Hi, everybody.

Imagine that we have defined a metric with CTensor in a previously defined chart. Consider now that we want to know if its associated Weyl tensor equals its Riemann tensor (indices down).

To do so, I'm trying something like:

If[Weyl[CD]==RiemannDown[CD],Print["yes"],Print["no"]]

but it doesn't work.

How can CTensors be compared?

Thanks in advance!

Cheers,
Salva

Jose

unread,
Jun 13, 2022, 10:39:22 AM6/13/22
to xAct Tensor Computer Algebra
Hi,

This type of operation requires comparisons of individual respective components. Comparison of expressions with == (i.e. with Equal) will usually need guidance from you, unless the expressions are truly identical (in the sense of being given in the same form). For example this resolves to True in Wolfram Language only when the LHS is expanded to coincide identically with the RHS:

In[1]:= (x + 1)^2 == x^2 + 2 x + 1
Out[1]= (1 + x)^2 == 1 + 2 x + x^2

In[2]:= Expand[%]
Out[2]= True

Something that might help is using an appropriate value in $CVSimplify or the option CVSimplify of MetricCompute, trying to produce canonical expressions, for example with Expand as in the example I just gave.

If this is not enough, propose a particular example and we can discuss it.

Cheers,
Jose.
Reply all
Reply to author
Forward
0 new messages