% Section 3. Theorem A, quaternionic family, part one: the Goren--Oort cycles and the reduction of their intersection % matrix to the periodic Temperley--Lieb Gram matrix. \section{Goren--Oort cycles and their intersection matrix}\label{sec:goren-oort} This section proves parts (i) and (ii) of \cref{thm:AQ}: the Goren--Oort cycles span the Tate classes of a generic $\pi$-part, and their intersection matrix is congruent to a positive multiple of $G(T_\pi)\otimes\Pet$. The geometry is that of Tian and Xiao \cite{TianXiao2016,TianXiao2019}; what we add is the observation that their computation, made to prove nondegeneracy, determines the intersection form up to a congruence, together with the gauge argument that makes this precise. \subsection{Quaternionic Shimura varieties in characteristic $p$}\label{ss:go-shimura} We keep the notation of \cref{ss:conventions}: $F$ totally real of degree $g$, $p>2$ inert, $S$ a set of places of even cardinality not containing $\pp$, containing at least one finite place, $d=\#(\Sigma_\infty\smallsetminus S_\infty)$ even, and $K=K^pK_p$ with $K_p=\GL_2(\OO_{F_\pp})$ and $K^p$ sufficiently small. The complex points of $\Sh_K(G_S)$ form the finite union of quotients $\Gamma_i\backslash\mathfrak H^{d}$ of a product of $d$ upper half-planes by arithmetic subgroups of $B_S^\times$; since $S$ contains a finite place the quotients are compact. The quaternionic Shimura variety is not of PEL type, and Tian and Xiao construct its integral model through an auxiliary unitary Shimura variety $\Sh(\widetilde G_{\widetilde S})$, attached to $B_S\otimes_FE$ for a CM extension $E/F$ chosen so that $p$ behaves suitably, which carries a versal family of abelian varieties of dimension $4g$ with an action of $M_2(\OO_E)$; the two Shimura varieties have isomorphic geometric connected components, and the integral model of the quaternionic one is obtained by descent \cite[\S2--3]{TianXiao2016}, \cite[\S2.4--2.10]{TianXiao2019}. For our purposes three features of this construction matter. \begin{enumerate}[label=(\alph*)] \item The special fibre $X=\Sh_K(G_S)_{\Fpbar}$ is smooth and projective of dimension $d$. \item Its geometric points correspond to abelian varieties with additional structure, through the auxiliary unitary Shimura variety; the Frobenius $\sigma$ of $\Fpbar$ permutes the $p$-adic embeddings of $F$ cyclically, and the partial Hasse invariants indexed by the places $\tau\in\Sigma_\infty\smallsetminus S_\infty$ define the \emph{Goren--Oort stratification}. \item Each Goren--Oort stratum is an iterated $\PP^1$-bundle over the special fibre of another quaternionic Shimura variety, for a quaternion algebra ramified at more real places \cite[Thm.~1.1]{TianXiao2016}. \end{enumerate} \subsection{Periodic semi-meanders and Goren--Oort cycles}\label{ss:go-cycles} Arrange the $d$ places of $\Sigma_\infty\smallsetminus S_\infty$ in the cyclic order in which Frobenius permutes them, as $d$ nodes on a circle drawn on a cylinder. A \emph{periodic semi-meander} with $r$ arcs is a collection of $r$ non-crossing arcs above the circle, each joining two nodes, the remaining $d-2r$ nodes being joined to the top of the cylinder by vertical half-lines \cite[\S3.1]{TianXiao2019}. We need only the case $r=d/2$, in which there are no half-lines; then every node lies on exactly one arc and there are $\binom{d}{d/2}$ semi-meanders. Write $\mathcal B_d$ for their set. \begin{example}\label{ex:meanders4} For $d=4$, with nodes $1,2,3,4$ in cyclic order, the six semi-meanders are the two configurations of two short arcs, $\{12,34\}$ and $\{23,41\}$ (the arc $41$ crossing the seam of the cylinder), and the four configurations of a short arc nested under a long one, $\{14\supset23\}$, $\{21\supset34\}$, $\{32\supset41\}$, $\{43\supset12\}$, in which the long arc passes around the back of the cylinder in three of the four cases. In the coordinates used by the companion (\cref{app:formal}), a semi-meander is the list $(a_1,\dots,a_d)$ in which $a_i=+s$ if an arc leaves node $i$ to the right and ends $s$ nodes further (modulo $d$), and $a_j=-s$ at its other end; the six are $(-3,3,1,-1)$, $(-1,-3,3,1)$, $(-1,1,-1,1)$, $(1,-1,-3,3)$, $(1,-1,1,-1)$ and $(3,1,-1,-3)$. \end{example} For each $a\in\mathcal B_d$, Tian and Xiao construct a closed subvariety $X_a\subset X$ of codimension $d/2$, the \emph{Goren--Oort cycle} of $a$, by induction on the arcs: an arc whose two end-nodes are adjacent defines, inside the divisor of the corresponding partial Hasse invariant, a $\PP^1$-bundle over the special fibre of the quaternionic Shimura variety for $B_{S\cup\{\tau,\tau'\}}$, and the remaining arcs are treated on that smaller variety \cite[\S3.7]{TianXiao2019}. When $r=d/2$ the base of the last step is the zero-dimensional Shimura variety \begin{equation}\label{eq:shimura-set} \Sh_a=\Sh_{K}(G_{S\cup\Sigma_\infty})=B'^{\times}\backslash(B'\otimes_F\mathbb A_{F,f})^\times/K',\qquad B'=B_{S\cup\Sigma_\infty}, \end{equation} the same finite set for every $a$, and $X_a$ is an iterated $\PP^1$-bundle $\pi_a\colon X_a\to\Sh_a$, smooth and proper over it \cite[Thm.~4.4(1)]{TianXiao2019}. The construction is compatible with the prime-to-$p$ Hecke correspondences. \begin{lemma}\label{lem:go-algebraic} For $a\in\mathcal B_d$ and $f\in H^0(\Sh_a,\Q)$, the class $\Gys_a(f)$ of \eqref{eq:gys} is the cycle class of the algebraic cycle $\sum_{z\in\Sh_a}f(z)\,[X_{a,z}]$ of codimension $d/2$, where $X_{a,z}=\pi_a^{-1}(z)$. \end{lemma} \begin{proof} The pull-back $\pi_a^*f$ is the locally constant function on $X_a$ equal to $f(z)$ on the component $X_{a,z}$, whose class is $\sum_zf(z)[X_{a,z}]$ in $H^0(X_a)$; the Gysin map $i_{a*}$ sends the fundamental class of a closed subvariety of codimension $c$ to its cycle class in $H^{2c}(X)(c)$. \end{proof} \subsection{The $\pi$-part and its Tate classes}\label{ss:go-tate} Let $\pi$ be as in \cref{ss:conventions}. The $\pi$-isotypic part $H^\bullet(X,\Ql)[\pi]$ is concentrated in degree $d$ and has dimension $2^d\dim W_\pi$, where $W_\pi$ is the space of $K$-fixed vectors in the finite part of the Jacquet--Langlands transfer of $\pi$ to $B_S^\times$; by the theorem of Brylinski and Labesse, as a representation of the Galois group it is, up to semi-simplification, the tensor induction $\As(\rho_\pi)=\bigotimes_{\tau}\rho_\pi^\tau$ over the $d$ split places, with multiplicity $\dim W_\pi$ \cite{BrylinskiLabesse1984}, \cite[\S1.5]{TianXiao2019}. The eigenvalues of $\Frob_{p^{2g}}$ on $H^d(X)[\pi]$ are $\alpha_\pi^{2i}\beta_\pi^{2(d-i)}$, each with multiplicity $\binom di\dim W_\pi$, for $0\le i\le d$ \cite[Prop.~2.25]{TianXiao2019}. \begin{lemma}\label{lem:go-tate} Assume \Gen. The Tate classes of $H^d(X,\Ql)(d/2)[\pi]$ form the eigenspace of $\Frob_{p^{2g}}$ for the eigenvalue $(\alpha_\pi\beta_\pi)^d/p^{gd}=1$, of dimension $\binom d{d/2}\dim W_\pi$, and $\Frob_{p^{2g}}$ acts semisimply on it. \end{lemma} \begin{proof} Since $\alpha_\pi\beta_\pi=p^g$, the eigenvalues after the twist by $(d/2)$ are \[ \alpha_\pi^{2i}\beta_\pi^{2(d-i)}p^{-gd}=(\alpha_\pi/\beta_\pi)^{2i-d},\qquad0\le i\le d. \] Such an eigenvalue is a root of unity if and only if $(\alpha_\pi/\beta_\pi)^{2i-d}$ is, and under \Gen{} this happens only for $i=d/2$. A class fixed by a power of a Frobenius lies in the generalised eigenspace of a root of unity, hence in the generalised eigenspace for $i=d/2$, and the semisimplicity of $\Frob_{p^{2g}}$ on this generalised eigenspace is part of \cite[Thm.~4.4(2)]{TianXiao2019}. Conversely every vector of this eigenspace is fixed by $\Frob_{p^{2g}}$. \end{proof} \begin{theorem}[Tian--Xiao \cite{TianXiao2019}, Theorem~4.4]\label{thm:tx-span} Assume \Gen. Then the map \[ \textstyle\bigoplus_{a\in\mathcal B_d}\Gys_a\colon\bigoplus_aW_\pi\to H^d(X,\Ql)(d/2)[\pi] \] is injective, and its image is the space of Tate classes of \cref{lem:go-tate}. In particular every Tate class in $H^d(X)(d/2)[\pi]$ is the class of an algebraic cycle. \end{theorem} This is \cite[Thm.~4.4(2$'$)]{TianXiao2019}, stated there under the weaker hypothesis that $\alpha_\pi/\beta_\pi$ is not a $2n$-th root of unity for $n\le d/2$; the last sentence follows from \cref{lem:go-algebraic}. It is part~(i) of \cref{thm:AQ}. \subsection{Gysin, restriction, and the counting pairing}\label{ss:go-adjoint} Following \cite[\S1.7]{TianXiao2019}, let $\Res_a$ be the composite \[ H^d(X)(d/2)\xrightarrow{\ i_a^*\ }H^d(X_a)(d/2)\xrightarrow{\ \pi_{a*}\ }H^0(\Sh_a) \] of the restriction to $X_a$ and of the trace along the fibres of the iterated $\PP^1$-bundle, which has relative dimension $d/2$. \begin{definition}\label{def:pet} For a finite set $\Sh$ of points $z$ with finite stabilisers $\Gamma_z$ in the relevant arithmetic group, the \emph{counting pairing} on $H^0(\Sh,\Ql)$ is $\Pet(f,h)=\sum_{z}f(z)h(z)\,\abs{\Gamma_z}^{-1}$. When the level is sufficiently small all stabilisers are trivial and $\Pet(f,h)=\sum_zf(z)h(z)$. \end{definition} The counting pairing is positive definite on real-valued functions, and the Hecke operators of $B'^\times$ are self-adjoint for it when the central character is trivial; the restriction of $\Pet$ to $W_\pi$ is therefore positive definite on a real form. \begin{lemma}\label{lem:adjoint} For $f\in H^0(\Sh_a)$ and $y\in H^d(X)(d/2)$ one has $\langle\Gys_a f,y\rangle_X=\Pet(f,\Res_ay)$, where $\langle\,,\rangle_X$ is the intersection pairing $H^d(X)(d/2)\times H^d(X)(d/2)\to H^{2d}(X)(d)=\Ql$. Consequently \[ \langle\Gys_af,\Gys_bh\rangle_X=\Pet\bigl(f,\Res_a\Gys_b h\bigr)\qquad(a,b\in\mathcal B_d), \] and the intersection matrix of the cycles of \cref{thm:tx-span} is the matrix of the operators $\Res_a\circ\Gys_b$ composed with $\Pet$. \end{lemma} \begin{proof} By the projection formula for the closed immersion $i_a$ and the proper smooth map $\pi_a$, \[ \int_X i_{a*}\pi_a^*f\cup y=\int_{X_a}\pi_a^*f\cup i_a^*y=\int_{\Sh_a}f\cup\pi_{a*}i_a^*y, \] and the last integral over the zero-dimensional $\Sh_a$ is the counting pairing (with the trivial weights of a sufficiently small level). \end{proof} \subsection{Link morphisms}\label{ss:go-links} The operators $\Res_a\circ\Gys_b$ were computed by Tian and Xiao. Their answer involves the \emph{link morphisms} between Shimura varieties for different quaternion algebras, which we recall in the form needed \cite[\S2.15--2.28]{TianXiao2019}. For sets $S,S'$ with the same finite places and the same number of real places, a \emph{link} $\eta\colon S\to S'$ is a diagram of non-crossing curves on the cylinder joining the nodes of $S^c$ to those of $S'^c$; to a link, an \emph{indentation degree} $n$ and a \emph{shift} $t$, Tian and Xiao attach at most one \emph{link morphism} $(\eta_\sharp^{(n)},\eta^{\sharp,(n)})$ between the Shimura varieties, a morphism of special fibres together with a $p$-quasi-isogeny of the versal abelian schemes \cite[Lemma~2.19]{TianXiao2019}, and, after a normalisation by a power of $p$, a \emph{normalised link morphism} $\eta^\star_{(n)}$ on cohomology \cite[(2.22.1), \S2.27]{TianXiao2019}. We use four of their properties. \begin{enumerate}[label=(L\arabic*)] \item\label{L:unique} \emph{Uniqueness}: for a given link, indentation degree and shift there is at most one link morphism \cite[Lemma~2.19]{TianXiao2019}. \item\label{L:hecke} \emph{Equivariance}: $\eta^\star_{(n)}$ commutes with the prime-to-$p$ Hecke algebra \cite[\S2.22]{TianXiao2019}. \item\label{L:compose} \emph{Composition}: normalised link morphisms compose according to the composition of links, with additive indentation degrees and multiplicative shifts \cite[\S2.27]{TianXiao2019}. \item\label{L:invertible} \emph{Invertibility}: normalised link morphisms are invertible; the trivial link with trivial shift and indentation degree $0$ gives the identity \cite[Prop.~2.26, Lemma~2.28(3)]{TianXiao2019}. \end{enumerate} When $r=d/2$ the bases $\Sh_a$ are all equal to the finite set \eqref{eq:shimura-set}, and a normalised link morphism is an endomorphism of $H^0(\Sh_a)$; by \ref{L:hecke} it preserves $W_\pi$. \begin{lemma}\label{lem:link-scalar} Suppose $\dim W_\pi=1$. Every normalised link morphism between the bases $\Sh_a$ acts on $W_\pi$ by a nonzero scalar. \end{lemma} \begin{proof} It preserves the line $W_\pi$ by \ref{L:hecke} and is invertible by \ref{L:invertible}. \end{proof} In general $W_\pi$ is an irreducible module for the prime-to-$p$ Hecke algebra, and the same argument with Schur's lemma gives a scalar; in all applications of this paper $\dim W_\pi=1$ (\cref{lem:multiplicity-one}). \subsection{The formula of Tian and Xiao}\label{ss:go-formula} \begin{theorem}[Tian--Xiao \cite{TianXiao2019}, Theorem~4.3(3)]\label{thm:tx-formula} Let $r=d/2$ and $a,b\in\mathcal B_d$. Then \[ \Res_a\circ\Gys_b=(-2)^{m_0(a,b)}\cdot p^{(\ell(a)+\ell(b))/2}\cdot\Bigl(\frac{T_\pp}{p^{g/2}}\Bigr)^{m_T(a,b)}\cdot \eta_{a,b}^\star, \] where $\ell(a)$ is the total span of the arcs of $a$, $T_\pp$ is the Hecke operator at $\pp$, and $\eta^\star_{a,b}$ is a normalised link morphism associated with the trivial link from $S_a$ to $S_b$, with indentation degree $\ell(a)-\ell(b)-m_T(a,b)g$ and shift $t_at_b^{-1}\varpi_\pp^{-m_T(a,b)}$. \end{theorem} We also need what Tian and Xiao prove about the composites of these operators along cycles of semi-meanders, in the course of the proof of their Theorem~4.4 \cite[(4.4.6)--(4.4.8) and the paragraph on $r=d/2$]{TianXiao2019}. \begin{proposition}[Tian--Xiao]\label{prop:tx-cycle} Let $(a_1,\dots,a_t)$ be a cyclic sequence of semi-meanders with $r=d/2$, and let $m_0$ and $m_T$ be the total numbers of contractible and non-contractible loops in $D(a_1,a_2),\dots,D(a_t,a_1)$. On $W_\pi$, \[ p^{-(\ell(a_1)+\dots+\ell(a_t))}\,(\Res_{a_1}\Gys_{a_t})\circ\dots\circ(\Res_{a_2}\Gys_{a_1}) =(-2)^{m_0}\Bigl(\frac{(\alpha_\pi+\beta_\pi)^2}{\alpha_\pi\beta_\pi}\Bigr)^{m_T/2}, \] and $m_T$ is even. \end{proposition} The proof in \cite{TianXiao2019} composes the link morphisms of \cref{thm:tx-formula} by \ref{L:compose}, identifies the composite with a power of the link morphism of the fundamental link with trivial shift, and evaluates it on $W_\pi$ by the Eichler--Shimura relation \cite[Prop.~2.26]{TianXiao2019}, using that the central character is trivial. In terms of \eqref{eq:gram}, the right-hand side is the product of the entries $G(T_\pi)_{a_ia_{i+1}}$ around the cycle; this is how Tian and Xiao obtain $\det B=\det G(T)|_{T^2=T_\pi^2}$. \subsection{The gauge}\label{ss:go-gauge} We now determine the intersection matrix up to congruence. Assume \Gen{} and $\dim W_\pi=1$, and let $f\in W_\pi$ be a real-valued eigenfunction (the Hecke eigenvalues of $\pi$ are totally real). Put \[ H_{ab}=\langle\Gys_af,\Gys_bf\rangle_X,\qquad a,b\in\mathcal B_d. \] By \cref{lem:go-algebraic} the classes $\Gys_af$ are classes of algebraic cycles with coefficients in the Hecke field of $\pi$, a totally real field, and $H$ is a real symmetric matrix after any real embedding. \begin{proposition}\label{prop:gauge} There are nonzero real numbers $d'_a$ $(a\in\mathcal B_d)$ such that \[ H_{ab}=\Pet(f,f)\cdot p^{\ell(a)}\cdot d'_a\,G(T_\pi)_{ab}\,d_b'^{-1}\qquad\text{for all }a,b\in\mathcal B_d . \] Consequently $H$ is congruent to a positive multiple of $G(T_\pi)$: there are a constant $\kappa>0$ and an invertible diagonal matrix $D$ with $H=\kappa\,D\,G(T_\pi)\,D$. In particular $H\succ0$ if and only if $G(T_\pi)\succ0$. \end{proposition} \lean{RamanujanHodge.gauge_congr,RamanujanHodge.posDef_of_gauge} \begin{proof} By \cref{lem:adjoint,thm:tx-formula,lem:link-scalar}, \[ H_{ab}=\Pet\bigl(f,\Res_a\Gys_bf\bigr)=\Pet(f,f)\,p^{(\ell(a)+\ell(b))/2}\,G(T_\pi)_{ab}\,c_{ab}, \] where $c_{ab}$ is the scalar by which $\eta^\star_{a,b}$ acts on $W_\pi$, and where we have used that $T_\pp$ acts on $W_\pi$ by $a_\pp(\pi)=T_\pi p^{g/2}$. Under \Gen{} we have $T_\pi\neq0$ (\cref{rem:generic-ramanujan}), so every entry of $G(T_\pi)$ is nonzero, and $c_{ab}=H_{ab}/(\Pet(f,f)p^{(\ell(a)+\ell(b))/2}G(T_\pi)_{ab})$ is real. Applying \cref{prop:tx-cycle} to a cyclic sequence and comparing with the product of the corresponding entries of $H$ (computed by the displayed formula), we find that $c$ has trivial products around every cycle: \[ c_{a_1a_2}c_{a_2a_3}\cdots c_{a_ta_1}=1 . \] For $t=1$ this says $c_{aa}=1$, in agreement with \ref{L:invertible}, since $\eta^\star_{a,a}$ is attached to the trivial link with indentation degree $0$ and trivial shift; for $t=2$ it says $c_{ab}c_{ba}=1$. Fix $a_0\in\mathcal B_d$ and put $d_a=c_{aa_0}$. The cycle $(a,a_0,b)$ gives $c_{aa_0}c_{a_0b}c_{ba}=1$, hence $c_{ab}=c_{ba}^{-1}=c_{aa_0}c_{a_0b}=d_a/d_b$, using $c_{a_0b}c_{ba_0}=1$. Therefore \begin{align*} H_{ab}&=\Pet(f,f)\,p^{(\ell(a)+\ell(b))/2}\,\frac{d_a}{d_b}\,G(T_\pi)_{ab}\\ &=\Pet(f,f)\,p^{\ell(a)}\,d'_a\,G(T_\pi)_{ab}\,d_b'^{-1},\qquad d'_a=d_a\,p^{-\ell(a)/2}. \end{align*} With $p_a=\Pet(f,f)p^{\ell(a)}$, which is positive, this is the hypothesis of the gauge lemma (\cref{lem:gauge}), and its conclusion is the second assertion. \end{proof} \begin{lemma}[Gauge lemma]\label{lem:gauge} Let $G$ and $H$ be real symmetric $n\times n$ matrices, with $G_{ab}\neq0$ for $a\neq b$, and suppose that $H_{ab}=p_a\,d_a\,G_{ab}\,d_b^{-1}$ for real numbers $p_a>0$ and $d_a\neq0$. Then $p_ad_a^2$ is independent of $a$, and for any $a_0$, \[ H=p_{a_0}d_{a_0}^2\cdot D^{-1}GD^{-1},\qquad D=\diag(d_1,\dots,d_n). \] In particular, if $G$ is positive definite then so is $H$. \end{lemma} \lean{RamanujanHodge.gauge_congr,RamanujanHodge.posDef_of_gauge} \begin{proof} For $a\neq b$ the symmetry of $H$ and of $G$ and $G_{ab}\neq0$ give $p_ad_a/d_b=p_bd_b/d_a$, that is $p_ad_a^2=p_bd_b^2$; call this common value $\kappa>0$. Then $H_{ab}=\kappa\,d_a^{-1}G_{ab}d_b^{-1}$, for $a=b$ as well. Conjugation by the invertible symmetric matrix $D^{-1}$ preserves positive definiteness. \end{proof} \begin{remark}\label{rem:gauge-necessity} The hypothesis $G_{ab}\neq0$ is used only to compare $p_ad_a^2$ with $p_bd_b^2$; since the graph on $\mathcal B_d$ with an edge whenever $G_{ab}\neq0$ is connected as soon as one row of $G$ is free of zeros, a weaker hypothesis would suffice. Under \Gen{} all entries are nonzero, and we do not need the refinement. The case $T_\pi=0$, excluded by \Gen, is the case $\alpha_\pi=-\beta_\pi$, in which the Goren--Oort cycles no longer span the Tate classes \cite[\S4.5]{TianXiao2019}. \end{remark} \subsection{From the matrix to the Hodge-type conjecture}\label{ss:go-hsc} We now deduce the last assertion of \cref{thm:AQ} from parts (i)--(iv). Parts (iii) and (iv) are proved in \cref{sec:spin}. \begin{proposition}\label{prop:go-hsc} Assume \Gen{} and parts (i)--(iv) of \cref{thm:AQ}. Let $L$ be any ample class on $X$. Then every class in the Tate part of $H^d(X)(d/2)[\pi]$ is primitive for $L$, and the form $(-1)^{d/2}x\cdot y$ is positive definite on it. The Tate part of $H^d(X)(d/2)[\pi]$ is orthogonal to the Tate part of $H^d(X)(d/2)[\pi']$ for $\pi'\neq\pi$ and to the classes of the trivial representation. \end{proposition} \begin{proof} The class $L$ lies in $H^2(X)$, on which only one-dimensional representations of $B_S^\times$ contribute; multiplication by $L$ is equivariant for the prime-to-$p$ Hecke algebra and maps $H^d(X)[\pi]$ to $H^{d+2}(X)[\pi]=0$, since the $\pi$-part is concentrated in degree $d$. Hence every class of the $\pi$-part is primitive, and $q_{d/2}(x,y)=(-1)^{d/2}x\cdot y$ for these classes. By \cref{prop:gauge} and parts (ii)--(iv), the restriction of this form to the span of the $\Gys_af$ is congruent to a positive multiple of $(-1)^{d/2}G(T_\pi)\otimes\Pet$, a Kronecker product of positive definite matrices, which is positive definite (\cref{prop:kronecker}). The orthogonality follows from the self-adjointness of the prime-to-$p$ Hecke operators for the intersection pairing when the central characters are trivial: two classes in different Hecke eigenspaces are orthogonal. \end{proof} \begin{proposition}\label{prop:kronecker} The Kronecker product of two positive definite hermitian matrices is positive definite. \end{proposition} \lean{Universe.U1_block} \begin{proof} The eigenvalues of $A\otimes B$ are the products of those of $A$ and $B$, and $A\otimes B$ is hermitian. \end{proof} \subsection{Examples}\label{ss:go-examples} \begin{example}[$d=2$: the Hodge index theorem]\label{ex:d2} For $d=2$ there are two semi-meanders, the arcs $1\to2$ and $2\to1$, and $D(a,a)$ has one contractible loop while $D(a,b)$ for $a\neq b$ has one loop winding around the cylinder. Hence $G(T)=\left(\begin{smallmatrix}-2&T\\T&-2 \end{smallmatrix}\right)$, and $(-1)^{1}G(T)$ is positive definite exactly for $\abs T<2$. On a quaternionic Shimura surface the two Goren--Oort divisors span the primitive part of the Tate classes of $\pi$, on which the Hodge index theorem predicts a negative definite form: this is $G(T)\prec0$. Tian and Xiao make this remark \cite[\S1, \S4.5]{TianXiao2019}; it checks the sign conventions of \eqref{eq:gram}. \end{example} \begin{example}[$d=4$]\label{ex:d4} With the six semi-meanders of \cref{ex:meanders4} in the order listed there, \begin{equation}\label{eq:G4} G(T)=\begin{pmatrix} 4&T&-2&T^2&-2T&T\\ T&4&-2T&T&-2&T^2\\ -2&-2T&4&-2&T&-2T\\ T^2&T&-2&4&-2T&T\\ -2T&-2&T&-2T&4&-2\\ T&T^2&-2T&T&-2&4 \end{pmatrix}. \end{equation} Its leading principal minors are \[ 4,\quad 16-T^2,\quad 12(4-T^2),\quad 4(4-T^2)^2(T^2+2),\quad 6(4-T^2)^3,\quad (4-T^2)^5 , \] so $G(T)\succ0$ exactly for $\abs T<2$, by Sylvester's criterion; for $\abs T>2$ the signature is $(3,3)$, and $\det G(T)=-(T-2)^5(T+2)^5$ agrees with \cite[Thm.~3.5]{TianXiao2019}, where $t_{4,2}=\binom40+\binom41=5$. Completing the square five times writes the quadratic form of $G(T)$ as a weighted sum of six squares, with the pivots of \cref{ss:Bn-layer1} as weights. \end{example} \lean[eq:G4]{RamanujanHodge.G4,RamanujanHodge.G4_quad,RamanujanHodge.G4_posDef} \subsection{Dimension four in detail}\label{ss:go-d4} For $d=g=4$ the construction is explicit \cite[Ex.~1.4(3)]{TianXiao2019}. The four Goren--Oort divisors $Y_1,\dots,Y_4$ of $X$ are $\PP^1$-fibrations over quaternionic Shimura surfaces; on each of these surfaces there are two Goren--Oort divisors, and their inverse images in $Y_i$ are the cycles $X_{i,j}$ of codimension two. Tian and Xiao show that $X_{1,3}=X_{3,1}$ and $X_{2,4}=X_{4,2}$, so that the six cycles are \[ X_{1,3},\ X_{2,4},\ X_{1,2},\ X_{2,3},\ X_{3,4},\ X_{4,1}, \] corresponding to the two semi-meanders with two short arcs at distance two and to the four with a short arc nested under a long one. Each irreducible component of $X_{1,3}$ and of $X_{2,4}$ is isomorphic to $\PP^1\times\PP^1$, and each irreducible component of the four others to the ruled surface $\PP(\OO_{\PP^1}(p)\oplus\OO_{\PP^1}(-p))$, a Hirzebruch surface of degree $2p$; this geometry was known to Yu by a different method \cite{Yu2003}. The components are indexed by the points of the Shimura set of the definite quaternion algebra, and two components meet only if their indices are related by a Hecke correspondence at $p$, which is the source of the Hecke operator $T_\pp$ in \cref{thm:tx-formula}. \begin{proposition}\label{prop:G4-eigen} The eigenvalues of the matrix $G(T)$ of \eqref{eq:G4} are $4-T^2$, with multiplicity two, and \[ \lambda_{\pm}^{+}=\tfrac12\Bigl(T^2+3T+8\pm(T+1)\sqrt{T^2+32}\Bigr),\qquad \lambda_{\pm}^{-}=\tfrac12\Bigl(T^2-3T+8\pm(T-1)\sqrt{T^2+32}\Bigr). \] One has $\lambda^+_+\lambda^+_-=(T-2)^2(T+2)$ and $\lambda^-_+\lambda^-_-=(T+2)^2(2-T)$, and $\lambda^\pm_++\lambda^\pm_->0$. Consequently $G(T)$ is positive definite for $\abs T<2$, and for $\abs T>2$ it has exactly three negative eigenvalues: the double eigenvalue $4-T^2$ and one of $\lambda^-_\pm$ (if $T>2$) or one of $\lambda^+_\pm$ (if $T<-2$). \end{proposition} \begin{proof} The characteristic polynomial of $G(T)$ factors as \[ (T^2+\lambda-4)^2\,\bigl(\lambda^2-(T^2+3T+8)\lambda+(T-2)^2(T+2)\bigr)\bigl(\lambda^2-(T^2-3T+8)\lambda+(T+2)^2(2-T)\bigr), \] up to sign, as one checks by expanding; the roots of the two quadratic factors are the $\lambda^\pm_\pm$, since $(T^2\pm3T+8)^2-(T\pm1)^2(T^2+32)=4(T\mp2)^2(T\pm2)$. The sums $T^2\pm3T+8$ are positive for all real $T$, so each quadratic factor has two positive roots when its constant term is positive and roots of opposite signs when it is negative. For $\abs T<2$ both constant terms are positive and $4-T^2>0$. For $T>2$ the first constant term is positive and the second negative, and $4-T^2<0$; for $T<-2$ the reverse. \end{proof} \begin{remark}\label{rem:G4-rotation} The double eigenvalue $4-T^2$ reflects the rotation symmetry of the cylinder: the rotation by one node permutes the semi-meanders and commutes with $G(T)$, and the characters $\pm i$ of the cyclic group of order four, which occur only on the orbit of size four of the nested semi-meanders, have eigenvalue $4-T^2$. The four other eigenvalues come from the characters $\pm1$ on the two orbits. The closed form gives a second, independent proof of the positivity for $d=4$, and, with \cref{thm:bey}, a proof of the signature $(3,3)$ for $\abs T>2$. \end{remark} \begin{remark}\label{rem:sign-convention} The sign $(-1)^{d/2}$ in \cref{thm:AQ} is the sign $(-1)^i$ of the Hodge-type conjecture in codimension $i=d/2$. The two examples show both parities: for $d=2$ the matrix $G(T)$ is negative definite and for $d=4$ it is positive definite on the Ramanujan interval, in agreement with the conjecture. The same alternation holds for every even $d$ (\cref{cor:spin-positive}). \end{remark}