Ask Your Question

fagui's profile - activity

2020-08-24 16:01:56 -0600 marked best answer Factoring a polynomial over a finite Field

Hello

I'm following a 101 algebra course, and for example, I would like to factor a polynomial on a finite field like F_9 (F_9 == ZZ/9ZZ is a field because 9 is a power of a prime number, 3)

R = PolynomialRing(GF(9),'x')
x = R.gen()
f = x^4+x^2-1
f in R
f.factor()

i get an error message

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

  File "/tmp/tmpYgKq_W/___code___.py", line 3, in <module>
    R = PolynomialRing(GF(_sage_const_9 ),'x')
  File "factory.pyx", line 364, in sage.structure.factory.UniqueFactory.__call__ (build/cythonized/sage/structure/factory.c:1244)
  File "/home/sage/sage-6.3/local/lib/python2.7/site-packages/sage/rings/finite_rings/constructor.py", line 414, in create_key_and_extra_args
    raise ValueError("parameter 'conway' is required if no name given")
ValueError: parameter 'conway' is required if no name given

i'm running sage 6.3 notebook on windows through Oracle VM winbox. I'm a totally new user, and i've looked at the tutorial and the forum but couldn't find any example or reason why this would not work. thank you for your help.

2020-08-24 16:01:53 -0600 received badge  Nice Question (source)
2020-06-25 22:00:00 -0600 asked a question SageMath: defining class of functions on Elliptic Curves

In SageMath,

I would like to manipulate rational functions on elliptic curves (defined on finite fields). For example, for $P = (x,y)$ on some curve $E$

$$f = x+y-12$$ $$g = \frac{x+y-3}{(x-3)^2} $$ etc.

Is there a natural class?

I am looking to make a toy example with pairings, so I need to define stuff like $$P \rightarrow f_P$$ where $$f_P:Q \rightarrow f_P(Q)$$ is a function

I can't see how to do that, and I'm able to make computations if I define

def f (P,Q):
   ....

but I can only compute the values taken by the function $f_P$, I cannot "see" the function $f_P$. Basically I'm trying as an exercise to re-write the following Magma code to SageMath:

http://www.craigcostello.com.au/pairi...

EDIT

My question hasn't attracted much interest so let me give a more concrete example.

Define the following:

# Code related to the example in Costello
q = 47
F = GF(q)
R.<x> = F[]
F4.<u> = F.extension(x^4 - 4*x^2 + 5)
a = 21
b = 15
E = EllipticCurve(F4, [a, b])
r = 17
k = 4
(q^4 - 1) % r  # r = 17 divides q^4 - 1 = 47^4 - 1
P = E([45, 23])
P.order()
h = E.cardinality() / r^2
O = E(0)
Q = E([5*u^3 + 37*u + 13, 7*u^3 + 45*u^2 + 10*u + 7])

def fADD_(P, Q, x, y):
    lamda = (Q[1] - P[1]) / (Q[0] - P[0])
    c = P[1] - lamda * P[0]
    l = (y - (lamda * x + c))
    v = (x - (lamda^2 - P[0] - P[1]))
    return l / v

I would have hoped for fADD_(P, Q, x, y) to return a rational function in x, y.

Instead it raises the following error:

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
/Applications/SageMath-9.1.app/Contents/Resources/sage/local/lib/python3.7/site-packages/sage/structure/coerce.pyx
in sage.structure.coerce.CoercionModel.bin_op
(build/cythonized/sage/structure/coerce.c:9946)()    1195         try:
-> 1196             action = self._action_maps.get(xp, yp, op)    1197         except KeyError:

/Applications/SageMath-9.1.app/Contents/Resources/sage/local/lib/python3.7/site-packages/sage/structure/coerce_dict.pyx
in sage.structure.coerce_dict.TripleDict.get
(build/cythonized/sage/structure/coerce_dict.c:7917)()    1327        
if not valid(cursor.key_id1):
-> 1328             raise KeyError((k1, k2, k3))    1329         value = <object>cursor.value

KeyError: (Finite Field in u of size 47^4, Symbolic Ring, <built-in
function mul>)

During handling of the above exception, another exception occurred:

TypeError                                 Traceback (most recent call
last) <ipython-input-54-7441affd269c> in <module>()
----> 1 fADD_(P,Q,x,y)

<ipython-input-48-20f93738e654> in fADD_(P, Q, x, y)
      2     lamb_da=(Q[Integer(1)]-P[Integer(1)])/(Q[Integer(0)]-P[Integer(0)])
      3     c =P[Integer(1)]-lamb_da*P[Integer(0)]
----> 4     l =(y-(lamb_da*x+c))
      5     v =(x-(lamb_da**Integer(2)-P[Integer(0)]-P[Integer(1)]))
      6     return (l/v)

/Applications/SageMath-9.1.app/Contents/Resources/sage/local/lib/python3.7/site-packages/sage/structure/element.pyx
in sage.structure.element.Element.__mul__
(build/cythonized/sage/structure/element.c:12034)()    1515           
return (<Element>left)._mul_(right)    1516         if
BOTH_ARE_ELEMENT(cl):
-> 1517             return coercion_model.bin_op(left, right, mul)    1518     1519         cdef long value

/Applications/SageMath-9.1.app/Contents/Resources/sage/local/lib/python3.7/site-packages/sage/structure/coerce.pyx
in sage.structure.coerce.CoercionModel.bin_op
(build/cythonized/sage/structure/coerce.c:9996)()    1196            
action = self._action_maps.get(xp, yp, op)    1197         except
KeyError:
-> 1198             action = self.get_action(xp, yp, op, x, y)    1199         if action is not None:    1200             if
(<Action>action)._is_left:

/Applications/SageMath-9.1.app/Contents/Resources/sage/local/lib/python3.7/site-packages/sage/structure/coerce.pyx
in sage.structure.coerce.CoercionModel.get_action
(build/cythonized/sage/structure/coerce.c:16783)()    1725        
except KeyError:    1726             pass
-> 1727         action = self.discover_action(R, S, op, r, s)    1728         action = self.verify_action(action, R, S, op)    1729        
self._action_maps.set(R, S, op, action)

/Applications/SageMath-9.1.app/Contents/Resources/sage/local/lib/python3.7/site-packages/sage/structure/coerce.pyx
in sage.structure.coerce.CoercionModel.discover_action
(build/cythonized/sage/structure/coerce.c:18201)()    1856         """
1857         if isinstance(R, Parent):
-> 1858             action = (<Parent>R).get_action(S, op, True, r, s)    1859             if action is not None:    1860                 return
action

/Applications/SageMath-9.1.app/Contents/Resources/sage/local/lib/python3.7/site-packages/sage/structure/parent.pyx
in sage.structure.parent.Parent.get_action
(build/cythonized/sage/structure/parent.c:19901)()    2475        
action = self._get_action_(S, op, self_on_left)    2476         if
action is None:
-> 2477             action = self.discover_action(S, op, self_on_left, self_el, S_el)    2478     2479         if action is not None:

/Applications/SageMath-9.1.app/Contents/Resources/sage/local/lib/python3.7/site-packages/sage/structure/parent.pyx
in sage.structure.parent.Parent.discover_action
(build/cythonized/sage/structure/parent.c:20878)()    2554            
# detect actions defined by _rmul_, _lmul_, _act_on_, and _acted_upon_ methods    2555                 from .coerce_actions import
detect_element_action
-> 2556                 action = detect_element_action(self, S, self_on_left, self_el, S_el)    2557                 if action is not
None:    2558                     return action

/Applications/SageMath-9.1.app/Contents/Resources/sage/local/lib/python3.7/site-packages/sage/structure/coerce_actions.pyx
in sage.structure.coerce_actions.detect_element_action
(build/cythonized/sage/structure/coerce_actions.c:5026)()
    215     if isinstance(x, ModuleElement) and isinstance(y, Element):
    216         try:
--> 217             return (RightModuleAction if X_on_left else LeftModuleAction)(Y, X, y, x)
    218         except CoercionException as msg:
    219             _record_exception()

/Applications/SageMath-9.1.app/Contents/Resources/sage/local/lib/python3.7/site-packages/sage/structure/coerce_actions.pyx
in sage.structure.coerce_actions.ModuleAction.__init__
(build/cythonized/sage/structure/coerce_actions.c:6778)()
    361         if not isinstance(g, Element) or not isinstance(a, ModuleElement):
    362             raise CoercionException("not an Element acting on a ModuleElement")
--> 363         res = self.act(g, a)
    364         if parent(res) is not the_set:
    365             # In particular we will raise an error if res is None

/Applications/SageMath-9.1.app/Contents/Resources/sage/local/lib/python3.7/site-packages/sage/categories/action.pyx
in sage.categories.action.Action.act
(build/cythonized/sage/categories/action.c:4115)()
    213             5*x
    214         """
--> 215         return self._act_convert(g, x)
    216 
    217     def __invert__(self):

/Applications/SageMath-9.1.app/Contents/Resources/sage/local/lib/python3.7/site-packages/sage/categories/action.pyx
in sage.categories.action.Action._act_convert
(build/cythonized/sage/categories/action.c:3759)()
    169         if parent(x) is not U:
    170             x = U(x)
--> 171         return self._act_(g, x)
    172 
    173     cpdef _act_(self, g, x):

/Applications/SageMath-9.1.app/Contents/Resources/sage/local/lib/python3.7/site-packages/sage/structure/coerce_actions.pyx
in sage.structure.coerce_actions.RightModuleAction._act_
(build/cythonized/sage/structure/coerce_actions.c:8600)()
    629             g = <Element?>self.connecting._call_(g)
    630         if self.extended_base is not None:
--> 631             a = <ModuleElement?>self.extended_base(a)
    632         return (<ModuleElement>a)._lmul_(<Element>g)  # a * g
    633 

/Applications/SageMath-9.1.app/Contents/Resources/sage/local/lib/python3.7/site-packages/sage/structure/parent.pyx
in sage.structure.parent.Parent.__call__
(build/cythonized/sage/structure/parent.c:9218)()
    898         if mor is not None:
    899             if no_extra_args:
--> 900                 return mor._call_(x)
    901             else:
    902                 return mor._call_with_args(x, args, kwds)

/Applications/SageMath-9.1.app/Contents/Resources/sage/local/lib/python3.7/site-packages/sage/structure/coerce_maps.pyx
in sage.structure.coerce_maps.DefaultConvertMap_unique._call_
(build/cythonized/sage/structure/coerce_maps.c:4556)()
    159                 print(type(C), C)
    160                 print(type(C._element_constructor), C._element_constructor)
--> 161             raise
    162 
    163     cpdef Element _call_with_args(self, x, args=(), kwds={}):

/Applications/SageMath-9.1.app/Contents/Resources/sage/local/lib/python3.7/site-packages/sage/structure/coerce_maps.pyx
in sage.structure.coerce_maps.DefaultConvertMap_unique._call_
(build/cythonized/sage/structure/coerce_maps.c:4448)()
    154         cdef Parent C = self._codomain
    155         try:
--> 156             return C._element_constructor(x)
    157         except Exception:
    158             if print_warnings:

/Applications/SageMath-9.1.app/Contents/Resources/sage/local/lib/python3.7/site-packages/sage/symbolic/ring.pyx
in sage.symbolic.ring.SymbolicRing._element_constructor_
(build/cythonized/sage/symbolic/ring.cpp:6648)()
    377         elif isinstance(x, (RingElement, Matrix)):
    378             if x.parent().characteristic():
--> 379                 raise TypeError('positive characteristic not allowed in symbolic computations')
    380             exp = x
    381         elif isinstance(x, Factorization):

TypeError: positive characteristic not allowed in symbolic
computations
2020-06-04 20:55:14 -0600 received badge  Notable Question (source)
2020-05-26 03:58:23 -0600 received badge  Notable Question (source)
2020-04-28 11:40:58 -0600 received badge  Famous Question (source)
2020-04-22 01:09:18 -0600 received badge  Notable Question (source)
2020-02-07 02:26:41 -0600 received badge  Popular Question (source)
2020-01-14 12:04:27 -0600 received badge  Notable Question (source)
2019-12-16 17:17:31 -0600 received badge  Popular Question (source)
2019-08-29 07:45:25 -0600 received badge  Famous Question (source)
2019-08-11 21:40:59 -0600 received badge  Notable Question (source)
2019-06-26 13:37:21 -0600 received badge  Famous Question (source)
2019-04-14 11:47:21 -0600 received badge  Popular Question (source)
2019-04-03 13:30:43 -0600 received badge  Popular Question (source)
2019-01-08 01:43:56 -0600 received badge  Famous Question (source)
2018-08-29 05:59:47 -0600 received badge  Popular Question (source)
2018-05-18 18:36:34 -0600 received badge  Notable Question (source)
2018-04-04 05:18:14 -0600 received badge  Notable Question (source)
2018-04-04 05:18:14 -0600 received badge  Popular Question (source)
2018-02-27 12:49:14 -0600 received badge  Popular Question (source)
2018-02-27 12:49:14 -0600 received badge  Notable Question (source)
2018-02-16 03:55:53 -0600 received badge  Popular Question (source)
2018-02-12 11:11:09 -0600 received badge  Notable Question (source)
2017-07-20 00:54:49 -0600 received badge  Famous Question (source)
2017-03-08 02:32:07 -0600 commented answer n-torsion subgroups on Elliptic Curves defined on some field

thank you very much, i need some time to digest it all, because i'm a beginner/amateur in this topic. i don't really understand what f and g are.

2017-02-17 09:02:43 -0600 received badge  Enthusiast
2017-02-10 02:52:38 -0600 commented answer Elliptic Curves defined over Z/nZ rings for general n

i think they should be well understood to some extent. there are the basis of some powerful popular methods for integer factorization or proving that a large number is prime for example.

2017-02-09 19:12:10 -0600 commented question Elliptic Curves defined over Z/nZ rings for general n

do you see a way around that ?

2017-02-09 09:25:57 -0600 asked a question Elliptic Curves defined over Z/nZ rings for general n

An Elliptic curve is the union of its affine part Eaff(Z/nZ)={ [x,y,1] in P2(Z/nZ) such that y2 =x3+ax+b } and the point at infinity O = [0,1,0]

P2(Z/nZ) is the projective plane:

T = { (x,y,z) in (Z/nZ)^3 such that gcd(x,y,z,n) = 1}

P2(Z/nZ) = (T / ~) where ~ is the equivalence relation defined by (x,y,z) ~ (x0,y0,z0) iff there is an INVERSIBLE element u in Z/nZ ⇤ such that (x,y,z) = u(x0,y0,z0).

I found those doc pages

http://fe.math.kobe-u.ac.jp/icms2010-...

http://doc.sagemath.org/html/en/refer...

I think to define an Elliptic Curve here with

q=10
E1 = EllipticCurve(Zmod(q),[0,1])
E1

Elliptic Curve defined by y^2 = x^3 + 1 over Ring of integers modulo 10

but

E1.points()

is not working. is there a method to get all the points of this Elliptic Curve ? its cardinality etc ????

2017-02-08 09:38:37 -0600 received badge  Associate Editor (source)
2017-02-08 08:26:56 -0600 asked a question n-torsion subgroups on Elliptic Curves defined on some field

if E an elliptic is defined on K, then E[n] is a subgroup of an Elliptic curve defined on an algebraic closure of K, its the set of points P of this curve whose order is dividing n

G = E.torsion_subgroup() gives the torsion subgroup in E(K), but is there a method giving the E[n] ?

For example, for the Elliptic Curve y^2=x^3-2 defined on Q

if we denote by alpha the cubic root of 2 and J a complex cubic root of unity, and O the point at infinity

E[2] = {O,(alpha,0), (alpha * J,0),(alpha * J^2,0)}

I tried the following

E = EllipticCurve(CC,[0,-2])

O = E(0)

O.division_points(2)

and got [pretty close but not the right result, and not in an algebraic form anyway]

 [(0.000000000000000 : 1.00000000000000 : 0.000000000000000),
 (1.25992104989487 : 0.000000000000000 : 1.00000000000000)]

thanks

2016-12-03 10:58:15 -0600 commented answer Action of a permutation on a list (and other objects)

@tmonteil could you have a second look please ? thanks

2016-11-29 02:43:02 -0600 marked best answer using GAP: Group Theory

I'm trying this code base on the book "Adventures in Group Theory" from D.Joyner

MS=MatrixSpace(GF(2),3,3) 
A=MS([0,1,0,1,0,0,0,0,1]) 
B=MS([1,0,0,0,0,1,0,1,0])
G=MatrixGroup([A,B]) G1=SymmetricGroup(3)
imG=G._gap_().IsomorphismPermGroup().Image(G._gap_())
imG

Sym( [ 2 .. 4 ] )

gens=imG.GeneratorsOfGroup()
gens

[ (3,4), (2,3) ]

G2=PermutationGroup([(3,4),(2,3)])
G2.is_isomorphic(G1)

True

However, there seems to be a signature problem the following commands don't work: (the first one was from the book, I tried myself the second one)

G2=PermutationGroup(gens)

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

File "/private/var/folders/gm/z065gk616xg6g0xgn4c7_bvc0000gn/T/tmpHRYMWK/___code___.py", line 2, in <module> exec compile(u'G2=PermutationGroup(gens) File "", line 1, in <module>

File "/Applications/SageMath/local/lib/python2.7/site-packages/sage/groups/perm_gps/permgroup.py", line 343, in PermutationGroup raise TypeError("gens must be a tuple, list, or GapElement") TypeError: gens must be a tuple, list, or GapElement

G2=PermutationGroup(list(gens))

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

File "/private/var/folders/gm/z065gk616xg6g0xgn4c7_bvc0000gn/T/tmpOxJAnr/___code___.py", line 2, in <module> exec compile(u'G2=PermutationGroup(list(gens)) File "", line 1, in <module>

File "/Applications/SageMath/local/lib/python2.7/site-packages/sage/groups/perm_gps/permgroup.py", line 345, in PermutationGroup canonicalize=canonicalize, category=category) File "/Applications/SageMath/local/lib/python2.7/site-packages/sage/groups/perm_gps/permgroup.py", line 419, in __init__ for cycle in x: TypeError: 'sage.libs.gap.element.GapElement_Permutation' object is not iterable

I cannot make much of the documentation. Thanks.

2016-11-27 05:03:15 -0600 commented answer Action of a permutation on a list (and other objects)

thank you , but you are not really answering to my question. There are 24 edge facets and 24 corner facets, and i want to see the 2 natural projections of p on S(24) _r_action doesn't work on P

2016-11-27 04:17:35 -0600 marked best answer Eigenspaces of a matrix defined on GF(2)

what is wrong with the eigenspaces method here? thank you for your help

MS=MatrixSpace(GF(2),16,16)
A=MS([
[1,1,0,1,1,0,0,0,0,0,0,0,1,0,0,0],
[1,1,1,0,0,1,0,0,0,0,0,0,0,1,0,0],
[0,1,1,1,0,0,1,0,0,0,0,0,0,0,1,0],
[1,0,1,1,0,0,0,1,0,0,0,0,0,0,0,1],
[1,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0],
[0,1,0,0,1,1,1,0,0,1,0,0,0,0,0,0],
[0,0,1,0,0,1,1,1,0,0,1,0,0,0,0,0],
[0,0,0,1,1,0,1,1,0,0,0,1,0,0,0,0],
[0,0,0,0,1,0,0,0,1,1,0,1,1,0,0,0],
[0,0,0,0,0,1,0,0,1,1,1,0,0,1,0,0],
[0,0,0,0,0,0,1,0,0,1,1,1,0,0,1,0],
[0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,1],
[1,0,0,0,0,0,0,0,1,0,0,0,1,1,0,1],
[0,1,0,0,0,0,0,0,0,1,0,0,1,1,1,0],
[0,0,1,0,0,0,0,0,0,0,1,0,0,1,1,1],
[0,0,0,1,0,0,0,0,0,0,0,1,1,0,1,1]])

p=A.charpoly()
p.factor()

(x + 1)^16

A.eigenspaces()

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

File "/private/var/folders/gm/z065gk616xg6g0xgn4c7_bvc0000gn/T/tmpZNvlMy/___code___.py", line 2, in <module> exec compile(u'A.eigenspaces() File "", line 1, in <module>

File "sage/structure/element.pyx", line 413, in sage.structure.element.Element.__getattr__ (/Applications/SageMath/src/build/cythonized/sage/structure/element.c:4531) File "sage/structure/misc.pyx", line 259, in sage.structure.misc.getattr_from_other_class (/Applications/SageMath/src/build/cythonized/sage/structure/misc.c:1771) AttributeError: 'sage.matrix.matrix_mod2_dense.Matrix_mod2_dense' object has no attribute 'eigenspaces'

A.rank()

16

2016-11-27 03:46:50 -0600 edited question Action of a permutation on a list (and other objects)

Hi, i'm a beginner user in Sage and I am currently trying to do a few exercises about the Rubik's Cube from the book "Adventures in Group Theory" from D. Joyner

from a general move on the rubik cube (defined as a permutation of its 48 facets) i want to define its restriction to the subset of corner (or edge) facets.

rubik=CubeGroup() 
r=rubik.R()
l=rubik.L()
r*l^(-1)

(1,40,41,17)(3,38,43,19)(4,37,44,20)(5,36,45,21)(6,35,46,22)(8,33,48,24)\ (9,14,16,11)(10,12,15,13)(25,27,32,30)(26,29,31,28)

corner_list=[1,3,6,8,9 ,11,14,16,17,19,22,24,25,27,30,32,33,35,38,40,41,43,46,38]
edge_list  =[2,4,5,7,10,12,13,15,18,20,21,23,26,28,29,31,34,36,37,39,42,44,45,47]

basically i would like to look at the action of this permutation on those lists, and i should have for the corners (1,40,41,17)(3,38,43,19)( 6,35,46,22 )(8,33,48,24)(9,14,16,11)(25,27,32,30)

and for the edges (4,37,44,20)(5,36,45,21)(10,12,15,13)(26,29,31,28)

i see there is a method called _r_action but it doesn't look like its working here

(r*l^(-1))._r_action(corner_list)

Traceback (click to the left of this block for traceback) ... AttributeError: 'sage.groups.perm_gps.permgroup_element.PermutationGroupElement' object has no attribute '_r_action'

I guess another way of doing it would be to define a (surjective) homomorphism from S(48) into S(edges) and S(corners) but i don't know how to do it

EDIT: i am trying a solution along these lines by trying to define an homomorphism. lets try with a simpler example

G=SymmetricGroup(5)
G.gens()

[(1,2,3,4,5), (1,2)]

H=PermutationGroup([(3,4,5),(3,4)])
phi = PermutationGroupMorphism_im_gens(G, H,[(3,4,5),()])
phi

Permutation group morphism: From: Symmetric group of order 5! as a permutation group To: Permutation Group with generators [(3,4), (3,4,5)] Defn: [(1,2,3,4,5), (1,2)] -> [(3,4,5), ()]

g=G([(1,2,3,4,5)]) 
g

(1,2,3,4,5)

phi(g)

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_68.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -- coding: utf-8 --\n" + _support_.preparse_worksheet_cell(base64.b64decode("cGhpKGcp"),globals())+"\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in <module> File "/private/var/folders/gm/z065gk616xg6g0xgn4c7_bvc0000gn/T/tmpg7JGoB/___code___.py", line 2, in <module> exec compile(u'phi(g) File "", line 1, in <module> File "/Applications/SageMath/local/lib/python2.7/site-packages/sage/groups/perm_gps/permgroup_morphism.py", line 136, in __call__ return self.image(g) File "/Applications/SageMath/local/lib/python2.7/site-packages/sage/groups/perm_gps/permgroup_morphism.py", line 115, in image G = self._gap_().Image(J) File "/Applications/SageMath/local/lib/python2.7/site-packages/sage/interfaces/interface.py", line 632, in __call__ return self._obj.parent().function_call(self._name, [self._obj] + list(args), kwds) File "/Applications/SageMath/local/lib/python2.7/site-packages/sage/interfaces/gap.py", line 921, in function_call res = self.eval(marker+cmd) File "/Applications/SageMath/local/lib/python2.7/site-packages/sage/interfaces/gap.py", line 573, in eval result = Expect.eval(self, input_line, **kwds) File "/Applications/SageMath/local/lib/python2.7/site-packages/sage/interfaces/expect.py", line 1239, in eval for L in code.split('\n') if L != '']) File "/Applications/SageMath/local/lib/python2.7/site-packages/sage/interfaces/gap.py", line 771, in _eval_line raise RuntimeError(message) RuntimeError: Gap produced error output Error, usage: Image(<map>), Image(<map>,<elm>), Image(<map>,<coll>)

executing __SAGE_LAST__:="__SAGE_LAST__";;Image($sage20,$sage19);;

I think i tried the same syntax than here http://doc.sagemath.org/html/en/refer...

surely i must have done something wrong , but what ?

thanks