I hope my question is not too vague or basic to be here. I have been constructing a setting to count points on a curve, but I am stucked solving one part of my problem for some time. Now I would like to have some advise from experts. I hope someone can give me a hint, it is related to genus 2 curves and degrees of morphisms to the Kummer surface of its jacobian.

What I am doing in some sense is constructing the 2:1 map from a hyperelliptic curve $H$ to $\mathbb{P}^1$ in a little complicated way but in order to get it explicitly.

Let $H$ be a hyperelliptic curve of genus 2 over $\mathbb{F}_q$ defined by $y^2=x^5 + a_3x^3 + a_2x^2 + a_1x+a_0=f(x)$ and consider $J$ its jacobian and $Kum(J)\subset \mathbb{P}^3_{\mathbb{F}_q}$ its Kummer surface .

Let $\theta=\lbrace (P-\infty) \in J : P\in H\rbrace$ be its theta divisor.

Let $\phi,\tau,[n]\in End_{\mathbb{F}_q}(J)$ be the frobenius, the involution in the jacobian induced by the hyperelliptic involution and the $n$ map respectively.

Consider the following divisor on $J$ given by a generic point $P\in C$.

$D_n := ((P^{\phi}-\infty)+[n](P^{\tau}-\infty))$

This divisor can be thought as the Frobenius - nIdentity in $End_{\mathbb{F}_q}(J)$

Consider the map from the theta divisor (the curve in this case) to Kummer Surface

$\psi_n:\theta \to Kum(J) $

$(P-\infty) \mapsto [1:\kappa_2(D_n): \kappa_3(D_n) : \kappa_4(D_n)]$

As the Kummer identifies $\pm 1$ divisors, this is going to be a 2:1 map, and is similar to the 2:1 map from the curve $H$ to $\mathbb{P}^1$ (except for the torsion prime divisors in $J$)

I am trying to measure the degree of the map to the fourth coordinate for every $n$ i.e.:

$\hat\psi_n:\theta\to \mathbb{P}^{1}_{\mathbb{F}_q}$

$(P-\infty)\mapsto \kappa_4(D_n)$

This fourth coordinate is the one that determines the quotient by $\pm 1$ which can be found explicitly for general divisors in page five of:

http://www.math.uni-hamburg.de/home/js.mueller/general_kummer.pdf

My main problem here is that as $H$ does not form a group, I cannot explore the morphism structure, and some values for my degree function fail.

I am interested in the positive integer $deg(\psi_n)$, which is the degree of the map.

I have made some calculations and the degree seems for every $n\in \mathbb{Z}$ to behave as a quadratic function $Q(n)$ where the trace of frobenius is involved in the structure of $Q(n)$, but for some $n$ it fails, for example if the coefficient $a_0$ in the equation of $H$ is a square then $Q(2)$ and $deg(\psi_n)$ differ by 2, so maybe $\psi_n$ is not well defined at some points or I am measuring degree over a singularity, but I am not sure.

If its not a square the same happens, but for $Q(-2)$, which is expected as the twist will have in its equation the coefficient $a_0'$ as a square.

Another thing is that if $a_0=0$ I have at every even integer $n$ an error also of -2 with respect of $Q(n)$.

I have been exploring a lot of cases with/without $\mathbb{F}_q$-rational Weierstrass points but I have not been able to deduce what happen at my errors, sometimes the degree function seems to not have errors (except for n=-2,2 which always appears as an error by 2), and sometimes it has more errors, If I pic up a translation of the curve, I can make some errors disappear, and the values are the same. So I am trying to deduce which representative of the isomorphism class has less errors.

Of course for $Q(1)$ and $Q(-1)$ I get interesting values, never seem to fail which give me information of the number of points in the curve and its twist directly without passing to the Jacobian.

But well I have been trying to solve this via intersection theory or even thinking what it means for $\Psi_n:=\phi-[n]$ the set $\Psi_n^{-1}(\infty)\subset \theta$ (As I cannot talk about kernel here because $\theta$ is not an abelian variety).

So $\Psi_n^{-1}(\infty)$ is like "All the elements in $\theta$ (which is isomorphic to $H$) such that the frobenius action in them, behaves exactly as $n$ map on them"

Thanks