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}$$

in General questions by (14.9k points)

1 Answer

+1 vote
 
Best answer

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.

by (460 points)
selected by
...