On Thu, Sep 11, 2008 at 9:16 PM, Rob Beezer <[EMAIL PROTECTED]> wrote: > > I'm trying to compute the "product" of a couple of subgroups (the aim > being to build a set that is not a subgroup). My students know the > symmetries of a tetrahedron. Following code results in errors. I can > change the final line to variations that are not useful (like just > printing g and h individually) and the errors go away. Any > thoughts on how to make this work?
This is a bug that we are tracking here: http://trac.sagemath.org/sage_trac/ticket/4105 Here is a workaround: tetra=AlternatingGroup(4) stab1=PermutationGroup_subgroup(tetra, ["(1,2,3)"]) stab4=PermutationGroup_subgroup(tetra, ["(2,3,4)"]) for g in stab1: for h in stab4: print tetra(g)*tetra(h) () (2,3,4) (2,4,3) (1,2,3) (1,3)(2,4) (1,4,3) (1,3,2) (1,4,2) (1,2)(3,4) > Thanks, > Rob > > Code: > > tetra=AlternatingGroup(4) > stab1=PermutationGroup_subgroup(tetra, ["(1,2,3)"]) > stab4=PermutationGroup_subgroup(tetra, ["(2,3,4)"]) > for g in stab1: > for h in stab4: > print g*h > > Errors: > > Traceback (most recent call last): print (g*h) > File "/opt/sage-3.0/local/lib/python2.5/site-packages/sympy/ > plotting/", line 3, in <module> > > File "element.pyx", line 1082, in > sage.structure.element.MonoidElement.__mul__ (sage/structure/element.c: > 7301) > File "coerce.pyx", line 286, in > sage.structure.coerce.CoercionModel_cache_maps.bin_op_c (sage/ > structure/coerce.c:5177) > File "permgroup_element.pyx", line 463, in > sage.groups.perm_gps.permgroup_element.PermutationGroupElement._r_action > (sage/groups/perm_gps/permgroup_element.c:3239) > File "permgroup_element.pyx", line 254, in > sage.groups.perm_gps.permgroup_element.PermutationGroupElement.__init__ > (sage/groups/perm_gps/permgroup_element.c:1726) > File "/opt/sage-3.0/local/lib/python2.5/site-packages/sage/groups/ > perm_gps/permgroup_named.py", line 130, in __init__ > raise ValueError, "n (=%s) must be >= 1"%n > ValueError: n (=0) must be >= 1 > > > > -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---