# Vanishing Self-Contracted Metric

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 vote

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(_);


Exp:= \eta^{\mu\mu};