libGap Error

20 views
Skip to first unread message

Neda

unread,
Jan 1, 2014, 2:07:10 PM1/1/14
to sage-s...@googlegroups.com

Hello, I use this for computing automorphism group:

G = SymmetricGroup(3)

H
= libgap(G).AutomorphismGroup()

but when I want to compute order of automorphism group, I cant compute and I have this error:

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

  File "/tmp/tmpm9uLkv/___code___.py", line 5, in <module>
    exec compile(u'
H.order()
 
File "", line 1, in <module>

 
File "element.pyx", line 1867, in sage.structure.element.RingElement.order (sage/structure/element.c:15911)
 
File "element.pyx", line 1873, in sage.structure.element.RingElement.additive_order (sage/structure/element.c:15968)
NotImplementedError
what should I do?

Nils Bruin

unread,
Jan 1, 2014, 2:25:46 PM1/1/14
to sage-s...@googlegroups.com
On Wednesday, January 1, 2014 11:07:10 AM UTC-8, Neda wrote:

Hello, I use this for computing automorphism group:

G = SymmetricGroup(3)

H
= libgap(G).AutomorphismGroup()

but when I want to compute order of automorphism group, I cant compute and I have this error: 

In the future, please include the command that led to the error. In this case it seems to be "H.order()".

Unfortunately, by explicitly asking for libgap(G), you have chosen to work directly with gap objects, so you'll have to talk Gap to them to get results, and Gap tends to capitalize its commands:

sage: H.Order()
6

In general one could try to get back into sage-land, but in this case you get an informative error

sage: H.sage()
NotImplementedError: cannot construct equivalent Sage object

The fact that H.order even exists seems a bit of an accident:

sage: H.order?
Type:       builtin_function_or_method
String Form:<built-in method order of sage.libs.gap.element.GapElement object at 0x56747d0>
Definition: H.order(self)
Docstring:
   Return the additive order of self.

   This is deprecated; use "additive_order" instead.

   EXAMPLES:

      sage: a = Integers(12)(5)
      sage: a.order()
      doctest... DeprecationWarning: The function order is deprecated for ring elements; use additive_order or multiplicative_order instead.
      See http://trac.sagemath.org/5716 for details.
      12

Reply all
Reply to author
Forward
0 new messages