I am trying to construct formal linear combinations of instances of a particular class. I have asked about this before and, I think, was given the following template
class Foo(UniqueRepresentation): def __init__(self,a): self.data = a class Foos(Parent, UniqueRepresentation): # This class represents the set of all Foo's def __contains__(self,f): return isinstance(f,Foo) Element = Foo FreeM = CombinatorialFreeModule(QQ,Foo) s = Foo(1) FreeM(s) This example seems to work. When I try this on my actual example I get a message 'Foo' object has no attribute 'parent' Actually I thought the last line should be FreeM = CombinatorialFreeModule(QQ,Foos()) but this didn't work in either example. Can anyone tell me what I am doing wrong? ------------------------------------------- While I am here: I am constructing an infinite dimensional representation of an algebra. This means the next step for me is to construct operators on this vector space (one for each integer) and these operators will satisfy the Temperley-Lieb relations. I want to define each operator on the basis and then extend by linearity. Is there an existing category I could/should be using? -- 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.