#16676: Cardinality of infinite sets loops forever
-------------------------------------+-------------------------------------
       Reporter:  defeo              |        Owner:
           Type:  defect             |       Status:  positive_review
       Priority:  major              |    Milestone:  sage-
      Component:  combinatorics      |  duplicate/invalid/wontfix
       Keywords:  sets               |   Resolution:
  infinite_loop                      |    Merged in:
        Authors:                     |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by ncohen):

 * status:  needs_review => positive_review


Comment:

 > {{{
 > sage: Set(ZZ).difference(Set()).cardinality()
 > +Infinity
 > sage: Set(QQ).difference(Set(ZZ)).cardinality()
 > NotImplementedError: computation of cardinality of Set-theoretic
 > difference of Set of elements of Rational Field and Set of elements
 > of Integer Ring not yet implemented
 > }}}

 Perhaps we should start adding parentheses in those error messages.
 Something like
 {{{
 computation of cardinality of (Set-theoretic
 difference of Set of elements of Rational Field) and (Set of elements
 of Integer Ring) not yet implemented.
 }}}

 But then we would eventually end up with the more lisp-looking message

 {{{
 computation of cardinality of (Set-theoretic
 difference of Set of elements of (Rational Field)) and (Set of elements
 of (Integer Ring)) not yet implemented.
 }}}

 Sigh... `:-P`

 Nathann

--
Ticket URL: <http://trac.sagemath.org/ticket/16676#comment:11>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to