Compact open stabilizer of a completed lattice
Let $E/F$ be an extension of number fields, $\sigma:E\to E$ an $F$-algebra homomorphism, $M\ge0$, and $J\in M_M(E)$. Let $L\subset E^M$ be a finitely generated $\mathcal O_E$-submodule spanning $E^M$. Put $$H=\{g\in\operatorname{GL}_M(\mathbb A_{F,f}\otimes_FE):\sigma(g)^T Jg=J\},$$ where $\sigma$ acts on the second tensor factor, and let $\widehat L$ be the completed lattice defined in (Rational unitary approximation with an adelic lattice congruenceTheorem ANT.0500). There is a compact open subgroup $K\subseteq H$ satisfying $$g\in K\quad\Longleftrightarrow\quad (y\in\widehat L\ \Longleftrightarrow\ gy\in\widehat L\text{ for every }y).$$
Here $E/F$ need not be CM, $\sigma$ need not be involutive, and $J$ need not be Hermitian or nondegenerate.