I'm currently going around in circles with some CombinatorialFreeModule woes. The previous code for these "alternating seminormal forms works, but in order to cope with the many variations of seminormal representations that I decided to implement working I've have had to jazz things up quite a lot. Now my basic class structure looks something like this:
from sage.combinat.free_module import CombinatorialFreeModule from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing class A(CombinatorialFreeModule): def __init__(self, base_ring, basis_keys, prefix='a', **kwargs): super(A,self).__init__(base_ring, basis_keys, prefix=prefix, ** kwargs) class Element(CombinatorialFreeModule.Element): pass class B(A): def __init__(self, base_ring, basis_keys, prefix='b', **kwargs): super(B,self).__init__(base_ring, basis_keys, prefix=prefix, ** kwargs) class C(B): def __init__(self, shape, prefix='c', **kwargs): base_ring=PolynomialRing(Integers(), 'q') super(B,self).__init__(base_ring, shape.standard_tableaux(), prefix= prefix, **kwargs) This simplified code works fine. For example, sage: C(Partition([3,2])).an_element() 2*c[[[1, 2, 5], [3, 4]]] + 3*c[[[1, 3, 4], [2, 5]]] + 2*c[[[1, 3, 5], [2, 4 ]]] Unfortunately my real code does not work, having issues like: sage: rep=SeminormalRepresentation([2,1]); rep SeminormalRepresentation([2,1]) # seems to work OK sage: rep.an_element() # try to construct an element <repr(<sage.algebras.iwahori_hecke_algebras. iwahori_hecke_algebra_representations.SeminormalRepresentation_with_category .element_class at 0x119a88c80>) failed: AttributeError: 'SeminormalRepresentation_with_category' object has no attribute '_prefix'> sage: rep(StandardTableau([[1,2],[3]])) AttributeError Traceback (most recent call last) ... AttributeError: 'SeminormalRepresentation_with_category' object has no attribute '_basis_keys' Does anyone have an idea of what is going wrong. Part of the issue might be all of the super calls, but I tried taking though ut and explcitly calling the previous class (they are linearly ordered), but this doesn't help. For anyone feeling masochistic, the full code is at trac:17303 <http://trac.sagemath.org/ticket/17303> (it uses 6.5beta0) Andrew -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel. For more options, visit https://groups.google.com/d/optout.