# Interface of maxima atensor with sage I am trying to use the atensor module of maxima in sage. I have trouble understanding the meaning of the symbols. According to the manual the basis of the algebra is given by v, v etc, and atensimp(v.v) should give -1. But, when I try to reproduce the result, I get the following.

maxima('init_atensor(dirac)')
maxima('atensimp(v.v)')

atensimp(v^^2)


I am trying to reproduce the algebra of gamma matrices

{gamma^mu,gamma^nu}=2 eta^{mu nu}


where {,} stands for anticommutator. and eta^{mu nu} is the metric. as described here http://en.wikipedia.org/wiki/Gamma_matrices

edit retag close merge delete

Sort by » oldest newest most voted

You need to load the module, whether you are in Sage or Maxima proper.

sage: maxima('load(atensor)')
"/Users/.../sage-4.7.2/local/share/maxima/5.23.2/share/tensor/atensor.mac"
sage: maxima('init_atensor(dirac)')
done
sage: maxima('atensimp(v.v)')
1
sage: maxima('init_atensor(clifford,0,0,2)')
done
sage: maxima('atensimp(v.v)')
-1


You might find it useful to do the following instead, if you want to share your results with Sage and use them further.

sage: maxima('load(atensor)')
"/Users/.../sage-4.7.2/local/share/maxima/5.23.2/share/tensor/atensor.mac"
sage: maxima('init_atensor(clifford,0,0,2)')
done
sage: m = maxima('atensimp(v.v)')
sage: type(m)
<class 'sage.interfaces.maxima.MaximaElement'>
sage: n = m._sage_()
sage: type(n)
<type 'sage.symbolic.expression.Expression'>
sage: n
-1


On the other hand, if you are only using Maxima commands, you may just want to:

• use sage: maxima_console()
• or do sage -maxima to get a console
more