Let $k$ be a number field, $\mathbb A$ the ring of adeles of $k$, $\mathbb A_f$ the finite adeles, and $\mathbb A_{\infty}$ the infinite adeles.
Let $\phi: \mathbb A = \mathbb A_{\infty} \times \mathbb A_f \rightarrow \mathbb C$ be a continuous function which is smooth in the first variable and locally constant in the second variable. Some authors call such a function smooth.
Is it the case that for every $x \in \mathbb A$, there exists an open neighborhood $U$ of $x$, and an open compact subgroup $H$ of $\mathbb A_f$, such that
$$\phi(x'+h) = \phi(x')$$
for all $x' \in U, h \in H$?
This seems to be the claim in an answer to one of my questions on Mathoverflow, which I am trying to understand.
My attempt:
Lemma 1: For every $x \in \mathbb A$, there exists an open compact subgroup $H$ of $\mathbb A_f$ such that $\phi(x+h) = \phi(x)$ for all $h \in H$.
The problem becomes whether in the Lemma we can choose $H$ uniformly for $x'$ in a sufficiently small neighborhood of $x$.
Proof of Lemma 1: Let $x = (x_1,x_2) \in \mathbb A = \mathbb A_{\infty} \times \mathbb A_f$. There exists an open neighborhood $V \subset \mathbb A_f$ of $x_2$ such that $$\phi(x_1,y') = \phi(x_1,x_2)$$ for all $y' \in V$. Let $H$ be an open compact subgroup of $\mathbb A_f$ which is contained in the neighborhood $V - x_2$ of the identity. Then for all $h \in H$, we have $h + x_2 \in V$, and so
$$\phi(x + h) = \phi((x_1,x_2) + (0,h)) = \phi(x_1,x_2+h) = \phi(x_1,x_2) = \phi(x)$$ $\blacksquare$
To prove what I want, I will definitely need to make use of the fact that $\phi$ is continuous. So far I haven't been successful.