Skip to content

Unconditional BatchedLineListCA, c = 3/2 STARK Sponge Chaining, Johnson-Regime Tensor STARK Soundness, and Multi-Arity HVZK Fix - #8

Merged
johnchandlerburnham merged 8 commits into
mainfrom
remediation/t4-certifri
Dec 3, 2026
Merged

johnchandlerburnham merged 8 commits into
mainfrom
remediation/t4-certifri

Conversation

@johnchandlerburnham

@johnchandlerburnham johnchandlerburnham commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Unconditional BatchedLineListCA, c = 3/2 STARK Sponge Chaining, Johnson-Regime Tensor STARK + S = 1 LogUp Soundness, and Multi-Arity HVZK Fix

  • Branch: remediation/t4-certifri → main
  • Base: e815d47 (PR Formal Honest-Verifier Zero-Knowledge (HVZK), Polynomial Blinding, Masked-LogUp & Salted-Merkle Hiding for v6-zk #7)
  • Head: 2baa40411f32521987069a8526ac3db50c7a5154 (8 commits, 34 files changed, +22,486 / -654)
  • Axiom & build hygiene: Zero sorry, zero admit, zero native_decide/bv_decide, zero custom axioms; all new theorems are locked via #guard_msgs in #print axioms in Proofs/CertiFriProofs/Audit128.lean to strictly [propext, Classical.choice, Quot.sound], audited by scripts/CheckAxioms.lean (198 modules, 14,758 constants, 9,250 theorems), and replayed in standalone leanchecker --verbose.

Summary

This PR closes five soundness and verification gaps in CertiFRI and its bundled multi-stark Rust crate so that full-scale GoldilocksExt3 ($\mathbb{F}_{p^3} = \mathbb{F}_p[X]/(X^3 - X - 1)$) tensor-batched STARK profiles (v6 and multi-arity EP1) are backed by machine-checked soundness beyond the unique-decoding radius without exponential width caps — including global LogUp lookup balance for arbitrary single-shard (S = 1) proofs:

  1. Multi-arity v6-zk HVZK bug fix (multi-stark) & runtime tensor guards (CertiFri, multi-stark)

    • Fixes a real Rust HVZK floor bug in multi-stark/src/p3_adapter/zk.rs where min_zk_log_degree ignored max_log_arity (2Q + 2D instead of Q · 2^{max(max_log_arity, 1)} + 2D), returning logN = 7 on 8-ary ultraCompact400KBZk (Q = 55) instead of the logN ≥ 9 floor proved in V6ZkHvzk.lean.
    • Adds runtime tensor-shape cap enforcement in both Lean (CertiFri.Stark.tensorCapOk) and Rust (multi-stark/src/p3_adapter/fri_batching.rs), matching the proved domain.
  2. Elimination of the exponential htensor size cap (BatchedLineListCA unconditional discharge)

    • Previously, tensor-batched Johnson PCS theorems union-bounded 2^(kCol + kOpen) applications of CurveListCA, capping 2^(kCol + kOpen) · 2^logMaxHeight ≤ 2^36 (v6) / ≤ 2^33 (EP1) — below full IxVM traces (~2^{39.5}).
    • Tier 0 (2c2f50a): Retunes EP1 proximity parameters (θ = 35/128 → 77/256 for compact400KBBalanced and 37/128 for ultraCompact400KBZk) and replaces the conservative 2^63 budget shortcut with the exact (3/4) · p^3 / 2^128 = 2^{63.585} budget (v6 → 2^37, EP1 → 2^38 / 2^37).
    • Tier 2 (3b270c8): Unconditionally proves batchedLineListCA_of_curveListCA from CurveListCA (m = 2) in Theory/ProximityGap/TensorMCA.lean (via random-linear collapse + double-counting + Lagrange interpolation + card_roots_lt), reducing 2^(kCol + kOpen) scaling to linear (kCol + kOpen) and certifying full Goldilocks kCol + kOpen ≤ 32 ∧ logMaxHeight ≤ 32 (covering all $W \le 2^{16}, M \le 2^{16}, H \le 32$, up to $2^{32}$ claims) across v6, compact400KBBalanced, and ultraCompact400KBZk with zero changes to shipped FRI parameters.
  3. STARK-layer SpongeCommitted chaining with c = 3/2 independent of shard count (9ae7dc7)

    • Previously, Exec/Stark/GoodLogTensor.lean used full-transcript Hit with collision prefactor ((B.shards + 1) · maxRounds + 3) / 2 (c = 39.5 for 1 shard up to c = 1236.5 for 64 shards).
    • Ports binary and multi-arity tensor STARK soundness (unpruned & pruned MMCS, single & batch, constraints & LogUp lookups) to SpongeCommitted (entryCap = 1), collapsing the collision term to 3 · N² / (2 · |D|) independent of B.shards and maxRounds.
  4. Johnson-regime (DEEP-ALI list-decoding) tensor STARK constraint soundness over $\mathbb{F}_{p^3}$ (d86cfa7)

    • Lifts full tensor-batched STARK constraint soundness (binary & multi-arity, single & batch, pruned MMCS, c = 3/2 sponge) from unique decoding (StrictMargin: $2\delta + \rho < 1$) to the Johnson list-decoding regime ($2^{-\text{lb}} < \theta^2$) via Lemmas A–E (JohnsonBall, StateTensorJohnson, P3/GoldilocksExt3JohnsonStark.lean) for arbitrary shard counts:
      • v6: soundness_verifyBatchTensorPrunedSpongeJ_v6_569 ($\theta = 569/1024, L = 5$), _v6_71 ($\theta = 71/128, L = 5$), and _v6_569_digest64 ($\le N / 2^{128}$);
      • EP1: soundness_verifyBatchTensorMultiArityPrunedSpongeJ_compact400KBBalanced ($\theta = 77/256, L = 8$) and _ultraCompact400KBZk ($\theta = 37/128, L = 10$).
  5. Single-shard (S = 1) Johnson-regime full-STARK soundness + global LogUp lookup balance over $\mathbb{F}_{p^3}$ (2baa404)

    • Discharges the unique-decoding-only LogUp residual for all single-shard (B.shards = 1, arbitrary number of circuits and trace heights) proofs — covering StarkShrinker / Endpoint 1 and single-shard v6 proofs — with zero L^S blowup:
      • Theory/PcsRbrTensorJoint.lean: single-set joint-agreement tensor FRI RbrSound (doomedTensorJoint, doomedTensorMultiJoint, rbrSound_grind_tensor{,Multi}Joint) with per-level geometric-sum Round-0 union bound ($\sum_{j \le R} 2^{-j} \varepsilon_0 \le 2\varepsilon_0$).
      • Exec/Stark/{JohnsonShardBall,JohnsonShardLink,StateTensorJohnsonLogup}.lean: pullback interleaved Johnson list L_shard over the top domain ($|L_{\text{shard}}| \le L_J$ across all circuits and heights of the shard), $(\beta, \gamma)$ LogUp Schwartz–Zippel bounds (fractionLE_shardBalPoly_{beta,gamma}, linear factor $L_J$), claimsFailJoint_of_shardZFailJ, sdoomedTensor{,Multi}J1L, and good_and_bal_of_sdoomedTensorJ1L.
      • Exec/Stark/SoundnessTensorJohnsonLogup.lean: generic c = 3/2 sponge ROM theorems soundness_verify{,Batch}Tensor{,MultiArity}PrunedSpongeJ1 concluding SingleShardSoundJ (AIR + Stage-2 constraints AND global LogUp balance).
      • P3/GoldilocksExt3JohnsonLogup.lean: concrete unconditional $\le (3/4)/2^{128}$ (roundErrJ1_le_128) and Digest64 literal $\le N / 2^{128}$ theorems (zero unique-decoding assumptions):
        • v6 (lb=2, q≥128, pow=20, L=5, maxLogDegree+2 ≤ 31 [≤536M rows]): soundness_verifyBatchTensorPrunedSpongeJ1_v6_{569,71}{,_digest64}, soundness_verifyTensorPrunedSpongeJ1_v6_569{,_digest64}.
        • EP1 compact400KBBalanced (lb=4, q=58, pow=28, θ=77/256, L=8, full Goldilocks maxLogDegree+4 ≤ 32): soundness_verify{Batch,}TensorMultiArityPrunedSpongeJ1_compact400KBBalanced{,_digest64}.
        • EP1 ultraCompact400KBZk (lb=4, q=55, pow=30, θ=37/128, L=10, maxLogDegree+4 ≤ 31 [≤134M rows]): soundness_verify{Batch,}TensorMultiArityPrunedSpongeJ1_ultraCompact400KBZk{,_digest64}.

Commit Breakdown

Commit Milestone Highlights
2c2f50a M1 Tier-0 htensor lift (v6 → 2^37, EP1 → 2^38 / 2^37), exact Goldilocks budget, tensorCapOk / tensor_htensor_within_cap guards, multi-stark 3-arg min_zk_log_degree(num_queries, ext_degree, max_log_arity) fix + regression tests
3b270c8 M2 Unconditional batchedLineListCA_of_curveListCA (TensorMCA.lean), full-Goldilocks (kCol + kOpen ≤ 32 ∧ logMaxHeight ≤ 32) v6/EP1 PCS theorems, Tier-2 runtime cap (DEFAULT_TENSOR_CHALLENGE_CAP = 32)
9ae7dc7 M3 Exec/Stark/{SpongeGoodLogTensor,SoundnessTensorSponge}.lean porting binary & multi-arity tensor STARKs (constraints & LogUp lookups) to SpongeCommitted (c = 3/2)
d86cfa7 M4 Exec/Stark/{JohnsonBall,StateTensorJohnson}.lean & P3/GoldilocksExt3JohnsonStark.lean: full DEEP-ALI Johnson STARK constraint soundness (v6 & EP1, c = 3/2, Audit128 locked)
5a4178c M5 README.md & TODO.md updated with M1–M4 theorems and explicit open residuals
4e6b795 CI Replace ring with mul_assoc on high exponents (2^287/2^364/2^1172) so cd Proofs && lake build --wfail passes with zero warnings
4f563b7 CI Run rustfmt on multi-stark/src/p3_adapter/fri_batching.rs
2baa404 M6 Single-shard (S = 1, arbitrary #circuits & heights) Johnson-regime full-STARK soundness + global LogUp balance over Fp^3 (PcsRbrTensorJoint, JohnsonShardBall/Link, StateTensorJohnsonLogup, SoundnessTensorJohnsonLogup, GoldilocksExt3JohnsonLogup, Audit128 Milestone 5 + 21 #guard_msgs locks)

Breaking API Change (multi-stark)

  • multi_stark::p3_adapter::zk::min_zk_log_degree now takes 3 arguments:
    pub const fn min_zk_log_degree(
        num_queries: usize,
        ext_degree: usize,
        max_log_arity: usize,
    ) -> usize
    All callers inside multi-stark (src/types.rs, tests/fp3_v6_zk.rs) are updated. Downstream callers passing 2 arguments should pass max_log_arity (1 for binary folding, 2 for 4-ary, 3 for 8-ary).
  • All existing Lean verifier definitions and prior soundness theorems are preserved without breaking changes.

Verification

Run on 64-core cloud CPU host (Lean 4.34.1, rustc 1.98.1):

  • Root Lean package (CertiFri, CertiFriP3, CertiFriTest): lake build --wfail — green (60/60 jobs, Mathlib-free).
  • Proofs package (CertiFriProofs + Audit128): cd Proofs && lake build --wfail — green (9,120/9,120 jobs, 0 warnings, 0 sorry).
  • Axiom & standalone kernel replay: scripts/CheckAxioms.lean — PASSED (198 modules, 14,758 constants, 9,250 theorems strictly [propext, Classical.choice, Quot.sound]); leanchecker --verbose — PASS on all 6 new M6 modules + Audit128.
  • Rust multi-stark crate: cargo test — all suites pass (lib 163+, fri_batching 5/5, fp3_v6 12/12, fp3_v6_zk 15/15 incl. 8-ary Q = 55 logN ≥ 9 enforcement and 256-row trace rejection at setup & prove, cap_binding 3/3).

Documented Residuals (Explicit Scope Boundaries)

  1. Multi-shard (S > 1) Johnson-regime LogUp balance: Single-shard (S = 1, arbitrary #circuits & heights) Johnson LogUp balance is now fully proved (2baa404). Across S > 1 independent shards, Johnson LogUp faces an information-theoretic $L_J^S$ candidate-tuple barrier (for unbounded S, cross-shard LogUp balance remains proved in the unique-decoding SpongeCommitted c = 3/2 regime [9ae7dc7], or would require batch-unified FRI query sampling across shards).
  2. System-size numeric hypotheses in GoldilocksExt3Johnson{Stark,Logup}: roundErrJ_le_128 / roundErrJ1_le_128 assume explicit linear size bounds on (cB, zB, cosetB, itemBound, lenBound) against $(3/4) p^3 / 2^{128}$; discharging those arithmetic inequalities for concrete downstream IxVM / StarkShrinker shapes is handled downstream (and for v6 / ultraCompact400KBZk, roundErrJ1 uses maxLogDegree + lb ≤ 31 due to the 2× geometric-sum factor in PcsRbrTensorJoint, while compact400KBBalanced covers the full maxLogDegree + 4 ≤ 32).
  3. Blowup floor: Johnson-regime STARK theorems require lb ≥ 1.
  4. Runtime cap dependence: Coverage relies on the runtime tensorCapOk guard (logMaxHeight ≤ 32 ∧ kCol + kOpen ≤ 32), enforced in both CertiFri/Stark/Verifier.lean and multi-stark/src/p3_adapter/fri_batching.rs.
  5. Classical ROM only: All soundness theorems are in the classical random-oracle model (32-byte Digest caps at 127.71 b collision / 127.27 b combined; 64-byte Digest64 achieves literal ≤ N / 2^128). Quantum/QROM adversaries are not modeled.

Port binary & multi-arity tensor STARK soundness (unpruned & pruned MMCS,
single & batch, constraints & LogUp lookups) from full-transcript Hit
(c = ((B.shards+1)*maxRounds+3)/2) to SpongeCommitted (entryCap = 1),
giving collision term 3*N^2/(2*|D|) independent of B.shards and maxRounds.

- Exec/Stark/SpongeGoodLogTensor.lean: GoodLogSponge, prob_not_goodLogSponge_le,
  spongeToFS, deriveSpongeA and prefix-stability helpers.
- Exec/Stark/SoundnessTensorSponge.lean: shard-level and end-to-end sponge
  soundness (generic RbrSound + unconditional UD) for verifyTensor,
  verifyBatchTensor (+pruned), verify{,Batch}TensorMultiArityPruned.
- ShardGoodTensor / MultiArity.StarkSoundness: oracle-agnostic
  shard_goodTensor{,Multi}_of_doomedL reused verbatim (no duplication).
- P3/GoldilocksExt3{,MultiArity}Soundness: Fp3 instantiations incl.
  Digest (2^256) / Digest64 (2^512), compact400KBBalanced, ultraCompact400KBZk.
- Audit128: axiom locks (strictly propext, Classical.choice, Quot.sound).
All existing full-transcript theorems kept unchanged.
…ndness

Lemmas A-E beyond the unique-decoding radius (2^(-lb) < theta^2), zero sorry,
axioms [propext, Classical.choice, Quot.sound]:

- Lemma A (JohnsonBall.decodeOnSet_eq, Link.exists_decoder_of_not_claimsFail):
  coherence of all claims at one height on one agreement set, no StrictMargin.
- Lemma B (exists_ballFinset): per-circuit interleaved Johnson ball has <= L tuples.
- Lemma C (ConstraintFailJ/AlphaFailJ/ZetaFailJ, fractionLE_alphaFailJ/zetaFailJ):
  list-quantified constraint and out-of-domain rounds, error L*cB/|K|, L*zB/|K|.
- Lemma D (claimsFail_of_zetaFailJ, sdoomedTensorJL / sdoomedTensorMultiJL,
  good_of_*, shard_goodTensor{,Multi}J_of_doomedL): Johnson state functions with
  per-circuit balls, error independent of #circuits, heights and #shards;
  SupportedJ carries the runtime tensor cap (tensorCap_of_checkTensor{,Multi}).
- Sponge (c = 3/2) Johnson soundness, binary and multi-arity, single and batch
  pruned: soundness_verify{Batch,}Tensor{,MultiArity}PrunedSpongeJ.
- Lemma E (P3/GoldilocksExt3JohnsonStark): roundErrJ <= (3/4)/2^128 under explicit
  system-size bounds; PCS discharge for v6 (569/1024, 71/128; L = 5) and EP1
  (compact400KBBalanced 77/256 L = 8, ultraCompact400KBZk 37/128 L = 10);
  Digest64 corollary <= N/2^128 for any number of shards.

Residual (documented): no LogUp balance claim in the Johnson regime.
Document the Tier-2 full-Goldilocks tensor PCS theorems, sponge chaining
(c = 3/2), and the Johnson-regime STARK soundness (Lemmas A-E) with concrete
v6/EP1 instances. Record residuals honestly: no lookup-balance claim in the
Johnson regime (L^(#circuits*S)), explicit system-size hypotheses, lb >= 1,
runtime tensor cap. No Verifier.lean preamble hook needed (t4-ix-stark passes
v6BatchInit as the initial challenger).
…r Fp^3

Prove unconditional single-shard (B.shards = 1, arbitrary #circuits and #heights)
Johnson-regime STARK soundness including global LogUp balance over GoldilocksExt3
(Fp^3) without unique decoding, for both binary (v6) and multi-arity (EP1) tensor
FRI with c = 3/2 incremental sponge ROM and literal Digest64 <= N / 2^128 bounds:

- Theory/PcsRbrTensorJoint.lean: single-set joint-agreement tensor FRI RbrSound
  (doomedTensorJoint, doomedTensorMultiJoint) with per-level geometric-sum Round 0
  union bound (<= 2 * eps_0 instead of (R + 1) * eps_0).
- Exec/Stark/JohnsonShardBall.lean: pullback interleaved Johnson list over the top
  shard domain (|L_shard| <= L_J), single-shard LogUp (beta, gamma) Schwartz-Zippel
  bounds multiplying error by only L_J (no L_J^S blowup), and constraint/zeta bounds.
- Exec/Stark/JohnsonShardLink.lean: link single-shard joint decoder to
  ClaimsFailJoint and ClaimsFailJointMulti.
- Exec/Stark/StateTensorJohnsonLogup.lean: single-shard Johnson + LogUp RBR state
  (sdoomedTensorJ1L, sdoomedTensorMultiJ1L) and roundErrJ1.
- Exec/Stark/SoundnessTensorJohnsonLogup.lean: generic c = 3/2 sponge ROM theorems
  (soundness_verify{,Batch}Tensor{,MultiArity}PrunedSpongeJ1) proving SingleShardSoundJ.
- P3/GoldilocksExt3JohnsonLogup.lean: concrete <= (3/4)/2^128 and Digest64 <= N/2^128
  instantiations for v6 (theta = 569/1024, 71/128; maxLogDegree + 2 <= 31),
  EP1 compact400KBBalanced (theta = 77/256; full Goldilocks maxLogDegree + 4 <= 32),
  and EP1 ultraCompact400KBZk (theta = 37/128; maxLogDegree + 4 <= 31).
- Audit128.lean: Milestone 5 #guard_msgs #print axioms locks (propext, Classical.choice,
  Quot.sound only).
@johnchandlerburnham
johnchandlerburnham merged commit bdb5a59 into main Dec 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants