% Section 6 (continued). Groups of self-isogenies of elliptic curves: Kottwitz compactness in the smallest case, and the Shimura % sets that it produces. \subsection{Groups of self-isogenies}\label{ss:comp-self-isogenies} \Cref{cor:kc} identifies the Hodge-type conjecture with the compactness at infinity of a group of correspondences, and recalls that for the points of Shimura varieties modulo $p$ the corresponding compactness is a theorem of Kottwitz. For elliptic curves the groups can be written down, and the compactness is visible. For an elliptic curve $E$ over $\Fpbar$ let $I_E$ be the algebraic group over $\Q$ with $I_E(R)=(\End(E)\otimes R)^{\times}$ for $\Q$-algebras $R$, the group of self-quasi-isogenies of $E$. \begin{proposition}\label{prop:self-isogenies}\leavevmode \begin{enumerate}[label=\textup{(\roman*)}] \item If $E$ is ordinary, then $\End^{0}(E)$ is an imaginary quadratic field $K$, the group $I_E$ is $\Res_{K/\Q}\mathbb G_m$, and $I_E(\R)/\R^{\times}\cong\C^{\times}/\R^{\times}$ is compact. \item If $E$ is supersingular, $\End^{0}(E)=B_{p,\infty}$ and $I_E=B_{p,\infty}^{\times}$; then $I_E(\R)/\R^{\times}\cong\mathbb H^{\times}/\R^{\times}\cong\mathrm{SO}(3)$ is compact. \item In both cases $I_E(\R)/\R^{\times}$ is the image of the unitary group $\{u:u\bar u=1\}$ of the Rosati involution on $\End^{0}(E)\otimes\R$, and its compactness is \cref{prop:rosati-positive} for $E$. \end{enumerate} \end{proposition} \begin{proof} (i), (ii): over $\Fpbar$ the endomorphism algebra is an imaginary quadratic field when $E$ is ordinary and the quaternion algebra $B_{p,\infty}$ when $E$ is supersingular \cite{Tate1966,Waterhouse1969}; $K\otimes\R\cong\C$ because $K$ is imaginary, and $B_{p,\infty}\otimes\R\cong\mathbb H$ because $B_{p,\infty}$ is ramified at $\infty$. The quotient $\C^{\times}/\R^{\times}$ is a circle, and $\mathbb H^{\times}/\R^{\times}$ is the group of unit quaternions modulo $\pm1$, which is $\mathrm{SO}(3)$. (iii) The Rosati involution is the canonical involution, $x\bar x$ is the reduced norm, and an element $u$ with $u\bar u=1$ is a unit quaternion or a complex number of absolute value one; every element of $I_E(\R)$ is a real multiple of such a $u$, since the reduced norm is positive on nonzero elements. \end{proof} In the supersingular case the compact group produces a finite Shimura set: $I_E(\Q)\backslash I_E(\Af)/\widehat{\End(E)}^{\times}$ is the set of classes of locally principal right ideals of $\End(E)$, which by Deuring's correspondence is the set of supersingular elliptic curves (\S\ref{ss:universe-supersingular}). Hence the Brandt module, the smallest second-order motive of the paper, is the space of functions on the Shimura set of the group of self-isogenies of a supersingular elliptic curve; the finiteness of the set and the positivity of its counting pairing come from the compactness of $I_E(\R)/\R^{\times}$, which is the positivity of the Rosati involution. In the ordinary case the Shimura set of $I_E$ is the class group of the order $\End(E)$, which acts simply transitively on the curves in the isogeny class of $E$ with the same endomorphism ring \cite{Waterhouse1969}, and its functions form a second-order motive in the same sense, on which the Hecke operators act through the ideal classes. The fourfold of \cref{def:fourfold} is the case of dimension four of the same pattern: its basic locus is uniformised by the group $B'^{\times}$, a definite quaternion algebra over $F=\Q(\zeta_{16})^{+}$, compact modulo center at all four real places, and its Shimura set is the five-point set $\Sh(B')$ (\S\ref{ss:fourfold-data}).