feat: rbrKnowledgeSoundness of BinaryBasefold & ring-switching#296
feat: rbrKnowledgeSoundness of BinaryBasefold & ring-switching#296chung-thai-nguyen wants to merge 6 commits intobinarybasefold-proofsfrom
Conversation
🤖 Gemini PR SummaryEstablishes Round-by-Round (RBR) Knowledge Soundness for the Binary Basefold and Ring-Switching protocols, completing a core milestone in the formal verification of the Binius proof system. The proofs utilize an incremental bad event analysis to bound the probability of adversarial cheating across multiple protocol rounds. Mathematical & Algebraic Foundations
Binary Basefold Soundness
Ring-Switching & IOPCS Composition
Integration & Infrastructure
Analysis of Changes
Lean Declarations ✏️ **Removed:** 26 declaration(s)
✏️ **Added:** 255 declaration(s)
✏️ **Affected:** 20 declaration(s) (line number changed)
✅ **Removed:** 9 `sorry`(s)
❌ **Added:** 18 `sorry`(s)
🎨 **Style Guide Adherence**Based on the ArkLib style guide, here are the violations in the provided code changes: Documentation and Headers
Naming Conventions
Syntax and Formatting
Normal Forms
📄 **Per-File Summaries**
Last updated: 2026-03-02 03:14 UTC. |
f911ee6 to
ccfb501
Compare
f84047a to
16bbca7
Compare
7654f36 to
1631470
Compare
|
FYI I'll merge the 4.26 PR first, so keep an eye out for any proofs breaking when that happens. |
|
@alexanderlhicks Sure I will take a look. |
26a1095 to
c57ce1a
Compare
2098d79 to
56eb214
Compare
|
/review External: Internal: Comments: |
🤖 AI Review (with external context)🤖 AI ReviewOverall Summary: The Pull Request is not ready for merge due to critical misformalizations and significant gaps in the proofs.
📄 **Review for `ArkLib.lean`**This review focuses on the changes to Global Context Alignment
These additions are consistent with the provided reference documents, specifically the "Binary BaseFold" paper (Section 4), which discusses the security (soundness) of the protocol. The addition of Implementation Analysis
Verdict The modifications correctly update the library manifest to include new functionality related to Binary BaseFold soundness and multivariate polynomial conversions. No misformalization issues are present in this file. 📄 **Review for `ArkLib/Data/Misc/Basic.lean`**Review of Verdict: Correct The changes in this file are formally correct and compile successfully. Detailed Analysis:
No misformalizations or issues were found. 📄 **Review for `ArkLib/Data/Nat/Bitwise.lean`**This file contains a critical misformalization. 1. Analysis of Implementation
2. Check for Misformalization
3. Verdict & FeedbackVerdict: Incorrect. Critical Issue: Corrected Code: lemma ENNReal.coe_div_of_NNReal {a b : NNReal} (hb : b ≠ 0) :
((a : ENNReal) / (b : ENNReal)) = (((a / b) : NNReal): ENNReal) := by
-- This is equivalent to `ENNReal.coe_div hb` in Mathlib
sorryMinor Issue: 📄 **Review for `ArkLib/Data/Probability/Instances.lean`**The formalization in Detailed Analysis:
Note on Consistency:
Verdict: -- No corrections required.📄 **Review for `ArkLib/OracleReduction/Completeness.lean`**Verdict: Correct with Issues The formalization in However, there is one Major issue regarding an incomplete proof. Findings:
Correctness Checks:
Summary: The logic is sound, but the file contains an unfinished proof ( 📄 **Review for `ArkLib/OracleReduction/Security/RoundByRound.lean`**This file adds two utility theorems, This is a standard helper lemma in formalization, useful for cleaning up error terms (e.g., simplifying complex arithmetic expressions derived from reductions into cleaner bounds stated in papers). Analysis of the changes:
Verdict: Formalization Verdict: Correct. 📄 **Review for `ArkLib/ProofSystem/Binius/BinaryBasefold/Basic.lean`**Based on the review of the diff for Summary of Changes:
Minor Findings:
Verdict: -- Suggestion for naming consistency (optional):
-- strictfinalSumcheckStepFoldingStateProp -> strictFinalSumcheckStepFoldingStateProp📄 **Review for `ArkLib/ProofSystem/Binius/BinaryBasefold/CoreInteractionPhase.lean`**Analysis: The file The diff replaces
Conclusion: The formalization is correct and follows established patterns in the library. Verdict: Correct. 📄 **Review for `ArkLib/ProofSystem/Binius/BinaryBasefold/QueryPhase.lean`**Verdict: Correct. The formalization in Observations:
The implementation is verified to be logically consistent with the protocol design. -- No corrections needed.📄 **Review for `ArkLib/ProofSystem/Binius/BinaryBasefold/ReductionLogic.lean`**This file contains the logic for reduction steps in the Binius Binary Basefold protocol, specifically defining the relationship between rounds and the extraction logic for knowledge soundness. The changes include:
Review of
Verdict: Feedback:
No formalization issues found. -- No corrections needed.📄 **Review for `ArkLib/ProofSystem/Binius/BinaryBasefold/Soundness.lean`**This file formalizes the soundness properties of the Binary BaseFold protocol, specifically corresponding to the proximity gap and query phase logic described in Section 4 of "Polylogarithmic Proofs for Multilinears over Binary Towers". Analysis of the Implementation:
Verdict: ArkLib/ProofSystem/Binius/BinaryBasefold/Soundness.lean: -- No changes needed.📄 **Review for `ArkLib/ProofSystem/Binius/BinaryBasefold/Spec.lean`**The changes in Review of Changes:
Verdict: ArkLib/ProofSystem/Binius/BinaryBasefold/Spec.lean -- No corrections required.📄 **Review for `ArkLib/ProofSystem/Binius/BinaryBasefold/Steps.lean`**File: Verdict: Incorrect Formalization & Incomplete Implementation General: Critical Issues:
Major Issues:
Minor Issues:
Corrected Code Snippet (Indexing & Comment): -- In foldKStateProp (m=2)
let r_i' : L := tr.challenges ⟨0, rfl⟩ -- Changed from 1 to 0
-- In foldKnowledgeError
/-- Definition of the per-round RBR KS error for Binary FoldFold.
This combines the Sumcheck error (2/|L|) and the LDT Bad Event probability.
For round i : rbrKnowledgeError(i) = err_SC + err_BE where
- err_SC = 2/|L| (Schwartz-Zippel for degree 2) -- Updated comment
...
-/📄 **Review for `ArkLib/ProofSystem/Binius/FRIBinius/CoreInteractionPhase.lean`**Verdict: Correct Feedback: The changes in
The formalization is robust and correct. 📄 **Review for `ArkLib/ProofSystem/Binius/FRIBinius/General.lean`**Verdict: Correct The formalization in Observations & Verification:
No misformalizations or logical errors were found in the diff. The code compiles as stated, and the semantic changes are sound. 📄 **Review for `ArkLib/ProofSystem/Binius/FRIBinius/Prelude.lean`**Review of Verdict: Incorrect (Incomplete) The formalization accurately reflects the definitions in the external reference (Paper 2024/504), specifically Construction 4.12's commitment phase relation. However, the file contains an admitted proof ( Issues:
Suggestions for Correction:
Code Snippet (Correction for Comment): initialCompatibility := fun ⟨t', oStmt⟩ =>
-- here t' is the ℓ'-variate novel-packed large-field polynomial in L of the original ℓ-variate small-field polynomial in K
Binius.BinaryBasefold.firstOracleWitnessConsistencyProp K β (h_ℓ_add_R_rate := h_ℓ_add_R_rate)
t' (f₀ := Binius.BinaryBasefold.getFirstOracle K β oStmt)📄 **Review for `ArkLib/ProofSystem/Binius/RingSwitching/BBFSmallFieldIOPCS.lean`**Verdict: Incorrect The formalization in Critical Issues:
Major Issues:
Minor Issues:
General Feedback: 📄 **Review for `ArkLib/ProofSystem/Binius/RingSwitching/BatchingPhase.lean`**Review of The changes in this file correctly formalize the knowledge soundness proof for the batching phase of the Ring-Switching protocol, aligning with Theorem 3.5 of the reference paper (Diamond & Posen, 2024). Verdict: Correct Detailed Analysis:
The formalization is logically sound and consistent with the external specifications. 📄 **Review for `ArkLib/ProofSystem/Binius/RingSwitching/General.lean`**Verdict: Correct The formalization changes in Analysis:
📄 **Review for `ArkLib/ProofSystem/Binius/RingSwitching/Prelude.lean`**Verdict: Correct The changes in Analysis:
Note: 📄 **Review for `ArkLib/ProofSystem/Binius/RingSwitching/Spec.lean`**The changes in Detailed Review:
Alignment with External Reference:
Verdict: Formalization Status: Correct. 📄 **Review for `ArkLib/ProofSystem/Binius/RingSwitching/SumcheckPhase.lean`**Verdict & Feedback The changes in The implementation of the sumcheck phase for the Ring-Switching protocol is rigorous and aligns with the expected behavior described in the Binius papers (specifically the reduction logic for multilinear polynomials). Highlights of the Review:
No issues regarding off-by-one errors, type hierarchies, or universe levels were found. The integration with 📄 **Review for `ArkLib/ToMathlib/MvPolynomial/Equiv.lean`**The changes in Verdict: The formalization is Correct. Analysis:
Feedback:
The definitions and theorems align well with the algebraic needs of the external reference papers, specifically regarding polynomial embeddings and degree management for proximity tests. 📄 **Review for `ArkLib/ToVCVio/Lemmas.lean`**This file introduces several lemmas related to the Analysis of Changes:
Conclusion: Verdict: ArkLib/ToVCVio/Lemmas.lean No changes needed.📄 **Review for `ArkLib/ToVCVio/SimulationInfrastructure.lean`**Review of
|
3372ee6 to
b3afeae
Compare
b3afeae to
220554a
Compare
1828956 to
909194e
Compare
b9f882e to
9762d73
Compare
9762d73 to
7a85577
Compare
[ ] incremental bad event analysis