Enumerating odd-degree hyperelliptic curves and abelian surfaces over P1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathbb {P}}^1$$\end{document}

Given asymptotic counts in number theory, a question of Venkatesh asks what is the topological nature of lower order terms. We consider the arithmetic aspect of the inertia stack of an algebraic stack over finite fields to partially answer this question. Subsequently, we acquire new sharp enumerations of quasi-admissible odd-degree hyperelliptic curves over Fq(t)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathbb {F}}_q(t)$$\end{document} ordered by discriminant height.


Introduction
In [11,Problem 5], Venkatesh asks the following question: What is the topological meaning of secondary terms appearing in asymptotic counts in number theory?
As explained therein by Venkatesh, in many interesting number theory problems (e.g., counting number fields, arithmetic curves or abelian varieties over a number field) one has not only a main term in the asymptotic count, but a secondary term or more. We have very little understanding of these lower order terms. They are not just of theoretical interest: when one tries to verify the conjectures numerically, one finds that the secondary terms are dominant in the computational range. For example, the number of cubic number fields of height ≤ B for certain constants a, b > 0 is a B − bB 5/6 + o(B 5 6 ).
The moduli functors we wish to enumerate are often represented by algebraic stacks rather than by schemes (or algebraic spaces) due to the presence of non-trivial automorphisms of the objects we wish to parameterize. If we consider a finite field analogue, the traditional approaches to count the number of rational points on the moduli spaces do not render every lower order term. This is because the Grothendieck-Lefschetz trace formula (relating point counts and -adic cohomologies) for algebraic stacks as in [3] counts the rational points with weights (given a rational point x, its weight is 1 Aut(x) ). Instead, we must acquire the number |X (F q )/ ∼ | of F q -isomorphism classes of F q -points of the algebraic stack X , i.e., the nonweighted point count of X over F q . In this regard, the coarse moduli space c : X → X is insufficient as |X (F q )| = |X (F q )/ ∼ |.
This discrepancy naturally raises the following question: Which arithmetic invariant of a specific geometric object Y is equal to the non-weighted point count |X (F q )/ ∼ | of the algebraic stack X over F q ?
We clarify the arithmetic role of the inertia stack I(X ) of an algebraic stack X over F q which parameterizes pairs (x, ξ), where x ∈ X and ξ is the conjugacy class of g ∈ Aut(x). Theorem 1.1 Let X be an algebraic stack over F q of finite type with quasi-separated finite type diagonal and let I(X ) be the inertia stack of X . Then, where # q (I(X )) is the weighted point count of the inertia stack I(X ) over F q .
Before drawing the connection of this Theorem to the question of lower order terms, let us instead first consider a simpler problem: find the non-weighted point count |X (F q )/ ∼ | of a Deligne-Mumford moduli stack X /F q of finite type with affine diagonal. In a given counting problem of number theory, one must be aware of the discriminant involved as the relevant moduli stack X is often not quasi-compact (so cannot be of finite type), but is rather a disjoint union of clopen substacks X Therefore, the lower order terms of N (B) are determined by the growth pattern of # q (I(X B )) with respect to B. Here, we note that the geometry of I(X ) can be quite complicated. For example, even if X is irreducible, I(X ) can be disconnected, with many irreducible components of different dimensions corresponding to different automorphisms. Also, I(X ) may have intersecting irreducible components which are possibly singular. And crucially, I(X ) could contain lower-dimensional irreducible components (non-existent on either X or X ) which will contribute to various lower order terms. Coming back to understanding the algebro-topological meaning of the lower order terms of N (B), we see that the weighted point count of the inertia stack # q (I(X B )) over F q is naturally equal to the alternating sum of trace of geometric Frobenius via the Grothendieck-Lefschetz trace formula for algebraic stacks as in Theorem 2.2 by [3,28] N (B) = It is natural to consider the grading determined by degree i of compactly-supported cohomologies. Observe that the top degree cohomology (when i = 2 dim I(X )) can be interpreted as the main leading term. Then the rest of the lower order terms of N (B) corresponds to the lower degree, compactly-supported, -adic cohomologies of I(X B ) with geometric Frobenius weights. However, the general mechanism that precisely determines which connected component(s) of I(X B ) contribute(s) to a given lower order term of a specific order remains unclear without fixing the counting/moduli problemX B and studying the arithmetic geometry of I(X B ) with regard to # q (I(X B )) = |X B (F q )/ ∼ |.
Under the framework of the Weil conjectures, this analysis provides a partial answer to the nature of lower order terms through the lower-dimensional irreducible components of I(X ) corresponding to different conjugacy classes of automorphisms as in Definition 2.6.
Due to the inherent complexity of inertia stacks in general, we instead focus on irreducible algebraic stacks X of finite type (with conditions on the diagonal). Furthermore, we restrict to the case when X ∼ = [U /G] is a quotient stack, which is a testing ground for the strategy above. Then, the inertia stack I(X ) turns out to be a quotient stack as well, of the form [R /G] (see Corollary 2.5). If X is furthermore Deligne-Mumford with affine diagonal, then I(X ) decomposes into a disjoint union of X and other components, which are fixed loci of nontrivial elements of G (see (6) and Definition 2.6 for more details).
In particular, we consider the special case when X is the Hom stack Hom n (P 1 , P( λ)) parameterizing the degree n ∈ Z ≥1 morphisms f : P 1 → P( λ) of rational curves on a weighted projective stack P( λ) (see Definition 3.1) with f * O P( λ) (1) O P 1 (n). In fact, both P( λ) and Hom n (P 1 , P( λ)) are quotient stacks of a special kind by Definition 3.1 and Proposition 3.5. These stacks are important because some interesting moduli stacks are of that form: for example, both authors in [15] showed that L 1,12n := Hom n (P 1 F q , P F q (4, 6)) represents the moduli stack of stable elliptic fibrations over P 1 F q with discriminant degree 12n (as (M 1,1 ) F q ∼ = P F q (4,6) is the moduli stack of stable elliptic curves when 2, 3 q).
This observation was crucial in loc. cit. for computing the exact non-weighted point count 1 |L 1,12n (F q )/ ∼ | over F q (see also [26]).
To obtain the non-weighted point count of the Hom stack Hom n (P 1 F q , P F q ( λ)), it is equivalent to find the weighted point count of its inertia stack I Hom n (P 1 F q , P F q ( λ)) by Theorem 1.1. It turns out that the computation of the non-weighted point count of I Hom n (P 1 F q , P F q ( λ)) reduces to finding the general formula for for weighted point count # q Hom n (P 1 F q , P F q ( λ)) for any λ.
Theorem 1.2 Fix the weight λ = (λ 0 , . . . , λ N ), and let R be the set of positive integers r (including r = 1) that divide q − 1. For every r ∈ R, define λ r to be the subtuple of λ consisting of elements that are divisible by r . Then, where ϕ is the Euler ϕ-function.
To compute the weighted point count of any Hom stack of the form Hom n (P 1 , P( λ)), we use the Grothendieck ring of stacks K 0 (Stck F q ) (see Definition 4.1 and the discussion thereafter, also Proposition 4.5). As a result, we obtain the following formula: Then the weighted point count of the Hom stack Hom n (P 1 , P( λ)) over F q is We would like to apply the ideas behind the two Theorems above, as an algorithm for finding non-weighted point counts, to other moduli stacks, such as the moduli stack of genus g ≥ 2 fibrations over P 1 F q . However, it is difficult to acquire the arithmetic invariants of I Hom(P 1 , M g ) due to the global geometry of the Deligne-Mumford moduli stack M g of stable genus g curves formulated in [6]. Moreover, the moduli stack M g of stable genus g ≥ 2 curves are not weighted projective stacks in general. Henceforth, the goal is to find a weighted projective stack that is a substitute for a special substack of M g , in order to easily apply the said algorithm discussed above.
Thus, we focus on hyperelliptic genus g ≥ 2 curves, 2 . Firstly, all smooth genus 2 curves are hyperelliptic, thus M 2 ∼ = H 2 . In general, recall that an odd-degree hyperelliptic curve has a marked rational Weierstrass point at ∞. In this paper, we will concentrate on the moduli substack H g,1 ⊂ M g,1 of hyperelliptic genus g ≥ 2 curves with 1 marked rational Weierstrass point (which has the same dimension as H g ) as we focus on counting odd-degree hyperelliptic genus g ≥ 2 curves. Since H g,1 is not proper, we consider the proper moduli stack H g,1 := H g,1 ⊂ M g,1 (meaning the reduced closure) of stable odd-degree hyperelliptic curves. Similar to M g , extracting the exact arithmetic invariants of Hom n (P 1 , H g,1 ) is challenging and H g,1 is not a weighted projective stack in general, so we consider (upto some conditions on characteristic of F q ) a different extension of smooth odd-degree hyperelliptic curves such that the compactified moduli stack is a weighted projective stack, originally introduced as a special case of [8, Definition 2.5]: Definition 1.4 Fix an integral reduced K -scheme B, where char(K ) = 2. A flat family u : C → B of genus g ≥ 2 curves is quasi-admissible if every geometric fiber has at worst A 2g−1 -singularities (i.e., étale locally defined by x 2 + y m for some 0 < m ≤ 2g), and factors through a separable morphism φ : C → H of degree 2 where H is a P 1 -bundle over B with a distinguished section (often called ∞) which is a connected component of the branch locus of u.
The notion of quasi-admissible covers whereby the general member of C is not an admissible cover of P 1 is natural and have been studied in depth by [27, §2.4.] as the closest covers to the original families of stable curves. For example, if char(K ) > 2g + 1 or 0, then a quasi-admissible curve over any K -scheme B can be written as an odd-degree hyperelliptic curve via generalized Weierstrass equation: Above proposition shows that L g is a well-behaving object parametrizing quasi-admissible curves of genus g over P 1 K . The proposition below signifies the importance of this stack in regard to understanding the moduli of stable odd-degree hyperelliptic genus g curves over P 1 K (with smooth generic fiber): Theorem 1.6 Fix a base field K with char(K ) > 2g + 1. Then there is a canonical fully faithful functor of groupoids F : S g (K ) → L g (K ) from the groupoid S g (K ) of stable odddegree hyperelliptic genus g ≥ 2 curves over P 1 F q with a marked Weierstrass point and generically smooth fibers to L g (K ).

Theorem 1.7
If char(F q ) > 2g + 1, the number L g,| g |·n (F q )/ ∼ of F q -isomorphism classes of quasi-admissible odd-degree hyperelliptic genus g fibrations over P 1 F q with a marked Weierstrass point and discriminant of degree | g | · n = 4g(2g + 1)n is equal to For genus g ≥ 5, the corresponding exact non-weighted point count L g,| g |·n (F q )/ ∼ of the moduli stack L g,| g |·n over F q can be similarly worked out.
Given an odd-degree hyperelliptic genus g ≥ 2 curve X over P 1 F q with char(F q ) > 2g +1, define the height of hyperelliptic discriminant g (X ) to be ht( g (X )) := q deg g (X ) = q 4g(2g+1)n (see Definition 6.3). Then, we define the counting function Z g,F q (t) (B) as Z g,F q (t) (B) := |{Quasi-admissible odd-degree hyperelliptic curves over We acquire the following sharp enumerations via Theorem 1.7 in §6. (B), which counts the number of quasi-admissible odd-degree hyperelliptic genus g ≥ 2 curves X over P 1 F q ordered by 0 < ht( g (X )) = q 4 g(2 g+1)n ≤ B, satisfies:
For higher genus g ≥ 5, the sharp enumeration on Z g,F q (t) (B) rendering a closed-form formula with non-constant lower order terms can be similarly worked out through Theorem 6.4. Over number fields, the work of [4] counts the hyperelliptic curves.
As we have seen by Theorem 1.6, whenever char(F q ) > 2g + 1, counting the number Z g,F q (t) (B) of quasi-admissible odd-degree hyperelliptic genus g ≥ 2 curves over P 1 F q renders an upper bound for counting the number Z g,F q (t) (B) of stable odd hyperelliptic genus g ≥ 2 curves over P 1 F q with generically smooth fibers. That is, Using this, we obtain another application regarding the enumeration of abelian varieties of dimension 2, i.e., abelian surfaces over global function fields. By the local (i.e., infinitesimal) Torelli theorem in [24, Theorem 2.6 and 2.7] and [21, Theorem 12.1], the Torelli map τ 2 : M 2 → A 2 , which sends a smooth projective genus 2 curve X defined over a field K to its principally polarized Jacobian (Jac(X ), λ θ )/K (where λ θ is the theta divisor of Jac(X )), is an open immersion. Furthermore, it is shown in [25, 4. Theorem] (see also [31,Satz 2]) that given a principally polarized abelian surface (A, λ) over a field K , after a finite extension of scalars, is isomorphic to the canonically principally polarized (generalized) Jacobian variety (Jac(X ), λ θ ) of a stable genus 2 curve X . Recall that if a curve X has good reduction at a place v ∈ S then so does its Jacobian Jac(X ). Theorem 1.9 (Estimate on N 2,F q (t) (B)) If char(F q ) = 2, 3, 5, then the function N 2,F q (t) (B), which counts the number of principally polarized abelian surfaces A = Jac(X ) where X is a stable genus 2 curve with a marked Weierstrass point over P 1 F q ordered by 0 < ht( 2 (X )) = q 40n ≤ B, satisfies: Proof Main Theorem 1.8 combined with Theorem 1.6 provides an explicit upper bound on the number of stable genus 2 curves with a marked Weierstrass point over P 1 F q with char(F q ) = 2, 3, 5. The upper bound follows from the properties of the Torelli map τ 2 as all principally polarized abelian surfaces are isomorphic to Jacobians of genus 2 curves of compact type (c.f., [24, Theorem 2.6 and 2.7] and [25,4. Theorem]).

Organization
In Sect. 2, we establish the arithmetic geometric properties of the inertia stack I(X ) of an algebraic stack X thereby proving the Theorem 1.1 and describing various decompositions of the inertia stacks of quotient stacks. In Sect. 3, we formulate the Hom stack Hom n (P 1 , P( λ)) of rational curves on a weighted projective stack P( λ) and provide a clear decomposition of the inertia stack I(Hom n (P 1 , P( λ))) (i.e., each summand is the Hom stack Hom n (P 1 , P( λ I g ))). In Sect. 4, we use the Grothendieck ring of K -stacks K 0 (Stck K ) to acquire the motive Hom n (P 1 , P( λ)) (Proposition 4.5) which provides the class I Hom n (P 1 K , P K ( λ)) . As a result, we prove Theorems 1.2 and 1.3. Afterwards in Sect. 5, we formulate the moduli stack L g,| g |·n of quasi-admissible hyperelliptic genus g fibrations over P 1 with the hyperelliptic discriminant g via the birational geometry of surfaces. We use birational geometry to prove Theorem 1.6. Then we compute the related non-weighted point count of the moduli stack L g,| g |·n over F q there, proving Theorem 1.7. In Sect. 6, we finally establish the sharp enumerations with precise lower order terms thereby proving Main Theorem 1.8.

Notation and conventions
In the present paper, schemes/stacks are assumed to be defined over a field K , if K is not mentioned explicitly or if such scheme is obviously not defined over any field (e.g., Spec Z). Given a point x of a scheme/stack, κ(x) means the field of definition of x (i.e., the residue field). Given a group scheme G defined over a field K , then Cl(G) is the set of conjugate classes of closed points g of G (here, κ(g) is not necessarily K ); this in general is a strictly larger set than the conjugacy class Cl(G(K )) of the group of K -rational points of G.
Here, we use the convention in [23, §8] that the diagonal of an algebraic stack is representable (by algebraic spaces). For any T -point x of a stack X , Aut(x) is the group of automorphisms of x ∈ X (T ) (defined over T ). We denote Aut x to be the automorphism space (as an algebraic space) of x ∈ X (see (4) in §2).
We identify the Weil divisors and the associated divisorial sheaves implicitly (e.g., if X is a Cohen-Macaulay scheme, then the canonical divisor K X corresponds to the dualizing sheaf ω X ∼ = O(K X ) of X ). Given a finite morphism f : X → Y of reduced equidimensional schemes, a branch divisor of f on Y means the pushforward of the ramification divisor of f on X . Given a morphism f : X → Y of schemes with an isolated subset Z ⊂ Y (i.e., Y as a topological space is Z (Y \Z ) under the Zariski topology), the preimage of Z in X refers to the components of X with their image supported on Z .
2 Arithmetic geometry of the inertia stack I(X ) of an algebraic stack X Given an algebraic stack X defined over a field K , its inertia stack I(X ) is defined as: Also, I(X ) is characterized by the following Cartesian diagram (by [23, Definition 8.1.17]): Note that if the representable morphism satisfies a property (such as finite type, quasiseparated, etc.), then this property is also satisfied for the representable morphism I(X ) → X . In particular, I(X ) is a X -algebraic space, i.e., I(X ) × X T is an algebraic space for any morphism T → X from a scheme T .
To understand I(X ) → X , we first pay attention to . Given an object x : T → X of X from a scheme T , recall that the automorphism space Aut x of x is defined to be the fiber product X × x×x T . This means that S-points of Aut x are characterized by pairs (s, α) of maps s : S → T and automorphisms α : s * x → s * x in the groupoid X (T ). Since x × x factors through , Aut x fits into the following Cartesian diagram: As before, representability of implies that Aut x → T is a morphism of algebraic spaces, and the group algebraic space structure on Aut x lifts, realizing I(X ) as a group algebraic space over X . Before proving Theorem 1.1, we recall the definition of a weighted point count of an algebraic stack X over F q : The weighted point count of X over F q is defined as a sum: , the set of non-weighted points of X over F q ), and we take 1 |Aut(x)| to be 0 when |Aut(x)| = ∞. A priori, the weighted point count can be ∞, but when X is of finite type, then the stratification of X by schemes as in [3, Proof of Lemma 3.2.2] implies that X (F q )/ ∼ is a finite set, so that # q (X ) < ∞.
is absolutely convergent to the weighted point count # q (X ) of X over F q .
When the stack X is a Deligne-Mumford stack of finite type over F q with affine diagonal, then the corresponding compactly-supported, -adic étale cohomology for prime number invertible in F q is finite dimensional as a Q -algebra, making the above trace formula to hold in Q -coefficients.
We are now ready to prove Theorem 1.1: Note that for any F qscheme T and any y, z ∈ X (T ) such that y ∼ x T and z ∼ x T in X (T ), y and z factor through x and Isom X (y, Now consider I(X ) x defined by the following Cartesian square: x This is a substack of I(X ), and (y, β) where the group space action is the conjugation. Since the diagonal of X is quasi-separated and of finite type, Aut x is a quasi-separated group algebraic space of finite type over F q by Diagram (4); henceforth, Aut(x) = Aut x (F q ) is a finite group since Aut x admits a finite stratification by schemes of finite type by [18,II.6.6].
Then, the Orbit-Stabilizer Theorem implies that as a set, Finally, we can divide the cardinality of both sides by the finite number | Aut(x)|; then right hand side becomes # q (I(X ) x ), proving the statement.
The following Lemma shows that certain nice property of X carries over to I(X ) as well.

Lemma 2.3 If X is an algebraic stack of finite type with affine finite type diagonal, then so is I(X ).
Proof Since X is of finite type with finite type diagonal, I(X ) must be of finite type as well by Diagram (3). It remains to show that I(X ) has an affine finite type diagonal. This is equivalent to showing that for any scheme T and any pairs (x, α), (y, β) ∈ I(X )(T ), the Isom space Isom I(X ) ((x, α), (y, β)) is an affine T -scheme and is of finite type relative to T by the following Cartesian diagram: To see the structure of Isom I(X ) ((x, α), (y, β)) → T , observe that Isom X (x, y) → T and Aut x → T are affine morphisms of finite type by the conditions on the diagonal of X . Then Isom I(X ) ((x, α), (y, β)) is the preimage under the closed subscheme 1 x ∈ Aut x , which is of finite type, of a morphism between affine T -schemes: Therefore, Isom I(X ) ((x, α), (y, β)) is an affine T -scheme and is of finite type relative to T as well.
In practice, an algebraic stack X can be characterized by its smooth cover U → X by an algebraic space U (most of the time, U is assumed to be a scheme) with the space of equivalence relations R, i.e., R is defined via the following Cartesian diagram where s(r ) = x and t(r ) = y for any directed equivalence relation r : x → y of x, y ∈ U via r ∈ R. In this case, X ∼ = [U /R] (technically, [U /R] is the stackification of the prestack U /R of groupoids over Sch). Note that the following Cartesian square implies that R is an algebraic space as well, since : X → X × X is representable. Given this presentation, we obtain the following presentation of I(X ): it suffices to compare their T -points for any scheme T . Recall by the Cartesian diagram above that any T -point of R is characterized by a pair (u, r ) ∈ U × R where r : u → u. Then, given any ((u 1 , The converse can be recovered, as u 2 is the target of r 1 and r 2 = τ •r 1 • τ −1 . This establishes the bijection between T -points of R × I(X ) R and R × t s R.
Sometimes, we will denote R(X ) (resp., R (X )) instead of R (resp, R ) when we need to emphasize the algebraic stack X in question.
Recall that a quotient stack, denoted [U /G], corresponds to U a scheme with the action of a group scheme G. In this case, R = U × G with s being the first projection and t being the G-action map t : Proof By the proof of Proposition 2.4, it suffices to show that R × t s R ∼ = R × G and that the action map which coincides with the second projection of R × I(X ) R , coincides with the conjugate By the description of the action map above, G acts on R by the conjugation. Now assume that a quotient stack X ∼ = [U /G] of finite type has the affine finite type diagonal. Then, R is not irreducible in general; in fact, not even connected. Since the image of the second projection π 2 : U × G ⊃ R → G can have many irreducible components G i , we have the decomposition R = ∪π −1 2 (G · G i ) (where G acts on itself by conjugation). Note that when π 2 (R ) is disconnected, so is R .
Thus, assume furthermore that X is a Deligne-Mumford (DM) stack. Since the diagonal of X is affine of finite type (by the previous assumption) and formally unramified (by DM), the diagonal must be finite; this implies that π 2 (R ) lies in torsion subset of G. Instead of stratifying π 2 (R ) by G-orbits of its irreducible components as above, Abramovich-Graber-Vistoli in [1, Definition 3.1.5] stratify I(X ) by looking at orders of automorphism elements: in our language, this induces a coarser stratification of R : where R ,μ r (X ) is the preimage under π 2 of the subscheme of order r elements of G. However, R ,μ r (X ) can still be disconnected with many components of different dimensions.
Instead, assume that we have chosen a nice presentation of X as a quotient stack [U /G] such that the support of π 2 (R ) consists of finitely many closed points of G. In this case, π 2 (R ) is, as a set, a disjoint union of conjugate classes of some closed points in π 2 (R ). Let's use our initial decomposition of R as above by G-orbits of connected components of π 2 (R ). This induces the following stratification: Definition 2.6 Let X ∼ = [U /G] be a Deligne-Mumford quotient stack of finite type with affine finite type diagonal and let R be as in Corollary 2.5 such that the support of the second projection π 2 (R ) in G consists of finitely many closed points of G. Then the decomposition of the inertia stack I(X ) via the conjugacy classes is as follows: where R ,α (X ) is the preimage under π 2 of a conjugate class α ∈ Cl(G), as a finite subset of G.
Note that R ,α = g∈α R ,g where R ,g is the preimage under π 2 of g ∈ G; it is the base change by κ(g)/K of the fixed locus in U of g ∈ G (i.e., every point is fixed under the action of g). Observe that As a summary, the decomposition in Definition 2.6 is finer than (6) when it exists, but assumes the finiteness of π 2 (R ) ⊂ G as a subset. We will see that weighted projective stacks (and Hom stacks) defined in §3 satisfy this condition.

Remark 2.7
When X ∼ = [U /G], U , G in Definition 2.6 are defined over a perfect field K , the condition, that the support of π 2 (R ) in G consists of finitely many closed points of G, is equivalent to the finiteness of the following set: {g is a geometric point of G | g · u = u for some geometric point u of U } .
When X is Deligne-Mumford and G is an abelian group (such as G m ), this is easy to check. However, when G is a non-abelian group (examples are GIT constructions of moduli of smooth/stable curves), this condition puts a restriction on what kind of g can fix an element of U , even when X is a Deligne-Mumford stack. If g · u = u, then hgh −1 · hu = hu, so that this set above is a union of conjugacy classes as sets. Whenever the centralizer subgroup scheme C G (g) has lower dimension than G, the conjugacy class (i.e., the orbit of g under conjugation) forms a positive dimensional subscheme, contained in the set above. Since the algebraic closure K is infinite, such positive dimensional subschemes have infinitely many geometric points by Bertini's Theorem.

Hom stack Hom n (P 1 , P( )) of rational curves on a weighted projective stack
In this section, we formulate the Hom stack Hom n (P 1 , P( λ)) over a base field K . First, we recall the definition of a weighted projective stack P( λ) with the weight λ over K .

Definition 3.1 Fix a tuple of nondecreasing positive integers
In this case, the degree of is defined to be the line bundle associated with the sheaf of degree m homogeneous rational functions without poles on A N +1 Note that P( λ) is not an (effective) orbifold when gcd(λ 0 , . . . , λ N ) = 1. In this case, the finite cyclic group scheme μ gcd(λ 0 ,...,λ N ) is the generic stabilizer of P( λ). When we need to emphasize the field K of definition of P( λ), we instead use the notation P K ( λ).

Lemma 3.2
The N -dimensional weighted projective stack P( λ) = P(λ 0 , . . . , λ N ) over any field K is of finite type with finite type affine diagonal.
Proof Since the smooth schematic cover A N +1 x 0 ,...,x N \0 of P( λ) is of finite type over K , P( λ) is of finite type over K as well. It remains to prove the properties of the diagonal of P( λ).
The fiber over x of R → U as in Corollary 2.5 is a proper subgroup scheme of G m (over T ), which is always affine of finite type over T . Henceforth, the diagonal of P( λ) satisfies the desired properties.
However, when K = F p for some prime p, P(1, p) is not Deligne-Mumford, as Aut [0:1] ∼ = μ p , which is not formally unramified over F p . Nevertheless, the following proposition shows that any P( λ) behaves well in most characteristics as a tame Deligne-Mumford stack: Proof For any algebraically closed field extension K of K , any point y ∈ P( λ)(K ) is represented by the coordinates (y 0 , . . . , y N ) ∈ A N +1 K with its stabilizer group as the subgroup of G m fixing (y 0 , . . . , y N ). Hence, any stabilizer group of such K -points is Z/uZ where u divides λ i for some i. Since the characteristic of K does not divide the orders of Z/λ i Z for any i, the stabilizer group of y is K -linearly reductive. Hence, P( λ) is tame by [2,Theorem 3.2]. Note that the stabilizer groups constitute fibers of the diagonal : P( λ) → P( λ) × K P( λ). Since P( λ) is of finite type and Z/uZ's are unramified over K whenever u does not divide λ i for some i, is unramified as well. Therefore, P( λ) is also Deligne-Mumford by [ (0, 0))/G m ] = P K (4, 6) by using the short Weierstrass equation y 2 = x 3 + a 4 x + a 6 x, where ζ · a i = ζ i · a i for ζ ∈ G m and i = 4, 6. Thus, a i 's have degree i's respectively. Note that this is no longer true if characteristic of K is 2 or 3, as the Weierstrass equations are more complicated.
In the proof of Lemma 3.2, we have shown that R → U is proper, implying that π 2 (R ) ⊂ G m is a proper subgroup scheme, i.e., supported on finitely many closed points. Thus, we can apply the decomposition in Definition 2.6 to the inertia stack I(P( λ)): Proposition 3.5 For any N -dimensional weighted projective stack P K ( λ), Definition 2.6 describes connected components of I(P K ( λ)): where |(G m ) K | is set of closed points of (G m ) K , I g is the largest subset of {0, . . . , N } such that ord(g) divides λ i for every i ∈ I g , and λ I g is the subtuple of λ indexed by I g ⊂ {0, . . . , N }.
Note that I g = I g when ord(g) = ord(g ), as any subgroup of G m is cyclic. Also, when |I g | = 0, then P( λ I g ) = ∅ vacuously.

Proof of Proposition 3.5
It suffices to show that R ,g is the subspace as commutativity of G m implies that C G (g) = G m for any g ∈ G m (here, g as a closed point of G m in above coordinates is equivalent to taking a Galois orbit of a representative of g as a κ(g)-point of G m ). Note that this space is a κ(g)-variety as its projection onto Thus, x lies in the closed subscheme {x i = 0 : ∀i, g λ i = 1}, which is exactly the desired subspace.
We now generalize the Hom stack formulation to P( λ) as follows: Proposition 3. 6 The Hom stack Hom n (P 1 , P( λ)) with weight λ = (λ 0 , . . . , λ N ), which parameterize degree n ∈ N K -morphisms f : P 1 → P( λ) with f * O P( λ) (1) ∼ = O P 1 (n) over a base field K with char(K ) not dividing λ i ∈ N for every i, is a smooth separated tame Deligne-Mumford stack of finite type with dim K Hom n (P 1 , P( λ)) = | λ|n + N where Proof Hom n (P 1 , P( λ)) is a smooth Deligne-Mumford stack by [ , parameterizing the set of tuples (u 0 , . . . , u N ) of sections with no common zero (here, we interpret H 0 (O P 1 (λ i · n)) as an affine space over K of appropriate dimension, induced by its K -vector space structure). The G m action on T is given by implying that dim Hom n (P 1 , P( λ)) = | λ|n + N since dim G m = 1.
As G m acts on T properly with positive weights λ i ∈ N for every i, the quotient stack [T /G m ] is separated. It is tame as in [2, Theorem 3.2] since char(K ) does not divide λ i for every i.

Remark 3.7
In the proof of Proposition 3.6, we showed that Hom n (P 1 n)) not containing zero, where for each i, G m acts on H 0 (O P 1 (λ i · n)) with weight λ i . In fact, this remains true even when the characteristic assumption fails, as the arguments still follow. Since h 0 (O P 1 (λ i ·n)) = nλ i + 1, Hom n (P 1 , P( λ)) is an open substack of P( ) where Furthermore, (u 0 , . . . , u N ) ∈ ⊕H 0 (O P 1 (λ i · n)) lies in T iff u i 's have no common zero on P 1 . By Lemma 3.2, Hom n (P 1 , P( λ)) is of finite type with finite type affine diagonal (without any condition on the base field K ) Similar to P( λ), the inertia stack I(Hom n (P 1 , P( λ))) admits a clear decomposition (i.e., each summand is the Hom stack Hom n (P 1 , P( λ I g ))) that plays a crucial role.

Proposition 3.8
The inertia stack of the Hom stack Hom n (P 1 , P( λ)) admits the following decomposition into connected components as in Definition 2.6, where I g and λ I g are the same as in Proposition 3.5: Note that Hom n (P 1 , P( λ I g )) = ∅ whenever |I g | ≤ 1, as there are no maps from P 1 to P( λ I g ) where the pullback of O(1) to P 1 has degree n.
Restricting the decomposition of I(P( )) as in Proposition 3.5 to Hom n (P 1 , P( λ)), Since u ∈ T iff u i 's have no common zeroes, each summand is isomorphic to Hom n (P 1 , P( λ I g )).

Motive/point count of Hom and inertia stacks
First, we recall the definition of the Grothendieck ring of algebraic stacks following [7]. Given an algebraic K -stack X of finite type with affine diagonal, the motive of X refers to {X } ∈ K 0 (Stck K ).
As the Grothendieck ring K 0 (Stck K ) is the universal object for additive invariants, it is easy to see that when K = F q , the assignment {X } → # q (X ) gives a well-defined ring homomorphism # q : K 0 (Stck F q ) → Q (c.f. [7, §2]) rendering the weighted point count of a stack X over F q . Note that # q (X ) < ∞ when X is of finite type (see the discussion right below Definition 2.1).
Since many algebraic stacks can be written locally as a quotient of a scheme by an algebraic group G m , the following lemma (a special case of [7, §1]) is very useful: Proof The proof is analogous to [10, Theorem 1.2 (1)], with the correction from [26, Proposition 3.1.], and is a direct generalization of [15,Proposition 18]. Here, we recall the differences to the work in [10,15,26].
Step 1: : the space of monic polynomials ( f 1 , . . . , f m ) of degree d 1 , . . . , d m respectively for which there exists a monic h ∈ K [z] with deg(h) ≥ k and monic polynomials g i ∈ K [z] so that f i = g i h for any i. The rest of the arguments follow analogously, keeping in mind that the group action is via S d 1 × · · · × S d m .
Step 2: Here, we prove that {R Just as in [10], the base case of k = 0 follows from the definition (in fact, loc.cit. shows that the two schemes are indeed isomorphic). For k ≥ 1, [26, Proposition 3.1] proves that the map : Poly induces a piecewise isomorphism (where each piece is a locally closed subset, see [26, Proposition 3.1] for more details); this immediately implies the claim by the definition of the Grothendieck Ring.
Step 3: By combining Step 1 and 2 as in [10], we obtain  (d 1 , . . . , d m ). For the base case, consider when d 1 = 0. Here the monic polynomial of degree 0 is nowhere vanishing, so that any tuple of polynomials of degree d i for i > 1 constitutes a member of Poly

Motive of Hom stack
Now we are ready to find the class in Grothendieck ring of the Hom stack Hom n (P 1 , P( λ)): Proposition 4.5 Fix the weight λ = (λ 0 , . . . , λ N ) with | λ| := N i=0 λ i . Then the motive of the Hom stack Hom n (P 1 , P( λ)) in the Grothendieck ring of K -stacks K 0 (Stck K ) is equivalent to Proof Let λ = (λ 0 , . . . , λ N ) and λ i ∈ N for every i with | λ| := N i=0 λ i . Then the Hom stack Hom n (P 1 , P( λ)) ∼ = [T /G m ] is the quotient stack by the proof of Proposition 3.6. By  (a 0 , . . . , a N ), where a i is the coefficient of the degree nλ i term of f i . Now, we stratify T by taking preimages under of a stratification of A N +1 \0 by E J , where J is any proper subset of {0, . . . , N } and Observe that E J has the natural free G N +1−|J | m -action, which lifts to −1 (E J ) via multiplication on G m -scalars on f i for i / ∈ J . The action is free on −1 (E J ) as well, so that | −1 (E J ) is a Zariski-locally trivial fibration with base E J . Each fiber is isomorphic to F J (n λ) defined below: it suffices to find {F J (n λ)} as a polynomial of L.
In order to prove this, we first check that if we set d i = 0 for some i ≥ m, then To see this, note that i / ∈ m , so that f i is monic of degree d i = 0 for any ( f 0 , . . . , f N ) ∈ F m ( d); so f i = 1. Therefore, the common root condition from Definition 4.6 is vacuous, so that {F m ( d)} = L | d| (as the space of monic polynomials of degree d is isomorphic to A d and so is the space of polynomials of degree < d).
We prove equation (8)  Observe that f 0 cannot be 0, otherwise f 1 has no roots while having positive degree, which is a contradiction. Since f 0 can be written as a 0 g 0 for g 0 monic of degree deg f 0 and a 0 ∈ G m , F 1 ( d) decomposes into the following locally closed subsets: Therefore, In general, assume that the statement is true for any (N , m ) whenever N < N or N = N and m ≤ m. If m + 1 < N + 1, then we want to prove the assertion for (N , m + 1). We can take the similar decomposition as the base case (1, 1), except that we vary the degree of f m , which is the (m + 1)-st term of ( f 0 , . . . , f N ) ∈ F m+1 ( d), and f m can be 0. If f m = 0, then ( f 0 , . . . , f m , . . . , f N ) have no common roots, so that ( f 0 , . . . , f m , . . . , f N . . . , d m , . . . , d N ) (and vice versa). Henceforth, as a set, F m (d 0 , . . . , d m , . . . , d N ) (G m × F m (d 0 , . . . , 0, . . . , d N )) . . . , , . . . , d N ) .

By induction,
This finishes the proof of Proposition 4.5.

Point count of Hom stack
Using Proposition 4.5, we immediately obtain the proof of Theorem 1.3, which is about the weighted point count of the Hom stack Hom n (P 1 F q , P F q ( λ)):

Point count of inertia of Hom stack
We compute the class I Hom n (P 1 K , P K ( λ)) , which renders the non-weighted point count of the moduli stack L g,| g |·n over F q . Proposition 4.8 Take the same notation as in Proposition 3.5. Then, Proof This directly follows from Proposition 3.8 and the definition of the Grothendieck Ring.
Above definition combined with the proof of Theorem 1.3 gives an algorithm for computing | Hom n (P 1 , P( λ))(F q )/ ∼ |, which is exactly the Theorem 1.2: Proof of Theorem 1.2 Recall that the multiplicative group F * q of a finite field F q is a cyclic group of order q − 1. By the primitive root condition, we see that ζ r ∈ G m (F q ) iff r |(q − 1). Nevertheless, λ r is exactly the λ I ζr as in Proposition 3.8. This implies that the substack Hom n (P 1 κ(ζ r ) , P κ(ζ r ) ( λ r )) contributes F q -rational points iff r divides q − 1, hence the definition of the set R. As λ r is independent of the choice of a primitive r th root of unity and there are ϕ(r ) number of them, simplifying # q I Hom n (P 1 K , P K ( λ)) gives the desired formula by Theorem 1.1.

Remark 4.9
Note that writing a closed-form formula for | Hom n (P 1 , P( λ))(F q )/ ∼ | is difficult in general, as Euler ϕ-function is used, the sum is over all possible positive factors of q −1, and the length of λ r can vary. Nevertheless, it is possible to obtain a closed-form formula by hand for special cases with mild assumptions on q (Theorem 1.7 is a good example).

Moduli stack L g,|1 g |·n of quasi-admissible odd-degree hyperelliptic genus g fibrations over P 1
Recall that a hyperelliptic curve C is a separable morphism φ : C → P 1 of degree 2. In order to extend the notion of hyperelliptic curve C into family, we first generalize the notion of rational curve P 1 into family.
Definition 5.1 A rational fibration with a marked section is given by a flat proper morphism h : H → P 1 of pure relative dimension 1 with a marked section s : P 1 → H such that 1. any geometric fiber h −1 (c) is a connected rational curve (so that arithmetic genus is 0), 2. s (P 1 ) is disjoint from the non-reduced locus of any geometric fiber, and 3. s (P 1 ) is disjoint from the singular locus of any geometric fiber of H (this implies that s (P 1 ) is also disjoint from the singular locus of H ).
If the geometric generic fiber of h is a smooth rational curve, then we call (H , h, s ) a P 1 -fibration.
We will occationally call (H , h, s ) a rational fibration when there is no ambiguity on the marked section s . Note that we allow a rational fibration H to be reducible (when generic fiber is a nodal chain), and the total space of a P 1 -fibration can be singular. A certain double cover of the rational fibration gives us the hyperelliptic genus g fibration with a marked Weierstrass section. (X , H , h, f , s, s )  The underlying genus g fibration is a tuple (π := h • f , s) with π : X → P 1 a flat proper morphism with geometric fibers of arithmetic genus g with a marked Weierstrass point given by s. (X 1 , H 1 , h 1 , f 1 , s 1 , s 1 ) and (X 2 , H 2 , h 2 , f 2 , s 2 , s 2 ) is given by a pair of isomorphisms α : X 1 → X 2 and β : H 1 → H 2 such that 1. h 2 • β = h 1 and f 2 • α = β • f 1 (P 1 -isomorphism criteria), and 2. β • s = s (compatibility with sections).

Note 5.3 An isomorphism between hyperelliptic genus g fibrations
From now on, we only consider non-isotrivial hyperelliptic fibrations, i.e., the underlying genus g fibrations must be non-isotrivial. Thus, non-isotrivialness will be assumed on every statement and discussions below.
Recall that a fibration with a section is said to be stable if all of its fibers are stable pointed curves. This leads to the following definition in the hyperelliptic case: Definition 5.4 A stable hyperelliptic genus g fibration with a marked Weierstrass section is a hyperelliptic genus g fibration (X , H , h, f , s, s ) with K X + s(P 1 ) is π-ample. We assume that X is not isotrivial, i.e., the trivial hyperelliptic fiber bundle over P 1 with no singular fibers.
Moreover, if the geometric generic fiber is smooth, then (X , H , h, f , s, s ) is called a stable odd hyperelliptic genus g model over P 1 .
Conditions in the above definition imply that (X , s(P 1 ))/P 1 is log canonical. In classical language, this means that there are no smooth rational curves of self-intersection −1 and −2 in a fiber without meeting s(P 1 ). (X , H , h, f , s, s ) is a stable odd hyperelliptic genus g model with a marked Weierstrass section. Then, it is possible that f : X → H in a étale local neighborhood of p ∈ H is the map A 2

Example 5.5 Suppose that
x,y → A 2 x,y /μ 2 , where μ 2 acts on A 2 x,y by (x, y) → (−x, −y). In this case, π can be given by A 2 x,y → A 1 z by z = x y. Note that H admits an A 1 -singularity at p, f −1 ( p) is a node of a fiber of π, but X is nonsingular. In general, X and H admit at worst A l -singularities for some l (because geometric fibers of X are nodal curves), where A u -singularities of surfaces are étale locally given by w 2 + x 2 + y u+1 = 0. This follows from the fact that 1-parameter deformations of nodes create such singularities. Note that on the neighborhood of such an isolated singular point of H , the branch locus of f is concentrated at the point if it contains the point, which only appears possibly at singular points of the fibers of h : H → P 1 . (X , H , h, f , s, s ) is a stable odd hyperelliptic genus g model with a marked Weierstrass section over a field K . The goal is to classify singularities of the branch divisor of f . By the definition, the branch divisor decomposes into B s (P 1 K ), which is contained in the smooth locus of H by the definition. First, consider a geometric point c in the intersection B ∩ H t , where t is a geometric point of P 1 K and H t is the fiber h −1 (t). Since the corresponding double cover X t (which is a fiber over t of h • f ) only admits nodes as singularities, the multiplicity m of B ∩ H t at c is at most 2, as f t : X t → Y t étale locally near c is given by the equation

Example 5.6 Suppose that
Since B does not contain any irreducible component of geometric fibers of h (as any geometric fiber of h • f is reduced), above implies that the multiplicity of B at any geometric point is at most 2. Thus, the support of B possibly admits plane double point curve singularities, étale locally of the form y 2 − x m = 0 with m ∈ N ≥2 , on the geometrically reduced locus of B, and is smooth elsewhere. Those singularities are in fact A m−1 (curve) singularities.
Examples 5.5 and 5.6 illustrate that a general stable odd hyperelliptic genus g model often gives a mildly singular P 1 -fibration and mildly singular branch divisor on it. On the other hand, we could instead consider the hyperelliptic fibrations with smooth P 1 -bundle H , but with X and the branch divisor having worse singularities. Then, each fiber of X is irreducible and is a double cover of P 1 branched over 2g + 2 number of points, where many of these points could collide. For instance, if l branch points collide, then the preimage has A l−1 -singularity on the fiber, given étale locally by an equation y 2 − x l = 0. Such a curve is called the quasi-admissible hyperelliptic curve, defined in Definition 1.4. Quasi-admissible hyperelliptic curves over P 1 K (which are non-isotrivial) are equivalent to the following: hyperelliptic fibration (X , H , h, f , s, s ) is quasi-admissible if for every geometric point c ∈ C, f restricted to the fibers of X and H is quasi-admissible. We assume that X is not isotrivial over P 1 , i.e., all geometric fibers are isomorphic.

Remark 5.8
Observe that the Definitions 5.1, 5.2, 5.4, and 5.7 should be interpreted as rational/hyperelliptic/stable/quasi-admissible curves over P 1 K , instead of a point Spec K (just as in Definition 1.4). Thus, these definitions can be extended to corresponding curves over a general scheme T , assuming that any geometric point t of T has the property that the characteristic of the residue field is 0 or larger than 2g + 1 (when instead g = 1, the standard definition of semistable over T is more delicate whenever the characteristic of geometric point is 2 or 3, and is not analogous to the definitions proposed in this paper).
In particular, a quasi-admissible hyperelliptic fibration (X , H , h, f , s, s ) has the property that H is a P 1 -bundle, and on each geometric fiber of H , each point of the branch divisor away from s has the multiplicity at most 2g. Moreover, X is the double cover of H branched along the branch divisor (which coincides with the branch locus).
To parameterize such fibrations, we first consider the moduli stack H 2g [2g − 1] of quasiadmissible hyperelliptic genus g curves characterized by [8, a point (a 4 , a 6 , a 8 , . . . , a 4g+2 ) of P(4, 6, 8, . . . , 4g + 2) corresponds to the quasi-admissible hyperelliptic genus g curve with the Weierstrass equation Proof Proof of [8,Proposition 4.2(1)] is originally done when p = 0, so it suffices to show that the proof in loc.cit. extends to the case when p > 2g + 1. When p = 0, the proof of loc.cit. shows that the quasi-admissible hyperelliptic curves are characterized by the base P 1 with the branch locus of degree 2g + 1 on A 1 = P 1 \∞, of the form where a 2 = 0 and not all of the rest of a i 's vanish. When p > 2g + 1, any monic polynomial of degree 2g + 1 with not all roots being identical can be written in the same way (via same method) by replacing x by x − a 2 (2g+1) (this is allowed as 2g + 1 < p is invertible). Hence, the moduli stack is indeed isomorphic to P(4, 6, 8, . . . , 4g + 2), with a 2i 's referring to the standard coordinates of P(4, 6, 8, . . . , 4g + 2) of degree 2i.
We are now ready to prove Proposition 1.5.
Proof of Proposition 1. 5 By the definition of the universal family p, any quasi-admissible hyperelliptic genus g fibration f : Y → P 1 comes from a morphism ϕ f : and vice versa. As this correspondence also works in families, the moduli stack L g is a Since any quasi-admissible hyperelliptic genus g fibration f is not isotrivial, ϕ f must be a non-trivial morphism, i.e., the image of f in H 2g [2g − 1]) is 1-dimensional. Since nontrivialness of a morphism is a clopen condition, the corresponding clopen locus (consisting of the union of connected components) Hom >0 ( We now have the following arithmetic invariant of the moduli stack L g,| g |·n over F q . Corollary 5.10 (Motive and weighted point count of L g,| g |·n over F q ) If char(K ) = 0 or > 2g + 1, then the motive of L g,| g |·n in the Grothendieck ring of K -stacks K 0 (Stck K ) is equivalent to Proof This follows from combining Propositions 1.5 and 5.9 with Theorem 1.3.
Explicitly via the birational transformation from one family of curves to another, we construct a geometric transformation from S g (K ) the K -points of the moduli functor S g of the stable odd hyperelliptic genus g ≥ 2 models (see Definition 5.4) over P 1 with a marked Weierstrass point to L g (K ) the K -points of the moduli functor L g := Hom(P 1 , H 2 g [2 g − 1] ∼ = P(4, 6, 8, . . . , 4 g + 2)). In fact, this transformation is injective as Theorem 1.6 shows.
Proof of Theorem 1. 6 The key idea of proof is to construct F by using relative canonical model, a particular birational transformation from the subject of relative minimal model program. We prove this in a few steps, beginning with a preliminary step. We construct and verify properties of F in the other steps: Step 1. Log canonical singularities and log canonical models. The main reference here is [9] when char(K ) = 0, and [29, §5-6] when char(K ) = 0, noting that both references deal with algebraically closed fields instead.
First, we need the following definition for types of singularities of a pair (S, D) of a normal K -surface S and an effective R-divisor D on S: Moreover, if a pair (S, D) is defined over a non-algebraically closed field K , then it is called log canonical if its base-change to K is.
For instance, if S is smooth and D is a reduced simple normal crossing divisor, then (S, D) is log canonical. Similarly, if w ∈ R ∩ [0, 1], then (S, wD) is log canonical under the same assumptions. Note that we cannot consider w > 1 under the same assumptions, as the weight on each irreducible component of D must be at most 1.
For example, consider a stable odd hyperelliptic genus g model (X , H , h, f , s, s ) over K , consider the pair (H K , wB K + (s (P 1 K )) K ) defined over K where the branch divisor of h decomposes as B s (P 1 K ) and w ∈ R ∩ (0, 1/2] is a weight (since B can have components of multiplicity 2 by Example 5.6, we consider weights at most 1/2). To claim that this pair is log canonical under additional conditions on w, it suffices to consider neighborhoods of singular points of H K and support of B K by the above observation.
First, recall that the isolated singularities of H K away from the support of w B K + (s (P 1 K )) K is of type A l for some l by Example 5.5. Hence, the pair is log canonical at neighborhoods of such points (in fact, those points are called canonical singular points of H K ). Also, at a singular point c of the support of B K , H K is smooth and B K is reduced at c but B K admits A l -singularities by Example 5.6. Therefore, the pair has log canonical singularities whenever w ≤ 1 2 + 1 l+1 by [16] (summariezd in [12,Introduction], where the log canonical threshold is the supremum of values w that makes the pair log canonical).
To construct a log canonical model, consider a pair (S, D) as the beginning of this step with projective K -morphism f : S → C into a K -variety C, and assume that D is Q-divisor and S is Q-factorial. If (S, D) is log canonical with K S + D not f -antinef, then [15, Pages 1750[15, Pages -1751 uses key birational geometry results from [9,29] to construct the f -log canonical model, defined below. In fact, analogous arguments from [15, Proof of Proposition 11] implies that the same procedure can be applied to f : (S, D) → C over a field K , leading to the following definition: and D := φ * D where φ : S → S is the induced birational morphism.
If K is not algebraically closed, then the f -log canonical model is the Gal(K /K )-fixed locus of the f K -log canonical model of (S K , D K ).
Step 2. Construction of faithful F : S g (K ) → L g (K ). Fix any member of S g (K ), i.e., a stable odd hyperelliptic genus g model (X , H , h, f , s, s ). Denote B s (P 1 K ) to be the divisorial part of the branch locus of f : X → H (B is also called a branch divisor in literature). Notice that h restricted to B has degree 2g +1. By Step 1 above, (H , 1 2g B +s (C)) is log canonical. Take h-log canonical model of (H , 1 2g B + s (C))/P 1 K to obtain a birational P 1 K -morphism ϕ : (H , 1 2 g B + s (P 1 K )) → (H , D ) where H is a rational fibration over K and D is a R-divisor of H defined over K (c.f. Definition 5.12). Since the only canonical rational curve, defined over an algebraically closed field with 1 2g weights on (2g + 1) points and weight 1 on another point, is a smooth rational curve where the point of weight 1 is distinct from the other points (of weight 1 2g ), H is a P 1 -bundle (given by h : This description shows that D decomposes into 1 2g A + T where A is a divisor of H and T consists of weight 1 points on each geometric fiber of H /P 1 K . Thus, T comes from a section t of h . We will show that H is the P 1 -fibration associated to the desired quasi-admissible hyperelliptic genus g fibration. To finish the construction of the quasi-admissible fibration, take the Stein factorization of ϕ• f . This gives a finite morphism f : X → H and a morphism ψ : X → X with geometrically connected fibers such that ϕ • f = f •ψ. Since f is finite of degree 2 and ϕ is birational, f is finite of degree 2 and ψ is birational. Moreover, B := A + T is the branch locus of f . By calling t to be the unique lift of t on h • f , (X , H , h , f , t, t ) is the desired quasiadmissible hyperelliptic fibration. Define F (X , H , h, f , s, s ) := (X , H , h , f , t, t ).
To see that F is faithful, suppose that there are two isomorphisms between stable odd hyperelliptic genus g models that induce the same isomorphism under F : From the construction of F shown above, induced morphisms X j → X j and H j → H j are birational for each j. Since they are separated varieties over K , (α 1 , β 1 ) must be equal to (α 2 , β 2 ), hence F is faithful.
Step 3. Fullness of F . Given any isomorphism ψ between ( under F , notice that h i 's and h i • f i 's have smooth geometric generic fibers for i = 1, 2 and ψ comes in pairs of isomorphisms ψ 1 : X 1 → X 2 and ψ 2 : H 1 → H 2 (so denote ψ = (ψ 1 , ψ 2 )). Then, ψ lifts to a pair of birational maps ψ = (ψ 1 , ψ 2 ) between X i 's and H i 's which induce isomorphisms on geometric generic fibers and irreducible components of any geometric fiber meeting the sections s i 's or s i 's. To claim that those extend to isomorphisms that induce ψ i 's, it suffices to understand geometric properties of related moduli stacks, as we claim that ψ i 's can be interpreted as an element of I som spaces of such stacks. Observe first that for each i = 1, 2, H i is a Z/2Z-quotient of X i , and K X i + s i (P 1 K ) is ample over P 1 K by the defintion. Since the branch divisor of f i is B i s i (P 1 K ), the log canonical divisor Since X i admits nodes as the only singularities of geometric fibers, B i on each fiber has multiplicity at most 2 at any K -points in the support. Therefore, fibers of the pair (H i , 1 2 B i + s i (P 1 K )) are (( 1 2 , 2g + 1), (1, 1))-stable curves of genus 0 in the sense of [13, §2.1.3], meaning that H i for each i is a family of such curves over P 1 K . Note that the moduli stack M 0,(( 1 2 ,2 g+1),(1,1)) of (( 1 2 , 2 g + 1), (1, 1))-stable curves of genus 0 is a proper (so separated) Deligne-Mumford stack (it easily follows from loc.cit. and [13, Theorem 2.1]), and H i is realized as α i : P 1 K → M 0,(( 1 2 ,2 g+1), (1,1)) . Since there is a nonempty open subset U ⊂ P 1 K such that ψ 2 induces an isomorphism between h −1 i (U )'s, ψ 2 is an element of I som M 0,(( 1 2 ,2g+1),(1,1)) (α 1 , α 2 )(U ). Then, separatedness of M 0,(( 1 2 ,2g+1), (1,1)) implies that ψ 2 extends to an isomorphism between H i 's.
A similar argument shows that ψ 1 also extends to an isomorphism between X i 's (as H g,1 ⊂ M g,1 is a separated Deligne-Mumford stack by [17]), so it suffices to show that ψ i 's commute with f i 's and induce ψ. The commutativity of ψ i 's follows because H i 's are Z/2Z-quotients of X i 's and any isomorphism between families of stable hyperelliptic curves with marked Weierstrass points commute with Z/2Z-actions. Because the birational morphisms X i → X i and H i → H i for any i contract all but irreducible components of fibers over P 1 K meeting marked sections, ψ := (ψ 1 , ψ 2 ) induce ψ as well. Henceforth, ψ maps to ψ under F , proving that F is full.

Remark 5.13
Due to log abundance being a conjecture for higher dimensions, which is a key ingredient of the existence of log canonical models (c.f. [15,Remark 13]), it is unclear whether F in the proof above extends to a functor from the moduli of stable odd hyperelliptic genus g models to L g . If it extends, we expect the functor to be still fully faithful, as opposed to [15,Remark 13] for birational transformations between semistable elliptic surfaces and stable elliptic curves over P 1 . The key obstruction on [15,Remark 13], assuming that the functor discussed in loc.cit. (which is an equivalence) extends, is that the essential surjectivity may not hold on the extension, whereas the functor from Theorem 1.6 is not even essentially surjective to begin with.

Hyperelliptic discriminant 1 g of quasi-admissible hyperelliptic genus g fibration
As we consider the algebraic surfaces X as fibrations in genus g curves over P 1 , the discriminant g (X ) is the basic invariant of X . For the quasi-admissible hyperelliptic genus g fibrations over P 1 , we have the work of [19,20] which describes the hyperelliptic discriminant g (X ).
Proof Since deg f * O P( λ g ) (1) = n is an open condition, Hom n (P 1 , H 2g [2g − 1]) is an open substack of Hom(P 1 , H 2g [2g − 1]). Now, it suffices to show that deg f = n (i.e., deg f * O P( λ g ) (1) = n) if and only if the discriminant degree of the corresponding quasiadmissible fibration is 4g(2g + 1)n. Note that deg f = n if and only if the quasi-admissible fibration is given by the Weierstrass equation y 2 = x 2g+1 + a 4 x 2g−1 + a 6 x 2g−2 + · · · + a 4g+2 Table 1 Table of all tuples ( λ g ) r of length at least two for low genus g = 2, 3, 4. Entry has-when ( λ g ) r has length zero or one r ϕ(r ) g = 2 g = 3 g = 4 where a i 's are sections of O(in), since a i 's represent the coordinates of P(4, 6, . . . , 4g + 2). Then by Definition 5.14, it is straightforward to check that g has the discriminant degree 4g(2g + 1)n.
Now we are ready to count the number |L g,| g |·n (F q )/ ∼ | of F q -isomorphism classes of quasi-admissible genus g fibrations over P 1 F q : Proof of Theorem 1.7 By Theorem 1.2, for a fixed g, it suffices to understand when a connected component Hom n (P 1 , P(( λ g ) r )) (indexed by r ) of I(L g,| g |·n ) is nonempty for λ g = (4, 6, . . . , 4 g + 2); this is equivalent to finding r such that the subtuple ( λ g ) r has length at least two. Table 1 describes all such possible r 's for given low values of g = 2, 3, 4: Summing the weighted point counts of Hom stacks from Proposition 4.5 into Theorem 1.2 gives the desired formula, where we use the division function δ(r , q − 1) (defined in Theorem 1.7) to indicate that we take the contribution of # q (Hom n (P 1 , P( λ r ))) whenever r ∈ R (i.e., r divides q − 1).
The same method directly applies when g ≥ 5.
6 Counting odd-degree hyperelliptic curves over P 1 F q Focusing upon the global function fields F q (t), we need to fix an affine chart A 1 F q ⊂ P 1 F q and its corresponding ring of functions F q [t] interpreted as the ring of integers of the field of fractions F q (t) of P 1 F q . This is necessary since F q [t] could come from any affine chart of P 1 F q , whereas the ring of integers O K for the number field K is canonically determined. We denote ∞ ∈ P 1 F q to be the unique point not in the chosen affine chart. Note that for a maximal ideal p in O K , the residue field O K /p is finite. One could think of p as a point in Spec O K and define the height of a point p. We recall the notion of bad reduction & good reduction: Definition 6.2 Let C be an odd-degree hyperelliptic genus g curve over K given by the odd-degree Weierstrass equation y 2 = x 2g+1 + a 4 x 2g−1 + a 6 x 2g−2 + · · · + a 4g+2 , with a 2i+2 ∈ O K for every 1 ≤ i ≤ 2 g. Then C has bad reduction at p if the fiber C p over p is a singular curve of degree 2g + 1. The prime p is said to be of good reduction if C p is a smooth hyperelliptic genus g curve.
Consider the case when K = F q (t), and a quasi-admissible model f : X → P 1 F q (a quasi-admissible fibration with smooth geometric generic fiber). For simplicity, assume that X does not have a singular fiber over ∞ ∈ P 1 F q . Note that the primes p i of bad reductions of f are precisely points of the discriminant divisor g (X ) = k i · p i , as the fiber X p i is singular over g (X ). When K = F q (t) the global function field, we have g (X ) ∈ H 0 (P 1 , O(4g(2g + 1)n)) by the proof of Proposition 5.15.

Definition 6.3
The height ht( g (X )) of a discriminant divisor g (X ) in P 1 F q is q deg g (X ) . As a convention, if a divisor g (X ) is given as a zero section of any line bundle, then set ht( g (X )) = ∞.
On the fourth line of the equations above, inequality becomes an equality if and only if n := log q B 40 ∈ N, i.e., B = q 40n with n ∈ N.
As there are non-hyperelliptic curves for higher genus g ≥ 3 curves, Z g≥3,F q (t) (B) counts the quasi-admissible hyperelliptic genus g ≥ 3 curves over P 1 F q only.