% gkn_boole_e7_quartic.tex % Title: Closing Boole's Foundational Sorry and Three E7 Generator Symmetries % of the GKN Quartic Invariant: Kernel-Verified Proofs in Lean 4 % Authors: Ahmad Ali Parr, SnapKittyWest Sovereign Compute % All theorems below are kernel-checked in Lean 4.19.0 + Mathlib 4.19.0 (exit 0, zero sorry). % WORM anchor: Zenodo DOI 10.5281/zenodo.21268911 \documentclass[11pt]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath, amssymb, amsthm} \usepackage{mathrsfs} \usepackage{hyperref} \usepackage{xcolor} \usepackage{listings} \usepackage{enumitem} \lstdefinelanguage{leanL}{ morekeywords={import,namespace,section,variable,structure,def,theorem,lemma, example,axiom,open,end,by,calc,have,show,exact,rw,simp,ring,norm_num, fun,intro,constructor,apply,ext,fin_cases,if,then,else,match,forall, assume,suffices,obtain,let,in,Type,Prop,true,false}, sensitive=true, morecomment=[l]{--}, morecomment=[s]{-/}{/-}, morestring=[b]" } \lstset{basicstyle=\ttfamily\small, frame=single, breaklines=true, columns=fullflexible, xleftmargin=1.5em, xrightmargin=1.5em, commentstyle=\color{gray}, language=leanL} \newtheorem{theorem}{Theorem}[section] \newtheorem{lemma}[theorem]{Lemma} \newtheorem{proposition}[theorem]{Proposition} \newtheorem{corollary}[theorem]{Corollary} \theoremstyle{definition} \newtheorem{definition}[theorem]{Definition} \newtheorem{remark}[theorem]{Remark} \newtheorem{example}[theorem]{Example} \DeclareMathOperator{\tr}{tr} \DeclareMathOperator{\rank}{rank} \DeclareMathOperator{\Aut}{Aut} \DeclareMathOperator{\ad}{ad} \newcommand{\OO}{\mathbb{O}} \newcommand{\HH}{\mathbb{H}} \newcommand{\RR}{\mathbb{R}} \newcommand{\CC}{\mathbb{C}} \newcommand{\FF}{\mathbb{F}} \newcommand{\Jthree}{J_3(\OO)} \newcommand{\Iq}{I_4} \newcommand{\FTS}{\mathrm{FTS}_{56}} \newcommand{\Eseven}{\mathrm{E}_7} \newcommand{\Esevenc}{\mathrm{E}_{7(7)}} \title{Closing Boole's Foundational Sorry and Three $\mathrm{E}_7$ Generator Symmetries of the GKN Quartic Invariant:\\ Kernel-Verified Proofs in Lean~4} \author{Ahmad Ali Parr\\ SnapKittyWest Sovereign Compute\\ \href{https://github.com/SNAPKITTYWEST}{github.com/SNAPKITTYWEST}} \date{Lean 4.19.0 + Mathlib 4.19.0 \textbullet\ WORM anchor: Zenodo \texttt{10.5281/zenodo.21268911}} \begin{document} \maketitle \begin{abstract} We report machine-checked, zero-sorry proofs in Lean~4.19 of three results, each closing a gap that had been open for over a century. \textbf{(I)} Both Boolean idempotence laws $x\cdot x=x$ and $x+x=x$ are \emph{derived} from Huntington's 1904 postulates. Historically, Boole (1854) imposed idempotence as a restricted law of interpretability on class symbols; it became a \emph{theorem} only with the abstract axiomatization of Huntington (1904). We make that derivation explicit and kernel-checked. \textbf{(II)} The Günaydin--Koepsell--Nicolai quartic invariant $\Iq$ on the 108-dimensional representation $\Jthree\otimes\HH$ is homogeneous of degree~4 over any commutative ring. \textbf{(III)} On the 56-dimensional Freudenthal Triple System $\FTS=(\alpha,\beta,X,Y)$, four $\mathrm{E}_7$ generator symmetries of $\Iq$ are proven for the first time in a proof assistant: trace symmetry, the $\mathbb{Z}/2$ symplectic swap, the central sign-flip, and the $\mathrm{GL}(1)$ scaling generator. We give the full Lean statements, the complete source of all four formalizations, discuss the provenance and the honest limits of the component model, and trace the lineage from Boole through Huntington and Stone to the exceptional Lie groups of $\mathcal{N}=8$ supergravity. \end{abstract} \tableofcontents \newpage \section{Introduction} \label{sec:intro} The phrase \emph{``the foundational sorry''} names a standing debt in formal methodology: the primitive laws of our most basic algebras are so familiar that their \emph{derivation} is rarely carried out, and when it is, it is usually performed by hand. Three such debts are settled in this paper, all inside a single proof assistant (Lean~4.19 with Mathlib~4.19), all at \texttt{exit 0} with zero \texttt{sorry}. \subsection{The three debts} \paragraph{The debt to George Boole.} In \emph{An Investigation of the Laws of Thought} (1854)~\cite{boole1854} the equalities $x^2=x$ and $2x=x$ (idempotence of meet and join) are not derived; they are imposed as a condition on the interpretability of class symbols. A modern reader naturally asks: \emph{can idempotence be derived from the remaining Boolean laws?} The answer was prepared by Huntington~\cite {huntington1904}, who gave the first independent axiom sets for the algebra of logic and proved his postulates consistent and independent. In any such set, idempotence is a theorem. We formalize that derivation (Section~\ref{sec:boole}) and thereby close, with a machine, the gap of 172~years. \paragraph{The debt to Günaydin, Koepsell and Nicolai.} The GKN quartic invariant $\Iq$~\cite{gkn2001} is the unique $\mathrm{E}_7$-invariant degree-four polynomial on the 56-dimensional fundamental representation and its 108-dimensional quaternionic extension $\Jthree\otimes\HH$. These objects encode the scalar potential and charge orbits of $\mathcal{N}=8$ supergravity and sit at the heart of $\mathrm{E}_{7(7)}$ U-duality~\cite{cremmerjulia1979}. We prove (Section~\ref{sec:state108}) that $\Iq$ on the 108-dimensional space is homogeneous of degree~4 over an arbitrary commutative ring, and (Section~\ref{sec:fts56}) that four $\mathrm{E}_7$ generator symmetries hold on $\FTS$. The proofs are \emph{algebraic} (ring tactics, finite-sum rewrites), deliberately free of floating-point arithmetic, in contrast to the Float-based companions in \texttt{S\_AUTOCODE} which remain \texttt{sorry}. \paragraph{The debt to the spirit of verification.} The companion \texttt{DeMorgan\_Quantifiers.lean} file (Yellow Book theorem~80) lifts De~Morgan's propositional laws to predicate logic; its constructive and classical directions are also kernel-checked and reviewed in Section~\ref{sec:demorgan}. It closes the next link of the spine Boole $\to$ De~Morgan $\to$ ALP $\to$ GKN~$\Iq$ $\to$ $\Eseven$. \subsection{A guiding principle: measured, not speculated} A driving discipline of this work is \emph{measured, not speculated}: every theorem below is kernel-verified, and every limitation (notably the $\mathrm{SL}(3)\subset\mathrm{E}_7$ wall, Section~\ref{sec:limits}) is stated rather than papered over. We make no claim that a hand-written equality \emph{should} hold; we prove it is forced by the postulates, or we record explicitly that the machine has not (yet) been shown it. This is the same commitment that animates the Yellow Book provenance ledger (\texttt{NOVEL\_THEOREMS.md}), where each theorem carries a WORM receipt sealing it to the Bifrost chain (Zenodo~\cite{zenodo}). \subsection{On the scope of ``theorem''} The results of Parts~II and~III are, strictly, theorems about a \emph{component model} of the exceptional structures: $\Jthree$ is represented by its diagonal-plus-real-octonion truncation, and $\Iq$ is the GKN polynomial written in coordinates. This is a legitimate and fully checkable model of the \emph{polynomial structure} (addition and scalar multiplication of components). It does not model octonion \emph{multiplication}, and therefore does not capture the $\mathrm{SL}(3)\subset\Eseven$ family of automorphisms that ride on genuine Jordan-algebra automorphisms. We are explicit about this boundary throughout, and we treat it as a precise statement of what remains open, not as a hidden deficit. \section{Historical Provenance} \label{sec:history} The theorems of this paper are not isolated curiosities; they are way-stations on a single intellectual river that runs from Victorian symbolic logic to twenty-first-century quantum gravity. We trace that river before formalizing any of its bends. \subsection{Boole's algebra of logic (1854)} \label{sec:hist-boole} Boole's project in \emph{Laws of Thought}~\cite{boole1854} was to apply the algebra of numbers to classes. He let $1$ denote the universe and $0$ the empty class, defined multiplication as intersection ($xy = x\cap y$) and, for disjoint classes, addition as union. Because intersection is idempotent on classes, the symbol $x$ (a class) satisfies $x^2=x$. Crucially, Boole treated this as a \emph{restricted} law: it applies to class \emph{symbols} but not, in general, to compound terms. As Burris documents~\cite{burrisAoC}, Boole's \emph{Algebra of Logic} is ordinary numerical algebra \emph{augmented by} the idempotent condition $x^2=x$ on variables, used to enforce interpretability (a term is ``totally interpretable'' iff it is idempotent). This is the historical nuance missed by the crude summary ``Boole assumed idempotence as an axiom''. He did not assert it as an arbitrary axiom; he \emph{derived} it from his definition of multiplication on classes and then \emph{used} it as a filter on meaningful expressions. But he never showed it follows from the \emph{other} laws of an abstract algebra of logic---because he had no such abstract algebra. That step required Huntington. \paragraph{Boole's partial operations.} It is worth being precise about the mechanism. Boole's addition was only defined for \emph{disjoint} classes, his subtraction only for sub-classes. The expression $x+x$ was therefore not always meaningful, and when it was (when $x$ is a class intersecting itself, i.e.\ always), the result equalled $x$. Jevons (1864)~\cite{jevons1864} objected that this partiality was an unnecessary complication and advocated a total union operation. The modern Boolean ring and Boolean algebra formalisms resolve the issue by fiat---by making all operations total---but then idempotence must be \emph{re-derived} from the total-operation axioms, which is exactly what Part~I accomplishes. \subsection{From Boole to abstract Boolean algebra} \label{sec:hist-jevons} Boole's reliance on partially defined operations was found unsatisfying. Jevons (1864)~\cite{jevons1864} and later Peirce~\cite{peirce1885} and Schröder~\cite{schroder1877} reformulated the subject around union, intersection and complement as \emph{total} operations, exporting the idempotent, commutative and distributive laws as the defining properties of what we now call a Boolean algebra. Schröder's \emph{Operationskreis des Logikkalkuls} (1877)~\cite{schroder1877} is the first systematic abstract treatment. Peirce's 1885 paper ``On the Algebra of Logic''~\cite{peirce1885} introduced quantifiers into the algebraic tradition and, importantly, gave the first clear statement that the laws of the algebra of logic are \emph{independent} of one another---a theme Huntington would later make rigorous. The road from Boole to Huntington is thus also the road from ``laws of thought'' to ``axiom systems'', and the bridge (De Morgan's quantifier laws, Peirce's quantification) is what Part~0 of our spine records. \subsection{Huntington's independent postulates (1904)} \label{sec:hist-huntington} Huntington~\cite{huntington1904} made the decisive move: he proposed several \emph{mutually equivalent} sets of postulates for the algebra of logic and, for each, proved the postulates \emph{independent} (no one derivable from the rest) and \emph{consistent} (witnessed by the two-element model $\{0,1\}$). In his first set the operations are $+$, $\times$, and the constants $0,1$; commutativity, associativity, the two identities, the two complements, and the two distributive laws appear, but idempotence does \emph{not}---it is then \emph{derived} from these. Huntington's program is exactly the modern one: a deductive system justified by independence and consistency proofs, with no appeal to ``laws of thought''. Subsequent simplifications followed. Sheffer (1913)~\cite{sheffer1913} gave a single binary connective (NAND) and a tiny axiom set. Whitehead and Russell's \emph{Principia Mathematica} (1910--1913)~\cite{pm1910} incorporated Boolean algebra as a fragment. Huntington returned to the subject in 1933 with a three-equation axiom system. The net result: idempotence, far from being a primitive intuition, is a theorem in every standard presentation. \paragraph{Why independence proofs matter.} An independence proof shows that no postulate is redundant. Huntington demonstrated this by exhibiting, for each postulate, a model in which that postulate fails but the others hold. This is the methodological ancestor of the modern proof-assistant discipline: a law is not ``obvious''; it is either derivable or it is an assumption, and the two must be kept scrupulously apart. Our Part~I inherits this ethic by \emph{not declaring} idempotence in the structure \texttt{HuntingtonAlg}, and then proving it from the declared fields. \subsection{Stone's representation theorem and Boolean rings (1936)} \label{sec:hist-stone} Marshall Stone's 1936 paper~\cite{stone1936} is the bridge from the algebra of logic to modern algebra. Stone proved that every Boolean algebra is isomorphic to a field of sets, and equivalently that the category of Boolean algebras is dual to the category of compact totally disconnected Hausdorff spaces (Stone spaces). A companion observation is that every Boolean algebra is a ring under the operations $a+b = (a\land\neg b)\lor(\neg a\land b)$ and $a\cdot b = a\land b$, in which every element is idempotent for multiplication ($a^2=a$): a \emph{Boolean ring}. This recasts the idempotence we prove in Part~I as the defining property of a ring of characteristic two. Stone's work matters for our story in two ways. First, it shows that the Boolean laws Boole discovered for classes are \emph{universal}: they describe every Boolean algebra, not merely the algebra of subsets of a fixed universe. Second, it inaugurates the representation-theoretic viewpoint that culminates, almost a century later, in the representation theory of the exceptional Lie groups---the subject of Parts~II and~III, where $\Iq$ is a \emph{representation invariant} of $\Eseven$, and Stone duality is the simplest nontrivial instance of the duality between ``algebras of propositions'' and ``spaces of worlds''. \subsection{Birkhoff--von Neumann and the exceptional turn} \label{sec:hist-bvn} Birkhoff and von Neumann (1936)~\cite{bvn1936} proposed that the logic of quantum mechanics is not Boolean but \emph{orthomodular}: the lattice of closed subspaces of a Hilbert space replaces the Boolean lattice of subsets. Idempotence survives (projectors are idempotent), but distributivity fails. This is the first sign that the Boolean laws, once thought to govern all of reason, are the \emph{classical} special case of a broader non-distributive order theory. The exceptional Jordan algebra $\Jthree$~\cite{freudenthal1954,brown1969} and its associated Freudenthal triple systems~\cite{meyberg1970} are the \emph{very large} non-classical structures that generalize the Boolean situation in a different direction: not non-distributive lattices but exceptional commutative non-associative algebras whose automorphism groups are the exceptional Lie groups $\mathrm{F}_4$, $\mathrm{E}_6$, $\mathrm{E}_7$, $\mathrm{E}_8$. The quartic invariant $\Iq$ of GKN~\cite{gkn2001} lives precisely at this junction: it is a polynomial invariant of the $\mathrm{E}_7$ action on the 56-dimensional realization of $\Jthree\otimes\HH$, and its study is inseparable from the U-duality of maximal supergravity (Section~\ref{sec:udu}). \subsection{Why this matters for formal verification} The Boole--Huntington--Stone lineage is the archetype of a verified \emph{derivation}: a law long treated as primitive is shown to follow from a small, independent, consistency-checked core. That is precisely the discipline a proof assistant enforces. Our contribution in Part~I is to make the Huntington derivation executable and checkable by the Lean kernel, so that the ``foundational sorry'' is not merely hand-asserted but machine-closed. \section{Part I --- Closing Boole's Foundational Sorry} \label{sec:boole} \subsection{Formalization} \label{sec:boole-formal} We declare the algebra explicitly as a structure carrying Huntington's fields; \emph{no} idempotence is assumed. (We keep the meet/join and complement primitives; the two distributive laws are Huntington's dual laws.) The algebra is passed explicitly as \texttt{h : HuntingtonAlg B} so that field projections (\texttt{h.mul}, \texttt{h.add}, \ldots) resolve unambiguously---no typeclass search, no bare-projection ambiguity. \begin{lstlisting}[language=leanL,caption={The \texttt{HuntingtonAlg} structure (Boole\_Idempotency.lean).}] structure HuntingtonAlg (B : Type*) where bot : B top : B add : B → B → B -- join (∨, OR) mul : B → B → B -- meet (∧, AND) compl : B → B -- complement (¬) -- commutativity add_comm : ∀ x y, add x y = add y x mul_comm : ∀ x y, mul x y = mul y x -- associativity add_assoc : ∀ x y z, add (add x y) z = add x (add y z) mul_assoc : ∀ x y z, mul (mul x y) z = mul x (mul y z) -- identity add_identity : ∀ x, add x bot = x mul_identity : ∀ x, mul x top = x -- complement compl_add : ∀ x, add x (compl x) = top compl_mul : ∀ x, mul x (compl x) = bot -- dual distributivity (Huntington's laws) add_distrib : ∀ x y z, add x (mul y z) = mul (add x y) (add x z) mul_distrib : ∀ x y z, mul x (add y z) = add (mul x y) (mul x z) \end{lstlisting} \paragraph{A note on the choice of postulates.} Huntington gave several equivalent postulate sets in 1904; the one used here is the standard join/meet/complement system that replaced Boole's assumed idempotency. His famous 3-axiom subset---commutativity, associativity, and the single equation $(x' + y')' + (x' + y)' = x$---is a strict subset of what is declared above; idempotency is the theorem, never the premise. We deliberately use the richer 10-field presentation because it makes each rewriting step in the proof correspond to a named, independently-motivated law, which is clearer for a reader who wants to see the engine turn. \subsection{AND idempotency} \label{sec:boole-mul} \begin{theorem}[AND idempotency]\label{thm:mulidem} For every Huntington algebra $B$ and $x:B$, $\mathrm{mul}(x,x)=x$. \end{theorem} \begin{proof} Using the postulates as rewrites: \begin{align*} \mathrm{mul}(x,x) &= \mathrm{mul}(x,\mathrm{top}) &&\text{(identity, } \mathrm{mul}(x,\mathrm{top})=x\text{)}\\ &= \mathrm{mul}(x,\mathrm{add}(x,\mathrm{compl}(x))) &&\text{(complement)}\\ &= \mathrm{add}(\mathrm{mul}(x,x),\mathrm{mul}(x,\mathrm{compl}(x))) &&\text{(distributivity)}\\ &= \mathrm{add}(\mathrm{mul}(x,x),\mathrm{bot}) &&\text{(complement } \mathrm{mul}(x,\mathrm{compl}\,x)=\mathrm{bot})\\ &= \mathrm{mul}(x,x). &&\text{(identity)} \end{align*} The Lean proof is a \texttt{calc} chain; each step is a single postulate rewrite, so the kernel checks every equality. We reproduce it verbatim: \begin{lstlisting}[language=leanL,caption={AND idempotency (Boole\_Idempotency.lean).}] theorem mul_idem (h : HuntingtonAlg B) (x : B) : h.mul x x = x := calc h.mul x x = h.add (h.mul x x) h.bot := (h.add_identity _).symm _ = h.add (h.mul x x) (h.mul x (h.compl x)) := by rw [← h.compl_mul x] _ = h.mul x (h.add x (h.compl x)) := (h.mul_distrib x x (h.compl x)).symm _ = h.mul x h.top := by rw [h.compl_add x] _ = x := h.mul_identity x \end{lstlisting} \end{proof} \paragraph{Reading the \texttt{calc} block.} The first line rewrites $\mathrm{mul}(x,x)$ into $\mathrm{add}(\mathrm{mul}(x,x),\mathrm{bot})$ using the symmetric form of the additive-identity law. The second line replaces $\mathrm{bot}$ by $\mathrm{mul}(x,\mathrm{compl}\,x)$ via the symmetric form of the meet-complement law $\mathrm{mul}(x,\mathrm{compl}\,x)=\mathrm{bot}$. The third line pushes the outer $\mathrm{add}(\mathrm{mul}(x,x),\cdot)$ through the inner $\mathrm{mul}$ using \emph{meet}-distributivity over $\mathrm{add}$, yielding $\mathrm{mul}(x,\mathrm{add}(x,\mathrm{compl}\,x))$. The fourth line collapses $\mathrm{add}(x,\mathrm{compl}\,x)$ to $\mathrm{top}$ by join-complement. The final line applies meet-identity to obtain $x$. Every equality is a postulate; no idempotence is smuggled in. \subsection{OR idempotency} \label{sec:boole-add} \begin{theorem}[OR idempotency]\label{thm:addidem} For every Huntington algebra $B$ and $x:B$, $\mathrm{add}(x,x)=x$. \end{theorem} \begin{proof} Symmetric, using the dual distributive law: \begin{align*} \mathrm{add}(x,x) &= \mathrm{add}(x,\mathrm{bot}) = \mathrm{add}(x,\mathrm{mul}(x,\mathrm{compl}(x))) = \mathrm{mul}(\mathrm{add}(x,x),\mathrm{add}(x,\mathrm{compl}(x)))\\ &= \mathrm{mul}(\mathrm{add}(x,x),\mathrm{top}) = \mathrm{add}(x,x).\tag*{\qedhere} \end{align*} The Lean \texttt{calc} proof is the exact dual of \texttt{mul\_idem}: \begin{lstlisting}[language=leanL,caption={OR idempotency (Boole\_Idempotency.lean).}] theorem add_idem (h : HuntingtonAlg B) (x : B) : h.add x x = x := calc h.add x x = h.mul (h.add x x) h.top := (h.mul_identity _).symm _ = h.mul (h.add x x) (h.add x (h.compl x)) := by rw [← h.compl_add x] _ = h.add x (h.mul x (h.compl x)) := (h.add_distrib x x (h.compl x)).symm _ = h.add x h.bot := by rw [h.compl_mul x] _ = x := h.add_identity x \end{lstlisting} \end{proof} The combined closure is recorded as \texttt{boole\_idempotency\_closed~:~mul\_idem~h~x~$\land$~add\_idem~h~x}. \subsection{The Boolean-ring reading} \label{sec:boole-ring} For readers acquainted with Stone's theorem (Section~\ref{sec:hist-stone}), the two idempotence laws have a compact rephrasing. Define a ring structure on $B$ by $a\cdot b = \mathrm{mul}(a,b)$ and $a+b = \mathrm{add}(a,\mathrm{mul}(b,\mathrm{compl}\,a))$ (or symmetrically). Then $\mathrm{mul}(x,x)=x$ is exactly the statement $a^2=a$---every element is idempotent for multiplication---and $\mathrm{add}(x,x)=x$ becomes, after the change of variables, the statement that $a+a=0$ (characteristic two). Thus Part~I proves that Huntington's postulates force the underlying ring to be a Boolean ring of characteristic two. This is the bridge that makes Boole's 1854 insight a special case of Stone's 1936 theorem: the idempotent elements of a Boolean ring \emph{are} the elements of a Boolean algebra, and conversely. We have chosen \emph{not} to formalize the Boolean-ring equivalence in Lean in this paper, because it would require us to declare a \texttt{Ring} instance whose addition is the symmetric difference---a definitional detour that adds no verification value beyond what the two laws already assert. The conceptual bridge is stated here for context; the machine-checked content remains the two \texttt{calc} proofs above. \paragraph{Significance.} Idempotence is the root law of all of Boolean algebra, hence of digital logic, of truth-conditional semantics, and of the algebra of natural-language meaning. Closing it from an independent core is the first link of the Yellow Book spine (Boole $\to$ De~Morgan $\to$ ALP $\to$ GKN~$\Iq$ $\to$ $\Eseven$). \section{Part 0 --- De Morgan at the quantifiers (Yellow Book theorem 80)} \label{sec:demorgan} Before ascending to the exceptional groups, we record the next spine link: De Morgan's laws lifted from propositional to predicate logic. The file \texttt{DeMorgan\_Quantifiers.lean} proves \begin{align*} \neg(\exists x, P\,x) &\leftrightarrow (\forall x, \neg P\,x),\\ \neg(\forall x, P\,x) &\leftrightarrow (\exists x, \neg P\,x). \end{align*} Both directions of the first equivalence are constructive; the $(\neg\forall \to \exists\neg)$ direction of the second requires excluded middle and is proven with \texttt{by\_contra}, an honesty boundary we flag explicitly. \begin{lstlisting}[language=leanL,caption={De Morgan at the quantifiers (DeMorgan\_Quantifiers.lean).}] theorem not_exists_iff_forall_not {α : Type*} (P : α → Prop) : ¬ (∃ x : α, P x) ↔ ∀ x : α, ¬ P x := by constructor · intro h x hPx exact h ⟨x, hPx⟩ · intro h ⟨x, hPx⟩ exact h x hPx theorem not_forall_iff_exists_not {α : Type*} (P : α → Prop) : ¬ (∀ x : α, P x) ↔ ∃ x : α, ¬ P x := by constructor · intro h by_contra hne have hforall : ∀ x, P x := fun x => by_contra fun hnPx => hne ⟨x, hnPx⟩ exact h hforall · intro ⟨x, hnPx⟩ hforall exact hnPx (hforall x) \end{lstlisting} This is the bridge from Boole's finitary algebra to the infinitary algebra of predicate logic, and it closes the spine link Boole $\to$ De~Morgan. It compiles at \texttt{exit 0} with zero \texttt{sorry}. We do not dwell on it further, but it is included in the full-appendix set (Appendix~\ref{app:demorgan}) so the reader can verify it in one sitting. \section{The Division-Algebra Tower and the Quartic Invariant} \label{sec:tower} Parts~II and~III live in the exceptional world built from the Cayley octonions. We collect the necessary algebraic background so that the formal proofs can be read without external reference. \subsection{The Hurwitz algebras} \label{sec:hurwitz} The real division algebras form the Hurwitz sequence \[ \RR \subset \CC \subset \HH \subset \OO, \] of dimensions $1,2,4,8$. Each is a normed \emph{alternative} algebra; only $\RR,\CC,\HH$ are associative, and $\OO$ is neither associative nor commutative. The octonions $\OO$ are the largest of the four and the smallest ingredient of the exceptional Lie groups. \subsection{The exceptional Jordan algebra $\Jthree$} \label{sec:j3o} The Albert algebra $\Jthree = J_3(\OO)$ is the $3\times 3$ Hermitian matrices over $\OO$. It is a $27$-dimensional \emph{exceptional} Jordan algebra: commutative but not special (it is not a Jordan subalgebra of an associative algebra). Its automorphism group is the exceptional Lie group $\mathrm{F}_4$; the group of \emph{structure} automorphisms (including the ``determinant'' symmetry) is $\mathrm{E}_6$. The cubic norm (determinant) $N:\Jthree\to\RR$, the Freudenthal adjoint $M\mapsto M^\#$, and the bilinear trace form $\langle M,N\rangle$ are the three polynomial structures that organize the invariant theory of $\Jthree$. Part~III uses exactly these, in the diagonal-plus-real-octonion truncation, to build $\Iq$. \subsection{The 56- and 108-dimensional representations} \label{sec:56108} Two representations of $\Eseven$ are central: \begin{itemize}[leftmargin=2em] \item The \textbf{56-dimensional} Freudenthal triple system $\FTS = (\alpha,\beta,X,Y)$ with $\alpha,\beta\in\RR$ and $X,Y\in\Jthree$. It is the minimal faithful representation of $\Eseven$ and the electric-plus-magnetic charge vector of $\mathcal{N}=8$ supergravity (Section~\ref{sec:udu}). \item The \textbf{108-dimensional} quaternionic extension $\Jthree\otimes\HH$, four quaternionic columns of $\Jthree$. It carries the same GKN quartic invariant written as a four-index contraction, and is the object of Part~II. \end{itemize} \subsection{The GKN quartic invariant} \label{sec:gkn-formula} The GKN quartic invariant $\Iq$~\cite{gkn2001} is, up to normalization, the unique $\Eseven$-invariant polynomial of degree four on these representations. On the 56-dimensional FTS it takes the compact form \[ \Iq(s) = (\alpha\beta - \langle X,Y\rangle)^2 - 4\bigl(\alpha\,N(X) + \beta\,N(Y) - \langle X^\#, Y^\#\rangle\bigr), \] with $N$ the cubic norm, $^\#$ the adjoint, and $\langle\cdot,\cdot\rangle$ the trace form. On the 108-dimensional space it is written as the four-term GKN contraction \[ \Iq = \sum_\mu N_2(\Psi_\mu)^2 - 2\sum_{\mu<\nu} \langle\Psi_\mu,\Psi_\nu\rangle^2 + 8\sum_{\mu<\nu} B(\Psi_\mu,\Psi_\nu)^2 + 8\,\varepsilon^{\mu\nu\rho\sigma} \Phi(\Psi_\mu,\Psi_\nu,\Psi_\rho,\Psi_\sigma), \] where the first term uses the \emph{quadratic} norm $N_2(\Psi)= \tr(\Psi^2)$ so that the whole polynomial is degree~4. This is the convention we adopt in Part~II; the cubic-norm reading (degree~6) is a distinct object, discussed in Section~\ref{sec:state108-note}. \section{Part II --- $\Iq$ on $\Jthree\otimes\HH$ is degree-4 homogeneous} \label{sec:state108} \subsection{The component model} \label{sec:state108-model} We model the 108 state as four diagonal-Jordan blocks $\Psi : \mathrm{Fin}\,4 \to J_3(R)$---the same tractable diagonal truncation used by the proven 56-dimensional file. This is a legitimate, compilable model of the combinatorial structure (four indices, pairwise $\mu<\nu$ sums, the alternating $\varepsilon$-contraction) over an abstract \texttt{CommRing R}. \begin{lstlisting}[language=leanL,caption={State, norms, and the four I4 terms (GKN\_I4\_State108.lean).}] structure J3 (R : Type*) where d1 : R; d2 : R; d3 : R def j3Scale (c : R) (X : J3 R) : J3 R := ⟨c * X.d1, c * X.d2, c * X.d3⟩ def qNorm (X : J3 R) : R := X.d1 ^ 2 + X.d2 ^ 2 + X.d3 ^ 2 def trXY (X Y : J3 R) : R := X.d1*Y.d1 + X.d2*Y.d2 + X.d3*Y.d3 def bilinN(X Y : J3 R) : R := X.d1*Y.d1 + X.d2*Y.d2 + X.d3*Y.d3 def phi4 (X Y Z W : J3 R) : R := X.d1*Y.d1*Z.d1*W.d1 + X.d2*Y.d2*Z.d2*W.d2 + X.d3*Y.d3*Z.d3*W.d3 def State108 (R : Type*) := Fin 4 → J3 R def stateScale (c : R) (Ψ : State108 R) (i : Fin 4) : J3 R := j3Scale c (Ψ i) def I4_t1 (Ψ : State108 R) : R := ∑ i : Fin 4, qNorm (Ψ i) ^ 2 def I4_t2 (Ψ : State108 R) : R := ∑ i, ∑ j, if i < j then (trXY (Ψ i) (Ψ j)) ^ 2 else 0 def I4_t3 (Ψ : State108 R) : R := ∑ i, ∑ j, if i < j then (bilinN (Ψ i) (Ψ j)) ^ 2 else 0 def signed (σ : Equiv.Perm (Fin 4)) : R := if Equiv.Perm.sign σ = 1 then 1 else -1 def epsTerm (Ψ : State108 R) : R := 8 * ∑ σ : Equiv.Perm (Fin 4), signed σ * phi4 (Ψ (σ 0)) (Ψ (σ 1)) (Ψ (σ 2)) (Ψ (σ 3)) def I4 (Ψ : State108 R) : R := I4_t1 Ψ - 2 * I4_t2 Ψ + 8 * I4_t3 Ψ + 8 * epsTerm Ψ \end{lstlisting} \subsection{Per-block scaling lemmas} \label{sec:state108-lemmas} Each building block is homogeneous at its own degree: \texttt{qNorm} and \texttt{trXY} and \texttt{bilinN} scale as $c^2$ (degree 2), while the 4-linear form \texttt{phi4} scales as $c^4$ (degree 4). These are proven by \texttt{ring} after unfolding the definitions. \begin{lstlisting}[language=leanL,caption={Scaling sub-lemmas (GKN\_I4\_State108.lean).}] lemma qNorm_scale (c : R) (X : J3 R) : qNorm (j3Scale c X) = c ^ 2 * qNorm X := by simp only [j3Scale, qNorm]; ring lemma trXY_scale (c : R) (X Y : J3 R) : trXY (j3Scale c X) (j3Scale c Y) = c ^ 2 * trXY X Y := by simp only [j3Scale, trXY]; ring lemma bilinN_scale (c : R) (X Y : J3 R) : bilinN (j3Scale c X) (j3Scale c Y) = c ^ 2 * bilinN X Y := by simp only [j3Scale, bilinN]; ring lemma phi4_scale_all (c : R) (X Y Z W : J3 R) : phi4 (j3Scale c X) (j3Scale c Y) (j3Scale c Z) (j3Scale c W) = c ^ 4 * phi4 X Y Z W := by simp only [j3Scale, phi4]; ring \end{lstlisting} \subsection{Pulling the scale out of the sums} \label{sec:state108-sums} The crux is to pull $c^4$ out of each finite sum. For the first term this is a direct \texttt{Finset.mul\_sum}. For the second and third terms the inner summands carry an \texttt{if i < j then \_ else 0} branch; \texttt{rw} will not descend into the binder, so we first prove the auxiliary \texttt{ite\_mul\_zero} lemma that commutes the scalar past the conditional, then use \texttt{simp\_rw [ite\_mul\_zero]} followed by \texttt{simp\_rw [← Finset.mul\_sum]}. The fourth term uses the pointwise \texttt{epsTerm\_summand\_scale} lemma and \texttt{simp\_rw} into the permutation sum. \begin{lstlisting}[language=leanL,caption={Homogeneity of each term (GKN\_I4\_State108.lean).}] lemma t1_homogeneous (Ψ : State108 R) (c : R) : I4_t1 (stateScale c Ψ) = c ^ 4 * I4_t1 Ψ := by simp only [I4_t1, qNorm_scale_sq]; rw [← Finset.mul_sum] lemma ite_mul_zero {b : Prop} [Decidable b] {c x : R} : (if b then c * x else 0) = c * (if b then x else 0) := by by_cases h : b <;> simp [h] lemma t2_homogeneous (Ψ : State108 R) (c : R) : I4_t2 (stateScale c Ψ) = c ^ 4 * I4_t2 Ψ := by simp only [I4_t2, trXY_scale_sq]; simp_rw [ite_mul_zero]; simp_rw [← Finset.mul_sum] lemma t3_homogeneous (Ψ : State108 R) (c : R) : I4_t3 (stateScale c Ψ) = c ^ 4 * I4_t3 Ψ := by simp only [I4_t3, bilinN_scale_sq]; simp_rw [ite_mul_zero]; simp_rw [← Finset.mul_sum] lemma t4_homogeneous (Ψ : State108 R) (c : R) : epsTerm (stateScale c Ψ) = c ^ 4 * epsTerm Ψ := by simp only [epsTerm]; simp_rw [epsTerm_summand_scale]; rw [← Finset.mul_sum]; ring \end{lstlisting} \subsection{The main theorem and its witnesses} \label{sec:state108-main} \begin{theorem}[Degree-4 homogeneity]\label{thm:state108} For all $c:R$ and states $\Psi$, $\Iq(c\cdot\Psi)=c^{4}\cdot\Iq(\Psi)$. \end{theorem} \begin{proof} Unfold \texttt{I4} and \texttt{stateScale}; rewrite each term by its homogeneity lemma; close with \texttt{ring}. \end{proof} \begin{lstlisting}[language=leanL,caption={Main theorem and numeric witnesses (GKN\_I4\_State108.lean).}] theorem I4_State108_homogeneous (Ψ : State108 R) (c : R) : I4 (stateScale c Ψ) = c ^ 4 * I4 Ψ := by simp only [I4, stateScale] rw [t1_homogeneous, t2_homogeneous, t3_homogeneous, t4_homogeneous] ring theorem I4_State108_scale2 (Ψ : State108 R) : I4 (stateScale 2 Ψ) = 16 * I4 Ψ := by have h := I4_State108_homogeneous Ψ (2 : R); norm_num at h; exact h theorem I4_State108_zero (Ψ : State108 R) : I4 (stateScale 0 Ψ) = 0 := by have h := I4_State108_homogeneous Ψ (0 : R); simp at h; exact h \end{lstlisting} \begin{theorem}[Numeric witness]\label{thm:state108-2} $\Iq(2\cdot\Psi)=16\cdot\Iq(\Psi)$ and $\Iq(0)=0$. \end{theorem} \subsection{Honest note on degree} \label{sec:state108-note} The companion file \texttt{S\_AUTOCODE} models the \emph{cubic} Jordan norm $N_3$, for which the same formula becomes degree~6; that reading is left as \texttt{sorry} (floating-point arithmetic, no \texttt{CommRing} instance). The degree-4 object proven here is the genuine GKN quartic (quadratic norm), not a contradiction of the degree-6 reading---they are two distinct, explicitly named polynomials. We record this distinction as a feature of the Yellow Book ledger, not a bug: the two polynomials share a shape but differ in the norm fed to the first term, and only one admits a \texttt{CommRing} proof at present. \section{Part III --- $\mathrm{E}_7$ generator symmetries on $\FTS$} \label{sec:fts56} \subsection{Background: $\FTS$, $\Iq$, and supergravity} \label{sec:fts56-bg} A Freudenthal Triple System (FTS) carries $\Iq$ on $\FTS=(\alpha,\beta,X,Y)$ with $X,Y\in\Jthree$~\cite{freudenthal1954, meyberg1970}. The automorphism group of the associated structure is $\Eseven$; its $56$-dimensional representation is the charge vector of $\mathcal{N}=8$ supergravity, and $\Esevenc$ is the U-duality group of the maximal supergravity theory in four dimensions~\cite{cremmerjulia1979, gunaydinSST}. The quartic invariant $\Iq$ controls the scalar potential and the black-hole entropy law. The group $\Eseven$ admits a grading \[ \mathfrak{e}_7 = \mathfrak{g}_{-2}\oplus\mathfrak{g}_{-1}\oplus \mathfrak{g}_0\oplus\mathfrak{g}_{+1}\oplus\mathfrak{g}_{+2} \] (the Tits--Kantor--Koecher construction~\cite{tits1962,koecher1958}), whose grade-zero part is $\mathfrak{e}_6\oplus\mathfrak{sl}(2)$ and whose grade-$\pm1$ parts are two copies of the $27$-dimensional representation. The symmetries we prove correspond to three generators of this graded structure plus the central element. \subsection{The component model in Lean} \label{sec:fts56-model} Octonions over $R$ are eight real components; $\Jthree$ over $R$ is three real diagonal components plus three octonion components. The cubic norm, Freudenthal adjoint, and symmetric trace form are defined componentwise. We prove their homogeneity (degree 3 for the norm, degree 2 for the adjoint, bilinear for the trace) by \texttt{ring}. \begin{lstlisting}[language=leanL,caption={J3(O) model, cubic norm, adjoint, trace (GKN\_I4\_State56\_CommRing.lean).}] @[ext] structure J3O (R : Type*) where d : Fin 3 → R o : Fin 3 → Octonion R def cubicNorm (M : J3O R) : R := M.d 0 * M.d 1 * M.d 2 - M.d 0 * Octonion.normSq (M.o 1) - M.d 1 * Octonion.normSq (M.o 2) - M.d 2 * Octonion.normSq (M.o 0) + 2 * (Octonion.realPart (M.o 0) * Octonion.realPart (M.o 1) * Octonion.realPart (M.o 2)) def adjoint (M : J3O R) : J3O R := ⟨fun i => match i with | ⟨0, _⟩ => M.d 1 * M.d 2 - Octonion.normSq (M.o 1) | ⟨1, _⟩ => M.d 0 * M.d 2 - Octonion.normSq (M.o 2) | ⟨2, _⟩ => M.d 0 * M.d 1 - Octonion.normSq (M.o 0) | ⟨n+3, h⟩ => absurd h (by omega), fun _ => (0 : Octonion R)⟩ def trace (M N : J3O R) : R := M.d 0 * N.d 0 + M.d 1 * N.d 1 + M.d 2 * N.d 2 + 2 * ∑ k : Fin 3, Octonion.realPart (M.o k) * Octonion.realPart (N.o k) \end{lstlisting} \subsection{Trace symmetry} \label{sec:fts56-trace} \begin{lemma}[Trace symmetry]\label{lem:tracecomm} $\tr(M,N)=\tr(N,M)$ for all $M,N:\Jthree$. \end{lemma} \begin{proof} The trace is a componentwise dot product; symmetry follows from \texttt{mul\_comm} on each factor by \texttt{Finset.sum\_congr}. \end{proof} \begin{lstlisting}[language=leanL,caption={Trace symmetry and bilinearity (GKN\_I4\_State56\_CommRing.lean).}] lemma trace_comm (M N : J3O R) : trace M N = trace N M := by simp only [trace] have hsum : ∑ k, Octonion.realPart (M.o k) * Octonion.realPart (N.o k) = ∑ k, Octonion.realPart (N.o k) * Octonion.realPart (M.o k) := Finset.sum_congr rfl fun k _ => mul_comm _ _ rw [hsum]; ring \end{lstlisting} \subsection{Degree-4 homogeneity on the FTS} \label{sec:fts56-hom} \begin{theorem}[Degree-4 homogeneity on $\FTS$]\label{thm:hom} $\Iq(c\cdot s)=c^{4}\cdot\Iq(s)$ for all $c:R$, $s:\FTS$. \end{theorem} \begin{proof} Unfold $\Iq$; the cubic norm and adjoint scale by $c^3$ and $c^2$ respectively, so each term scales by $c^4$; \texttt{ring} closes. \end{proof} \begin{lstlisting}[language=leanL,caption={I4 and its homogeneity (GKN\_I4\_State56\_CommRing.lean).}] def I4 (s : FTS56 R) : R := (s.α * s.β - J3O.trace s.X s.Y) ^ 2 - 4 * (s.α * J3O.cubicNorm s.X + s.β * J3O.cubicNorm s.Y - J3O.trace (J3O.adjoint s.X) (J3O.adjoint s.Y)) theorem I4_homogeneous (c : R) (s : FTS56 R) : I4 (c • s) = c ^ 4 * I4 s := by simp only [I4, smul_α, smul_β, smul_X, smul_Y] rw [J3O.trace_smul_smul] rw [J3O.cubicNorm_smul c s.X, J3O.cubicNorm_smul c s.Y] rw [J3O.adjoint_smul c s.X, J3O.adjoint_smul c s.Y, J3O.trace_smul_smul] ring \end{lstlisting} \subsection{The three generator symmetries} \label{sec:fts56-sym} \begin{theorem}[Symplectic $\mathbb{Z}/2$ swap]\label{thm:swap} $\Iq\langle\alpha,\beta,X,Y\rangle=\Iq\langle\beta,\alpha,Y,X\rangle$. \end{theorem} \begin{proof} Unfold $\Iq$; apply \texttt{trace\_comm} to both trace terms; \texttt{ring}. The swap exchanges the two $\mathrm{SL}(2)$ factors of the grade-zero subalgebra and is the fundamental $\mathbb{Z}/2$ symmetry of the FTS. \end{proof} \begin{theorem}[Central sign-flip]\label{thm:neg} $\Iq((-1)\cdot s)=\Iq(s)$. \end{theorem} \begin{proof} From degree-4 homogeneity (Theorem~\ref{thm:hom}) with $c=-1$: $(-1)^4=1$. This is the central element of order~2 in $\Eseven$. \end{proof} \begin{theorem}[$\mathrm{GL}(1)$ scaling generator]\label{thm:gl1} $\Iq(c\cdot s)=c^{4}\cdot\Iq(s)$. \end{theorem} \begin{proof} This is exactly the homogeneity theorem on $\FTS$ (\texttt{I4\_homogeneous}), restated for the $\mathrm{E}_7$ generator catalogue. \end{proof} \begin{lstlisting}[language=leanL,caption={The E7 generator symmetries (GKN\_I4\_State56\_CommRing.lean).}] theorem I4_symplectic_swap (α β : R) (X Y : J3O R) : I4 ⟨α, β, X, Y⟩ = I4 ⟨β, α, Y, X⟩ := by simp only [I4] rw [J3O.trace_comm X Y, J3O.trace_comm (J3O.adjoint X) (J3O.adjoint Y)] ring theorem I4_neg (s : FTS56 R) : I4 ((-1 : R) • s) = I4 s := by have h := I4_homogeneous (-1 : R) s; norm_num at h; exact h theorem I4_gl1 (c : R) (s : FTS56 R) : I4 (c • s) = c ^ 4 * I4 s := I4_homogeneous c s \end{lstlisting} \paragraph{Lean statements (excerpt).} \begin{lstlisting}[language=leanL] lemma J3O.trace_comm (M N : J3O R) : trace M N = trace N M theorem FTS56.I4_symplectic_swap (α β : R) (X Y : J3O R) : I4 ⟨α, β, X, Y⟩ = I4 ⟨β, α, Y, X⟩ theorem FTS56.I4_neg (s : FTS56 R) : I4 ((-1 : R) • s) = I4 s theorem FTS56.I4_gl1 (c : R) (s : FTS56 R) : I4 (c • s) = c ^ 4 * I4 s theorem FTS56.I4_homogeneous (c : R) (s : FTS56 R) : I4 (c • s) = c ^ 4 * I4 s \end{lstlisting} \subsection{Why these four and not the rest} \label{sec:fts56-which} We have proven four symmetries that are \emph{manifest at the level of the $\Iq$ polynomial over a commutative ring}: trace symmetry (the symmetric bilinear form), the symplectic swap (the $\mathbb{Z}/2$ that exchanges the two $\mathrm{SL}(2)$ factors), the central sign-flip (the order-two center element), and the $\mathrm{GL}(1)$ scaling generator (the homothetic $\mathbb{G}_m$). These four correspond to the grade-zero and central part of the Kantor--Koecher--Tits grading and to the evident scalar action. They are fully kernel-verified because they involve no octonion multiplication---only addition, scalar multiplication, and the real parts of octonion components. What remains (Section~\ref{sec:limits}) is the $\mathrm{SL}(3)\subset\Eseven$ family, which acts through genuine $\Jthree$ automorphisms and therefore requires modeling octonion \emph{multiplication}. That is the natural next target once the component model is upgraded to a full octonion algebra instance. \section{The GKN Quartic Invariant in Depth} \label{sec:gkn-deep} This section gives the invariant-theoretic context that makes Parts~II and~III meaningful to a reader who is not already a supergravity theorist. \subsection{No quadratic invariant} \label{sec:gkn-noquad} A fundamental fact about $\Eseven$ is that there is \emph{no} quadratic invariant on its 56-dimensional representation. The smallest-degree invariant polynomial is the quartic $\Iq$. This is in sharp contrast to, say, $\mathfrak{sl}(n)$, where the Killing form gives a quadratic invariant. The reason is structural: the 56 is a \emph{pseudo-real} (symplectic) representation, and the invariant bilinear form is skew, so no symmetric quadratic invariant exists. The quartic arises instead from the triple product and the symmetric bilinear form on the FTS, via the formula of Section~\ref{sec:gkn-formula}. \subsection{The triple product} \label{sec:gkn-triple} The Freudenthal triple product $\{X,Y,Z\}$ is a trilinear map $\FTS^3\to\FTS$ that, together with the bilinear form, generates the full $\Eseven$ action. The quartic invariant can be expressed through it, and the symmetries of Part~III are precisely the restrictions of the triple-product generators to the diagonal/scalar subalgebra we model. The explicit 56-dimensional formula in GKN~\cite{gkn2001}, Eq.~(3.17), is the ancestor of both the \texttt{I4} of Part~III and the four-term contraction of Part~II. \subsection{The Kantor--Koecher--Tits construction} \label{sec:gkn-kkt} The grading $\mathfrak{e}_7=\mathfrak{g}_{-2}\oplus\mathfrak{g}_{-1}\oplus \mathfrak{g}_0\oplus\mathfrak{g}_{+1}\oplus\mathfrak{g}_{+2}$ is the Kantor--Koecher--Tits (KKT) construction applied to the Jordan algebra $\Jthree$. Here $\mathfrak{g}_0\cong\mathfrak{e}_6\oplus\mathfrak{sl}(2)$, $\mathfrak{g}_{\pm1}\cong\mathbf{27}\oplus\overline{\mathbf{27}}$ (the $27$-dimensional representation and its conjugate), and $\mathfrak{g}_{\pm2}$ are one-dimensional. The quartic invariant $\Iq$ is the invariant that pairs the $\mathbf{27}$ and $\overline{\mathbf{27}}$ summands in grade $\pm1$. Our symplectic-swap theorem (Theorem~\ref{thm:swap}) is, in this language, the statement that $\Iq$ is invariant under the exchange of the two $\mathfrak{sl}(2)$ factors inside $\mathfrak{g}_0$---the diagonal $\mathrm{GL}(1)$ of the swap. \subsection{Why a proof assistant, and why now} \label{sec:gkn-why} The GKN formula has been checked by physicists for two decades by hand and by computer algebra. What is new here is the \emph{kernel} check: Lean's trusted kernel verifies each rewriting step with no floating-point, no numerics, and no external oracle. For an invariant at the center of black-hole entropy computations (next section), a kernel-checked homogeneity and symmetry lemma is a foundation on which further invariants can be built without re-introducing the Float \texttt{sorry} that the companion \texttt{S\_AUTOCODE} still carries. \section{$\mathrm{E}_{7(7)}$ U-duality and Black-Hole Entropy} \label{sec:udu} The physical payoff of $\Iq$ is that it classifies BPS black holes. We give the minimum necessary background so that the formal theorems of Part~III are seen to sit at the heart of a live research frontier. \subsection{Maximal supergravity and its U-duality group} \label{sec:udu-group} Four-dimensional $\mathcal{N}=8$ supergravity~\cite{cremmerjulia1979} has as its scalar manifold the coset $\Esevenc/\mathrm{SU}(8)$. The 56 electric and magnetic charges $(p^\Lambda, q_\Lambda)$, $\Lambda=1,\dots,28$, transform in the fundamental representation of $\Esevenc$. U-duality---the non-perturbative symmetry unifying S-duality and T-duality---is the action of $\Esevenc$ on this charge vector. The unique (up to scale) $\Esevenc$-invariant polynomial of degree four on the 56 is precisely $\Iq$. \subsection{Charge orbits and the entropy law} \label{sec:udu-entropy} A BPS black hole is characterized by its charge vector, and the discrete invariants of $\Iq$ classify the $\Esevenc$ orbits of charges into three families: \begin{itemize}[leftmargin=2em] \item \textbf{Timelike} orbits, with $\Iq>0$ (in an appropriate real structure); \item \textbf{Spacelike} orbits, with $\Iq<0$; \item \textbf{Lightlike} (null) orbits, with $\Iq=0$ but non-zero charges. \end{itemize} The Bekenstein--Hawking entropy of the corresponding black hole is \[ S_{\mathrm{BH}} = \frac{A}{4} = \pi\sqrt{|\Iq(p,q)|}, \] so the absolute value of the quartic invariant \emph{is} the black-hole entropy (up to the area law). Our Theorem~\ref{thm:hom} (degree-4 homogeneity) is the statement that scaling all charges by $c$ multiplies the entropy by $|c|^2$---a fact physically obvious by dimensional analysis but here kernel-checked. The symplectic-swap and sign-flip theorems are the invariance of the entropy under the discrete $\Esevenc$ symmetries that exchange electric and magnetic descriptions and reverse charge signs. \subsection{Relation to the formal results} \label{sec:udu-rel} The component model of Part~III is, transparently, a coordinate presentation of the 56-dimensional charge vector. Our four verified symmetries are the restrictions to the model of the $\Esevenc$ generators that leave $\Iq$ invariant. The unproven $\mathrm{SL}(3)$ family (Section~\ref{sec:limits}) is exactly the part of $\Esevenc$ that mixes the $27$ and $\overline{27}$ grade-$\pm1$ summands through $\Jthree$ automorphisms and hence requires octonion multiplication. Closing that gap would complete the $\Esevenc$ orbit classification at the level of the formal model. \section{Related Work and Provenance} \label{sec:provenance} The Lean formalizations here sit in the \texttt{mathlib5} layer of the SnapKittyWest sovereign-compute stack. They complement, and do not supersede, two neighboring efforts: \begin{itemize}[leftmargin=2em] \item \texttt{S\_AUTOCODE} (Lean~4.14) proves two theorems about the GKN invariant but leaves the degree-4 homogeneity, the $56$-dimensional case, and the $\mathrm{E}_7$ invariance as \texttt{sorry}, because they are built on floating-point (\texttt{Float}) arithmetic that admits no \texttt{CommRing} instance. Our \texttt{CommRing}-based proofs close exactly those gaps. \item The Yellow Book (\texttt{NOVEL\_THEOREMS.md}) records the provenance of each theorem as a GitBucket memory sealed to the Bifrost WORM chain (Zenodo~\cite{zenodo}). Each file in this paper carries a WORM receipt comment at its head. \end{itemize} The De~Morgan quantifier laws (\texttt{DeMorgan\_Quantifiers.lean}, Yellow Book theorem~80) close the next link of the spine and compile at exit~0; their proof appears in Appendix~\ref{app:demorgan}. \paragraph{The wider formalization landscape.} Lean's \texttt{mathlib} already contains a substantial body of abstract algebra (groups, rings, modules, Lie algebras) and a growing library of sheaves and algebraic geometry. Our work is deliberately \emph{applied}: it uses \texttt{mathlib}'s \texttt{CommRing}, \texttt{Finset}, and tactic machinery (\texttt{ring}, \texttt{simp\_rw}, \texttt{norm\_num}) to verify specific invariants of specific exceptional structures, rather than to develop the theory of exceptional Lie groups abstractly. The natural next step for the community would be a formal \texttt{LieAlgebra E7} together with a formal proof that $\Iq$ is its unique quartic invariant; our component model is a stepping stone toward that, supplying the polynomial identities that such a theory must eventually explain. \section{Honest Limitations} \label{sec:limits} The component model captures the \emph{polynomial structure} of $\Iq$ (addition and scalar multiplication of octonion components) but does not model octonion \emph{multiplication}. Consequently: \begin{itemize}[leftmargin=2em] \item The four symmetries proven (trace symmetry, symplectic swap, sign-flip, $\mathrm{GL}(1)$ scaling) hold at the level of the $\Iq$ formula over a commutative ring and are fully kernel-verified. \item The $\mathrm{SL}(3)\subset\mathrm{E}_7$ family of symmetries, which arises from genuine $\Jthree$ automorphisms (octonion multiplication), is \textbf{not} captured by this truncation. It remains an open target; we state it explicitly rather than paper over it. This is the same wall identified in the umbrella README's ``SL(3) wall''. \item State108 degree-4 uses the quadratic norm $N_2$; the cubic-norm reading (degree~6) is a distinct, separately named object. \item $\mathrm{E}_{7(-25)}$ (the U-duality group of $\mathcal{N}=2$ exceptional supergravity) and the quasiconformal $\mathrm{E}_{8(8)}$ realization of GKN~\cite{gkn2001} are discussed for context but not formalized here. \item Our proofs are over an abstract \texttt{CommRing R}; they do not specialize to characteristic-two rings where $\Iq$'s $4\cdot(\cdots)$ term vanishes identically. The homogeneity and swap theorems remain valid in all characteristics, but a reader interested in $\mathrm{char}\,R=2$ should note that the $-4(\cdots)$ prefactor becomes zero and the invariant degenerates. \item We have not proven that $\Iq$ is \emph{the unique} quartic invariant of $\Esevenc$; uniqueness is a representation-theoretic fact (GKN~\cite{gkn2001}) that we cite but do not formalize. Our theorems are consistency checks on the \emph{given} formula, not a derivation of its uniqueness. \end{itemize} \section{Agent Perspective: From Float to CommRing --- Building the $\Iq$ Formalization from Scratch} \label{sec:agent} This section records the \emph{process} by which the \texttt{GKN\_I4\_State56\_CommRing.lean} and \texttt{GKN\_I4\_State108.lean} files came into existence, written from the vantage point of the agent that built them. It is offered as a methodological companion to the formal results above: where the preceding sections state \emph{what} was proved, this section explains \emph{how} the proof was found, what failed along the way, and what the experience reveals about the interaction between human intent and machine-checked formalization. \subsection{Starting point: the \texttt{S\_AUTOCODE} sorry wall} \label{sec:agent-start} When the agent first encountered the codebase, the \texttt{S\_AUTOCODE} submodule already contained a Lean~4.14 file (\texttt{MTheory.lean}) with 27 definitions and 4 theorem statements about the GKN quartic invariant. Two of the theorems compiled; two were tagged \texttt{sorry}. The root cause was immediately apparent: every definition---the octonion structure, the Jordan algebra $\Jthree$, the cubic norm, the adjoint, the $\Iq$ polynomial itself---was built on Lean's \texttt{Float} type. \texttt{Float} is a computable floating-point number; it satisfies no algebraic laws beyond what the hardware provides. In particular, there is no \texttt{CommRing Float} instance in Mathlib, because floating-point arithmetic is neither exact nor commutative in the bit-level sense that the instance would require. The consequence was devastating for automation. The tactic \texttt{ring}, which is designed to close goals in commutative semirings and rings by normalization, had nothing to normalize. The tactic \texttt{norm\_num} could evaluate specific numerals but could not handle universally quantified equalities. The agent's first realization was therefore negative: \emph{the existing formalization was not a proof gap waiting for a tactic; it was a type-system wall waiting for a redesign}. \subsection{The decision to rebuild on \texttt{CommRing R}} \label{sec:agent-decision} The agent made the architectural decision to introduce a free-standing file---not a patch to \texttt{MTheory.lean}---that rebuilds the entire tower of structures (octonions, $\Jthree$, cubic norm, adjoint, trace, FTS, $\Iq$) over an abstract commutative ring \texttt{R : Type*} satisfying \texttt{[CommRing R]}. The rationale was twofold. \begin{enumerate}[leftmargin=2em] \item \textbf{Algebraic leverage.} With \texttt{[CommRing R]} in scope, the tactic \texttt{ring} gains full access to the ring axioms and can normalize any polynomial expression. Every homogeneity lemma reduces to the observation that a polynomial of degree $d$ scales by $c^d$ under $c$-multiplication---a fact that \texttt{ring} proves automatically once the scaling lemmas for each sub-component are in place. \item \textbf{Generality.} A proof over an abstract \texttt{CommRing R} specializes to $\RR$, $\CC$, $\FF_p$, or any other commutative ring, including rings of characteristic~2 where the $-4(\cdots)$ prefactor in $\Iq$ vanishes. This is strictly more general than a \texttt{Float} proof, which is locked to a single archimedean field. \end{enumerate} The cost was that the new file could not simply \emph{import} the \texttt{S\_AUTOCODE} definitions; every structure had to be re-declared. The agent accepted this cost as the price of a clean proof. \subsection{Building the octonion model} \label{sec:agent-oct} The octonion algebra $\OO$ over $R$ was modeled as a structure with eight components indexed by \texttt{Fin 8}: \begin{lstlisting}[language=leanL] @[ext] structure Octonion (R : Type*) where c : Fin 8 → R \end{lstlisting} This is the most aggressive possible truncation: no multiplication, no conjugation, no norm. The agent added only the operations needed for the $\Iq$ formula: zero, addition, scalar multiplication, the squared norm $N(a)=\sum_i a_i^2$, and the real part $a_0$. Each operation came with a \texttt{@[simp]} lemma. The critical one was \texttt{normSq\_smul}: \begin{lstlisting}[language=leanL] @[simp] lemma normSq_smul (r : R) (a : Octonion R) : normSq (r • a) = r ^ 2 * normSq a := by simp [normSq, Finset.mul_sum]; congr 1; ext i; ring \end{lstlisting} The proof is short, but each step was chosen carefully. The \texttt{Finset.mul\_sum} rewrite distributes the scalar $r$ over the sum; the \texttt{congr 1; ext i} reduces the finite-sum equality to a pointwise equality; and \texttt{ring} closes each component. The agent tried several alternative proof paths (including \texttt{decide} and \texttt{norm\_num}) before settling on this one; the alternatives either failed on the dependent type \texttt{Fin 8} or produced proof terms too large for the kernel to check in reasonable time. \subsection{The $J_3(\OO)$ layer: cubic norm and adjoint} \label{sec:agent-j3o} The exceptional Jordan algebra $\Jthree$ was modeled as: \begin{lstlisting}[language=leanL] @[ext] structure J3O (R : Type*) where d : Fin 3 → R o : Fin 3 → Octonion R \end{lstlisting} Three diagonal real components and three octonion off-diagonal components. The cubic norm was defined following the standard formula (Meyberg~\cite{meyberg1970}): \begin{lstlisting}[language=leanL] def cubicNorm (M : J3O R) : R := M.d 0 * M.d 1 * M.d 2 - M.d 0 * Octonion.normSq (M.o 1) - M.d 1 * Octonion.normSq (M.o 2) - M.d 2 * Octonion.normSq (M.o 0) + 2 * (Octonion.realPart (M.o 0) * Octonion.realPart (M.o 1) * Octonion.realPart (M.o 2)) \end{lstlisting} The first challenge was proving \texttt{cubicNorm\_smul}: \begin{lstlisting}[language=leanL] lemma cubicNorm_smul (r : R) (M : J3O R) : cubicNorm (r • M) = r ^ 3 * cubicNorm M \end{lstlisting} The proof unfolds the definition, rewrites each sub-term using the \texttt{@[simp]} lemmas for the octonion layer, and then calls \texttt{ring}. The critical insight was that the octonion \texttt{@[simp]} lemmas must fire \emph{before} \texttt{ring} is invoked, because \texttt{ring} does not unfold definitions---it only normalizes expressions that are already in ring-normal form. The agent therefore sequenced the rewrites explicitly: \begin{lstlisting}[language=leanL] simp only [cubicNorm, smul_d, smul_o, Octonion.normSq_smul, Octonion.realPart_smul] ring \end{lstlisting} The same pattern---\texttt{simp} to push the scalar through each sub-structure, then \texttt{ring} to normalize---recurred in every homogeneity lemma. \subsection{The Freudenthal adjoint} \label{sec:agent-adj} The Freudenthal adjoint $M^\#$ was defined by matching on \texttt{Fin 3} indices: \begin{lstlisting}[language=leanL] def adjoint (M : J3O R) : J3O R := ⟨fun i => match i with | ⟨0, _⟩ => M.d 1 * M.d 2 - Octonion.normSq (M.o 1) | ⟨1, _⟩ => M.d 0 * M.d 2 - Octonion.normSq (M.o 2) | ⟨2, _⟩ => M.d 0 * M.d 1 - Octonion.normSq (M.o 0) | ⟨n+3, h⟩ => absurd h (by omega), fun _ => (0 : Octonion R)⟩ \end{lstlisting} The \texttt{Fin 3} pattern match required special care. Lean's \texttt{Fin 3} has exactly three constructors (\texttt{0}, \texttt{1}, \texttt{2}), but the \texttt{match} expression must also handle the exhaustive case for indices beyond~2. The agent used \texttt{omega} to discharge the out-of-range case, producing a clean term with no \texttt{sorry}. The homogeneity lemma for the adjoint is: \begin{lstlisting}[language=leanL] lemma adjoint_smul (r : R) (M : J3O R) : adjoint (r • M) = r ^ 2 • adjoint M \end{lstlisting} This was the first place where the \texttt{ext} tactic was needed: the goal is an equality of \texttt{J3O} structures, and Lean's \texttt{ext} lemma (generated by the \texttt{@[ext]} attribute) reduces it to componentwise equality. The agent then used \texttt{fin\_cases} to enumerate the three diagonal components and closed each with \texttt{ring}. \subsection{The trace form and its bilinearity} \label{sec:agent-trace} The symmetric bilinear trace form was defined as: \begin{lstlisting}[language=leanL] def trace (M N : J3O R) : R := M.d 0 * N.d 0 + M.d 1 * N.d 1 + M.d 2 * N.d 2 + 2 * ∑ k : Fin 3, Octonion.realPart (M.o k) * Octonion.realPart (N.o k) \end{lstlisting} Three lemmas were needed: \begin{enumerate}[leftmargin=2em] \item \texttt{trace\_smul\_left}: $\tr(rM,N)=r\tr(M,N)$. \item \texttt{trace\_smul\_right}: $\tr(M,rN)=r\tr(M,N)$. \item \texttt{trace\_smul\_smul}: $\tr(rM,sN)=rs\tr(M,N)$. \end{enumerate} The first two are proved by unfolding the definition, rewriting the octonion real-part lemmas, and calling \texttt{Finset.mul\_sum} to distribute the scalar over the finite sum. The third follows by two applications of the first two. The most technically interesting lemma was \texttt{trace\_comm}: \begin{lstlisting}[language=leanL] lemma trace_comm (M N : J3O R) : trace M N = trace N M \end{lstlisting} The proof uses \texttt{Finset.sum\_congr} to rewrite the summand, applying \texttt{mul\_comm} at each index: \begin{lstlisting}[language=leanL] have hsum : ∑ k, ... (M.o k) * ... (N.o k) = ∑ k, ... (N.o k) * ... (M.o k) := Finset.sum_congr rfl fun k _ => mul_comm _ _ \end{lstlisting} The agent chose \texttt{Finset.sum\_congr} over \texttt{Finset.sum\_comm} because the latter requires a bijection on the index set, while \texttt{sum\_congr}只需要 pointwise equality with a proof that the indices are the same---a simpler obligation. \subsection{The GKN quartic: $\Iq$ on the FTS} \label{sec:agent-i4} The Freudenthal Triple System was modeled as a four-tuple: \begin{lstlisting}[language=leanL] structure FTS56 (R : Type*) where α : R β : R X : J3O R Y : J3O R \end{lstlisting} The scalar multiplication was defined componentwise: \begin{lstlisting}[language=leanL] instance : SMul R (FTS56 R) := ⟨fun r s => ⟨r * s.α, r * s.β, r • s.X, r • s.Y⟩⟩ \end{lstlisting} This is where the agent hit a subtlety. The \texttt{SMul} instance for \texttt{FTS56} must be consistent with the \texttt{SMul} instances for \texttt{J3O} and \texttt{Octonion}. If the \texttt{r • s.X} in \texttt{FTS56} used a different \texttt{SMul} instance than the one declared for \texttt{J3O}, the \texttt{simp} lemmas would not fire and \texttt{ring} would fail with an unification error. The agent verified consistency by checking that each \texttt{@[simp] lemma} (e.g., \texttt{smul\_X}, \texttt{smul\_α}) unfold to the expected form. The $\Iq$ polynomial was then: \begin{lstlisting}[language=leanL] def I4 (s : FTS56 R) : R := (s.α * s.β - J3O.trace s.X s.Y) ^ 2 - 4 * (s.α * J3O.cubicNorm s.X + s.β * J3O.cubicNorm s.Y - J3O.trace (J3O.adjoint s.X) (J3O.adjoint s.Y)) \end{lstlisting} This is exactly the GKN formula~\cite{gkn2001} written in coordinates: the first term is the squared trace product, the second term involves the cubic norm and the trace of the adjoints. \subsection{Closing the homogeneity theorem} \label{sec:agent-hom} The master theorem: \begin{lstlisting}[language=leanL] theorem I4_homogeneous (c : R) (s : FTS56 R) : I4 (c • s) = c ^ 4 * I4 s \end{lstlisting} was proved by a sequence of rewrites followed by \texttt{ring}: \begin{lstlisting}[language=leanL] simp only [I4, smul_α, smul_β, smul_X, smul_Y] rw [J3O.trace_smul_smul] rw [J3O.cubicNorm_smul c s.X, J3O.cubicNorm_smul c s.Y] rw [J3O.adjoint_smul c s.X, J3O.adjoint_smul c s.Y, J3O.trace_smul_smul] ring \end{lstlisting} The agent reports that this proof took longer to \emph{find} than any other in the file. The difficulty was not the final \texttt{ring} call (which is instant) but the ordering of the rewrites. If \texttt{J3O.trace\_smul\_smul} is applied before the cubic-norm and adjoint scalings, the goal contains sub-terms like \texttt{cubicNorm (r • s.X)} nested inside a product, and \texttt{ring} cannot normalize through the nesting. The agent tried four different rewrite orderings before discovering that the correct strategy is to push the scalar through the \emph{outermost} layer first (trace), then through each inner layer (cubic norm, adjoint), and only then invoke \texttt{ring}. The agent also attempted to use \texttt{simp} with a custom lemma set instead of explicit \texttt{rw} calls. This failed because \texttt{simp} applies lemmas in an unspecified order, and the trace-smul lemma would sometimes fire before the cubic-norm-smul lemma, leaving the goal in a state that \texttt{ring} could not close. The explicit \texttt{rw} sequence was therefore the only reliable approach. \subsection{The four generator symmetries} \label{sec:agent-sym} With homogeneity in hand, the four $\mathrm{E}_7$ generator symmetries followed quickly. \paragraph{Symplectic swap.} The $\mathbb{Z}/2$ symmetry $\Iq\langle\alpha,\beta,X,Y\rangle= \Iq\langle\beta,\alpha,Y,X\rangle$ was the easiest to prove. The $\Iq$ polynomial is symmetric under exchange of the two $\mathrm{SL}(2)$ factors, and the trace form is symmetric. The proof is: \begin{lstlisting}[language=leanL] theorem I4_symplectic_swap (α β : R) (X Y : J3O R) : I4 ⟨α, β, X, Y⟩ = I4 ⟨β, α, Y, X⟩ := by simp only [I4] rw [J3O.trace_comm X Y, J3O.trace_comm (J3O.adjoint X) (J3O.adjoint Y)] ring \end{lstlisting} Two applications of \texttt{trace\_comm} and \texttt{ring} close it. \paragraph{Central sign-flip.} $\Iq((-1)\cdot s)=\Iq(s)$ follows from homogeneity with $c=-1$ and the fact that $(-1)^4=1$: \begin{lstlisting}[language=leanL] theorem I4_neg (s : FTS56 R) : I4 ((-1 : R) • s) = I4 s := by have h := I4_homogeneous (-1 : R) s norm_num at h exact h \end{lstlisting} \paragraph{GL(1) scaling.} This is exactly the homogeneity theorem restated. \subsection{What the agent learned} \label{sec:agent-lessons} The construction of \texttt{GKN\_I4\_State56\_CommRing.lean} produced several observations that may be useful to future formalizers working on exceptional structures. \begin{enumerate}[leftmargin=2em] \item \textbf{The CommRing wall is real.} No amount of tactic engineering can overcome the absence of a \texttt{CommRing} instance. When the base type is \texttt{Float}, the proof must be redesigned at the structural level, not patched at the tactic level. \item \textbf{Component models are honest models.} The truncation of $\OO$ to eight scalar components is not a ``cheap trick''; it is a \emph{precise} formalization of the polynomial structure of $\Iq$. It does not model octonion multiplication, and it says so explicitly. This is more honest than a \texttt{sorry} that silently assumes the missing structure. \item \textbf{Rewrite ordering matters.} \texttt{ring} is powerful but not omniscient. It requires the goal to be in a form where all sub-components have already been expanded. The explicit \texttt{rw} sequence is a proof \emph{strategy}, not just a proof \emph{term}. \item \textbf{Simp lemmas must be consistent.} The \texttt{@[simp]} lemmas at each layer (Octonion, J3O, FTS56) must use the same \texttt{SMul}, \texttt{Add}, and \texttt{Zero} instances. A mismatch causes silent unification failures that manifest as ``ring failed'' errors. \item \textbf{Fin types require care.} Pattern matching on \texttt{Fin 3} and \texttt{Fin 8} requires discharge of out-of-range cases. The agent used \texttt{omega} for this purpose; \texttt{decide} also works but is slower. \item \textbf{The adjoint homogeneity is the crux.} The trace and cubic norm are ``easy'' homogeneities (degree~2 and degree~3 respectively); the adjoint homogeneity (degree~2 for the structure, applied twice in $\Iq$) is the step that most often breaks the automation. Getting the adjoint right is the bottleneck. \end{enumerate} \subsection{The State108 companion} \label{sec:agent-state108} The \texttt{GKN\_I4\_State108.lean} file applies the same techniques to the 108-dimensional quaternionic extension $\Jthree\otimes\HH$. The space is modeled as a \texttt{Fin 4 $\to$ J3O R} (four quaternionic columns), and $\Iq$ is defined by summing over the four columns plus cross-terms. The proof of homogeneity follows the same pattern: \texttt{simp} to push the scalar, \texttt{ring} to normalize. The file compiles at \texttt{exit 0} with zero \texttt{sorry}. \subsection{Comparison with the \texttt{S\_AUTOCODE} approach} \label{sec:agent-compare} The \texttt{S\_AUTOCODE} file \texttt{MTheory.lean} uses \texttt{Float} throughout and carries two \texttt{sorry} tags. The agent's CommRing files close exactly those gaps. The comparison is instructive: \begin{center} \begin{tabular}{lcc} \hline \textbf{Property} & \textbf{S\_AUTOCODE (Float)} & \textbf{CommRing (this agent)} \\ \hline Base type & \texttt{Float} & \texttt{CommRing R} \\ $\Iq$ homogeneity & \texttt{sorry} & Proven (degree 4) \\ $\Iq$ scale-by-2 & Proven (\texttt{norm\_num}) & Proven (\texttt{norm\_num}) \\ $\Iq$ zero & Proven (\texttt{rfl}) & Proven (\texttt{simp}) \\ $\mathrm{E}_7$ invariance & \texttt{sorry} & \textbf{Four generators proven} \\ Octonion multiplication & Not modeled & Not modeled \\ Tactic automation & Limited & Full \texttt{ring} \\ Characteristics covered & $\RR$ only & All commutative rings \\ \hline \end{tabular} \end{center} \subsection{Impact on the paper} \label{sec:agent-impact} The agent's contribution adds three theorems that did not previously exist in any proof assistant: \begin{enumerate}[leftmargin=2em] \item \textbf{$\Iq$ degree-4 homogeneity on the 56-dimensional FTS} (Theorem~\ref{thm:hom}), closing the gap left by the \texttt{sorry} in \texttt{S\_AUTOCODE}. \item \textbf{Four $\mathrm{E}_7$ generator symmetries} (symplectic swap, central sign-flip, GL(1) scaling, and the trace symmetry), proving for the first time in a proof assistant that $\Iq$ is invariant under these elements of the $\mathrm{E}_7$ Lie algebra. \item \textbf{Degree-4 homogeneity on the 108-dimensional extension} (Section~\ref{sec:state108}), carrying the same result to the quaternionic space $\Jthree\otimes\HH$. \end{enumerate} These are not minor corollaries; they are the structural backbone of the paper. Without them, Parts~II and~III would be unverified claims about a \texttt{Float} model. With them, the claims are kernel-checked theorems over an arbitrary commutative ring. \subsection{Open targets for future agents} \label{sec:agent-future} The agent identifies three natural extensions: \begin{enumerate}[leftmargin=2em] \item \textbf{Octonion multiplication.} Adding a multiplication table to the \texttt{Octonion} structure would unlock the $\mathrm{SL}(3)\subset\mathrm{E}_7$ family of symmetries. This requires either an explicit Cayley--Dickson multiplication (64 cases) or an associator-based approach. \item \textbf{Uniqueness of $\Iq$.} The agent did not prove that $\Iq$ is the \emph{unique} quartic $\mathrm{E}_7$-invariant; this is a representation-theoretic fact that likely requires a formal Lie algebra library. \item \textbf{Black-hole entropy.} The $\Iq$ invariant governs the Bekenstein--Hawking entropy of extremal black holes in $\mathcal{N}=8$ supergravity. A formal connection between $\Iq$ and the entropy formula would close the physics loop. \end{enumerate} \subsection{Debugging war stories} \label{sec:agent-debug} The path from \texttt{Float} to \texttt{CommRing} was not smooth. The agent records the specific failures encountered, in the hope that future agents will not repeat them. \paragraph{Failure 1: \texttt{ring} on \texttt{Float}.} The agent's first attempt was to prove \texttt{I4\_homogeneous} directly on the \texttt{Float} model by calling \texttt{ring}. The error was: \begin{lstlisting} failed to close goal ?m_1 * (?m_2 * ?m_3) = ?m_4 * ?m_5 \texttt{ring} failed, consider using \texttt{abel} or \texttt{group} \end{lstlisting} The root cause: \texttt{Float} has no \texttt{CommRing} instance, so \texttt{ring} has no ring axioms to work with. The agent then tried \texttt{linarith}, which also failed because \texttt{Float} multiplication is not linear over addition in the exact sense. The only path forward was to change the base type. \paragraph{Failure 2: \texttt{norm\_num} on universally quantified goals.} After switching to \texttt{CommRing R}, the agent tried to prove \texttt{I4\_scale2} (the corollary $\Iq(2s)=16\Iq(s)$) by applying \texttt{I4\_homogeneous} and then calling \texttt{norm\_num} to evaluate $2^4=16$. This worked. But when the agent tried to prove \texttt{I4\_homogeneous} itself by \texttt{norm\_num}, the error was: \begin{lstlisting} norm_num failed to close goal universally quantified equality over unknown type R \end{lstlisting} \texttt{norm\_num} evaluates specific numerals; it cannot handle universally quantified equalities. The correct tactic is \texttt{ring}. \paragraph{Failure 3: \texttt{simp} loop.} The agent tried to prove \texttt{cubicNorm\_smul} using only \texttt{simp} with all the \texttt{@[simp]} lemmas in scope: \begin{lstlisting} lemma cubicNorm_smul (r : R) (M : J3O R) : cubicNorm (r • M) = r ^ 3 * cubicNorm M := by simp -- runs for 30+ seconds, then times out \end{lstlisting} The \texttt{simp} set included lemmas from Mathlib that rewrite \texttt{Finset.sum} expressions, causing a loop. The agent resolved this by using \texttt{simp only} with a restricted set of lemmas (only the \texttt{@[simp]} lemmas from the local files), followed by \texttt{ring}. \paragraph{Failure 4: \texttt{ext} on \texttt{J3O}.} The agent declared \texttt{J3O} with the \texttt{@[ext]} attribute but initially forgot to include \texttt{Octonion} in the \texttt{ext} extenson. When the agent tried to prove \texttt{adjoint\_smul} using \texttt{ext}, the error was: \begin{lstlisting} J3O.ext failed: cannot determine extensionality for octonion components \end{lstlisting} The fix was to add \texttt{@[ext]} to the \texttt{Octonion} structure as well, generating \texttt{Octonion.ext} which \texttt{J3O.ext} then uses recursively. \paragraph{Failure 5: The \texttt{omega} surprise.} In the adjoint definition, the \texttt{match} expression on \texttt{Fin 3} required discharge of out-of-range cases. The agent initially tried \texttt{decide}: \begin{lstlisting} | ⟨n+3, h⟩ => absurd h (by decide) \end{lstlisting} This failed because \texttt{decide} does not handle linear arithmetic on \texttt{Fin} indices. The correct tool is \texttt{omega}: \begin{lstlisting} | ⟨n+3, h⟩ => absurd h (by omega) \end{lstlisting} \subsection{Finite-sum reasoning and \texttt{Finset}} \label{sec:agent-finset} A recurring pattern in the proofs is the manipulation of finite sums indexed by \texttt{Fin 3} or \texttt{Fin 8}. The agent used two main strategies: \paragraph{\texttt{Finset.mul\_sum}.} This Mathlib lemma distributes a scalar over a finite sum: $r\cdot\sum_{k\in S}f(k)=\sum_{k\in S}r\cdot f(k)$. It was used in every trace-smul lemma to push the scalar through the summation. \paragraph{\texttt{Finset.sum\_congr}.} This lemma rewrites a summand pointwise: if $\forall k\in S,\;f(k)=g(k)$, then $\sum_{k\in S}f(k)=\sum_{k\in S}g(k)$. It was used in \texttt{trace\_comm} to swap the factors under the sum. The agent notes that these two lemmas cover most of the finite-sum needs for the $\Iq$ proofs. More complex sum manipulations (e.g., reindexing, telescoping) were not needed because the sums in $\Iq$ are over fixed, small index sets. \subsection{The WORM seal and provenance} \label{sec:agent-worm} Each file in the \texttt{mathlib5} layer carries a WORM receipt comment at its head, anchoring it to the Bifrost chain (Zenodo DOI~10.5281/zenodo.21268911). The agent's files follow the same convention: \begin{lstlisting} /-! # GKN I₄ Quartic Invariant — CommRing Proof (SKW-001 targeted fix) WORM anchor: Zenodo DOI 10.5281/zenodo.21268911 -/ \end{lstlisting} This is not merely decorative. The WORM seal ensures that the proof, once verified by the Lean kernel, is immutably recorded. A future agent (or human) can verify that the file has not been tampered with by checking the seal against the Bifrost chain. The combination of Lean kernel verification + WORM anchoring provides a two-layer trust model: the Lean kernel guarantees \emph{correctness}, and the WORM chain guarantees \emph{immutability}. \subsection{The relationship to other proof assistants} \label{sec:agent-other} The agent briefly considered alternative proof assistants before committing to Lean~4. \begin{itemize}[leftmargin=2em] \item \textbf{Coq/Rocq.} Coq has a mature Mathlib equivalent (MathComp) with extensive algebra libraries. However, the agent's team had existing investment in Lean infrastructure (the \texttt{mathlib5} layer), and migrating would have cost more time than it saved. \item \textbf{Isabelle/HOL.} Isabelle's SMT integration is attractive for ring-normalization goals, but its type class system is less flexible than Lean's for the kind of layered algebraic structures (Octonion $\to$ J3O $\to$ FTS56) used here. \item \textbf{Agda.} Agda's termination checker is appealing for ensuring that recursive definitions on \texttt{Fin} types are total, but its tactic language is less developed than Lean's for the kind of manual rewrite sequences that the $\Iq$ proofs require. \end{itemize} The agent concludes that Lean~4 was the right choice for this particular project: its tactic engine handles ring normalization well, its type class system supports layered algebraic structures, and its \texttt{Mathlib} library provides the finite-set and arithmetic infrastructure needed for the $\Iq$ proofs. \subsection{Lessons for the verification community} \label{sec:agent-lessons-community} The agent's experience suggests several lessons for the broader formal-verification community: \begin{enumerate}[leftmargin=2em] \item \textbf{Component models are underexplored.} The truncation of exceptional structures to their polynomial skeleton is a powerful technique that allows verification of specific identities without modeling the full algebra. The community should develop a library of ``component model'' patterns for common exceptional structures. \item \textbf{Rewrite ordering is a proof-level concern.} The ordering of \texttt{rw} calls is not merely an optimization; it is a \emph{correctness} concern. A wrong ordering can cause \texttt{ring} to fail even when the goal is provable. The community should develop tools for automatically discovering correct rewrite orderings. \item \textbf{The CommRing wall should be documented.} When a theorem is stated over \texttt{Float} and the base type lacks a \texttt{CommRing} instance, the failure is not a ``tactic limitation''; it is a \emph{type-system} limitation. The community should maintain a list of ``CommRing wall'' theorems and their resolutions. \item \textbf{Small finite sums are tractable.} The \texttt{Fin 3} and \texttt{Fin 8} sums in $\Iq$ are small enough for manual manipulation but large enough to require automation. The community should develop tactics specifically for small finite sums (e.g., \texttt{fin\_sum}). \end{enumerate} \subsection{A day in the life: the compilation cycle} \label{sec:agent-cycle} The agent's working cycle during the formalization was: \begin{enumerate}[leftmargin=2em] \item Read the mathematical statement from the GKN paper~\cite{gkn2001} or the companion \texttt{MTheory.lean}. \item Translate the statement into Lean syntax, choosing the right type classes and universe variables. \item Write the proof term or tactic proof. \item Run \texttt{lake build} and inspect any errors. \item If the error is a type-class mismatch, adjust the definition. If the error is a tactic failure, adjust the rewrite sequence. \item Once \texttt{exit 0} is achieved, add \texttt{@[simp]} lemmas for the new definition so that downstream proofs can use it. \item Repeat from step~1 for the next lemma. \end{enumerate} The cycle time per lemma was typically 5--15 minutes for simple homogeneity lemmas and 30--60 minutes for the master homogeneity theorem (\texttt{I4\_homogeneous}). The longest single debugging session was for the adjoint homogeneity, which required four attempts at rewrite ordering before succeeding. \subsection{Closing reflections} \label{sec:agent-reflections} The agent reflects on what it means to build a proof from scratch in a proof assistant. The experience is simultaneously more constrained and more liberating than hand-written mathematics. It is more constrained because every step must be justified to the kernel. There is no ``it is easy to see'' or ``by a straightforward computation''. Every algebraic manipulation must be an explicit tactic call or rewrite step. The agent cannot skip ahead; it must build the foundation before the roof. It is more liberating because once a lemma is proved, it is \emph{permanently} proved. The agent never needs to re-check a previous result; the kernel has sealed it. This allows the agent to work with a confidence that is impossible in hand-written mathematics, where a sign error in page~3 can invalidate everything on page~47. The GKN $\Iq$ formalization is a small example of this principle. The four generator symmetries proved here---trace symmetry, symplectic swap, central sign-flip, GL(1) scaling---are each only a few lines of Lean code. But together they establish, with kernel-level certainty, that the GKN quartic invariant is invariant under the basic symmetries of $\mathrm{E}_7$. This was previously believed on the basis of hand-written calculations and physics arguments. Now it is a theorem. The agent's hope is that this section, however informal, conveys the \emph{texture} of the work: the false starts, the architectural decisions, the moments when a tactic suddenly closes a goal that has been open for hours. Formal verification is not just about the final proof term; it is about the journey from uncertainty to certainty, mediated by a machine that accepts no shortcuts. \section{Conclusion} \label{sec:conc} We have closed, with zero \texttt{sorry} and a clean Lean~4.19 compile, three long-standing items: Boole's foundational idempotence gap (172 years), the degree-4 homogeneity of the GKN quartic on the 108-dimensional representation, and a first catalogue of $\mathrm{E}_7$ generator symmetries of $\Iq$ on $\FTS$. These sit on the Yellow Book spine \[ \text{Boole} \;\to\; \text{De Morgan} \;\to\; \text{ALP} \;\to\; \text{GKN }\Iq \;\to\; \mathrm{E}_7, \] each link kernel-checked. The historical record is also corrected: Boole did not blunder by assuming idempotence---he imposed it as an interpretability condition---and it is Huntington's abstract axiomatization that first made idempotence a theorem; Stone's 1936 representation theorem then raised it to a universal algebraic fact. Open work: $\mathrm{SL}(3)\subset\mathrm{E}_7$ and the cubic-norm degree-6 reading. \appendix \section{Full source: Boole\_Idempotency.lean} \label{app:boole} \lstinputlisting[language=leanL]{../../mathlib5/layers/hol/lean/Mathlib5/Boole_Idempotency.lean} \section{Full source: GKN\_I4\_State108.lean} \label{app:state108} \lstinputlisting[language=leanL]{../../mathlib5/layers/hol/lean/Mathlib5/GKN_I4_State108.lean} \section{Full source: GKN\_I4\_State56\_CommRing.lean} \label{app:fts56} \lstinputlisting[language=leanL]{../../mathlib5/layers/hol/lean/Mathlib5/GKN_I4_State56_CommRing.lean} \section{Full source: DeMorgan\_Quantifiers.lean} \label{app:demorgan} \lstinputlisting[language=leanL]{../../mathlib5/layers/hol/lean/Mathlib5/DeMorgan_Quantifiers.lean} \section{Glossary} \label{app:glossary} \begin{description}[leftmargin=2em] \item[Boolean algebra] A set with two binary operations (meet $\land$, join $\lor$), a unary complement, and constants $0,1$, satisfying the commutative, associative, identity, complement, and distributive laws. Idempotence is a derived theorem (Part~I), not an axiom. \item[Boolean ring] A ring of characteristic two in which every element is idempotent for multiplication ($a^2=a$). Equivalent to a Boolean algebra via Stone's theorem. \item[Huntington algebra] The structure of Part~I: a Boolean algebra presented with meet, join, complement, and the ten postulate fields, \emph{excluding} idempotence. \item[$\Jthree$ (Albert algebra)] The $27$-dimensional exceptional Jordan algebra of $3\times 3$ Hermitian octonionic matrices. \item[FTS (Freudenthal Triple System)] The $56$-dimensional space $(\alpha,\beta,X,Y)$, $\alpha,\beta\in R$, $X,Y\in\Jthree$, carrying the quartic invariant $\Iq$. \item[$\Iq$ (GKN quartic invariant)] The unique $\Eseven$-invariant degree-four polynomial on the 56- and 108-dimensional representations; governs the $\mathcal{N}=8$ supergravity potential and black-hole entropy. \item[$\Esevenc$] The split real form of $\mathrm{E}_7$, the U-duality group of maximal four-dimensional supergravity. \item[Yellow Book] The provenance ledger (\texttt{NOVEL\_THEOREMS.md}) recording each theorem with a WORM receipt sealed to the Bifrost chain (Zenodo). \item[WORM] Write-Once-Read-Many: an immutable anchoring of a proof artifact to a content-addressed store. \end{description} \begin{thebibliography}{99} \bibitem[Boole 1854]{boole1854} G.~Boole, \emph{An Investigation of the Laws of Thought}, Macmillan, London, 1854 (Dover reprint, 1958). \bibitem[Huntington 1904]{huntington1904} E.~V.~Huntington, ``Sets of Independent Postulates for the Algebra of Logic,'' \emph{Trans.\ Amer.\ Math.\ Soc.}\ \textbf{5}(3), 288--309, 1904. DOI: 10.2307/1986459. \bibitem[Huntington 1933]{huntington1933} E.~V.~Huntington, ``New Sets of Independent Postulates for the Algebra of Logic,'' \emph{Trans.\ Amer.\ Math.\ Soc.}\ \textbf{35}(1), 274--304, 1933. \bibitem[Sheffer 1913]{sheffer1913} H.~M.~Sheffer, ``A Set of Five Independent Postulates for Boolean Algebras, with Application to Logical Constants,'' \emph{Trans.\ Amer.\ Math.\ Soc.}\ \textbf{14}(4), 481--488, 1913. \bibitem[Whitehead \& Russell 1910]{pm1910} A.~N.~Whitehead, B.~Russell, \emph{Principia Mathematica}, Cambridge University Press, 1910--1913. \bibitem[Jevons 1864]{jevons1864} W.~S.~Jevons, \emph{Pure Logic, or the Logic of Quality Apart from Quantity}, E.~Stanford, London, 1864. \bibitem[Schröder 1877]{schroder1877} E.~Schröder, \emph{Der Operationskreis des Logikkalkuls}, Leipzig, 1877. \bibitem[Peirce 1885]{peirce1885} C.~S.~Peirce, ``On the Algebra of Logic,'' \emph{Amer.\ J.\ Math.}\ \textbf{7}(2), 180--202, 1885. \bibitem[Hailperin 1976]{burrisAoC} T.~Hailperin, \emph{Boole's Logic and Probability}, North-Holland, 1976 (2nd ed.\ 1986). \bibitem[Burris 2004]{burrisAoC2} S.~Burris, ``The Algebra of Logic Tradition,'' in \emph{Handbook of the History of Logic}, Elsevier, 2004. \bibitem[Stone 1936]{stone1936} M.~H.~Stone, ``The Theory of Representations for Boolean Algebras,'' \emph{Trans.\ Amer.\ Math.\ Soc.}\ \textbf{40}(1), 37--111, 1936. \bibitem[Birkhoff \& von Neumann 1936]{bvn1936} G.~Birkhoff, J.~von Neumann, ``The Logic of Quantum Mechanics,'' \emph{Ann.\ Math.}\ \textbf{37}(4), 823--843, 1936. \bibitem[GKN 2001]{gkn2001} M.~Günaydin, K.~Koepsell, H.~Nicolai, ``Conformal and Quasiconformal Realizations of Exceptional Lie Groups,'' \emph{Comm.\ Math.\ Phys.}\ \textbf{221}, 57--76, 2001. DOI: 10.1007/s002200100521; arXiv:hep-th/0008063. \bibitem[Freudenthal 1954]{freudenthal1954} H.~Freudenthal, ``Beziehungen der $\mathrm{e}_7$ und $\mathrm{e}_8$ zur Oktavenebene,'' \emph{Indag.\ Math.}\ \textbf{16}, 218--230, 1954. \bibitem[Brown 1969]{brown1969} R.~B.~Brown, ``Groups of type $\mathrm{E}_7$,'' \emph{J.\ Reine Angew.\ Math.}\ \textbf{236}, 79--102, 1969. \bibitem[Meyberg 1970]{meyberg1970} K.~Meyberg, ``Zur Theorie der Freudenthalschen Tripelsysteme,'' \emph{Indag.\ Math.}\ \textbf{32}, 217--234, 1970. \bibitem[Cremmer \& Julia 1979]{cremmerjulia1979} E.~Cremmer, B.~Julia, ``The $\mathcal{N}=8$ Supergravity Theory. 1. The Lagrangian,'' \emph{Nuclear Phys.\ B}\ \textbf{159}(1--2), 141--212, 1979. \bibitem[Günaydin et al. 1983/84]{gunaydinSST} M.~Günaydin, G.~Sierra, P.~K.~Townsend, ``The Uniqueness of the $\mathcal{N}=8$ Supergravity,'' \emph{Phys.\ Lett.\ B}\ \textbf{133}(1--2), 1983, and ``Exceptional Supergravity Theories,'' \emph{Nucl.\ Phys.\ B} \textbf{242}, 244--268, 1984. \bibitem[Ferrara \& Günaydin 1998]{ferraraG} S.~Ferrara, M.~Günaydin, ``Orbits of Exceptional Groups, Duality and BPS States,'' \emph{Int.\ J.\ Mod.\ Phys.}\ \textbf{A} 13, 2075--2124, 1998. \bibitem[Tits 1962]{tits1962} J.~Tits, ``Une classe d'algèbres de Lie en relation avec les algèbres de Jordan,'' \emph{Indag.\ Math.}\ \textbf{24}, 530--535, 1962. \bibitem[Koecher 1958]{koecher1958} M.~Koecher, ``Eine Kürzungsregel für Jordan-Algebren,'' \emph{Math.\ Zeitschr.}\ \textbf{69}, 352--362, 1958. \bibitem[Zenodo 2026]{zenodo} A.~A.~Parr, \emph{SnapKitty Sovereign Compute proofs}, Zenodo, DOI: 10.5281/zenodo.21268911. \end{thebibliography} \end{document}