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

Hi,

i have problems reducing some expressions using symmetries of indices and commutativity of multiplication. expression2 in my example below works, but I just can't get expression to work. I have a lot of these expressions in my calculation and would like to reduce them automatically. Is this a bug/missing functionality or am I just using cadabra wrong?

Note that I don't want indices to be raised lowered so I didn't declare \eta as (inverse) metric. Contractions of metric and inverse metric are implemented as substitutions instead. Using eliminate_metric() would solve the problem below, but even then other expressions of this kind are still not simplified.

Cheers,
Nils

> {a, b, c, d, e, f, i, j, k, l, m, n, o, p, q, r, s, u, v, w}::Indices(position=fixed, full);
Attached property Indices(position=fixed) to {a, b, c, d, e, f, i, j, k, l, m, n, o, p, q, r, s, u, v, w}.
> {a, b, c, d, e, f, i, j, k, l, m, n, o, p, q, r, s, u, v, w}::Integer(0..3);
Attached property Integer to {a, b, c, d, e, f, i, j, k, l, m, n, o, p, q, r, s, u, v, w}.
> \partial{#}::PartialDerivative;
Attached property PartialDerivative to \partial(#).
> \eta_{a b}::Symmetric;
Attached property Symmetric to η_{a b}.
> \eta^{a b}::Symmetric;
Attached property Symmetric to η^{a b}.
> z_{a b}::Symmetric;
Attached property Symmetric to z_{a b}.
> z_{a b}::Depends(\partial{#});
Attached property Depends to z_{a b}.
> {\mu, \lambda,\eta^{a b}, \eta_{a b}, h_{a b}, z_{a b}}::SortOrder;
Attached property SortOrder to {μ, λ, η^{a b}, η_{a b}, h_{a b}, z_{a b}}.
> expression:=-1/8*\eta^{c d} \eta^{e f} \eta^{i j} \eta_{a b} \partial_{c d}{z_{i j}} z_{e f} + 5/8 * \eta^{c d} \eta^{e f} \eta^{i j} \eta_{a b} \partial_{e f}{z_{i j}} z_{c d};
 -  1/8 η^{c d}*η^{e f}*η^{i j}*η_{a b}*\partial_{c d}(z_{i j})*z_{e f}+ 5/8 η^{c d}*η^{e f}*η^{i j}*η_{a b}*\partial_{e f}(z_{i j})*z_{c d}
> canonicalise(expression);
 -  1/8 η^{c d}*η^{e f}*η^{i j}*η_{a b}*\partial_{c d}(z_{i j})*z_{e f}+ 5/8 η^{c d}*η^{e f}*η^{i j}*η_{a b}*\partial_{e f}(z_{i j})*z_{c d}
> sort_product(_);
 -  1/8 η^{c d}*η^{e f}*η^{i j}*η_{a b}*\partial_{c d}(z_{i j})*z_{e f}+ 5/8 η^{c d}*η^{e f}*η^{i j}*η_{a b}*\partial_{e f}(z_{i j})*z_{c d}
> rename_dummies(_);
 -  1/8 η^{c d}*η^{e f}*η^{i j}*η_{a b}*\partial_{c d}(z_{i j})*z_{e f}+ 5/8 η^{c d}*η^{e f}*η^{i j}*η_{a b}*\partial_{e f}(z_{i j})*z_{c d}
> canonicalise(_);
 -  1/8 η^{c d}*η^{e f}*η^{i j}*η_{a b}*\partial_{c d}(z_{i j})*z_{e f}+ 5/8 η^{c d}*η^{e f}*η^{i j}*η_{a b}*\partial_{e f}(z_{i j})*z_{c d}
> unwrap(_);
 -  1/8 η^{c d}*η^{e f}*η^{i j}*η_{a b}*\partial_{c d}(z_{i j})*z_{e f}+ 5/8 η^{c d}*η^{e f}*η^{i j}*η_{a b}*\partial_{e f}(z_{i j})*z_{c d}
> expression2:=\eta^{c d} \eta^{e f} \partial_{a c}{z_{b e}} z_{d f} - \eta^{c d} \eta^{e f} \partial_{a e}{z_{b c}} z_{d f};
η^{c d}*η^{e f}*\partial_{a c}(z_{b e})*z_{d f}-η^{c d}*η^{e f}*\partial_{a e}(z_{b c})*z_{d f}
> canonicalise(expression2);
0
asked in Bug reports by

1 Answer

0 votes

Interesting one. If you replace the $\partial_{c d} z_{i j}$ by $T_{c d i j}$ (and ditto for the 2nd term) the canonicalise call makes expression simplify too. I need to dig a bit to figure out what goes wrong here, will get back to you.

answered by (54.1k points)
...