Lemma 107.23.1. Let $S$ be a scheme and $s \in S$ a point. Let $f : X \to S$ and $g : Y \to S$ be families of curves. Let $c : X \to Y$ be a morphism over $S$. If $c_{s, *}\mathcal{O}_{X_ s} = \mathcal{O}_{Y_ s}$ and $R^1c_{s, *}\mathcal{O}_{X_ s} = 0$, then after replacing $S$ by an open neighbourhood of $s$ we have $\mathcal{O}_ Y = c_*\mathcal{O}_ X$ and $R^1c_*\mathcal{O}_ X = 0$ and this remains true after base change by any morphism $S' \to S$.

Proof. Let $(U, u) \to (S, s)$ be an étale neighbourhood such that $\mathcal{O}_{Y_ U} = (X_ U \to Y_ U)_*\mathcal{O}_{X_ U}$ and $R^1(X_ U \to Y_ U)_*\mathcal{O}_{X_ U} = 0$ and the same is true after base change by $U' \to U$. Then we replace $S$ by the open image of $U \to S$. Given $S' \to S$ we set $U' = U \times _ S S'$ and we obtain étale coverings $\{ U' \to S'\}$ and $\{ Y_{U'} \to Y_{S'}\}$. Thus the truth of the statement for the base change of $c$ by $S' \to S$ follows from the truth of the statement for the base change of $X_ U \to Y_ U$ by $U' \to U$. In other words, the question is local in the étale topology on $S$. Thus by Lemma 107.4.3 we may assume $X$ and $Y$ are schemes. By More on Morphisms, Lemma 37.64.7 there exists an open subscheme $V \subset Y$ containing $Y_ s$ such that $c_*\mathcal{O}_ X|_ V = \mathcal{O}_ V$ and $R^1c_*\mathcal{O}_ X|_ V = 0$ and such that this remains true after any base change by $S' \to S$. Since $g : Y \to S$ is proper, we can find an open neighbourhood $U \subset S$ of $s$ such that $g^{-1}(U) \subset V$. Then $U$ works. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).