feat(AppendRun): prove Prover.append_run for challenge-free protocols at general arity - #643
Conversation
🤖 PR Summary
Failed to generate AI summary. Please check the per-file summaries and statistics below. Statistics
Lean Declarations ✏️ Added: 42 declaration(s)
✅ Removed: 9 `sorry`(s)
📋 **Additional Analysis**The diff contains several violations of the ArkLib contribution guidelines, primarily in the new 📄 **Per-File Summaries**
Last updated: 2026-07-12 04:39 UTC. |
|
Pushed one addition: It is needed. So the hypothesis in this PR sits exactly at the boundary of raw-level truth: left challenges are fine unconditionally, and only the right protocol's opening round matters; past that, agreement can only be distributional (independent effects commute in law, not in syntax), which would be a separate lemma over a commutative effect interpretation rather than a strengthening of this one. Happy to split the necessity module out of this PR if you'd rather keep it minimal. |
…rries removed) The two instances [pSpec_i.Challenge]o < [(pSpec1 ++ pSpec2).Challenge]o were stubbed with sorry. The lens data is: ChallengeIdx.inl/.inr on oracle indices, and transport along the challenge-type equalities Challenge_inl/Challenge_inr (new lemmas, by Fin.append_left/right) on responses. monadLift is spelled in lens form so liftM_eq_lift holds by rfl, per the SubSpec design notes. All downstream modules (Sequential.General, CoordinateWiseSpecialSoundness Composition, RingSwitching) build unchanged. From The Institute for Ontological Mathematics (IAOM) / Equation Capital dba Apoth3osis.
… 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).
6936c0b to
7466a59
Compare
|
Rebased onto current Why now: the whole stack was pinned to An offer about the shape of this stackFive open PRs from one outside contributor is a large review ask, and I suspect that is the real reason this has been sitting rather than anything in the proofs. The contents are one connected result — sequential-composition completeness — split the way I happened to develop it:
I am happy to collapse these into a single The Institute for Ontological Mathematics (IAOM) / Equation Capital dba Apoth3osis. |
🤖 PR Summary
Failed to generate AI summary. Please check the per-file summaries and statistics below. Statistics
Lean Declarations ✏️ Added: 40 declaration(s)
✅ Removed: 3 `sorry`(s)
📋 **Additional Analysis**Several violations of the ArkLib contribution guidelines were found. File naming, theorem naming, element naming within theorems, line length, and style all contain deviations from the specified standards. Please see the detailed findings below. Note: A full line-length check was not performed; the few flagged examples indicate the presence of lines exceeding the 100-character limit. The diff is largely relevant to the instructions, so 'No findings' was not returned. 📄 **Per-File Summaries**
Last updated: 2026-07-28 14:54 UTC. |
|
Note on the red checks: both failures are pre-existing on CI — the Lean build is green.
Build and Deploy Website to GitHub Pages — fails on the blueprint declaration check: This workflow has failed on every run for at least the past two weeks, across every contributor's branch (#574, #610, #503, Happy to open a separate fix for the |
Summary
Proves the library's open composition keystone
Prover.append_run(stated with asorryinComposition/Sequential/Append.lean, under the authors' comment "when do these theorems hold?") for challenge-free (message-only) protocols — the class the commitment/BCS transform actually produces — at fully general arity, in a new moduleComposition/Sequential/AppendRun.lean:append_run_of_challenge_free(right protocol of arityn'+1): runningP₁.append P₂is runningP₁, handing its output toP₂.input, runningP₂, and appending the transcripts.append_run_of_challenge_free_zero(empty right protocol — challenge-freeness on the right is vacuous overFin 0).append_run_of_challenge_free_liftM— the statement spelled exactly as the library'sProver.append_rundo-block (destructuring lets, ambientliftM); a definitional restatement of the first theorem.Structure of the proof
Prover.appendat abstract indices,HEq-stated to stay transport-free (the boundary equation exhibits composed roundmasP₂'s opening round fused with theP₁.output ∘ P₂.inputhandoff).k ≤ m, the composedrunToRoundisP₁'s, lifted into the composed challenge sum and transported (Fin.induction).P₁'s full run, the handoff, andP₂'s partial run, glued alongtrGlue— which is the library's ownhappendtransported along a new spec-level right-prefix identitytake_append_add : (pSpec₁ ++ₚ pSpec₂).take (m+j) = pSpec₁ ++ₚ pSpec₂.take j(interpolating the existingtake_append_left). Nat-induction with all indices pinned at the definitionally-reducingjv+1spelling.Fin.last, via aliftComp-of-rundistribution lemma and the output field equation.Reusable side-products:
take_append_add, the glue transporttrGluewith its concat/zero/full laws, the right-region state décalagePrvState_right, and lift-route coherence lemmas for both component challenge sums.Verification
lake build ArkLibgreen with the module registered inArkLib.lean.#print axioms:[propext, Classical.choice, Quot.sound]— nosorry, no extra axioms.rfl(probe included in development; the two run-invariant inductions carry the content).Scope and honesty
Prover.append_run. The general case needs an alignment of the composed challenge oracle with the components' across arbitrary challenge rounds (the general form of the lift-route pinning this proof handles for message rounds); that is a separate development and the originalsorryis intentionally left in place for it.Prover.runToRound_succ), feat(Append): construct the challenge-oracle SubSpec embeddings #633 (uses the challenge-oracleSubSpecembeddings), and fix(ProtocolSpec): prove the partial-transcript splitters and index equivalences for sequential composition (6 sorries removed) #641 (usesappend_Type_castAdd/natAddfrom the SeqCompose repair). This PR's diff includes those commits until they merge.