#11747: is_monomial and is_term
-----------------------+----------------------------------------------------
   Reporter:  was      |          Owner:  AlexGhitza
       Type:  defect   |         Status:  new       
   Priority:  minor    |      Milestone:  sage-4.7.2
  Component:  algebra  |       Keywords:  sd32      
Work_issues:           |       Upstream:  N/A       
   Reviewer:           |         Author:            
     Merged:           |   Dependencies:            
-----------------------+----------------------------------------------------
 Ut oh, the word "monomial" turns out to be ambiguous!   There are two
 definitions!:

       http://en.wikipedia.org/wiki/Monomial

 And in Sage we evidently have *randomly* (?) and inconsistenly chosen
 between the two definitions, which is very unfortunate.
 {{{
 sage: R.<x> =QQ[]
 sage: (2*x).is_monomial()     # definition 2 in univariate poly
 True
 sage: (x).is_monomial()
 True
 sage: R.<x,y> =QQ[]
 sage: (2*x).is_monomial()     # definition 1 in multivariate poly
 False
 sage: x.is_monomial()
 True
 }}}

 Etc.   Fortunately, {{{is_monomial()}}} is called in only about 5 or 6
 places in the entire Sage source library, according to
 {{{search_src('is_monomial')}}}.

 Reading the argument in Wikipedia further, and discussing this with Tom
 Boothby, we've decided the following would work for us.

 1. Introduce a new method {{{is_term}}}, which returns True for
 {{{a*x^i*y^j...}}}, i.e. it allows a coefficient.   Fortunately,
 {{{is_term}}} is currently used nowhere in Sage.

 2. Unify {{{is_monomial}}} to require the coefficient to be 1.  This means
 changing univariate polynomials to be consistent with multivariate
 polynomials.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11747>
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