As far as I know you cannot check associativity in this naive way.

For a start, nowhere in your code do you use the equation of the
curve.  If that is (say) y^2=x^3+a*x+b, then your equation will only
be correct modulo the relations y1^2=x1^3+a*x1+b and so on.

However, even with that I don't think that this can be verified using
pure computer algebra.  Recall that the actual group law is not
defined only by the rule you are using (addition of points with
distinct x coordinates) since you need to take into account the fact
that your equation is really projective, and the group law is defined
differently on different patches.

I once had an interesting conversation about exactly this with Don
Zagier.  He told me something interesting and relevant to this
discussionm but it was 10 years ago and I cannot remember.  It would
be fun to look into exactly why the approach does not work.

John Cremona

On 09/01/2008, achrzesz <[EMAIL PROTECTED]> wrote:
>
> Hello
> My question is
> connected with   file http://modular.fas.harvard.edu/ent/ent_py
> and especially with checking the associativity law of addition on ell.
> curves.
> When I was trying to perform the same calculations in Sage I observed
> some surprising (me) behaviour.
> Enclosed is the corresponding Sage code.
>
> # the first 12 lines of code  is modyfied version of
> # http://modular.fas.harvard.edu/ent/ent_py
> # necessary changes seem to be inessential
>
> x1 = var('x1'); x2 = var('x2'); x3 = var('x3')
> y1 = var('y1'); y2 = var('y2'); y3 = var('y3')
> a  = var('a'); b  = var('b')
> lambda12 = (y1 - y2)/(x1 - x2)
> x4       = (lambda12*lambda12 - x1 - x2)
> nu12     = (y1 - lambda12*x1)
> y4       = (-lambda12*x4 - nu12)
> lambda23 = ((y2 - y3)/(x2 - x3))
> x5       = (lambda23*lambda23 - x2 - x3)
> nu23     = (y2 - lambda23*x2)
> y5       = (-lambda23*x5 - nu23)
> s1 =(x1 - x5)*(x1 - x5)*((y3 - y4)*(y3 - y4) - (x3 + x4)*(x3 - x4)*(x3
> - x4))
> s2 = (x3 - x4)*(x3 - x4)*((y1 - y5)*(y1 - y5) - (x1 + x5)*(x1 -
> x5)*(x1 - x5))
>
>
> #the code below looks reasonable but gives wrong result; I wonder why?
>
> t1=s1.factor()
> t2=s2.factor()
> R=QQ[x1,x2,x3,y1,y2,y3]
> print R(t1.denominator())==R(t2.denominator())   # True
> #denominators of s1,s2 are equal, so let's compare numerators
> print R(t1.numerator())==R(t2.numerator())    # False (in Sage 2.9)
>
>
> I would be grateful for any comments.
> Is there an easy way to check the mentioned associativity in Sage?
> A. Chrzeszczyk
>
>
> >
>


-- 
John Cremona

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to