#7545: Gaussian Integers
-----------------------------+----------------------------------------------
   Reporter:  wuthrich       |       Owner:  davidloeffler                      
           
       Type:  enhancement    |      Status:  needs_info                         
           
   Priority:  minor          |   Milestone:  sage-wishlist                      
           
  Component:  number fields  |    Keywords:  gaussian integers, Z[i], quadratic 
number ring
     Author:                 |    Upstream:  N/A                                
           
   Reviewer:                 |      Merged:                                     
           
Work_issues:                 |  
-----------------------------+----------------------------------------------

Comment(by kcrisman):

 The Pynac/symbolic one is, yes.  In fact, it looks a lot like the one in
 this patch already:
 {{{
     K = QuadraticField(-1, 'I', embedding=CC.gen(), latex_name='i')
     pynac_I = K.gen()
 }}}
 which by the way appears to be a bug of sorts; `embedding` should be
 `True` or `False` in this case, which then passes things to `NumberField`,
 where `embedding` should be the image of the generator in an ambient
 field.  I don't know if should be considered a bug in `QuadraticField` or
 in the Pynac implementation, though.  What's actually passed to
 `NumberField` is `CLF(-1).sqrt()`.

 (Parenthetical: sage.rings.all says
 {{{
 # i = I = QuadraticField(-1, 'I').gen()
 I = CC.gen()
 }}}
 So I wonder if there is any conflict between these that would need to get
 sorted out.  Apparently it just gets overwritten during the import process
 when Sage starts up.)

 Anyway, in sage.symbolic.pynac we have further that
 {{{
     I = new_Expression_from_GEx(ring.SR, g_I)
 }}}
 So is it possible to make `I` no longer be this Pynac-wrapped generator of
 the appropriate quadratic field, but instead stay an element of the number
 field 'coerced' as robertwb says when appropriate (such as with
 {{{2.*I}}})?

 I would be very happy to take Chris' excellent start and turn it into
 that, because I could definitely use it this spring in my own class.  But
 I'd need help because I don't know how the coercion stuff works at all.

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