\documentclass[11pt,a4paper]{amsart} \usepackage[margin=1.1in]{geometry} \usepackage{amsmath,amssymb,amsthm,mathtools} \usepackage{mathrsfs} \usepackage{stmaryrd} \usepackage{enumitem} \usepackage{booktabs} \usepackage{longtable} % page-breaking formalisation index \usepackage{etoolbox} % TeX Live 2025 compatibility for the longtable output routine. % In its two page-output branches, longtable inserts \vss (infinite shrink). % The LaTeX mark-extraction \vsplit can then emit the otherwise harmless % "ignored error: Infinite glue shrinkage found in box being split" message. % Hexagon's strict preview reports that log message as a compilation error. % Replace both \vss tokens with finite shrink, following the LaTeX project's % upstream analysis: https://github.com/latex3/latex2e/issues/1907 % On newer longtable versions without these \vss tokens, this is a no-op. \makeatletter \patchcmd{\LT@output}{\vss}% {\vskip 0pt plus \maxdimen minus \normalbaselineskip}{}{} \patchcmd{\LT@output}{\vss}% {\vskip 0pt plus \maxdimen minus \normalbaselineskip}{}{} \makeatother \usepackage{xcolor} \usepackage[colorlinks=true,linkcolor=black!70!blue,citecolor=black!70!blue,urlcolor=black!70!blue]{hyperref} \usepackage{xurl} \usepackage{microtype} \theoremstyle{plain} \newtheorem{theorem}{Theorem}[section] \newtheorem{proposition}[theorem]{Proposition} \newtheorem{lemma}[theorem]{Lemma} \newtheorem{corollary}[theorem]{Corollary} \theoremstyle{definition} \newtheorem{definition}[theorem]{Definition} \newtheorem{notation}[theorem]{Notation} \newtheorem{example}[theorem]{Example} \theoremstyle{remark} \newtheorem{remark}[theorem]{Remark} \DeclareMathOperator{\Adj}{Adj} \DeclareMathOperator{\Ker}{ker} \DeclareMathOperator{\Img}{im} \DeclareMathOperator{\diag}{diag} \DeclareMathOperator{\rank}{rank} \DeclareMathOperator{\tr}{tr} \DeclareMathOperator{\id}{id} \DeclareMathOperator{\End}{End} \DeclareMathOperator{\Aut}{Aut} \DeclareMathOperator{\sgn}{sgn} \newcommand{\RR}{\mathbb{R}} \newcommand{\ZZ}{\mathbb{Z}} \newcommand{\NN}{\mathbb{N}} \newcommand{\FF}{\mathbb{F}} \newcommand{\II}{\mathbb{I}} \newcommand{\CC}{\mathbb{C}} \newcommand{\HH}{\mathbb{H}} \newcommand{\cC}{\mathcal{C}} \newcommand{\cE}{\mathcal{E}} \newcommand{\cF}{\mathcal{F}} \newcommand{\cV}{\mathcal{V}} \newcommand{\cL}{\mathcal{L}} \newcommand{\cG}{\mathcal{G}} \newcommand{\cN}{\mathcal{N}} \newcommand{\kronprod}{\otimes_{\!K}} \newcommand{\sheet}{\text{\rm sh}} \newcommand{\wrap}{\operatorname{wrap}} \newcommand{\tG}{\widetilde{G}} \newcommand{\tV}{\widetilde{V}} \newcommand{\tL}{\widetilde{L}} \newcommand{\Lscalar}{L^{\operatorname{sc}}} \newcommand{\Lsigned}{L^{\operatorname{sg}}} \newcommand{\comp}{\pi_0} \newcommand{\pair}[2]{\langle #1, #2 \rangle} \newcommand{\defeq}{\mathrel{\mathop:}=} \begin{document} \title[Kernel Dimension of the $\ZZ/2$ Connection Laplacian]{% Kernel Dimension of the $\ZZ/2$ Connection Laplacian \\ on a Finite Simple Graph \\ {\small (A Formalisation in Lean~4 / Mathlib v4.11.0)}} \author{Jes\'us Vilela Jato} \thanks{Independent Researcher. Correspondence: \texttt{jesusvilela@outlook.com}.} \date{3 November 2026} \subjclass[2020]{05C50, 05C22, 68V20, 68V15} \keywords{signed graph, connection Laplacian, double cover, balanced component, formal proof, Lean, Mathlib} \begin{abstract} We present a fully formalised, machine-checked proof library in Lean~4 / Mathlib~v4.11.0 for the kernel-dimension theory of the $\ZZ/2$ \emph{connection Laplacian} of a finite simple graph~$G$. A connection graph is a finite simple graph equipped with a designated set $W\subseteq E(G)$ of \emph{wrap edges}; on each edge~$e$ we attach a $2\times 2$ real matrix (the Pauli~$\sigma_x$ on wrap edges, $\II_2$ otherwise), yielding a block Laplacian $L_{\operatorname{Mob}}$. Our principal results, each proved from the three standard Lean axioms (\texttt{propext}, \texttt{Classical.choice}, \texttt{Quot.sound}) and nothing else, are the following. \begin{enumerate}[label=\textbf{(\roman*)}] \item A Hadamard--Kronecker conjugation decomposes $L_{\operatorname{Mob}}$ into the block-diagonal sum of the ordinary (\emph{scalar}) Laplacian and a \emph{signed} Laplacian, both on~$G$. \item The orientation double cover $\tG$ of~$G$ inherits a trivial connection, and its scalar Laplacian splits similarly. \item A base connected component $C\in \comp(G)$ is \emph{balanced} iff the induced map $\comp(\tG)\to \comp(G)$ has fibre of cardinality~$2$ over~$C$. \item The kernel dimension of the signed Laplacian equals the number of balanced components; the full $\ZZ/2$-connection Laplacian has kernel dimension $\# \comp(G) + \#\{\text{balanced components}\}$ (Möbius) and $2\,\#\comp(G)$ (flat). \item On the $n$-cycle ($n\ge 3$) the scalar and the one-wrap signed Laplacians have explicit cosine spectra: their characteristic polynomials and eigenvalue multisets, with multiplicities, are proved for the explicit cycle matrices. \end{enumerate} The bespoke arguments are the Hadamard rotation of part~(i)--(ii) (a Kronecker-conjugation computation) and the double-cover lift of part~(iii) (a walk induction). Along the way we observe and correct an incorrect statement in our initial written plan: the identity $\dim\Ker L^{\operatorname{sg}}(G) = \#\comp(G) - \#\{\text{components of odd total wrap}\}$ holds for every wrap assignment on a cycle, but fails for some wrap assignments on general graphs; the universally valid replacement is the cohomological formula $\dim\Ker L^{\operatorname{sg}}(G) = \#\{\text{balanced components}\}$, which is the content of Theorem~\ref{thm:signed-kernel}. The Lean sources and a numerical cross-check on every simple graph of order~$\le 5$ ($3{,}456$ configurations, zero disagreements)~--~and an extended fuzzer sweep at orders $n\le 7$ ($456{,}950$ configurations, also zero disagreements) accompany this paper. \end{abstract} \maketitle \tableofcontents %============================================================= \section{Introduction} %============================================================= Let $G=(V,E)$ be a finite simple graph and let $W\subseteq E$ be a distinguished set of \emph{wrap} edges. Attach to each $e\in E$ a $2\times 2$ real matrix $\Phi(e)$ by \[ \Phi(e) \defeq \begin{cases} \sigma_x & \text{if } e\in W,\\ \II_2 & \text{if } e\notin W, \end{cases} \qquad \sigma_x = \begin{pmatrix}0&1\\1&0\end{pmatrix}. \] The \emph{$\ZZ/2$-connection Laplacian} of $(G,W)$ is the $V\times V$ block matrix with $2\times 2$ blocks \begin{equation}\label{eq:connection-laplacian} L_{\operatorname{Mob}}[u,v] \defeq \begin{cases} \deg(u)\,\II_2 & u=v,\\ -\,\Phi(\{u,v\}) & \{u,v\}\in E,\\ 0 & \text{otherwise.} \end{cases} \end{equation} Equivalently, $L_{\operatorname{Mob}} = D\otimes \II_2 - \sum_{e\in E} \mathbf{1}_e\otimes \Phi(e)$, where, for $e=\{u,v\}$, $\mathbf{1}_e$ is the symmetric $V\times V$ edge-indicator with entries $1$ at $(u,v)$ and at $(v,u)$ and $0$ elsewhere (both Kronecker factors ordered vertex-major, matching the $V\times \operatorname{Fin}\,2$ index set of Equation~(1)). The \emph{flat} Laplacian $L_{\operatorname{flat}}$ is obtained by the same recipe with $\Phi\equiv \II_2$, i.e. by ignoring the wrap structure; it agrees with two copies of the ordinary graph Laplacian. The guiding question answered in this paper is: \begin{center} \emph{In terms of $(G,W)$, what is $\dim\Ker L_{\operatorname{Mob}}$ and when is it strictly smaller than $\dim\Ker L_{\operatorname{flat}}$?} \end{center} This is the finite-dimensional, discrete analogue of the spectrum of the Laplacian on a rank-two flat vector bundle over a graph: the kernel detects global \emph{parallel} sections, not arbitrary sections. The representation splits as a trivial line, spanned by $(1,1)^\top$, and a signed line, spanned fibrewise by $(1,-1)^\top$. Thus the rank-two bundle always admits the nowhere-zero parallel section $s(v)=(1,1)^\top$, regardless of the wrap data. The signed line admits a nonzero parallel section over a component exactly when the wrap holonomy around every cycle in that component is trivial. Equivalently, the rank-two bundle has two independent parallel sections there rather than just one; this is the condition of \emph{balance} in the language of Harary, Cartwright and Zaslavsky \cite{HararyCartwright, Zaslavsky82}. \subsection*{Contribution and prior work} The contribution is a Lean formalisation and a documented verification process for classical spectral graph theory~\cite{Chung}. We do not claim new mathematical discovery of the balance--nullity or lift-splitting formulas. For the signed Laplacian $D-A_{\mathrm{sg}}$, the standard nullity formula is stated explicitly in Zaslavsky's survey \cite[Lemma~IV.2]{ZaslavskyMatrices}. Bilu and Linial's $2$-lift result gives the adjacency spectrum as the base and signed spectra with multiplicities \cite[preprint Lemma~3.1]{BiluLinial}. Our Laplacian splitting uses the same sheet-symmetric and sheet-antisymmetric subspaces: the degree block acts as $D$ in both. This also works for irregular finite simple graphs; it does not require replacing $D$ by a scalar. The orientation double cover of Definition~\ref{def:cover} is the \emph{Gremban expansion} of the signed graph whose negative edges are~$W$; Diaz-Diaz, Devriendt and Lambiotte prove that its Laplacian is similar to the direct sum of the unsigned and signed Laplacians \cite[Def.~2.1, Cor.~3.8]{DiazDevriendtLambiotte}, which is the content of Theorem~\ref{thm:cover-splits}. The doubling goes back to Gremban's reduction of symmetric diagonally dominant systems to systems of twice the dimension with non-positive off-diagonal entries~\cite{Gremban}, recalled in \cite[\S2.2]{SpielmanTeng}. On the formal side, Mathlib's \texttt{SimpleGraph} library at the pinned revision provides the scalar Laplacian \texttt{lapMatrix}, its positive semidefiniteness, and the identification of its kernel dimension with the number of connected components~\cite{Mathlib}. It has no signed or connection Laplacian and no orientation double cover; those, and the results above, are developed here in Lean~4~\cite{Lean4}. The repository certifies the resulting identities and records the remaining specification and formalisation obligations. The numerical work is a cross-check, not an ML application or a scalability benchmark. \subsection*{Organisation and results} Section~\ref{sec:prelim} sets the notation and fixes the Lean-formalised data. Section~\ref{sec:decomp} proves the Hadamard--Kronecker decomposition that reduces the block Laplacian to two ordinary Laplacians (one scalar, one signed). Section~\ref{sec:cover} constructs the orientation double cover and proves that its scalar Laplacian splits as the direct sum of the scalar and signed Laplacians of~$G$. Section~\ref{sec:coho} formalises the balance notion as the vanishing of a $\ZZ/2$-cohomology class and computes the fibre cardinality of the induced map on $\pi_0$. Section~\ref{sec:recognition} assembles everything into the \emph{recognition theorems} which count kernel dimension by balanced components. Section~\ref{sec:cycles} specialises to the $n$-cycle, where the Fourier basis diagonalises both Laplacians. Section~\ref{sec:formalisation} summarises the formal Lean development. The main structural decomposition, cover-splitting, cohomological recognition, kernel-dimension, and auxiliary identities are machine-checked in Lean~4 against Mathlib~v4.11.0. The \emph{complete} flat and one-wrap signed cycle characteristic polynomials and real root multisets, including algebraic multiplicities for every $n\ge3$, are also machine-checked in \texttt{CycleMultiset.lean}; see Remark~\ref{rem:cycle-spectrum-lean}. The claims concern the explicit cycle matrices used in the Lean project. A further graph-level identification with arbitrary \texttt{ConnGraph} cycle instances is not asserted. The complete proof scripts and independent numerical checks are included in the accompanying repository. %============================================================= \section{Preliminaries}\label{sec:prelim} %============================================================= \subsection{Connection graphs} A \emph{connection graph} is a quadruple $G=(V,E,\Adj,W)$ where $V$ is a finite type, $\Adj\subseteq V\times V$ defines a (mathematically simple) graph on~$V$, $E=\{\{u,v\}:\Adj(u,v)\}$ is its edge set and $W\subseteq E$ is an arbitrary subset, the \emph{wrap} edges. In Lean we keep the wrap data as a predicate \texttt{wrap : G.graph.edgeSet $\to$ Prop} and carry explicit \texttt{Fintype}/\texttt{DecidableEq}/\texttt{DecidableRel} instances throughout. \subsection{Pauli and Hadamard} The $2\times 2$ Pauli matrix $\sigma_x=\begin{pmatrix}0&1\\1&0\end{pmatrix}$ is involutive, symmetric and has eigenvalues~$\pm 1$, with symmetric eigenvector $(1,1)^\top$ and antisymmetric $(1,-1)^\top$. The \emph{Hadamard rotation} \begin{equation}\label{eq:Rhat} \widehat R \defeq \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}, \qquad \widehat R\,\widehat R = 2\,\II_2, \end{equation} simultaneously diagonalises $\sigma_x$ and $\II_2$ in the sense that $\widehat R\,\sigma_x\,\widehat R = 2\,\diag(1,-1)$ and $\widehat R\,\II_2\,\widehat R = 2\,\II_2$. In the Lean formalisation we keep two copies of~$\widehat R$: one indexed by $\{0,1\}=\operatorname{Fin}2$ (for the connection-block decomposition of Section~\ref{sec:decomp}) and one indexed by $\operatorname{Bool}$ (for the cover-sheet decomposition of Section~\ref{sec:cover}). They are the same matrix under the obvious bijection $\operatorname{Bool}\cong \operatorname{Fin}2$. \subsection{Scalar and signed Laplacians} Let $G$ be a connection graph. The ordinary \emph{scalar} Laplacian $\Lscalar \in \RR^{V\times V}$ is \[ \Lscalar[u,v] \defeq \begin{cases} \deg(u) & u=v,\\ -1 & \{u,v\}\in E,\\ 0 & \text{otherwise,}\end{cases} \] i.e.\ Mathlib's \texttt{SimpleGraph.lapMatrix}. The \emph{signed Möbius} Laplacian $\Lsigned \in \RR^{V\times V}$ encodes the wrap sign on the off-diagonal: \[ \Lsigned[u,v] \defeq \begin{cases} \deg(u) & u=v,\\ +1 & \{u,v\}\in E,\ \{u,v\}\in W,\\ -1 & \{u,v\}\in E,\ \{u,v\}\notin W,\\ 0 & \text{otherwise.}\end{cases} \] Both are real symmetric and positive semidefinite as quadratic forms on $\RR^V$. For $\Lscalar$ this is Mathlib's \path{SimpleGraph.posSemidef_lapMatrix}. For $\Lsigned$ we use the direct sum-of-squares expression \[ \pair{x}{\Lsigned x} = \!\!\sum_{\{u,v\}\in E\setminus W}\! (x_u - x_v)^2 + \sum_{\{u,v\}\in W} (x_u + x_v)^2, \] which Lemma~\ref{lem:signed-psd} (\S\ref{sec:bounds}) turns into the Lean fact \path{signedLaplacianMobius_posSemidef} (\texttt{L13\_PSD.lean}). Equivalently --- but through a heavier route not used by the Lean proof --- PSD follows from the cover splitting (Theorem~\ref{thm:cover-splits}): the orientation double cover's scalar Laplacian is PSD, and similarity to $\operatorname{diag}(\Lscalar,\Lsigned)$ preserves the PSD property of each diagonal block. The Fourier diagonalisation in \S\ref{sec:cycles} below regards both matrices as acting on $\CC^V$, but the matrices themselves remain real; complexification is a computational convenience, not a domain change. %============================================================= \section{The Block Decomposition}\label{sec:decomp} %============================================================= The connection Laplacian $L_{\operatorname{Mob}}$ of~\eqref{eq:connection-laplacian} lives on the product index set $V\times \operatorname{Fin}2$. Reindexing via the canonical bijection \[ \varphi : V\times \operatorname{Fin}2 \;\xrightarrow{\;\sim\;}\; V\sqcup V, \qquad (u,0)\mapsto \iota_\ell u,\ (u,1)\mapsto \iota_r u, \] we get a matrix on the sum index $V\sqcup V$; the block-diagonal decomposition then becomes a genuine \emph{block-diagonal} form \texttt{Matrix.fromBlocks}. \begin{theorem}\label{thm:decomp} Let $G$ be a connection graph and $\epsilon \in\{\text{flat},\text{Mob}\}$. There exists an invertible $P\in\RR^{(V\times\operatorname{Fin}2) \times (V\times\operatorname{Fin}2)}$ such that \[ \varphi_* \bigl( P\, L_\epsilon\, P^{-1} \bigr) = \begin{pmatrix}\Lscalar & 0 \\ 0 & B_\epsilon \end{pmatrix}, \qquad B_\epsilon = \begin{cases} \Lsigned & \epsilon=\text{Mob},\\ \Lscalar & \epsilon=\text{flat.} \end{cases} \] \end{theorem} \begin{proof} Set $P = \II_V \kronprod \widehat R$ (Kronecker product with the Hadamard~$\widehat R$ of~\eqref{eq:Rhat} acting on the $\operatorname{Fin}2$ fibre). By functoriality of the Kronecker product, \[ P\cdot P = (\II_V\cdot \II_V) \kronprod (\widehat R\,\widehat R) = \II_V \kronprod (2\II_2) = 2\,\II_{V\times \operatorname{Fin}2}, \] so $P^{-1} = \tfrac{1}{2}P$, and in particular $\det P\ne 0$. A direct entrywise calculation using $\widehat R\,\sigma_x\,\widehat R = 2\diag(1,-1)$ and $\widehat R\,\II_2\,\widehat R = 2\,\II_2$ yields, for $u,v\in V$ and $i,j\in\operatorname{Fin}2$, \[ \tfrac{1}{2}\,\bigl(P\, L_\epsilon\, P\bigr)\bigl[(u,i),(v,j)\bigr] = \begin{cases} \Lscalar[u,v] & i=j=0,\\ B_\epsilon[u,v] & i=j=1,\\ 0 & i\ne j. \end{cases} \] Reindexing via $\varphi$ and using $P^{-1}=\tfrac{1}{2}P$ turns the left-hand side into $\varphi_*\bigl(P\,L_\epsilon\,P^{-1}\bigr)$, giving the claim. The flat case is the special case $W=\emptyset$ of the Möbius case, or equivalently the fact that $\widehat R\,\II_2\,\widehat R= 2\II_2$ collapses both diagonal blocks to the scalar Laplacian. \end{proof} \begin{remark} In the Lean formalisation \texttt{laplacian\_decomposes} the two $\epsilon$-branches are proved separately: the Möbius branch uses $P=\II_V\kronprod \widehat R$ as above, while the flat branch takes the simpler $P=\II_{V\times\operatorname{Fin}2}$ (identity similarity) and reduces the claim to $L_{\mathrm{flat}}=\diag(\Lscalar,\Lscalar)$ after reindex via $\varphi$. Mathematically the flat case is the specialisation of the Möbius case at $W=\emptyset$, but the two Lean branches are syntactically disjoint. \end{remark} \begin{remark} In the Lean script the bijection $\varphi$ is \texttt{prodFinTwoEquivSum} and the Kronecker-product identity is the lemma \texttt{mul\_kronecker\_mul} from \path{Mathlib.Data.Matrix.Kronecker}. The entrywise calculation is made into a single-sum \texttt{Finset.sum\_eq\_single} reduction that kills $V$-off-diagonal terms using the $\II_V$ factor of~$P$, and then reduces the remaining $\operatorname{Fin}2\times \operatorname{Fin}2$ block to one of three cases by matching on equality of vertices and wrap status. \end{remark} %============================================================= \section{The Orientation Double Cover}\label{sec:cover} %============================================================= The preceding decomposition separates the flat part of~$G$ from its wrap data inside a single graph. The cover perspective lifts the wrap data into a \emph{branching} structure on a new, connection-free graph. \begin{definition}\label{def:cover} The \emph{orientation double cover} of the connection graph $(G,W)$ is the simple graph $\tG$ on vertex set $\tV \defeq V\times \operatorname{Bool}$, with adjacency \[ (u,b)\sim_{\tG} (v,c) \iff \{u,v\}\in E \;\text{and}\; \bigl(\{u,v\}\in W \Leftrightarrow b\ne c\bigr). \] We view $\tG$ as a connection graph with $\widetilde W=\emptyset$: every edge of $\tG$ is ``interior'', the cover has \emph{trivial} connection. \end{definition} Equivalently, $\tG$ is the $\ZZ/2$-covering space determined by the $1$-cochain $\sigma_W:E\to \ZZ/2,\ e\mapsto \mathbf{1}_{e\in W}$ (which is automatically a $1$-cocycle since the graph has no $2$-cells; see~\S\ref{sec:coho}). The non-trivial \emph{deck transformation} $\delta:\tV\to\tV,\ (v,b)\mapsto (v,\neg b)$ is a free graph involution. \begin{lemma}\label{lem:deck} $\delta$ is a graph automorphism of~$\tG$ of order~$2$ with no fixed points. \end{lemma} \begin{proof} Involutivity is immediate from $\neg\neg b = b$. The adjacency $(\delta x)\sim_{\tG}(\delta y)\Leftrightarrow x\sim_{\tG}y$ follows from the identity $(\neg b)\ne (\neg c) \Leftrightarrow b\ne c$ and fixity of the underlying edge $\{u,v\}$. Absence of fixed points is trivial: $(v,b)\ne (v,\neg b)$. \end{proof} \begin{lemma}\label{lem:cover-degree} For every $(u,b)\in \tV$, $\deg_{\tG}(u,b) = \deg_G(u)$. \end{lemma} \begin{proof} We construct a bijection $\cN_G(u)\to \cN_{\tG}(u,b)$ by \[ v \;\longmapsto\; \bigl(v,\ b\oplus \mathbf{1}_{\{u,v\}\in W}\bigr), \] where $\oplus$ is the $\operatorname{Bool}$ XOR. Correctness is the definition of~$\sim_{\tG}$; injectivity follows by reading the first coordinate; surjectivity uses the biconditional $\{u,v\}\in W \Leftrightarrow b\ne c$ to recover the unique~$v$ with $(u,b)\sim_{\tG}(v,c)$. \end{proof} We write $\tL\defeq \Lscalar(\tG)$ for the scalar Laplacian of the cover. \subsection*{The Hadamard rotation on the $\operatorname{Bool}$-fibre} Replace the $\operatorname{Fin}2$-fibre of Section~\ref{sec:decomp} by the $\operatorname{Bool}$-fibre, viewing \[ \widehat R : \RR^{\operatorname{Bool}\times \operatorname{Bool}}, \qquad \widehat R[i,j] = \begin{cases} -1 & i=j=\top,\\ \phantom{-}1 & \text{otherwise}, \end{cases} \] so $\widehat R\,\widehat R = 2\,\II$ on $\RR^{\operatorname{Bool}\times \operatorname{Bool}}$. Set \[ P_{\mathrm{cov}} \defeq \II_V\kronprod \widehat R \quad \in \RR^{\tV\times \tV}. \] \begin{theorem}\label{thm:cover-splits} Under the canonical bijection $\varphi:\tV\xrightarrow{\sim} V\sqcup V$, $(v,\bot)\mapsto \iota_\ell v,\ (v,\top)\mapsto \iota_r v$, we have \[ \varphi_*\bigl(P_{\mathrm{cov}}\,\tL\,P_{\mathrm{cov}}^{-1}\bigr) = \begin{pmatrix} \Lscalar(G) & 0 \\ 0 & \Lsigned(G)\end{pmatrix}. \] In particular, $P_{\mathrm{cov}}$ is invertible and $\tL\sim \Lscalar(G)\oplus\Lsigned(G)$. \end{theorem} \begin{proof} Write every $2\times 2$ block \[ B_{u,v} \defeq \widehat R\,\tL[u,v]\,\widehat R \in \RR^{\operatorname{Bool}\times\operatorname{Bool}} \] where $\tL[u,v]$ is the $\{u\}\times\operatorname{Bool}$-rows, $\{v\}\times \operatorname{Bool}$-columns sub-block of $\tL$. A direct Kronecker calculation gives \begin{equation}\label{eq:Pcov-identity} \bigl(P_{\mathrm{cov}}\,\tL\,P_{\mathrm{cov}}\bigr)\bigl[(u,i),(v,j)\bigr] = (\widehat R\,\tL[u,v]\,\widehat R)[i,j] = B_{u,v}[i,j]. \end{equation} Split $B_{u,v}$ into four structural cases: \begin{enumerate}[label=\textbf{(\alph*)}] \item \textit{Diagonal.} If $u=v$, then by Lemma~\ref{lem:cover-degree}, $\tL[u,u] = \deg(u)\,\II$, whence $\widehat R(\deg(u)\,\II)\widehat R = \deg(u)\cdot 2\II$, so $B_{u,u}[i,j] = 2\deg(u)\cdot \delta_{ij}$. \item \textit{Adjacent, non-wrap.} If $\{u,v\}\in E\setminus W$, then $\tL[u,v]$ has $-1$ on the \emph{diagonal} of $\operatorname{Bool}$ (sheets match) and $0$ off-diagonal: $\tL[u,v] = (-1)\II$. So $B_{u,v}[i,j] = -2\delta_{ij}$. \item \textit{Adjacent, wrap.} If $\{u,v\}\in E\cap W$, then $\tL[u,v]$ has $-1$ off the diagonal (sheets flip) and $0$ on the diagonal: $\tL[u,v] = -\sigma_x$. So $\widehat R(-\sigma_x)\widehat R = -2\diag(1,-1)$, i.e.\ $B_{u,v}[i,j] = -2\delta_{ij}\,(-1)^{\mathbf{1}_{i=\top}}$. \item \textit{Non-adjacent.} If $\{u,v\}\notin E$, then $\tL[u,v]=0$ and $B_{u,v}=0$. \end{enumerate} Collecting cases and matching against the defining formulas of $\Lscalar$ and $\Lsigned$: \[ B_{u,v}[i,j] = 2\cdot \delta_{ij}\cdot \begin{cases} \Lscalar[u,v] & i=\bot,\\ \Lsigned[u,v] & i=\top. \end{cases} \] Because $P_{\mathrm{cov}}^{-1} = \tfrac{1}{2}P_{\mathrm{cov}}$ (by $P_{\mathrm{cov}}^2 = 2\II$, exactly as in Section~\ref{sec:decomp}), reindexing through~$\varphi$ gives the claimed block-diagonal form. \end{proof} \begin{corollary}\label{cor:cover-kernel} $\dim_\RR \Ker\tL = \dim_\RR\Ker \Lscalar(G) + \dim_\RR\Ker \Lsigned(G)$. \end{corollary} \begin{proof} Kernel dimension is invariant under similarity by an invertible matrix and under reindexing by a bijection of the index set; for a block-diagonal matrix it is additive in the blocks. Apply these three standard linear-algebra facts to the similarity of Theorem~\ref{thm:cover-splits}. \end{proof} \begin{remark} In the Lean code these three standard facts are the lemmas \begin{center} \texttt{finrank\_ker\_toLin'\_conj},\quad \texttt{finrank\_ker\_toLin'\_reindex},\quad \texttt{finrank\_ker\_toLin'\_fromBlocks\_diag}. \end{center} They are proved once, over an arbitrary field, in \texttt{KernelDimension.lean} and reused for both the block-decomposition Theorem~\ref{thm:decomp} and the cover-splitting Corollary~\ref{cor:cover-kernel}. \end{remark} %============================================================= \section{$\ZZ/2$ Cohomology and Balanced Components}\label{sec:coho} %============================================================= The wrap predicate $W\subseteq E$ reifies canonically as a $\ZZ/2$-valued $1$-cochain \[ \sigma_W : E \;\longrightarrow\; \ZZ/2,\qquad \sigma_W(e) \defeq \mathbf{1}_{e\in W}. \] It is automatically a $1$-cocycle (there is no $2$-skeleton to impose constraints on it). Its cohomology class $[\sigma_W]\in H^1(G;\ZZ/2)$ is the obstruction to $W$ arising as the coboundary of a vertex $\ZZ/2$-colouring: $[\sigma_W]=0$ iff there exists $\varepsilon:V\to\operatorname{Bool}$ with $W = \{\,\{u,v\}\in E : \varepsilon(u)\ne \varepsilon(v)\,\}$. This is the classical notion of \emph{balance} for signed graphs. \begin{definition}\label{def:balanced} A connected component $C\in\comp(G)$ is \emph{balanced} iff there is a map $\varepsilon:V\to\operatorname{Bool}$ such that for every edge $\{u,v\}\in E$ with $[u]_{\sim_G} = C$, \[ \{u,v\}\in W \iff \varepsilon(u)\ne \varepsilon(v). \] We write $\comp^{\mathrm{bal}}(G)\subseteq \comp(G)$ for the subset of balanced components, and $\beta(G)\defeq \#\comp^{\mathrm{bal}}(G)$. \end{definition} \begin{remark}[Scope conventions for Definition~\ref{def:balanced}] \label{rem:balance-scope} Two conventions deserve to be flagged. \begin{enumerate}[label=(\alph*)] \item \textbf{Component-local vs.\ graph-global.} The definition quantifies only over edges \emph{inside} the component~$C$; the values $\varepsilon(w)$ for $w$ outside~$C$ are unconstrained and play no role. For a \emph{connected} graph the present definition coincides with Harary's original graph-global notion of balance ($[\sigma_W]=0$ in $H^1(G;\ZZ/2)$); for disconnected graphs they differ, and \emph{every theorem below uses the component-local version.} Throughout the paper $\beta(G)$ denotes the component-local count. \item \textbf{Isolated vertices are vacuously balanced.} If $C=\{v_0\}$ is a singleton, the edge quantifier is vacuous and the condition holds with any~$\varepsilon$. Consequently every isolated vertex counts towards $\beta(G)$; this is load-bearing for Theorem~\ref{thm:signed-kernel} below, because an isolated vertex contributes a zero row to~$\Lsigned$ and hence~$+1$ to the kernel dimension. \end{enumerate} \end{remark} The main combinatorial result of this section relates balance to the fibres of the induced map on connected components. \begin{theorem}\label{thm:fiber-card} Let $\pi:\comp(\tG)\to\comp(G)$ be the map induced by the sheet projection $\tG\to G,\ (v,b)\mapsto v$. For every $C\in\comp(G)$, \[ \#\pi^{-1}(C) \;=\; \begin{cases} 2 & C \text{ balanced,}\\ 1 & \text{otherwise.} \end{cases} \] \end{theorem} The proof occupies the remainder of this section. Fix $C\in\comp(G)$ and choose a representative $v_0\in V$ with $[v_0]_{\sim_G}=C$. Set the \emph{candidate lifts} \[ D_\bot \defeq [(v_0,\bot)]_{\comp(\tG)}, \qquad D_\top \defeq [(v_0,\top)]_{\comp(\tG)}. \] \paragraph{Step 1: every component in the fibre is a candidate lift.} \begin{lemma}\label{lem:fiber-subset} For every $D\in\pi^{-1}(C)$, either $D=D_\bot$ or $D=D_\top$. \end{lemma} \begin{proof} Since $\pi([(w,b)]) = [w]_{\comp(G)}$ factors through the first coordinate, $D=[(w,b)]$ for some $(w,b)\in\tV$ with $[w]=C$. By connectedness of~$C$ there is a walk $w\to v_0$ in $G$; lifting edge by edge and setting \[ \text{next sheet}\bigl(b,\ \{u,u'\}\bigr) \defeq \begin{cases} \neg b & \{u,u'\}\in W,\\ b & \text{otherwise,} \end{cases} \] we obtain a walk $(w,b)\to (v_0,b'')$ in $\tG$ for some $b''\in\operatorname{Bool}$ determined by the walk. So $[(w,b)]=[(v_0,b'')]$, and $D\in\{D_\bot,D_\top\}$. \end{proof} \paragraph{Step 2: the balanced case.} \begin{lemma}\label{lem:sep-if-balanced} If $C$ is balanced, then $D_\bot\ne D_\top$, whence $\#\pi^{-1}(C)=2$. \end{lemma} \begin{proof} Let $\varepsilon$ witness balance. Define the \emph{XOR} invariant $\chi:\tV\to \operatorname{Bool}$ by \[ \chi(v,b) \defeq \varepsilon(v)\oplus b. \] We claim $\chi$ is constant on every connected component of~$\tG$ whose base image is~$C$. Indeed, for an edge $(u,b)\sim_{\tG}(u',b')$ with $[u]_{\sim_G}=C$, \[ \chi(u,b)\oplus \chi(u',b') = \varepsilon(u)\oplus \varepsilon(u')\oplus b\oplus b' = \mathbf{1}_{\{u,u'\}\in W} \oplus \mathbf{1}_{\{u,u'\}\in W} = 0, \] using the definition of~$\sim_{\tG}$ and of balance. So $\chi$ is a locally constant function on the fibre over~$C$, hence constant on components. But \[ \chi(v_0,\bot) = \varepsilon(v_0)\oplus \bot \ne \varepsilon(v_0)\oplus \top = \chi(v_0,\top), \] so $(v_0,\bot)$ and $(v_0,\top)$ lie in different components: $D_\bot\ne D_\top$. Together with Lemma~\ref{lem:fiber-subset}, this forces $\pi^{-1}(C) = \{D_\bot,D_\top\}$, of cardinality~$2$. \end{proof} \paragraph{Step 3: the unbalanced case.} \begin{lemma}\label{lem:merge-if-unbalanced} If $C$ is not balanced, then $D_\bot=D_\top$, whence $\#\pi^{-1}(C)=1$. \end{lemma} \begin{proof} We prove the contrapositive: if $D_\bot\ne D_\top$, then $C$ is balanced. Define \[ \varepsilon_0(v)\defeq \mathbf{1}_{(v,\bot)\in D_\bot} \qquad (v\in V), \] read in $\operatorname{Bool}$ via $0\mapsto\bot$, $1\mapsto\top$. We show that $\varepsilon_0$ itself witnesses balance of~$C$ (Definition~\ref{def:balanced}). Two facts are used, for every $u$ with $[u]=C$. First, some sheet over~$u$ lies in~$D_\bot$: lifting a walk $v_0\to u$ in~$C$ edge by edge from $(v_0,\bot)$, as in the proof of Lemma~\ref{lem:fiber-subset}, ends at $(u,b)$ for some~$b$. Second, not both sheets over~$u$ lie in~$D_\bot$: the deck involution $\delta$ is a graph automorphism (Lemma~\ref{lem:deck}), so it maps components to components, and $\delta(v_0,\bot)=(v_0,\top)$ gives $\delta(D_\bot)=D_\top$. If $(u,\bot)$ and $(u,\top)$ both lay in~$D_\bot$, then $(u,\top)=\delta(u,\bot)$ would also lie in~$D_\top$, so $D_\bot\cap D_\top\ne\emptyset$ and $D_\bot=D_\top$, contrary to assumption. Together, \[ (u,\top)\in D_\bot \iff (u,\bot)\notin D_\bot \qquad\text{whenever } [u]=C. \tag{$\dagger$} \] Now let $\{u,u'\}\in E$ with $[u]=C$. If $\{u,u'\}\notin W$, then $(u,\bot)\sim_{\tG}(u',\bot)$, so $(u,\bot)$ and $(u',\bot)$ lie in the same component and $\varepsilon_0(u)=\varepsilon_0(u')$. If $\{u,u'\}\in W$, then $(u,\bot)\sim_{\tG}(u',\top)$, so $(u,\bot)\in D_\bot\iff(u',\top)\in D_\bot\iff(u',\bot)\notin D_\bot$ by~($\dagger$), that is, $\varepsilon_0(u)\ne\varepsilon_0(u')$. Hence $\{u,u'\}\in W\iff\varepsilon_0(u)\ne\varepsilon_0(u')$ on every edge of~$C$, and $C$ is balanced, contradicting the hypothesis. Therefore $D_\bot = D_\top$, and $\pi^{-1}(C)=\{D_\bot\}$ by Lemma~\ref{lem:fiber-subset}. The Lean proof follows the same route. \path{balanced_of_sheets_separated} (\path{L6_Cohomology.lean}) takes as witness the unique sheet $b(u)$ with $(u,b(u))\in D_\bot$, which equals $\neg\varepsilon_0(u)$ and witnesses balance equally well; its uniqueness, \path{unique_sheet_above}, is the deck-involution argument above. \path{componentProj_fiber_card} combines it with Lemmas~\ref{lem:fiber-subset} and~\ref{lem:sep-if-balanced}. \end{proof} Lemmas~\ref{lem:fiber-subset}--\ref{lem:merge-if-unbalanced} together prove Theorem~\ref{thm:fiber-card}. An immediate corollary is: \begin{corollary}\label{cor:components-cover} $\#\comp(\tG) \;=\; \#\comp(G) \;+\; \beta(G)$. \end{corollary} \begin{proof} Summing $\#\pi^{-1}(C)$ over $C\in\comp(G)$: each balanced component contributes $2$, each unbalanced contributes~$1$. So $\#\comp(\tG) = 2\beta(G) + (\#\comp(G)-\beta(G)) = \#\comp(G)+\beta(G)$. \end{proof} %============================================================= \section{Recognition Theorems}\label{sec:recognition} %============================================================= We now reap the kernel-dimension formulas. Throughout, $G$ is a finite simple connection graph. \begin{theorem}[Scalar kernel dimension, Mathlib]\label{thm:scalar-ker} $\dim_\RR \Ker \Lscalar(G) = \#\comp(G)$. \end{theorem} This is Mathlib's \path{SimpleGraph.card_ConnectedComponent_eq_rank_ker_lapMatrix} applied to the ordinary graph Laplacian and used as a primitive. \begin{theorem}\label{thm:signed-kernel} $\dim_\RR \Ker \Lsigned(G) = \beta(G)$. \end{theorem} \begin{proof} By Corollary~\ref{cor:cover-kernel}, \[ \dim \Ker\tL \;=\; \dim\Ker\Lscalar(G) + \dim \Ker\Lsigned(G), \] where $\tL = \Lscalar(\tG)$. Applying Theorem~\ref{thm:scalar-ker} to~$\tG$ and to~$G$, and invoking Corollary~\ref{cor:components-cover}, \[ \#\comp(G) + \beta(G) = \#\comp(\tG) = \dim\Ker\tL = \dim\Ker\Lscalar(G) + \dim\Ker\Lsigned(G) = \#\comp(G) + \dim\Ker\Lsigned(G). \] Subtracting $\#\comp(G)$ yields the claim. \end{proof} \begin{theorem}\label{thm:connection-ker} For $\epsilon\in\{\mathrm{flat},\mathrm{Mob}\}$, \[ \dim_\RR \Ker L_\epsilon \;=\; \begin{cases} 2\,\#\comp(G) & \epsilon=\mathrm{flat},\\ \#\comp(G)+\beta(G) & \epsilon=\mathrm{Mob}. \end{cases} \] \end{theorem} \begin{proof} By Theorem~\ref{thm:decomp}, $L_\epsilon$ is similar (through the reindex $\varphi$) to $\diag(\Lscalar, B_\epsilon)$ with $B_{\mathrm{flat}}=\Lscalar$, $B_{\mathrm{Mob}}=\Lsigned$. So \[ \dim\Ker L_\epsilon = \dim\Ker\Lscalar + \dim \Ker B_\epsilon. \] Theorems~\ref{thm:scalar-ker} and~\ref{thm:signed-kernel} give the two diagonal-block kernel dimensions, yielding the claim. \end{proof} \begin{theorem}\label{thm:strict} $\dim\Ker L_{\mathrm{Mob}} < \dim\Ker L_{\mathrm{flat}}$ iff $\beta(G) < \#\comp(G)$, equivalently, iff \emph{not every} component of~$G$ is balanced. \end{theorem} \begin{proof} By Theorem~\ref{thm:connection-ker}, the strict inequality reduces to $\#\comp(G)+\beta(G) < 2\#\comp(G)$, i.e.\ $\beta(G)<\#\comp(G)$. The inequality $\beta(G)\le \#\comp(G)$ is immediate from the inclusion $\comp^{\mathrm{bal}}(G)\subseteq\comp(G)$ of Definition~\ref{def:balanced}. \end{proof} \begin{remark}[Initial written plan vs.\ correct statement] \label{rem:initial-plan} Our initial written plan contained the assertion \[ \dim\Ker\Lsigned(G) \;\overset{?}{=}\; \#\comp(G) - \#\{C\in\comp(G) : |W\cap E(C)|\text{ is odd}\}. \tag{$\star$} \] This is \emph{false} in general. Example: let $G=K_4$ with $W=\{\{1,2\},\{3,4\}\}$, two disjoint wrap edges forming a matching. The whole graph is one component, the total wrap count is $2$ (even), so~$(\star)$ predicts $\dim\Ker\Lsigned = 1$. The signed matrix has determinant $48$, so its kernel is zero; eigenvalue computation agrees. Thus $\dim \Ker\Lsigned = 0$, which is indeed~$\beta(K_4)=0$ from Theorem~\ref{thm:signed-kernel} (the two wrap edges together form a non-trivial cohomology class on~$K_4$). Equation~$(\star)$ is correct on $G=C_n$: there $\dim H^1(C_n;\ZZ/2)=1$, no edge is a bridge, and total wrap-count mod~$2$ detects the class. Beyond $C_n$, however, the correctness of $(\star)$ depends on $W$, not on the component alone. Precisely, $(\star)$ is correct on a component $C$ iff \[ \text{$C$ is balanced (Definition~\ref{def:balanced})}\;\Longleftrightarrow\; |W\cap E(C)| \text{ is even.} \] This characterises agreement component by component. On a disconnected graph the global identity~$(\star)$ can also hold by cancellation: it holds exactly when the number of balanced components with odd wrap count equals the number of unbalanced components with even wrap count. A useful \emph{sufficient} condition --- which is \emph{not} necessary --- is: $\dim H^1(C;\ZZ/2)\le 1$ (i.e., by the Euler relation $\dim H^1(C)=|E(C)|-|V(C)|+1$ on a connected component, $C$ is at most unicyclic) \emph{and} $C$ carries an even number of wrapped bridges. This condition is not necessary: on $K_4$ with a single wrapped triangle, $(\star)$ holds although $\dim H^1(K_4;\ZZ/2)=3$; with $W=\emptyset$ it holds trivially on every graph. Failure takes exactly two forms: an \emph{unbalanced} component with even total wrap ($K_4$ with a wrapped matching; two triangles sharing a vertex with one wrap in each), and a \emph{balanced} component with odd total wrap (a tree component with an odd number of wrapped bridges, e.g.\ $P_3$ with one wrapped edge --- where $\dim H^1=0$, so a small cohomology alone guarantees nothing). All six example computations above are reproduced by the independent implementation in \texttt{findings/round8}, written from the manuscript alone without consulting Lean sources. The counterexample and corrected formula are already present in the initial public commit (2026-04-22). That record establishes neither which tool first found the error nor a causal order between computation and formalisation. We have not identified a timestamped preregistration. Exact rational checks for both this matching and the different adjacent-edge example in the Lean comment are in \path{findings/round10/test_k4_counterexamples.py}. \end{remark} %============================================================= \section{The Cycle Spectrum}\label{sec:cycles} %============================================================= We close with an explicit diagonalisation in the case $G=C_n$, the $n$-cycle. Identify $V(C_n)=\ZZ/n$, with edges $\{i,i+1\pmod n\}$. Let $\mathbf{e}_k\in \CC^n$ be the Fourier basis vector $\mathbf{e}_k[j]= e^{2\pi i k j/n}$ for $k\in\ZZ/n$. Every circulant has this complex Fourier eigenbasis. For a \emph{real symmetric} circulant, the eigenvalues are real, so the nonzero vectors $\operatorname{Re}(\mathbf{e}_k)$ and $\operatorname{Im}(\mathbf{e}_k)$ are real eigenvectors. A real eigenbasis takes one sine--cosine pair for each $1\le k