Skip to content

feat(sumcheck): add interaction protocol modules - #580

Draft
codygunton wants to merge 146 commits into
Verified-zkEVM:mainfrom
codygunton:cg/quang/core-rebuild-3-upstream
Draft

feat(sumcheck): add interaction protocol modules#580
codygunton wants to merge 146 commits into
Verified-zkEVM:mainfrom
codygunton:cg/quang/core-rebuild-3-upstream

Conversation

@codygunton

Copy link
Copy Markdown
Collaborator

Summary

  • Add the interaction-native Sumcheck protocol modules.
  • Add CompPoly helpers used by the Sumcheck interaction layer.
  • Wire the Sumcheck interaction modules into the umbrella imports.

Stack

Depends on #570.

Validation

  • ./scripts/validate.sh
  • lake test reports error: Arklib: no test driver configured

quangvdao and others added 30 commits March 28, 2026 08:10
Advance the CompPoly dependency from v4.28.0 (d7b9f98, 58 commits behind)
to the latest upstream master tip. The bump is fully backward-compatible
with no ArkLib code changes needed.

Made-with: Cursor
Replace ~30 duplicated bivariate polynomial declarations (coeff,
degrees, weighted degrees, eval, shift, root multiplicity, discriminant)
with imports from CompPoly's ToMathlib bridge files. Fix downstream
consumers for monomial name disambiguation and the now-unconditional
weightedDegree_eq_natWeightedDegree.

Net: 597 lines deleted, 47 lines changed across 4 files, zero new sorries.
Made-with: Cursor
Bump VCVio from d37e586 to ebea2fa (12 commits). Remove the
unused Q_ne_0 field from GuruswamiSudan.Conditions since
dvd_property does not require it.

Made-with: Cursor
…sors

- Restore `Q_ne_0` field in `GuruswamiSudan.Conditions`: non-zeroness
  is integral to the decoder specification (Q=0 trivially satisfies the
  algebraic conditions). `dvd_property` still doesn't require it.
- Fix `Conditions` docstring to accurately describe the structure.
- Fix `ne_zero_iff_coeffs_ne_zero` docstring ("all its coefficients" →
  "its coefficient function").
- Add `[NoZeroDivisors F]` to `totalDegree_mul` statement — the theorem
  is false over semirings with zero divisors.

Made-with: Cursor
Resolve isolated dot, long line, and unnecessary simpa warnings.

Made-with: Cursor
New standalone interaction infrastructure built on W-type specs with
role decorations, eliminating the old TwoParty/Multiparty inductives
and ProtocolSpec/Direction wrappers.

- Basic.lean: universe-polymorphic Spec, Transcript, Strategy, Decoration
  with map, BundledMonad, MonadDecoration, append/comp combinators
- TwoParty.lean: Role, RoleDecoration (= Decoration on Spec),
  Strategy.withRoles, Counterpart, runWithRoles, per-node monad variants
- Multiparty.lean: PartyDecoration + toRoles via Decoration.map,
  three-party knowledge-soundness examples with rfl proofs
- Reduction.lean: Prover, Verifier, Reduction, execute parameterized
  by (pSpec : Spec) (roles : RoleDecoration pSpec)
- PORTING.md: tracks core rebuild progress and next steps
- Delete old ArkLib/Refactor/ folder (superseded)

Made-with: Cursor
- Verifier: add StmtOut, rename decide→verify, m Bool→OptionT m StmtOut
- OracleCounterpart: round-by-round challenger with accSpec growing at sender nodes
- InteractiveOracleVerifier: unified challenger+verify (= OracleCounterpart at internal nodes, verify fn at .done)
- OracleVerifier: batch structure with iov + transcript-dependent simulate + reify
- OracleProver, OracleReduction: oracle-aware prover/reduction structures
- Decoration.Refine: displayed decoration combinator (cf. displayed algebras, ornaments)
- SenderDecoration: Refine specialized to RoleDecoration with role-dependent fiber
- Universe polymorphism throughout TwoParty.lean
- N-ary composition: replicate, chain, iterate for Spec/Decoration/Strategy/Transcript

Made-with: Cursor
…tions

Replace SenderDecoration (Decoration.Refine + PUnit junk at receiver nodes)
with Role.Refine — a direct recursion on spec + roles that skips receiver
nodes cleanly. Prove equivalence with Decoration.Refine for compatibility.

Made-with: Cursor
- Add ArkLib/Interaction/Basic/{Spec,Decoration,Strategy,Append,Replicate,Chain,MonadDecoration,BundledMonad}
- Add ArkLib/Interaction/TwoParty/{Role,Decoration,Strategy,Swap,Compose,Refine,Examples}
- Remove monolithic Basic.lean and TwoParty.lean; update Multiparty, Reduction, Oracle imports
- Note Interaction/Basic/ in PORTING.md; add Interaction line to docs/wiki/repo-map.md

Made-with: Cursor
- Define Spec.Decoration.swap so roles.swap elaborates on Decoration (fun _ => Role)
- Abbrev RoleDecoration.swap to Spec.Decoration.swap; use roles.swap in Swap/Compose theorems

Made-with: Cursor
Add "Authors: Quang Dao" to all Interaction files missing it.
Rewrite Spec, Transcript, and ofList docstrings for clarity.

Made-with: Cursor
Simplify Prover/Verifier/Reduction types: WitnessIn is plain, VerOutput
deleted (verifier returns StatementOut), WitnessOut independent of
StatementOut. Add Security.lean with completeness, soundness, knowledge
soundness, ClaimTree, KnowledgeClaimTree, and round-by-round definitions.
Update Oracle.lean, TwoParty Strategy/Compose, and Multiparty accordingly.

Made-with: Cursor
autoImplicit = false is already set globally in lakefile.toml.
Remove the duplicate set_option from all Interaction files and
document this in AGENTS.md.

Made-with: Cursor
…tors, overhaul docstrings

Rename `Transcript.appendFamily` -> `liftAppend`, `Transcript.join` -> `append`
(freeing `join` for n-ary flattening), and propagate across all files. Reorder
Append.lean so `liftAppend` precedes `append`/`split` and `comp` precedes `compFlat`.

Add new n-ary chain combinators in Chain.lean: `Transcript.chain` (telescope type),
`Transcript.join`/`unjoin` (flatten/unflatten isomorphism with round-trip simp lemmas),
`Transcript.liftJoin` (lift telescope-indexed families to chain transcripts).
Rename `Spec.chainFamily` -> `Transcript.chainFamily`.

Rewrite all docstrings in Append.lean, Chain.lean, and Compose.lean to be intrinsic
and intuitive. Add docstring quality rule to CONTRIBUTING.md and AGENTS.md.

Made-with: Cursor
…hain

Move the continuation-style intrinsic chain (formerly `Spec.Unfolding`
in `ChainIntrinsic.lean`) into `Basic/Chain.lean` as the canonical
`Spec.Chain` API. Extract the old stage-indexed `Spec.chain` into a
new `Basic/StateChain.lean` under the explicit `stateChain` prefix.

Chain.lean now provides:
- `Spec.Chain` (depth-indexed telescope: round spec + continuation)
- `Chain.toSpec` (convert to concrete `Spec` via `Spec.append`)
- `Chain.replicate`, `Chain.ofStateMachine` (derived constructors)
- `Chain.splitTranscript` / `Chain.appendTranscript` (telescope ops)
- `Chain.strategyComp` / `Chain.strategyCompUniform` (composition)

StateChain.lean preserves the full legacy API under `stateChain*` names.

Made-with: Cursor
…eChain

Merge the intrinsic reduction layer (formerly `ReductionIntrinsic.lean`)
into `Reduction.lean` as the default `Reduction.ofChain` surface.
Rename all stage-threaded chain identifiers to `stateChain*` across
TwoParty, Reduction, and Oracle modules.

Reduction.lean gains:
- `Decoration.ofChain` / `Chain.roles` (role decoration from Chain)
- `Strategy.ofChain` / `Counterpart.ofChain` (recursive composition)
- `Reduction.ofChain` (stateless chain-based reduction composition)

Renames in TwoParty:
- `RoleDecoration.chain` → `RoleDecoration.stateChain`
- `Counterpart.chainComp*` → `Counterpart.stateChainComp*`
- `Strategy.chainCompWithRoles*` → `Strategy.stateChainCompWithRoles*`

Renames in Oracle:
- `OracleReduction.chainComp` → `OracleReduction.stateChainComp`
- `toMonadDecoration_chain` → `toMonadDecoration_stateChain`

Made-with: Cursor
Express the sumcheck protocol using the Interaction.Spec framework:

- CompPoly.lean: CDegreeLE / CMvDegreeLE types, computable partial
  evaluation, domain summation, roundPoly, OracleInterface instances
- Defs.lean: shared algebraic core (RoundClaim, summation domain,
  round spec with role decoration)
- SingleRound.lean: one-round spec, honest prover step, verifier step
- General.lean: n-round stateChain composition, full spec/roles,
  reduction via stateChainCompUniform
- Oracle.lean: oracle decoration, verifier step stub (sorry)

Made-with: Cursor
Regenerate the umbrella import file to include new StateChain and
Sumcheck/Interaction modules. Update PORTING.md architecture section
and phase descriptions to reflect the Chain/StateChain naming, the
merged intrinsic reduction layer, and initial Sumcheck progress.

Made-with: Cursor
… and theorems

Replace every `show ... from by simpa using` cast pattern with named
recursive transport functions `Transcript.packAppend` / `unpackAppend`.
Rewrite `Reduction.comp` to use non-flat `Strategy.compWithRoles` +
`Counterpart.append`, add bridge lemma
`Counterpart.append_eq_appendFlat_mapOutput`, and reprove
`completeness_comp` / `soundness_comp` against the new structure.
Update PORTING.md with Phase 4d progress.

Made-with: Cursor
Return the next statement alongside the next witness so composed reductions can enforce prover/verifier statement agreement in completeness and reuse the same transport across the oracle and sumcheck interaction layers.

Made-with: Cursor
AI-authored by Codex (GPT-5) on behalf of Quang Dao.
quangvdao and others added 28 commits April 7, 2026 12:19
Made-with: Cursor

# Conflicts:
#	ArkLib/ProofSystem/Fri/RoundConsistency.lean
Move 50 files (Basic/*, TwoParty/*, Concurrent/*, Multiparty/*) from
ArkLib/Interaction/ to VCVio/Interaction/. These are pure interaction
theory modules with no reduction/oracle-specific dependencies.

Kept files (Reduction, Security, Oracle/*, Boundary/*, FiatShamir/*)
now import from VCVio.Interaction instead of ArkLib.Interaction.
VCVio dependency updated to quang/interaction-migration branch.

Made-with: Cursor
Implement the duplex sponge instantiation of the Fiat-Shamir transform
for the interaction-native formalization. The basic FS transform is
parametric in the ReplayOracle; this constructs a specific ReplayOracle
from a duplex sponge with a concrete permutation.

New definitions:
- SpongeAnnotation: per-node serialization metadata (serialize at sender
  nodes, squeeze length + deserialize at receiver nodes)
- buildSpongeReplayOracle: thread a CanonicalDuplexSponge through the
  Spec tree to produce a ReplayOracle
- spongeReplayOracle / toFSStatement: statement initialization wrappers
- Prover/PublicCoinVerifier/PublicCoinReduction.duplexSpongeFiatShamir:
  the full transform, composing with the existing basic FS machinery

Made-with: Cursor
Commitment scheme cutover to new Interaction.Opening interface,
streamline oracle decoration and security theorem infrastructure,
and update boundary modules for compatibility.

Made-with: Cursor
Introduce HybridSpec (branching + pass-through nodes), partial BCS
via CommitDeco, HybridDecoration for mixed plain/oracle senders,
PublicQueryVerifier decomposition, and Phase 1/2 infrastructure.
Delete the old OracleReduction/BCS/Basic.lean skeleton.

Made-with: Cursor
Add blueprint formulation for BCS transformation on hybrid oracle
reductions, CDHZ reference, and update wiki with new BCS modules.

Made-with: Cursor
Introduce Oracle.Spec, a new inductive type (.done, .public, .oracle)
that structurally distinguishes public and oracle messages, giving
definitional independence of downstream types from oracle message values.

New files:
- Spec.lean: core inductive, RoleDeco, OracleDeco, PublicTranscript,
  QueryHandle, toOracleSpec, restrictLeft/restrictRight
- Composition.lean: Reduction.id, comp, freezeSharedToPUnit, pullbackShared
- Bridge.lean: conversion from old Interaction.Spec + OracleDecoration
- BCS.lean: BCS transform directly on Oracle.Spec (CommitDeco,
  SharedTranscript, bcsSpec, wrapWithCommitments, PublicQueryVerifier)

Modified files:
- Core.lean: Oracle.Prover, Oracle.Verifier, Oracle.Reduction structures
- Execution.lean: Spec.runWithOracleCounterpart, Reduction.executeConcrete
- ArkLib.lean: imports for new modules

Made-with: Cursor
- Remove accSpec parameter from Oracle.Verifier.toFun, hardcode to []ₒ
- Add liftCounterpartAcc helper to lift counterpart accumulated oracle
  specs in composition (no sorry)
- Rewrite completeness with OutputRealizes conjunct
- Rewrite knowledgeSoundness: adversarial prover outputs oStmtOut,
  extractor sees concrete oracle data
- Add oStmtOut parameter to Extractor.Straightline
- Remove duplicate Verifier.InputRelation/OutputRelation/Accepts
- Inline Accepts into soundness definition
- Update blueprint security section to match new definitions

Made-with: Cursor
…s hypothesis

- Add answerCommittedQueries: compute committed oracle responses from
  a full transcript (deterministic, pure)
- Add bcsPhase2: evaluate PublicQueryVerifier.decide with pre-computed
  query data
- Strengthen hLangOut in knowledgeSoundness_implies_soundness to include
  OutputRealizes conjunct (required for the proof to go through)
- Add detailed proof strategy comment for KS→soundness

Made-with: Cursor
- Add OpeningDeco structure to Oracle/BCS.lean: generic opening proof
  data for committed oracle nodes, parameterized by OpeningProof type
- Update PORTING.md with comprehensive Oracle.Spec layer status:
  file inventory, design decisions, updated TODO list
- Update KS→soundness open question to reflect new formulation

Made-with: Cursor
- Add N-ary chain composition (Oracle/Chain.lean) with Spec.Chain,
  Chain.Prover.comp, Chain.Verifier.comp, and Reduction.ofChain
- Prove Spec.runWithOracleCounterpart_mapOutputWithRoles in Execution.lean
- Prove knowledgeSoundness_implies_soundness in Security.lean (no sorry)
- Rename for maximal namespacing: Prover.compAux, Verifier.compAux,
  Verifier.retargetMonads, Counterpart.liftAcc

Made-with: Cursor
The acceptOStmt/acceptWitness approach is circular: it asks the caller
to supply concrete oracle realizations, which is the "knowledge" that
KS should extract. Revert to sorry with honest existential statement
and document the difficulty. Delete the legacy version in
OracleSecurity.lean which had the same flaw.

Made-with: Cursor
Introduce Counterpart.mapOracles as the structural combinator for
oracle-counterpart monad rewriting with a per-receiver reroute.

Refactor liftAcc and Verifier.retargetMonads as thin wrappers; adjust
Security proofs and statements to match.

Made-with: Cursor
Restore local proofs and explicit query routing after the main merge,
while keeping the remaining documented proof gaps isolated.

Made-with: Cursor
Removes every file introduced by the core-rebuild branch outside this
slice, so the branch's diff against main is exactly this cumulative
slice while preserving the full core-rebuild commit history.
Removes every file introduced by the core-rebuild branch outside this
slice, so the branch's diff against main is exactly this cumulative
slice while preserving the full core-rebuild commit history.
#3)

Removes every file introduced by the core-rebuild branch outside this
slice, so the branch's diff against main is exactly this cumulative
slice while preserving the full core-rebuild commit history.
@github-actions

Copy link
Copy Markdown
Contributor

🤖 PR Summary

Mathematical Formalization

Formalizes degree-bounded univariate and multivariate computable polynomials (CompPoly) and their integration into the Sumcheck protocol. Includes verified helpers for partial evaluation, summation over finite domains, and round polynomial construction. Bridges these foundations to the interaction layer via ResidualPoly for tracking polynomial state across rounds.

Interaction Framework & Oracle System

Establishes an interaction-native framework for oracle-based protocols based on interaction trees:

  • Oracle.Spec: Inductive type for formalizing public and oracle-based message types.
  • Composition Machinery: Infrastructure for sequential and stateful protocol chains (Chain, StateChain), supporting reindexing, freezing, and oracle input pullbacks.
  • Execution Logic: Defines runWithOracleCounterpart and executeConcrete to thread oracle contexts through prover-verifier interactions, connecting high-level specifications to the VCVio computation model.

Proof System Implementation

Refactors the Sumcheck protocol to utilize interaction-native reductions:

  • Stateless and stateful variants for single-round and $n$-round Sumcheck prover and verifier.
  • Oracle-native verifier steps treating prover messages as queryable oracles.
  • Integration with the OracleReduction interface.

Warning: Placeholder Theorems

The file ArkLib/ProofSystem/Sumcheck/Interaction/General.lean contains sorry placeholders for protocol completeness and soundness theorems. These stubs represent incomplete formal proofs within the new interaction-tree framework.


Statistics

Metric Count
📝 Files Changed 19
Lines Added 10491
Lines Removed 1

Lean Declarations

✏️ **Added:** 306 declaration(s)
  • def appendPublicTranscript (n : Nat) (c : Chain (n + 1)) in ArkLib/Interaction/Oracle/Chain.lean
  • def promoteStatementToShared in ArkLib/Interaction/Oracle/Continuation.lean
  • abbrev stateChainFamily in ArkLib/Interaction/Reduction.lean
  • theorem OracleReduction.executePublic_eq_map_execute in ArkLib/Interaction/Oracle/Execution.lean
  • def verifierOutput in ArkLib/Interaction/Oracle/Core.lean
  • def QueryHandle.splitAppend : in ArkLib/Interaction/Oracle/Spec.lean
  • theorem runWithOracleCounterpart_mapOutputWithRoles in ArkLib/Interaction/Oracle/Execution.lean
  • abbrev PolyStmt (R : Type) [BEq R] [CommSemiring R] [LawfulBEq R] in ArkLib/ProofSystem/Sumcheck/Interaction/Defs.lean
  • def appendLeft : in ArkLib/Interaction/Oracle/Core.lean
  • theorem toOracleSpec_appendLeft : in ArkLib/Interaction/Oracle/Spec.lean
  • def mapOutputWithRoles {m : Type u → Type u} [Functor m] : in ArkLib/Interaction/Reduction.lean
  • def toMonadDecoration {ι : Type} (oSpec : OracleSpec.{0, 0} ι) in ArkLib/Interaction/Oracle/Spec.lean
  • theorem roundPoly_eval (D : Fin m → R) (k : ℕ) (p : CMvPolynomial (k + 1) R) (x : R) : in ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean
  • def runWithOracleCounterpart in ArkLib/Interaction/Oracle/Execution.lean
  • def HonestPubliclyEquivalent in ArkLib/Interaction/Oracle/Execution.lean
  • theorem simulateQ_liftAppendRightContext_eq in ArkLib/Interaction/Oracle/Core.lean
  • noncomputable def roundContinuationOption in ArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.lean
  • noncomputable def ofRoleDecoration in ArkLib/Interaction/Oracle/Bridge.lean
  • theorem packAppend_unpackAppend (s₁ : Spec) (s₂ : Transcript s₁ → Spec) in ArkLib/Interaction/Reduction.lean
  • def retargetMonads in ArkLib/Interaction/Oracle/Composition.lean
  • abbrev stateChainCompWithRoles {m : Type u → Type u} [Monad m] in ArkLib/Interaction/Reduction.lean
  • def appendFlat {m : Type u → Type u} [Monad m] in ArkLib/Interaction/Reduction.lean
  • def partialEvalLast (a : R) (p : CMvPolynomial (n + 1) R) : CMvPolynomial n R in ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean
  • theorem appendRight_range : in ArkLib/Interaction/Oracle/Core.lean
  • def QueryHandle.appendLeft : in ArkLib/Interaction/Oracle/Spec.lean
  • def PublicTranscript.liftAppend : in ArkLib/Interaction/Oracle/Spec.lean
  • abbrev stmt {StatementOut : Type u} {WitnessOut : Type v} in ArkLib/Interaction/Reduction.lean
  • theorem simulate_compFlat {ι : Type} {oSpec : OracleSpec ι} in ArkLib/Interaction/Oracle/Continuation.lean
  • abbrev stateChainComp {m : Type u → Type u} [Monad m] in ArkLib/Interaction/Reduction.lean
  • def Counterpart.ofChain {m : Type u → Type u} [Monad m] in ArkLib/Interaction/Reduction.lean
  • abbrev liftAppendOracleFamily in ArkLib/Interaction/Oracle/Execution.lean
  • def outputFamily in ArkLib/Interaction/Oracle/Continuation.lean
  • theorem fromCMvPolynomial_bind₁ {m : ℕ} in ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean
  • abbrev unpackAppend (s₁ : Spec) (s₂ : Transcript s₁ → Spec) in ArkLib/Interaction/Reduction.lean
  • noncomputable def oracleVerifierStep in ArkLib/ProofSystem/Sumcheck/Interaction/Oracle.lean
  • def answerSplitLiftAppendQueryAppend in ArkLib/Interaction/Oracle/Execution.lean
  • abbrev liftAppendProd (s₁ : Spec) (s₂ : Transcript s₁ → Spec) in ArkLib/Interaction/Reduction.lean
  • theorem roundOracleReduction_honestExecutionEquivalentStateful in ArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.lean
  • def toSpec : (n : Nat) → Chain n → Oracle.Spec in ArkLib/Interaction/Oracle/Chain.lean
  • private def chainVerifier in ArkLib/Interaction/Oracle/Continuation.lean
  • abbrev OracleProver {ι : Type} (oSpec : OracleSpec.{0, 0} ι) in ArkLib/Interaction/Oracle/Core.lean
  • def RoundCheckProp {m_dom : ℕ} (D : Fin m_dom → R) (target : RoundClaim R) in ArkLib/ProofSystem/Sumcheck/Interaction/Defs.lean
  • def splitPublicTranscript (n : Nat) (c : Chain (n + 1)) : in ArkLib/Interaction/Oracle/Chain.lean
  • def PublicTranscript.packAppend : in ArkLib/Interaction/Oracle/Spec.lean
  • def verifierQueryCMvPolynomial (points : Fin n → R) : in ArkLib/Data/CompPoly/Basic.lean
  • private lemma partialEvalLast_subst_degreeOf_le [Nontrivial R] (a : R) in ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean
  • theorem partialEvalLast_degreeOf_le [Nontrivial R] {deg : ℕ} (a : R) in ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean
  • def currentRoundResidual {n prefixLen : Nat} (h : prefixLen < n) in ArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.lean
  • def Reduction.freezeSharedToPUnit in ArkLib/Interaction/Oracle/Composition.lean
  • def compAux in ArkLib/Interaction/Oracle/Composition.lean
  • abbrev mapReceiver {m : Type u → Type u} [Functor m] in ArkLib/Interaction/Reduction.lean
  • def statementResult {m_dom : Nat} (D : Fin m_dom → R) : in ArkLib/ProofSystem/Sumcheck/Interaction/Defs.lean
  • def Verifier.run in ArkLib/Interaction/Oracle/Execution.lean
  • abbrev liftAppend (s₁ : Spec) (s₂ : Transcript s₁ → Spec) in ArkLib/Interaction/Reduction.lean
  • abbrev Verifier (m : Type u → Type u) in ArkLib/Interaction/Reduction.lean
  • private noncomputable def sumcheckContinuation in ArkLib/ProofSystem/Sumcheck/Interaction/General.lean
  • def forgetExecuteWitness in ArkLib/Interaction/Oracle/Execution.lean
  • theorem Reduction.execute_comp in ArkLib/Interaction/Reduction.lean
  • theorem Spec.runWithOracleCounterpart_mapOutputWithRoles in ArkLib/Interaction/Oracle/Execution.lean
  • def mapOracles in ArkLib/Interaction/Oracle/Composition.lean
  • def mapExecuteWitness in ArkLib/Interaction/Oracle/Execution.lean
  • def OracleDeco : Oracle.Spec → Type 1 in ArkLib/Interaction/Oracle/Spec.lean
  • theorem simulateQ_cast in ArkLib/Interaction/Oracle/Core.lean
  • theorem toInteractionSpec_append : in ArkLib/Interaction/Oracle/Spec.lean
  • def Strategy.ofChain {m : Type u → Type u} [Monad m] in ArkLib/Interaction/Reduction.lean
  • theorem sumOverLast_degreeOf_zero_le [Nontrivial R] {deg : ℕ} (D : Fin m → R) in ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean
  • def CMvDegreeLE in ArkLib/Data/CompPoly/Basic.lean
  • abbrev InteractiveOracleVerifier {ι : Type} (oSpec : OracleSpec.{0, 0} ι) in ArkLib/Interaction/Oracle/Core.lean
  • abbrev withRoles (m : Type u → Type u) in ArkLib/Interaction/Reduction.lean
  • theorem roundOracleReduction_execute_eq_stateful in ArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.lean
  • def restrictRight {r : Type → Type} [Monad r] : in ArkLib/Interaction/Oracle/Spec.lean
  • abbrev OracleStatement {ιₛ : Type v} (OStmt : ιₛ → Type w) in ArkLib/Interaction/Oracle/Core.lean
  • theorem roundProverStep_map_fst in ArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.lean
  • private def chainStrategy in ArkLib/Interaction/Oracle/Continuation.lean
  • def toReduction {m : Type u → Type u} [Monad m] in ArkLib/Interaction/Reduction.lean
  • theorem answerQuery_appendRight : in ArkLib/Interaction/Oracle/Core.lean
  • private def compFlat {ι : Type} {oSpec : OracleSpec ι} in ArkLib/Interaction/Oracle/Continuation.lean
  • def liftAppendRightQuery : in ArkLib/Interaction/Oracle/Core.lean
  • def OracleDecoration.answerQuery : in ArkLib/Interaction/Oracle/Core.lean
  • def append : (s₁ : Oracle.Spec) → (PublicTranscript s₁ → Oracle.Spec) → Oracle.Spec in ArkLib/Interaction/Oracle/Spec.lean
  • def sumAllButFirst (D : Fin m → R) : (k : ℕ) → CMvPolynomial (k + 1) R → CMvPolynomial 1 R in ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean
  • theorem roundProverStepStateful_fromResidual in ArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.lean
  • theorem partialEvalFirst_individualDegreeLE [Nontrivial R] {deg : ℕ} (a : R) in ArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.lean
  • def CRingHom : R →+* CPolynomial R where in ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean
  • theorem toUnivariate_eval (p : CMvPolynomial 1 R) (x : R) : in ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean
  • def challengePrefix (n : Nat) (tr : Spec.Transcript (fullSpec R deg n)) : in ArkLib/ProofSystem/Sumcheck/Interaction/Defs.lean
  • abbrev roundChallenge (tr : Spec.Transcript (roundSpec R deg)) : in ArkLib/ProofSystem/Sumcheck/Interaction/Defs.lean
  • theorem simulateQ_ext in ArkLib/Interaction/Oracle/Core.lean
  • def toVerifier {m : Type u → Type u} [Monad m] in ArkLib/Interaction/Reduction.lean
  • theorem PublicTranscript.liftAppend_append : in ArkLib/Interaction/Oracle/Spec.lean
  • theorem appendLeft_range : in ArkLib/Interaction/Oracle/Core.lean
  • def answerQuery : in ArkLib/Interaction/Oracle/Spec.lean
  • def roundSpec : Spec in ArkLib/ProofSystem/Sumcheck/Interaction/Defs.lean
  • def PublicTranscript.append : in ArkLib/Interaction/Oracle/Spec.lean
  • private def retargetContinuationVerifier in ArkLib/Interaction/Oracle/Continuation.lean
  • theorem answerSplitLiftAppendQueryAppend_simOracle0 in ArkLib/Interaction/Oracle/Execution.lean
  • theorem roundContinuationOption_proverEq_stateful in ArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.lean
  • def projectPublic : in ArkLib/Interaction/Oracle/Spec.lean
  • theorem roundOracleReduction_executePublic_eq_stateful in ArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.lean
  • theorem partialEvalLast_eval (a : R) (p : CMvPolynomial (n + 1) R) (v : Fin n → R) : in ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean
  • private def stateChainVerifier in ArkLib/Interaction/Oracle/StateChain.lean
  • theorem unpackAppend_packAppend (s₁ : Spec) (s₂ : Transcript s₁ → Spec) in ArkLib/Interaction/Reduction.lean
  • theorem splitLiftAppendOracleRange_eq in ArkLib/Interaction/Oracle/Execution.lean
  • def HonestExecutionEquivalent in ArkLib/Interaction/Oracle/Execution.lean
  • theorem mapOutput_done in ArkLib/Interaction/Reduction.lean
  • def liftAppendLeftQuery : in ArkLib/Interaction/Oracle/Core.lean
  • def liftAppendLeftContext : in ArkLib/Interaction/Oracle/Core.lean
  • theorem runWithOracleCounterpart_mapCounterpartOutput in ArkLib/Interaction/Oracle/Execution.lean
  • def PublicTranscript.split : in ArkLib/Interaction/Oracle/Spec.lean
  • def OracleDecoration.toOracleSpec : in ArkLib/Interaction/Oracle/Core.lean
  • def fullSum {n : ℕ} {m_dom : ℕ} (D : Fin m_dom → R) (poly : PolyStmt R deg n) : R in ArkLib/ProofSystem/Sumcheck/Interaction/Defs.lean
  • def freezeSharedToPUnit in ArkLib/Interaction/Oracle/Continuation.lean
  • theorem roundContinuation_publicEq_stateful in ArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.lean
  • theorem simulateQ_map in ArkLib/Interaction/Oracle/Execution.lean
  • def OracleDecoration.QueryHandle : in ArkLib/Interaction/Oracle/Core.lean
  • theorem projectPublic_transcriptAppend : in ArkLib/Interaction/Oracle/Spec.lean
  • theorem roundProverStep_map_residualWitness in ArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.lean
  • def stepResidual (chal : R) in ArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.lean
  • theorem simulateQ_cast_dep in ArkLib/Interaction/Oracle/Core.lean
  • theorem OracleReduction.HonestExecutionEquivalent.toPublic in ArkLib/Interaction/Oracle/Execution.lean
  • def run in ArkLib/Interaction/Oracle/Continuation.lean
  • private def currentResidualGo : in ArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.lean
  • theorem simulateQ_liftAppendRightContext_eq_of_impl in ArkLib/Interaction/Oracle/Core.lean
  • def roundCheck {m_dom : ℕ} (D : Fin m_dom → R) (target : RoundClaim R) in ArkLib/ProofSystem/Sumcheck/Interaction/Defs.lean
  • def Reduction.comp {m : Type u → Type u} [Monad m] in ArkLib/Interaction/Reduction.lean
  • theorem toUnivariate_toPoly (p : CMvPolynomial 1 R) : in ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean
  • private theorem simulateQ_liftAppendRightContext_withImpl_eq in ArkLib/Interaction/Oracle/Continuation.lean
  • def comp {ι : Type} {oSpec : OracleSpec ι} in ArkLib/Interaction/Oracle/Continuation.lean
  • def restrictLeft {r : Type → Type} [Monad r] : in ArkLib/Interaction/Oracle/Spec.lean
  • theorem runWithRoles_mapOutputWithRoles_mapOutput in ArkLib/Interaction/Reduction.lean
  • def toMonadDecoration {ι : Type} (oSpec : OracleSpec.{0, 0} ι) in ArkLib/Interaction/Oracle/Core.lean
  • def appendRight : in ArkLib/Interaction/Oracle/Core.lean
  • def runWithRoles {m : Type u → Type u} [Monad m] in ArkLib/Interaction/Reduction.lean
  • private def residualAtPrefix in ArkLib/ProofSystem/Sumcheck/Interaction/General.lean
  • theorem sumcheckReduction_soundness in ArkLib/ProofSystem/Sumcheck/Interaction/General.lean
  • def toSpec : {n : Nat} → Chain n → Spec in ArkLib/Interaction/Oracle/Continuation.lean
  • private theorem simulateQ_liftSimulatedMidOracleContextContinuation_eq in ArkLib/Interaction/Oracle/Continuation.lean
  • def Reduction.executeConcrete in ArkLib/Interaction/Oracle/Execution.lean
  • def advance in ArkLib/ProofSystem/Sumcheck/Interaction/Defs.lean
  • def toVerifier in ArkLib/Interaction/Oracle/Core.lean
  • private def consumeResidual : in ArkLib/ProofSystem/Sumcheck/Interaction/General.lean
  • def PublicTranscript.unliftAppend : in ArkLib/Interaction/Oracle/Spec.lean
  • theorem mapOutputWithRoles_eq_focal_mapOutput {m : Type u → Type u} [Functor m] : in ArkLib/Interaction/Reduction.lean
  • def compWithRoles {m : Type u → Type u} [Monad m] in ArkLib/Interaction/Reduction.lean
  • theorem sumOverLast_eval (D : Fin m → R) (p : CMvPolynomial (n + 1) R) (v : Fin n → R) : in ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean
  • abbrev verifierMD in ArkLib/Interaction/Oracle/Core.lean
  • def mapOutput in ArkLib/Interaction/Reduction.lean
  • def runConcrete in ArkLib/Interaction/Oracle/Execution.lean
  • private theorem consumeResidual_replicateCons in ArkLib/ProofSystem/Sumcheck/Interaction/General.lean
  • abbrev RoundClaim in ArkLib/ProofSystem/Sumcheck/Interaction/Defs.lean
  • abbrev OracleDecoration (spec : Spec) (roles : RoleDecoration spec) in ArkLib/Interaction/Oracle/Core.lean
  • def id in ArkLib/Interaction/Oracle/Continuation.lean
  • theorem rel_unliftAppend_append (s₁ : Spec) (s₂ : Transcript s₁ → Spec) in ArkLib/Interaction/Reduction.lean
  • abbrev liftAppendOracleIdx in ArkLib/Interaction/Oracle/Execution.lean
  • theorem simulateQ_cast_query in ArkLib/Interaction/Oracle/Core.lean
  • def transcriptAppend : in ArkLib/Interaction/Oracle/Spec.lean
  • def collapseAppendOracleComp in ArkLib/Interaction/Oracle/Execution.lean
  • def chainComp in ArkLib/Interaction/Oracle/Continuation.lean
  • theorem toUnivariate_natDegree_le {deg : ℕ} in ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean
  • def roundProverStepStateful (m : Type → Type) [Monad m] in ArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.lean
  • instance instOracleInterfaceCMvDegreeLE : in ArkLib/Data/CompPoly/Basic.lean
  • theorem partialEvalFirst_eval (a : R) (p : CMvPolynomial (n + 1) R) (v : Fin n → R) : in ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean
  • theorem splitPublicTranscript_appendPublicTranscript (n : Nat) (c : Chain (n + 1)) in ArkLib/Interaction/Oracle/Chain.lean
  • def Reduction.id in ArkLib/Interaction/Oracle/Composition.lean
  • instance instOracleInterfaceCMvPolynomial : in ArkLib/Data/CompPoly/Basic.lean
  • theorem simulate_comp {ι : Type} {oSpec : OracleSpec ι} in ArkLib/Interaction/Oracle/Continuation.lean
  • def splitLiftAppendOracleQuery in ArkLib/Interaction/Oracle/Execution.lean
  • noncomputable def sumcheckReduction in ArkLib/ProofSystem/Sumcheck/Interaction/General.lean
  • theorem partialEvalFirst_degreeOf_le [Nontrivial R] {deg : ℕ} (a : R) in ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean
  • theorem sumAllButFirst_degreeOf_zero_le [Nontrivial R] {deg : ℕ} (D : Fin m → R) : in ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean
  • private lemma partialEvalLast_eval₂_degreeOf_le [Nontrivial R] {deg : ℕ} in ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean
  • private def snocRoundTranscript (prefixLen : Nat) in ArkLib/ProofSystem/Sumcheck/Interaction/General.lean
  • private def snocFunEquiv (k m : ℕ) : ((Fin k → Fin m) × Fin m) ≃ (Fin (k + 1) → Fin m) where in ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean
  • def roundProverStep (m : Type → Type) [Monad m] in ArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.lean
  • noncomputable example : in ArkLib/ProofSystem/Sumcheck/Interaction/Examples.lean
  • private noncomputable def tailContinuationStateful in ArkLib/ProofSystem/Sumcheck/Interaction/General.lean
  • abbrev fullRoles (n : Nat) : RoleDecoration (fullSpec R deg n) in ArkLib/ProofSystem/Sumcheck/Interaction/Defs.lean
  • abbrev PolyFamily (R : Type) [BEq R] [CommSemiring R] [LawfulBEq R] in ArkLib/ProofSystem/Sumcheck/Interaction/Defs.lean
  • @[simp] theorem toSpec_zero (c : Chain 0) : toSpec 0 c = .done in ArkLib/Interaction/Oracle/Chain.lean
  • noncomputable def ofOracleDecoration in ArkLib/Interaction/Oracle/Bridge.lean
  • abbrev fullSpec (n : Nat) : Spec in ArkLib/ProofSystem/Sumcheck/Interaction/Defs.lean
  • abbrev roundTranscript (n : Nat) in ArkLib/ProofSystem/Sumcheck/Interaction/Defs.lean
  • def Verifier.run {m : Type u → Type u} [Monad m] in ArkLib/Interaction/Reduction.lean
  • def liftAppendRightContext : in ArkLib/Interaction/Oracle/Core.lean
  • theorem PublicTranscript.append_split : in ArkLib/Interaction/Oracle/Spec.lean
  • theorem PublicTranscript.liftAppend_split : in ArkLib/Interaction/Oracle/Spec.lean
  • def executePublicConcrete in ArkLib/Interaction/Oracle/Execution.lean
  • private lemma partialEvalFirst_eval₂_monomial_degreeOf_le [Nontrivial R] {deg : ℕ} in ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean
  • def liftOutput in ArkLib/Interaction/Oracle/Core.lean
  • theorem toMonadDecoration_append in ArkLib/Interaction/Oracle/Execution.lean
  • abbrev PublicCoinCounterpart (m : Type u → Type u) in ArkLib/Interaction/Reduction.lean
  • def Reduction.execute {m : Type u → Type u} [Monad m] in ArkLib/Interaction/Reduction.lean
  • abbrev LawfulCommMonad (m : Type u → Type u) [Monad m] in ArkLib/Interaction/Reduction.lean
  • theorem roundOracleReduction_honestPubliclyEquivalentStateful in ArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.lean
  • private lemma partialEvalLast_eval₂_monomial_degreeOf_le [Nontrivial R] {deg : ℕ} in ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean
  • abbrev unliftAppend (s₁ : Spec) (s₂ : Transcript s₁ → Spec) in ArkLib/Interaction/Reduction.lean
  • private def liftSimulatedMidOracleContextContinuation in ArkLib/Interaction/Oracle/Continuation.lean
  • instance instOracleInterfaceCDegreeLE [Semiring R] : in ArkLib/Data/CompPoly/Basic.lean
  • def roundPoly (D : Fin m → R) (k : ℕ) (p : CMvPolynomial (k + 1) R) : CPolynomial R in ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean
  • private lemma partialEvalFirst_eval₂_degreeOf_le [Nontrivial R] {deg : ℕ} in ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean
  • theorem PublicTranscript.split_append : in ArkLib/Interaction/Oracle/Spec.lean
  • def honestRoundPolyAtPrefix {m_dom : ℕ} (D : Fin m_dom → R) in ArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.lean
  • abbrev Prover (m : Type u → Type u) in ArkLib/Interaction/Reduction.lean
  • def Chain : Nat → Type 1 in ArkLib/Interaction/Oracle/Chain.lean
  • def Reduction.ofChain in ArkLib/Interaction/Oracle/Chain.lean
  • def liftAcc in ArkLib/Interaction/Oracle/Composition.lean
  • def toRoles : (n : Nat) → (c : Chain n) → RoleDeco (toSpec n c) in ArkLib/Interaction/Oracle/Chain.lean
  • def executeConcrete in ArkLib/Interaction/Oracle/Execution.lean
  • theorem roundPoly_natDegree_le {deg : ℕ} (D : Fin m → R) {k : ℕ} in ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean
  • abbrev packAppend (s₁ : Spec) (s₂ : Transcript s₁ → Spec) in ArkLib/Interaction/Reduction.lean
  • theorem roundProverStep_map_honestProverOutputWitness in ArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.lean
  • def roundOracleDecoration : in ArkLib/ProofSystem/Sumcheck/Interaction/Oracle.lean
  • instance instOracleInterfaceCPolynomial [Nontrivial R] : in ArkLib/Data/CompPoly/Basic.lean
  • theorem answerSplitLiftAppendQueryAppend_eq in ArkLib/Interaction/Oracle/Execution.lean
  • abbrev VerifierOutput in ArkLib/Interaction/Oracle/Core.lean
  • def QueryHandle.routeLeft : in ArkLib/Interaction/Oracle/Spec.lean
  • noncomputable def roundContinuationOptionStateful in ArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.lean
  • def outputAtEnd in ArkLib/Interaction/Oracle/Continuation.lean
  • abbrev withMonads (spec : Spec) (roles : RoleDecoration spec) in ArkLib/Interaction/Reduction.lean
  • theorem simulateQ_liftAppendLeftContext_eq in ArkLib/Interaction/Oracle/Core.lean
  • private noncomputable def tailContinuation in ArkLib/ProofSystem/Sumcheck/Interaction/General.lean
  • noncomputable def roundOracleReduction in ArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.lean
  • theorem append_split (s₁ : Spec) (s₂ : Transcript s₁ → Spec) in ArkLib/Interaction/Reduction.lean
  • abbrev Prover {ι : Type} (oSpec : OracleSpec.{0, 0} ι) in ArkLib/Interaction/Oracle/Core.lean
  • abbrev wit {StatementOut : Type u} {WitnessOut : Type v} in ArkLib/Interaction/Reduction.lean
  • def Reduction.comp in ArkLib/Interaction/Oracle/Composition.lean
  • def currentResidual {n prefixLen : Nat} (h : prefixLen ≤ n) in ArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.lean
  • def toCounterpart {m : Type u → Type u} [Monad m] in ArkLib/Interaction/Reduction.lean
  • def run in ArkLib/Interaction/Oracle/Execution.lean
  • def sumOverLast (D : Fin m → R) (p : CMvPolynomial (n + 1) R) : CMvPolynomial n R in ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean
  • def toOracleDeco : (n : Nat) → (c : Chain n) → OracleDeco (toSpec n c) in ArkLib/Interaction/Oracle/Chain.lean
  • private noncomputable def sumcheckContinuationStateful in ArkLib/ProofSystem/Sumcheck/Interaction/General.lean
  • theorem sumcheckReduction_completeness in ArkLib/ProofSystem/Sumcheck/Interaction/General.lean
  • def answerSplitLiftAppendQuery in ArkLib/Interaction/Oracle/Execution.lean
  • noncomputable def roundOracleReductionStateful in ArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.lean
  • def toUnivariate (p : CMvPolynomial 1 R) : CPolynomial R in ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean
  • def IndividualDegreeLE (deg : ℕ) (p : CMvPolynomial n R) : Prop in ArkLib/Data/CompPoly/Basic.lean
  • def od : {n : Nat} → (c : Chain n) → OracleDecoration (toSpec c) (roles c) in ArkLib/Interaction/Oracle/Continuation.lean
  • private theorem simulateQ_liftSimulatedMidOracleContext_eq in ArkLib/Interaction/Oracle/Continuation.lean
  • def QueryHandle : in ArkLib/Interaction/Oracle/Spec.lean
  • def RoleDeco.append : in ArkLib/Interaction/Oracle/Spec.lean
  • def partialEvalFirst (a : R) (p : CMvPolynomial (n + 1) R) : CMvPolynomial n R in ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean
  • theorem answerQuery_appendLeft : in ArkLib/Interaction/Oracle/Core.lean
  • def OracleDeco.append : in ArkLib/Interaction/Oracle/Spec.lean
  • def PublicTranscript : Oracle.Spec → Type in ArkLib/Interaction/Oracle/Spec.lean
  • def Reduction.ofChain {m : Type u → Type u} [Monad m] in ArkLib/Interaction/Reduction.lean
  • def Reduction.toVerifier in ArkLib/Interaction/Oracle/Core.lean
  • theorem split_append (s₁ : Spec) (s₂ : Transcript s₁ → Spec) in ArkLib/Interaction/Reduction.lean
  • def OracleDecoration.oracleContextImpl in ArkLib/Interaction/Oracle/Core.lean
  • def accImplAfter : in ArkLib/Interaction/Oracle/Execution.lean
  • abbrev OracleCounterpart {ι : Type} (oSpec : OracleSpec.{0, 0} ι) in ArkLib/Interaction/Oracle/Core.lean
  • private def compSimulate in ArkLib/Interaction/Oracle/Continuation.lean
  • def QueryHandle.appendRight : in ArkLib/Interaction/Oracle/Spec.lean
  • def honestRoundPoly {m_dom : ℕ} (D : Fin m_dom → R) in ArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.lean
  • theorem verifierQueryCMvPolynomial_run (poly : CMvPolynomial n R) (points : Fin n → R) : in ArkLib/Data/CompPoly/Basic.lean
  • private def liftSimulatedMidOracleContext in ArkLib/Interaction/Oracle/Continuation.lean
  • def OracleCounterpart.mapOutput {ι : Type} {oSpec : OracleSpec.{0, 0} ι} in ArkLib/Interaction/Oracle/Core.lean
  • def Decoration.ofChain {S : Type u → Type v} in ArkLib/Interaction/Reduction.lean
  • def comp in ArkLib/Interaction/Oracle/Chain.lean
  • theorem sumAllButFirst_eval (D : Fin m → R) : in ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean
  • def roles : {n : Nat} → (c : Chain n) → RoleDecoration (toSpec c) in ArkLib/Interaction/Oracle/Continuation.lean
  • abbrev roles in ArkLib/Interaction/Reduction.lean
  • theorem simulateQ_cast_spec in ArkLib/Interaction/Oracle/Core.lean
  • noncomputable def ofInteractionSpec in ArkLib/Interaction/Oracle/Bridge.lean
  • def toSpecRoles : (s : Oracle.Spec) → RoleDeco s → RoleDecoration s.toInteractionSpec in ArkLib/Interaction/Oracle/Spec.lean
  • def Reduction.pullbackShared in ArkLib/Interaction/Oracle/Composition.lean
  • def outputFamily in ArkLib/Interaction/Oracle/Chain.lean
  • theorem mapOutput_id {m : Type u → Type u} [Functor m] [LawfulFunctor m] in ArkLib/Interaction/Reduction.lean
  • abbrev fullOD (n : Nat) : in ArkLib/ProofSystem/Sumcheck/Interaction/General.lean
  • private def stateChainCompConcrete {ι : Type} {oSpec : OracleSpec ι} in ArkLib/Interaction/Oracle/StateChain.lean
  • noncomputable def oracleVerifierStepOption in ArkLib/ProofSystem/Sumcheck/Interaction/Oracle.lean
  • noncomputable def roundContinuationStateful in ArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.lean
  • theorem OracleReduction.mapExecuteWitness_eq_execute_mappedOutput in ArkLib/Interaction/Oracle/Execution.lean
  • abbrev Proof (m : Type u → Type u) in ArkLib/Interaction/Reduction.lean
  • private lemma partialEvalFirst_subst_degreeOf_le [Nontrivial R] (a : R) in ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean
  • theorem liftM_cast_query_add_right in ArkLib/Interaction/Oracle/Core.lean
  • def Spec.runWithOracleCounterpart in ArkLib/Interaction/Oracle/Execution.lean
  • def OracleReduction.stateChainComp {ι : Type} {oSpec : OracleSpec ι} in ArkLib/Interaction/Oracle/StateChain.lean
  • abbrev PublicCoinVerifier (m : Type u → Type u) in ArkLib/Interaction/Reduction.lean
  • abbrev Counterpart (m : Type u → Type u) in ArkLib/Interaction/Reduction.lean
  • def compWithRolesFlat {m : Type u → Type u} [Monad m] in ArkLib/Interaction/Reduction.lean
  • abbrev split (s₁ : Spec) (s₂ : Transcript s₁ → Spec) in ArkLib/Interaction/Reduction.lean
  • theorem toOracleSpec_appendRight : in ArkLib/Interaction/Oracle/Spec.lean
  • abbrev HonestProverOutput (StatementOut : Type u) (WitnessOut : Type v) in ArkLib/Interaction/Reduction.lean
  • def CDegreeLE (R : Type) [BEq R] [Semiring R] [LawfulBEq R] (d : ℕ) in ArkLib/Data/CompPoly/Basic.lean
  • theorem runWithRoles_compWithRoles_append in ArkLib/Interaction/Reduction.lean
  • def replay {m : Type u → Type u} [Monad m] in ArkLib/Interaction/Reduction.lean
  • theorem simulateQ_cast_query_id in ArkLib/Interaction/Oracle/Core.lean
  • def QueryHandle.routeRight : in ArkLib/Interaction/Oracle/Spec.lean
  • theorem liftAppendOracleFamily_append_eq in ArkLib/Interaction/Oracle/Execution.lean
  • def toInteractionSpec : Oracle.Spec → Interaction.Spec in ArkLib/Interaction/Oracle/Spec.lean
  • def toOracleSpec : in ArkLib/Interaction/Oracle/Spec.lean
  • def append : in ArkLib/Interaction/Reduction.lean
  • noncomputable def sumcheckReductionStateful in ArkLib/ProofSystem/Sumcheck/Interaction/General.lean
  • def roundRoles : RoleDecoration (roundSpec R deg) in ArkLib/ProofSystem/Sumcheck/Interaction/Defs.lean
  • def RoleDeco : Oracle.Spec → Type in ArkLib/Interaction/Oracle/Spec.lean
  • theorem simulateQ_collapseAppendOracleComp in ArkLib/Interaction/Oracle/Execution.lean
  • abbrev roundPoly (tr : Spec.Transcript (roundSpec R deg)) : in ArkLib/ProofSystem/Sumcheck/Interaction/Defs.lean
  • theorem toSpec_succ {n : Nat} (spec : Oracle.Spec) in ArkLib/Interaction/Oracle/Chain.lean
  • def pullbackShared in ArkLib/Interaction/Oracle/Continuation.lean
  • private def liftPrefixOracleContext in ArkLib/Interaction/Oracle/Continuation.lean
  • def accSpecAfter : in ArkLib/Interaction/Oracle/Execution.lean
  • def Reduction.stateChainComp {m : Type u → Type u} [Monad m] in ArkLib/Interaction/Reduction.lean
  • def execute in ArkLib/Interaction/Oracle/Continuation.lean
  • noncomputable example : in ArkLib/ProofSystem/Sumcheck/Interaction/Examples.lean
  • noncomputable def roundContinuation in ArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.lean

sorry Tracking

  • No sorrys were added, removed, or affected.

📋 **Additional Analysis**

Large Contributions

  • Blueprint Recommended: This pull request introduces a significant amount of infrastructure for oracle-decorated interaction and a major refactor of the Sum-check protocol. Given the scale of these changes, it is strongly encouraged to develop or reference a blueprint to align the formalization strategy and dependency graph with the project's roadmap.

Naming Conventions

  • Acronyms as Words: The following declarations should be updated to treat acronyms as words (e.g., Le instead of LE):
    • IndividualDegreeLEindividualDegreeLe (also a predicate, see below).
    • CDegreeLECDegreeLe.
    • CMvDegreeLECMvDegreeLe.
  • Prop-valued Predicates: Declarations that are Prop-valued but not classes should use lowerCamelCase:
    • IndividualDegreeLEindividualDegreeLe (in Data/CompPoly/Basic.lean).
    • RoundCheckProproundCheckProp (in Sumcheck/Interaction/Defs.lean).
  • Term Naming: Functions and terms should use lowerCamelCase:
    • CRingHomcRingHom (in Sumcheck/Interaction/CompPolyHelpers.lean).
  • Namespace Consistency: In Interaction/Oracle/Core.lean, the parameter OStmtIn uses UpperCamelCase. For consistency with terms like oSpec, consider oStmtIn or OstmtIn.

Syntax and Formatting

  • Function Syntax: The style guide prefers the use of the mapsto arrow over => in lambda expressions. Most new files (e.g., Bridge.lean, Spec.lean, Reduction.lean) use fun x =>. Change to fun x ↦.
  • Tactic Mode: The by keyword should be placed at the end of the line preceding the tactic block. Several instances in Interaction/Oracle/Execution.lean place := by on a new line (e.g., lines 316, 349, 386).
  • Empty Lines: Avoid empty lines inside definitions or proofs. There are multiple occurrences inside calc blocks and tactic sequences in Interaction/Oracle/Execution.lean and Interaction/Oracle/Continuation.lean.
  • Indentation:
    • In Data/CompPoly/Basic.lean, the where block for instOracleInterfaceCMvPolynomial uses inconsistent 3-space indentation for fields like Query.
    • In Sumcheck/Interaction/Defs.lean, the match patterns in statementResult are not indented.

Documentation Standards

  • Missing Docstrings: Every major theorem and definition should have a docstring (/-- ... -/). Several items in the interaction stack lack them:
    • Interaction/Oracle/Execution.lean: simulateQ_map, liftAppendOracleIdx, splitLiftAppendOracleQuery.
    • Interaction/Oracle/Continuation.lean: consumeResidual, snocRoundTranscript.

API Design and Normal Forms

  • Return in Do-blocks: In Spec.runWithOracleCounterpart (Execution.lean), return is used at the end of do blocks. While valid, community style generally prefers pure or simply omitting the keyword if it is the final expression.
  • Copyright Year: Several new files (e.g., Bridge.lean, Reduction.lean) are dated 2026. Please verify if this future-dating is intentional or should be updated to 2024-2025.

📄 **Per-File Summaries**
  • ArkLib.lean: This update expands the library's top-level imports to include new modules for oracle interactions and their role within the Sumcheck proof system. Specifically, it integrates definitions for composite polynomials and a comprehensive framework for oracle execution, compositions, and reductions.
  • ArkLib/Data/CompPoly/Basic.lean: This file introduces new definitions and OracleInterface instances for degree-bounded univariate and multivariate computable polynomials, enabling their use as oracles for evaluation queries. It establishes the foundational infrastructure for polynomial-based protocols and includes a verification theorem for evaluation queries, with no sorry or admit placeholders present.
  • ArkLib/Interaction/Oracle/Bridge.lean: This file introduces new definitions to bridge W-type-based interaction specifications with the new Interaction.Oracle.Spec inductive. It specifically implements ofInteractionSpec, ofRoleDecoration, and ofOracleDecoration to facilitate structural conversion between these representations; no sorry or admit placeholders are used.
  • ArkLib/Interaction/Oracle/Chain.lean: Introduces Oracle.Spec.Chain, a depth-indexed telescope type for defining $n$-round oracle protocols without external state. The file provides definitions to flatten these chains into unified specifications and implements composition logic for prover strategies and verifier counterparts via Reduction.ofChain.
  • ArkLib/Interaction/Oracle/Composition.lean: This file introduces infrastructure for the sequential composition and reindexing of oracle reductions. It provides definitions for identity reductions, shared input manipulation (freezing and pullback), and a binary composition operator that recursively combines provers and verifiers across interaction specs. There are no sorry or admit placeholders in the implementation.
  • ArkLib/Interaction/Oracle/Continuation.lean: This file introduces a framework for sequential composition and intrinsic continuation chains within oracle-based interactive protocols. It provides new definitions for handling protocol stages, such as the Chain type and composition operators, along with theorems for lifting and combining simulators across multiple interaction rounds. No sorry or admit placeholders are present in the implementation.
  • ArkLib/Interaction/Oracle/Core.lean: This new file establishes the core framework for oracle-based interactions by bridging generic interaction specifications with the VCVio oracle computation model. It introduces fundamental definitions and theorems for path-dependent oracle access, interactive verifiers, and oracle reductions, with no sorry placeholders present.
  • ArkLib/Interaction/Oracle/Execution.lean: This file implements the operational logic for executing oracle-decorated reductions and protocols, introducing core definitions like runWithOracleCounterpart and executeConcrete to thread oracle contexts through prover-verifier interactions. It establishes several theorems regarding oracle query handler composition and execution equivalence, including lemmas for splitting and appending oracle specifications. No sorry or admit placeholders are introduced in these new definitions and proofs.
  • ArkLib/Interaction/Oracle/Spec.lean: This file introduces the Oracle.Spec inductive type and associated infrastructure for formalizing oracle reduction protocols, distinguishing between public and oracle-based message nodes. It provides new definitions and theorems for managing transcripts, query handles, and sequential composition, and contains no sorry or admit placeholders.
  • ArkLib/Interaction/Oracle/StateChain.lean: This file introduces machinery for the n-ary composition of oracle-based protocols into stateful chains. It provides key definitions such as stateChainVerifier for threading accumulated oracle specifications through protocol stages and OracleReduction.stateChainComp for constructing full oracle reductions from stage-wise prover and verifier steps.
  • ArkLib/Interaction/Reduction.lean: This file introduces a framework for interactive protocol participants and reductions natively built on interaction trees, replacing the previous flat-list model. It provides definitions for provers, verifiers, and public-coin interactions, as well as theorems and constructors for sequential and state-chain composition. No sorry or admit placeholders are included.
  • ArkLib/ProofSystem/Sumcheck/Interaction/CompPoly.lean: This file establishes a bridge between the CompPoly multivariate polynomial library and the Sumcheck protocol by introducing the ResidualPoly structure to track polynomial state across protocol rounds. It also includes the partialEvalFirst_individualDegreeLE theorem, which formally proves that partial evaluation preserves individual degree bounds.
  • ArkLib/ProofSystem/Sumcheck/Interaction/CompPolyHelpers.lean: This file introduces computable definitions and supporting theorems for multivariate polynomial operations used in the Sumcheck protocol, including partial evaluation, summation over finite domains, and round polynomial construction. It provides formal proofs for evaluation correctness and degree preservation, establishing the relationship between computable representations and Mathlib's abstract polynomials without using any sorry or admit placeholders.
  • ArkLib/ProofSystem/Sumcheck/Interaction/Defs.lean: This file introduces the core definitions and interaction specifications for an interaction-native sum-check protocol, providing the algebraic framework for round-by-round verification. It defines types for round claims, single-round and multi-round interaction specifications, and the logic for advancing and checking the protocol state; it contains no theorems or sorry placeholders.
  • ArkLib/ProofSystem/Sumcheck/Interaction/Examples.lean: This file introduces end-to-end examples of interaction-native Sum-check protocol reductions, demonstrating both the standard and stateful variants. It verifies that these reductions correctly typecheck against the OracleReduction interface without using any sorry or admit placeholders.
  • ArkLib/ProofSystem/Sumcheck/Interaction/General.lean: This file defines the general $n$-round sum-check protocol as an interactive oracle reduction, providing both stateless and stateful implementations for the honest prover. It introduces definitions for round-by-round continuations and the final protocol reduction, while including placeholder theorems for completeness and soundness.
  • ArkLib/ProofSystem/Sumcheck/Interaction/Oracle.lean: This file introduces new definitions for the oracle-native implementation of the sum-check protocol, specifically providing the roundOracleDecoration and the single-round oracleVerifierStep. These components enable a continuation-based refactor where prover messages are treated as queryable oracles to verify claims across multiple rounds without using sorry or admit placeholders.
  • ArkLib/ProofSystem/Sumcheck/Interaction/SingleRound.lean: This file introduces definitions and theorems for a single round of the sum-check protocol using an interaction-native oracle reduction framework. It defines both stateless and stateful versions of the round's prover and verifier, and provides proofs for their functional equivalence; no sorry or admit placeholders are present.

Last updated: 2026-06-11 20:34 UTC.

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