Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You haven't told Pari that the point [r,s] actually does lie on E. So pari at this point really just fills in the generic formula with the parameters you've given. The general machinery in Sage is a little more picky (although the computation it does is the same). The good thing is that by the time you're done explaining the situation to sage, it will know that s^2=(r^3-3267*r+45630) and it can use that to simplify the expression more than pari does (note s occurs to higher powers in the answer that pari gives).

sage: E=EllipticCurve([-3267,45630])
sage: k.<B>=NumberField(x^2-17)
sage: kr.<r>=FunctionField(k);
sage: krS.<S>=kr[]
sage: R.<s>=krS.quo(S^2-(r^3-3267*r+45630))
sage: P=E(R)(-15/2+27/2*B,0)
sage: Q=E(R)(r,s)
sage: P,Q
((27/2*B - 15/2 : 0 : 1), (r : s : 1))
sage: P+Q
(((27/2*B - 15/2)*r - 405*B + 3042)/(r - 27/2*B + 15/2) : ((-1215/2*B + 12393/2)/(-r^2 + (27*B - 15)*r + 405/2*B - 6309/2))*s : 1)

As you can see, we need to define 3 fields (plus a polynomial ring to create the relevant function field) before we can properly talk about the points P and Q in the first place, but after that it's smooth sailing. And the formula you get is better simplified than what you'd obtain from pari.