#18266: Conversion from Sage polynomial to gap/libgap
-------------------------------------+-------------------------------------
Reporter: vdelecroix | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-7.3
Component: interfaces | Resolution:
Keywords: | Merged in:
Authors: Vincent Delecroix | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/vdelecroix/18266 | f1b8bcd98ffadede706ec244975fab07fa3bd942
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by vdelecroix):
- coercion between interfaces objects and Sage objects should be one way.
So if for a given ring there is a coercion `Sage -> GAP` then it should be
the case for every ring that GAP understands.
- The solution I used is precisely what is done with PARI/GP (see for
instance the `PariInstance` class in `/sage/libs/pari/pari_instance.pyx`)
- Implementing the function `_coerce_map_from_` would be a useless pain
- ''"interface objects"'' are only intended for people having a knowledge
of the underlying software
Now, if for some specific `GAP` object you want to lift it back to Sage
then you can either use conversion (i.e. `MyParent(my_interface_object)`)
or use the `.sage()` method
{{{
sage: pari(13).sage()
13
sage: parent(_)
Integer Ring
sage: gap(13).sage()
13
sage: parent(_)
Integer Ring
sage: libgap(13).sage()
13
sage: parent(_)
Integer Ring
}}}
--
Ticket URL: <https://trac.sagemath.org/ticket/18266#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.