feat(AppendRun): prove Prover.append_run for challenge-free protocols at general arity#643
Conversation
…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.
…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.
… 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).
🤖 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. |
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.