Volker, Thanks for the workaround. What gets me is that it works in an older version of sage.
On Friday, April 18, 2014 9:17:16 AM UTC-7, Volker Braun wrote: > > The problem is that we don't have an algorithm to find out that the group > is finite (short of generating all elements). So it is placed in the > "Groups" category instead of "FiniteGroups", and that doesn't have an > iterator. There should be an in-between category of finitely generated > groups which provides the iterator. In any case, a workaround is: > > sage: list(TransitiveIdeal(lambda x:[g*x for g in G4.gens()], [G4.one()])) > [ [1 0] [ w 0] [ 1 -w - 1] [ w 1] [ 0 -w - 1] > [ [0 1], [w + 1 1], [ 0 w], [w + 1 0], [ -1 w], > > [-w - 1 w] [ 1 -w] [ w w + 1] [-w - 1 -1] > [ w w + 1], [ 0 -w - 1], [w + 1 -w], [ w 0], > > [ -w 0] [ 0 1] [ 0 w] [ w + 1 -w] [ -w -1] > [-w - 1 -1], [-1 0], [ -1 w + 1], [ -w -w - 1], [-w - 1 0], > > [ -1 w + 1] [ 0 w + 1] [-w - 1 0] [ -w -w - 1] > [ 0 -w], [ 1 -w], [ w 1], [-w - 1 w], > > [w + 1 1] [ -1 w] [ 0 -1] [w + 1 0] [-1 0] > [ -w 0], [ 0 w + 1], [ 1 0], [ -w -1], [ 0 -1], > > [ 0 -w] ] > [ 1 -w - 1] ] > > > On Friday, April 18, 2014 4:08:16 PM UTC+1, Ben Cote wrote: >> >> I am trying to get sage to list the elements of a (finite) finitely >> generated matrix group. >> >> It works in version 5.9 installed on a Mac, but not on 6.1.1 on linux or >> on the cloud, which leads me to believe somewhere between 5.9 and 6.1.1 the >> .list() operation for finite matrix groups was compromised. I just was >> hoping to bring this to the attention of someone who might repair it for >> future versions. >> >> Here is the code: >> >> x=polygen(QQ,'x') >> E.<w>=NumberField(x^2+x+1,'w') >> >> r=matrix([[w,0],[-w^2,1]]) >> s=matrix([[1,w^2],[0,w]]) >> >> >> G4 = MatrixGroup([r,s]) >> l = G4.list() # returns the elements of G as a list >> >> Here is the error from the cloud: >> >> Traceback (most recent call last): >> File >> "/projects/00f50bac-d0a4-44e5-b456-34ae18b9117d/.sagemathcloud/sage_server.py", >> line 733, in execute >> exec compile(block+'\n', '', 'single') in namespace, locals >> File "", line 1, in <module> >> File "parent.pyx", line 822, in sage.structure.parent.Parent.__getattr__ >> (sage/structure/parent.c:6997) >> File "misc.pyx", line 251, in sage.structure.misc.getattr_from_other_class >> (sage/structure/misc.c:1606) >> AttributeError: 'FinitelyGeneratedMatrixGroup_generic_with_category' object >> has no attribute 'list' >> >> >> Here is the error from 6.11 on a linux machine: >> >> AttributeError Traceback (most recent call >> last) >> <ipython-input-9-a6e94ecf7e4a> in <module>() >> ----> 1 G4.list() >> >> /opt/sage-6.1.1-x86_64-Linux/local/lib/python2.7/site-packages/sage/structure/parent.so >> >> in sage.structure.parent.Parent.__getattr__ (sage/structure/parent.c:6997)() >> >> /opt/sage-6.1.1-x86_64-Linux/local/lib/python2.7/site-packages/sage/structure/misc.so >> >> in sage.structure.misc.getattr_from_other_class >> (sage/structure/misc.c:1606)() >> >> AttributeError: 'FinitelyGeneratedMatrixGroup_generic_with_category' >> object has no attribute 'list' >> >> >> And as I said before, it works and "l" prints the list of 24 matrices on >> the 5.9 version on a mac. >> >> Also, 5.9 says that type(G4) is >> >> <class >> 'sage.groups.matrix_gps.finitely_generated.FinitelyGeneratedMatrixGroup_gens_with_category'> >> But the cloud and 6.1.1 say >> <class >> 'sage.groups.matrix_gps.finitely_generated.FinitelyGeneratedMatrixGroup_generic_with_category'> >> >> >> -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.