Ask Your Question
1

Magma object from magma.eval()?

asked 2011-06-23 15:13:33 +0100

Cody gravatar image

How can I get a Magma object to use inside of Sage from something created in Magma through magma.eval()? Is this possible?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2011-06-23 17:40:14 +0100

Mike Hansen gravatar image

Suppose you created a polynomial in Magma with the following command:

 sage: magma.eval('R<x> := PolynomialRing(RationalField()); f := (x-17/2)^3;')

Then, you can get a Sage version of that object like this:

 sage: magma('f').sage()

The magma('f') part creates an object (MagmaElement) in Sage which is basically a pointer to the variable f in the Magma session. (You can actually use this perform calls on this objects which will translate to Magma commands. For example, magma('f').Factorization() is basically same as doing magma.eval('result := Factorization(f);') and returning magma('result').) The sage() method will convert a MagmaElement to the corresponding Sage object if possible.

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-06-23 15:13:33 +0100

Seen: 464 times

Last updated: Jun 23 '11