#8873: Inconsistency with CombinatorialFreeModule: Vector Space vs. Module
------------------------------+------------------------
Reporter: jbandlow | Owner: nthiery
Type: defect | Status: new
Priority: major | Milestone: sage-6.4
Component: categories | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
------------------------------+------------------------
Old description:
> Consider the following code:
> {{{
> sage: G = Zmod(5)
> sage: A = CombinatorialFreeModule(QQ, G)
> sage: B = CombinatorialFreeMoudle(ZZ, G)
> sage: A(G(1))
> B[1]
> sage: B(G(1))
> TypeError
> }}}
>
> This should probably work the same for both. My guess is that this will
> involve moving some VectorSpace code up to ModuleWithBasis, but I haven't
> investigated yet.
New description:
Consider the following code:
{{{
sage: G = Zmod(5)
sage: A = CombinatorialFreeModule(QQ, G)
sage: B = CombinatorialFreeModule(ZZ, G)
sage: A(G(1))
B[1]
sage: B(G(1))
TypeError
}}}
This should probably work the same for both. My guess is that this will
involve moving some VectorSpace code up to ModuleWithBasis, but I haven't
investigated yet.
--
Comment (by cnassau):
This ticket is 4 years old any so far nobody has bothered to act on it. I
suppose this is a "wontfix" ticket, for two reasons:
* there is a workaround: the following both work
{{{
sage: A.monomial(G(1))
sage: B.monomial(G(1))
}}}
* according to the following comment in
`CombinatorialFreeModule._element_constructor_` the syntax `B(G(1))` is
discouraged because it is ambiguous in certain situations:
{{{
Do not rely on the following feature which may be removed in the
future::
sage: QS3 = SymmetricGroupAlgebra(QQ,3)
sage: QS3([2,3,1]) # indirect doctest
[2, 3, 1]
instead, use::
sage: P = QS3.basis().keys()
sage: QS3.monomial(P([2,3,1])) # indirect doctest
[2, 3, 1]
}}}
I'll set this ticket to "wontfix" to see if someone complains.
--
Ticket URL: <http://trac.sagemath.org/ticket/8873#comment:5>
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.