Ticket #12706 (closed defect: fixed)
monomials of 0
|Reported by:||vferay||Owned by:||sage-combinat|
|Component:||commutative algebra||Keywords:||polynomial, zero|
|Report Upstream:||N/A||Reviewers:||Keshav Kini|
|Authors:||Frédéric Chapoton||Merged in:||sage-5.2.beta1|
Description (last modified by vferay) (diff)
The monomials method applied to the null polynomials returns .
According to me, it should return [ ]. This can be problematic because when we ask the coefficients of the monomial 0, an error is raised (see below).
If nobody objects, I will write a patch to correct this.
sage: QX=PolynomialRing(QQ,'x',2) sage: P=QX(0) sage: P.monomials()  sage: [P.coefficient(mon) for mon in P.monomials()] TypeError: degrees must be a monomial
- Keywords polynomial, zero added
- Authors changed from vferay to Frédéric Chapoton
- Component changed from combinatorics to commutative algebra
comment:10 Changed 11 months ago by kini
- Status changed from needs_review to positive_review
- Reviewers set to Keshav Kini