fix(ProtocolSpec): prove the partial-transcript splitters and index equivalences for sequential composition (6 sorries removed) - #641
Merged
alexanderlhicks merged 1 commit intoJul 13, 2026
Conversation
…quivalences for seqCompose (6 sorries removed) - Transcript.fst / Transcript.snd: uniform cast-based definitions along two new transport lemmas append_Type_castAdd / append_Type_natAdd (no if-split, no Nat subtraction in types; signatures unchanged) - FullTranscript.rtake_append_right: dissolve the eqRec/cast residue via HEq - seqComposeChallengeEquiv.left_inv / seqComposeMessageEquiv.left_inv: rw! (castMode := .all) [Fin.splitSum_embedSum] + rfl Verified: full lake build ArkLib (4048 jobs) green; file now sorry-free.
Contributor
🤖 PR Summary
Failed to generate AI summary. Please check the per-file summaries and statistics below. Statistics
Lean Declarations ✏️ Added: 2 declaration(s)
✅ Removed: 6 `sorry`(s)
📋 **Additional Analysis**The diff introduces new transport lemmas, fills in previously stubbed 📄 **Per-File Summaries**
Last updated: 2026-07-12 02:25 UTC. |
alexanderlhicks
approved these changes
Jul 13, 2026
Collaborator
|
Thank you! |
Abraxas1010
pushed a commit
to Abraxas1010/ArkLib
that referenced
this pull request
Jul 28, 2026
… at general arity The library's open composition keystone (Append.lean's sorried Prover.append_run, under the authors' 'when do these theorems hold?' comment), proven for message-only protocols — the commitment/BCS class: - append_run_of_challenge_free (right arity n'+1) - append_run_of_challenge_free_zero (empty right protocol) - append_run_of_challenge_free_liftM (the upstream statement spelling) Three-layer construction: HEq-stated per-round field equations; left- and right-region runToRound invariants (the right glued along trGlue = happend transported along the new spec-level right-prefix identity take_append_add); assembly at Fin.last. All theorems at [propext, Classical.choice, Quot.sound] (#print axioms checked); statements verified non-vacuous (not rfl). Stacked on Verified-zkEVM#631 (runToRound_succ), Verified-zkEVM#633 (challenge SubSpec embeddings), Verified-zkEVM#641 (SeqCompose transport lemmas).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes all six
sorrys fromArkLib/OracleReduction/ProtocolSpec/SeqCompose.lean:Transcript.fst/Transcript.snd(3 sorries) — the partial-transcript splitters for an appended protocol. Redefined uniformly (noif-split onk ≤ m) as honest casts along two new type-transport lemmas:append_Type_castAdd : (pSpec₁ ++ₚ pSpec₂).Type (Fin.castAdd n i) = pSpec₁.Type iappend_Type_natAdd : (pSpec₁ ++ₚ pSpec₂).Type (Fin.natAdd m i) = pSpec₂.Type iKeying the transport on
castAdd/natAddkeepsNatsubtraction out of the types; themin k mandk - mbounds are discharged byomegaat the index level. The signatures are unchanged, so existing consumers (e.g. theStateFunctionclauses inComposition/Sequential/Append.lean) are unaffected.FullTranscript.rtake_append_right(1 sorry) — the cast residue afterrw! (castMode := .all)(⋯ ▸ cast ⋯ (T' i) = cast ⋯ (T' i)) dissolves throughHEq: both sides are transports ofT' i, soeq_of_heq+eqRec_heq/cast_heqcloses it.seqComposeChallengeEquiv.left_inv/seqComposeMessageEquiv.left_inv(2 sorries) — discharged with the existingFin.splitSum_embedSumviarw! (castMode := .all), thenrfl(structure eta collapses the rebuiltSigma/Subtypepair).Motivation
The partial-transcript splitters are load-bearing for sequential composition: the round-by-round
StateFunctionsoundness clauses and anyProver.append_run-style run-assembly statement are phrased overTranscript.fst/.snd. As long as they weresorry, every downstream statement mentioning them was building on unproved infrastructure. The two indexEquivs similarly complete the challenge/message index bookkeeping forseqCompose.Verification
lake build ArkLib— full library, warning-free at the changed file (pre-existing linter warnings elsewhere untouched).grep -c sorry ArkLib/OracleReduction/ProtocolSpec/SeqCompose.lean→ 0.