  Let $X$ be a smooth quasi-projective surface over a number field $K$, and let
$L$ be a foliation on $X$. We prove that if $L$ is closed under $p$-th powers
for almost all primes $p$, then any $L$-invariant smooth formal curve is
$A$-analytic. Building on prior work of Bost we obtain an algebraicity
criterion for those curves.
