real point to algebraic point

American Citizen <[email protected]>
Newsgroups gmane.comp.mathematics.pari.user
Message-ID <[email protected]>
Hello everyone:

I believe I have found a way to find the algebraic point for a given 
real point on an elliptic curve.

The first function of the gp pari code is courtesy of Karim Belabas and 
the second function is mine, after I realized using the polynomials from 
polred() and trying combinations of them using polcompositum to create a 
4th degree field would work since all algebraic points on a real 
elliptic curve have x abcissa in degree 2 and y ordinate in degree 4 
(please correct me if I am wrong, but I am talking about elliptic curves 
in Q)

Here's the script:

nfrecognize(nf, z, j = 1) =
{
   my(M = Mat(apply(conjvec, Mod(nf.zk, nf.pol))));
   \\ N.B. we actually have M = nf[5][1]
   my(L = lindep(concat(nf[5][1][j,], z)));
   my(a = L[#L]);
   M=M;
   if (abs(a) != 1, error("Failed to recognize ", z);return(0),);
   if (a == 1, L = -L);
   nfbasistoalg(nf, L[1..-2]);
}

{real_pt_to_alg(Pt)=
my(X,Y,poly_x,poly_y,red_x,red_y,poly_2,poly_4,P,a,b,K,L,M,sztwo,szfour,algpts);
if(type(Pt)!="t_VEC",return([]););
X=Pt[1];
Y=Pt[2];
poly_x=algdep(X,2);
poly_y=algdep(Y,4);
red_x=polred(poly_x);
red_y=polred(poly_y);
poly_2=Set();
poly_4=Set();
\\ work on reduced polys for x first
for(i=1,#red_x,
  if(poldegree(red_x[i])==2,poly_2=setunion(poly_2,[red_x[i]]));
  if(poldegree(red_x[i])==4,poly_4=setunion(poly_4,[red_x[i]]));
);
\\ work on reduced polys for y next
for(i=1,#red_y,
  if(poldegree(red_y[i])==2,poly_2=setunion(poly_2,[red_y[i]]));
  if(poldegree(red_y[i])==4,poly_4=setunion(poly_4,[red_y[i]]));
);
sztwo=#poly_2;
if(sztwo>1,
  for(i=1,sztwo-1,
   for(j=i+1,sztwo,
     [P,a,b]=polcompositum(poly_2[i],poly_2[j],1)[1];
     if(poldegree(P)==4, poly_4=setunion(poly_4,[P]));
   );
  );
);
szfour=#poly_4;
algpts=Set();
for(root=1,4,
   for(i=1,szfour,
     K=nfinit(poly_4[i]);
     L=nfrecognize(K,X,root);
     M=nfrecognize(K,Y,root);
     if((L!=0)&&(M!=0), algpts=setunion(algpts,[[L,M]]));
   );
);
return(algpts);
}

You are welcome to use this, if you need it. And yes, number fields are 
fascinating and fun!

Randall
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.