#16973: Shuffle algebras use words for their basis keys...
-----------------------------+------------------------------------------
Reporter: darij | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.4
Component: combinatorics | Keywords: shuffle algebra, words
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
-----------------------------+------------------------------------------
... which limits their functionality in an annoying and rather
intransparent way:
{{{
sage: A = ShuffleAlgebra(QQ, ['x1','x2'])
sage: A.gens()
---------------------------------------------------------------------------
ValueError Traceback (most recent call
last)
<ipython-input-14-53db6b193798> in <module>()
----> 1 A.gens()
/home/darij/sage-6.3.beta6/local/lib/python2.7/site-
packages/sage/misc/cachefunc.so in
sage.misc.cachefunc.CachedMethodCallerNoArgs.__call__
(build/cythonized/sage/misc/cachefunc.c:12768)()
/home/darij/sage-6.3.beta6/local/lib/python2.7/site-
packages/sage/algebras/shuffle_algebra.pyc in algebra_generators(self)
339 """
340 Words = self.basis().keys()
--> 341 return Family( [self.monomial(Words(a)) for a in
self._alphabet] )
342 # FIXME: use this once the keys argument of FiniteFamily
will be honoured
343 # for the specifying the order of the elements in the
family
/home/darij/sage-6.3.beta6/local/lib/python2.7/site-
packages/sage/combinat/words/words.pyc in __call__(self, data, length,
datatype, caching, **kwds)
264 # The function _construct_word handles the construction of
the words.
265 w = self._construct_word(**kwds)
--> 266 self._check(w)
267 return w
268
/home/darij/sage-6.3.beta6/local/lib/python2.7/site-
packages/sage/combinat/words/words.pyc in _check(self, w, length)
591 for a in itertools.islice(w, length):
592 if a not in self._alphabet:
--> 593 raise ValueError("%s not in alphabet!" % a)
594
595 def _repr_(self):
ValueError: x not in alphabet!
}}}
I wish I had an idea how to fix this.
IMHO shuffle algebras and free algebras should behave alike in as many as
ways as possible. They are identical as modules and differ only in their
algebra and coalgebra structure (the latter of which should be implemented
at some point). No, the free algebra doesn't use words for its basis keys.
--
Ticket URL: <http://trac.sagemath.org/ticket/16973>
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.