On Mon, Jan 11, 2010 at 4:16 PM, javier <vengor...@gmail.com> wrote: > Dima, > > On Jan 11, 3:04 pm, Dima Pasechnik <dimp...@gmail.com> wrote: >> no, from GAP's point of view, Z(2^4)^5 is an element of GF(4). >> And thus b is such an element, too... > > then from the "gap-to-sage" point of view nothing else can be done. A > coercion between finite fields is needed before this method can work > in a completely satisfactory way. On a brighter note, I have solved > the problem with the conversion of elements in GF(p) with p prime, but > we'll have to deal with outputs belonging to different fields until > somebody else comes up with a better idea.
Dumb question. There is code in Sage already to convert from GAP's GF(p) (or GF(q)) to Sage's: For a prime field: sage: a = gap('Z(7)^3') sage: GF(7)(a) 6 For a non-prime finite field: sage: a = gap('Z(7^2)^2') sage: a Z(7^2)^2 sage: a^48 Z(7)^0 sage: k.<b> = GF(49) sage: k(a) b + 4 If you do k.__call__?? at this point, you'll see source. Following that you get sage: sage.interfaces.gap.gfq_gap_to_sage?? So is all this discussion about re-implementing that function? What are you doing that is better? William
-- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org