What are "basis()" and "one_basis()" supposed to return?

4 views
Skip to first unread message

Simon King

unread,
Oct 9, 2010, 10:57:33 AM10/9/10
to sage-algebra
Hi!

Monoids().Algebras(...) defines a parent method
@cached_method
def one_basis(self):
return self.basis().keys().one()

The problem is that a parent method "basis()" does not seem to be
defined at all. Or at least,
grep "def basis" sage/categories/*
returns nothing.

My questions are:
* What kind of objects should have a basis() method? For example,
should all objects in a category Sets().Algebras() have such method?
Then it should be defined there, as a parent method.
* What kind of object is basis() supposed to return? Apparently it has
a method "keys()", but it is not a dictionary, since keys() has a
method one().

Cheers,
Simon

Nicolas M. Thiery

unread,
Oct 9, 2010, 4:46:12 PM10/9/10
to sage-a...@googlegroups.com, sage-comb...@googlegroups.com

Monoids().Algebras(QQ) is a subcategory of ModulesWithBasis(QQ). As
such it should have a basis method which is supposed to be a Family.
For a monoid algebra, the basis is indexed by the monoid itself, which
should have a one method.

Ah, right, `basis` is not yet documented in the category. There should
be an abstract_method; please open a ticket! All our examples of
ModulesWithBasis so far have been implemented using
CombinatorialFreeModule which provides the basis method, and all our
Monoids().Algebras(...) so far have been constructed through
MyMonoid().algebra(...) which uses CombinatorialFreeModule. Which is
why we did not hit this yet.

Cheers,
Nicolas
--
Nicolas M. Thi�ry "Isil" <nth...@users.sf.net>
http://Nicolas.Thiery.name/

Reply all
Reply to author
Forward
0 new messages