# Vanishing Self-Contracted Metric

+1 vote

Hi!

I think I just nailed down a bug I noticed one time or the other:

{\alpha,\beta,\mu,\nu}::Indices;
{\alpha,\beta,\mu,\nu}::Integer{0..3};

\eta^{\mu\nu}::Metric;
\eta_{\mu\nu}::InverseMetric;
\eta_\mu^\nu::KroneckerDelta;
\eta^\mu_\nu::KroneckerDelta;

Exp:= \eta^\mu_\mu \eta^\alpha_\beta A^\beta;
eliminate_metric(_);

let's the self-contracted metric \eta^\mu_\mu vanish instead of giving A^\alpha as it should. It's not just the wrong order but in this setup, the first \eta should give a factor of 4, which gets lost this way.

Best Regards, Karim

## 1 Answer

+2 votes

Be careful with index positions. If you want upper and lower indices to mean something different, declare your indices with the position=fixed attribute. So

{\alpha,\beta,\mu,\nu}::Indices(position=fixed);
{\alpha,\beta,\mu,\nu}::Integer(0..3);

\eta^{\mu\nu}::Metric;
\eta_{\mu\nu}::InverseMetric;
\eta_\mu^\nu::KroneckerDelta;
\eta^\mu_\nu::KroneckerDelta;

Exp:= \eta^\mu_\mu \eta^\alpha_\beta A^\beta;
eliminate_metric(_);
eliminate_kronecker(_);

This gives the expected answer.

by (64.9k points)

Thanks for the quick answer! So Cadabra does not see the difference between the Kronecker-Delta and the Metric here.

Sorry that I keep asking, but I still don't see, why this means that \eta^\mu_\mu should just vanish here. If I write

Exp:= \eta^{\mu\mu};
\eliminate_metric(_);

it does not vanish. And I don't see, why \eta^\mu_\mu should, even if it is interpreted as a metric instead of a Kronecker-Delta.