Ask Your Question

How to load and use a PARI/GP script in Sage notebook?

asked 2012-03-17 10:21:26 +0100

Nadori gravatar image

Take for example the script What I do is copying the script to a txt file and name it Then I go to my sage notebook and choose above the option 'gp'. In the first block I write "\r filename" where filename is the whole path of the file (so C:....\ and evaluate it. If you go to the link you see a function tate_pairing_alg with input an elliptic curve, two points on it and an integer. Therefore I define (over $\mathbb{F}_5$) e = ellinit([0,0,0,4,0]*Mod(1,5)) P1= [2,4] P2=[1,0]

Now I do tate_pairing_alg(e, P1, P2, 4), the answer is

* at top-level: tatepairing.tate_pairing_alg(e,P ^-------------------- ** not a function in function call

If you see me doing things wrongly please let me know it :-) Thanks

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2012-03-18 15:45:34 +0100

William Stein gravatar image

updated 2014-10-16 20:13:37 +0100


as illustrated here and in SageMathCloud.

edit flag offensive delete link more

answered 2012-03-18 10:36:34 +0100

pipedream gravatar image


This works for me in sage4.8

I put this in one cell and choose gp at the top of the worksheet:

\r /home/jan/Downloads/ e = ellinit([0,0,0,4,0]*Mod(1,5)) P1= [2,4] P2=[1,0] tate_pairing_alg(e, P1, P2, 4)

The answer is

Mod(4, 5)

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


Asked: 2012-03-17 10:21:26 +0100

Seen: 1,259 times

Last updated: Oct 16 '14