Ask Your Question
0

Accessing GAP's in function through the C Interface

asked 2017-02-05 17:24:58 +0100

jaebond gravatar image

updated 2017-06-27 18:57:17 +0100

Is there a way to access GAP's in function through Sage's C Interface to GAP?

gap> Identity(G) in G;
true

EDIT:

I was wondering how to call this from Sage:

sage: G = libgap.SymmetricGroup(5)
sage: g = libgap.eval('(1,2,3)(4,5)')

How do I test if g is in G?

edit retag flag offensive close merge delete

Comments

What is G?

vdelecroix gravatar imagevdelecroix ( 2017-03-10 01:19:26 +0100 )edit
1

\in is membership test. Another form of calling it would be \in( Identity(G), G );. It does not matter in this example what is G, but if you need something for the test, try e.g.\in((1,2),SymmetricGroup(3));.

alexander konovalov gravatar imagealexander konovalov ( 2017-04-03 21:47:18 +0100 )edit

Edited to clarify that I wanted to call this from Sage.

jaebond gravatar imagejaebond ( 2017-06-27 18:57:59 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-07-13 23:17:10 +0100

vdelecroix gravatar image

This might be what you want

sage: G = libgap.SymmetricGroup(5)
sage: g = libgap.eval('(1,2,3)(4,5)')
sage: getattr(g, '\\in')(G)
true
sage: g = libgap.eval('(1,2,3)(4,5,6)')
sage: getattr(g, '\\in')(G)
false
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-02-05 17:24:58 +0100

Seen: 387 times

Last updated: Jul 13 '17