$v_{p}(n):=e$ if $p^{e}|n$ and $p^{e+1} \nmid n$. Show that $v_{p}(n*m)= v_{p}(n)+ v_{p}(m)$ and $v_{p}(n+m)=v_{p}(n)$ or $v_{p}(n+m)\geq v_{p}(n)$ Happy new year. This seems like an easy to solve task but I'm stuck right now, so any help is appreciated. 
Let $p\in \mathbb{Z}$ be a prime number. The function $v_{p}(n)\geq 0$ is defined as $v_{p}(n):=e$ if $p^{e}|n$ and $p^{e+1} \nmid n$. $v_{p}(0):=\infty$ and $\infty + e = e + \infty = \infty$ for all $e\in \mathbb{Z}$. 
Show that i) $v_{p}(n*m)= v_{p}(n)+ v_{p}(m)$ for all $n,m \in \mathbb{Z}$ and 
ii)$v_{p}(n+m)=v_{p}(n)$ if $v_{p}(n)<v_{p}(m)$ and $v_{p}(n+m)\geq v_{p}(n)$ if $v_{p}(n)=v_{p}(m)$.
I would also like to know if this function has a specific name so that I can find more about it and read it. Thanks in advance for any help.
 A: This is called the $p$-adic valuation. I will write $v(n) = v_p(n)$ for the remainder of the answer.
Let $n,m \in \Bbb{Z}$ and write $n = p^{v(n)}a$, $m = p^{v(m)}b$ with $a,b$ coprime to $p$. Then $$nm = p^{v(m)+v(n)}ab$$ and $ab$ is coprime to $p$ so $v(nm) = v(n) + v(m)$. This proves $(i)$. For $(ii)$, without loss of generality suppose that $v(n) \leq v(m)$. Then $$n + m = p^{v(n)}(a + p^{v(n)-v(m)}b)$$ If $v(n) > v(m)$ then $p \nmid a + p^{v(n)-v(m)}b$ and hence $v(n+m) = v(n)$. If $v(n) = v(m)$ then $v(n+m) = v(n) + v(a + b)$ - in particular, since $v(a + b) \geq 0$, $v(n+m) \geq v(n)$.
Note that your $(ii)$ is often more succinctly written as $v(n + m) \geq \min(v(n),v(m))$ with equality if $v(n) \neq v(m)$. Another thing to note is that $v_p$ can be uniquely extended to $\Bbb{Q}$ be $v_p(\frac{a}{b}) = v_p(a) - v_p(b)$.

As a final thing, the notion of a valuation on a field (or ring) generalises the notion of the $p$-adic valuation. If $K$ is a field, then a valuation $v$ on $K$ is a function $v : K \rightarrow \Bbb{R} \cup \infty$ satisfying:


*

*$v(x) = \infty$ if and only if $x = 0$

*$v(xy) = v(x) + v(y)$ for all $x,y \in K$

*$v(x + y) \geq \min(v(x),v(y))$ for all $x,y \in K$ with equality if and only if $v(x) \neq v(y)$
So in fact all we have done is defined a function using the two properties that you've been asked to prove for the $p$-adic valuation. These valuations are incredibly powerful tools which are studied and used extensively in modern number theory.
