#5618: Cyclotomic field elements are not converted to Gap correctly
--------------------------+-------------------------------------------------
   Reporter:  saliola     |       Owner:  tbd                           
       Type:  defect      |      Status:  needs_review                  
   Priority:  major       |   Milestone:  sage-4.5                      
  Component:  algebra     |    Keywords:  gap interface cyclotomic field
     Author:  Simon King  |    Upstream:  N/A                           
   Reviewer:              |      Merged:                                
Work_issues:              |  
--------------------------+-------------------------------------------------
Changes (by newvalueoldvalue):

  * keywords:  => gap interface cyclotomic field
  * status:  new => needs_review
  * author:  => Simon King


Comment:

 I created the patch after the patches from #8909 and #9423 -- so, it is
 possible that the new patch actually depends on the two other tickets (but
 one of them already has a positive review).

 With the patch, a cyclotomic field in Sage is represented as a cyclotomic
 field (and not as a number field) in GAP:
 {{{
 sage: Z = CyclotomicField(8)
 sage: gap(Z)
 CF(8)
 sage: Z(gap(Z.0^2))
 zeta8^2
 }}}

 The advantage is that the motivating example from the ticket description
 now works (and is used as a doctest):
 {{{
 sage: H = AlternatingGroup(4)
 sage: g = H.list()[1]
 sage: K = H.subgroup([g])
 sage: z = CyclotomicField(3).an_element(); z
 sage: c = K.character([1,z,z**2]); c
 Character of Subgroup of AlternatingGroup(4) generated by [(2,3,4)]
 sage: c(g^2); z^2
 -zeta3 - 1
 -zeta3 - 1
 }}}

 The disadvantage: While it is still possible to chose the name of a number
 field generator in GAP as in Sage
 {{{
 sage: K.<tau> = NumberField(x^2+x+1)
 sage: gap(K)
 <algebraic extension over the Rationals of degree 3>
 sage: K.0
 tau
 sage: gap(K.0)
 tau
 }}}
 it is now impossible to do the same for cyclotomic fields:
 {{{
 sage: L.<zeta> = CyclotomicField(3)
 sage: L.0
 zeta
 sage: gap(L.0)
 E(3)
 }}}

 By consequence, I had to fix a couple of doctests. All doctests pass, but
 I can not vouch for external code.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5618#comment:3>
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 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.

Reply via email to