  Let $K$ be an elementary extension of $\mathbb{Q}_p$, $V$ be the set of
finite $a \in K$, $\mathrm{st}$ be the standard part map $K^m \to
\mathbb{Q}^m_p$, and $X \subseteq K^m$ be $K$-definable. Delon has shown that
$\mathbb{Q}^m_p \cap X$ is $\mathbb{Q}_p$-definable. Yao has shown that $\dim
\mathbb{Q}^m_p \cap X \leq \dim X$ and $\dim \mathrm{st}(V^n \cap X) \leq \dim
X$. We give new $\mathrm{NIP}$-theoretic proofs of these results and show that
both inequalities hold in much more general settings. We also prove the
analogous results for the expansion $\mathbb{Q}^{\mathrm{an}}_p$ of
$\mathbb{Q}_p$ by all analytic functions $\mathbb{Z}^n_p \to \mathbb{Q}_p$. As
an application we show that if $(X_k)_{k \in \mathbb{N}}$ is a sequence of
elements of an $\mathbb{Q}^{\mathrm{an}}_p$-definable family of subsets of
$\mathbb{Q}^m_p$ which converges in the Hausdroff topology to $X \subseteq
\mathbb{Q}^m_p$ then $X$ is $\mathbb{Q}^{\mathrm{an}}_p$-definable and $\dim X
\leq \limsup_{k \to \infty} \dim X_k$.
