Ask Your Question
1

Interface of maxima atensor with sage

asked 2011-12-19 05:41:25 -0600

Shashank gravatar image

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[1], v[2] etc, and atensimp(v[1].v[1]) should give -1. But, when I try to reproduce the result, I get the following.

maxima('init_atensor(dirac)')
maxima('atensimp(v[1].v[1])')

atensimp(v[1]^^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 flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
3

answered 2011-12-19 06:44:33 -0600

kcrisman gravatar image

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[1].v[1])')
1
sage: maxima('init_atensor(clifford,0,0,2)')
done
sage: maxima('atensimp(v[1].v[1])')
-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[1].v[1])')
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
  • or download Maxima!
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-12-19 05:41:25 -0600

Seen: 166 times

Last updated: Dec 19 '11