[GiNaC-list] Matching both variances of varidx

Matthew Lim matthew.lim at unimib.it
Thu Mar 28 12:11:22 CET 2019


I wanted to implement a rule to replace the product of two epsilon 
tensors with the determinant of a matrix of metric tensors. I found that 
simplify_indexed works fine but only if at least one of the indices is 
summed over - calling it on an expression like


results in no simplification.

Implementing this would be no problem if it weren't for the fact that 
the expression I want to make the replacement in has many instances of 
lorentz_eps called with different combinations of co- and contra-variant 
indices - it seems when I call subs, I need to specify the variance of 
the wildcard in order to make the match so that, for example,

ex test = lorentz_eps(mu.toggle_variance(),nu,rho,sigma)


does not result in any substitution being made.

I am not so keen on implementing separate substitutions for all the 
different combinatoric possibilities of index variances - is there 
perhaps a simpler way?

Thanks for your help,


More information about the GiNaC-list mailing list