Let $G$ be a linear algebraic group over a number field $k$. Let $\mathbb A$ denote the adeles of $k$, $\mathbb A_f$ the finite adeles, and $k_{\infty} = \prod\limits_{v \mid \infty} k_v$. Here are two equivalent definitions for a function $\phi: G(\mathbb A) \rightarrow \mathbb C$ to be "smooth."

$\phi$ is smooth if, writing $G(\mathbb A) = G(k_{\infty}) \times G(\mathbb A_f)$, $\phi$ is smooth (infinitely differentiable) in the first variable and smooth (locally constant) in the second variable. I saw this definition here.

$\phi$ is smooth if for every $g \in G(\mathbb A)$, there exists an open neighborhood $V$ of $g$ and a smooth (infinitely differentiable) function $\phi_g: G(k_{\infty}) \rightarrow \mathbb C$ such that for all $h = (h_{\infty}, h_f) \in V \subset G(\mathbb A) = G(k_{\infty}) \times G(\mathbb A_f)$, we have $\phi(h) = \phi_g(h_{\infty})$. I saw this definition in Daniel Bump's book,

Automorphic Forms and Representations, page 299.

Choose an embedding $G \rightarrow \operatorname{GL}_n$, so we can talk about $G(\mathcal O_v) := G(k_v) \cap \operatorname{GL}_n(\mathcal O_v)$. Denote the space of smooth functions on $G(\mathbb A)$ by $C^{\infty}(G(\mathbb A))$. Let $C_c^{\infty}(G(\mathbb A))$ be the space of $\phi \in C^{\infty}(G(\mathbb A))$ which vanish outside of a compact set in $G(\mathbb A)$. There is another definition of $C_c^{\infty}(G(\mathbb A))$ which I have seen before (see my previous question here). Namely:

- $C_c^{\infty}(G(\mathbb A))$ is defined to be the space of finite linear combinations of "factorizable" functions $\prod_v f_v$ for $f_v: G(k_v) \rightarrow \mathbb C$ smooth (infinitely differentiable or locally constant, depending on whether $v$ is infinite or finite), where $f_v = \operatorname{Char} G(\mathcal O_v)$ for almost all places $v$.

My second question is: are these two definitions of $C_c^{\infty}(G(\mathbb A))$ the same? The first one defines it as a subspace of $C^{\infty}(G(\mathbb A))$, and the second defines it intrinsically as combinations of factorizable functions.