AR, h\otimes_AR)$. Here we consider $\mathrm{Aut}_{B\otimes_AR}(L\otimes_AR, h\otimes_AR)$ as a subgroup of $ \mathrm{Res}_{E/F}\mathrm{GL}_E(V)(F\otimes_AR)$. To ease the notation, we say $g\in \mathrm{Aut}_{B\otimes_AR}(L\otimes_AR, h\otimes_AR)$ stabilizes a lattice $M\subseteq V$ if $g(M\otimes_AR)=M\otimes_AR$.

Main construction {#mc}
-----------------

Let $R$ be an étale $A$-algebra. In this subsection, as mentioned above, we observe properties of elements of $\mathrm{Aut}_{B\otimes_AR}(L\otimes_AR, h\otimes_AR)$ and their matrix interpretations. We choose a Jordan splitting $L=\bigoplus_iL_i$ and a basis of $L$ as explained in Theorem 2.4 and Remark 2.5.(a). Let $n_i=\mathrm{rank}_{B}L_i$, and $n=\mathrm{rank}_{B}L=\sum n_i$. Assume that $n_i=0$ unless $0\leq i < N$. Let $g$ be an element of $\mathrm{Aut}_{B\otimes_AR}(L\otimes_AR, h\otimes_AR)$. We always divide a matrix $g$ of size $n \times n$ into $N^2$ blocks such that the block in position $(i, j)$ is of size $n_i\times n_j$. For simplicity, the row and column numbering starts at $0$ rather than $1$.

1.  First of all, $g$ stabilizes $A_i$ for every integer $i$. In terms of matrices, this fact means that the $(i,j)$-block has entries in $\pi^{max\{0,j-i\}}B\otimes_AR$. From now on, we write $$g= \begin{pmatrix} \pi^{max\{0,j-i\}}g_{i,j} \end{pmatrix}.$$

2.  Let $i$ be even. Then $g$ stabilizes $A_i, B_i, W_i, X_i$ and induces the identity on $A_i/B_i$ and $W_i/X_i$. We also interpret these facts in terms of matrices as described below:

    -   If $L_i$ is *of type II*, then $A_i=B_i$ and $W_i=X_i$ and so there is no contribution.

    -   If $L_i$ is *of type* $\textit{I}^o$, the diagonal $(i,i)$-block $g_{i,i}$ is of the form $$\begin{pmatrix} s_i&\pi y_i\\ \pi v_i&1+\pi z_i \end{pmatrix}\in \mathrm{GL}_{n_i}(B\otimes_AR),$$ where $s_i$ is an $(n_i-1) \times (n_i-1)-$matrix, etc.

    -   If $L_i$ is *of type* $\textit{I}^e$, the diagonal $(i,i)$-block $g_{i,i}$ is of the form $$\begin{pmatrix} s_i&r_i&\pi t_i\\ \pi y_i&1+\pi x_i&\pi z_i\\ v_i&