O.K. I think I am getting there slowly. I will expose my ignorance I found the file examples/semigroups.py more useful than examples/monoids.py as the latter just calls the former and adds the unit.
When I read that the product is a * b = a I thought this was a rather disturbing typo. However when I read examples/semigroups.py I found that the first example actually means this. I think the FreeMonoid documentation also says this and also says that it constructs a free abelian monoid. I now understand that the FreeMonoid in examples/monoids.py has nothing to do with the FreeMonoid in the distribution. I think this is confusing for a novice. In a tutorial a better name would be something different such as NewMonoid or ExampleMonoid. What I now understand and I assume no-one actually said as it is too obvious (or maybe I was told and did not get it) is: To implement a new monoid I define a new class which inherits from Parent. The class definition has to include the line Parent.__init__(self,category=Monoids()) Then I also have to implement class methods which are listed by Monoids.ParentMethods Then reading these files I have some further questions: What is the rationale for Family? and what is ElementWrapper all about? -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.
