Hi Bruce!
(Simon: there is a question for you at the bottom)
On Fri, May 06, 2011 at 11:19:03AM -0700, Bruce wrote:
> I would appreciate some advice on constructing the monoid algebra of
> an infinite monoid. I hope this is appropriate forum and I apologise
> if I have missed this in the documentation.
This definitely is the right place.
> I am confused about the similarities and differences between class
> inheritance and parents/ categories. Another source of confusion is
> that since CombinatorialFreeModule was introduced a number of
> approaches to this problem are now deprecated.
Yup. Things are improving, but there is still some non trivial cleanup ahead.
> In case this request seems vague and difficult to respond to here is
> the example I have in mind in more detail.
Thanks.
> The monoid I have in mind is the monoid of heaps of pieces. Let G be a
> set with a reflexive transitive relation (whose elements are called
> pieces). Then a heap is a finite poset (P,<) together with a map P ->
> G. There are conditions which are not relevant here. There is a
> multiplication map which makes this a monoid; again the details are
> not relevant here.
>
> As far as I know posets are mutable but at least for the heaps I am
> interested in I know how to make them immutable so hash and
> CombinatorialFreeModule etc. are available.
Unlike graphs, posets are right away immutable. So you can do:
sage: F = CombinatorialFreeModule(QQ, Objects())
sage: P = posets.RandomPoset(3, 1/2)
sage: Q = posets.RandomPoset(4, 1/3)
sage: F.term(P) + 2 * F.term(Q)
B[Finite poset containing 3 elements] + 2*B[Finite poset containing 4
elements]
> In summary, the set G (with the relation) determines an infinite
> monoid. Then given a (commutative) ring R the free R-module on this
> monoid is an R-algebra. What is the right framework for implementing
> this in sage?
> 4) Has anyone written a tutorial giving instructions on what exactly you do
> to implement a structure?
Implement the monoid, following the example given in:
sage: M = Monoids().example()
sage: M??
See also the in-development tutorial:
http://combinat.sagemath.org/doc/reference/sage/categories/tutorial.html
> 1) I have not found MonoidAlgebras although I know this is around.
Once you have the monoid, you just have to do:
sage: A = M.algebra(QQ)
and it will give you its monoid algebra. Note: I am assuming you are
implementing the monoid as a multiplicative monoid. At this point,
monoids algebras for additive monoids are only implemented in the
Sage-Combinat queue.
> 3) I would expect a group algebra to be a Hopf algebra and a monoid
> algebra to be a bialgebra. However it appears that they are just
> algebras.
Group algebras constructed as above (and not GroupAlgebra which will
eventually be deprecated, see [1]) are already group algebras:
sage: G = GL(3, QQ)
sage: A = G.algebra(QQ)
sage: A.categories()
[Category of group algebras over Rational Field, ...
Category of hopf algebras with basis over Rational Field, ...
sage: A.an_element()
B[[6/5]]
sage: A.an_element().coproduct()
B[[6/5]] # B[[6/5]]
sage: A.an_element().antipode()
B[[5/6]]
Monoid algebras are not yet bialgebras, but that would be trivial to
implement by just moving up the coproduct code from
Groups().Algebras(). Just for confirmation: for a monoid, you just
want the same coproduct as for a group?
Incidentaly, I am mathematically interested in learning more about
where/how the bialgebra structure of monoid algebras is used.
> A secondary question: does sage have any support for working with
> algebras with relations?
Simon King is working on that, see [2]. This has been also discussed
elsewhere on this list; you may want to make a search for "letterplace".
> 2) I have tried C.category_graph().show() and this works but what
> comes up is illegible I think the directed graph is calculated
> correctly as C.category_graph().level_sets() is fine.
This is definitely a spot for using graphviz. Assuming you have
graphviz and dot2tex installed (see
sage.graphs.generic_graph.GenericGraph.layout_graphviz?), you can do:
sage: C = Monoids().Algebras(QQ)
sage: G = C.category_graph()
sage: G.set_latex_options(format="dot2tex")
sage: view(G, viewer="pdf", tightpage=True)
Good luck!
Best,
Nicolas
[1] http://trac.sagemath.org/sage_trac/ticket/11318
[2] http://trac.sagemath.org/sage_trac/ticket/7797
PS: Do you mind posting a summary of this message as an answer to your
question on sage-support?
--
Nicolas M. ThiƩry "Isil" <[email protected]>
http://Nicolas.Thiery.name/
--
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.