#14541: Family over enumerated set has wrong category
-------------------------------------+-------------------------------------
       Reporter:  cnassau            |        Owner:  nthiery
           Type:  defect             |       Status:  needs_work
       Priority:  minor              |    Milestone:  sage-6.4
      Component:  categories         |   Resolution:
       Keywords:  Family, Category   |    Merged in:
  of finite enumerated sets,         |
  CartesianProduct                   |
        Authors:  Christian Nassau,  |    Reviewers:
  Nathann Cohen                      |
Report Upstream:  N/A                |  Work issues:
         Branch:  u/ncohen/14541     |       Commit:
                                     |  fd3d6d51a3251999e327cf18c38f3389b2ee2a1b
   Dependencies:                     |     Stopgaps:  wrongAnswerMarker
-------------------------------------+-------------------------------------
Changes (by jakobkroeker):

 * stopgaps:   => wrongAnswerMarker


Old description:

> This happens with Sage 5.10beta3:
>
> {{{
> sage: P=Permutations()
> sage: print P.category()
> Category of sets
> sage: print P.cardinality()
> +Infinity
> sage: F=Family(Permutations(), lambda i:i)
> sage: print F.category()
> Category of finite enumerated sets
> }}}
>
> But clearly {{{F}}} is not finite...
>
> Another bug, (also fixed in the attached patch):
> {{{
> sage: Family(CartesianProduct(ZZ,ZZ),lambda (x,y) :
> (x+y,x-y)).cardinality()
> ...
> TypeError: cardinality does not fit into a Python int.
> }}}

New description:

 This happens with Sage 5.10beta3:

 {{{
 sage: P=Permutations()
 sage: print P.category()
 Category of sets
 sage: print P.cardinality()
 +Infinity
 sage: F=Family(Permutations(), lambda i:i)
 sage: print F.category()
 Category of finite enumerated sets
 }}}

 But clearly {{{F}}} is not finite...

 Another bug, (also fixed in the attached patch):
 {{{
 sage: Family(CartesianProduct(ZZ,ZZ),lambda (x,y) :
 (x+y,x-y)).cardinality()
 ...
 TypeError: cardinality does not fit into a Python int.
 }}}

 update: following example is still wrong (see second comment)
 {{{
 sage: X=CombinatorialFreeModule(ZZ,ZZ)
 sage: print X
 Free module generated by Integer Ring over Integer Ring
 sage: print X.basis().category()
 Category of enumerated sets
 sage: TX = tensor((X,))
 sage: print TX.basis().cardinality()
 +Infinity
 sage: print TX.basis().category()
 Category of finite enumerated sets
 }}}

--

--
Ticket URL: <https://trac.sagemath.org/ticket/14541#comment:17>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to