Ask Your Question
1

Using GAP in Sage and reusing the results

asked 2022-03-09 08:41:27 +0100

updated 2022-03-12 18:08:28 +0100

slelievre gravatar image

I need to run some program in GAP and use the output in another program in Sage.

I tried running gap_console() and then running "a := 1;" in GAP.

After exiting that console and going gack to Sage, my calculations were lost.

When I asked the value of "a" in Sage, I got:

NameError: name "a" is not defined.

Is there any command in Sage to solve this problem?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-03-09 15:00:20 +0100

slelievre gravatar image

To use GAP within Sage and reuse its results in the Sage session, use libgap.

Example:

sage: a = libgap(1)
sage: a
1
sage: parent(a)
C library interface to GAP
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

Stats

Asked: 2022-03-09 08:38:44 +0100

Seen: 208 times

Last updated: Mar 12 '22