#18750: Make sure indices converted into the index set of the basis for a
CombinatorialFreeModule
-------------------------------------+-------------------------------------
Reporter: tscrim | Owner: sage-combinat
Type: defect | Status: needs_review
Priority: major | Milestone: sage-6.8
Component: combinatorics | Resolution:
Keywords: combinatorial | Merged in:
free module | Reviewers:
Authors: Travis Scrimshaw | Work issues:
Report Upstream: N/A | Commit:
Branch: | f697858783489df6b529d74fcd48a68235ef0d22
public/combinat/fix_CFM_basis-18750| Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Changes (by tscrim):
* status: new => needs_review
* commit: => f697858783489df6b529d74fcd48a68235ef0d22
* branch: => public/combinat/fix_CFM_basis-18750
Old description:
> The following is unexpected:
> {{{
> sage: s = SymmetricFunctions(QQ).s()
> sage: s.basis()[(3,1,1)]
> s(3, 1, 1)
> sage: type(_.support()[0])
> <type 'tuple'>
> sage: s.basis()[(3,1,1)]
> s(3, 1, 1)
> }}}
> We should make sure that we always have the support of an element of the
> indexing set for a `CombinatorialFreeModule`.
New description:
The following is unexpected:
{{{
sage: F = CombinatorialFreeModule(QQ, Partitions())
sage: F.monomial((2,1,1))
B[(2, 1, 1)]
}}}
We should make sure that we always have the support of an element of the
indexing set for a `CombinatorialFreeModule`.
--
Comment:
We loose about half a microsecond each time this is called, but which can
add a little bit of slowdown. However I think this is one which we must
accept (and will typically be negligible due to caching or other parts of
the computation). Although in these examples, we seem to achieve a
marginal net speedup. So I think this is a good solution (but I haven't
done extensive testing).
With:
{{{
sage: s = SymmetricFunctions(QQ).s()
sage: %timeit s[5,3,1,1] * s[3,3,2]
100 loops, best of 3: 15.2 ms per loop
sage: I = DescentAlgebra(QQ, 4).I()
sage: timeit('I[3,1] * I[2,2]', number=10)
10 loops, best of 3: 223 ms per loop
}}}
Before:
{{{
sage: s = SymmetricFunctions(QQ).s()
sage: %timeit s[5,3,1,1] * s[3,3,2]
100 loops, best of 3: 15.7 ms per loop
sage: I = DescentAlgebra(QQ, 4).I()
sage: timeit('I[3,1] * I[2,2]', number=10)
10 loops, best of 3: 225 ms per loop
}}}
----
New commits:
||[http://git.sagemath.org/sage.git/commit/?id=f697858783489df6b529d74fcd48a68235ef0d22
f697858]||{{{Make sure we always have an element of the basis indexing
set.}}}||
--
Ticket URL: <http://trac.sagemath.org/ticket/18750#comment:1>
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.