Do $f(x)=3x+2^{\nu_2(x)}$ and $g(x)=3x+2^{\nu_2(x)}\cdot3^{\nu_3(x)}$ have compact support in $\Bbb Z_2$?
$f:\Bbb Z_2\to\Bbb Z_2$ and $g:\Bbb Z_2\to\Bbb Z_2$
$\Bbb Z_p$ is the p-adic integers and I understand the topology of any set $\Bbb Z_p$ is that of a Cantor set.
$q^{\nu_q(x)}$ is simply the largest power of some prime $q$ that divides $x$, e.g. $2^{\nu_2(24)}=8$
I understand compact support to mean the closure of the set of arguments for which the function is non-zero, is a compact set, so I'm assessing compact support in $\Bbb Z_2$ under the usual metric.
The values of $x$ for which $f(x)=0$ are $-\frac{2^m}{3}$
So my thinking is that none of these is in $\Bbb Z$ and therefore the closure of the set of arguments yielding nonzero $f$ still contains all of $\Bbb Z$, whose closure in $\lvert\cdot\rvert_2$ is still $\Bbb Z_2$ which is compact, so $f(x)$ has compact support.
As for $g(x)$, and I could possibly do with some help showing this for sure but I think this function is zero nowhere because:
Let $x=2^m3^ry$
Then $g(2^m3^ry)=2^m3^{r+1}y+2^m3^r=2^m3^r(3y+1)$
This can only be zero for $y=-\frac13$, which $y$ cannot be since we have factored its powers of $3$ into $3^r$ therefore $g$ is nonzero for all arguments in $\Bbb Z_2$ which is compact so $g$ has compact support too.
Is that correct?
On a related note there seems to be freedom to define $q^{\nu_q(x)}$ as I see fit for $x=0$, although I should probably make some explicit choice as without one, it doesn't seem well-defined. Implicit in the above, is that I have taken it to be $q^{\nu_q(0)}=1$. How should $q^{\nu_p(0)}$ be best chosen? Is there some common or more logical choice, e.g. that best-preserves continuity?
$\mathbb{Z}_2$ is compact, so every closed subset of it is compact. So every function on $\mathbb{Z}_2$ has compact support.
(I would remark, though, that your definition of $g$ is meaningless since $3$ is a unit in $\mathbb{Z}_2$ so $\nu_3(x)$ has no meaning for an element of $\mathbb{Z}_2$. The obvious definition of $2^{\nu_2(0)}$ would be $0$, since $2^{\nu_2(x)}$ approaches $0$ as $x$ approaches $0$.)