#8232: cmp function for words is broken
-----------------------------+----------------------------------------------
   Reporter:  slabbe         |       Owner:  sage-combinat
       Type:  defect         |      Status:  new          
   Priority:  major          |   Milestone:  sage-4.3.3   
  Component:  combinatorics  |    Keywords:               
     Author:                 |    Upstream:  N/A          
   Reviewer:                 |      Merged:               
Work_issues:                 |  
-----------------------------+----------------------------------------------
 As discussed on [http://groups.google.com/group/sage-combinat-
 devel/browse_thread/thread/9e90bbeb0328034c| sage-combinat-devel], cmp is
 broken for words.


 {{{
 Amusant: this boils down to:

 sage: W = Words(['a','b','c'])
 sage: W('a') == W([])
 True
 sage: W([]) == W('a')
 False
 }}}

 it causes problem else where :

 {{{
 sage: A = AlgebrasWithBasis(QQ).example(); A
 An example of an algebra with basis: the free algebra on the
 generators ('a', 'b', 'c') over Rational Field
 sage: [a,b,c] = A.algebra_generators()
 sage: a.is_one()
 True
 sage: b.is_one()
 True
 sage: c.is_one()
 True
 sage: A.one().is_one()
 True
 sage: (a+b).is_one()
 False
 sage: (a+A.one()).is_one()
 False
 }}}

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