On 17-Feb-10, at 10:03 AM, Nicolas M. Thiery wrote:
On Wed, Feb 17, 2010 at 08:53:23AM -0800, Nick Alexander wrote:
PS: FWIW, in this kind of problem having a nice
"VectorSpaceWithBasis"
so that I could define a vector space with basis given by the group
elements, would come really fancy.
I also want this! Various people in the combinat group suggested
they had it/were working on it, but I don't know the status.
That has been working just fine for more than one year, in plain Sage:
sage: CombinatorialFreeModule(QQ, G)
Free module generated by Special Linear Group of degree 2 over
Finite Field of size 2 over Rational Field
It got refactored in the category rework, and it will deserve further
optimizations some day. And it will need to eventually be renamed to
FreeModule(QQ, G), since there is nothing combinatorial to it. But
that's about it.
With an old version of sage, this is unfortunately not all that useful
for my purpose. Not sure how to address this, since there is not a
standard way to convert a multivariate polynomial into such an
expression. Perhaps things have improved since this version was
released?
sage: version()
'Sage Version 4.1.1, Release Date: 2009-08-14'
sage: a, b = QQ['a, b'].gens()
sage: C = CombinatorialFreeModule(QQ, [ a^2, b^2, a*b ])
sage: C(a^2 + b^2)
---------------------------------------------------------------------------
TypeError Traceback (most recent call
last)
/Users/ncalexan/.sage/temp/pv139204.reshsg.uci.edu/8650/
_var_folders_kM_kMQxS_H3E2yVLAPbo_D5Xk___TI__Tmp__sage1411bcf_sage_109
.py in <module>()
/Users/ncalexan/sage-4.1.1-OSX10.5-intel-64bit-i386-Darwin/local/lib/
python2.6/site-packages/sage/combinat/free_module.pyc in
__call__(self, x)
814 except TypeError:
815 pass
--> 816 raise TypeError, "do not know how to make x (= %s)
an element of self (=%s)"%(x,self)
817
818 def _an_element_impl(self):
TypeError: do not know how to make x (= a^2 + b^2) an element of self
(=Free module generated by [a^2, b^2, a*b] over Rational Field)
Nick
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org