ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 03 Feb 2011 09:16:06 -0600Is it possible to run over the isomorphism classes of groups?http://ask.sagemath.org/question/7914/is-it-possible-to-run-over-the-isomorphism-classes-of-groups/I want to check if a certain statement is correct about groups, but it is very hard to check it by hand (and even harder to prove). Is it possible to run over isomorphism classes of groups (for any specific cardinality), so as to check that statement?Sun, 30 Jan 2011 14:00:44 -0600http://ask.sagemath.org/question/7914/is-it-possible-to-run-over-the-isomorphism-classes-of-groups/Answer by kcrisman for <p>I want to check if a certain statement is correct about groups, but it is very hard to check it by hand (and even harder to prove). Is it possible to run over isomorphism classes of groups (for any specific cardinality), so as to check that statement?</p>
http://ask.sagemath.org/question/7914/is-it-possible-to-run-over-the-isomorphism-classes-of-groups/?answer=12049#post-id-12049I don't think this is easy, or even possible, to do in native Sage. The GAP [AllSmallGroups](http://www.gap-system.org/Manuals/doc/htm/ref/CHAP048.htm#SSEC007.2) function might be helpful - you can access GAP by doing `gap_console()` in the Sage command line, choosing 'gap' from the system choices in the notebook, or doing `sage -gap` when you lauch Sage.
However, I don't think this is wrapped in Sage at this time.Mon, 31 Jan 2011 03:59:18 -0600http://ask.sagemath.org/question/7914/is-it-possible-to-run-over-the-isomorphism-classes-of-groups/?answer=12049#post-id-12049Comment by Dima for <p>I don't think this is easy, or even possible, to do in native Sage. The GAP <a href="http://www.gap-system.org/Manuals/doc/htm/ref/CHAP048.htm#SSEC007.2">AllSmallGroups</a> function might be helpful - you can access GAP by doing <code>gap_console()</code> in the Sage command line, choosing 'gap' from the system choices in the notebook, or doing <code>sage -gap</code> when you lauch Sage.</p>
<p>However, I don't think this is wrapped in Sage at this time.</p>
http://ask.sagemath.org/question/7914/is-it-possible-to-run-over-the-isomorphism-classes-of-groups/?comment=22203#post-id-22203don't refer to that site as official GAP docs, please...Wed, 02 Feb 2011 16:35:43 -0600http://ask.sagemath.org/question/7914/is-it-possible-to-run-over-the-isomorphism-classes-of-groups/?comment=22203#post-id-22203Comment by Dima for <p>I don't think this is easy, or even possible, to do in native Sage. The GAP <a href="http://www.gap-system.org/Manuals/doc/htm/ref/CHAP048.htm#SSEC007.2">AllSmallGroups</a> function might be helpful - you can access GAP by doing <code>gap_console()</code> in the Sage command line, choosing 'gap' from the system choices in the notebook, or doing <code>sage -gap</code> when you lauch Sage.</p>
<p>However, I don't think this is wrapped in Sage at this time.</p>
http://ask.sagemath.org/question/7914/is-it-possible-to-run-over-the-isomorphism-classes-of-groups/?comment=22202#post-id-22202http://www.gap-system.org/Doc/doc.html is the official and much more complete source. It has a full index: http://www.gap-system.org/Manuals/doc/htm/theindex.htm, where you find AllSmallGroups documented at http://www.gap-system.org/Manuals/doc/htm/ref/CHAP048.htm#SSEC007.2Wed, 02 Feb 2011 16:39:19 -0600http://ask.sagemath.org/question/7914/is-it-possible-to-run-over-the-isomorphism-classes-of-groups/?comment=22202#post-id-22202Comment by kcrisman for <p>I don't think this is easy, or even possible, to do in native Sage. The GAP <a href="http://www.gap-system.org/Manuals/doc/htm/ref/CHAP048.htm#SSEC007.2">AllSmallGroups</a> function might be helpful - you can access GAP by doing <code>gap_console()</code> in the Sage command line, choosing 'gap' from the system choices in the notebook, or doing <code>sage -gap</code> when you lauch Sage.</p>
<p>However, I don't think this is wrapped in Sage at this time.</p>
http://ask.sagemath.org/question/7914/is-it-possible-to-run-over-the-isomorphism-classes-of-groups/?comment=22200#post-id-22200Okay, done.Thu, 03 Feb 2011 02:23:08 -0600http://ask.sagemath.org/question/7914/is-it-possible-to-run-over-the-isomorphism-classes-of-groups/?comment=22200#post-id-22200Answer by Dima for <p>I want to check if a certain statement is correct about groups, but it is very hard to check it by hand (and even harder to prove). Is it possible to run over isomorphism classes of groups (for any specific cardinality), so as to check that statement?</p>
http://ask.sagemath.org/question/7914/is-it-possible-to-run-over-the-isomorphism-classes-of-groups/?answer=12056#post-id-12056in order to use GAP's AllSmallGroups function, you need to install the optional spkg database_gap-4.4.12.p0
e.g. by starting sage, and issuing, the sage prompt, the command
install_package('database_gap-4.4.12.p0')
It does not matter whether or not it is wrapped in Sage, as long one does everything at GAP prompt.
In the worst case one can do something like
sage: gg=gap('AllSmallGroups(4)')
although this would create a list of objects Sage might have problems dealing with, e.g. they need not be permutation groups.
You can still do e.g.
sage: g=gg[1]
sage: g.IsAlternatingGroup()
false
Wed, 02 Feb 2011 05:13:37 -0600http://ask.sagemath.org/question/7914/is-it-possible-to-run-over-the-isomorphism-classes-of-groups/?answer=12056#post-id-12056Comment by Dima for <p>in order to use GAP's AllSmallGroups function, you need to install the optional spkg database_gap-4.4.12.p0
e.g. by starting sage, and issuing, the sage prompt, the command </p>
<p>install_package('database_gap-4.4.12.p0')</p>
<p>It does not matter whether or not it is wrapped in Sage, as long one does everything at GAP prompt.
In the worst case one can do something like </p>
<p>sage: gg=gap('AllSmallGroups(4)')</p>
<p>although this would create a list of objects Sage might have problems dealing with, e.g. they need not be permutation groups.
You can still do e.g.</p>
<p>sage: g=gg[1]</p>
<p>sage: g.IsAlternatingGroup()</p>
<p>false</p>
http://ask.sagemath.org/question/7914/is-it-possible-to-run-over-the-isomorphism-classes-of-groups/?comment=22201#post-id-22201AllSmallGroups documented at http://www.gap-system.org/Manuals/doc/htm/ref/CHAP048.htm#SSEC007.2Wed, 02 Feb 2011 16:40:01 -0600http://ask.sagemath.org/question/7914/is-it-possible-to-run-over-the-isomorphism-classes-of-groups/?comment=22201#post-id-22201Answer by Simon King for <p>I want to check if a certain statement is correct about groups, but it is very hard to check it by hand (and even harder to prove). Is it possible to run over isomorphism classes of groups (for any specific cardinality), so as to check that statement?</p>
http://ask.sagemath.org/question/7914/is-it-possible-to-run-over-the-isomorphism-classes-of-groups/?answer=12058#post-id-12058I think after "install_package", you also need to do
sage: gap_reset_workspace()
and restart Sage (at least that is how it worked for me).
Then, you can do:
sage: for G in gap.AllSmallGroups(64):
....: if G.Centre().Order()==1:
....: raise RuntimeError
....: else:
....: print G.IdGroup()[2],
....:
1 2 3 4 5 6 ... 267
I guess, if you know GAP, that you will understand what the commands above do. And if you need to transform the groups into something Sage knows about (permutation groups and matrix groups), you can do:
PermutationGroup(G.IsomorphismPermGroup().Image().GeneratorsOfGroup())
where G is a group defined in the GAP interface. Unfortunately I don't know how to transform a group into a matrix group, in GAP.
Best regards,
SimonThu, 03 Feb 2011 09:16:06 -0600http://ask.sagemath.org/question/7914/is-it-possible-to-run-over-the-isomorphism-classes-of-groups/?answer=12058#post-id-12058