On Friday, January 10, 2014 10:56:03 PM UTC+1, Comer wrote:
>
> Today I have been looking at the sympy tensor package.  I have attached a 
> script in which I am trying to end of defining the Einstein tensor: R_{a b} 
> - 1/2 *g_{a b} * R.  But the script does not succeed on the last step of 
> evaluating the above expression and hence fails to agree to create the 
> Einstein tensor. I am wondering what I am doing incorrectly?  
>
> Thanks for advice.
>
> Comer
>

This is a bug, d0 and -d0 have not been recognized as dummy indices and are 
not contracted. I think I'll have a look tomorrow.

In the meantime, you can use this workaround, replace it into your last 
line:

gR = tensor_mul(Rational(1,2)*g(-a,-b) * R)
gR = TensMul(*gR.args)
Ric(a,-b) - gR

This basically forces reconstruction of the tensor, and the dummy index 
gets recognized this time.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to