Ask Your Question

Revision history [back]

This is implemented in GAP, but not currently wrapped in Sage. It still is possible -- but inconvenient -- to create such monoids by calling directly the appropriate GAP functions.

If you are ready to use experimental code with all its caveats, I am implementing a library providing nicer wrapping for GAP functionalities in Sage. In fact, wrapping GAP's monoid functionalities is my primary motivation :-)

With this sage-gap-semantic-interface installed, you can do:

sage: from mygap import mygap
sage: M = mygap.FreeMonoid(2)
sage: m1, m2 = M.monoid_generators()
sage: H = M / [ [ m1^2, m1], [m2^2, m2], [m1*m2*m1, m2*m1*m2]]
sage: H.category()
Category of g a p monoids
sage: H.is_finite()
sage: H.cardinality()

For more examples, see:

Happy to give a hand if you have trouble, though I can't guarantee to be super responsive. Best is to create issues on the github repo.