How do I implement a Gap function I wrote in a gap cell in cloudsage?

asked 2015-06-18 16:11:45 -0500

Chetak gravatar image

updated 2015-06-18 17:15:15 -0500

calc314 gravatar image

I have written the following code in a cell:

OnChains:= function( c, g )
    local i, k;
    for i in [1..Length(c)] do
        k[i] := OnSetsSets(c[i], g);
  return k;

But when I try and run

G.orbit(Set(K[0]), action = "OnChains")

in a sage cell, I get:

Error in lines 1-1
Traceback (most recent call last):
  File "/projects/b5d3c63b-a07d-41ae-905b-350044f6bb95/.sagemathcloud/", line 879, in execute
    exec compile(block+'\n', '', 'single') in namespace, locals
  File "", line 1, in <module>
  File "sage/misc/cachefunc.pyx", line 1896, in sage.misc.cachefunc.CachedMethodCaller.__call__ (build/cythonized/sage/misc/cachefunc.c:11488)
    w = self._cachedmethod._instance_call(self._instance, *args, **kwds)
  File "sage/misc/cachefunc.pyx", line 2552, in sage.misc.cachefunc.CachedMethod._instance_call (build/cythonized/sage/misc/cachefunc.c:14934)
    return self._cachedfunc.f(inst, *args, **kwds)
  File "/projects/sage/sage-6.7/local/lib/python2.7/site-packages/sage/groups/perm_gps/", line 1208, in orbit
    raise NotImplementedError("This action is not implemented (yet?).")
NotImplementedError: This action is not implemented (yet?).

Can someone help me implement my custom group action?

edit retag flag offensive close merge delete


Help us help you: provide some complete minimal code. Give us G and K.

slelievre gravatar imageslelievre ( 2015-06-19 06:32:44 -0500 )edit

You need %gap in each cell with GAP code.

slelievre gravatar imageslelievre ( 2015-06-19 08:54:44 -0500 )edit

Looks to me like the call G.orbit(Set(K[0]), action = "OnChains") is a Sage command which refers to some Sage to GAP interface, which implements only support for standard types of actions. If you want to use own OnChains action, you may have to make a direct call of a GAP command (e.g. Orbit(G, Set(K[0]), OnChains);) instead of using the Sage interface.

alexander konovalov gravatar imagealexander konovalov ( 2015-06-24 05:22:54 -0500 )edit