#15745: The unit ideal is not prime or primary
-------------------------------------+-------------------------------------
       Reporter:  cremona            |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.2
      Component:  algebra            |   Resolution:
       Keywords:  unit prime         |    Merged in:
  primary ideal                      |    Reviewers:
        Authors:  Peter Bruin        |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  295c7fd72cc777f3d5c2b2b25b2895c5c67e6170
  u/pbruin/15745-primary_decomposition_unit_ideal|     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by pbruin):

 Replying to [comment:2 cremona]:
 > Looks good to me.  I am not sure why we need to have a primer about
 definition and existence of primary decompositions in the docstring at
 all, let alone three times!  But as long as they are correct (which they
 are, and I should know since I'll lecturing about all that later this
 term) I am certainly not going to suggest that they are removed.

 Yes, given that the small primer was already there I thought it made more
 sense to tidy it up than to remove it altogether.

 > Apart from tidying the documentation the patch just has two things, the
 easy one (deal with the unit ideal properly) and something else.  Would it
 be possible to have an example of how the second change corrects something
 which used to be wrong?

 The thing that failed after I made the first fix was a doctest that
 checked that the product of the primary ideals in the primary
 decomposition was equal to the original ideal.  The problem was that
 comparison of ideals was broken in the following situation: ''I'' and
 ''J'' are ideals of ''R'' = '''Q'''[''x'',''y''], a Gröbner basis of ''J''
 has been computed for a different monomial ordering than the default one
 for ''R'', and no Gröbner basis for ''I'' has been computed.  The reason
 why it didn't work is that the equality ''I'' = ''J'' was tested using the
 default monomial ordering of ''R'', but with the "wrong" Gröbner basis for
 ''J''.  My fix makes sure that the comparison uses the monomial ordering
 of the cached Gröbner basis.

 How was the bug triggered by the new check for the unit ideal?  At the
 point this check is done, no Gröbner bases have been computed for any
 ideal, so Sage decides to use the `degrevlex` ordering, while the ''R'' in
 the doctest has the `lex` ordering.  So a Gröbner basis for the
 `degrevlex` ordering is cached, and on the other hand when the product of
 the ideals in the primary decomposition is made it has no cached Gröbner
 basis, which brings us in the situation above.

 I could have written a new doctest, but since it is already tested by an
 existing doctest I thought it wasn't really necessary, and I didn't see a
 natural way of explaining the above problem in the patch.  I should have
 explained in my previous comment why there is no new doctest in the patch,
 though.

--
Ticket URL: <http://trac.sagemath.org/ticket/15745#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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to