Morphisms of Berkovich curves and the different function
Given a generically étale morphism $f\colon Y\to X$ of quasi-smooth Berkovich curves, we define a different function $δ_f\colon Y\to[0,1]$ that measures the wildness of the topological ramification locus of $f$. This provides a new invariant for studying $f$, which cannot be obtained by the usual reduction techniques. We prove that $δ_f$ is a piecewise monomial function satisfying a balancing condition at type 2 points analogous to the classical Riemann-Hurwitz formula, and show that $δ_f$ can be used to explicitly construct the simultaneous skeletons of $X$ and $Y$. As an application, we use our results to completely describe the topological ramification locus of $f$ when its degree equals to the residue characteristic $p$.