Classical and adelic automorphic forms from SL(n) to GL(n) over number fields It's a long post but I felt like I needed to provide some context to my problem. The explicit questions start at the bold font questions below.
In the classical world, it seems that one is usually interested in automorphic forms for arithmetic subgroups of $\text{SL}_n(\mathbb{R})$ such as $\text{SL}_n(\mathbb{Z})$. Using strong approximation, one can move to the adelic world and all is fine because
$$
\text{SL}_n(\mathbb{Z}) \backslash \text{SL}_n(\mathbb{R}) \cong \text{SL}_n(\mathbb{Q}) \backslash \text{SL}_n(\mathbb{A}) / \text{SL}_n(\hat{\mathbb{Z}}).
$$
Nevertheless, for Hecke theory, the more natural group to work on is the general linear group. This is also not a problem, since one can prove that
$$
\text{SL}_n(\mathbb{Z}) \backslash \text{SL}_n(\mathbb{R}) \cong Z(\mathbb{A}) \text{GL}_n(\mathbb{Q}) \backslash \text{GL}_n(\mathbb{A}) / \text{GL}_n(\hat{\mathbb{Z}}). 
$$
See for instance Prop. 3.3.1 in Bump's book. There is a little trick involved in showing this. It seems to me that it is quite common to do this by passing to the group $\text{GL}^{+}_n(\mathbb{R})$ of matrices with positive determinant. Then we have
$$ 
\text{SL}_n(\mathbb{Z}) \backslash \text{SL}_n(\mathbb{R}) \cong Z(\mathbb{R})^+\text{SL}_n(\mathbb{Z}) \backslash \text{GL}^+_n(\mathbb{R}), \tag{1}\label{eq1}
$$
where $Z(\mathbb{R})^+$ are the multiples of the identity by positive scalars. Without going into details, the important step afterwards is to note that
$$
\text{GL}_n(\mathbb{Q}) \cap (\text{GL}_n^+(\mathbb{R}) \times \text{GL}_n(\hat{\mathbb{Z}})) = \text{SL}_n(\mathbb{Z}), \tag{2}\label{eq2}
$$
since the determinant of an element on the LHS is positive and a unit in $\mathbb{Z}$, so it must be $1$. Another place where you can see the usefulness of this last identity is in Miyake's book, where he proves the isomorphism between the classical and adelic Hecke algebras (Thm. 5.3.5; see equation (5.3.2) and the displays after that).
As in the theory of Hilbert modular forms and the classification of arithmetic subgroups of $\text{SL}_2(\mathbb{R})$, it is interesting to look at this process over number fields. For simplicity, let $F$ be a real quadratic number field with ring of integers $\mathcal{O}$. Then $\text{SL}_n(\mathcal{O})$ can be viewed as an arithmetic subgroup of $\text{SL}_n(\mathbb{R}) \times \text{SL}_n(\mathbb{R})$ or one could have the group of norm $1$ units of a suitable quaternion algebra over $F$ being an arithmetic subgroup of $\text{SL}_2(\mathbb{R})$. In any case, the main complication that arises in this situation seems to be that the (narrow) class group of $F$ might be non-trivial, but also that its group of units is larger.
Let us assume, as most books do, that $F$ has narrow class number $1$ and let $\sigma_1, \sigma_2$ be the two real embeddings. Then one can prove that $\mathcal{O}^\times_+ = \{ \xi \in \mathcal{O}^\times: \sigma_1(\xi), \sigma_2(\xi) > 0 \} = (\mathcal{O}^\times)^2 $. This implies that $\text{GL}^+_2(\mathcal{O}) = Z(\mathcal{O}^\times) \text{SL}_2(\mathcal{O})$, where $\text{GL}^+_2(\mathcal{O})$ are matrices with determinant in $\mathcal{O}^\times_+$ (see e.g. Dembélé-Voight, Explicit methods for Hilber modular forms, Sect. 2 just before Def. 2.1). One can now take the analogue of $\eqref{eq1}$ (nothing new here) and afterwards we also have the analogue of $\eqref{eq2}$
$$
\text{GL}_2(F) \cap (\text{GL}_2^+(\mathbb{R}) \times \text{GL}_2^+(\mathbb{R})  \times \text{GL}_n(\hat{\mathcal{O}})) = \text{GL}^+_2(\mathcal{O}) = Z(\mathcal{O}^\times) \text{SL}_2(\mathcal{O}),
$$
which also appears in Gelbart's book, Automorphic forms on adeles groups, (3.19), though intentionally ignoring the centre $Z(\mathcal{O}^\times)$ for some reason. In conclusion, I can see how one could go from $\text{SL}_2$ to $\text{GL}_2$.
There are two questions that I have. (I) First of all, what happens if $F$ has non-trivial narrow class group? Garrett's book on Hilbert modular forms contains the homeomorphism (Sect. 3.1, Prop. on page 92)
$$
Z(\mathbb{R})^2 \text{GL}_2(F) \backslash \text{GL}_2(\mathbb{A}_F) / \text{GL}_2(\hat{\mathbb{O}}) \cong \bigsqcup Z(\mathbb{R})^2 \Gamma_\xi \backslash \text{GL}_2^+(\mathbb{R})^2,
$$
where $\xi$ runs through elements of $\text{GL}_2(\mathbb{A}_F)$ such that the set of their determinants is a system of representatives for the narrow ideal class group, and
$$
\Gamma_\xi = \text{GL}_2(F) \cap \text{GL}_2^+(\mathbb{R})^2 \xi \text{GL}_2(\hat{\mathcal{O}}) \xi^{-1}.
$$
This is what follows from approximation theorems.
Of course, taking $\xi = 1$ (so corresponding to principal ideals) would give us $\Gamma_1 =  \text{GL}_2^+(\mathcal{O})$. Nevertheless, it is unclear to me how to view the "classical" quotient $ \text{SL}_2(\mathcal{O}) \backslash \text{SL}_2(\mathbb{R})^2$ inside this decomposition. There is a map
$$
\text{SL}_2(\mathcal{O}) \backslash \text{SL}_2(\mathbb{R})^2 \longrightarrow Z(\mathbb{R})^2 \text{GL}^+_2(\mathcal{O}) \backslash \text{GL}_2^+(\mathbb{R})^2,
$$
which is surjective, but not injective anymore. What exactly is happening here?
Another question I have is (II) what happens for $\text{SL}_n$ for $n > 2$? Here I am not even sure how to handle the class number one case, since it seems that we cannot use the trick
$$
\mathcal{O}^\times_+ \subset (\mathcal{O}^\times)^n
$$
for $n > 2$, if I am not mistaken (e.g. the square of a fundamental unit would be totally positive but not a cube in the case $n=3$).
I would be grateful for any references or help in general.
 A: There might be a hint towards an answer in Shimura's "The special values of the zeta functions associated with Hilbert modular forms" in Duke. In (1.13) he defines congruence subgroups $\Gamma( \mathfrak{b}, \mathfrak{c})$. If $\mathfrak{b} = \mathfrak{c} = \mathcal{O}$ (notation as in the question), then his definition yields $\Gamma = \text{GL}_2^+ (\mathcal{O})$. Nevertheless, a general congruence subgroup is defined in (1.4) as a subgroup of $\text{GL}^+_2(\mathbb{Q})$ that contains
$$
\Gamma(N) = \{ \gamma \in \text{SL}_2(\mathcal{O}) \mid \gamma - 1 \in N \cdot M_2(\mathcal{O}) \},
$$
for some $N$. Note that this includes $\text{SL}_2(\mathcal{O})$.
Immediately after (1.13), he lets $\chi_1$ be a character of the group of positive units $\mathcal{O}^\times_+$ and then defines the space of automorphic forms for $\Gamma(\mathfrak{b}, \mathfrak{c})$ with respect to this character. These seem to be the groups that we develops the theory for. Though not exactly the situation in the question, I think this points towards the idea that we might simply have to choose a character on the group of units to work with Hilbert modular forms in full generality. At least it would be necessary to be able to use adelic Hecke theory for $\text{GL}$, although I am not entirely sure how different Hecke theory for $\text{SL}$ would be (Gelbart warns us that they are different in Rem. 3.8 of Automorphic forms on adele group, but he does not expand).
Unfortunately, Shimura seems to drop the use of $\chi_1$ after this (he only works with another character $\chi_0$), but the paper is long and I have not read everything in detail. Maybe someone more familiar with this paper can add a comment or even an answer.
