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

I tried to calculate the d'Alembert operator in the case of the Friedman metric, and I had a kernel crash:

{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,q,r,s,u,v,w,x,y,z#}::Indices(full,values={t,x,y}, position=independent).
{t, x, y}::Coordinate.
h_{m? n?}::Metric.
h^{m? n?}::InverseMetric.
h_{m? n?}::Symmetric.
h^{m? n?}::Symmetric.
h::Determinant(h_{m n}).
\Gamma^{m}_{n q}::TableauSymmetry(shape={2}, indices={1,2}).
h_{m n}::Depends(t,x,y).
h^{m n}::Depends(t,x,y).

friedmann:= { h_{t t} = 1,   
       h_{x x} = -a, 
       h_{y y} = -a,
complete(friedmann, $h^{m n}$);
complete(friedmann, $h$);

Chr:= \Gamma^{l}_{m n} =
  (1/2) * h^{l k} ( 
        \partial_{n}{ h_{k m} } + \partial_{m}{ h_{k n} } - \partial_{k}{ h_{m n} } );
evaluate(Chr, friedmann, rhsonly=True)
substitute(Chr, $\partial_{t}{a} a**(-1) -> H$);
box := h^{a b}(\partial_{a b}{p} - \Gamma^{y}_{a b}\partial_{y}{p});
evaluate(box, friedmann);

I'm using Cadabra for mint Ulyana 20 in virtualbox and the same version for ubuntu 18.04 in WSL. There is an error from terminal:

Perm::apply: orig.size()=3, perm.size()=2
cadabra-server: /home/arshtm/cadabra2/core/./Permutations.hh:88: void Perm::apply(iterator, iterator) [with iterator = tree<cadabra::str_node>::sibling_iterator]: Assertion `orig.size()==perm.size()' failed.
in Bug reports by (840 points)
edited by

There is another problem here, if I replace the box variable in the code above with

    box := h^{b c} (\partial_{b c}(p) -  \Gamma^{a}_{b c} \partial_{a}(p)) +
 (\phi)**(-1) h^{a b} \partial_{a}(\phi) \partial_{b}(p);

I'll get a wrong result: enter image description here

@kasper could you look at this, please?

1 Answer

+2 votes

You have defined both x and y as Indices, but also as Coordinate. This makes the definition of that box ambiguous,

box := h^{a b} (\partial_{a b}{p} - \Gamma^{y}_{a b}\partial_{y}{p});

as it contains a y which could either be an index or a fixed index value. The checks in Cadabra to catch this kind of problem are not strong enough to prevent the crash.

If you drop x and y from your index set and write e.g. c in the definition of box all seems well.

Also note that you really need a space (or star) between h^{a b} and the bracket that follows, otherwise it gets interpreted as h^{a b} with an argument, not as two factors.

by (71.6k points)

Thank you, you literally save me every time.

FYI: I have pushed a fix to github which will throw an exception when you inadvertendly re-declare an index as coordinate or the other way around.

Perhaps a silly question, but how to update cadabra correctly if you build it from source?

The cleanest way is to first do

sudo make uninstall

in the source directory, to uninstall the old version. Then

git pull
sudo make install

to build and install the current version.