Opened 5 years ago

Last modified 4 years ago

#16432 new defect

monomial_all_divisors omit 1 as a monomial divisor

Reported by: bouvier Owned by:
Priority: trivial Milestone: sage-6.4
Component: basic arithmetic Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

The documentation of the function monomial_all_divisors states that the function "Return a list of all monomials that divide" the input.

The polynomial 1 is considered as a monomial dividing any monomial but is not returned by monomial_all_divisors (see code below for an example).

Cyril

x,v=var('x,y')
R = ZZ['x,y']

one = R(1)
m = R(x*y^2)

print "1 is a monomial: ", one.is_monomial()
print "1 divides m:", R.monomial_divides (one, m)
print "List of monomial divisors of m:", R.monomial_all_divisors(m)
print "Is 1 in it:", one in R.monomial_all_divisors(m)

Change History (1)

comment:1 Changed 4 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4
Note: See TracTickets for help on using tickets.