TITLE: Identifying elements in the kernel of an explicit endomorphism of a Jacobian variety
QUESTION [5 upvotes]: I hope this question fits here.
Let $H/k$ be a genus $2$ curve and $J$ its Jacobian variety. Since $J(k)\cong \text{Pic}^0(H)(k)$ we have that its generic point looks like $[(x_1,y_1)+(x_2,y_2)-2\infty]\in J$. In Mumford coordinates we can see it as $g:=\langle x^2 
-Ax + B,Cx+D\rangle:=\langle u(x),v(x)\rangle\in J$ with $u(x_i)=0$ and $v(x_i)=y_i$. This means that $A:=x_1+x_2, B:=x_1x_2, C:=\tfrac{y_1-y_2}{x_1-x_2}, D:=\tfrac{x_2y_1-x_1y_2}{x_1-x_2}$. 
I calculated explicitly an element $\gamma\in\text{End}_k(J)$ using Mumford coordinates for the generic point, that is $\gamma(g)=<x^2 + \tfrac{A_1(g)}{A_2(g)}x + \tfrac{B_1(g)}{B_2(g)}, \tfrac{C_1(g)}{C_2(g)}x + \tfrac{ D_1(g)}{D_2(g)}>$ where $A_1,A_2,B_1,B_2,C_1,C_2,D_1,D_2\in k[J]$. 
To formulate my question, note that since the endomorphism $\gamma$ works fine for the generic point, and  $J$ has dimension $2$, we have that if for some $D\in J(k)$, its image under $\gamma$, namely $\gamma(D)$ is of the form $[(x_1,y_1)-\infty]$, then $\gamma$ won't be defined for $D$, since some of the denominators will be zero. 
How can I distinguish when $\gamma(D)$ is 0 or when it is non-zero non-generic of the form $[(\tilde x,\tilde y)-\infty]$?
I know I could use a constant divisor $D_0$ and calculate $\gamma(D+D_0)$ when $\gamma(D)$ is not defined and then subtract with $\gamma(D_0)$ using Cantor addition. However, in my situation this is not possible since I am testing if $k$ is a field using some arithmetic geometry. I want to be able to use the functions defining $\gamma$ over $\mathbb{Q}$ to distinguish the situation of $\gamma(D)$ being $[0]$ or being of the form $[(\tilde x,\tilde y)-\infty]$
I have noted that when the ALL the denominators are 0, it looks like the image  0 in fact, but when it lies in the "theta divisor", (the image is a point of the form $[(x_1,y_1)-\infty]$), some of the denominators are non-zero. However I do not know how to distinguish this formally or maybe my examples are just "lucky" examples.
Is there a way with this information to distinguish when $\gamma(D)$ is exactly [0] ? 
What I did
I tried to calculate the formula of $\gamma$ using MAGMA via the function field of $J$, using the usual relations for the Jacobian of $H$ plus the denominators of $\gamma$  as relations, but the computation does not finish and eats all my memory eventually.
I just need to know if a point in the image is 0 or non-generic when $\gamma(D)$ has 0's in the denominators using the information that I have, or maybe using an element of the function field of $J$ that can distinguish if a divisor is 0 or if it has the point at infinity with  multiplicity 1.

REPLY [2 votes]: I would suggest that you work with the Kummer surface $K$ of $J$
instead of using Mumford coordinates. The advantage is that $K$ is
a quartic surface in $\mathbb P^3$; in the case you are
considering when the curve has a unique point at infinity,
the vanishing of the first coordinate means that the point is
in the theta divisor, whereas it is the origin when the first
three coordinates vanish (using the standard Kummer coordinates
as in the book by Cassels and Flynn). Since your endomorphism
commutes with multiplication by $-1$, it induces an endomorphism
of $K$. This will be
given by a quadruple of homogeneous polynomials of some degree $d$
in the four coordinates; it should not be too hard to figure out
what they are from the generic representation in terms of the
Mumford representation. Then your problem comes down to checking
whether the first of these polynomials vanishes, and if so,
whether the next two also vanish. (This assumes that all four
polynomials do not vanish simultaneously at some point on $K$.)
When $\gamma$ is multiplication by 2, for example, the polynomials
are of degree 4 and can be obtained via
KummerSurface(J)`Delta;

in Magma.

Added later:
For the curve $$C \colon y^2 = x^5 + 10\,,$$ one choice
of polynomials giving multiplication by $\sqrt{5}$ on the
Kummer surface is
$$\begin{array}{r@{\,}c{\,}l}
P_1(x_1,x_2,x_3,x_4) &=&
8000 x_1^3 x_2^2 + 400 x_1^2 x_2 x_4^2
  + 200 x_1^2 x_3^2 x_4 + 400 x_1 x_2^2 x_3 x_4
  - 600 x_1 x_2 x_3^3 + 5 x_1 x_4^4 + 200 x_2^3 x_3^2
  + 10 x_2 x_3 x_4^3 + 10 x_3^3 x_4^2 \\
P_2(x_1,x_2,x_3,x_4) &=&
8000 x_1^4 x_4 + 8000 x_1^3 x_2 x_3 + 400 x_1 x_2^2 x_4^2
  + 200 x_1 x_2 x_3^2 x_4 + 400 x_1 x_3^4
  - 400 x_2^3 x_3 x_4 + 200 x_2^2 x_3^3
  - 5 x_2 x_4^4 + 10 x_3^2 x_4^3 \\
P_3(x_1,x_2,x_3,x_4) &=&
40 x_1^3 x_2 x_4 + 8000 x_1^3 x_3^2
  - 8040 x_1^2 x_2^2 x_3 - 200 x_1^2 x_4^3
  - 7960 x_1 x_2^4 - 996 x_1 x_2 x_3 x_4^2
  + 200 x_1 x_3^3 x_4 + 399 x_2^3 x_4^2
  - 598 x_2^2 x_3^2 x_4 - x_2 x_3^4 + 5 x_3 x_4^4 \\
P_4(x_1,x_2,x_3,x_4) &=&
64000 x_1^5 + 2720 x_1^3 x_3 x_4 + 8000 x_1^2 x_2^2 x_4
  + 5280 x_1^2 x_2 x_3^2 + 2720 x_1 x_2^3 x_3
  - 200 x_1 x_2 x_4^3 - 1528 x_1 x_3^2 x_4^2
  + 1600 x_2^5 - 68 x_2^2 x_3 x_4^2 - 64 x_2 x_3^3 x_4
  + 52 x_3^5 + x_4^5
  \end{array}
$$
(they are not unique, since we can add multiples of the
defining equation of the Kummer surface).
They were obtained by interpolating data from a number
of points. (Magma) Code is available from me on request.