#11836: gens_reduced() does not handle "large" ideals
-----------------------------+----------------------------------------------
   Reporter:  mirela         |          Owner:  jdemeyer      
       Type:  defect         |         Status:  needs_review  
   Priority:  major          |      Milestone:  sage-4.7.2    
  Component:  number fields  |       Keywords:                
Work_issues:                 |       Upstream:  N/A           
   Reviewer:  Marco Streng   |         Author:  Jeroen Demeyer
     Merged:                 |   Dependencies:  #11130        
-----------------------------+----------------------------------------------

Comment(by jdemeyer):

 Replying to [comment:17 mstreng]:
 > Replying to [comment:15 mstreng]
 >
 > Wait, why use flag=1 at all in bnfisprincipal? flag=1 is the (only) one
 that gives the warning. So if you replace flag=1 by flag=0 or flag=2 on
 line 1067, then that removes the warning.

 > More importantly: flag=2 (as opposed to 0 or 1) makes sure that
 {{{__ideal_class_log}}} is really correct by doubling the precision if
 necessary. That would fix a bug that we haven't even found yet! It doesn't
 slow correct answers down, as it only doubles the precision until we know
 {{{__ideal_class_log}}}; it does not continue on until we know a
 generator.

 What `bnfisprincipal()` tries to do is to write an ideal as C_1 ^e_1^ *
 ... * C_n ^e_n^ * (a), where (a) is a principal ideal and C_1, ..., C_n
 are fixed generators of the class group (these are determined by
 `bnfinit()` or `pari_bnf()` in Sage).  The exponents e_1, ..., e_n are
 ''always'' computed but (a) is not and that is what is warning is about.
 The warning is never about potentially incorrect results, it essentially
 means "we could not easily compute (a), so we didn't bother".
 `__ideal_class_log` should always be correct, regardless of the flag.

 My code uses `flag=1` first because sometimes we might not care about (a).
 For example, if the ideal is non-principal or the user wants to know
 `I.is_principal()` without actually needing the generator.

 One thing could be improved: if we know that the class group is trivial,
 some shortcuts can be made.

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