Thanks for the other command. I am writing a tutorial for my university and am running into quite a few of these little gotcha's with these sort of things.
-- D. M. Monarres <dmmonar...@gmail.com> On Tue, Jan 18, 2011 at 8:28 PM, John H Palmieri <jhpalmier...@gmail.com>wrote: > On Jan 18, 7:30 pm, "D. M. Monarres" <dmmonar...@gmail.com> wrote: > > Hello all, > > > > Running into an issue with something. I must be missing something. Say I > > construct two groups that I know are isomorphic. > > > > sage: G = SymmetricGroup(5) > > sage: r = G('(1,2,5,4,3)') > > sage: s = G('(1,5),(3,4)') > > sage: H = G.subgroup([r,s]) > > sage: H > > Subgroup of SymmetricGroup(5) generated by [(1,2,5,4,3), (1,5)(3,4)] > > sage: D = DihedralGroup(5) > > sage: D > > Dihedral group of order 10 as a permutation group > > > > I get an TypeError when I try and construct a homomorphism between these > two > > groups. > > sage: phi = D.hom( ['(1,2,5,4,3)', '(1,5)(3,4)'] , H) > > > --------------------------------------------------------------------------- > > TypeError Traceback (most recent call > last) > > > > /Users/ayeq/Dropbox/src/sdsu-sage-tutorial/<ipython console> in > <module>() > > > > > /Users/ayeq/sage/local/lib/python2.6/site-packages/sage/structure/parent_ge > ns.so > > in sage.structure.parent_gens.ParentWithGens.hom > > (sage/structure/parent_gens.c:3858)() > > > > > /Users/ayeq/sage/local/lib/python2.6/site-packages/sage/categories/homset.p > yc > > in __call__(self, x, y, check, on_basis) > > 432 return self.element_class_set_morphism(self, x) > > 433 > > --> 434 raise TypeError, "Unable to coerce x (=%s) to a morphism > in > > %s"%(x,self) > > 435 > > 436 @lazy_attribute > > > > TypeError: Unable to coerce x (=['(1,2,5,4,3)', '(1,5)(3,4)']) to a > morphism > > in Set of Morphisms from Dihedral group of order 10 as a permutation > group > > to Subgroup of SymmetricGroup(5) generated by [(1,2,5,4,3), (1,5)(3,4)] > in > > Category of finite permutation groups > > > > I have tried to do this in a few different ways. (by coercing the > elements > > first, etc...) Can somebody see what I am missing? Thank you in advance. > > This looks like a bug to me, but I'm not sure. Anyway, you can do > this: > > sage: PermutationGroupMorphism(D, H, D.gens(), H.gens()) > Homomorphism : Dihedral group of order 10 as a permutation group --> > Subgroup of SymmetricGroup(5) generated by [(1,2,5,4,3), (1,5)(3,4)] > > (I don't know why "D.hom(H.gens(), H)" doesn't do the same thing...) > > -- > John > > -- > To post to this group, send email to sage-support@googlegroups.com > To unsubscribe from this group, send email to > sage-support+unsubscr...@googlegroups.com<sage-support%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/sage-support > URL: http://www.sagemath.org > -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org