#13133: BooleanMonomial.index() SEGFAULT on constant monomials
------------------------------------------------------------------+---------
Reporter: Bouillaguet |
Owner: malb
Type: defect |
Status: needs_review
Priority: minor |
Milestone: sage-5.1
Component: commutative algebra |
Resolution:
Keywords: | Work
issues:
Report Upstream: Reported upstream. Developers acknowledge bug. |
Reviewers:
Authors: Charles Bouillaguet | Merged
in:
Dependencies: polybori |
Stopgaps:
------------------------------------------------------------------+---------
Changes (by AlexanderDreyer):
* status: new => needs_review
Comment:
Replying to [comment:2 Bouillaguet]:
> I expected the bug to also occur with the zero monomial, and there is no
is_constant() method that I could have used. However, the bug does not
occur with zero, because "zero" is not a monomial :
This is exactly the reason why there is no `is_constant()` routine.
> {{{
> sage: R(0).lm().parent()
> Boolean PolynomialRing in x, y
> sage: R(1).lm().parent()
> MonomialMonoid of Boolean PolynomialRing in x, y
> }}}
> I wonder if this behavior is the best possible, but it does make sense.
Patch updated
This is the best compromise: !PolyBoRi's original interface throws a
ValueError when accessing zero polynomial leading monomials. (As you
pointed out, there are no zero monomials.) But this would not be
consistent with other polynomial types in Sage (e. g. Singular polynomials
used for `QQ[]`). But these return polynomials (not monomials) anyway, so
zero is not an issue there.
The patch is fine, I'll give it a positive review and update the pending
spkg for !PolyBoRi 0.8.2 at #13124 soon.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13133#comment:3>
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.