Let $R$ be a local and smooth $\mathbb{Z}\_p$-algebra and $B$ an $R$-algebra of finite type which is an integral domain with $\operatorname{dim}B\leq \operatorname{dim}R$ such that


* $B/(p)$ is non-zero and finitely generated as an $R/(p)$-module and
* $B[\frac{1}{p}]$ is non-zero and finitely generated as an $R[\frac{1}{p}]$-module


(where both module structures are induced by the structure morphism $R\to B$). 


Let $f\colon R[x]\to B$ be an $R$-algebra morphism such that $f/(p)\colon R/(p)[x]\to B/(p)$ is surjective, i.e. $\operatorname{Spec}f$ is a closed immersion on the special fibre.



> 
> Is $f[\frac{1}{p}]$ surjective? Is probably even $f$ surjective?
> 
> 
> 


If $B$ was finitely generated as an $R$-module, the surjectivity of $f$ would follow from Nakayama's lemma by considering the $R$-module cokernel of $f$. If $R$ was complete (e.g. in the special case $R=\mathbb{Z}\_p)$ a topological version of Nakayama's lemma (see e.g. Eisenbud's ''Commutative Algebra with a view...'' Exercise 7.2. or [MO](https://mathoverflow.net/questions/97495/a-categorical-nakayama-lemma)) would apply. Thank you for any help.



Does this $\mathbb{Z}_p$-algebra morphism induce a closed immersion on the generic fiber?
Still no. Consider the map $\mathbb Z\_p[s] \to \mathbb Z\_p[t]$, $s=t+pt^2$. This is a degree $1$ map on the special fiber but degree $2$ on the generic fiber. Let $R$ be the localization of $\mathbb Z\_p[s]$ at $s=1+p$ and let $B$ be the localization of $\mathbb Z\_p[t]$ at $t=1$. 


Then this satisfies all your conditions: $B$ is finitely generated, is integral, is $1$-dimensional, $B/p$ is generated by one element and $B[1/p]$ by two, and so on. But the map $R \to B$ is surjective mod $p$ but not upon inverting $p$. By sending $x$ to zero, we get a counterexample.


Geometrically we have a family of curves parameterized by $\mathbb Z\_p$ that is smooth on the generic fiber and degenerates to a reducible curve on the special fiber. By localizing, we have removed one of the components on the special fiber, so the special fiber no longer controls the general fiber. (The family of curves I am thinking of is $\mathbb Z\_p[s,t']/\left( t'^2 +t'-ps\right)$, which is a parabola when $p \neq 0$ and two lines when $p=0$. Adjoining $t=t'/p$ gives back the equation I wrote earlier.)


