Great! Thanks Travis! I posted your answer on ask.sagemath.org as well. 2013/11/2, Travis Scrimshaw <tsc...@ucdavis.edu>: > Hey Vincent, > Well, I can solve the question by using reduced expressions from the > Coxeter presentation: > > sage: S3 = SymmetricGroup(3) > sage: SGA = GroupAlgebra(S3, QQ) > sage: MS = MatrixSpace(QQ,2) > sage: mtx = [MS([[0,-1],[1,-1]]), MS([[1,-1],[0,-1]])] > sage: phi = SGA.module_morphism(lambda x: MS.prod(mtx[i-1] for i in > x.reduced_word()), codomain=MS) # -1 for indexing > sage: H = Hom(S3, MG) > sage: psi = H(lambda x: MG.prod(MG.gen(i-1) for i in x.reduced_word())) > > > sage: kappa = SGA.module_morphism(lambda x: MS(psi(x)), codomain=MS) # An > alternative implementation which induces from the group morphism > sage: elt = SGA.gen(0) + SGA.gen(1); elt > (1,2) + (1,2,3) > sage: kappa(elt) > [-1 -1] > [ 0 0] > > > There is a more subtle issue of defining a group morphism by generators, > the group elements have to know how to express themselves in terms of the > generators. If there was a function for doing that, then the above approach > > would work. For the symmetric group (perhaps even finite groups) at least, > one might be able to brute force it, i.e. construct the corresponding > Cayley graph and take a minimal length path from the identity: > > sage: G = S3.cayley_graph(generators=S3.gens()) > > sage: path = G.shortest_path(S3.one(), prod(S3.gens())); path > [(), (1,2,3), (2,3)] > > sage: labels = [G.edge_label(path[i], path[i+1]) for i in > range(len(path)-1)]; labels > [(1,2,3), (1,2)] > > sage: map(lambda x: list(S3.gens()).index(x), labels) > [0, 1] > > > Although it might be worthwhile to wrap all of the above in some method on > finite (semi)group elements reduced_word_on_generators(S3.gens()) (or some > other name that doesn't necessarily conflict with reduced_word()). > > Best, > Travis > > > -- > 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/groups/opt_out. >
-- 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/groups/opt_out.