Let $f: X \to Y$ be a finite morphism of nonsingular curves. Then $f^*: \operatorname{Div} Y \to \operatorname{Div} X$ preserves linear equivalence. This is included in Hartshorne's definition (II.6, pg 137) of the pullback morphism $f^*: \operatorname{Div} Y \to  \operatorname{Div} X$ induced by a finite morphism of nonsingular curves $f: X \to Y$. I do not understand why $f^*$ preserves prinicipal divisors and hence induces $f^*: \operatorname{Cl} Y \to \operatorname{Cl} X$.
My attempt:
I will assume $f$ is dominant so that $K(Y) \subset K(X)$. This isn't stated in the book but I'm not sure if this works otherwise.
Let $(g)_Y = \sum v_Q(g) Q \in \operatorname{Div} Y$ be principal. Then, if $t \in K(Y)$ is a local parameter of $Q$, $f^*(g)_Y$ is given by $$f^*(g)_Y = \sum_{Q \in Y} \left( v_Q(g) * \sum_{f(P) = Q} v_P(t) P \right).$$ Now I am very stuck showing this divisor is principal. I suspect that $f^*(g)_Y = (g)_X$ where the subscript denotes the scheme I'm taking the principal divisor in.
Here are some facts I was able to figure out about these valuations. If $P \mapsto Q$, there is an induced morphism $\mathcal{O}_{Q, Y} \to \mathcal{O}_{P, X}$ which is a local homomorphism of local rings. That is, $\mathfrak{m}_Q \to \mathfrak{m}_P$. Hence, if $v_Q(g) > 0$, then $v_P(g) > 0$. Similarly, since homomorphisms send units to units, we know that if $v_Q(g) = 0$, then $v_P(g) = 0$.
More than this I haven't been able to figure out. I suspect there is some nice way of simplifying the expression for $f^*(g)_Y$ but I'm not sure how.
Thanks!
 A: You're correct that a finite morphism of (irreducible) curves is dominant: the image is either the whole of the target or a single point (finiteness of the map + irreducibility of the source) and in the second case the map is clearly not finite: the preimage of the point in question is infinite.
For the meat of the problem, write $D=\sum_{Q_i} v_{Q_i}(g)Q_i$, and for each $Q_i\in Y$ let $g_i$ be a local equation for $Q_i$ in some affine open neighborhood. Then by definition of $f^*(g)_Y$, we have that $$f^*(g)_Y=\sum_{Q_i} v_{Q_i}(g)\left(\sum_{P_j\mapsto Q_i} v_{P_j}(f^*g_i)P_j\right).$$
On the other hand, for each $Q_i$ we can find an open set of $Y$ on which $g=u\cdot g_i^{v_{Q_i}(g)}$ for $g_i$ as before and $u$ a unit: this is true in the local ring $\mathcal{O}_{Y,Q_i}$, so it is true in some open neighborhood. Considering this equality in $K(X)$ by applying $f^*$, we get that $f^*g$ has valuation $v_{Q_i}(g)\cdot v_{P_j}(f^*g_i)$ along $Y_{ij}$. Therefore $f^*(g) =\sum_{P_j\in X} v_{Q_i}(g)\cdot v_{P_j}(f^*g_i) P_j$ and we're done.
