Lemma 4.4 from WHIR - #768
Conversation
57574fe to
960f2e4
Compare
Co-authored-by: Aristotle (Harmonic) <aristotle-harmonic@harmonic.fun>
960f2e4 to
349d7f2
Compare
🤖 PR Summary
Mathematical Formalization
Documentation
Note: The PR body ("Bounds on list decodability of interleaved RS-codes") is accurate but less specific than the changes; the actual formalization centers on Lemma 4.4 of [ACFY24] and the required combinatorial core. Statistics
Lean Declarations ✏️ Added: 3 declaration(s)
📋 **Additional Analysis**This review identifies one naming convention violation, one documentation gap, and some minor style issues in an otherwise well-structured contribution. The core mathematics appear correct, and the blueprints are consistent. The changes are relevant to the contributing guidelines for ArkLib. The identified issues are flagged below for correction before merging. 📄 **Per-File Summaries**
Last updated: 2026-08-17 10:51 UTC. |
Build Timing Report
Incremental Rebuild Signal
This compares a clean project build against an incremental rebuild in the same CI job; it is a lightweight variability signal, not a full cross-run benchmark. Slowest Current Clean-Build FilesShowing 20 slowest current targets, with comparison against the selected baseline when available.
|
quangvdao
left a comment
There was a problem hiding this comment.
Thanks, Ilia (and Aristotle) — this is a clean and useful formalization.
I reviewed exact head 349d7f2815f73717894287aa747a3ba0e1aacaae against the recorded PR base e92dc315f453db88dd7351c88e889caf0e6bf269, and checked integration against current upstream main at 5a9626d331d713c7e74efa7e3d93b7d0ec9c4dc2.
Verdict
Approved. I found no mathematical-correctness, source-correspondence, abstraction, or trust-boundary blocker.
Statement and source review
Code.card_le_of_pairwise_agree_lecorrectly isolates the alphabet-agnostic Johnson-type counting argument: pairwise agreement bounded by (s²|ι|) yields list size at most (1/(2ηs)) inside radius (1-s-η).agree_lt_of_mem_interleavedCodeSetcorrectly reduces equality of interleaved symbols to equality in a differing row and applies the Reed–Solomon agreement bound.interleaved_listDecodablethen instantiates the generic theorem withsqrtRate, whose square ismin m |ι| / |ι|. This matches WHIR Lemma 4.4 in the intended nonsaturated regime.- The Lean statement is safely a little stronger than the paper: it does not require a nonempty interleaving index or the paper's upper bound on (η). At the boundary cases, distinct codewords are impossible or the decoding radius becomes negative, so this does not create an unsound claim.
The abstraction split is good: the generic combinatorial result lives in ListDecodability/AgreementBound, while the Reed–Solomon module supplies only the code-specific pairwise-agreement fact. No new sorry, admit, unsafe declaration, or axiom is introduced.
Validation
- All hosted checks are green on the exact reviewed head, including the clean build, validation wrapper, blueprint/docs, imports, docs integrity, and whitespace.
- A synthetic merge-tree check against current upstream
mainis clean. - I did not rerun the full validation suite on that synthetic current-main merge; updating the branch should trigger that final integration run.
Nonblocking polish before merge
- Please retitle this in the repository's conventional format, for example
feat(coding-theory): prove interleaved RS list-decodability. - The PR body would be more reviewer-friendly if it named WHIR Lemma 4.4, the new generic agreement theorem, and the safe strengthening described above.
Thank you for pushing this through — the resulting theorem boundary is reusable and well chosen.
| /-- **Johnson-type counting bound.** If distinct codewords of `C` agree in at most `s² · |ι|` | ||
| positions, then any finite set of codewords within relative distance `1 - s - η` of a word `y` | ||
| has at most `1 / (2ηs)` elements. -/ | ||
| theorem card_le_of_pairwise_agree_le {C : Set (ι → A)} {s η : ℝ} (hs : 0 < s) (hη : 0 < η) |
There was a problem hiding this comment.
| have hnpos : (0 : ℝ) < Fintype.card ι := by exact_mod_cast Fintype.card_pos | ||
| have hs : 0 < (ReedSolomon.sqrtRate m domain : ℝ) := ReedSolomon.sqrtRate_pos hm | ||
| have hηR : (0 : ℝ) < (η : ℝ) := by exact_mod_cast hη | ||
| rw [Code.isListDecodable_iff_forall_finset_card_le] |
There was a problem hiding this comment.
when rebasing, this should work:
refine Code.isListDecodable_of_forall_finset_card_le fun y T hT => ?_
Bounds on list decodability of interleaved RS-codes