In Rob's example it would be nice (and good for the students to see) if instead of looping over all g in G to construct conjugate subgroups he could loop over coset representatives of H in G (where H is his representative_subgroup), or (optimal) coset reps of the normalizer of H in G. Now we can already compute HG=H.normalizer(G) in Sage directly, but I cannot see a way of getting a list of coset reps. Presumably Gap can do this, so perhaps wrapping that function would be worthwhile. I did a search_src("transversal") and indeed found (in the file coding/binary_code.pyx) reference to a Gap function RightTransversal.
John Cremona 2008/9/24 Carlo Hamalainen <[EMAIL PROTECTED]>: > > On Wed, Sep 24, 2008 at 7:29 PM, Rob Beezer <[EMAIL PROTECTED]> wrote: >> >> A homework exercise for my students asks them to find all subgroups of >> S_4, which should be a very instructive exercise, even if a bit >> unreasonable. In SAGE, the conjugacy_classes_subgroups() method >> gets you started, and the quick-and-dirty brute-force code below >> creates all possible subgroups by doing the necessary conjugations. > > GAP has code for finding low index subgroups. Here's some Sage code to > find all subgroups up to a certain index in the (3,3,3) triangle > group: > > ################################## > p = 3 > q = 3 > r = 3 > > F = gap.new("FreeGroup(3)") > gens = list(gap.GeneratorsOfGroup(F)) > rho1 = gens[0] > rho2 = gens[1] > rho3 = gens[2] > > triangle_group = F.FactorGroupFpGroupByRels([F.1*F.2*F.3, \ > F.1**p, F.2**q, F.3**r]) > > iter = gap.LowIndexSubgroupsFpGroupIterator(triangle_group, \ > gap.TrivialSubgroup(triangle_group), 30) > > while str(gap.IsDoneIterator(iter)) == 'false': > H = gap.NextIterator(iter) > > nr_points = gap.Index(triangle_group, H) > > G = gap.Image(gap.ActionHomomorphism(triangle_group, \ > gap.RightCosets(triangle_group, H), gap.OnRight)) > > print gap.Order(G) > ################################## > > > I have plans to write a Cython wrapper for LOWX some time, see > http://designtheory.org/~peter/software/lowx/ > > -- > Carlo Hamalainen > http://carlo-hamalainen.net > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---