finite number of vertices of the polyhedron of variation of an invertible function on a Berkovich curve The paper of Ducros "Cohomologie non-ramifiée sur une courbe p-adique lisse" mentions a theorem (1.21) about the existence of a "polyhedron of variation" of an invertible function on a Berkovich curve. Here is the  statement: 
Let $Y$ be an analytic curve over a non-Archimedean non-trivially valued field $k$,
and let $f$ be an invertible analytic function on $Y$. Then there exists a
polyhedron $P$ in $Y^{an}$ such that $|f|$ is constant on each connected
component of the complement $Y \setminus P$.
(here, "polyhedron" is 1-dimensional and is understood as a realization of a graph as a topological space)
My question is: is it true that $P$ has finitely many vertices,
i.e. points that do not have a neighbourhood homeomorphic to an interval
$(a,b) \subset \mathbb{R}$? If this is not to be expected in general, is it true if one assumes $Y$ to be a subspace of a smooth projective curve $X$ over $k$ and $f$ to be the restriction of a rational function on $X$ to $Y$?
 A: It is not true in general that $P$ is finite. To see this, take an open disk $D$ and a non-zero function $f$ on it with infinitely many zeroes. In this case, your polyhedron of variation is infinite: it is a tree where all those zeroes are leaves. If you insist on having an invertible function, just remove the zero locus of $f$ from $D$.
With the additional assumptions you make, the result is true. Let us assume that $Y$ is the analytification of a smooth projective curve and $f$ is a non-constant rational function on it. Remark that we may extend the scalars so as to assume that $k$ is algebraically closed. (The image of a finite polyhedron will still be a finite polyhedron.) The function $f$ has only finitely many zeroes and poles.  Each such point $x$ has a neighborhood $D_x$ in $Y$ that is isomorphic to an open disk (because $Y$ is smooth and $k$ algebraically closed). Removing all the $D_x$'s from $Y$, you find a compact curve to which Ducros's result applies. It remains to show that the polyhedron of variation in each $D_x$ is finite. Since $D_x$ is a disk, this is quite clear. (In fact, if you assume that $D_x$ contains no zero or pole other than $x$ itself, then this polyhedron is just going to be a segment joining $x$ to the boundary of $D_x$.)
Alternatively, you could also prove the result directly using the semistable reduction theorem in the form of the existence of a skeleton of $Y$: there exists a finite polyhedron $P_Y$ in $Y$ whose complement is a disjoint union of open disks (if $k$ is algebraically closed). And then you are back to the case of an open disk again. Note also that $|f|$ is constant on a disk where $f$ has neither zeroes nor poles. 
