# Why $\mathbb{Z}$ with $p$-adic topology is precompact?

Why $\mathbb{Z}$ (group of integer numbers) with $p$-adic topology is a countable precompact metric group with a linear topology?

Note : Call a topological group $G$ linear (and its topology a linear group topology) if $G$ has a base of $e$ formed by open subgroups of $G$.

-
Which of the 5 properties do you not believe? Only prcompact? –  Hagen von Eitzen Oct 5 '12 at 18:34
yes,just precompact. –  Wreza Shafaghi Oct 5 '12 at 20:18

Given $\varepsilon>0$ find $k$ with $\frac1{p^k}<\varepsilon$. Then The open $\varepsilon$-balls around $0, 1, \ldots, p^k-1$ cover $\mathbb Z$. Hence precompactness.
Let $U$ be an open neighbourhood of $0$. Then some $\varepsilon$-ball around $0$ is contained in $U$. As above, this ball contains $p^k\mathbb Z$ for $k$ big enough, which is a subgroup. Hence linearity.