#4730: magma/sage -- conversion of finite field elements back and forth
------------------------+---------------------------------------------------
Reporter: was | Owner: was
Type: defect | Status: new
Priority: major | Milestone: sage-3.2.2
Component: interfaces | Keywords:
------------------------+---------------------------------------------------
Make this work:
{{{
sage: k.<a> = GF(2^16)
sage: magma(a).sage()
boom
}}}
Also, explain this fun behavior of magma where finite fields are
represented differently depending on their size, as discussed in irc here:
{{{
15:03 < ncalexan> I get this:
15:03 < ncalexan> sage: magma(GF(5^2, 'a')['x'].random_element())
15:03 < ncalexan> a^22*x + a^9
15:04 < ncalexan> And a should have order at most 2.
15:04 < ncalexan> (exactly 2)
15:04 < wstein> why?
15:04 < wstein> Why do you think that about a?
15:04 < wstein> ehh?
15:04 < ncalexan> It's a generator of GF(5^2).
15:05 < wstein> seria-mau -- if you wat long enough I can do it.
15:05 < ncalexan> It satisfies a polynomial of degree 2.
15:05 < wstein> My virtual machine was off.
15:05 < wstein> The order of a is 24:
15:05 < wstein> sage: GF(5^2,'a').0.multiplicative_order()
15:05 < wstein> 24
15:06 -!- Irssi: Pasting 7 lines to #sage-devel. Press Ctrl-K if you wish
to do this or Ctrl-C to cancel.
15:06 < wstein> sage: k.<a> = GF(25)
15:06 < wstein> sage: magma(a)
15:06 < wstein> a
15:06 < wstein> sage: a^22
15:06 < wstein> a + 1
15:06 < wstein> sage: magma(a+1)
15:06 < wstein> a^22
15:06 < wstein> Magma represents finite field elements differently in some
cases.
15:06 < ncalexan> Ah, I see, magma represents them totally differently.
15:06 < ncalexan> I had no idea.
15:06 < wstein> It's the sort of inconsistency that wouldn't fly among
sage devs.
15:06 < wstein> We would shoot that down in a second.
15:06 < ncalexan> What do they do for huge fields/
15:06 < wstein> I think it only use that representation for small
fields...
15:06 < wstein> maybe I'm wrong.
15:06 < ncalexan> You can't take dlogs everywhere.
15:07 < wstein> for big fields they don't use that representation:
15:07 < ncalexan> Okay, could you fix and apply my doctests (I think
they're useful) and maybe add a line explaining the surprising
representation differences/
15:07 < wstein> sage: magma.eval('FiniteField(997^2).1^1000')
15:07 < wstein> '94*$.1 + 597'
15:07 < ncalexan> That's so arbitrary.
}}}
Basically the above should be explained by some doctests.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4730>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---