# Magma object from magma.eval()?

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

Magma object from magma.eval()?

add a comment

1

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.

Asked: **
2011-06-23 08:13:33 -0600
**

Seen: **256 times**

Last updated: **Jun 23 '11**

why sage help not give out a function'name Directory by subjects? [closed]

Analogue of PointsOverSplittingField in SAGE

Magma coercion equivalent in Sage?

How to create a subgroup with MAGMA inside SAGE of a group created with MAGMA inside SAGE?

Reseting magma tab completion data

Polynomial ring indexed over an abelian group (magma).

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.