Welcome to Cadabra Q&A, where you can ask questions and receive answers from other members of the community.
0 votes

Consider the following

{m,a#}::Indices.
R_{a1 a2 a3 a4}::RiemannTensor.

Is there a command that returns the property or lists of properties of an object?, e.g. assuming the function is called what_is

what_is(m);

$$\mathrm{Index}$$

what_is(R_{a1 a2 a3 a4});

$$\text{RiemannTensor}$$

asked in General questions by (6.5k points)

1 Answer

+1 vote

You can query a property to see whether a pattern has been registered with it; in your example

p = RiemannTensor.get($R_{a1 a2 a3 a4}$)

will set p to the corresponding RiemannTensor object (which, since it derives from TableauSymmetry, has methods such as get_tab, is_simple_symmetry etc...). If there is no associated property then None is returned.

answered by (160 points)
...