\\ \\ nna.gp \\ \\ Rational points of curve \\ C_n: x^3+y^3=n \\ E_n: y^2=x^3-432n^2 \\ \\ 3-isogeny E^_n of E_n \\ E^_n: y^2=x^3+27*432n^2 \\ ec(n)=ellinit([0,0,0,0,-432*n^2]); \\ elltors(ec(n))=[O] if n>2 and n is cubefree ec2(n)=ellinit([0,0,0,0,27*432*n^2]); \\ elltors(ec2(n))=[[0,108*n].[0,-108*n],O] hh(P,n)= { local(X,X2,X3,T,T2,e2); e2=ec2(n); T=[0,108*n]; T2=[0,-108*n]; X=pa(P); X2=elladd(e2,X,T); X3=elladd(e2,X,T2); [factor(ph([x,y],n)[1]-X[1]), factor(ph([x,y],n)[1]-X2[1]), factor(ph([x,y],n)[1]-X3[1])] } nn(P)= { local(x,y,z); if(length(P)==2, z=1, z=P[3] ); x=P[1]; y=P[2]; (x^3+y^3)/z^3 } \\ \\ pt(e,P)=ellchangepoint-inv(P,ellglobalred(e)[2]) \\ gen(e,P)= { local(x,y,s,a,b,c,d); s=ellglobalred(e)[2]; a=s[1]; b=s[2]; c=s[3]; d=s[4]; z=1; if(length(P)==3, z=P[3] ); x=P[1]/z*a^2+b; y=(P[2]/z*a^3+d-c*b)+c*x; [x,y] } \\ \\ phi_n: E_n ---> E^_n \\ [x,y]--->[(x^3-4*3*432*n^2)/x^2,y*(x^3+8*3*432*n^2)/x^3] \\ \\ phi^_n: E^_n ---> E_n \\ [x~,y~]--->[(x~^3+4*9*432*n^2)/(9*x~^2),y~*(x~^3-4*9*432*n^2)/(27*x~^3)] \\ ph(p,n)= { local(x,y,q); q=pa(p); x=q[1]; y=q[2]; [(x^3-4*432*n^2)/x^2,y*(x^3+8*432*n^2)/x^3] } ps(p,n)= { local(x,y,q); q=pa(p); x=q[1]; y=q[2]; [(x^3+4*27*432*n^2)/(9*x^2),y*(x^3-8*27*432*n^2)/(27*x^3)] } \\ \\ [X:Y:Z] --> [x/z,y/z] \\ pa(p)= { local(x,y,z); if(length(p)==3 && p[3]!=0, x=p[1]; y=p[2]; z=p[3]; [x/z,y/z], p ) } \\ \\ [x,y] ---> [X:Y:Z] \\ pp(p)= { local(x,y,z); if(length(p)==2, x=p[1]; y=p[2]; z=lcm(denominator(x),denominator(y)); x=x*z; y=y*z; d=abs(gcd(z,gcd(x,y))); if(d>1, x=x/d; y=y/d; z=z/d ); [x,y,z], p ) } \\ \\ f: C_n --> E_n \\ (x,y)-->(X,Y) \\ X=12*n/(x+y) \\ Y=36*n*(x-y)/(x+y) \\ f(p)= { local(x,y,X,Y,n,q); q=pa(p); if(length(q)==2, x=q[1]; y=q[2]; n=x^3+y^3; X=12*n/(x+y); Y=36*n*(x-y)/(x+y); [X,Y], if(length(q)==3 && q[3]==0, [0], [] ) ) } \\ \\ g: E_n --> C_n \\ (X,Y) --> (x,y) \\ x=(36*n+Y)/(6*X) \\ y=(36*n-Y)/(6*X) \\ g(p)= { local(x,y,X,Y,n2,n,q); q=pa(p); if(length(q)==2, X=q[1]; Y=q[2]; n2=(X^3-Y^2)/432; if(n2 > 0 && denominator(n2)==1, n=sqrtint(n2); if(n^2==n2, x=(36*n+Y)/(6*X); y=(36*n-Y)/(6*X); [x,y], [] ) ), if(p==[0], [1,-1,0] ) ) } \\ \\ \\ iscubefree(n)= { local(x,k,l,m); x=factor(n); l=matsize(x); k=l[1]; m=l[2]; for(i=1,k, if(x[i,2]>=3, return(0) ) ); return(1); } gg(p)=pp(g(pa(p))); ff(p)=pp(f(pa(p))); gg2(p)= { local(x,y,z,q,n2,n); if(length(p)==3, z=p[3], z=1 ); if(z!=0, x=p[1]/z; y=p[2]/z; n2=(x^3-y^2)/432; if(n2 > 0 && denominator(n2)==1, n=sqrtint(n2); print("n=",n), print("error") ) ); q=pp(g(pa(p))); if(length(q)==3, print("[",q[1]," : ",q[2]," : ",q[3],"]"), print(q) ); q } \\ \\ cond(n1,n2) \\ cond(n1,n2)= { local(e); for(i=n1,n2, if(iscubefree(i), e=ec(i); print("conductor(E_{",i,"})=",ellglobalred(e)[1]) ) ) } \\ \\ analytic rank r of elliptic curve E \\ r(e2,s)= { local(L1,L2,e); e=ellchangecurve(e2,ellglobalred(e2)[2]); L1=elllseries(e,s); L2=elllseries(e,s^2-s+1); (L2-L1)/((s-1)*L1) } \\ \\ L'(e,1) where s=1+\epsilon \\ lseries1(e2,s)= { local(L1,L2,e); e=ellchangecurve(e2,ellglobalred(e2)[2]); L1=elllseries(e,1); L2=elllseries(e,s); (L2-L1)/(s-1) } \\ \\ print conductor(E_{n}) \\ prcond(n1,n2)= { local(e); for(i=n1,n2, if(iscubefree(i), e=ec(i); print("cond(E_{",i,"})=",ellglobalred(e)[1]) ) ) } prrank(n1,n2)= { local(e); for(i=n1,n2, if(iscubefree(i), e=ec(i); print1("E_{",i,"}=", [e.a1, e.a2, e.a3, e.a4, e.a6]); print(" ; r(e,1.0001)=", r(e, 1.0001)) ) ) }