Let $X$ be an irreducible variety, $p \in X$. Define $\mathcal{O}_{X,p}$ and $\mathcal{m}_{X,p}$ as usual. We have the following theorem: $\mathcal{m}_{X,p} = (\pi)$ is a principal ideal and $\bigcap _{n \geq 0 } \mathcal{m}_{X,p}^n = \{ 0 \}$.
I'm trying to understand the proof of the following: Every $f \in k(X)^\times$ can be written uniquely $f = \pi^n u$, with $n \in \mathbb Z$, $u \in \mathcal{O}_{X,p}^\times$.
The proof I have proceeds as follows: As $\bigcap \mathcal{m}_{X,p}^n = 0$, given $f \in \mathcal{O}_{X,p}$ there exists a unique $n \geq 0 $ such that $f \in \mathcal{m}_{X,p}^n \backslash \mathcal{m}_{X,p}^{n+1}$. Why is this true? I feel like it's something obvious and that I'm just being slow.
Thanks!