Module: sage.interfaces.magma
Interface to Magma
Note:
You must have magma
installed on your computer
for this interface to work. Magma is not free, so it is
not included with Sage, but you can obtain it from
http://magma.maths.usyd.edu.au/. You do not
have to install any optional Sage packages.
Type magma.[tab]
for a list of all the functions available
from your Magma install. Type magma.[tab]?
for Magma's
help about a given function. Type magma(...)
to create
a new Magma object, and magma.eval(...)
to run a string
using Magma (and get the result back as a string).
SAGE provides an interface to the Magma computational algebra system. This system provides extensive functionality for number theory, group theory, combinatorics and algebra.
The Magma interface offers three pieces of functionality:
magma_console()
- A function that dumps you
into an interactive command-line Magma session.
magma(expr)
- Evaluation of arbitrary Magma
expressions, with the result returned as a string.
magma.new(expr)
- Creation of a SAGE object that wraps a
Magma object. This provides a Pythonic interface to Magma. For example,
if f=magma.new(10)
, then f.Factors()
returns the prime
factorization of