Ask Your Question

AreaMan's profile - activity

2017-10-18 05:23:17 +0200 received badge  Famous Question (source)
2017-01-17 20:53:17 +0200 received badge  Notable Question (source)
2017-01-17 20:53:17 +0200 received badge  Popular Question (source)
2015-07-19 23:09:08 +0200 answered a question Gap Length error when Length not called

I resolved this by making the group into a permutation group:

H = gap.SmallGroup(order,i);
G = PermutationGroup(gap_group = gap.Image(gap.IsomorphismPermGroup(H)));
2015-07-19 22:23:02 +0200 asked a question Gap Length error when Length not called

Running the code below gives me an error:

Sg = [];
G = gap.SmallGroup(12,3);
for g in G:
        Sg.append(g);
Sg;

Error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_4.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("U2cgPSBbXTsKRyA9IGdhcC5TbWFsbEdyb3VwKDEyLDMpOwpmb3IgZyBpbiBHOgogICAgICAgIFNnLmFwcGVuZChnKTsKU2c7"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>

  File "/private/var/folders/1p/k79gxccd5r538784rqx_15fh0000gt/T/tmpc0eEFP/___code___.py", line 5, in <module>
    for g in G:
  File "/Applications/Sage-6.5.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/interfaces/interface.py", line 642, in __iter__
    for i in range(1, len(self)+1):
  File "/Applications/Sage-6.5.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/interfaces/gap.py", line 1014, in __len__
    return int(self.Length())
  File "/Applications/Sage-6.5.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/interfaces/interface.py", line 588, in __call__
    return self._obj.parent().function_call(self._name, [self._obj] + list(args), kwds)
  File "/Applications/Sage-6.5.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/interfaces/gap.py", line 896, in function_call
    ['%s=%s'%(key,value.name()) for key, value in kwds.items()])))
  File "/Applications/Sage-6.5.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/interfaces/gap.py", line 570, in eval
    result = Expect.eval(self, input_line, **kwds)
  File "/Applications/Sage-6.5.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/interfaces/expect.py", line 1224, in eval
    for L in code.split('\n') if L != ''])
  File "/Applications/Sage-6.5.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/interfaces/gap.py", line 769, in _eval_line
    raise RuntimeError(message)
RuntimeError: Gap produced error output
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 1st choice method found for `Length' on 1 arguments

   executing Length($sage3);

How can I fix this?

I want to do elementary operations and comparisons with elements of the GAP group G, and then store them in a list and do further comparisons.

2015-07-19 20:48:51 +0200 commented answer How to call GAPs SmallGroup from sage? (I am getting an error, though the correct library is installed.)

Thanks - that worked perfectly.

2015-07-19 20:48:43 +0200 received badge  Scholar (source)
2015-07-19 19:11:29 +0200 received badge  Editor (source)
2015-07-19 19:10:44 +0200 commented answer How to call GAPs SmallGroup from sage? (I am getting an error, though the correct library is installed.)

Hi Nathann,

When I run 'sage -i database_gap' I get an error which I will add to my original question because it is too long to post here.

2015-07-19 03:47:06 +0200 asked a question How to call GAPs SmallGroup from sage? (I am getting an error, though the correct library is installed.)

I am trying to call GAP's SmallGroup program from within SAGE.

When I run gap_console(); from Sage I have the banner that indicates the SmallGroup library is present:

Components: small 2.1, small2 2.0, small3 2.0, small4 1.0, small5 1.0, small6 1.0, small7 1.0, small8 1.0, small9 1.0, small10 0.2, id2 3.0, id3 2.1, id4 1.0, id5 1.0, id6 1.0, id9 1.0, id10 0.1, prim 2.1 loaded. Packages: CTblLib 1.1.3 loaded.

Moreover, I can use SmallGroup from within this session of GAP run in SAGE.

The problem is that when I try to run SmallGroup from within SAGE (via gap.SmallGroup(12,3) for instance)

I get the error copied below, which suggests that SmallGroups is not installed in GAP (even though it is):

What can I do?

I loaded the version of GAP that I downloaded seperately instead of the one that came with SAGE via the commands:

import sage.interfaces.gap sage.interfaces.gap.gap_cmd = "/usr/bin/gap -r"

Thank you very much!

RuntimeError Traceback (most recent call last) in () ----> 1 gap.SmallGroup(Integer(12),Integer(3));

/usr/local/SAGE/sage-6.5/local/lib/python2.7/site-packages/sage/interfaces/interface.pyc in call(self, args, *kwds) 561 562 def call(self, args, *kwds): --> 563 return self._parent.function_call(self._name, list(args), kwds) 564 565 def _sage_doc_(self):

/usr/local/SAGE/sage-6.5/local/lib/python2.7/site-packages/sage/interfaces/gap.pyc in function_call(self, function, args, kwds) 894 self.eval('SAGE_LAST := %s;;'%marker) 895 res = self.eval("%s(%s)"%(function, ",".join([s.name() for s in args]+ --> 896 ['%s=%s'%(key,value.name()) for key, value in kwds.items()]))) 897 if self.eval('last') != marker: 898 return self.new('last')

/usr/local/SAGE/sage-6.5/local/lib/python2.7/site-packages/sage/interfaces/gap.pyc in eval(self, x, newlines, strip, split_lines, *kwds) 568 if not input_line.endswith(';'): 569 input_line += ';' --> 570 result = Expect.eval(self, input_line, *kwds) 571 if not newlines: 572 result = result.replace("\n","")

/usr/local/SAGE/sage-6.5/local/lib/python2.7/site-packages/sage/interfaces/expect.pyc in eval(self, code, strip, synchronize, locals, allow_use_file, split_lines, *kwds) 1222 elif split_lines: 1223 return '\n'.join([self._eval_line(L, allow_use_file=allow_use_file, *kwds) -> 1224 for L in code.split('\n') if L != '']) 1225 else: 1226 return self._eval_line(code, allow_use_file=allow_use_file, **kwds)

/usr/local/SAGE/sage-6.5/local/lib/python2.7/site-packages/sage/interfaces/gap.pyc in _eval_line(self, line, allow_use_file, wait_for_prompt, restart_if_needed) 767 return '' 768 else: --> 769 raise RuntimeError(message) 770 771 except KeyboardInterrupt:

RuntimeError: Gap produced error output Error, the Small Groups library is required but not installed executing SmallGroup(sage1,sage2);

-------------

Update:

Running ./sage -i database_gap gives this error:

Found local metadata for database_gap-4.7.5 Attempting to download package database_gap-4.7.5

Trying to download http://www.sagemath.org/packages/upst... [Traceback (most recent call last): File "", line 35, in File "/Applications/Sage-6.5 ...

(more)