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()
True
sage: H.cardinality()
6

For more examples, see: https://github.com/nthiery/sage-gap-semantic-interface/edit/master/mygap.py

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.