#11891: NumberField(...).pari_polynomial() should return an integral polynomial
-----------------------------+----------------------------------------------
   Reporter:  jdemeyer       |          Owner:  davidloeffler 
       Type:  enhancement    |         Status:  needs_work    
   Priority:  major          |      Milestone:  sage-4.7.3    
  Component:  number fields  |       Keywords:                
Work_issues:                 |       Upstream:  N/A           
   Reviewer:                 |         Author:  Jeroen Demeyer
     Merged:                 |   Dependencies:                
-----------------------------+----------------------------------------------
Changes (by jdemeyer):

  * status:  needs_review => needs_work


Comment:

 Replying to [comment:3 was]:
 > The code looks good, and passes tests, and it means we can at least
 compute discriminants.
 >
 > The first and second things I try still don't work though, and I'm
 curious what you think about this:
 > {{{
 > sage: k.<a, c> = NumberField([x^2 + 1/3, x^2 + 1/4])
 > sage: k
 > Number Field in a with defining polynomial x^2 + 1/3 over its base field
 > sage: a+c
 >   ***   Warning: non-monic polynomial. Result of the form [nf,c].
 > ERROR: An unexpected error occurred while tokenizing input
 > ...
 > BOOM!
 > sage: k.relative_discriminant()
 >   ***   Warning: non-monic polynomial. Result of the form [nf,c].
 > BOOM!
 > }}}
 >
 >
 > Side Remarks: 1. I've always intended to just rewrite number fields to
 completely use
 > {{{
 > sage.schemes.elliptic_curves.heegner.make_monic
 > }}}
 > behind the scenes, and do *everything* that involves PARI in all cases
 using a monic integral polynomial, and only convert to the user's
 representation for input and output.  I wish I had done that when I was
 first writing number fields.
 I never intended this ticket to completely fix non-integral/non-monic
 number fields.  I can have a look at the error messages above and try to
 fix them, but I also do not want to put too much effort.  The main
 motivation for this ticket was to support #11890, for which it seems to
 work.

 > 2. This is disturbing:
 > {{{
 > sage: K.<I> = NumberField(x^2+1)
 > sage: K.pari_polynomial()
 > x^2 + 1
 > sage: K.pari_polynomial('I')
 > 0
 > }}}
 > I would rather get an error message in the latter case.
 Okay, that should be fixable (currently, we simply substitute instead of
 creating a polynomial with a given variable).

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