Arithmetic of hyperelliptic curves over local fields

We study hyperelliptic curves y^2=f(x) over local fields of odd residue characteristic. We introduce the notion of a"cluster picture"associated to the curve, that describes the p-adic distances between the roots of f(x), and show that this elementary combinatorial object encodes the curve's Galois representation, conductor, whether the curve is semistable, and if so, the special fibre of its minimal regular model, the discriminant of its minimal Weierstrass equation and other invariants.


Introduction
In this paper we study hyperelliptic curves y 2 = f (x) over local fields of odd residue characteristic. To a curve we associate a "cluster picture", defined by the combinatorics of the root configuration of f , and show that it encodes many arithmetic invariants of the curve and its Jacobian. We use cluster pictures to get hold of a curve's Galois representation and conductor, determine whether it is semistable and if so obtain the special fibre of its minimal regular model, the discriminant of its minimal Weierstrass model and other invariants.
Throughout the paper K will be a local field, with normalised valuation v, ring of integers O K , uniformiser π, and finite residue field k of characteristic p = 2. We use the shorthand mod m to denote reduction to the residue field. We write G K = Gal(K sep /K) for the absolute Galois group, and I K < G K for the inertia subgroup.
We work with hyperelliptic curves 1 C/K given by Weierstrass equations We write R for the set of roots of f (x) in K sep and c f for its leading coefficient, so that We denote by g the genus of the curve so that |R| = 2g + 1 or 2g + 2.
The main invariant that we are interested in is the configuration of distances between the roots of f . This is captured in the following: Definition 1.1. A cluster is a non-empty subset s ⊂ R of the form s = D ∩ R for some disc D = {x ∈K | v(x − z) ≥ d} for some z ∈K and d ∈ Q. If |s| > 1, we say that s is a proper cluster and define its depth d s to be d s = min r,r ∈s v(r − r ).
It is the minimal d for which s is cut out by such a disc.
It turns out that the cluster data carries a huge amount of information about the arithmetic of C/K. To fix ideas, let us begin with an example. Example 1.2. Let C/Q p be the hyperelliptic curve of genus 3 given by The set of roots is R = {1, 1+p 2 , 1−p 2 , p, 0, p 3 , −p 3 }. There are four proper clusters: of depths 2,3,1 and 0, respectively. We draw cluster pictures by drawing roots r ∈ R as , and draw ovals around roots to represent a cluster: Here we have ordered the roots as they appear in the equation for C. The subscript of the top cluster R is its depth. For all other clusters it is their "relative depth", that is the difference between their depth and that of their parent cluster.
From this picture our results let us extract the following information.
(3) The homology of the dual graph of CF p is isomorphic to Z = with length pairing , = 2. The absolute Galois group of F p acts naturally on it, and the Frobenius element Φ : a → a p acts by Φ( ) = with = −1 p (Thm. 1.14). (4) Fix l = p and a Frobenius element Frob ∈ G Qp (a lift of Φ). Let τ : I Qp → Z l be an l-adic tame character. Then there is a basis for H 1 et (C, Z l ) ⊗ Z lQ l such that σ ∈ I Qp and Frob act as is any polynomial of degree 7 whose coefficients are congruent to those of f (x) modulo p 4 , then the data listed above is the same for the curve y 2 = g(x) (Thm. 1.29).
To deduce (1) to (5) we need very little information beyond the cluster picture displayed above. To be precise, we obviously need the valuation of the leading term c f (in this case 0, as f (x) is monic). Moreover the explicit description of for the Galois representation and the Galois action on homology, and the explicit equations of the curves in the special fibre (but not their genera) also require more delicate information about the roots of f (x) (see Definition 1.12 and Theorem 1.10).
We now present our main results. We first need some terminology to work with clusters. Definition 1.3. If s s is a maximal subcluster, we write s < s and refer to s as a child of s, and to s as the parent of s . We write s = P (s ).
For two clusters (or roots) s 1 , s 2 we write s 1 ∧ s 2 for the smallest cluster that contains them. Definition 1.4. A cluster s is a twin if |s| = 2, and it is odd /even if its size is odd/even. A proper cluster isübereven if it has only even children. A cluster s is principal if |s| ≥ 3, except if either s = R is even and has exactly two children, or if s has a child of size 2g. (See also Table 1.8 for a summary.) Definition 1.5. For a proper cluster s = R we define its relative depth to be δ s = d s − d P (s) .
1.1. Reduction of C and its Jacobian. One of the main outcomes of the cluster approach is that it easily detects the reduction behaviour of the curve C and its Jacobian. It requires one extra invariant (that feels the leading coefficient of f (x)): Definition 1.6. For a cluster s set Definition 1.7. We say that C/K satisfies the semistability criterion if the following conditions hold: (1) The extension K(R)/K has ramification degree at most 2.
(2) Every proper cluster is I K -invariant.
(3) Every principal cluster s has d s ∈ Z and ν s ∈ 2Z.
Theorem 1.8 (=Theorem 10.3). Let C/K be a hyperelliptic curve of genus g. Write Jac C for its Jacobian. Then (1) C is semistable (⇔ Jac C semistable) ⇔ C/K satisfies the semistability criterion.
(2) C has good reduction ⇔ K(R)/K is unramified, there are no proper clusters of size < 2g + 1 and ν s ∈ 2Z for the unique principal cluster.
(3) C has potentially good reduction ⇔ there are no proper clusters of size < 2g + 1. (4) C is tame 2 (⇔ Jac C is tame) ⇔ K(R)/K is tame. (5) Jac C has good reduction ⇔ K(R)/K is unramified, all clusters s = R are odd, and principal clusters have ν s ∈ 2Z. (6) Jac C has potentially good reduction ⇔ all clusters s = R are odd. (7) The potential toric rank of Jac C equals the number of even non-übereven clusters excluding R, less 1 if R isübereven. (8) Jac C has potentially totally toric reduction ⇔ every cluster has at most two odd children.

1.2.
Special fibre of the minimal regular model. For semistable curves we write down explicit charts for a regular model (Proposition 5.5). This then gives us an explicit construction for the special fibre of the minimal regular model in terms of clusters (see Theorem 8.5). We give a simplified statement here. Definition 1.9. A centre z s of a proper cluster s is any element z s ∈ K sep such that v(z s − r) ≥ d s for all r ∈ s; equivalently the cluster s can be written as D ∩ R for the disc D = z s + π ds O K sep . If s = {r} is a singleton, its centre is z s = r. If R is principal then the chains of P 1 s are given explicitly as follows. If s < s are principal, then there is one chain with δ s 2 − 1 P 1 s (resp. two chains with δ s − 1 P 1 s) between Γ s and Γ s if s is odd (resp. even); if a chain has length 0 the components Γ s and Γ s intersect. Every twin t < s with δ t > 1 2 gives a chain of 2δ t −1 P 1 s from Γ s to itself.
In particular we obtain a description of the dual graph of the special fibre and its homology in terms of clusters. The latter has a particularly simple description: roughly speaking, the set of even clusters corresponds to a basis of the homology group. Recall that this homology group is related to the Galois representation, the Tamagawa number of the Jacobian (Lemma 2.22) and the character group of the toric part of the Raynaud parametrisation of the Jacobian (Lemma 2.21). In order to keep track of the Galois action on the dual graph (an analogue of split/non-split multiplicative reduction for an elliptic curves) we need an extra invariant s , which generalises in Example 1.2. Definition 1.11. A cotwin is a non-übereven cluster that has a child of size 2g.
For a cluster s that is not a cotwin we write s * for the smallest cluster s * ⊇ s whose parent is notübereven (and s * = R if no such cluster exists). If s is a cotwin, we write s * for its child of size 2g. For all other clusters s, set s (σ) = 0.
Remark 1.13. Note that s does not depend on the choice of centre z s : if z s is another centre and r / ∈ s then v(z s −r) < v(z s −z s ) so the leading term in the p-adic expansion of z s − r is the same as that of z s − r. Moreover, s restricts to a character on the stabiliser of s that is also independent of the choice of the sign of θ s ; this character is unramified if and only if |I K /I s |(v(c f ) + r / ∈s d r∧s ) is even, where I s < I K is the stabiliser of s. Theorem 1.14 (see Theorem 9.3, Corollary 8.6). Suppose C/K is semistable. Let Υ C denote the dual graph of the special fibre of the minimal regular model of C over O K nr , with its natural action of Gal(k/k). Let A be the set of even non-übereven clusters excluding R. Then (3) H 1 (Υ C , Z) = s∈A a s s a s ∈ Z, s∈B a s = 0 , where B is the subset of clusters s ∈ A such that s * = R.
Our description of the special fibre of the minimal regular model of C also allows us to easily determine whether C is deficient, i.e. has no K-rational divisor of degree g − 1.
Deficiency is used to determine whether the Tate-Shafarevich group of the Jacobian of a curve over a number field has square order (see Section 8 of [27]). (1) R = s 1 s 2 with s 1 , s 2 odd, G K -conjugate and δ s i odd, or (2) R isübereven with R (Frob) = −1 and for all non-übereven s such that s * = R, either d s / ∈ Z or the Frob-orbit of s has even size, or (3) R is a cotwin, its principal child r isübereven with r (Frob) = −1, and for all s such that s * = r, either d s / ∈ Z or the Frob-orbit of s has even size.
In fact, even for curves that are not semistable, we construct a regular model over a field F/K where the curve becomes semistable. The special fibre of the minimal regular model of C over O F nr comes with a natural action of G K , not just G F nr (= I F ), see §2. 4. We describe it explicitly in Theorems 8.5 and 8.7 as well.
1.3. Galois representation. Knowing the explicit Galois action on the special fibre lets us determine the l-adic Galois representation of arbitrary hyperelliptic curves. We use the following shorthand notation: Notation 1. 16. For a curve X/k and a prime l = p write H 1 et (X) = H 1 et (Xk, Q l ), and similarly for curves over K. Notation 1.17. For a cluster s we write G s = Stab(s) for its stabiliser in G K and I s < G s for the corresponding inertia subgroup.
As mentioned above, if C acquires semistable reduction over F , the full Galois group G K acts on the special fibre of the minimal regular model of C over O F nr . In particular, theétale cohomology groups H 1 et (Γ s ) of the components have an induced action of the stabiliser G s , which is closely linked to theétale cohomology of C and which we are able to control explicitly. We obtain the following description. the sum taken over representatives of G K -orbits of even non-übereven clusters. Writing Γ s for the components of the special fibre in Theorem 1.10 over a Galois extension where C acquires semistable reduction, we have the sum taken over representatives of G K -orbits of principal non-übereven clusters. For every such cluster s, there is an isomorphism of I s -modules s , whereγ s : I s →Q × l is any character 3 whose order is the prime-to-p part of the denominator of |I K /I s |λ s .
When C/K is semistable one can in fact also recover the Frobenius action on H 1 et (Γ s ), as we explain in Remark 10.2. Briefly, one can pick the centres z s in Theorem 1.10 to lie in K s , the field cut out by G s , which makes Γ s naturally a curve over the residue field k s of K s . The action of G s on H 1 et (Γ s ) in Theorem 1.19 is then simply via the quotient G s /I s = Gal(k/k s ) and the usual action of Gal(k/k s ) onétale cohomology. One may recover the Frobenius eigenvalues for this action from point counts onΓ s over extensions of k s . In a forthcoming paper [15] we will explain how to reconstruct H 1 et (C) as a full G K -representation from point counts even when C/K is not semistable.
From the explicit description of the Galois representation we deduce the following formula for the conductor. Theorem 1.20 (Theorem 11.3, Corollary 9.4). Let C/K be a hyperelliptic curve. Decompose the conductor exponent of Jac C into its tame and wild parts, n C = n C,tame + n C,wild .
(i) The wild part is given by where S is any set of representatives of G K -orbits of R, ∆ K(r)/K is the discriminant of K(r) over K, and f K(r)/K is the residue degree.
(iii) If C/K is semistable then where A is the set of even non-übereven clusters s = R. 3 Althoughγs isQ × l -valued, the tensored representation is realisable over Q l , and we view it as a Q l -representation in this formula 1.4. Weierstrass equations. By their very nature, clusters are designed to work with Weierstrass equations. We establish criteria in terms of clusters for an equation to be integral (Theorem 13.3) and to be a minimal Weierstrass equation, and give a formula for its discriminant. Definition 1. 21. We say that the Weierstrass equation We say that such an equation is minimal if v(∆) is minimal amongst all integral Weierstrass equations for C. Remark 1.22. One can consider more general Weierstrass equations for C of the form y 2 + Q(x)y = P (x) for Q, P polynomials of degree at most g + 1 and 2g + 2 respectively, and define integral and minimal equations accordingly. Since we work in odd residue characteristic, we can always find a minimal equation with Q(x) = 0.
Our notion of integral Weierstrass equation differs slightly from that of Liu used in [24,Definition 2]. However the resulting notion of minimal equation and minimal discriminant (Definition 3 of op. cit.) is easily seen to coincide. Several additional notions of minimal discriminant appear in the literature for both hyperelliptic curves and more general curves. See for example [21], [33] and [30] for a discussion of these, and [23] for the relationship between them for hyperelliptic curves of genus 2. (1) there are two clusters of size g + 1 that are swapped by Frobenius, d R = 0 and v(c f ) ∈ {0, 1}, (2) there is no cluster of size > g +1 with depth > 0, but there is some G K -stable cluster s of size |s| ≥ g + 1 with d s ≥ 0 and v(c f ) = − r / ∈s d r∧s . Note that even if C is not semistable or if |k| ≤ 2g+1 but y 2 = f (x) satisfies (2) in the above theorem, then it is automatically a minimal Weierstrass equation, as it becomes minimal after a finite field extension. In particular (taking s = R and d R = 0 in (2)), we immediately obtain the following general criterion for the equation to be minimal: Corollary 1.24. Let C : y 2 = f (x) be a hyperelliptic curve over K with f (x) ∈ O K [x]. If f (x) mod m has at least two distinct roots ink, but no root of multiplicity > g+1, and the leading coefficient of f (x) is a unit, then this is a minimal Weierstrass equation.
We also obtain the following result on the discriminant. If C/K is semistable and |k| > 2g+1, then the valuation of the discriminant ∆ min C of a minimal Weierstrass model of C is determined by the formula v(∆ C ) − v(∆ min C ) 4g + 2 = v(c f ) − E + d R (|R| − g − 1)) + g+1<|s|<|R| δ s (|s| − g − 1)), where E = 0 unless there are two clusters of size g + 1 that are permuted by Frobenius and v(c f ) is odd, in which case E = 1.
1.5. Cluster pictures. As we discussed at the beginning, we extract most of our arithmetic data purely from the 'cluster picture' of the roots of f (x). Effectively this is how we propose to think about hyperelliptic curves over local fields. To formalise this slightly, we consider an abstract cluster picture purely combinatorially, without reference to roots of a polynomial.
Definition 1.26. Let X be a finite set and Σ a collection of non-empty subsets of X; elements of Σ are called clusters. Attach depth d s ∈ Q to every cluster s of size > 1. Then Σ (or (Σ, X, d)) is a cluster picture if (1) Every singleton ('root') is a cluster, and X is a cluster.
(2) Two clusters are either disjoint or contained in one another.
(3) d t > d s if t s. Two cluster pictures (Σ, X, d) and (Σ , X , d ) are isomorphic if there is a bijection φ : X → X which induces a bijection from Σ to Σ and d s = d φ(s) .
For a polynomial f (x) ∈ K[x] or a hyperelliptic curve C : y 2 = f (x), the cluster picture Σ f or Σ C is the collection of all clusters of the roots of f , as in Definition 1.1. There is then a purely combinatorial notion of "equivalence" of cluster pictures (Definition 14.7) that keeps track of isomorphisms of curves: Theorem 1.27 (Theorem 14.4, Corollary 14.7). If C and C are isomorphic hyperelliptic curves over K, then their cluster pictures are equivalent. Conversely, if an abstract cluster picture Σ is equivalent to Σ C for some hyperelliptic curve C, then there is a hyperelliptic curve C /K that isK-isomorphic to C and whose cluster picture is Σ.
In fact, in every equivalence class of cluster pictures there is a canonical representative, a 'balanced cluster picture' (see Lemma 15.1). For semistable hyperelliptic curves we explain how to find an isomorphic curve with such a cluster picture; see Theorem 15.2 and Corollary 15.3.
As we have already seen, also keeping track of the Frobenius action on clusters and lets one control many arithmetic invariants: Theorem 1.28 (see Theorem 18.4,Lemma 18.2,Theorem 16.2). The cluster picture of a semistable hyperelliptic curve, together with the action of Frobenius on clusters and the values of s (Frob) for even clusters s, determines the dual graph of the special fibre of its minimal regular model (with genera of components and Frobenius action), the conductor exponent, whether the curve is deficient, and the Tamagawa number and root number of the Jacobian. If |k| > 2g + 1, it also determines the valuation of the minimal discriminant of the curve.
We introduce a notation for cluster pictures that carries this extra data (Notation 18.5). In view of the semistability criterion (Theorem 1.8(1)), it is easy to list and classify all possible cluster pictures that correspond to semistable hyperelliptic curves. We give an example of such a classification by considering semistable genus 2 curves (Theorem 18.7, Table 7) and give their associated invariants (Theorem 18.8, Table 8).
Finally observe that the cluster picture is a fairly coarse invariant of the polynomial f (x). In particular small perturbations of the coefficients of f (x) will not change its associated cluster picture and hence many of the invariants of the corresponding curve.
Here is a precise statement (see Theorem 19.1 for a more general result). Theorem 1.29 (=Corollary 19.3). Suppose C 1 : y 2 = c 1 g 1 (x) and C 2 : y 2 = c 2 g 2 (x) are two hyperelliptic curves with c 1 , c 2 ∈ K × and g 1 (x), where d is the largest depth among the depths of all proper clusters of C 1 , then as G K -modules for every l = p, and C 1 and C 2 have the same conductor exponent and the same root number.
• If C 1 is semistable then so is C 2 . In this case, the special fibres of their minimal regular models over O K nr are isomorphic as curves with an action of Frobenius, their Jacobians have the same Tamagawa number, C 2 is deficient if and only if C 1 is and, if |k| > deg g 1 (x), the valuations of their minimal discriminants are equal.
1.6. Related work. A similar construction to our clusters was already used by Bosch [5, §5] to determine the stable type of hyperelliptic curves. Based on the present article, for semistable hyperelliptic curves Betts [4] has given a description of the Tamagawa number of the Jacobian in terms of clusters, and Kunzweiler (work in progress) has found a simple formula for the other local "fudge factor" |ω/ω o | in the Birch-Swinnerton-Dyer formula for the L-value, as well as a description of an O K nr -basis of integral differentials on the minimal regular model of C. Faraggi and Nowell have found a way to describe the special fibre of the minimal SNC model from the cluster picture for all hyperelliptic curves with tame reduction (work in progress).
For the purposes of applications, a key feature of cluster pictures is that they let one study whole classes of hyperelliptic curves. For instance [25] uses a case-by-case analysis of cluster pictures as an ingredient in establishing the parity conjecture for a large class of abelian surfaces, and [1] uses them to construct explicit hyperelliptic curves of arbitrarily high genus over number fields whose Galois image on Jac C[ ] is the maximal possible.
We would like to alert the reader to a forthcoming paper [17], where the authors plan to summarise various results on hyperelliptic curves, and illustrate them with examples. This explains why examples are virtually non-existent in this, already too long, paper. 1.7. Layout. In §2 we review some facts about models of general curves over local fields andétale cohomology.
In §3 we show that cluster configurations (or, rather, certain collections of discs) give rise to regular model of P 1 K nr and describe its properties (Proposition 3.13). In §4 and §5, we study double covers of those models, and deduce explicit regular models of hyperelliptic curves that satisfy the semistability criterion 1.7. This approach is similar to that of Kausz [21], and has also been exploited by Bouw-Wewers [8] and Srinivasan [33], though each of these works in a slightly different generality to us. In particular, we construct the models under the assumptions of the semistability criterion and so in particular do not assume that all Weierstrass points are rational. We find the minimal regular model ( §5.4), describe the dual graph of its special fibre (Theorem 5.18), give explicit equations for its components (Theorem 5.20) and describe the reduction map from the generic to the special fibre (Prop. 5.23); we deduce the stable model in §5. 8.
In §6 we turn to non-semistable curves and study the natural Galois action on the model that we have over an extension where the curve becomes semistable. We then deduce the semistability criterion (Theorem 7.1), and in §8 describe the Galois action on the special fibre in terms of clusters. In §9 we extract the homology of the dual graph of the special fibre (Theorem 9.3), and, consequently, the toric part of theétale cohomology (Corollary 9.6). The abelian part is addressed in §10, and as a consequence, we get Theorems 1.19 (=10.1) and 1.8 (=10.3). In §11 we then find the formula for the conductor, and classify deficient curves in §12.
In §16 and §17 we study the discriminant and the minimal Weierstrass equation of a hyperelliptic curve, proving Theorems 1.23 (=17.2) and 16.2 (=16.2). This is primarily a combinatorial cluster yoga, relying on the semistability criterion to convert semistability into cluster language. In §18 we propose a notion of a 'reduction type' of a semistable curve, and give classfication in genus 2. In §19 we study the variation of the coefficients of a curve that does not affect its primary arithmetic invariants, and prove Theorem 19.1 and Corollary 1.29 (=19.3).
In Appendix A we review affine automorphisms of (possibly singular) hyperelliptic equations. Appendices B and C prove some technical results concerning centres of clusters and equivalent forms of the semistability criterion. Finally, Appendix D links the results of this paper to its combinatorial predecessor [16].
1.8. Notation. For the reader's convenience, the following tables gather the general notation and terminology that are used throughout the paper. We reserve gothic letters s, t, s 1 etc. for clusters (except for "mod m"). Tables 1 and 2 list the general notation associated to fields and hyperelliptic curves. Tables 3 and 4 summarise the notation and terminology associated to a cluster s, and the main functions and invariants associated to clusters. Table 5 presents the main notation associated to a disc D, as used in §3-7.
for σ ∈ I K , where τ : I K → Z l is the l-adic tame character, and Frob → 1 π F mod m, for σ ∈ G K , see Definition 8.2 e residue degree of a finite Galois extension F/K mod m reduction to the residue field Table 2. General notation associated to a hyperelliptic curve C hyperelliptic curve given by   Table 5. General notation associated to discs All of this is standard, except we want the residue field to be non-algebraically closed, and so have to keep track of the Galois action throughout the section.
Let K be a local 4 field, with uniformiser π and residue field k. Suppose C/K is a non-singular projective curve, of genus g ≥ 2.
A model of C/K is a flat proper scheme C/O K together with a K-isomorphism of its generic fibre with C. It is a regular model if C is regular, and such a model can always be obtained from a given model by repeated blowups. Among regular models, there is a unique one dominated by all the others, the minimal regular model A model is semistable if its special fibre C k is geometrically reduced and has only ordinary double points as singularities, and when such a model exists we say that C/K is semistable or has semistable reduction. Such a model always exists over some finite extension F/K [11]. When one exists over K, the minimal regular model is semistable as well, and blowing down certain components of the special fibre yields a stable model characterised among semistable models by the fact that its special fibre has a finite automorphism group (i.e. it is a stable curve). It is again unique, though it is not necessarily regular, and it commutes with base change, as opposed to the regular model.
original model minimal regular model semistable model Figure 1. Models of y 2 = x 3 + p 2 over Q p and Q p ( 3 √ p) an elliptic curve with additive reduction. The defining equation gives a model C/Z p that is neither regular (the ideal (0, 0, p) gives a singular point) nor semistable (the special fibre has a cusp). Its minimal regular model C min /Z p has three P 1 s meeting at a point as a special fibre (Kodaira type IV). The curve C becomes semistable over Q p ( 3 √ p), since (2.2) y 2 = x 3 + π 6 ∼ = y 2 = x 3 + 1 (π = 3 √ p), 4 In fact, here and in §2.2, K could be any complete discretely valued field with perfect residue field. and the latter has good reduction: the special fibre is an elliptic curve over y 2 = x 3 + 1 over F p .
We begin by reviewing special fibres of semistable models.
2.1. Semistable curves over the residue field. We follow [20, pp. 469-474] closely, except our description of X(T ) in (2.5) is slightly tweaked. Let Y /k be a semistable curve, that is Y is complete, connected, not necessarily irreducible, and the only singularities of Yk = Y × kk are ordinary double points. Write n = normalisation mapỸ → Y , I = set of singular (ordinary double) points of Yk, J = set of irreducible components of Yk (=connected comps. ofỸk), K = n −1 (I); this comes with two canonical maps φ : K → I, P → n(P ), ψ : K → J , P → component ofỸk on which P lies, Υ = dual graph of Yk.
2.1.1. Dual graph. By a metric graph we mean a topological space G homeomorphic to a finite (combinatorial) graph, equipped with a set V (G) of vertices (containing (at least) all points x ∈ G of degree = 2), a set E(G) of edges, and a length function l : E(G) → R >0 . Graph isomorphisms are homotopy classes of homeomorphisms that preserve vertices, edges and lengths. We allow loops and multiple edges and note that automorphisms may permute multiple edges and reverse the direction of loops. Note that automorphisms act naturally on the first singular homology group H 1 (G, Z).
The dual graph Υ is the metric graph with vertex set J and edge set I. The set K is the set of edge endpoints, the maps φ and ψ specify adjacency, and each edge is given length 1. It comes with a natural 'genus' marking g : V (Υ) → Z ≥0 which associates to each vertex the (geometric) genus of the component to which it corresponds. Note that a graph automorphism of Υ is precisely the data of bijections K → K, I → I and J → J that commute with φ and ψ.
2.1.2. Character group. The normalisation map n is an isomorphism outside I, and yields an exact sequence of sheaves on Y , Consider the long exact sequence on cohomology, The global sections of I are in bijection with invertible functions on K modulo those pulled back from I. In other words, where φ * takes a function I →k × to K →k × by composing it with φ. With ψ * defined in the same way, the exact sequence above becomes In fact, there is an exact sequence of algebraic groups with T the largest torus in Pic 0 (Y ). Then (2.3) gives a canonical identification of its character group X(T ) = Hom(Tk, G m,k ) as On the other hand, write the dual graph Υ as the union Υ = U ∪ V , where U is the union of open edges, and V is the union of small open neighbourhoods of the vertices. Then the Mayer-Vietoris sequence reads and all their higher homology groups vanish. Therefore, the character group of T and its Z-linear dual are, canonically, On the level of Tate modules T l , l = char k, the sequence (2.4) becomes There is a length pairing on H 1 (Υ, Z): let e, e = 1 and e, e = 0 for edges e = e of Υ, and extend to singular chains by linearity. This descends to a pairing on H 1 , Finally, it is clear that I, J , K, X(T ), X(T ) * , H 1 (Υ, Z), T l are all G k -modules, and (2.6), (2.7), (2.8) are compatible with G k -action, as everything is canonical.
2.2. Semistable Jacobians. Now we go back to C/K, and suppose it has semistable reduction. Then the Jacobian A = Jac C is a semistable abelian variety over K. Let with special fibreN /k; the identity componentN 0 is Pic 0C . Φ(k) = (finite) group of componentsN /N 0 . T /k = toric part of Pic 0C , as in (2.4). By the work of Raynaud ([28], [20] By the rigidity of tori, we have X(T ) = X(T ) and so X(T ) * = X(T ) * . The dual abelian variety A t /K nr has semistable reduction as well, and there is a sequence as above with T * , A * and B * ∼ = B t ([20] Thm. 5.4). Raynaud constructs a canonical map X(T * ) → A(K nr ), inducing a G K nr -isomorphism In the case of elliptic curves with split multiplicative reduction, this is Tate's parametri- Combining X(T * ) → A(K nr ) with (2.9), we get an inclusion (2.10) n : X(T * ) → Hom(X(T ), Z) with finite cokernel, which is canonically isomorphic to the group of components Φ(k). We may view n as a non-degenerate bilinear pairing, the monodromy pairing, If K /K is a finite extension, then X(T ) and X(T * ) remain the same modules by uniqueness of Raynaud parametrisation, and the map n becomes e K /K n, see [20, 10.3.5].
Because A is a Jacobian, it has a principal polarisation A Finally, as in §2.1, G k acts on everything, and (2.11), (2.12), (2.13) are G k -equivariant.
2.3. Galois and inertia. As K is a local field, G K = Gal(K/K) fits into an exact sequence with I K the inertia group, and G k ∼ =Ẑ topologically generated by the map x → x q . Any of its lifts to G K is called an (arithmetic) Frobenius element Frob. Write χ l : for the l-adic cyclotomic character, and Z l (n) = χ ⊗n l for the Tate twist of the trivial module Z l .
The inertia group I K has a unique p-Sylow subgroup, the wild inertia P K , and we have a short exact sequence The tame inertia I K /P K projects onto Z l via the l-adic tame character 2.4. General curves. Fix C/K = arbitrary non-singular projective curve of genus ≥ 1, A/K = Jacobian of C, F/K = finite Galois extension over which C is semistable, with residue field k F , ring of integers O F and uniformiser π, C min /O F nr = minimal regular model of C/F nr , with special fibreC (semistable curve), and normalisationC, N /O F = Néron model of A/F nr , with special fibreN , J = set of connected comps. ofC, Υ = dual graph ofC, as in §2.1. For σ ∈ G K , the model C σ min is again a stable model of C/F , and so C σ min ∼ = C min , canonically. As explained in [18] (see also [10, p. 13] and [32, p. 497]), this implies that the Galois action G K ü C(K),A(K) extends to a semilinear action on the geometric points of the special fibresC,N andC, It is computed as follows. LetC ns (k) ⊂C(k) be the non-singular locus. Write red for the reduction map (2.15) red : C(F nr ) It is surjective by Hensel's Lemma, so take a section red −1 :C ns (k) → C(F nr ). Then on C ns (k), the map s is the composition (cf. [18,Thm 1.5], except there red −1 is chosen to land in C(F ), which is a bit more general) The reduced curveC has a natural structure of a k-scheme; denote by Φ :C →C the absolute Frobenius map, acting on K(C) by raising everything to the power |k|. If σ = Frob n τ for some n ∈ Z ≥0 and τ ∈ I K , then s(σ) = Φ ng for some k-linear automorphismg ofC. In particular, n = 0 for σ in the inertia group I K , and s(I K ) = I F/K is finite, acting through honest k F -scheme automorphisms. Note that for every σ in the Weil group of K (i.e. of the form σ = Frob n τ as above, but with n ∈ Z), either s(σ) or s(σ −1 ) is a morphism of schemes, so that (a) (2.16) determines it uniquely (on the whole of G K , as the Weil group is dense in it), though it is only defined on the non-singular points, and (b) the action of s extends naturally to the action onC(k), (2.17)s :C(k) →C(k), on N (k), and on the dual graph Υ. Applying this to the l-power torsion points of A = Pic 0 (C), from (2.6), (2.7) and [8,Prop. 2.6] (see also [10, p.14]) we find an isomorphism of and G K acting through s on the spaces on the right. Twisting by Q l (1) gives a similar decomposition for theétale cohomology group H 1 et (CK, Q l ). See [18,Cor 1.6] for details, noting that Example 2.19. Consider the curve from Example 2.1 over K = Q p (p > 3), Fix a primitive 3rd root of unity ζ ∈K and π = 3 √ p. Let K = K(π), and F = K(ζ, π), its Galois closure. Thus, Gal(F/K) ∼ = S 3 if p ≡ 2 mod 3, and F = K with Gal(F/K) ∼ = C 3 otherwise. In either case, the inertia group I F/K is C 3 , generated by τ that sends π → ζπ. Let Φ be a Frobenius element of K ; so Φ fixes π and sends ζ → ζ p . So G = Gal(F nr /K) = τ, Φ ∼ = C 3 Ẑ . Recall from 2.1 that C acquires good reduction over K , and thus over F as well, and the special fibre of its minimal model is the curveC : y 2 = x 3 + 1. Using the isomorphism (2.2), the reduction map (2.15) becomes red : C(F nr ) −→C(F p ) (x, y) −→ ( x π 2 , y π 3 ) mod π. The semilinear action s of G K in (2.16) factors through G and is given by We refer the reader to [14, §6] and [13, §3-4] and [8] for additional examples, and explicit computations of Galois representations attached to curves.
We also recall the formula for the local root number of the Jacobian in the semistable case: Theorem 2.20. Let C/K be a semistable curve. Then the local root number of the Jacobian A = Jac C is w A = (−1) a , where a is the multiplicity of the trivial representation of G k in the homology of the dual graph H 1 (Υ, Q) of C.
Proof. This is a standard root number computation, see e.g. [12,Prop. 3.23] with τ = 1 and X(T ) = X(T ) = H 1 (Υ, Z) by (2.6). Lemma 2.22. Suppose C/K is semistable. Let Φ be the component group of the Néron model of the Jacobian of C over K nr . Then Φ is isomorphic, as a G k -module, to the cokernel of Proof. Apply [7, Thm. 9.6/1] over K nr .
Remark 2.23. The size of the G k -invariants of Φ is known as the Tamagawa number of the Jacobian of C over K.
3. Regular semistable models of P 1 In this section we show how certain finite collections of discs (see Definition 3.2) give rise to regular semistable models of the projective line over K nr . We then describe (Proposition 3.13) the divisor of a polynomial on this model. In the next section, given a hyperelliptic curve C/K : y 2 = f (x) satisfying the semistability criterion we use this to associate to C a particular model of P 1 K nr on which the divisor of f (x) has nice properties (see Proposition 4.16). We then deduce that the normalisation of this model in the function field K nr (C) is a regular model of C/K nr (Theorem 5.2) from which several of our main theorems follow.
The relationship between discs and models of the projective line is not new and roughly proceeds as follow. To each disc there is a naturally associated valuation on K(x) (we recall this construction in Section 3.1.2). Now by [29,Proposition 3.4] (see also [26,Section 5]) there is a one to one correspondence between normal models of P 1 K nr and finite non-empty collections of 'inductive' valuations on K nr (x), the map taking a model to the set of valuations corresponding to the local rings at the generic points of the components of its special fibre. Our model is the one yielding the same collection of valuations as that associated to the collection of discs. To facilitate in the analysis of the model however we construct it below using explicit charts. That these two descriptions agree follows from Proposition 3.13. For a more general correspondence between normal models of P 1 K nr and collections of 'rigid diskoids' see [29,Proposition 4.4], [26, Section 5.1].
for some z ∈K and d ∈ Q. Here d is an invariant of the disc, its depth, denoted d D . If D has depth d D and z ∈ D then D = D z,d D ; we call any z ∈ D a centre of D. We say a disc is integral if it has a centre in K nr and integer depth. For an integral disc D we denote by P (D) its 'parent' integral disc P (D) = D z D ,d D −1 for any z D ∈ D. We say integral discs D and D are adjacent if one is the parent of the other. Writing R ⊆K for the (multi)set of roots of f (x) and c f for its leading coefficient, factoring f (x) as a product of linear polynomials it follows from the fact that ν D is a valuation extending v that

3.2.
Admissible collections of discs. The following collections of discs will correspond to regular semistable models of P 1 K nr . Definition 3.2. Call a finite non-empty collection D of integral discs admissible if (i) D has a maximal element D max with respect to inclusion, To such D we associate the finite connected rooted tree T D with vertices {v D | D ∈ D} and root v Dmax , where v D and v D are joined by an edge when D and D are adjacent. We write D i (resp. D ≤i ) for the subset of D consisting of discs whose associated vertices are a distance i (resp. at most i) from the root. Remark 3.3. We will see in Proposition 3.10 that T D is canonically the dual graph of the model of P 1 K nr associated to D. 3.3. The model of P 1 K nr associated to an admissible collection of discs. Notation 3.4. For the rest of this section we fix an admissible collection of discs D, along with a choice of centre z D ∈ K nr for each D ∈ D.
In what follows denote by O the ring of integers of K nr and, as in the introduction, let π denote a fixed choice of uniformiser for K. We now associate to D a model Y D /O of P 1 K nr , first introducing some objects and notation which will be useful for the construction.
We denote by Y D the glueing of U D and W D over the subsets {x D = 0} and {t D = 0} via the isomorphsim O with variable s D at the origin on the special fibre (see e.g. [22,Lemma 8.1.4]). Its special fibre consists of two irreducible components intersecting transversally at the single closed point s D = t D = 0. One component (the exceptional fibre of the blow up) is isomorphic to P 1 k with variable x D and we denote it E D . The other is isomorphic to A 1 k with variable s D . It is contained entirely in the complement of U D and we denote it F D . Definition 3.7. Let D ∈ D. We define a 'reduction' map D →k (which depends on the choice of centre z D for D) by setting Note that this gives a bijection between closed points on the special fibre of U D and maximal integral subdiscs D of D, sending D to the point x D = red D (z D ) for any z D ∈ D. Since this does not depend on the choice of centre z D we henceforth write red D (D ) in place of red D (z D ). We denote by P D the finite set of points on the special fibre of U D corresponding to maximal integral subdsics of D which are in D. Similarly, let Q D denote the finite set of closed points on the special fibre of W D of the form for D ∈ D a 'sibling' of D (i.e. such that D = D is a maximal integral subdisc of P (D)).
In what follows we will at times wish to consider the scheme W D P D , viewing both P D and W D as subsets of Y D to form the complement.  In this way we talk about components E D of Y D ≤i . We will denote by ∞ the point on Y D ≤i corresponding to t Dmax = 0 on the generic fibre of Y Dmax , and denote by {∞} its closure in the model. We then define Y D to be equal to Y D ≤n for n minimal such that We make this a model of Now given Y D ≤i we obtain Y D ≤i+1 by blowing up Y D ≤i at the finite set D∈D i P D of closed points on its special fibre.
Explicitly, since blowing up is a local process, Y D ≤i+1 is given by glueing each of the schemes Y D Q D for D ∈ D i+1 onto Y D ≤i := Y D ≤i D∈D i P D over the open subsets given by removing E D from the special fibre of Y D Q D (D ∈ D i+1 ), and removing {∞} ∪ D =P (D) E D from Y D ≤i . The glueing maps are given, for D ∈ D i+1 , by In the function field of Y D we have, for each D ∈ D,  Proof. Since Y D is obtained by iteratively blowing up P 1 O at a finite set of closed points on the special fibre it follows that Y D is proper and regular. Since none of these points were intersection points between components of the special fibre, Y D is semistable (as can also be seen from the explicit charts covering Y D ). The dual graph is equal to T D by construction.
Finally, write µ D for the valuation associated to E D . It is the valuation on K nr (x) associated to the prime ideal (π) of O[x D ], where x = π d D x D + z D . Since both ν D and µ D are valuations, to show that they are equal it suffices to show they agree on all polynomials. Now for f (x) ∈ K nr [x], it follows from the definition of ν D that but not in the ideal (π). Thus µ D (π −ν D (f ) f (x)) = 0 and the result follows.
3.4. The divisor of a polynomial on the model Y D . We now describe the divisor of a polynomial f (x) ∈ K nr [x] on the model Y D , first introducing some notation with which to describe the result.
Note that if f (x) is a polynomial with (multi)set of roots R then (3.1) gives (3.12) κ and let Z ver (resp. Z hor ) denote its vertical (resp. horizontal) parts.
(i) We have (ii) Z hor does not meet any of the intersection points between components of the special fibre of Y D if and only if Suppose that (3.14) holds. Then and for all integral discs D with P (D) ∈ D and κ D (f ) ≥ 2, we have D ∈ D also.
We postpone the proof to the end of the section, beginning by defining certain auxhilliary polynomials associated to f (x).
. In particular, upon proving Proposition 3.13(i) it follows that, for each D, f D (resp. g D ) gives a local equation for Z hor on U D P D (resp. W D (P D ∪ Q D )).
To simplify notation, for each 0 Considering the Newton polygon of the polynomial f (π d D −1 x + z D ), the valuation of the ith coefficient of which is λ i , we see that j is equal to the sum of the lengths of the projections onto the horizontal axis of all segments in the Newton polygon having strictly negative slope. By standard properties of Newton polygons this is equal to the number of roots of f (π d D −1 x + z D ) having strictly positive valuation or, equivalently, equal to the number of roots (i) Let D be a maximal integral subdisc of some D ∈ D. Then the closed subscheme [22,Lemma 4

.2.2]). This happens if and only if either
and since we are done.
(ii): This may be proved analogously to (i).
Proof of Proposition 3.13. (i). Follows from Proposition 3.10 which shows that ν D is the valuation on K nr (x) corresponding to E D .
(ii). Follows from Lemma 3.17 noting that by Remark 3.16, for any D = D max , g D (s D , t D ) is a local equation for Z hor on W D (P D ∪ Q D ), where the intersection point between E D and E P (D) corresponds, in the notation of the lemma, to the point R D .
(iii) and (iv). The argument is similar to that of (ii) and follows by combining Remark 3.16, Lemma 3.18, (ii) and the description of the closed points on the special fibre of Y D afforded by Remark 3.9. We note that the condition D ∈ D in (iv) ensures that the point x P (D) = red P (D) (D) is removed from U P (D) when forming the model.
4. An explicit model of P 1 assuming the semistability criterion Suppose now that C/K : y 2 = f (x) is a hyperelliptic curve satisfying the semistability criterion (Definition 1.7). In this section we associate to C an admissible collection of discs (in the sense of Definition 3.2) which we call 'valid discs', and which are closely related to the cluster picture of C. Using the results of the previous section we then study the divisor of f (x) on the associated model of P 1 K nr , the main result being Proposition 4.16. This shows in particular that the conditions of [33, Lemma 2.1] are satisfied, so that the normalisation of this model of P 1 K nr in the function field K nr (C) is a regular proper model of C/K nr . This, and its consequences, are treated in Section 5. We remark that this approach to constructing regular models of hyperelliptic curves in not new and appears in [21], [33] and [8], although each of these assumes that all roots of f (x) lie in K (or at least K nr ). In particular, these constructions do not cover all curves satisfying the semistability criterion as is needed in our situation.

4.1.
Notation. In this section we freely apply the notation and terminology associated to clusters as set out in Table 1.8. As in the introduction we denote by R ⊆K the set of roots of f (x). We also frequently use the following additional definition. Note that for any proper cluster s, the disc D(s) has depth d s and, in the notation of Definition 1.6 and section 3.1.2, it follows from (3.1) that ν D(s) (f ) = ν s .
We also note here that by part (1) of the semistability criterion, all roots of f (x) are defined over the unique quadratic extension of K nr . In particular, every proper cluster s ⊆ R has depth d s ∈ 1 2 Z, and if r ∈ R with r / ∈ K nr then denoting by r its inertia-conjugate root we have v(r − r ) ∈ 1/2 + Z.

4.2.
The collection of valid discs. To first approximation the set of valid discs consists of all discs of the form D(s) for a proper cluster s, along with all integral discs between them. However, the precise definition is slightly more complicated, mainly owing to the failure of some proper clusters to have integer depth. The following lemma characterises this phenomenon. Lemma 4.2. Let s ⊆ R be a proper cluster. Then s has a centre in K nr . Moreover, d s ∈ Z unless we have either (i) s = {r, r }, or (ii) s = R has a unique proper child s , which has size 2g, and s s = {r, r }, for two inertia-conjugate roots r, r / ∈ K nr . In these cases we have d s ∈ 1/2 + Z.
Proof. Since the hyperelliptic curve C : y 2 = f (x) satisfies the semistability criterion, R is tamely ramified and every proper cluster inertia invariant. In particular, every proper cluster has centre in K nr by Lemma B.1. Now for a proper cluster s, if s = {r} ∧ {r } for two inertia-conjugate roots r, r / ∈ K nr , then d s = v(r − r ) ∈ 1/2 + Z, whence s is not principal (see Definition 1.4). An easy case by case analysis shows that this forces s to fall into one of cases (i) or (ii) above. Otherwise, for any two (not necessarily proper) children s 1 and s 2 of s we may find centres z 1 and z 2 in K nr respectively. Then v(z 1 −z 2 ) is an integer and it follows that d s , being the minimum of such valuations as s 1 , s 2 vary over all children of s, is an integer also. Remark 4.3. The lemma shows that for any proper cluster s, the disc D(s) is integral save when s falls into one of the cases (i) or (ii) above.
(A) R has a unique proper child s, which has size 2g, and d R ∈ 1/2 + Z, (B) R has size 2g + 2 and a child of size 2g + 1.
We define the integral disc D max as follows. If R is not exceptional set D max = D(R).
If R is exceptional of type A define D max to be the maximal integral disc cutting out the child of size 2g, and if R is exceptional of type B let D max be the defining disc of the child of size 2g + 1.
We now say that an integral disc D is valid if it is contained in D max and |D ∩ R| ≥ 2. We denote the collection of all valid discs by D, noting that D is admissible in the sense of Definition 3.2.
Remark 4.5. When R is exceptional of type A, if z s ∈ K nr is a centre for the child s of size 2g then D max = D zs,d R −1/2 . Moreover, it follows from Lemma 4.2 that d R ∈ 1/2+Z alone forces R to be exceptional of type A. Notation 4.6. For the rest of this section fix a choice of centre z D ∈ K nr for each valid disc D (this is necessary to use the notation of the previous section when talking about the model of P 1 K nr associated to the collection of valid discs, since such a choice was made in Section 3.3).

4.3.
The quantity κ D (f ). By Proposition 3.13, to study the divisor of f (x) on the model associated to the collection of valid discs we wish to understand the quantities ν D (f ) and κ D (f ) for integral discs D. We begin by considering the second of these functions.
Lemma 4.7. Let D be an integral disc. Then κ D (f ) = |D ∩ R| unless either of the following hold: In particular, if D = D max is a valid disc then κ D (f ) = |D ∩ R|.
Will will need the following easy lemma, whose proof we omit.
Lemma 4.8. Let D be a disc with centre in K nr and non-integral depth d D . Then D has a unique maximal proper integral subdisc given by D z D , d D for any z D ∈ D ∩ K nr .
Proof of Lemma 4.7. Fix an integral disc D = D z D ,d D with z D ∈ K nr and suppose κ D (f ) = |D ∩ R|. By (3.12) we have Fix r ∈ R contributing non trivially to the right hand side. Then necessarily r / ∈ K nr and, denoting by r its inertia-conjugate root, Thus z D is a centre for s and we deduce that D is the maximal integral subdisc of D(s) afforded by Lemma 4.8. By Lemmas 4.2 and 4.8, D is now one of the discs claimed and the rest follows.

The parity of ν D (f ).
Lemma 4.9. Let s be a proper cluster with d s ∈ Z. Then ν s is even unless s = R has size 2g + 2 and R = s 1 s 2 is a union of two odd children with one of the δ s i odd (equivalently both if they have size ≥ 3, cf. Lemma C.6).
Proof. By the semistability criterion every principal cluster s has ν s even. Now combine Lemma 4.2 with Lemma C.5.
We now use this to characterise the valid discs D for which ν D (f ) is odd (resp. even). Proof. First note that by Lemma 4.
To prove the lemma, note first that if D(s) is integral and ν s even then we conclude by applying (4.11) with D 1 = D(s) and D 2 = D. If D = D max and R = s 1 s 2 is a union of two odd proper children then we conclude by applying (4.11) with D 1 = D(s 1 ) and D 2 = D max . Now by Lemmas 4.2 and 4.9 the only remaining case is s a twin with δ s ∈ 1/2 + Z. Applying (4.11) with D 1 = D and D 2 = D(P (s)) shows that ν D (f ) is even as desired, since ν P (s) is even by Lemma 4.9.
4.5. The model of P 1 associated to the collection of valid discs. Definition 4.12. Define Y disc /O to be the regular, proper, semistable model of P 1 K nr associated to the collection of valid discs via Definition 3.8.
We retain the notation of Section 3 to talk about Y disc . Thus the components of its special fibre are indexed by discs D ∈ D, the component corresponding to a disc D being isomorphic to P 1 k with variable x D , and denoted E D . The point at infinity on the generic fibre of Y disc is denoted ∞, and {∞} denotes the closure of this point in Y disc . Its intersection with the special fibre is the point at infinity on the component E Dmax .
, and div(f ) hor denotes the horizontal part of the divisor of f (x).
Remark 4.14. In the next section we will consider the normalisation of Y disc in the function field of C : y 2 = f (x), which we denote C disc . We show in Theorem 5.2 that the divisor B above is the branch locus of the associated morphism C disc → Y disc .
To describe the divisor of f (x) on Y disc it will be convenient to introduce the following notation. Proposition 4.16. Let C/K : y 2 = f (x) be a hyperelliptic curve satisfying the semistability criterion and let Y disc /O and B ∈ Div(Y disc ) be as above. Then B is effective, regular, and div(f ) ≡ B (mod 2) inside Div(Y disc ). Moreover, the horizontal part B hor of B meets the special fibre of Y disc at precisely the following points: • the point at infinity on for a proper cluster s and s < s is either a singleton, or a twin with d s = d s + 1/2 (note that these points are distinct as we vary s ), Proof. It follows from Proposition 3.13 (i) along with the definition of ω D (f ) that B ≡ div(f ) (mod 2), and its clear that B is effective.
Combining Proposition 3.13 (iii), (iv) and (v) with Lemma 4.7, we see that B hor is regular and meets the special fibre Y disc,k of Y disc precisely at the points claimed (in particular B hor does not meet any intersection points between the components of Y disc,k ).
Next it follows from Lemma 4.10 that if D 1 and D 2 are adjacent valid discs then ν D 1 (f ) and ν D 2 (f ) are not both odd. As any two components E D 1 and E D 2 are individually regular, and intersect if and only if D 1 and D 2 are adjacent, we deduce that the vertical part B ver of B is regular.
To conclude we claim that B hor and B ver are disjoint, i.e. that if B hor meets E D then ν D (f ) is even. This follows from Lemma 4.10.
4.6. The dual graph of Y disc . By Proposition 3.13 the dual graph of Y disc is the graph T D associated to the collection of valid discs as in Definition 3.2. Here we describe this graph in terms of clusters. We begin with an explicit description, and then recast this in terms of the purely combinatorial notions introduced in [16]. For convenience, we summarise the relevant parts of that paper in Appendix D.
Notation 4.17. Let T D denote the graph obtained from T D by removing from the vertex set (keeping the underlying metric space the same) all v D corresponding to discs D = D max for which there is a smaller valid disc cutting out the cluster D ∩ R.
• one vertex v s for each cluster s which is not a twin t with δ t = 1/2, -R if either R has size 2g + 2 and a child of size 2g + 1, or a child s with |s| = 2g and δ s = 1/2, • an edge of length δ s between v s and v P (s) (should P (s) yield a vertex).
Proof. This follows from Lemma 4.2 and the definition of the collection of valid discs.
In Example D.2 it is shown how, to f (x), one may associate a purely combinatorial object called a metric cluster picture (Definition D.1). To this one may then formally associate a certain metric graph called a BY tree (this procedure is explained in Definition D.6) which is very closely related to the dual graph of (the special fibre of) Y disc , as the following result shows. This will be important later since it enables us to apply combinatorial results of [16] to hyperelliptic curves. Lemma 4.19. Let Σ denote the metric cluster picture associated to f (x), and T Σ denote the associated BY tree. Define T Σ to be the graph obtained from T Σ by (in order) • halving the length of all yellow edges, • replacing each edge of length l ∈ 1/2 + Z joining a leaf v to a vertex v , with an edge of length l (identifying v and v if l = 0), • adding a vertex v R on the edge joining v s 1 and v s 2 , at a distance δ s 1 from v s 1 , if R has size 2g + 2 and is a disjoint union of two proper clusters s 1 and s 2 .
Then the map sending a vertex v D ∈ T D to the vertex v D∩R ∈ T Σ is an isomorphism of metric graphs.
Proof. Combine Lemma 4.18 with the description of T Σ given in Definition D.6.
Remark 4.20. When all the roots of f (x) lie in K nr , so that all relative depths are integers, it follows from Lemma 4.19 that T D is simply the result of halving the length of all yellow edges in T Σ (up to possibly adding in a vertex corresponding to the cluster R).

A regular model of C assuming the semistability criterion
As in Section 4 let C/K : y 2 = f (x) be a hyperelliptic curve satisfying the semistability criterion (Definition 1.7). We begin by using the results of the previous section to give an explicit regular proper model of C/K nr . We then use this to determine the minimal proper regular model of C and show that it is semistable. Having done this, we preceed to describe the special fibre of the minimal regular model and relate this to the cluster picture of f (x).
We continue to denote the ring of intgers of K nr by O. As in Notation 4.6 we fix centres z D ∈ K nr for each valid disc D (see Definition 4.4). Let Y disc /O be the model of P 1 K nr associated to the collection of valid discs as in Definition 4.12, and let B ∈ Div(Y disc ) be as in Definition 4.13, so that by Proposition 4.16 B is effective, regular, and congruent to div(f ) modulo 2.
Definition 5.1. Define the scheme C disc /O as the normalisation of Y disc /O in the function field K nr (C) of C/K nr . Denote by φ : C disc → Y disc the associated normalisation morphism. We write C disc,k for the special fibre of C disc .
Theorem 5.2. Let C/K : y 2 = f (x) be a hyperelliptic curve satisfying the semistability criterion. Then C disc /O is a proper regular model of C and φ : C disc → Y disc is finite flat of degree 2 with branch locus B.
Proof. That the normalisation morphism is finite flat of degree 2 is standard (the degree being equal to the degree of K nr (C)/K nr (x)). In particular, C disc /O is proper since both φ and Y disc /O are. That C disc is regular is a consequence of the regularity of both Y disc and B (the latter requiring the semistability criterion, see Proposition 4.16), and follows from [33, Lemma 2.1] (taking Y = Y disc and f = f (x) in the statement). Indeed, from the definition of B, one sees that, writing div(f ) = i∈I m i Γ i as in the notation of loc. cit., the divisor B is equal to i∈Im i Γ i form i ∈ {0, 1} congruent to m i modulo 2. It's then clear that regularity of B forces the hypothesis (a) and (b) of loc. cit. to be satisfied, guaranteeing the regularity of the normalisation of Y disc in K nr (C). Finally, the claim about the branch locus follows from the description of the normalisation of the local rings given in the proof of loc. cit., noting that for a point P of Y disc , P lies on B if and only if, in the expression for div(f ) as i∈Im i Γ i above, m i is odd for a Γ i which contains P . Remark 5.3. Since we have defined C disc as the normalisation in K nr (C) of a model of P 1 K nr it follows that the hyperelliptic involution on C (which on function fields is the generator of the Galois group of K nr (C)/K nr (x)) extends to an involution ι on C disc /O and identifies Y disc with the quotient C disc /ι. In particular, ι swaps the two points in the fibre over any point of Y disc B.

5.1.
Explicit equations for the model C disc . We now give explicit charts covering the model C disc . Recall from Remark 3.9 that Y disc is covered by the open subschemes U D P D and W D (Q D ∪ P D ) (Definitions 3.6 and 3.7) as D ranges over all valid discs.
Definition 5.4. Define, for each valid disc D, the schemes as D ranges over all valid discs. The restriction of the normalisation morphism to a map Proof. Since Y disc is covered by the open subschemes U D P D and W D (Q D ∪ P D ), and normalisation is local on the base, it suffices to show that for each valid disc D, φ D,1 : , as well as the analagous result for φ D,2 . We prove this for φ D,1 , the argument in the other case being identical. Viewing U D P D as a subscheme of Y disc it follows from Remark 3.16 that the divisor of π ω D (f ) f D (x D ) on U D P D is equal to B ∩(U D P D ) and as such is regular. Note also that the ring ) is regular (this is the algebraic result underpinning the proof of Theorem 5.2). Moreover, appealing to Remark 3.16 once again we see that π ω D (f ) f D (x D ) and f (x) differ by a square in K nr (x) = FracA (indeed, by an even power of π). Thus Frac . Thus the (map on schemes associated to the) inclusion of A into A realises the normalisation of SpecA in K nr (C). It remains only to note that U D P D is covered by the schemes O[x D ] h as we vary h, and that normalisation is local on the base.
The relationship between the various variables follows from combining Remark 3.9 and Remark 3.16.
Remark 5.6. The extension of the hyperelliptic involution to C disc acts on the charts of Proposition 5.5 as y D → −y D (resp. z D → −z D ).
Remark 5.7. The proof of Proposition 5.5 shows that locally over a sufficiently small for t a local equation for B on U . From this we deduce the following. Suppose that D is a valid disc with ω D (f ) = 1 (i.e. ν D (f ) odd). Then φ −1 (E D ) consists of a single component Z of multiplicity 2 in C disc,k and the restriction of φ to a map Z red → E D is an isomorphism. 6 Indeed, our assumptions mean that E D is contained entirely in B, so that locally over some U as above, E D corresponds to a prime ideal p of A containing t. The fibre of φ over the generic point of E D is then Spec k(p)[u]/(u 2 ) where k(p) denotes the residue field at p. Thus there is a unique component over E D with multiplicity 2 in C disc,k . Moreover, the unique prime q of A lying over p is generated by p and u whence the map A/p → A /q is an isomorphism. As this is just the map Z red ∩φ −1 (U ) → E D ∩U and such U cover Y disc , we are done.
The following lemma describes the reduction mod m of the polynomials f D and g Dmax appearing in the above charts, and will facilitate in the study of the special fibre of C disc .
For a proper cluster s for which D(s) is valid we set c s = c D(s) .
Lemma 5.9. Let D be a valid disc and write s = D ∩ R.
Proof. By the definition of f D (x D ) and (3.1) we have . Now apply (i).
Remark 5. 10. In (i), two factors (x D − red D (s )) and (x D − red D (s )) are distinct for distinct s , s < s.

5.2.
Types of valid disc. We now describe the special fibre of C disc . To do this we will frequently break into cases, which we set out here. We remark that if all roots of f (x) lie in K nr then cases II, III and IV do not occur as then all proper clusters have integer depth.
Definition 5.11. Let D be a valid disc. We define the type of D as follows.
(I.1) D = D(s) for a non-übereven cluster s with ν s even, and D is not of type II.1, (I.2) D = D(s) for anübereven cluster s and D is not of type II.2, (II.1) D = D(s) where s < R is such that δ s = 1/2, |s| = 2g, and s is notübereven, (II.2) D = D(s) where s < R is such that δ s = 1/2, |s| = 2g, and s isübereven, (III) D = D max and there is a cluster s < R with |s| = 2g and δ s = n + 1/2 for n ≥ 1 an integer, 5.3. The special fibre of C disc . In the following proposition we describe, for each component E D of the special fibre of Y disc , the component(s) of the special fibre of C disc which lie over this. Later in Theorem 5.18 we explain how these components fit together, drawing on the description of the dual graph of Y disc,k afforded by Lemma 4.19.
In the statement below, for a proper cluster s we write g(s) for the genus of s, thus g(s) is 0 if s isübereven and is determined by |s| = 2g(s) + 1 or 2g(s) + 2 wheres denotes the set of odd children of s. (I.2,II.2) two components of multiplicity 1, each isomorphic to P 1 k and intersecting transversally at one point for each twin t with d t = d s + 1/2, and at one additional point if D has type II.2. (III,IV) two components of multiplicity 1, isomorphic to P 1 k and intersecting transversally at 1 point. (V) a single component isomorphic to P 1 k , with multiplicity 2 and self intersection −1.
(VI.1) one component of multiplicity 1, isomorphic to P 1 k , (VI.2) two disjoint components of multiplicity 1, each isomorphic to P 1 k . Moreover, all intersections between components of C disc,k are transversal. 7 here and below, by φ −1 (ED) we formally mean the scheme C disc ×Y disc ED. Remark 5.13. When all roots of f (x) lie in K nr (e.g. if we are willing to construct the model only over a suitable extension of the base field) all components are individually smooth, no two components lying over the same component of Y disc intersect, and, as above, types II, III and IV never arise.
The proof of Proposition 5.12 is given after Lemmas 5.14 and 5.15.
Lemma 5.14. Let D be a valid disc, E D the associated component of the special fibre of Y disc,k and φ : C disc → Y disc the normalisation morphism. Then and as f D (x D ) is non-zero the associated component(s) has multiplicity 1. That the number of components is as claimed follows since, by Lemma 5.9, if D is not the defining is a square if and only s isübereven. To determine the geometric genus of the components note that when f D (x D ) is a square the fibre over the generic point of η D is isomorphic to two copies ofk(x) from which it follows that both components have genus 0. Now note that, for f D (x D ) non-square, the genus of the function fieldk( is precisely the number of odd degree factors of f D (x D ) and we conclude by Lemma 5.9.
(iii). By Remark 5.7 we see that if ω D (f ) = 1 then there is a unique component over E D , Γ D say, which has multiplicity 2 and is isomorphic to P 1 k . It remains to show that Γ D has self intersection −1. Combining parts (i) and (ii) with Lemma 4.10 we see that E D meets precisely two components of the special fibre of Y disc , E D 1 and E D 2 say, and there is one multiplicity 1 component of the special fibre of C disc lying over each of these, Γ D 1 and Γ D 2 say. In particular, as divisors we have φ By the projection formula [22, Theorem 9.2.12] we have Γ D · Γ D 1 = E D · E D 1 = 1 and Γ D · Γ D 2 = 1 similarly. Thus Γ D intersects Γ D 1 and Γ D 2 transversally. Finally as the intersection of Γ D with the whole special fibre is 0 it follows that Γ 2 D = −1. Lemma 5.15. Let D be a valid disc not of type V. Then φ −1 (E D ) has precisely one singular point for each twin t with d t = d D + 1/2, unless D = D max , when it has an 8 isomorphic to P 1 k with self intersection −1.
additional singular point (lying over the point at infinity on E Dmax ) if R is exceptional of type A (i.e. if D max has type II or III). Each singular point of φ −1 (E D ) is an ordinary double point.
) with P the point (red D (s), 0). By Lemma 5.9 red D (z D ) is a root of multiplicity 1 if s is a singleton, and 2 if s is a twin. One checks (see e.g. [22,Example 10.3.4]) that P is smooth point in the first instance, and an ordinary double point in the second. The case D = D max and Q the point at infinity on E Dmax is similar. Our assumption that Q ∈ B hor forces deg(f ) = 2g + 1 or R exceptional. Arguing as above and using Lemma 5.9 (ii) one sees that P is smooth if deg(f ) = 2g + 1 or R is exceptional of type B, and is an ordinary double point if R is exceptional of type A.
Proof of Proposition 5.12. (I.1, II.1): By Lemma 5.14 φ −1 (E D ) consists of a unique component of geometric genus g(s) whose function field is The equation for Γ s follows from Lemma 5.9. That the nodes of Γ s are as claimed is Finally we show that all intersections are transverse. Let P ∈ C disc,k be a point lying on distinct components Z 1 and Z 2 . If φ(Z 1 ) = φ(Z 2 ) then both Z 1 and Z 2 lie in φ −1 (E D ) for some valid disc D of type I.2, II.2, III or IV, and the intersection is transverse as above. Similarly, if one of Z 1 or Z 2 has multiplicity 2 we are done by Lemma 5.14 (iii). Otherwise Q = φ(P ) is disjoint from B whence φ isétale at P and, moreover, Q is a point of transverse intersection between the distinct components φ(Z 1 ) and φ(Z 2 ) of Y disc . Thus the intersection is transverse in this case also. 5.4. The minimal regular model of C/K nr . Having constructed a regular model of C/K nr and described the components of its special fibre, it is a simple matter to describe the minimal regular model C min /O of C/K nr , which we do now. In particular, we use the explicit description we obtain to show that C min is semistable. This proves the 'semistability criterion implies semistability' part of Theorem 1.8 (1) (see also Theorem 7.1).
Theorem 5.16. Let C/K be a hyperelliptic curve satisfying the semistability criterion. Then the model of C obtained from C disc by contracting each of the components corresponding to valid discs of type V is semistable, and is the minimal regular model of C/K nr .
Proof. Note first that by Proposition 5.12 (iv) the components we contract are disjoint, and are all exceptional curves. Thus we may contract them and the resulting model, which we temporarily denote C/O, is again proper and regular. Moreover, again by Proposition 5.12, the components contracted are precisely those with multiplicity greater than one. Fix one such, Γ D say. Then as in the proof of Lemma 5.14(iii) it intersects precisely two components of C disc,k , say Z 1 and Z 2 (which do not themselves meet), both transversally. By [22,Lemma 3.35], after contracting Γ D to a point the components Z 1 and Z 2 intersect transversally there. Thus the special fibre of C is reduced with normal crossings (away from the contracted components the same is true for the special fibre of C disc by Proposition 5.12, and the contraction map is an isomorphism here). Thus C is semistable.
Since C is a proper regular model of C, to show that C is the minimal such we must show there are no exceptional curves in its special fibre. Note that such components appear in the dual graph of Ck as genus 0 vertices of degree 1. Theorem 5.18 below shows that the dual graph of C is (after removing vertices of degree 2 and genus 0 from the vertex set) a hyperelliptic graph in the sense of [16, Definition 3.2] and in particular contains no genus 0 vertices of degree 1 as desired (the statement of Theorem 5.18 refers to the dual graph of C min,k however the proof in fact uses the description of C min,k as the model C considered here, and does not assume minimality in the proof). Alternatively one may proceed via Proposition 5.12 and the description of the dual graph of Y disc,k afforded by Lemma 4.19.
5.5. The dual graph of the special fibre of the minimal regular model. Having shown that C min is semistable, we may talk about the dual graph of its special fibre, which we now describe.
Notation 5.17. Let C/K be a hyperelliptic curve satisfying the semistability criterion. We denote by Υ C the dual graph of the special fibre of its minimal regular model.
Recall from Section 2.1.1 that Υ C has vertex set the set of irreducible components of C min,k , edge set the set of ordinary double points of C min,k , and, for an ordinary double point P , the edge-endpoints at P are the points lying above P under the normalisation morphism n : C min,k → C min,k (we refer to these points as the tangents at P ). The graph Υ C carries a natural genus marking, with a vertex being given the genus of the component to which it corresponds.
Finally, by uniqueness of the minimal regular model, the hyperelliptic involution on C extends (necessarily uniquely) to an involution ι on C min which then acts on Υ C via its action on components, ordinary double points and tangents. As we did in Section 4.6 for Y disc , we will describe the graph Υ C using the combinatorial framework developed in [16] and summarised in Appendix D. In particular, as explained in Example D.2, to C (or rather to f (x)), one may associate a metric cluster picture Σ, which is a purely combinatorial object. Then, via Definitions D.6 and D.9, one can associate to Σ a BY tree T Σ , and a metric hyperelliptic graph G Σ , where the latter is a metric graph coming equipped with a genus marking and involution, the quotient by which is canonically the result of halving the length of all edges in T Σ . This graph is (by design) very closely related to Υ C , as the following result shows.
Theorem 5.18. Let C/K be a hyperelliptic curve satisfying the semistability criterion. Denote by Υ C the graph obtained from Υ C by removing from the vertex set all vertices of genus 0 and degree 2, and let Σ denote the metric cluster picture associated to C. Then there is a genus preserving isomorphism of metric graphs Υ C ∼ = G Σ identifying the hyperelliptic involutions and inducing a canonical identification of the quotient Υ C /ι with the graph obtained from T Σ by halving the length of all edges.
In particular Υ C , along with its genus marking and hyperelliptic involution, is a hyperelliptic graph in the sense of [16, Definition 3.2].
Proof. The basic idea is that G Σ is by definition a certain ramified double cover of T Σ (up to slightly adjusting the metric), whilst our explicit construction of C min shows that Υ C is essentially a ramified double cover of the dual graph of Y disc . The latter is related to T Σ via Lemma 4. 19. We now flesh out the details. In what follows, we will need to understand the action of the hyperelliptic involution on C min and do this by noting that where C disc and C min are isomorphic the two extensions of the hyperelliptic involution must agree, since they do so on the generic fibre.
We first describe the dual graph of C disc,k , which we temporarily denote Ω C . 9 By Remark 5.3, whenever the fibre over a point of Y disc contains two points the hyperelliptic involution swaps these. In particular, applying this to the generic point of a component E D of Y disc,k , if φ −1 (E D ) consists of two components then ι swaps these. Similarly, if there are two points lying over an intersection point of components E D and E D then ι swaps these also. Now consider the (topological) quotient graph Ω C /ι. Its vertices either arise as ι-orbits of vertices of Ω C -we get one vertex in Ω C /ι for each valid disc this way, corresponding to φ −1 (E D ) -or as the midpoint of an edge whose endpoints are swapped (i.e. is 'ι-antiinvariant'). Similarly, the edges of Ω C /ι are ι-orbits of edges of Ω C , but in the case of an ι-anti-invariant edge e, the resulting edge of Ω C /ι has length half that of e.
As ι swaps components if and only if they lie over the same component of Y disc , an edge of Ω C can only be ι-anti-invariant if it corresponds to an ordinary double point on φ −1 (E D ) for some valid disc D (as opposed to an ordinary double point arising as the intersection between components whose images in Y disc are distinct). Moreover, each such edge is in fact ι-anti-invariant. Indeed, for edges corresponding to intersection points between two components of some φ −1 (E D ) this is clear, whilst for those corresponding to a node lying on a single component, say a node P , ι must swap the tangents at P else by [22,Proposition 3.48 (b)] φ(P ) would not be a smooth point of Y disc .
From the above discussion we see that Ω C /ι is the graph obtained from the dual graph of Y disc by adding a vertex for each ordinary double point of C disc,k lying over a single component E D , joined to the vertex corresponding to E D by an edge of length 1/2. It now follows from Lemma 5.15 and Lemma 4.19 that, defining Ω C as for Υ C , the quotient Ω C /ι is canonically the result of halving all yellow edges in T Σ . Finally (c.f. Lemma 4.10), one obtains Υ C /ι from Ω C /ι by halving the length of those edges corresponding to blue edges of T Σ to account for contracted components.
To conclude, we now note that by Proposition 5.12 the map Υ C → Υ C /ι ramifies precisely over the part of Υ C /ι which corresponds to the blue part of T Σ , so that the canonical isomorphism Υ C /ι ∼ = G Σ /ι above lifts to a (in general noncanonical) isomorphism Υ C ∼ = G Σ identifying the hyperelliptic involutions. 5.6. Explicit equations for the components of the special fibre of the minimal regular model. By Theorem 5.18 the components of the special fibre of C min are indexed by valid discs D not of type V (though one disc can yield two components not one). Here we record explicit equations for these components.
Definition 5.19. For a valid disc D not of type V we define Γ D to be the image in C min (under the contraction morphism) of the closed subscheme φ −1 (E D ) of C disc . Note that Γ D consists of either one or two components of C min,k , and that these account for all components.
Proposition 5.20. Let D be a valid disc not of type V . Then the associated component(s) Γ D of C min,k is given, according to the type of D, as follows 10 : (II) The glueing of the affine curves and over the subsets Y = 0 and T = 0 via Z = Y T n+1 , where 2n is the degree of the right hand side of ( †).
Proof. We will extract the result from the explicit equations for C disc given in Proposition 5.5. Fix a valid disc D and temporarily denote by Γ D the curve with equations as in the statement, so that we must prove Γ D ∼ = Γ D . By Proposition 5.5, the scheme U D φ −1 (P D ) of Definition 5.4 is an open subscheme of C disc . Its special fibre is an open subset of φ −1 (E D ) and is disjoint from all components contracted when forming C min . Thus its special fibre is naturally an open subscheme of Γ D and equations for it are readily extracted from Lemma 5.9. In particular, we may define a rational map ψ : Γ D → Γ D by where the right hand side is understood with respect to the variables x D , y D for the chart U D φ −1 (P D ) and we set has type III, VI  1 if D has type IV.
Since P D is precisely the set of points also. Thus ψ is a rational map between complete (possibly reducible) curves Γ D and Γ D which is an isomorphism away from finitely many smooth points. Thus ψ is in fact an isomorphism everywhere. The case where D has type II or III is proved identically with the caveat that one must explicitly check that the map is an isomorphism over an open subset of the point at infinity on Γ D (since unlike the other cases the curves are not smooth here). This may be done by using the chart W Dmax of Proposition 5.5 combined with Lemma 5.9 (ii). 5.7. Reducing points. Since C min /O is proper there is a natural reduction map C(K nr ) → C min,k (k) whose image consists precisely of the non-singular points (by regularity of C min and the fact that K nr is Henselian). We describe this map in the following proposition.
(i) Suppose x 0 ∈ D max and let D be a valid disc not of type V. Then P reduces to Γ D if and only if x 0 ∈ D but x 0 / ∈ D for any valid subdisc D ⊆ D. In this case, in the variables X, Y of Proposition 5.20, the reduction of P is, according to the type of D, the following point on Γ D : for any choice of r ∈ D ∩ R, (IV): Then red(P ) is a point at infinity on Γ Dmax . There is a unique such point unless |R ∩ D max | = 2g + 2, in which case D has type I and P reduces to  The case D = D max may be treated similarly, additionally considering the chart W Dmax to prove (ii). 5.8. The stable model of C/K nr . We finish the section by giving an explicit description of the stable model of a hyperelliptic curve satisfying the semistability criterion. As in the statement of Proposition 5.12, for a principal cluster s we denote by Γ s the hyperelliptic curve Γ s : y 2 = c s odd s <s (x − red s (s )).
Theorem 5.24. Let C/K be a hyperelliptic curve satisfying the semistability criterion. Then the stable model C st /O of C/K nr is obtained from C disc by contracting each component Γ D for which D is not of the form D(s) for a principal cluster s. 11 Its special fibre consists of one component with normalisationΓ s for each non-übereven principal cluster s, and two components with normalisation P 1 k for eachübereven principal cluster. Letting Σ denote the metric cluster picture associated to C, the dual graph of the special fibre of C st is obtained from G Σ by adjusting the length function to give each edge length 1.
Proof. By Theorem 5.16, upon contracting components Γ D for which ω D (f ) = 1 we obtain the minimal regular model of C/K nr . The stable model is then obtained from this by contracting all components which have self-intersection −2 and are isomorphic to P 1 k ([22, Proposition 9.4.8, Theorem 10.3.34]). Since such components are precisely the ones which give vertices of genus 0 and degree 2 in the dual graph, i.e. precisely the ones which, in the notation of Theorem 5.18, are removed from the vertex set when passing from Υ C to Υ C , this proves the claim about the dual graph of C st . It remains to show that the components which remain are precisely those corresponding to principal clusters. For this one may either argue via Proposition 5.12 and a case by case analysis or use [16,Lemmas 5.5,5.20] to note that the vertices of G Σ correspond precisely to the principal clusters of Σ. 6. Galois action on the models of C In this section we still work with a hyperelliptic curve C/K : y 2 = f (x) and write R ⊆K for the set of roots of f (x). However we now no longer assume that C/K satisfies the semistability criterion, and instead fix a finite Galois extension F/K such that the semistability criterion is satisfied by C/F . For example we may take F/K to be the Galois closure of the extension given by adjoining a square root of a uniformiser to K(R)/K, though the case where F = K and C/K satisfies the semistability criterion is still an important special case of the results of this section. We denote by π F a uniformiser for F and write e for the ramification index of F/K.
Since C/F satisfies the semistability criterion we may apply the constructions of Sections 4 and 5 with K replaced by F throughout, so that in particular we have an explicit construction of the minimal regular model and stable model of C over F nr , afforded by Theorem 5.16 and Theorem 5.24 respectively. The aim of this section is to describe explicitly the action of G K on these models (we recall how this action works in Section 6.1 below). To talk about these models we use the notation of Sections 4 and 5 replacing K by F throughout. Thus for example we work with the collection of valid discs (Definition 4.4) defined with respect to F rather than K and fix a choice of centre z D ∈ F nr for each valid disc D. We caution however that we continue to normalise the valuation v onK with respect to K, which is the reason for the appearance of the ramification index e in the formulae below.
6.1. Galois action on components. Let C min /O F nr be the minimal regular model of C over F nr . We will work with the explicit description of C min /O F nr afforded by Theorem 5.16 and Proposition 5.20. Thus the components of its special fibre (or more precisely the ι-orbits of components where ι denotes the hyperelliptic involution) are indexed by valid discs D not of type V (Definition 5.11), with D corresponding to the component(s) Γ D of Definition 5.19.
As explained in Section 2.4 ((2.16) in particular), the special fibre of C min /O F nr carries a natural action of the full Galois group G K (arising from uniqueness of the model) which is uniquely determined by 'lift-act-reduce' on non-singular points. The following quantities will facilitate in describing this action. Definition 6.1. We define, for σ ∈ G K , Given also a valid disc D not of type V define where, for types I and II, s denotes the cluster D ∩ R and we recall that by definition we have D = D(s) in these instances.
We now describe the Galois action on the Γ D .
Theorem 6.2. Let C/K : y 2 = f (x) be a hyperelliptic curve satisfying the semistability criterion over a finite Galois extension F/K and let D be a valid disc (the collection of such defined with respect to F ) not of type V. Then any σ ∈ G K maps Γ D to Γ σD and for a point P = (x 0 , y 0 ) ∈ Γ D , we have whereσ denotes the map induced by σ on the residue fieldk and the points are written with respect to the variables X, Y for Γ D (resp Γ σD ) of Proposition 5.20.
Proof. As explained in Section 2.4 it suffices to prove the result under the assumption that P is non-singular. We follow the recipe of Section 2.4 to act on P . LetP ∈ C(F nr ) be a lift of P . Now let h D be as in (5.22) andh D any lift of h D to a polynomial with coefficients in O F nr . By Proposition 5.23, in the coordinates x, y for C,P has the form Fỹ 0hD (x 0 ) for somex 0 ,ỹ 0 ∈ O F nr withx 0 ≡ x 0 (mod m) andỹ 0 ≡ y 0 (mod m) and such that the x-coordinate is not in any valid subdisc of D. Under σ this maps to the point Note that the x-coordinate ofQ is in σD but not in any valid subdisc of σD, since the set of valid discs is stable under σ. Thus this new point reduces to Γ σD by Proposition 5.23. In particular σ maps Γ D to Γ σD . Moreover, applying Proposition 5.23 one last time and noting that σ preserves depths and ν, we find thatQ reduces to In light of the definition of λ D it remains to show that Writing hσ D (x) for the polynomial obtained by applyingσ to the coefficients of h D we wish to prove the polynomial identity Noting that for any z ∈K we havē and that hσ D is the monic polynomial whose (multi)set of roots is given by applyingσ to the (multi)set of roots of h D , the result follows.

Galois action on the normalisation of components.
In what follows, for any cluster s for which D(s) is a valid disc (in particular, for all principal clusters) we write Γ s in place of Γ D(s) . Note that by Theorem 5.24 the Γ s for s principal account for precisely those components which remain when passing from the minimal regular model of C/F nr to the stable model, and by an abuse of notation we denote the associated component(s) of the stable model by Γ s also. Here we describe the Galois action on the normalisation of these components. By Proposition 5.12 this is the normalisation of Γ s viewed either on the minimal regular model of C/F nr , or, for s principal, the stable model of C/F nr .
Corollary 6.5 (of Theorem 6.2). Let C/K : y 2 = f (x) be a hyperelliptic curve satisfying the semistability criterion over a finite Galois extension F/K. Let σ ∈ G K , s a principal cluster, and Γ s the associated component(s) of the special fibre of either the minimal regular model, or the stable model, of C/F nr . Then σ maps Γ s to Γ σs . Moreover, if σ stabilises s then the action of σ on the normalisationΓ s is, for a point P = (x 0 , y 0 ) in the variables x, y of Definition 6.4, given by Proof. Combine Theorem 6.2 with Lemma A.5 (iii).

6.3.
Galois action on the dual graph. As in Section 2.1.1 the action of G K on the special fibre of the minimal regular model of C/F nr induces an action on its dual graph Υ C via the action on components, ordinary double points, and tangents. Here we describe this action, beginning with the following lemma. Having made this choice define, for each σ ∈ G K and s ∈ E, s (σ) = σ(θ s ) θ σs (mod m).
Lemma 6.7. For each s ∈ E, the above choice θ s of square root of c f r / ∈s (z s − r) determines: (i) if s is a twin with δ s = 1/2, a choice of tangent at the node (red P (s) (s), 0) on Γ P (s) , (ii) if s has size 2g, is notübereven, and δ s = 1/2 (i.e. D(s) has type II.1) a choice of tangent at the node at infinity on Γ s , (iii) a choice of one of the two points at infinity on Γ s otherwise.
Proof. We begin with (iii) which is the simplest case. The points at infinity on Γ s are (0, ± √ c s ). Now we compute This time, we compute Againe(ν P (t) − 2d P (t) ) is even (Lemmas 4.2 and 4.9) , whence our choice of θ s determines a choice of one of the tangents, namely  We now return to describing the action of G K on Υ C . Let Σ denote the metric cluster picture associated to f (x) over F (Example D.2), associated hyperelliptic graph G Σ . By Theorem 5.18 we have Υ C ∼ = G Σ where Υ C is the graph obtained from Υ C by removing from the vertex set all vertices of genus 0 and degree 2. As explained in Definition D.15, to each pair ρ = (ρ 0 , ρ ) where ρ 0 is a permutation of the set Σ of proper clusters preserving sizes, inclusions and relative depths, and is a collection of signs ρ (s) ∈ {±1} for each cluster s ∈ E, there is an associated automorphism G(ρ) of G Σ . Theorem 6.9. Let C/K : y 2 = f (x) be a hyperelliptic curve satisfying the semistability criterion over a finite Galois extension F/K. Denote by Υ C the dual graph of the special fibre of the minimal regular model of C/F nr and Σ the metric cluster picture associated to f (x) over F . Fix a choice of θ s for each s ∈ E as in (6.6).
Then is an isomorphism of metric graphs Υ C ∼ = G Σ under which the action of any σ ∈ G K corresponds to the automorphism Proof. Fix an isomorphism Υ C ∼ = G Σ as in Theorem 5.18, so that the isomorphism identifies the respective hyperelliptic involutions (denoted ι) and induces the canonical identification of the quotients Υ C /ι and G Σ /ι detailed there. Note that our choice of θ s for each s ∈ E determines via Lemma 6.7 a choice n + s of (below v Γ denotes the vertex of Υ C corresponding to a component Γ): • an endpoint of the loop at v Γ P (s) associated to the node (red P (s) (s), 0) on Γ P (s) if s is a twin with δ s = 1/2, • an endpoint of the loop at infinity on v Γs when |s| = 2g and δ s = 1/2, • one of the two vertices corresponding to Γ s if s = R (indeed, note that the points at infinity of Γ s lie on different components), • an edge endpoint at v Γs for one of the two edges between v s and v P (s) otherwise (here if Γ s consists of two components then by this we mean a choice of an edge-endpoint for one of the two edges meeting one of two associated vertices).
Composing our chosen isomorphism Υ C ∼ = G Σ with an automorphism of G Σ of the form (id, η) for an appropriate choice of η we may assume that the choices n + s ∈ Υ C (s ∈ E) get identified with the corresponding 'plus' choice arising from the decomposition of G y into G + y and G − y (see Definition D.9 for the definition of these objects). Now fix σ ∈ Gal(K/K) and view it as an automorphism of G Σ via the identification above. Since σ fixes Γ R (or Γ s if R has size 2g+2 and a child s of size 2g+1) and perserves genera, by (D.17) there is an automorphism τ = (τ 0 , τ ) of Σ such that σ acts as G(τ ); we will show that τ must be as in the statement of the theorem. We now determine τ 0 and τ , using the explicit description of automorphisms of this form afforded by (D. 16), to which we also refer for the definition of vertices v ± • and (half-)edges e ± • appearing below.
By Theorem 6.2, σ maps Γ s to Γ σs so that on G Σ , σ maps {v ± s } to {v ± σs } for each principal cluster s. Similarly, by Theorem 6.2 and 6.3 we see that for a twin t, σ maps a node (red P (t) (t), 0) on Γ P (t) to the node (red σP (t) (σt), 0) on Γ σP (t) , so that σ maps {e ± t } onto {e ± σt } for each twin t. It follows that τ 0 = ρ(σ) as desired. 12 For the signs, fix a cluster s ∈ E with δ s = 1/2 (i.e. case (iii) of Lemma 6.7). Then n + s is the specified point at infinity on Γ s . By Lemma A.5(i) and Corollary 6.5 we have where 2n+2 is the degree of the defining polynomial of Γ s . Using (6.8) and the definition of λ s , we compute Comparing this with the action of G(τ ) on G Σ detailed in (D. 16) we see that τ (s) = s (σ) as desired.

The semistability criterion is equivalent to semistability
We now complete the proof that the semistability criterion (Definition 1.7) is equivalent to semistability. 12 Note that a permutation of the proper clusters preserving size and inclusion is determined by its action on principal clusters and twins. Theorem 7.1. Let C : y 2 = f (x) be a hyperelliptic curve over K. Then C/K is semistable if and only if it satisfies the semistability criterion.
Proof. When C/K satisfies the semistability criterion Theorem 5. 16 gives an explicit semistable model of C over O K nr . Since semistability may be checked after unramified extension it follows that C is semistable over K.
Now suppose that C/K is semistable. We will show that K(R)/K is tamely ramified and that each principal cluster s is fixed by inertia, has d s ∈ Z and ν s ∈ 2Z. This is equivalent to the semistability criterion by Proposition C.4.
Now consider the stable model C st /O K nr (which exists since C/K is assumed semistable). Fix a tame extension F/K, ramification degree e say, over which C satisfies the semistability criterion (e.g. a quadratic ramified extension of K(R)/K) and set I F/K = Gal(F nr /K nr ). By [22,Lemma 10.3.30] the formation of the stable model commutes with base change, in other words the stable model of C over F nr is In particular, the unique extension of the action of I F/K on C/F nr to C is via the second factor and becomes trivial upon passing to the special fibre.
On the other hand, since C satisfies the semistability criterion over F we have an explicit description of the stable model over O F nr complete with action of I F/K on its special fibre afforded by Theorem 5.24 and Corollary 6.5. In order that this action be trivial we see from Corollary 6.5 that each principal cluster must be fixed by I F/K (and hence the full inertia group of K) else I F/K would permute components of C k . Moreover, since the character χ of Definition 6.1 has exact order e when restricted to I F/K , for each principal cluster s we deduce from Corollary 6.5 that both d s andλ s must be integers. Equivalently d s ∈ Z and ν s ∈ 2Z as desired.

Special fibre of the minimal regular model
Here we collect and present the relevant notation and results from Sections 4, 5 and 6 for the convenience of the reader. In particular we present the special fibre of the minimal regular model of C/F nr in a self-contained manner, that does not refer to the constructions in [16].
Let C/K : y 2 = f (x) be a hyperelliptic curve and F/K a finite Galois extension over which C becomes semistable. By Theorem 7.1 C/F satisfies the semistability criterion, so that all the constructions of Sections 4, 5 and 6 are valid over F .
For the rest of this section we fix the following data.
Notation 8.1. Fix as above a finite Galois extension F/K over which C is semistable and let π F denote a fixed choice of uniformiser of F . For each proper cluster s, fix a centre z s ∈ F nr (possible by Lemma 4.2). Additionally, for every even cluster s = R that does not have anübereven parent, and for R if it isübereven, fix a square root θ s of c f r / ∈s (z s − r).
We write e for the ramification degree of F/K and v for the valuation onK normalised with respect to K, so that, in particular, v(π F ) = 1/e. 8.1. Components and characters.
For principal clusters s definẽ If s is either even or a cotwin, define s : For all other clusters s, set s (σ) = 0.

Remark 8.3.
On the inertia group I K < G K the map χ, and therefore the α s and γ s as well, are independent of the choices of F , π F and z s , and are characters I K →k × which are trivial on wild inertia. When restricted to the stabiliser I s , the character γ s has order the prime-to-p part of the denominator of |I K /I s |λ s . for those t ∈K for which the above formula makes sense. For s < s, by red s (s ) we mean red s (r) for any r ∈ s . If s is a principal cluster and eδ s = 1/2 we define the hyperelliptic curve Γ s /k by If s is principal and eδ s = 1/2 we define the curve Γ s /k to be the glueing of the affine curves and over the subsets Y = 0 and T = 0 via Z = Y T n+1 where n is half the degree of the right hand side of ( †) (note that this is not the usual chart at infinity).
As in Section 5, each Γ s corresponds to one or possibly two components of the special fibre of the minimal regular model of C over O F nr . The following theorem describes how these components fit together: roughly Γ s and Γ s are linked by chains of curves isomorphic to P 1 k whenever s < s and there is a loop of such curves from Γ s to itself for each twin or cotwin t < s or s < t. It also describes the corresponding Galois action and the reduction map.
Theorem 8.5. Let F/K be an extension over which C is semistable.
(1) Let Υ C be the dual graph of the special fibre of the minimal regular model of C over O F nr . Then Υ C has a vertex v s corresponding to Γ s for every non-übereven principal cluster and two vertices v + s , v − s for eachübereven principal cluster s. These are linked by chains of edges as follows (where we write with s principal even, t twin (2) If σ ∈ G K then it acts on Υ C by σ(s) ; (iii) for t twin or cotwin σ(L t ) = t (σ)L σ(t) , where −L denotes L with reversed orientation; and the induced permutation on the remaining edges and vertices.
(3) If σ ∈ G K and s is a principal cluster then 13 σ maps Γ s to Γ σs and Explicitly, for one of these points 14 , Proof.
(1) The dual graph of the special fibre is given by Theorem 5.18 and Remark D. 11 gives the explicit description.
Corollary 8.6. Let C/K be a semistable hyperelliptic curve. Then the number of components in the special fibre if its minimal regular model over O K nr is Proof. This follows from the usual Euler characteristic formula for H 1 of a graph, and counting the total number of edges in part (1) of the theorem.
We now describe the normalisation of each Γ s as well as the induced Galois action. (iii). The description of the normalisation of Γ s is standard and the normalization map betweenΓ s and Γ s is given by . The claimed formula now follows from Theorem 8.5 (4).
Remark 8.8. We note that the formula for the action of σ ∈ G K becomes particularly simple in the following two settings: (i) if s is a principal cluster and σ ∈ I s then σ acts on Γ s as the geometric automorphism (x, y) → (α s (σ)x + β s (σ), γ s (σ)y) .
(ii) suppose s is a principal cluster, F = K (so that C/K is semistable) and that σ ∈ G s . Then χ(σ) = id. If (as is possible by Lemma B.1) we additionally pick our centre z s for s to lie in K s , the subfield of K sep fixed by G s , then we also have β s (σ) = 0. Thus σ acts on Γ s (k) via σ(x, y) = (σ(x),σ(y)) whereσ denotes the automorphism ofk induced by σ. (This is a manifestation of the fact that, when C/K is semistable, all our constructions are Gal(K nr /K)-equivariant.)

Homology of the dual graph of the special fibre
The homology of the dual graph of the special fibre forms a part of the Galois representation of C and determines several arithmetic invariants (see (2.18), Theorem 2.20 and Lemma 2.22). In this section we give a description of the homology in terms of clusters. In the notation of Theorem 8.5, the basic observation is that every even non-übereven cluster s starts off two chains L + s and L − s that eventually join back up (normally at v P (s * ) ) to form a loop in Υ C . Definition 9.1. Let C/F be a semistable hyperelliptic curve and Υ C the dual graph of the special fibre of its minimal regular model over O F nr as in Theorem 8.5.
Let s = R be an even non-übereven cluster. If s * = R, we define the 1-chain s in C 1 (Υ C , Z) to be the shortest path from v P (s * ) to itself that passes through v s and goes through the minus part of the graph before the plus part of the graph. If s * = R, we define s to be the shortest path from v − R to v + R that passes through v s . Here • if s = t is a twin or P (s * ) = t is a cotwin, we write v t for the point in the middle of L t ; • if s * = R = s 1 s 2 with s i both principal even, we write v + R and v − R for the points in the middle of L + s 1 ,s 2 and L − s 1 ,s 2 ; • if s * = R = t s with t a twin and s principal even, we write v + R and v − R for the points on L t of distance δ s from v + s and v − s , respectively. Remark 9.2. s is a loop (cycle) in Υ C unless s * = R. In the latter case, it is a "half loop" in the sense that if s , s are two half loops then s − s is a loop.
Using the explicit description of the dual graph it is not hard to check that the loops described above form a basis for the homology of Υ C and to track the action of Galois on them. This gives the following result on H 1 (Υ C , Z). Theorem 9.3. Let C/K be a hyperelliptic curve and let F/K be a Galois extension over which C is semistable. Let Υ C be the dual graph of the special fibre of the minimal regular model of C over O F nr . Let A be the set of even non-übereven clusters excluding R, and let B be the subset of clusters s ∈ A such that s * = R. Then (3) the length pairing is given by Proof. This follows from Theorem 6.9, which describes the Υ C with the induced Galois action, and Theorem D.18 and Remark D.19, which describe the associated homology group.
Corollary 9.4. Let C/K be a semistable hyperelliptic curve. Let A be the set of even, non-übereven clusters excluding R. Then the conductor exponent of Jac C is Proof. Since J = Jac C is semistable, by (2.18). The result follows from Theorem 9.3.(1).
Notation 9.5. Let G be a group acting on a set X via the signed 15 permutation (X, ε). For a ring R we write R[X, ε] for the corresponding signed permutation representation, and R[X, ε] 0 for its sum zero part.
Corollary 9.6. Let F/K be an extension over which C is semistable. Let A be the set of even non-übereven clusters excluding R, and let B be the subset of clusters s ∈ A such that s * = R. 1) where E is the set of even non-übereven clusters and the sum is taken over representatives of G K -orbits on E.
2) Tensoring 1) with Q l and using (2.18) we get where E is the set of even non-übereven clusters and the last isomorphism uses the fact that B is empty if and only if R is notübereven.
Observe that when G acts transitively on X and (X, ε) is a signed permutation then where the sums are taken over representatives of G K -orbits on E.

Galois Representation
Having obtained an explicit description of the special fibre of the minimal regular model of C over the field where it becomes semistable, together with the action of G K , we are now in a position to extract the action of . Fix a prime l = char k. As in §8, we take • C/K a hyperelliptic curve; • F/K a finite Galois extension over which C becomes semistable; • Γ s components of the special fibre C min,k of the minimal regular model of C over O F nr (see Definition 8.4); • G K ü C min,k Galois action of (2.17); it induces the action of the stabiliser G s on Γ s , on its normalisationΓ s and on theétale cohomology group H 1 et (Γ s ).
The first sum is taken over representatives of G K -orbits of even non-übereven clusters. The second sum is taken over representatives of G K -orbits of principal non-übereven clusters. For every such cluster s, there is an isomorphism of I s -modules l is any character whose order is the prime-to-p part of the denominator of |I K /I s |λ s .
Proof. By Theorem 2.18 we have the decomposition and the claim regarding the abelian part. The statement about the toric part is Corollary 9.6(2). The last claim is [14, Thm. 1.2] combined with Theorem 8.7(i) and Remark 8.3; note that [14,Thm. 1.2] is phrased for C-rather then Q l -representations, but that does not affect the result.
Remark 10.2. When C/K is semistable the full action of G s (rather than just that of I s ) on H 1 et (Γ s ) may be explicitly determined, as we now explain. For a proper cluster s, write K s for the subfield of K sep fixed by G s and denote by k s its residue field. Suppose (as is possible by Lemma B.1) that for each proper cluster s we have fixed our choice of centre z s to lie in K s . Then for any principal cluster s the coefficients of lie in k s . Moreover, by Remark 8.8 (ii) the action of G s on Γ s (k) (arising from (2.14)) is simply given by (x, y) → (σ(x),σ(y)) whereσ denotes the automorphism ofk induced by σ (whence G s acts through Gal(K nr s /K s )). In particular, upon identifying Gal(K nr s /K s ) with Gal(k/k s ), the induced action on H 1 et (Γ s ) is precisely the usual action of Gal(k/k s ) on H 1 et (Γ s ) coming from viewing Γ s as a curve defined over k s given by the above formula. One may then recover the Frobenius eigenvalues for this action on H 1 et (Γ s ) from point counts on Γ s over extensions of k s in the usual way.
Theorem 10.3. Let C/K be a hyperelliptic curves. Write Jac C for its Jacobian. Then (1) C is semistable ⇔ Jac C semistable ⇔ C/K satisfies the semistability criterion.
(2) C has good reduction ⇔ K(R)/K is unramified, there are no proper clusters of size < 2g + 1 and ν s ∈ 2Z for the unique principal cluster. (3) C has potentially good reduction ⇔ there are no proper clusters of size < 2g + 1.
(4) C is tame ⇔ Jac C is tame ⇔ K(R)/K is tame. (5) Jac C has good reduction ⇔ K(R)/K is unramified, all clusters s = R are odd, and principal clusters have ν s ∈ 2Z. (6) Jac C has potentially good reduction ⇔ all clusters s = R are odd. (7) The potential toric rank of Jac C equals the number of even non-übereven clusters excluding R, less 1 if R isübereven. (8) Jac C has potentially totally toric reduction ⇔ every cluster has at most two odd children.
Proof. (1) As g ≥ 2, C is semistable if and only if its Jacobian is [11,Thm. 1.2]. The equivalence with the semistability criterion is proved in Theorem 7.1.
(2),(3) Using that good reduction is in particular semistable, these follow from (1) and Theorem 8.5 which gives the description of the special fibre for semistable curves in terms of principal clusters.
(4) Follows directly from (1). (5), (6) Recall that Jac C has good reduction if and only if inertia I K acts trivially on the l-adic Tate module V l Jac C (for some l = p), by the Néron-Ogg-Shafarevich criterion [32, §2]. Now apply Theorem 10.1 that gives the inertia action on V l Jac C.
(7),(8) Apply Theorem 10.1. For (8), note that the condition 'at most two odd children' is equivalent to all components Γ s from principal clusters having genus 0.

Conductor
In this section we derive a formula for the conductor of a hyperelliptic curve C/K in terms of clusters (Theorem 11.3).
Lemma 11.1. Let k be a field of characteristic = 2, and C/k a hyperelliptic curve given by Let G ⊂ Aut k C be an affine group of automorphisms acting as .
Letγ : G →Q × l be a character with kerγ = ker γ. We have: 1 if γ has odd order, γ if γ has even order.
as G-modules.
the (one or two) points at infinity of C.
Proof. If ord 2 (order(γ)) > ord 2 (order(α)), then Q l [R] 1 contains no 1-dimensional characters of order equal to the order of γ. Thereforeγ ⊗(Q l [R] 1) has no G-invariants. Suppose ord 2 (order(γ)) ≤ ord 2 (order(α)). Then we are in the setup of [14,Thm 4.1], and by [14,Lemma 4.4 (2)] we havẽ In the first (irregular orbit) case, γ 2 = α by [14] Prop. 2.2 (5b), and it follows that γ has odd order. In the second (regular) case, γ 2 = 1 by [14] Prop. 2.2 (5a). Hence, either γ = 1 and the claim is trivial, or γ has even order. The last claim follows from [14,Thm 4.1], since C has genus 0 and trivial H 1 et in this case. Now we go back to the setting of a hyperelliptic curve C/K. Recall from Definition 8.2 that we definedλ s and characters α s , β s and γ s for all principal clusters s. In what follows we extend these definitions to all proper clusters s by the same formulae. 16 Lemma 11.2. Let s be a proper non-übereven cluster, andγ s : I s →Q × l a character with kerγ s = ker γ s .
• If ord 2 denom(|I/I s |λ s ) > ord 2 denom(|I/I s |d s ) thenγ s ⊗ (Q l [s] 1) has trivial I s -invariants. • If ord 2 denom(|I/I s |λ s ) ≤ ord 2 denom(|I/I s |d s ) theñ as I s -modules. • If |s| = 2 and s is not a cotwin, thenγ s ⊗ (Q l [s] 1) = s . 16 The formulae of Definition 8.2 only make sense when eds and eλs are integers. However this is always the case when F is suitably large and (cf Remark 8.3) these characters, when defined, are independent of the choice of F .
Proof. Let F be a finite Galois extension over which C becomes semistable, and such that R ⊂ F . In what follows we consider all representations as those of I s . First let s be a principal cluster. By Theorem 8.7, we have the curvẽ overk together with I s -action Observe that order(γ s ) is the prime-to-p part of the denominator of |I/I s |λ s , and order(α s ) is the prime-to-p part of the denominator of |I/I s |d s . The claim follows from Lemma 11.1 and Theorem 8.7(ii). When s is not principal we argue similarly. Since R ⊂ F the disc D(s) (the minimal disc cutting out s, see Notation 4.1) is valid in the sense of Definition 4.4. In particular this disc contributes a component Γ D(s) to the special fibre of the minimal regular model of C over O F nr (see Proposition 5.20; if eν s is not even, enlarge F to make it so). The normalisation of this component is given by the same equation as for s principal as is the action of I s (see Proposition 6.2). Now we conclude as before; that s corresponds to the action on the points at infinity follows from the explicit action of I s on the dual graph Υ C in Thereom 8.5 (2) in the non-cotwin case, and by the formula for Γ D(R) in the cotwin case. Theorem 11.3 (Conductor). Let C/K be a hyperelliptic curve. Decompose the conductor exponent of Jac C into the tame part and a wild part, n C = n C,tame + n C,wild . Then for σ ∈ I K if R is even, and the zero representation if R is odd. Note that 0 R is the same as R , except when R is a cotwin. By Theorem 1.19 we have to compute the dimension of inertia invariants on where P and E are sets of I K -orbit representatives on principal non-übereven clusters and on even non-übereven clusters, respectively.
By Lemma 11.2 we can expand the first sum to where T is a the set of representatives of I K -orbits on all proper non-übereven clusters excluding cotwins of odd size. Since s is the zero representation for odd clusters (excepts cotwins), we can similarly expand the second sum to Taking Note that if s is a cotwin of odd size then Q l [s] is the trivial representation so this expression is the same as where S is a set of representatives of I K -orbits on proper non-übereven clusters. By Frobenius reciprocity, we find Let S 0 ⊂ S be the set of those clusters for which ξ P (s) (λ P (s) ) ≤ ξ P (s) (d P (s) ).
By Lemma 11.2, γ s ⊗ (Q l [s] 1) has no I s -invariants if s ∈ S S 0 . Otherwise, by the same lemma, depending on whether ξ s (λ s ) is = 0 or > 0, respectively. Therefore,

Note that
is the last term in the statement. Write U s for the set of those odd clusters r such that P (r) lies in the I K -orbit of s. Then Counting I K -orbits gives the claim.
(Wild part) By the standard description of the 2-torsion of Jacobians of hyperelliptic curves (see e.g. Cornelissen [9, Lemma 2.1]), 2g + 1 odd, 1⊕1 2g + 2 even, as G K -modules. Let W be the wild inertia subgroup of G K . Hence 2g + 1 odd, 1⊕1 2g + 2 even, as W -modules, since W acts on them through a finite group of odd order. (Representation theory modulo p agrees with complex representation theory for finite groups of order prime to p.) The left-hand side has the same wild part of the conductor as H 1 et (C). For r ∈ R write X r for its G K orbit. The conductor of the right-hand side is and its tame part is Because dim Q l [X r ] I K is the number of I K -orbits on X r , which is the residue degree of K(r)/K, we have

Deficiency
In this section we explain how to see whether a semistable hyperelliptic curve is deficient in term of its cluster picture. We first recall some standard results regarding deficiency of curves (see e.g. [27] Section 8).
Definition 12.1. Let X/K be a geometrically integral, smooth and proper curve of genus g. Then X is deficient over K if and only if it has no rational divisor of degree g − 1; equivalently, the index I 2 does not divide g − 1, where Lemma 12.3. Let C/K be a hyperelliptic curve of genus g. The following are equivalent: 1) C is deficient over K, 2) C has even genus and has no rational point over any odd degree extension of K, 3) C has even genus and every component of the special fibre of its minimal regular model has either even multiplicity or a G k -orbit of even length.
Proof. Since C is hyperelliptic, it has either one or two points at infinity. In particular, it has a rational divisor of degree 2 so I 2 = 1 or I 2 = 2. Hence if g is odd then C is not deficient.
Theorem 12.4. Let C/K be a semistable hyperelliptic curve. Then C is deficient if and only if it has even genus and either (1) R = s 1 s 2 with s 1 , s 2 odd G k -conjugate clusters, and δ s 1 is odd, or (2) R isübereven with R (Frob) = −1 and for all non-übereven s such that s * = R, either d s / ∈ Z or the Frob-orbit of s has even size, or (3) R is a cotwin with a principalübereven child r with r (Frob) = −1, and for all s such that s * = r, either d s / ∈ Z or the Frob-orbit of s has even size.
Proof. Since C/K is semistable, all the components of the special fibre of its minimal regular model have multiplicity 1. Thus, by Lemma 12.3, C is deficient if and only if every component has a G k -orbit of even length. The result follows from the explicit description of dual graph of the special fibre of the minimal regular model of C together with the action of Frobenius given in Theorem 8.5. From the description of the Frobenius action on the vertices v s , v ± s and the various chains of edges, we see that all components will have even-length orbits under Frobenius if and only if: i) every principal non-übereven cluster has an even-length orbit under Frobenius, ii) every principalübereven cluster s either has an even-length orbit or s (Frob) = −1, iii) every twin and cotwin t either has an even-length orbit or t (Frob) = −1 and d t ∈ Z, iv) if R = s 1 s 2 is a disjoint union of two even clusters then (R) = −1, v) if R = s 1 s 2 is a disjoint union of two proper odd clusters then 1 2 (δ s 1 +δ s 2 ) is odd and s 1 and s 2 are swapped by Frobenius.
Since R itself cannot have a non-trivial orbit under Frobenius, it follows that it must either be a union of two odd clusters,übereven or a cotwin (and, in the cotwin case, its principal child must similarly beübereven). It follows by inspection that one of (1), (2) and (3) must hold for the curve to be deficient.
For the converse, observe that if a cluster s has an ancestor with an even-length Frobenius orbit, then so does s itself. In particular (1) automatically forces (i)-(v) to hold. Similarly, if (2) (respectively (3)) holds, then every proper cluster s with s * = R (respectively s * = r) will necessarily have a non-übereven ancestor a with a * = R (respectively a = r), and, since a is not a twin or cotwin, d a ∈ Z by the semistability criterion. Thus a must have a Frobenius-orbit of even length, and hence so does s. It follows that if either (2) or (3) holds, then so do (i)-(iv), and the curve is deficient.

Integral Weierstrass models
As we shall see in §13-17, cluster pictures are very well suited for studying Weierstrass equations of hyperelliptic curves, including discriminants and minimal Weierstrass equations. We begin by a criterion for checking whether a Weierstrass equation is integral, that is whether f (x) ∈ O K [x]. Since the cluster picture of a polynomial does not change under a substitution x → x − t, it is clearly not possible to determine whether f (x) ∈ O K [x] from the cluster picture. However, up to such shifts in the x-coordinate, this turns out to be possible.
Recall first the definition of an (abstract) cluster picture: Definition 13.1. Let R be a finite set, Σ a collection of non-empty subsets of R (called clusters), and d s ∈ Q to every s ∈ Σ of size > 1 (called the depth of s). Then Σ (or (Σ, R, d)) is a cluster picture if (1) Every singleton is a cluster, and R is a cluster.
(2) Two clusters are either disjoint or contained in one another.
Two cluster pictures (Σ, R, d) and (Σ , R , d ) are isomorphic if there is a bijection φ : R → R which induces a bijection from Σ to Σ and d s = d φ(s) . We say a group G acts on (Σ, R, d) if it acts by isomorphisms 17 .
We refer the reader to Table 1.8 for our standard notation for clusters, including the notions of child/parent and s ∧ s . Definition 13.2. Let (Σ, R, d) be a cluster picture with an action of G K , and let n ∈ Z. We say that the pair (Σ, n) is integral if either • n ≥ 0 and d R ≥ 0, or • there is a G K -stable proper cluster s with d s ≤ 0 and n + (|s|−|t|)d s + r / ∈s d r∧s ≥ 0 for some t which is either empty or a G K -stable child t < s with either |t| = 1 or d t ≥ 0. Theorem 13.3. Let C : y 2 = f (x) be a hyperelliptic curve over K, and let (Σ, R, d) be the associated cluster picture. Proof of Theorem 13.3. (1) As f (x) ∈ O K [x], clearly v(c f ) ≥ 0, so we may suppose d R < 0. If 0 is not a centre for R, then every r ∈ R has v(r) < d R , so that by Lemma 13.4 Thus, taking s = R and t = ∅, shows that (Σ, v(c f )) is integral. Henceforth suppose that d R < 0 and that 0 is a centre for R. Let s be the smallest proper cluster with centre z s = 0 and depth d s ≤ 0 and let t = {r ∈ s | v(r) > d s }. Note that, by minimality of s, t is either empty or a child of s (with d t ≥ 0 if |t| > 1). In particular v(r) < d s ≤ 0 for every r / ∈ s, and v(r) = d s ≤ 0 for every r ∈ s t. Thus where the last step comes from Lemma 13.4. Finally, note that s and t are G K -stable, and that either |t| ≤ 1 or t < s with d t ≥ 0. The result follows.
(2) If d R ≥ 0, by Lemma B.1 we can pick a centre z = z R ∈ K for R. Then the roots If d R < 0, consider s and t as in the definition of integrality of (Σ, v(c f )). If t = ∅, by Lemma B.1 we can pick a centre z = z t = z s ∈ K for t and s. If t is empty, pick z = z s ∈ K to be a centre for s, using the same Lemma. Shifting x to x − z, we may thus assume that z s = 0 is a centre for s, and that z t = 0 if t = ∅. By assumption, d s ≤ 0, so we have v(r) < d s ≤ 0 for all r ∈ s; moreover, d s ≤ v(r) for all r ∈ s, and 0 ≤ v(r) for r ∈ t. Hence The result follows from Lemma 13.4.
We record a further result that will be useful for understanding the minimal Weierstrass equation of a hyperelliptic curve. In view of Theorem 13.3 it gives a simple criterion for checking whether p n f (x − z) has integral coefficients for some z ∈ K, provided all the roots of f (x) lie in K.
Lemma 13.5. Let Σ be a cluster picture with trivial G K -action, such that d s ∈ Z for every cluster s and d R ≤ 0. Let n be the minimal integer which makes (Σ, n) integral.  Here the subscripts on clusters specify their relative depths, t can take all values in the range 0 < t < n, and all clusters of size 5 and 6 can have arbitrary depths. Horizontal lines correspond to cluster pictures that are related by redistributing the depth of a child s < R (possibly a singleton) and R s, and vertical lines to those related by adding or removing a root.
Remark 14.3. This agrees with the notion of equivalence in [16] for "metric cluster pictures" ([16] Definitions 3.43, 3.45). Metric cluster pictures do not carry a depth function on clusters, but only a relative depth, which is accounted for by the first of the steps in Definition 14.1. The other steps then correspond to the moves (iii), (iv) and (i/ii) in the definitions in [16].
Theorem 14.4. If C 1 : y 2 = f 1 (x) and C 2 : y 2 = f 2 (x) are isomorphic hyperelliptic curves over K, then their cluster pictures are equivalent.
Proof. Note that if F/K is a finite extention then the cluster pictures of C 1 and C 2 are equivalent over K if and only if they are equivalent over F . So we may assume that C i /K are semistable. Then by Theorem 5.18, the two metric hyperelliptic graphs G Σ C 1 and G Σ C 2 are isomorphic (see D.9 for the notation), and by [16] Thm 5.1, the cluster pictures Σ C 1 and Σ C 2 are equivalent.
be a separable polynomial with cluster picture Σ f = (R, Σ, d).
Suppose s < R and that all r ∈ s have v(r) = a and all r ∈ R s have v(r) = b. Let R = { 1 r : r ∈ R}. Then ψ : r → 1 r induces a 1-to-1 correspondence between Proof. (i) Clear, since 1 x − 1 y = y−x xy . (ii) Follows directly from (i).
Proposition 14.6. Let f (x) ∈ K[x] be a separable polynomial with roots R ⊂K, such that G K acts tamely on R, and let Σ be the associated cluster picture. Suppose Σ is a cluster picture obtained from Σ by one of the following constructions: (1) Increasing the depth of all clusters by some n ∈ Z; (2) Adding a root to Σ, provided |R| is odd, d R ∈ Z and |k| > #{s < R : s is G K -stable}; (3) Redistributing the depth from s to R s to eliminate s and then changing the depth of R to 0, provided |R| is even, s < R is G K -stable with d s ∈ Z and |k| > #{t < s : t is G K -stable}; (4) Redistributing the depth between s and R s by decreasing the depth of s by 1, provided |R| is even, s < R is G K -stable with d R , d s ∈ Z and |k| > #{t < s : t is G K -stable}. (5) Removing a root from R, provided |R| is even, d R ∈ Z and f (x) has a root r ∈ K which does not lie in any proper cluster other than R. Then there is a Möbius transformation φ(z) = az+b cz+d with a, b, c, d ∈ K, such that Σ is the cluster picture of R = {φ(r) : r ∈ R} {∞} if |R| is even and of Moreover, if y 2 = f (x) is a hyperelliptic curve, then there is a K-isomorphic curve given by a Weierstrass model whose cluster picture is Σ .
Proof. Depending on the case 1-5, the Möbius transformation φ can be obtained as follows: 1. Take φ(z) = π n z. 2. Since G K acts tamely, Lemma B.1 shows that R has a center z R ∈ K; shifting by this and applying (1) we may assume that z R = 0 and d R = 0. Shifting further by some y ∈ O K , we may assume that all r ∈ R are units in OK. Now φ(z) = 1 z has R = { 1 r : r ∈ R} ∪ {0}, which, by Lemma 14.5 (i), has the required properties. 3. As in the proof of (2), we may assume that d s = 0, z s = 0 and that all roots r ∈ s are units. All other roots r ∈ R s then have valuation v(r) = d R . By Lemma 14.5, φ(z) = 1 z gives the required cluster picture. 4. As in the proof of (2), we may assume that d R = 0, z s = 0 and that all roots r ∈ s have valuation 1. Note that all r ∈ R s have valuation 0. By Lemma 14.5, φ(z) = π K z gives the required cluster picture. 5. Shifting by r and applying (1), we may assume that z R = r = 0 and d R = 0. Since r does not lie in any proper subcluster of R, all the other roots of f (x) must be units. By Lemma 14.5, φ(z) = 1 z gives the required cluster picture. Finally observe that if y 2 = f (x) is a hyperelliptic curve, then a change of variables of the form x = ax +b cx +d , y = y (cx +d) g+1 for a Möbius transformation ψ(z) = az+b cz+d with a, b, c, d ∈ K, gives a model for C/K of the form y 2 = g(x ). The set of roots of g(x) is precisely R = {ψ −1 (r) : r ∈ R} {∞} if |R| is even and R = {ψ −1 (r) : r ∈ R ∪ {∞}} {∞} if |R| is odd. Setting φ = ψ −1 for φ as in the first part gives the desired model. Corollary 14.7. Let C : y 2 = f (x) be a hyperelliptic curve over K and Σ its cluster picture. If Σ is equivalent to Σ, then there is aK-isomorphic hyperelliptic curve C /K : y 2 = g(x) whose cluster picture is Σ .
Proof. Replacing K by a sufficiently large extension we may assume that Galois acts trivially on the roots of f (x) and that the depths of all clusters in Σ and Σ are integers. Now Proposition 14.6 lets us realise all the equivalence steps from Σ to Σ in Definition 14.1 through isomorphisms of curves.

Canonical cluster picture of a semistable curve
As any given hyperelliptic curve can admit many different models, it is often desirable to be able to put it in some canonical form. It turns out that every equivalence class of cluster pictures has a canonical representative (Lemma 15.1). Unfortunately, this canonical cluster picture does not always correspond to a Weierstrass model for C defined over K. However, for semistable curves this is nearly the case (Theorem 15.2). Moreover, if the genus of a semistable hyperelliptic curve is even, then this cluster picture does come from a Weierstrass model over K (Corollary 15.3). As we shall see in §18, this canonical cluster picture is particularly well suited for classifying all reduction types of semistable hyperelliptic curves in any given genus.
Lemma 15.1. Let (Σ, R, d) be a cluster picture with |R| = 2g + 1 or 2g + 2. There is a unique equivalent ("balanced") cluster picture has no clusters of size > g + 1, (iii) either Σ b has no clusters of size g +1 or it has two such clusters, in which case they have equal depth.
Theorem 15.2. Let C/K be a semistable hyperelliptic curve and suppose that |k| > number of G K -stable children of every cluster of size ≥ g + 1 in the cluster picture of C. Then there is a K-isomorphic curve C /O K : y 2 = f (x) with deg(f ) = 2g + 2 such that • the top cluster of C has depth 0; • the cluster picture of C has no cluster of size > g + 1; • either there is at most one cluster of size g + 1 and v(c f ) = 0, or Frob K swaps two clusters of size g + 1 and v(c f ) = 0 or 1.
Proof. Let (Σ, R, d) be the cluster picture of C/K. Recall that as C/K is semistable, it satisfies the semistability criterion (Theorem 7.1, Definition 1.7). In particular, the inertia group cannot permute proper clusters in Σ. If Frobenius swaps two clusters of size g +1, then by the semistability criterion d R ∈ Z (e.g. since s < R is principal and so has integral depth, and δ s ∈ Z by Proposition C.7 (2)). Applying a transformation of the form x = π k K x, y = π n K x gives a model over K with the required cluster picture.
Suppose henceforth that Frobenius does not swap clusters of size g + 1, and consequently that all clusters of size ≥ g + 1 are G K -stable. We now change the model for C by repeatedly applying Proposition 14.6: (2) creates a cluster picture with an even number of roots, then (1) or (3) makes the depth of the top cluster 0, and finally a repeated use of (4) removes all clusters of size > g + 1 and leaves at most one cluster of size g + 1 (principal clusters have integral relative depth by Proposition C.7 using that the depth of the top cluster is now 0 for the case when it is a cotwin). The resulting model necessarily has v(c f ) ∈ 2Z (semistability criterion for the top cluster, as it now has depth 0), and hence a change of variables of the form y = π k y gives a model over K with the required cluster picture.
Finally, Theorem 13.3 shows that shifting the x-coordinate by a suitable element of K gives a model over O K . Corollary 15.3. Let C/K be as in Theorem 15.2. If C has even genus then there is a K-isomorphic curve C /O K : y 2 = f (x) such that • the top cluster of C has size 2g + 2 and depth 0; • the cluster picture of C has no cluster of size > g + 1; • either v(c f ) = 0 and there is no cluster of size g + 1, or v(c f ) ∈ {0, 1} and there are two clusters of size g + 1 with equal depths. Any other K-isomorphic curve C /O K satisfying (1), (2) and (3) has the same cluster picture and valuation of leading term as C .
Proof. The existence of C follows from the theorem and, in the case when the theorem yields a cluster picture with a cluster of size g + 1, Proposition 14.6(4). The fact that, in this special case, the two resulting clusters s, s of size g + 1 can be made to have equal depth follows from the semistability criterion, which shows that δ s , δ s ∈ Z and (g + 1)δ s ≡ (g + 1)δ s mod 2 (Theorem 7.1, Definition 1.7).
Uniqueness of the cluster picture follows from the fact that isomorphic curves have equivalent cluster pictures (Theorem 14.4) and uniqueness of balanced cluster pictures (Lemma 15.1).
Remark 15.4. Theorem 17.1 and Proposition 17.5 show that the models obtained in the theorem and the corollary are minimal Weierstrass equations.

Discriminant
Recall the definition of the discriminant of a hyperelliptic curve: [24], Section 2) Let C : y 2 = f (x) be a hyperelliptic curve of genus g over K. The discriminant ∆ C of C is Our main result on the discriminant is that one can easily read off its valuation from the cluster picture of C and, when C/K is semistable, one can moreover read off the valuation of the discriminant of its minimal Weierstrass model: Theorem 16.2. Let C : y 2 = f (x) be a hyperelliptic curve of genus g over K, and let (Σ, R, d) be the associated cluster picture. Then If C/K is semistable and |k| > 2g+1, then the valuation of the discriminant ∆ min C of a minimal Weierstrass model of C is determined by the formula where E = 0 unless Σ has two clusters of size g + 1 that are permuted by Frobenius and v(c f ) is odd, in which case E = 1.
The first part of the theorem follows directly from Lemmas 16.4 and 16.5 below. The second part will be proved at the end of section 17, after we find a description for minimal Weierstrass equations in terms of cluster pictures.
In the remainder of this section we establish some results on how the discriminant changes under the different steps yielding equivalent cluster pictures (see Definition 14.1). As equivalence of cluster pictures is closely tied to isomorphisms of hyperelliptic curves (see Theorem 14.4 and Proposition 14.6), this will be the key to understanding minimal Weierstrass equations and their discriminants. Recall also that we have a notion of integrality for cluster pictures (see Definition 13.2), which gives a way of determining whether a cluster picture corresponds to an integral Weierstrass equations. (ii) If Σ has odd size and Σ is obtained by adding a root to Σ, then v(∆ Σ ,n ) = v(∆ Σ,n ) + 2d R |R|.
The following proposition identifies a number of scenarios when we can manipulate integral cluster pictures to decrease the valuation of their discriminant. (ii) If Σ has odd size, d R ≤ 0 and Σ is obtained by adding a root to Σ, then n = n − d R and v(∆ Σ ,n ) = v(∆ Σ,n ).
(iii) If Σ has even size, d R ≤ 0, Σ has a cluster t with |t| ≥ |R| 2 , d t > 0 and d P (t) ≤ 0, and Σ is obtained by redistributing the depth of the child s < R containing t and R s to d s = d s − 1 and d R s = d R s + 1, then (iv) If Σ has even size, d R < 0, Σ has no cluster t with |t| ≥ |R| 2 and d t ≥ 0, and Σ is obtained by increasing the depth of all clusters by 1, then (v) If Σ has even size, d R < 0, Σ has a cluster t with |t| ≥ |R| 2 and d t = 0, and Σ is obtained by increasing the depth of all clusters by 1, then n = n − |R| + |t| and v(∆ Σ ,n ) = v(∆ Σ,n ) + (2|t| − |R|)(|R| − 1).
Proof. (i) The claim for n, n is clear. The rest follows from Lemma 16.6(i).
(ii) The claim for n follows from Lemma 13.5(i). Lemma 16.6(ii,iii) then gives (iii) Since the cluster depths are assumed to be integers, we must have d t ≥ 0, so by Lemma 13.5(ii, ii'), Thus by Lemma 16.6(iii,iv), (iv) By Lemma 13.5(i) we can write n = − r / ∈t d r∧t for some t which has d P (t) ≤ 0 and is either a singleton or has d t > 0. Since necessarily |t| < |R| 2 , we must have By Lemma 13.5(i) it follows that n < n − |R| 2 .
(v) By Lemma 13.5 (ii',ii), and by Lemma 16 We end this section with a result that effectively gives sufficient criteria for a cluster picture to correspond to a minimal Weierstrass equation.
Corollary 16.8. Suppose (Σ, R, d) is a cluster picture with a trivial action of G K , with |R| = 2g +2, with d R = 0, with d s ∈ Z for every proper cluster s, and with no cluster s = R of size |s| > g +1. Then for every integral (Σ , n ) with Σ equivalent to Σ, with d s ∈ Z for every cluster s, and with trivial G K -action, with equality if and only if Σ has no cluster of size > g + 1 with depth > 0, but has some cluster t of size ≥ g + 1 with d t ≥ 0, and n = − r / ∈t d r∧t .
Proof. By [16] Thm 5.1, there is a unique ("balanced") cluster picture (Σ b , R b , d b ) equivalent to Σ with R b even, d b R b = 0, no clusters other than R b of size > g + 1, and either zero or two clusters of size g + 1, in which case they have equal depth. Note that, by uniqueness, either Σ = Σ b , or Σ b is obtained from Σ by redistributing the depths of a child s < R of size g + 1 and R s so that they get equal depth. Thus by Lemma 16.6(iv) v(∆ Σ b ,0 ) = v(∆ Σ,0 ). Now consider Σ . From the definition of the discriminant and Lemma 13.5(ii), we may assume that n is the minimal integer that makes (Σ , n ) integral.
By Proposition 16.7(i,ii), it suffices to prove the result when Σ has even size and d R ≤ 0.
By Proposition 16.7(iv), we may further assume that either d R = 0, or d R < 0 and Σ has a cluster of size ≥ g+1 with depth ≥ 0.
By Proposition 16.7(iii), we may further further assume that Σ has no cluster s with |s| > g+1 and d s > 0.
Suppose d R < 0. If Σ has a cluster s of size g+1 and depth d s > 0, then repeatedly applying Proposition 16.7(iii), reduces the problem to the case when Σ has a cluster s of size g+1 and depth d s = 0. Now if s is a cluster of size ≥ g+1 and depth d s = 0, then repeatedly applying Proposition 16.7(v) followed by (iii) (which eventually eliminates the cluster by pushing d R up to 0) reduces the problem to the case when d R = 0.

Minimal Weierstrass equations
Theorem 17.1. Let C : y 2 = f (x) be a hyperelliptic curve over K with f (x) ∈ O K [x], and let Σ be the associated cluster picture. If d R = 0, v(c f ) = 0 and Σ has no cluster s = R of size |s| > g + 1, then C is a minimal Weierstrass equation.
Proof. Suppose another integral Weierstrass model C : y 2 = g(x) for C has cluster picture Σ . Over a suitable field extension F/K, the depths of all clusters of Σ and Σ are integers, and Gal(F /F ) acts trivially on both cluster pictures. By Theorems 13.3 and 14.4, (Σ , v F (c g )) is integral and Σ is equivalent to Σ over F . By Proposition 16 , and so the same inequality holds over K. By Lemma 16.4, v(∆ C ) ≤ v(∆ C ), as required.
For semistable hyperelliptic curves, we can give a full characterisation of minimal Weierstrass models in terms of cluster pictures: Theorem 17.2. Let C : y 2 = f (x) be a semistable hyperelliptic curve over K, and let (Σ, R, d) be the associated cluster picture. Suppose that every cluster of Σ of size > g + 1 has at most |k|−1 G K -stable children.
Then there is some z ∈ K such that y 2 = f (x − z) is a minimal Weierstrass model if and only if one of the following conditions holds (1) Σ has two clusters of size g + 1 that are swapped by Frobenius, d R = 0 and v(c f ) ∈ {0, 1}, (2) Σ has no cluster of size > g +1 with depth > 0, but has some G K -stable cluster t of size |t| ≥ g + 1 with d t ≥ 0 and v(c is a minimal Weierstrass equation if and only if Σ satisfies either (1) or (2), The rest of this section is devoted to the proof of this theorem. Our approach is to translate everything in terms of cluster pictures (semistability, integral Weierstrass equations, discriminants) and work mainly on that level. The two cases for the cluster picture in the above theorem are quite distinct and it will be convenient to use the following terminology: Definition 17.3. The cluster picture of a semistable hyperelliptic curve y 2 = f (x) of genus g is exceptional if it has two clusters of size g + 1 that are swapped by Frobenius.
Proposition 17.4. Let C : y 2 = f (x) be a semistable hyperelliptic curve over K, let Σ be the associated cluster picture and n = v(c f ). Suppose C is another Weierstrass model for C with corresponding (Σ , n ). Then Σ is exceptional if and only if Σ is. If so, then, n ≡ n mod 2 and Σ is obtained from Σ by increasing the depths of all clusters by some Proof. Since C is another Weierstrass model for C, their special fibres have the same dual graphs with the same automorphisms induced by Frobenius. By Theorem 8.5 this graph Υ C modulo the hyperelliptic involution has a unique fixed point under the Frobenius action. In the terminology of [16], it follows that they have the same open hyperelliptic graph ([16] Proposition 5.7 withG = Υ C ) and hence the same metric cluster picture with the same automorphisms induced by Frobenius ([16] Thm 4.2). In particular, Σ is obtained from Σ by increasing the depth of all clusters by some d ∈ Z, and with the same action of Frobenius on clusters.
Thus Σ is exceptional if and only if Σ is. It follows from the semistability criterion (Theorem 7.1, Definition 1.7) that n ≡ n mod 2. Finally the valuation of the discriminant follows from Lemma 16.6(i,iii).
Since the discriminants of the cluster pictures are those of the curves (Lemma 16.4), it follows that C is a minimal Weierstrass equation.
For the converse, suppose C : y 2 = f (x) is a minimal Weierstrass model and Σ is exceptional. A substitution of the form y 1 = p a y and x 1 = p b x for suitable a, b ∈ Z, gives a new model C whose cluster picture Σ is also exceptional, d R = 0 and the corresponding valuation n is either 0 or 1. Theorem 13.3 gives a new integral model C with the same cluster picture, d R = 0 and n ∈ {0, 1}. By the first part of the proof, C is a minimal Weierstrass model (so v(∆ Σ ,n ) = v(∆ Σ,n )), n = n and d R = 0.
We now turn to cluster pictures that are not exceptional.
Lemma 17.6. Let C : y 2 = f (x) be a semistable hyperelliptic curve over K with cluster picture Σ. Suppose that Σ is not exceptional and that every cluster of Σ of size > g + 1 has at most |k| − 1 G K -stable children. Then C admits an integral Weierstrass model y 2 = h(x) with v(c h ) = 0 and whose cluster picture (Σ , R , d ) has |R | = 2g+2, d R = 0 and has no cluster s = R of size > g+1.
Proof. This follows from Theorem 15.2, and the fact that by Proposition 17.4, Σ cannot be exceptional.
be a semistable hyperelliptic curve. Suppose the associated cluster picture Σ is not exceptional and that every cluster of Σ of size > g + 1 has at most |k|−1 G K -stable children. Then the Weierstrass equation is minimal if and only if Σ has no cluster of size > g + 1 with depth > 0, but has some cluster t of size ≥ g + 1 with d t ≥ 0 and − r / ∈t d r∧t = v(c f ).
Proof. By Lemma 17.6, there exists another integral model C min : y 2 = g(x) with v(c g ) = 0 and whose associated cluster picture Σ min has its top cluster of depth 0, and has no other clusters of size > g + 1. By Theorem 17.1 C min is a minimal Weierstrass equation, so v(∆ C ) ≥ v(∆ C min ).
It remains to show that the claimed condition for having equality is correct. Passing to a suitable field extension if necessary, we may assume that all the clusters in Σ have integer depth and that the Galois group acts trivially on Σ and on Σ min . By Theorem 14.4, Σ is equivalent to Σ min , so by Corollary 16.8 v(∆ C ) = v(∆ C min ) if and only if Σ has no cluster of size > g + 1 with depth > 0, but has some cluster t of size ≥ g + 1 with d t ≥ 0, and v(c f ) = − r / ∈t d r∧t .
Proof of Theorem 17.2. Note first that, by definition of being exceptional, conditions (1) and (2) are mutually exclusive. Note also that y 2 = f (x) and y 2 = f (x − z) have the same cluster picture and the same valuation of the leading term of the defining polynomial. Suppose Σ is exceptional. If Then Proposition 17.7 shows that Σ has no cluster of size > g + 1 with depth > 0, but has some cluster t of size ≥ g + 1 with d t ≥ 0, and v(c f ) = − r / ∈t d r∧t . Since Σ is not exceptional, t is necessarily G K -stable, so condition (2) holds.
Finally, suppose Σ is not exceptional and satisfies (2). If t = R then d t = 0 and n = 0, so (Σ, n) is integral. If t = R, then r / ∈t so (Σ, n) is again integral (with s = P (t) in Definition 13.2). By the semistability criterion G K acts tamely on R, so by Theorem 13.3 (2) , and by Proposition 17.7, y 2 = f (x − z) is a minimal Weierstrass equation.
Proof of Theorem 16.2. The first part of the theorem follows from Lemmas 16.4 and 16.5. From now on, suppose C/K is semistable.
First suppose that Σ is exceptional. A substitution of the form x = π a K , y = π b K gives a curve whose cluster picture is obtained from Σ by increasing the depth of all clusters so that R gets depth 0, and whose valuation of the leading term of the defining polynomial is either 0 or 1. By Theorem 17.2(i) this is the cluster picture of a minimal Weierstrass equation of C. The result follows from Lemma 16.6(i,iii). Now suppose that Σ is not exceptional. Let (Σ b , R b , d b ) be the equivalent balanced cluster picture (in the sense of Lemma 15.1). Let C be the Weierstrass model given by Theorem 15.2. By Theorem 17.2, this is a minimal Weierstrass model. Its cluster picture is either already balanced, or is obtained from the balanced one by redistributing the depth of a child of R of size g+1. Thus, by Lemmas 16.4 and 16.6(iv), . The balanced cluster picture (Σ b , 0) is also obtained from (Σ, v(c f )) itself by (i) adding a root if necessary to make R have size 2g + 2, (ii) increasing the depth of all clusters so that R has depth 0, (iii) changing the valuation of the leading term to 0, and (iv) repeatedly redistributing the depth of a child of R of size ≥ g+1 to eliminate all clusters of size > g+1 and make the ones of size g + 1 have equal depths. Thus by Lemma 16.6, which simplifies to give the required expression.

Reduction types and a classification in genus 2
In this section, we propose a notion of the reduction type of a semistable hyperelliptic curve. For elliptic curves these types would correspond to good, split multiplicative of type I n or non-split multiplicative of type I n . Our main input is the cluster picture of the curve which determines the combinatorics of its special fibre as well as several other invariants. Since our residue field is not algebraically closed, we need to keep track of the action of Frobenius on proper clusters and the sign s (Frob) for even clusters. For elliptic curves with multiplicative reduction this sign will distinguish between split and non-split cases.
Definition 18.1. By the reduction type of a semistable curve of genus ≥ 2 over a nonarchimedean local field we mean (the isomorphism class of) the dual graph of the special fibre of its minimal regular model with Frobenius action and with a genus associated to every vertex.
For hyperelliptic curves there is a notation for such types given in [16, §8].  Table 6 lists all reduction types of semistable genus 2 curves together with their labels. Here the numbers inside the vertices indicate their genus (no number meaning genus 0). We draw an edge of length n to indicate a chain of n edges between n − 1 genus 0 vertices. The black arrows represent the action of Frobenius on the graph.  Table 6. Reduction types of semistable genus 2 curves Theorem 18.4. The cluster picture of a semistable hyperelliptic curve over K together with the action of Frobenius on clusters and s (Frob) for even clusters determine the reduction type of the curve.
Proof. This is clear from the definition of reduction type and Theorem 8.5.
It follows that one can classify all reduction types of semistable curves of a given genus via their cluster pictures with this extra data. Note that different cluster pictures can give the same reduction type.
Notation 18.5. Given the cluster picture of a semistable hyperelliptic curve, we write the relative depth on all proper clusters (except for R which is decorated with its depth) at the bottom right corner of the cluster. For every even cluster s such that s = s * we write a sign + or − on its top right corner to indicate s (Frob). For every cluster, we link its children that are in the same Frobenius orbit by lines.
Note that the definition of s (see Definition 1.12) depends on a choice of sign for θ s . A different choice of sign will change the sign parameter on s and on Frob(s) if these are different clusters.
Example 18.6. Suppose p ≡ 7 mod 8. The curve has the following cluster picture [16, §9] explains how to list all the reduction types of semistable hyperelliptic curves of arbitrary genus g. Given a hyperelliptic curve, in order to find its reduction type in that list, we first construct its cluster picture together with the additional data as in Notation 18.5 and either we use Theorem 8.5 or use Table 4.20 of [16] to identify (the core of its open) hyperelliptic graph with automorphism induced by Frobenius. Theorem 5.18 guarantees that the latter produces the correct reduction type.
Finally, note that Theorem 15.2 shows that every semistable hyperelliptic curve has a K-rational model with a distinguished cluster picture. For instance in genus 2, curves with cluster pictures that have no clusters of size 4 or 5 cover all K-isomorphism classes (see Theorem 18.7.(2)). In general, hyperelliptic curves of genus g with a cluster picture that has no cluster s of size g + 1 < |s| < 2g + 2 cover all K-isomorphism classes.
In the rest of this section we give a complete classification for semistable genus 2 curves.
Theorem 18.7. Let C be a hyperelliptic curve over K of genus 2 with cluster picture Σ C . 1) C/K is semistable if and only if (a) Σ C is one of the pictures in Table 7 with n, m, k, r, t ∈ Z, (b) the thick black cluster s has depth d s ∈ Z and ν s ∈ 2Z, and (c) wild inertia does not permute any root. In this case its reduction type is the one given in Table 7.
2) If C is semistable and |k| > 5 then there is an isomorphic curve C /K such that Σ C is the top cluster picture in the second column of the same reduction type as Σ C , with the same parameters n, m, k, r, , δ and with t = r.
3) The Namikawa-Ueno type of a semistable genus 2 curve is as indicated in Table 7.
Proof. The table contains all possible cluster pictures for genus 2 curves, with all possible choices of a permutation of proper clusters and choice of signs on even clusters of the form s * . 1) The semistability claim follows from Theorem 7.1 and Proposition C.7 with the thick black cluster as choice for s. The reduction type follows from Theorem 8.5.
2) By Corollary 15.3 there is a model for the curve whose cluster picture is balanced in the sense of Lemma 15.1. By Theorem 14.4 their cluster pictures are equivalent and in particular their relative depths are related as in the table. Moreover, the special fibres have isomorphic dual graphs with the same action of Frobenius, which pins down the Frobenius action on clusters and the sign parameters as given in the table. 3) The Namikawa-Ueno type is determined by the dual graph of the special fibre of the minimal regular model. The arithmetic invariants of genus 2 semistable hyperelliptic curves depend on the reduction type as follows.
Theorem 18.8. Let K be a local field of odd residue characteristic and C/K a semistable hyperelliptic curve of genus 2. Then the reduction type of C/K is one of the ones listed in Table 8.
Any genus 2 curve y 2 = f (x) with one of the cluster pictures from the table is semistable of the corresponding reduction type. If f (x) ∈ O K [x] then this is a minimal Weierstrass model. Moreover if |k| > 5, then every semistable C/K admits a model and one of the listed cluster pictures.
The invariants of the curve and its Jacobian are as given in the table (the value of v(∆ min ) is conditional on |k| > 5). In the table m is the number of components in the special fibre of the minimal regular model of C, n is the conductor exponent, w is the local root number, c is the Tamagawa number of Jac(C). Def is -or + depending on whether the curve is deficient or not; (−) r means deficient if and only r is odd. The column H 1 (Υ C , Z) lists the isomorphism class of the lattice together with automorphism (induced by Frobenius) and pairing (induced by the length pairing on Υ C ), in the notation of Theorem 1.2.2 in [3].
Proof. The completeness of the list of reduction types, and that curves with such cluster pictures are semistable and have these types follow from Theorem 18.7. The claim regarding minimality of the model follows from Theorem 17.2. If |k| > 5, Theorem 18.7 shows that C admits a model with the cluster picture corresponding to this type. In this case, the value for the valuation of the minimal discriminant follows from Theorem 16.2.
The number of components m is clear from the dual graph Υ C . The conductor exponent n, the root number w and deficiency Def follow from Theorems 9.4, 2.20 and 12.4. The Tamagawa number is explicitly determined by the lattice type by Theorem 1.2.2 in [3], using the fact that H 1 (Υ C , Z) is isomorphic to the character lattice of the torus in the Raynaud parametrisation (Lemma 2.21).
Finally, it remains to prove the claim for the lattice type of H 1 (Υ C , Z). The dimension of the lattice and the eigenvalues of Frobenius come from the cluster picture (with the extra data) as given by Corollary 9.6.
Suppose that R is notübereven. Then the pairing with respect to the basis given in Theorem 9.3 is diagonal with values given by twice the relative depth of the corresponding twins; the dual lattice and the lattice type follow except for the types I + n˜n and I + n× r I n . For these two cases, let t 1 , t 2 be the two twins and t 1 , t 2 the corresponding loops which generate H 1 (Υ C , Z). The Frobenius invariant/anti-invariant loops are generated by t 1 + t 2 and t 1 − t 2 respectively. It follows that H 1 (Υ C , Z) is not spanned by these and hence the type is [1.2 B : * , * ]. However, over an unramified quadratic extension, it becomes a [1.1 : n, n] and hence by Theorem 1.2.2 in [3] with f = 2, the type is a [1.2 B : n, n].
By properties of Smith normal forms, there exists a Z-basis g 1 ,

Local constancy of arithmetic invariants
Observe that all our main results on a hyperelliptic curve C : y 2 = f (x) are obtained from fairly coarse data coming from the roots of f (x). It follows that small p-adic perturbations of the roots of f (x) do not change the arithmetic invariants of C. Here is a precise formulation: Theorem 19.1. Suppose C 1 /K : y 2 = f 1 (x), C 2 /K : y 2 = f 2 (x) are two hyperelliptic curves, such that (a) The leading coefficients c f 1 of f 1 and c f 2 of f 2 satisfy

Then
(1) C 1 and C 2 acquire semistable reduction over the same extensions of K.
(2) If C 1 , C 2 are semistable over a finite Galois extension F of K, then the special fibres of their minimal regular models over O F nr are isomorphic as curves with the semilinear action of G K given by (2.16).
as G K -modules, for every l = p. (4) If C 1 , C 2 are semistable and |k| > 2g + 1, then the valuation of their minimal discriminants are equal.
Remark 19.2. By (3) C 1 and C 2 share the same conductor exponent and root number. By (2) if C 1 and C 2 are semistable then they have the same reduction type (in the sense of Definition 18.1). It follows that C 1 is deficient if and only if C 2 is, and that their Jacobians have the same Tamagawa number.
Proof of Theorem. First note that by (a) and after a change of variable, we may assume that c f 1 = c f 2 . Moreover by (b), φ induces an isomorphism of cluster pictures, preserving depths and the Galois action on the roots.
(2) There is a one-to-one correspondence between valid discs (cf. §4) for C 1 and C 2 over F , defined as follows. By the semistability criterion, every proper cluster s for C 1 contains either an I F -invariant root r or a twin consisting of I F -conjugate roots r 1 , r 2 . Let z s = r in the first case, and z s = (r 1 + r 2 )/2 in the second case. Then every valid disc for C 1 has a centre z s ∈ F nr of this type. It corresponds to a valid disc of C 2 that has centre φ(r), respectively, (φ(r 1 ) + φ(r 2 ))/2, and the same radius. This gives the one-to-one correspondence D ↔ φ(D).
Next, we claim that the reduction maps agree, that is red D (r) = red φ(D) (φ(r)) for every root r and valid disc D of C 1 . As the radii are the same, this is equivalent to because r − z D = (r − r 1 ) + r 1 −r 2 2 , and the second term has higher valuation than the first (and similarly for φ(r) − z φ(D) ). It follows from Definition 1.12 and 8.2 that all α, β, γ, are the same for the corresponding discs (using the same argument as above for β in the case of non-root centres), and by Proposition 5.20 and Theorem 6.2, the special fibres are the same, with the same Galois action.
(3) By (2.18), the Tate module V l Jac(C), and hence H 1 et (C), is determined as a Galois module by the special fibre of the minimal regular model over F together with the G K -action (2.17). These are the same for C = C 1 and C = C 2 by (2).
(4) Since the cluster pictures are the same, so are the minimal discriminants by Lemma 16.4 and Theorem 16.2. Corollary 19.3. Suppose C 1 : y 2 = c 1 f 1 (x) and C 2 : y 2 = c 2 f 2 (x) are two hyperelliptic curves with c 1 , c 2 ∈ K × and f 1 (x), where d is the largest depth among the depths of all proper clusters of C 1 , then as G K -modules for every l = p, C 1 and C 2 have the same conductor exponent and the same root number.
• If C 1 is semistable then so is C 2 . In this case, the special fibres of their minimal regular models over O K nr are isomorphic as curves with an action of Frobenius, their Jacobians have the same Tamagawa number, C 2 is deficient if and only if C 1 is and, if |k| > deg f 1 (x), the valuations of their minimal discriminants are equal.
Proof. By hypothesis, the condition (a) of Theorem 19.1 holds. Also, as f 1 (x) and f 2 (x) are monic and congruent mod π, they have the same degree. Let F be the splitting field of f 1 (x) and α 1 , ..., α n ∈ F its roots. Note that α i mod π d+1 is a root of f 2 (x) mod π d+1 for all i. By definition of depth, these are all distinct so that by Hensel's Lemma, the roots β 1 , ...β n of f 2 (x) can be ordered so that α i ≡ β i mod π d+1 . Now if σ(α i ) = α j then σ(β i ) ≡ β j mod π d+1 and hence σ(β i ) = β j . Finally by choice of d, we have β i − β j ≡ α i − α j ≡ 0 mod π d+1 , so that Appendix A. Hyperelliptic curves Let K be a field with char(K) = 2. By a (possibly singular) hyperelliptic curve where f (X) ∈ K[X] is of degree 2g or 2g + 1, has leading coefficient c f and has at worst double roots, we mean the projective curve given by glueing the pair of affine patches By the points at infinity on C we mean the points of C U X , i.e. the points with T = 0 on U T . If deg(f ) = 2g + 1 there is a unique such, are the two points on U T with T = 0. Note that the points at infinity are always nonsingular. The singular points of C, all of which are nodes, are precisely those of the form (r, 0) on U X where r is a double root of f (X). Write f (X) = c f g(X)h(X) 2 with g(X), h(X) monic and square free. Then the normalization of C is the hyperelliptic curve and the canonical morphism C → C is given (on the chart U X ) by (A.2) (x, y) → (x, yh(x)).
The points on C above a node (r, 0) are Given a morphism φ : C 1 → C 2 of hyperelliptic curves, we denote byφ the unique morphism C 1 → C 2 making the diagram Remark A.4. We allow the case where every root of f (X) is a double root, in which case C is not geometrically connected. The discussion above and lemma below, however, remain valid as stated.
(i) As a (rational) map U T,1 → U T,2 , φ is given onK-points by the formula In particular, if deg(f 1 ) is odd then P ∞ → P ∞ whilst if deg(f 1 ) is even then P (ii) For i = 1, 2, write f i (X) = h i (X) 2 g i (X) with h i , g i monic and squarefree. The morphismφ : C 1 → C 2 is given explicitly onK-points by the formula (x, y) → ασ(x) + β, γα −deg(h 1 ) σ(y) . Proof. (i). Let (t, v) ∈ U T,1 with t = 0. This corresponds to the point (1/t, v/t g+1 ) ∈ U X,1 which under φ is mapped to the point α + βσ(t) σ(t) , γσ(v) σ(t) g+1 ∈ U x,2 . Changing variables we see that this corresponds to the point σ(t) α + σ(t)β , γσ(v) (α + σ(t)β) g+1 ∈ U T,2 . Since this formula describes a rational map which is defined at t = 0 it gives the desired expression for the morphism on U T,1 , as well as the claim about the points at infinity.

In particular we haveφ
(iii). We first claim that where f σ 1 (X) is the result of applying σ to the coefficients of f 1 (X). In particular c f 2 = (γ/α g+1 ) 2 σ(c f 1 ).
Since both the x-coordinate map U x,1 (K) →K and σ :K →K are surjective we deduce that γ 2 f σ 1 (x) = f 2 (αx + β) holds for all x ∈K and is thus a polynomial identity, from which (A.6) follows.
That the claimed formula forφ gives a morphismC 1 →C 2 making the diagram commute, we use that from (A.6) one has = ν P (s) + |s|δ s .
Lemma C.6. The following are equivalent: (1) There exists a principal cluster s with d s ∈ Z and ν s ∈ 2Z and for all other principal clusters s , s = R, a) δ s ∈ Z if s is even and P (s ) is principal, b) δ s ∈ 2Z if s is odd and P (s ) is principal, c) δ s − δ s ∈ 2Z if R = s s and s , s odd. d) δ s − δ s ∈ Z if R = s s and s , s even. (2) all principal clusters s have d s ∈ Z and ν s ∈ 2Z.
Proof. For all proper clusters s we have d s = d P (s) + δ s by definition of δ s , and ν s = ν P (s) + |s|δ s , by Lemma C.5. The result follows from a simple case-by-case check, and the fact that going to parent and child clusters allows one to move from any principal cluster to any other one, moving only through principal clusters and possibly through R when it is a union of two odd or two even clusters.
Proposition C.7. Let C/K be a hyperelliptic curve and let s be a principal cluster. Then C/K satisfies the semistability criterion if and only if 1) There exists a principal cluster s with d s ∈ Z and ν s ∈ 2Z, 2) for all proper clusters s , s = R, a) δ s ∈ Z if |s | > 2 is even and P (s ) is not a cotwin, b) δ s ∈ 2Z if |s | is odd and P (s ) is principal, c) δ s ∈ 1 2 Z if |s | = 2, d) δ s ∈ 1 2 Z if |s | = 2g and P (s ) is a cotwin, e) δ s , δ s ∈ Z and δ s + δ s ∈ 2Z if R = s s and s , s odd, f ) δ s , δ s ∈ Z if R = s s and s , s even principal, 3) wild inertia acts trivially on the roots.
Proof. Suppose C/K satisfies (1)-(3). By (1) and (2) the curve satisfies the hypotheses of Lemma C.6(1), and hence all principal clusters s have d s ∈ Z and ν s ∈ 2Z. By (2e), (2f), if R is a union of two clusters then d R ∈ Z, so by Lemma C.3 all proper clusters are inertia invariant and the ramification degree of K(R)/K is at most 2.
Conversely, suppose that C/K satisfies the semistability criterion. Then (1) and (3) trivially hold. If R = s 1 s 2 is a union of two clusters, then at least one of the s i is principal, so they cannot be permuted by I K . By Lemma B.1, s 1 and s 2 have centres z s 1 , z s 2 ∈ K (taking z s = r if s = {r} is a singleton), and hence d R = v(z s 1 − z s 2 ) ∈ Z. Thus (2a), (2b), (2e) and (2f) hold because d s ∈ Z and ν s ∈ 2Z for every principal cluster s. Finally, (2c) and (2d) follow from Lemma C.2.
Appendix D. Metric cluster pictures, hyperelliptic graphs and BY trees Here we summarise various definitions and constructions from [16]. Specifically, we recall the combinatorial notion of metric cluster picture and the process for associating a metric BY tree and metric hyperelliptic graph to each such. The relevance to this paper is that, for the metric cluster picture associated to a semistable hyperelliptic curve over a local field K of odd residue characteristic (Example D.3), the resulting hyperelliptic graph is precisely the dual graph of (the special fibre of) its minimal regular model over K nr (Theorem 5.18). We caution that our notation differs slightly from that of [16]. Where there are differences we indicate this immediately after the relevant defintion and note in particular that, for a metric cluster picture Σ, we write T Σ (resp. G Σ ) for the graph denoted in op. cit. as T (Σ) (resp. G(T (Σ))).
We adopt the same definitions and conventions for metric graphs as in Section 2.1.1. In particular we allow graphs to have loops and multiple edges and automorphisms of a metric graph G are homotopy classes of homeomorphisms G → G preserving vertices and lengths (which may permute multiple edges and reverse direction of loops).

D.1. Cluster pictures.
Definition D.1 (Cluster picture). Let X be a finite set and Σ a collection of non-empty subsets of X; elements of Σ are clusters. Then Σ (or (X, Σ)) is a cluster picture if (1) every singleton is a cluster, and X is a cluster, (2) any two clusters are either disjoint or one is contained in the other.
A cluster picture (X, Σ) is metric if it is equipped with a distance δ(s, r) = δ(r, s) ∈ R >0 for every pair of proper clusters s < r. This extends to a distance function between all pairs of proper clusters in the natural way; see [16,Definition 3.45].
We talk about properties of clusters using the notation and terminology set out in Table 1.8 (see also [16,Section 3]), and do not recall these terms here in the interest of space. In particular (X, Σ) has genus g if |X| ∈ {2g + 1, 2g + 2}. In this appendix we restrict to cluster pictures of genus at least 2.
Example D.2. Let C/K : y 2 = f (x) be a hyperelliptic curve and denote by R ⊆K the set of roots of f (x). Then the non-empty subsets of R cut out by discs form a metric cluster picture, where for proper clusters s < s we set δ(s, s ) = d s − d s where d s = min r,r ∈s {v(r − r )} is the depth of the cluster s. Example D.3. As a concrete example of the above, take K = Q p for p odd and consider the monic polynomial f (x) with set of roots R = {1, 1+p 2 , 1−p 2 , p, 0, p 3 , −p 3 }, so that the resulting hyperelliptic curve C : y 2 = f (x) is the one considered in (1.2). There are four proper clusters: of depths 0, 2, 1 and 3 respectively. We represent this pictorially by drawing roots r ∈ R as , and drawing ovals around roots to represent a cluster: the roots ordered as they appear in the definition of R. The subscript of the top cluster R is its depth and for all other clusters it is their "relative depth": the difference between their depth and that of their parent cluster.
Definition D.4 (Automorphisms of cluster pictures). An automorphism of Σ is a pair σ = (σ 0 , σ ) where σ 0 is a permutation of the proper clusters preserving sizes, inclusions and, in the metric case, distances, and σ is a collection of signs σ (s) ∈ {±1} for even clusters s ∈ Σ such that σ (s ) = σ (s) whenever s isübereven and s < s.
Remark D. 5. Let E denote the set of even clusters which do not have anübereven parent, excluding R unless R is itselfübereven. Then to give a collection of signs σ (s) as in Definition D.4 is equivalent to specifying σ (s) for s ∈ E, with no additional compatibility.
D.2. The BY tree associated to a cluster picture. Let Σ be a metric cluster picture. We associate to Σ a finite tree T Σ , equipped with a genus marking g : V (T Σ ) → Z ≥0 on vertices and a 2-colouring blue/yellow on vertices and edges as follows.
Definition D.6 (T Σ ). Let (X, Σ) be a metric cluster picture. We define T Σ , the BY tree associated to Σ, as follows. First take the graph with: • a vertex v s for every proper cluster s, excluding s = X when |X| = 2g + 2 and has a child of size 2g + 1, coloured yellow if s isübereven and blue otherwise, • an edge linking v s to v P (s) for every proper cluster s = X, yellow of length 2δ s if s is even, and blue of length δ s if s is odd. To obtain T Σ from this graph we remove, if |X| = 2g + 2 and X is a disjoint union of two proper children, the (degree 2) vertex v X from the vertex set 18 (keeping the underlying topological space the same). We define the genus of a vertex v s as g(v s ) = g(s).
Writing T = T Σ , as a topological space T = T b T y with T b the blue part, and T y the yellow part. Note that all leaves are blue and that T b ⊂ T is closed.
Remark D.7. T Σ is a (metric) BY tree in the sense of [16,Definition 3.18]; in the notation of op. cit. (see Construction 4.13, Proposition 5.7) it is precisely the graph T (Σ).
Example D.8. Consider the cluster picture associated to the polynomial of Example D.3. The associated metric BY tree is where the yellow edge is squiggly for the benefit of viewing in black and white, the number above an edge is its length, and the number on a vertex its genus. D.3. The hyperelliptic graph associated to a metric cluster picture. Let Σ = (X, Σ) be a cluster picture. We associate to Σ a metric graph G Σ , equipped with a genus marking g : V (G Σ ) → Z ≥0 and an involution 19 ι as follows. 18 we will freely still refer to vX in this case, understanding that it is simply a point on TΣ rather than a vertex. 19 graph isomorphism of order ≤ 2.
Definition D.9 (G Σ ). Let Σ be a metric cluster picture and T = T Σ the associated metric BY tree. Define G Σ , the hyperelliptic graph associated to Σ, to be the topological space (complete with metric) given by glueing two disjoint copies T + and T − of T along their common blue parts. Thus G = G Σ comes with a natural map π : G → T making it into a double cover of T ramified along T b , as well as an involution ι swapping T + and T − . We make G T into a (metric) graph by, for each v s ∈ V (T ) not a genus 0 leaf (equiv. s principal, see [16,Lemma 5.20]), declaring each element x of π −1 (v s ) to be a vertex of genus g(s). We denote this vertex of G by v s if x is the unique element of π −1 (v s ), and otherwise denote it v + s (resp. v − s ) if x ∈ T + (resp. x ∈ T − ). Finally, we adjust the metric by halving the lengths of all edges.
We write G b for those points in G fixed by ι and G y for G G b . Further, write G + y for the points in G y which come from T + and G − y for the points coming from T − . Remark D. 10. The graph G Σ is a hyperelliptic graph in the sense of [16,Definition 3.2], so that in particular all vertices of genus 0 necessarily have degree at least 3. Specifically it is the hyperelliptic graph G(T (Σ)) (see op. cit. Construction 4.8, Lemma 5.5).
Remark D.11. The graph G Σ may be described somewhat more concretely as follows.
For every non-übereven principal cluster there is a vertex v s , and for eachübereven principal cluster s the are two vertices v + s and v − s . These are linked by edges as follows (where we write v s = v + s = v − s whenever s is notübereven): Name From To Length Conditions where the number above an edge indicates its length, and the number on a vertex its genus. In particular, by Theorem 5.18, for p an odd prime this is the dual graph of the hyperelliptic curve C/Q p : y 2 = x(x − 1)(x − (1 + p 2 ))(x − (1 − p 2 ))(x − p 3 )(x + p 3 ). D.4. Automorphisms of T Σ and G Σ . Let Σ = (X, Σ) be a metric cluster picture. We now explain how to produce an automorphism of T Σ (resp. G Σ ) from an automorphism of Σ. D.4.1. Automorphisms of T Σ . By an automorphism of T = T Σ we mean a pair (σ 0 , σ ) where • σ 0 is a graph automorphism of T that preserves genera, colour and distances, • σ (Z) ∈ {±1} is a collection of signs for every connected component Z of the yellow part T y ⊂ T . As for cluster pictures we compose automorphisms by the cocycle rule (α, α ) • (β, β ) = α • β, • → β (•) α (β(•)) .
(This is precisely the notion of automorphism for BY trees used in [16,Definition 3.27].) Definition D.13 (T (σ)). Let σ = (σ 0 , σ ) be an automorphism of Σ. Define the automorphism T (σ) = (T (σ) 0 , T (σ) ) of T as follows. For a vertex v s of T , set T (σ) 0 (v s ) = v σ 0 (s) . To define T (σ) for a yellow component Z of T y , pick (as is always possible) an even cluster s such that the edge between v s and v P (s) (half-edge if P (s) = X and v X is removed from the vertex set in the construction of T ) lies in Z. Set T (σ) (Z) = σ (s). The compatibility of signs on even clusters ensures this is well defined.
Remark D.14. The automorphism T (σ) of T Σ is precisely the result of restricting the automorphism T (σ) of the open BY tree T (Σ), as defined in [16,Construction 4.13], to its core T (Σ). In particular (see [16,Proposition 4.14]), the association σ → T (σ) is a homomorphisms, and every automorphism of T Σ fixing v X (or v s is X has size 2g + 2 and a child s of size 2g + 1) arises this way. D.4.2. Automorphisms of G Σ . By an automorphism of G Σ we mean a graph automorphism preserving the genus marking.
Definition D.15 (G(σ)). Let σ = (σ 0 , σ ) be an automorphism of Σ, and T (σ) = (T (σ) 0 , T (σ) ) the associated automorphism of T = T Σ . Denote by π : G → T the quotient map and for a connected component Z of G y , denote byZ the component π(Z) of T y . We define G(σ) to be the unique automorphism of G such that: • G(σ) commutes with ι and induces the graph automorphism T (σ) 0 (temporarily denoted ρ) on the quotient T , • for a connected component Z of G + y , we have G(σ)(Z) = π −1 (ρ(Z)) ∩ G + y T (σ) (Z) = 1, π −1 (ρ(Z)) ∩ G − For the edges, for a proper cluster s of size < 2g + 1, write e s ∈ G b (resp. e + s ∈ G + y and e − s ∈ G − y ) for the edge(s) between π −1 (v s ) and π −1 (v P (s) ) (if s = t is a twin, then by e ± t we mean the two half-edges which get glued at π −1 (v t ) to form a loop). Then for s odd we have G(σ)(e s ) = e σs , whilst for s even we have Remark D.17. The automorphism G(σ) of G Σ is precisely the result of restricting the automorphism G(σ) of the hyperelliptic graph G(T (Σ)), as defined in [16,Construction 4.8], to its core G(T (Σ)). In particular (see [16,Proposition 4.11] and Remark D.14), the association σ → G(σ) is a homomorphism, and every automorphism of G Σ fixing π −1 (v X ) as a set (or π −1 (v s ) if X has size 2g + 2 and a child s of size 2g + 1) arises this way.
D.5. The homology of G Σ . In [16,Section 6] an explicit description of the first singular homology group H 1 (G Σ , Z), along with its length pairing ([16, Section 2.2.2]) and automorphism action is given. Here we recall the result.
Proof. This is [16, Theorem 6.1] (see op. cit. Definitions 3.16, 3.31 and 3.48 for the definitions of the lattices Λ • appearing in the statement). We remark that, writing T = T Σ , the proof passes through a canonical identification (op. cit. Proposition 6.6) of H 1 (G Σ , Z) with the relative homology group H 1 (T, T b , Z), equivariant for the natural actions of automorphisms and preserving the respective length pairings.
Remark D. 19. Unwinding the isomorphism in [16, Theorem 6.1] yields the following explict description of the basis elements s : for s = R an even non-übereven cluster s ∈ C 1 (G Σ , Z) is the shortest path going from v − s to v s through G − Σ before going on to v + s through G + Σ , where here we setŝ = P (s * ) if s * = R, andŝ = R otherwise. (In exceptional cases, for a cluster s appearing above, v s (resp. v + s , v − s ) may not be in the vertex set of G Σ , and we must interpret it as the obvious point on an edge instead.) Note that s is a loop in G Σ unless s * = R, in which case it is a "half loop" in the sense that if s , s are two such then s − s is a loop.