#2420: Extending the gap interface to uni- and multivariate polynomial rings 
over
number fields
---------------------------+------------------------------------------------
   Reporter:  SimonKing    |          Owner:  SimonKing                         
                             
       Type:  enhancement  |         Status:  needs_review                      
                             
   Priority:  major        |      Milestone:  sage-4.7.1                        
                             
  Component:  interfaces   |       Keywords:  gap interface, polynomial rings, 
number fields, interface cache
Work_issues:               |       Upstream:  N/A                               
                             
   Reviewer:               |         Author:  Simon King                        
                             
     Merged:               |   Dependencies:                                    
                             
---------------------------+------------------------------------------------
Changes (by SimonKing):

  * dependencies:  #8909, #9423 =>


Old description:

> Up to now, the gap interface did not work on polynomial rings over number
> fields. This patch extends the interface accordingly, so that now the
> following works.
> Univariate:
> {{{
> sage: F=CyclotomicField(8)
> sage: R=PolynomialRing(F,'x')
> sage: gap(R)
> PolynomialRing( <algebraic extension over the Rationals of degree 4>,
> ["x"] )
> sage: p=R('zeta8^2*x+zeta8')
> sage: gap(p)^3
> ((-1*zeta8^2))*x^3+((-3*zeta8))*x^2+(!-3)*x+(zeta8^3)
> sage: p^3
> (-zeta8^2)*x^3 + (-3*zeta8)*x^2 + (-3)*x + zeta8^3
> }}}
>
> Multivariate:
> {{{
> sage: R=PolynomialRing(F,'x,y')
> sage: gap(R)
> PolynomialRing( <algebraic extension over the Rationals of degree
> 4>, ["x", "y"] )
> sage: p=R('zeta8*x+zeta8^2*y')^2
> sage: gap(p)
> (zeta8^2)*x^2+(2*zeta8^3)*x*y-y^2
> sage: p
> zeta8^2*x^2 + 2*zeta8^3*x*y + (-1)*y^2
> }}}
>
> The patches also provide doc tests.
>
> However, there is one problem: On my machine, the doc tests of
> sage.rings.polynomial.polynomial_element.pyx trigger the bug reported in
> #2419.
> That bug seems to occur only on few machines (up to now, only one other
> person can reproduce #2419).
>
> So, there should be discussion how to deal with that issue.

New description:

 Up to now, the gap interface did not work on polynomial rings over number
 fields. This patch extends the interface accordingly, so that now the
 following works.
 Univariate:
 {{{
 sage: F=CyclotomicField(8)
 sage: R=PolynomialRing(F,'x')
 sage: gap(R)
 PolynomialRing( <algebraic extension over the Rationals of degree 4>,
 ["x"] )
 sage: p=R('zeta8^2*x+zeta8')
 sage: gap(p)^3
 ((-1*zeta8^2))*x^3+((-3*zeta8))*x^2+(!-3)*x+(zeta8^3)
 sage: p^3
 (-zeta8^2)*x^3 + (-3*zeta8)*x^2 + (-3)*x + zeta8^3
 }}}

 Multivariate:
 {{{
 sage: R=PolynomialRing(F,'x,y')
 sage: gap(R)
 PolynomialRing( <algebraic extension over the Rationals of degree
 4>, ["x", "y"] )
 sage: p=R('zeta8*x+zeta8^2*y')^2
 sage: gap(p)
 (zeta8^2)*x^2+(2*zeta8^3)*x*y-y^2
 sage: p
 zeta8^2*x^2 + 2*zeta8^3*x*y + (-1)*y^2
 }}}

 The patches also provide doc tests.

 However, there is one problem: On my machine, the doc tests of
 sage.rings.polynomial.polynomial_element.pyx trigger the bug reported in
 #2419.
 That bug seems to occur only on few machines (up to now, only one other
 person can reproduce #2419).

 So, there should be discussion how to deal with that issue.

 Apply [attachment:trac2420_gap_interface_polynomials.patch]

--

Comment:

 I have rebased the patch, so that it should work on top of sage-4.7.rc2. I
 haven't run tests, though.

 For the patchbot:

 Apply trac2420_gap_interface_polynomials.patch

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