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

I'm basically following the eliminate_metric example from the website:

{m, n, p, q, r}::Indices(vector, position=fixed).
{m, n, p, q, r}::Integer(0..9).
g_{m n}::Metric.
g^{m n}::InverseMetric.
g_{m}^{n}::KroneckerDelta.
g^{m}_{n}::KroneckerDelta.
ex:=g_{m p} g^{p m};
eliminate_metric(_);
eliminate_kronecker(_);

but I'm working with doubled coordinates, meaning that my coordinates go from 0 to 2D-1. Therefore, if I change the corresponding part to

{m, n, p, q, r}::Integer(0..2*D-1).

the output is, against all odds and common sense, D. You may be thinking that it won't work with such terms, but I've stumbled upon a bizzare bug; here are some examples of different inputs and outputs:

{m, n, p, q, r}::Integer(0..D).

D+1
{m, n, p, q, r}::Integer(0..2 D + 1).

2D+2
{m, n, p, q, r}::Integer(0..3D-1).

D
{m, n, p, q, r}::Integer(0..2*(D-1)).

2D-1

It seems that when the dimensionality of Kronecker is a multiple of D, it stops working properly. Any ideas on why this is happening? What can be done to fix it?

in Bug reports by (160 points)

Wow... Well spotted!

1 Answer

+1 vote

Ouch. The code responsible for this bug was about 10 years old, did not have the appropriate tests, and indeed produced nonsense when the range of the integer was symbolic. Thanks for reporting this.

I have pushed a fix to the devel branch on github; this will go into 2.5.10 to be released soon.

by (83.9k points)
...