#16835: cartesian product of ModulesWithBasis not in ModulesWithBasis
--------------------------+----------------------------
Reporter: cnassau | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.4
Component: categories | Keywords:
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
--------------------------+----------------------------
{{{
sage: X=CombinatorialFreeModule(RDF,ZZ,category=ModulesWithBasis(RDF))
sage: Y=cartesian_product((X,X))
sage: X in ModulesWithBasis(RDF)
True
sage: Y in ModulesWithBasis(RDF)
False
sage: Y.categories()[1]
Category of modules with basis over Real Double Field
sage: Y.categories()[1] is ModulesWithBasis(RDF)
False
}}}
This weirdness relates to the fact that `ModulesWithBasis(RDF)` prints as
the `Category of vector spaces with basis over Real Double Field`. The
`Category of modules with basis over Real Double Field` is one of its
super categories.
In the case at hand I cannot construct a morphism from `Y` to `X` because
of the category mismatch:
{{{
sage: Y.module_morphism(codomain=X,on_basis=lambda (i,j):X.monomial(i))
---------------------------------------------------------------------------
ValueError Traceback (most recent call
last)
..
ValueError: Free module generated by Integer Ring over Real Double Field
(+) Free module generated by Integer Ring over Real Double Field is not in
Category of vector spaces with basis over Real Double Field
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/16835>
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.