Skip to content

Add GoldilocksExt3 (Fp^3) StarkModel, Tensor-Batched STARK & Pruned-MMCS Soundness - #6

Merged
johnchandlerburnham merged 2 commits into
mainfrom
formal/t5-fp3-stark-model
Nov 27, 2026
Merged

johnchandlerburnham merged 2 commits into
mainfrom
formal/t5-fp3-stark-model

Conversation

@johnchandlerburnham

Copy link
Copy Markdown
Member

Extends CertiFRI's unconditional tensor-FRI soundness stack to full Protocol v6 cubic-extension ($\mathbb{F}_{p^3} = \mathbb{F}_p[Y]/(Y^3 - Y - 1)$ over Goldilocks $p = 2^{64} - 2^{32} + 1$) tensor-batched STARK verification, including pruned-MMCS verification (CertiFri.P3.prunedMmcs), LogUp lookup-balance soundness, and direct adaptive-ROM RbrSound exports matching ix's Ix.Cert.MultiStark.soundness_dynamic_rom interface.

1. Tensor-Batched STARK Verifier (CertiFri/Stark/Verifier.lean)

  • Adds checkAfterChallengesTensor, verifyTensor, shardOkTensor, and verifyBatchTensor calling Fri.verifyClaimsFromTensor.

2. Cubic Extension StarkModel (Proofs/CertiFriProofs/P3/GoldilocksExt3Model.lean)

  • Constructs CertiFri.P3.GoldilocksExt3.starkModel : Exec.Stark.StarkModel Goldilocks GoldilocksExt3 Fp3Model together with Fp3Model.extData, natCast_inj, natCast_inj_le, and two_ne_zero (exposing goldilocks_twoAdicGenerator_sq in P3/Goldilocks.lean).
  • Instantiates Horner-FRI Fp^3 STARK corollaries (soundness_verify, soundness_verifyBatch, soundness_verify_lookups, soundness_verifyBatch_lookups).

3. Adaptive-ROM Tensor STARK & Pruned-MMCS Soundness (11 New Modules under Proofs/CertiFriProofs/)

  • Theory/Compiled/AcceptsComTensor.lean & Theory/Stark/UniformTensor.lean: compiled acceptance and uniform fraction bounds over shape-independent multi-slot challenges UTensorChal.
  • Exec/Stark/{FreeTensor,RunTensor,PcsSoundTensor,StateTensor,GoodLogTensor,ChainTensor,ShardGoodTensor,SoundnessTensor}.lean:
    • Challenger trace alignment (FreeTensor, RunTensor).
    • Unconditional unique-decoding rbrSound_pcsTensor_ud (via Tensor2DMCA) and CurveListCA-parameterized Johnson rbrSound_pcsTensor_johnson_of_curveListCA.
    • Round-by-round soundness rbrSound_sdoomedTensor_ud, sdoomedTensor_nil, settles_interpTensor, and prob_not_goodLogTensor_le.
    • Unconditional AIR + LogUp lookup-balance soundness for verifyTensor and verifyBatchTensor.
  • Exec/Stark/PrunedTensor.lean: monadic pruned path restoration (restorePathsM, restoreShardPathsM, query-count preservation) and pruned-to-unpruned bridge yielding unconditional soundness for verifyTensor / verifyBatchTensor with CertiFri.P3.prunedMmcs.

4. Concrete Fp^3 & DynamicRom Exports (Proofs/CertiFriProofs/P3/GoldilocksExt3Soundness.lean)

  • Direct Ix.Cert.MultiStark.soundness_dynamic_rom plugs (rbrSound_starkTensor_ud, sdoomedTensor_nil_fp3, settles_interpTensor_fp3) over shape-independent UTensorChal Fp3Model fslots slots width.
  • 100% unconditional Johnson-regime tensor PCS RbrSound (rbrSound_pcsTensor_johnson, discharging CurveListCA internally via curveListCA_fp3).
  • Concrete digest instantiations for pruned batch STARK + LogUp soundness:
    • soundness_verifyBatchTensorPruned_digest32 & soundness_verifyBatchTensorPruned_lookups_digest32 (2^256, BLAKE3-256)
    • soundness_verifyBatchTensorPruned_digest64 & soundness_verifyBatchTensorPruned_lookups_digest64 (2^512, BLAKE2b-512)
  • All 13 new modules wired into Proofs/CertiFriProofs.lean and fenced with #guard_msgs #check + #print axioms in Proofs/CertiFriProofs/Audit128.lean.

Verification

All checks ran cleanly on 0b8b1c6ef with zero warnings, zero sorry, zero native_decide, zero bv_decide, and every theorem strictly ⊆ [propext, Classical.choice, Quot.sound]:

  • ./scripts/ci.sh lean-build: PASS (59/59 CertiFri + 9,095/9,095 CertiFriProofs jobs)
  • ./scripts/ci.sh axioms: PASS (174 modules, 10,826 constants, 6,459 theorems)
  • ./scripts/ci.sh leanchecker: PASS (all 174 modules replayed in Lean 4 kernel)

…CS soundness

- Add tensor-batched STARK verifiers (checkAfterChallengesTensor, verifyTensor, shardOkTensor, verifyBatchTensor) in CertiFri/Stark/Verifier.lean over Fri.verifyClaimsFromTensor.
- Construct GoldilocksExt3.starkModel (Exec.Stark.StarkModel Goldilocks GoldilocksExt3 Fp3Model) for Fp[Y]/(Y^3 - Y - 1) over Goldilocks p = 2^64 - 2^32 + 1 and instantiate Horner-FRI STARK soundness corollaries.
- Prove full adaptive-ROM tensor-batched STARK soundness over shape-independent multi-slot challenges UTensorChal:
  * Compiled.Params.acceptsTensor_of_outcome_verifyWithTensor_view_com
  * UniformTensor fraction bounds & FreeTensor/RunTensor challenger trace alignment
  * PcsSoundTensor: unconditional UD rbrSound_pcsTensor_ud (via Tensor2DMCA) and CurveListCA-parameterized Johnson rbrSound_pcsTensor_johnson_of_curveListCA
  * StateTensor / GoodLogTensor: RbrSound rbrSound_sdoomedTensor_ud, sdoomedTensor_nil, settles_interpTensor, prob_not_goodLogTensor_le
  * SoundnessTensor: unconditional verifyTensor / verifyBatchTensor AIR & LogUp lookup-balance theorems
  * PrunedTensor: monadic path restoration (restorePathsM, restoreShardPathsM), pruned-to-unpruned bridge, and unconditional soundness for verifyTensor / verifyBatchTensor with CertiFri.P3.prunedMmcs.
- Instantiate the full Fp3 tensor STARK soundness stack in P3/GoldilocksExt3Soundness.lean, including DynamicRom-compatible RbrSound exports (rbrSound_starkTensor_ud, sdoomedTensor_nil_fp3, settles_interpTensor_fp3), unconditional Johnson tensor PCS RbrSound (rbrSound_pcsTensor_johnson via curveListCA_fp3), and concrete Digest (2^256) / Digest64 (2^512) pruned batch STARK theorems.
- Wire all 13 new proof modules into Proofs/CertiFriProofs.lean and pin #check / #print axioms guards in Proofs/CertiFriProofs/Audit128.lean. Verified with ci.sh lean-build, axioms (174 modules, 10826 constants, strictly [propext, Classical.choice, Quot.sound]), and leanchecker.
arthurpaulino
arthurpaulino previously approved these changes Nov 27, 2026
…-arity folding

Generalize CertiFRI's tensor-batched FRI verifier, folding proximity gaps,
sponge-chained executable soundness, and unpruned/pruned-MMCS GoldilocksExt3
STARK soundness from binary folding (logArity = 1) to arbitrary per-round
variable-arity schedules (arities : List Nat, 1 <= a <= maxLogArity, covering
logArity in {1, 2, 3} / fold factors 2, 4, 8):

- CertiFri/MultiArity.lean, CertiFri/Pcs.lean, CertiFri/Stark/Verifier.lean:
  add iterated binary foldRowMulti, canonical scheduleOfShape with soundness
  and binary-compatibility lemmas (scheduleValid_scheduleOfShape,
  scheduleOfShape_binary), multi-arity tensor FRI & STARK verifiers
  (verifyTensorMultiArity, verifyTensorMultiArity/verifyBatchTensorMultiArity),
  and compact 8-ary profiles FriParams.compact400KBBalanced (lb = 4,
  maxLogArity = 3, logFinalPolyLen = 8, q = 58, queryPow = 28) and
  FriParams.ultraCompact400KBZk (q = 55, queryPow = 30).
- Proofs/CertiFriProofs/Theory/MultiArity/{Fold,Ldt,PcsRbrTensor,CompiledTensor}.lean:
  prove iterated binary fold equals coset polynomial evaluation
  (foldRowMultiM_eq_foldAtPow), unconditional unique-decoding and
  CurveListCA Johnson multi-arity fold proximity gaps (stepMCAArity_ud,
  stepMCAArity_of_curveListCA_rel) with exact 2^a cancellation, and
  multi-arity tensor PCS round-by-round and compiled Merkle soundness.
- Proofs/CertiFriProofs/Exec/MultiArity/{TensorExec,SpongeSoundness,StarkState,StarkSoundness}.lean:
  lift multi-arity folding through executable FRI refinement, incremental
  sponge chaining (c = 3 / 2), shape-independent adaptive-ROM RbrSound, and
  unpruned/pruned-MMCS multi-arity tensor STARK & lookup-balance soundness.
- Proofs/CertiFriProofs/P3/GoldilocksExt3MultiAritySoundness.lean & Audit128.lean:
  instantiate GoldilocksExt3 (Fp3Model) with 100% unconditional 128-bit
  Johnson bounds (<= N / 2^128 under BLAKE2b-512 Digest64 and BLAKE3-256
  Digest) for compact400KBBalanced and ultraCompact400KBZk, plus unpruned
  and pruned-MMCS STARK soundness, pinned in Audit128.lean via #guard_msgs.

Verified with zero warnings/errors via scripts/ci.sh lean-build, axioms
(184 modules, 12399 constants, strictly [propext, Classical.choice, Quot.sound]),
and leanchecker.
@johnchandlerburnham
johnchandlerburnham merged commit 9db5495 into main Nov 27, 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