[GiNaC-devel] Bug(?) in reposition_dummy_indices: test case and patch

Chris Dams Chris.Dams at mi.infn.it
Wed Aug 30 14:55:58 CEST 2006


Dear Alexei,

On Wed, 30 Aug 2006, Sheplyakov Alexei wrote:

> On Wed, Aug 30, 2006 at 12:08:26PM +0200, Chris Dams wrote:
> 
> > What if we simply don't do this kind of toggling of the variance in the
> > case that both indices of the dummy pair belong to the same indexed object
> > and the indexed object has a symmetry in which the dummy pair is involved?
>
> Then
> 
> T.mu.nu~mu~nu - T~nu~mu.nu.mu
> 
> where T has cyclic symmetry, would not evaluate to zero. Which is (IMHO)
> very bad thing...

Yes. That is true. However, your patch does not simplify

	T~mu.mu~nu.nu - T~mu~nu.nu.mu

to zero if T has cyclic symmetry. Neither does the code that is in CVS at
the moment. So, currently we cannot guarantee much about the
simplification of this kind of expression.

What about modifying the canonicalization code in symmetry.cpp, then? We
could at first decide the canonical form based only on the values and
dimensions of the indices. Not on their variance. If that does not give a
prefered ordering we would order them the same way as is done now.  
Besides that, we should reject a toggling of indices in reposition_dummy
indices if it results in an expression with reordered indices. Does this
sound any better?

Best wishes,
Chris



More information about the GiNaC-devel mailing list