Adelic gluing of lattices while fixing prescribed vectors
Fix a CM extension $E/F$ with conjugation, a nondegenerate Hermitian matrix $J\in M_n(E)$, and a full finitely generated self-dual $\mathcal O_E$-lattice $L\subseteq E^n$. Fix the archimedean diagonalizations and finite-adelic topology specified in the conventions. Let $s_1,\ldots,s_r,z\in E^n$, and let $M\subseteq E^n$ be a full finitely generated $\mathcal O_E$-lattice. Assume $M_{\mathfrak p}=L_{\mathfrak p}$ for all but finitely many maximal ideals $\mathfrak p\subseteq\mathcal O_E$.
Suppose a family $\gamma_{\mathfrak p}\in U(J)(E)$ is specified for every ideal $\mathfrak p$ of $\mathcal O_E$, each fixing all the $s_a$ and $z$, and satisfying $$\gamma_{\mathfrak p}L_{\mathfrak p}=M_{\mathfrak p}\qquad(\mathfrak p\text{ maximal}).$$ There is $x\in U(J)(\mathbb A_{F,f})$ fixing the finite-adelic images of every $s_a$ and $z$ such that $$M=\{v\in E^n:x^{-1}v\in\widehat L\}.$$
The CM package requires $F$ to be the fixed field of conjugation, compatibility of conjugation with all complex embeddings, and the following unramified CM condition: for every maximal $P\subseteq\mathcal O_E$, some $\theta\in\mathcal O_E$ has $\theta-\overline\theta\notin P$. At each infinite place of $F$, an embedding $\phi:E\hookrightarrow\mathbb C$ extending that place and a change-of-basis matrix carrying $\phi(J)$ to a diagonal matrix of signs are fixed.
The topology on the finite-adelic unitary group is a group topology in which the subgroups stabilizing $\widehat L$ and acting as the identity modulo $g\widehat L$, for integers $g\ge1$, are open and form an identity-neighborhood basis. Here $\widehat L$ is the module generated by the diagonal image of $L$ over the subring of $E\otimes_F\mathbb A_{F,f}$ generated by $\mathcal O_E$ and the integral finite adeles of $F$. The localization $L_{\mathfrak p}$ inverts $\mathcal O_E\setminus\mathfrak p$; $M_{\mathfrak p}$ is defined likewise.