Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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!