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

Hi, until recently, it was possible to make two subrules into one simply by adding them together, for example:

metric:= {h_{t t} = 1, h_{x x} = -(a)**2, 
h_{y y} = -(a)**2, h_{z z} = -(a)**2, 
h^{t t} = 1, h^{x x} = -(a)**{-2}, 
h^{y y} = -(a)**{-2}, h^{z z} = -(a)**{-2}};
Gamma:= \Gamma^{m}_{n r} = 1/2 h^{m s} (\partial_{r}{h_{n s}}
+\partial_{n}{h_{r s}}-\partial_{s}{h_{n r}});
evaluate(Gamma, metric, rhsonly=True);
Gamma = com.components_to_subrule(Gamma);
metric = metric + Gamma;

But now as a result of these actions it turns out image

This object is no longer a subrule. I am using the latest version of Cadabra 2 for ubuntu 20.04

in General questions by (1.7k points)
edited by

1 Answer

+2 votes

This was changed in 2.4.0 to match more closely what other computer algebra systems do. You now need to call join, so e.g.

lst1:= [a,b,c];
lst2:= [e,f,g];
lst3 = join(lst1, lst2);

When you write lists inside a Cadabra expression, you can use the tie operator "~" (tilde),

lst := [a,b,c] ~ [e,f,g];

Hope this helps.

by (82.4k points)

Yes, this helped, Thank you!

...