If $f(X) = \sum_{k=0}^d a_kX^k\in \mathbb{Q}_p[X]$, does the condition that $$|f(x)|_p < 1\;\text{for all $x\in\mathbb{Z}_p$}$$ guarantee that $f(X)\in\mathbb{Z}_p[X]$?
The converse is obviously true by the strong triangle inequality, but I am not sure how to approach this direction since the triangle inequality gives no information about the coefficients of $f(X)$ afaik. I tried applying Hensel's lemma, but all I know is $|f'(x)|_p \leq \max_{1\leq k\leq d}\{|k|_p|a_k|_p|x|_p^{k-1}\}$ and if $|a_1|<1$, then this is $\leq 1/p$. Any thoughts?
Let $R$ be a DVR with maximal ideal $(\pi)$.
If $R/(\pi)$ is a finite field with $q$ elements then $f = \frac{X^q-X}{\pi}\in Frac(R)[X]$ is not in $R[X]$ but $f(R) \subset R$.
Otherwise $R/(\pi)$ is not a finite field. Let $f\in R[X]$ such that $f(R) \subset \pi R$. Its reduction $\overline{f} \in R/(\pi)[X]$ vanishes for all $a \in R/(\pi)$, it has infinitely many roots, thus $\overline{f} = 0 \bmod \pi$ and $f \in \pi R[X]$. Whence for $g \in Frac(R)[X]$ then $g(R) \subset R$ iff $g \in R[X]$.