arXiv:2610.05335cs.CROct 2026

Manuscript Offprint

arXiv:2610.05335

StateSync-GKR: Machine-Checking the Trust Chain from Sparse-Merkle State Transitions to GKR Verification

Jinwook Kim

ABSTRACT

GKR soundness bounds false output claims about arithmetic circuits, but an application also needs assurance that its circuit encodes the intended state transition. We machine-check this connection for sparse-Merkle membership, non-membership, and update in Isabelle/HOL. A compiler model relates circuit acceptance to transition validity in both directions. A reusable protocol model assembles layer reduction, wiring-predicate extensions, and imported sumcheck soundness into a bound on an explicit chain event. Their composition transfers semantic invalidity to that bound, with the witness fixed before the challenge experiment. Concrete interpretations and premise activations expose vacuous assumption sets that a clean build alone would miss. A further development constructs the exact degree-four KoalaBear extension, lifts the base-field circuit objects, and establishes the assembly bound with denominator p4p^{4} under its stated challenge assumptions. An executable Rust prover accompanies the model. Creusot/Why3 contracts provide a partial implementation connection, and a conditional theorem relates successful verifier traces to the model event under an undischarged value-correspondence premise. Neither the transcript's online challenge distribution nor a multi-round Fiat–Shamir reduction is established. The contribution is the composition, within one proof assistant, of compiler correctness with a GKR assembly model, together with an explicit account of the remaining implementation and cryptographic obligations.

Keywords GKR protocol · sumcheck · interactive proofs · formal verification · Isabelle/HOL · sparse Merkle tree · circuit compiler · Rust · refinement

1 INTRODUCTION

Problem. Proof systems of the GKR family [9, 18, 20] verify computations expressed as layered arithmetic circuits. Their soundness guarantee is precise but narrow: if the circuit's output claim is false, the verifier accepts with probability bounded by a small quantity over the challenge field. An application that deploys such a verifier, however, does not want to know that a circuit evaluated to zero. It wants to know that a state transition it cares about—here, an operation on a sparse Merkle tree that carries financial state—is valid. That gap is bridged, in deployed systems, by a circuit compiler: a piece of software that translates transition semantics into gates and wiring. The soundness theorem says nothing about this compiler. If the compiler emits a circuit whose acceptance condition fails to coincide with the intended semantics, the verifier faithfully checks the wrong statement, and every downstream consumer of its acceptance inherits an unfounded belief.

Gap. The formal-methods literature has begun to mechanize the probabilistic heart of these protocols. The sumcheck protocol [13], the recursive engine inside GKR, has a machine-checked soundness and completeness development in Isabelle/HOL, registered in the Archive of Formal Proofs [8, 7], and a Lean 4 formalization effort covers sumcheck at the level of interactive oracle reductions [19]. These developments deliberately stop before the GKR layer-reduction chain, its wiring-predicate extensions, and a composition with an application compiler. To the best of our knowledge, no prior mechanized development spans that model chain (section 12 surveys the adjacent work). Connecting such a model to an implementation is a further, distinct obligation; this paper supplies only the partial refinement stated in section 9.

Approach. We mechanize the model chain for a concrete workload in Isabelle/HOL 2025-2 and organize its core in two sessions along the line that separates the reusable from the specific, with a further four-session chain on top that carries the result to the field the implementation actually uses. The general session formalizes layered circuits, multilinear extensions, the layer-reduction identity, the per-layer sumcheck instances (with per-round soundness imported from the AFP entry), the chain-event soundness bound of the assembled protocol model, the equivalence of a derived closed-form wiring oracle with its defining table form, and a batching-preservation theorem. The specialized session formalizes sparse-Merkle transition semantics, the circuit compiler at the level of an explicit constraint model, the equivalence of circuit acceptance with transition validity, the composition theorem, and concrete instances over the production field that witness every assumption set. The development accompanies an executable Rust prover stack; a separate, explicitly partial refinement layer connects the code to the model and declares exactly where machine-checked correspondence ends and stated trust begins.

Contributions. The paper makes six contributions.

  1. Mechanized compiler correctness for sparse-Merkle transitions. A formal semantics of sparse-Merkle membership, non-membership, and update over three-state leaves, and a machine-checked equivalence—in both directions, with a canonical witness—between acceptance of the compiled layered circuit and transition validity (Theorem A), together with an injectivity lemma for the leaf pre-image encoding that reduces leaf-hash collisions to collisions of the underlying sponge.

  2. A machine-checked GKR protocol assembly model. A formalization of layer reduction, wiring-predicate multilinear extensions, and the sumcheck chain, with per-round soundness imported from the AFP sumcheck entry and an explicit bound on the model chain event proved by induction over the layer chain (Theorem B), parametric in a per-layer degree-bound function. The implementation-facing per-variable degree-four form is recovered as a statement-level corollary; it is not activation-witnessed by the current polynomial instance. A separate four-session chain then transfers the assembly bound from the KoalaBear base field to the exact degree-four extension the implementation draws challenges from, proving the tower's field structure and cardinality, lifting polynomials, multilinear extensions, circuits, and false outputs along the base-field embedding, and fixing the bound's denominator at p4p^{4}. The two “degree four” are different objects and are kept apart throughout: one is a per-variable degree bound inside the sumcheck, the other is the degree of the field extension.

  3. A model-level composition theorem. A single mechanized statement (Theorem C) transfers semantic invalidity, through the compiled circuit, to the bounded GKR chain event. This closes the semantics-to-protocol composition inside the model. Connecting a running verifier's transcript acceptance to that event remains an explicit partial-refinement obligation rather than part of Theorem C.

  4. Batching preservation and concrete nonvacuity. A generic batching-preservation theorem (Theorem D), and a nonvacuity discipline with teeth: every locale assumption set is witnessed by a registered concrete instance over the production field, and the paper reports how this discipline caught two vacuously true headline theorems that had survived a clean build.

  5. A conditional refinement of the shipped verifier's acceptance. A theorem relating a successful acceptance trace of the verifier that ships in the artifact to the reduction-chain event of Theorem B. The relation between the running values and the model objects is carried as an explicit, deliberately load-bearing premise, stated in the theory and not discharged against the compiled program; the undischarged value relation and the probabilistic nature of the soundness statement limit its executable interpretation. Its force is confined to that implication and its stated premise.

  6. An artifact with an explicit refinement boundary. An executable Rust prover stack on pinned Plonky3 building blocks, connected to the Isabelle model by Creusot contracts under a declared trust surface; the checked obligations, tool walls, trusted items, and black-box assumptions are enumerated without rounding them up to whole-program verification.

Result boundary. Four boundaries frame everything that follows. First, the probabilistic statements bound an explicitly defined event in an interactive public-coin model. The implication from the running verifier's transcript checks to that event has a mechanized conditional form, but its value-correspondence premise is stated rather than discharged, and Fiat–Shamir remains outside the model entirely. Second, the composition theorem itself uses one finite field, while the executable stack evaluates the circuit over the base field and derives challenges in a degree-four extension. The lift to the exact extension field is mechanized, so the bound's p4p^{4} denominator is no longer an unmechanized step; what is not mechanized is that the implementation's transcript yields challenges distributed as the lifted statement assumes. Third, the implementation refinement is partial: we report the checked obligations, the trust surface, and the tool walls. Fourth, this paper makes no performance claim; the depth-independent layer count is a recorded structural observation, not a benchmark comparison.

Section 2 makes the trust gap precise. Section 3 introduces the system. Sections 4 to 7 present the four stages of the chain, section 8 the batching theorem and the nonvacuity discipline, section 9 the relationship to the implementation, section 10 the artifact, section 11 the trust boundary, section 12 related work, and section 13 concludes.