Implement P.divide(n) for P a point on an elliptic curve and n an integer. This will:
- try to find an explicit point Q defined over the same field as P such that n*Q == P.
- If no such Q exists, raise a ValueError.
Also, implement P.is_divisible_by(n) trivially in terms of the above, and document
the connection between the two functions. Also, have both implemented in terms of
a third function that just finds the polynomial whose root is x(Q), so we
can implement is_divisible_by more efficiently.
An algorithm to do this is described at the end of section 3 of
http://wstein.org/papers/kolyconj/
If you see this ticket and think of doing this, please immediately contact me (wstein@gmail.com) before, since I'm planning on doing this very soon.