How to connect Magma_free, SAGE and GAP (problem concerning a MAGMA string not readable by GAP)?
Hi,
I'd like to ask the following:
I'd like to use SAGE in order to compute something with the free magma online calculator and then convert it into a GAP object. Unfortunately, there occurs an error, and I don't know, how to fix this. Any help is very much appreciated.
I followed the example on page 91 of http://www.math.rwth-aachen.de/~Thoma...
Here is what I did:
sage: gap.LoadPackage('"ctbllib"');
sage: ct=magma_free("G:=Alt(5);ct:=CharacterTable(G);ct;")
sage: tmpdir = gap.DirectoryTemporary()
sage: file=gap.Filename(tmpdir, '"magmatable"')
sage: gap.FileString(file,ct)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-5-fd546564c72c> in <module>()
----> 1 gap.FileString(file,ct)
/opt/sage/local/lib/python2.7/site-packages/sage/interfaces/interface.pyc in __call__(self, *args, **kwds)
627
628 def __call__(self, *args, **kwds):
--> 629 return self._parent.function_call(self._name, list(args), kwds)
630
631 def _instancedoc_(self):
/opt/sage/local/lib/python2.7/site-packages/sage/interfaces/gap.pyc in function_call(self, function, args, kwds)
921
922 """
--> 923 args, kwds = self._convert_args_kwds(args, kwds)
924 self._check_valid_function_name(function)
925
/opt/sage/local/lib/python2.7/site-packages/sage/interfaces/interface.pyc in _convert_args_kwds(self, args, kwds)
530 for i, arg in enumerate(args):
531 if not isinstance(arg, InterfaceElement) or arg.parent() is not self:
--> 532 args[i] = self(arg)
533 for key, value in iteritems(kwds):
534 if not isinstance(value, InterfaceElement) or value.parent() is not self:
/opt/sage/local/lib/python2.7/site-packages/sage/interfaces/interface.pyc in __call__(self, x, name)
278
279 if isinstance(x, string_types):
--> 280 return cls(self, x, name=name)
281 try:
282 return self._coerce_from_special_method(x)
/opt/sage/local/lib/python2.7/site-packages/sage/interfaces/expect.pyc in __init__(self, parent, value, is_name, name)
1443 except (RuntimeError, ValueError) as x:
1444 self._session_number = -1
-> 1445 raise_(TypeError, TypeError(*x.args), sys.exc_info()[2])
1446 except BaseException:
1447 self._session_number = -1
/opt/sage/local/lib/python2.7/site-packages/sage/interfaces/expect.pyc in __init__(self, parent, value, is_name, name)
1438 else:
1439 try:
-> 1440 self._name = parent._create(value, name=name)
1441 # Convert ValueError and RuntimeError to TypeError for
1442 # coercion to work properly.
/opt/sage/local/lib/python2.7/site-packages/sage/interfaces/interface.pyc in _create(self, value, name)
474 def _create(self, value, name=None):
475 name = self._next_var_name() if name is None else name
--> 476 self.set(name, value)
477 return name
478
/opt/sage/local/lib/python2.7/site-packages/sage/interfaces/gap.pyc in set(self, var, value)
1387 """
1388 cmd = ('%s:=%s;;' % (var, value)).replace('\n','')
-> 1389 self._eval_line(cmd, allow_use_file=True)
1390
1391 def get(self, var, use_file=False):
/opt/sage/local/lib/python2.7/site-packages/sage/interfaces/gap.pyc in _eval_line(self, line, allow_use_file,
wait_for_prompt, restart_if_needed)
787 return ''
788 else:
--> 789 raise RuntimeError(message)
790
791 except KeyboardInterrupt:
TypeError: Gap terminated unexpectedly while reading in a large line:
Gap produced error output
Syntax error: ; expected in /home/boehmler/.sage/temp/mahlzahn/8255/interface/\
tmp8325 line 1
\$sage2:=Character Table of Group G-------------------------------------------\
----------Class | 1 2 3 4 5Size | 1 15 20 12 12Order | 1 2\
3 5 5---------------------------p = 2 1 1 3 5 4p = 3 1\
2 1 5 4p = 5 1 2 3 1 1---------------------------X.1 + \
1 1 1 1 1X.2 + 3 -1 0 Z1 Z1#2X.3 + 3 -1 0 Z1#2 Z1X.4 \
+ 4 0 1 -1 -1X.5 + 5 1 -1 0 0Explanation of Character Valu\
e Symbols--------------------------------------# denotes algebraic conjugation\
, that is,#k indicates replacing the root of unity w by w^kZ1 = (Cyclotomi\
cField(5: Sparse := true)) ! [ RationalField() | 0, 0, -1, -1 ];;
^
executing Read("/home/boehmler/.sage/temp/mahlzahn/8255/interface/tmp8325");
sage: