Repository navigation
Schedule-Independent, GPU-Parallel Verification for the FV Workstream: a verified backend that computes CompPoly.cpolyFold exactly, 54–470× on GPU #651
Abraxas1010
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
A design note for the lean Ethereum FV effort (ArkLib / leanVM).
Author: Richard Goodman (Apoth3osis R&D) — merged ArkLib contributor (#641).
Summary
We have built and verified a reduction backend that:
CompPoly.cpolyFoldexactly — cross-validated three independent ways (ArkLib'scpolyFoldrun directly, an independent reference, and our interaction-net reducer), over the real KoalaBear field, on 30 oracle cases and 12 full folding towers;The result is a schedule-independent, GPU-parallel execution backend for exactly the computable content your FV/leanVM work spends its cycles on (FRI folding, multilinear evaluation, verifier arithmetic), with the GPU admitted only by a parity certificate against a Lean trust root. The ask is architectural feedback and a target obligation — details in §5. This is verification infrastructure, not a protocol change; not an EIP.
1. Why this fits your workstream
The FV goal is to prove FRI/STIR/WHIR security in Lean 4 inside ArkLib, and to build leanVM. Two things there are throughput-bound: checking the growing proof corpus, and running the computable content — the field arithmetic your
CompPolylayer (CPolynomial/CMvPolynomial, joined to the noncomputablePolynomialspec by your ownToCompPolybridge) already carves out. That computable layer — FRI folding, multilinear evaluation, prover/verifier arithmetic — is inherently parallel (each folded coefficient is independent) but bounded by sequential execution today.To be precise about the boundary of the claim: we do not replace the Lean kernel in checking your Mathlib-heavy security proofs — a confluent net reducer computes normal forms of programs, not proof terms. We accelerate the computable layer, which is where the parallelism and the cycles are.
2. The foundation: a machine-checked schedule-independence theorem
The backend is Boundary, a four-agent interaction-net rewriting kernel formalized in Lean 4. Its reduction is confluent modulo net-isomorphism —
boundary_vc_receipt_unique_modIso(Boundary/Confluence/VCNucleus.lean): two normal forms reached from a common source net are net-isomorphic, so the content-addressed receipt is unique, independent of the reduction schedule. The local 21-rule-pair diamond is discharged in full; the global lift is a setoid keystone through Mathlib'schurch_rosser, conditional on one named substrate obligation (hInv, one-step net-iso bisimulation). Footprint: the classical engine trio — not axiom-free, and we don't claim strict-constructive.This is the licence to parallelize: because any two schedules reach the same normal form up to iso, a GPU firing thousands of disjoint redexes concurrently computes the same answer as the sequential kernel — the parallelism is underwritten by a theorem, not a heuristic.
3. What we built and measured
(a)
cpolyFold, computed exactly — cross-validated. ArkLib's authoritative computable fold isCompPoly.CPolynomial.FoldingPolynomial.cpolyFold; for folding factor k=2 its body reduces tog[j] = (c[2j] + r·c[2j+1]) mod Pon coefficients. Our pipeline (lower → interaction-net reduce → readback) computes this, and we verified it against ArkLib's owncpolyFoldrun directly (#eval,ZMod 97) on 30 cases (10 polynomials × 3 challenges), and against an exact-Intreference over the real KoalaBear fieldP = 0x7F000001on 12 full folding towers (16→8→4→2→1) plus 40 random atomic combines, including genuine bignum exactness beyond2^63and non-vacuity (mutating any coefficient changes the output). Three independent engines meeting at one answer.(b) GPU acceleration on the GB10 — measured. The CUDA reducer executes on the GB10 (
managed_unified_memory) and returns a content-addressed C4 receipt. It is admitted only by a differential parity certificate:boundary_submit --self-checkgivesdeterministic_verdict = passwithgpu_output_sha256 == cpu_reference_output_sha256. On independent-redex nets (the structure of a FRI fold):The CPU manycore reducer scales superlinearly and becomes infeasible past 10⁴; the GPU stays flat. A FRI fold on a
2^20domain is ~500K independent combines — precisely where the CPU dies and the GPU wins by hundreds of times. The GPU is the accelerator; the CPU/Lean path is the trust root ("the fastest backend is not the trusted one").(c) The verified lowering. The
lower → reduce → readback = source evalbridge (readback_eval_bridge,Boundary/Language/LoweringSoundness.lean) is a closed machine-checked theorem on the first-order fragment, with per-construct executable witnesses; a 36-module object-lowerer handles the richer Rust/Lean-core language operationally, driven by a productionlean_to_boundarypipeline that has been through a multi-round hostile-audit gate suite. The witness theorems usenative_decide(compiler-trust); the kernel-clean,ofReduceBool-free path is the literal fast-pathProductionLiteralBridge.(d) Content-addressed receipt. Because the normal form is unique mod iso (§2), its fingerprint is a schedule-independent verification receipt — for CI caching, distributed agreement, and fraud localization.
4. Honest scope
What we verified is the coefficient-space
cpolyFold(exactly); the evaluation-domain FRI formulation (which uses domain constants / field inverses) is a different operation we have not tested. Output-hash GPU parity is verified on the canonical net (same shape-universal reducer); the scale runs measure timing. The lowering's closed soundness theorem is first-order-fragment (higher-order is operational). The confluence keystone is conditional onhInv. None of these blocks the result above; they mark where the next work is.5. The ask, and the venue
CompPoly/ verifier arithmetic useful to the FV / leanVM effort, and which obligation would you pick as the first integration target?cpolyFoldthrough the GPU C4 path end-to-end (we have the fold verified and the GPU path measured; joining them on a real fold net is the remaining engineering), and land themul/sub/rem/ fold pipeline witnesses upstream.Full verification tables and runnable Lean + GPU reproduction scripts are available on request. Happy to demo the
cpolyFoldcross-validation and the GB10 scaling live.All reactions