I am asking a question which looks very elementary to experts.


Let $F$ be a number field and $\mathbb{A}\_F$ its adele ring. Let $\omega$ be a unitary central character of $GL\_2(\mathbb{A}\_F)$, 


$X\_{GL\_2}=GL\_2(F) \backslash GL\_2(\mathbb{A}\_F)$, and


$C^{\infty}\_{\omega}(X\_{GL\_2})=\{f:X\_{GL\_2} \to \mathbb{C} \ | \ f(zg)=\omega(z)f(g) \text{ for $z\in$ center of $GL\_2$ } \text{ and } \ g\mapsto f(xg) \text { is } C^{\infty}(F\_{\infty}) \text{ for each } x\in X\_{GL\_2}\}$.


Define a projection map $P:C^{\infty}\_{\omega}(X\_{GL\_2})\to C^{\infty}\_{\omega}(X\_{GL\_2})$ by 
$$Pf(x):=\int\_{h \in SL\_2(F)\backslash SL\_2(\mathbb{A}\_F)}f(hx)\,dh.$$
Then how can we prove 
$$Pf(x)=\sum\_{\chi^2=\omega} \chi(x) \cdot \left(\int\_{PGL\_2(F)\backslash PGL\_2(\mathbb{A}\_F)} f(y)\overline{\chi(y)}\,dy\right)?$$


Here, $\chi$ is a unitary character of $\mathbb{A}\_F^{\times}/F^{\times}$, and $\chi^2=\omega$ if we think of $\chi$ as a character of $X\_{GL\_2}$ via $\chi(g)=\chi(\det g)$ for $g\in GL\_2(\mathbb{A}\_F)$.


Any comments will be highly appreciated!



Projection onto locally constant function
It is clear from the definition and right-invariance of the measure $dh$ that $Pf$ is left-invariant under $SL\_2(\mathbb{A}\_F)$. As Paul Garrett kindly explained, $Pf$ is also left-invariant under $GL\_2(F)$, because $f$ is left-invariant under $GL\_2(F)$ and $GL\_2(F)$ normalizes the coset space $SL\_2(F)\backslash SL\_2(\mathbb{A}\_F)$. As a result, for any $g\in GL\_2(\mathbb{A}\_F)$, we have
$$ Pf(g)=Pf\left(g\begin{pmatrix}\det g^{-1}&\\&1\end{pmatrix}\begin{pmatrix}\det g&\\&1\end{pmatrix}\right)=Pf\left(\begin{pmatrix}\det g&\\&1\end{pmatrix}\right).$$
This motivates the definition
$$\widetilde{Pf}(a):=Pf\left(\begin{pmatrix}a&\\&1\end{pmatrix}\right),\qquad a\in\mathbb{A}\_F^\times.$$
The function $\widetilde{Pf}$ is clearly invariant under $F^\times$. Moreover, it satisfies the identity
$$\tag{$\ast$}\widetilde{Pf}(ab^2)=\omega(b)\widetilde{Pf}(a),\qquad a,b\in\mathbb{A}\_F^\times,$$
since
$$Pf\left(\begin{pmatrix}ab^2&\\&1\end{pmatrix}\right)=Pf\left(\begin{pmatrix}b&\\&b\end{pmatrix}\begin{pmatrix}a&\\&1\end{pmatrix}\right)=\omega(b)\,Pf\left(\begin{pmatrix}a&\\&1\end{pmatrix}\right).$$
Now let us fix a decomposition $\mathbb{A}\_F^\times=\mathbb{R}\_{>0}\times \mathbb{A}\_F^1$ and focus on the compact quotient $\mathbb{A}\_F^1/F^\times$. We have a spectral decomposition
$$ \widetilde{Pf}(a)=\sum\_\chi c\_\chi \chi(a),\qquad a\in\mathbb{A}\_F^1,$$
where $\chi$ runs through the (discrete set of) characters of $\mathbb{A}\_F^1/F^\times$. Then ($\ast$) yields, by the uniqueness of the spectral coefficients, that $c\_\chi\chi^2(b)=c\_\chi\omega(b)$ holds for any $b\in\mathbb{A}\_F^1$. That is, $c\_\chi=0$ unless $\chi^2=\omega$ on $\mathbb{A}\_F^1$. Any such $\chi$ extends uniquely to a character of $\mathbb{A}\_F^\times/F^\times$ maintaining the property $\chi^2=\omega$, and one can verify, using ($\ast$) and existence of square-roots in $\mathbb{R}\_{>0}$, that these extended idele class characters satisfy
$$ \widetilde{Pf}(a)=\sum\_{\chi^2=\omega} c\_\chi \chi(a),\qquad a\in\mathbb{A}\_F^\times.$$
The coefficients $c\_\chi$ can be evaluated by the orthogonality of characters,
\begin{align\*} c\_\chi&=\int\_{\mathbb{A}\_F^1/F^\times}\widetilde{Pf}(a)\,\overline{\chi(a)}\,da\\
&=\int\_{\mathbb{A}\_F^1/F^\times}\int\_{h \in SL\_2(F)\backslash SL\_2(\mathbb{A}\_F)}f\left(h\begin{pmatrix}a&\\&1\end{pmatrix}\right)\overline{\chi(a)}\,dh\,da\\
&=\int\_{GL\_2(F)\backslash GL\_2^{(1)}(\mathbb{A}\_F)}f(g)\,\overline{\chi(\det g)}\,dg,
\end{align\*}
where $GL\_2^{(1)}(\mathbb{A}\_F)$ denotes the subgroup of adelic matrices whose determinant lies in $\mathbb{A}\_F^1$. The result is immediate from here, since $f(g)\,\overline{\chi(\det g)}$ as a function on $GL\_2(\mathbb{A}\_F)$ is invariant under the center (recalling that $\chi^2=\omega$).


