[GiNaC-list] Matching both variances of varidx
    Matthew Lim 
    matthew.lim at unimib.it
       
    Thu Mar 28 12:11:22 CET 2019
    
    
  
Hi,
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
lorentz_eps(mu,nu,rho,sigma)*lorentz_eps(alpha,beta,gamma,delta)
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)
test.subs(lorentz_eps(varidx(wildcard(1),4),varidx(wildcard(2),4),varidx(wildcard(3),4),varidx(wildcard(4),4))== 
#expression#)
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,
Matthew
    
    
More information about the GiNaC-list
mailing list