John Cremona on Wed, 25 Sep 2013 10:40:10 +0200

 Re: halving points on elliptic curve

```I implemented this carefully in Sage, dividing by an arbitrary
positive integer, and you are (obviously) welcome to look at the code
there.  You need to be very careful, in your case, about dealing wioth
2-torsion since clearly 2(P+T)=2P when 2T=0.  I see that in your
example the curve does have some 2-torsion, so this might be the
problem.

John

On 25 September 2013 09:03, somayeh didari <somayeh_didari@yahoo.com> wrote:
> thanks for your help, I wrote this program, which take elliptic curve e over
> the rational points and a point Q in e and returns (1/2)Q:
> halve(e,Q)={
> x_0=Q[1];
> Half=[];
> f=x^4-e.b4*x^2-2*e.b6*x-e.b8-x_0*(4*x^3+e.b2*x^2+2*e.b4*x+e.b6);
> g=factor(f);
> v=[];
>   for(i=1,#g~,
> if(poldegree(g[i,1])==1,
> v=concat(v,-polcoeff(g[i,1],0)/polcoeff(g[i,1],1));
>     );
> );
> for(i=1,#v~,
> x=v[i];
> y=ellordinate(e,x)[1];
> if(ellpow(e,[x,y],2)==Q,
> Half=concat(Half,[[x,y]]);
> );
> if(ellpow(e,[x,-1*y],2)==Q,
> Half=concat(Half,[[x,-1*y]]);
> );
> );
> }
> It works! But there is a problem, when I use
> e=ellinit([0,0,0,-1563056672958141,0]);
> P_1=[48408867,194361588954];
> P_2=[48432972,194700535386];
> halve(e,Q);
> Then Half will be [], as I want. but when I use
> Q1=ellpow(e,Q,2)
> halve(e,Q1)
> Q1=Half[1]
> halve(e,Q1);
>
> Pari doesn't work. But we now Q1=Q! Why???????Is there an algorithm which
> computes (1/2)Q?
>
> somayeh didari

```