Skip to content

feat(guruswami-sudan): constructive decoder witness/filter correctness#311

Draft
eliasjudin wants to merge 20 commits intoVerified-zkEVM:mainfrom
eliasjudin:fix-issue-213-decoder-constraints
Draft

feat(guruswami-sudan): constructive decoder witness/filter correctness#311
eliasjudin wants to merge 20 commits intoVerified-zkEVM:mainfrom
eliasjudin:fix-issue-213-decoder-constraints

Conversation

@eliasjudin
Copy link
Copy Markdown
Contributor

@eliasjudin eliasjudin commented Feb 21, 2026

This PR adds proofs autoformalised by @Aristotle-Harmonic.

Implements constructive Guruswami-Sudan witness extraction in computeGsWitness via a normalized linear system solved by BerlekampWelch.linsolve, removing the brute-force fallback from the decoder path. It checks multiplicity by Hasse-derivative vanishing and performs computable CompPoly root filtering (Q(X, p(X)) = 0), with decoder soundness captured by decoder_mem_impl_dist; closes #213.

Co-authored-by: Aristotle (Harmonic) aristotle-harmonic@harmonic.fun

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 21, 2026

🤖 Gemini PR Summary

Guruswami-Sudan Implementation

  • Constructive Decoding: Implements computeGsWitness using a normalized linear system solver (BerlekampWelch.linsolve), replacing brute-force fallback methods.
  • Bivariate Polynomial Theory: Defines rootMultiplicity₀ to represent the order of vanishing and introduces polynomial shifts and weighted degree proofs.
  • Soundness Proofs: Adds decoder_mem_impl_dist to capture decoder soundness and formalizes GS existence and divisibility lemmas within the BCIKS20 proximity gap analysis.
  • List Decodability: Introduces relHammingBall and Nat.card-based quantification to refine the representation of codeword subsets within specified distances.

Refactoring and API Changes

  • Terminology Unification: Renames closeCodewordsRel to relHammingBall across the STIR and WHIR proof systems.
  • Merkle Tree Optimization: Transitions to snoc-based vectors and utilizes grind and omega tactics to simplify proofs.
  • Library Cleanup: Removes redundant lemmas and unused imports in Data.Fin and Data.Matrix.

Proof Status and Technical Debt

  • CRITICAL: Significant sorry and admit placeholders remain or were introduced:
    • BerlekampWelch.linsolve and its correctness theorems are currently opaque with sorry placeholders.
    • GuruswamiSudan.lean contains sorry blocks in the specification-level decoder and distance guarantee proofs.
    • pad_preserves_relation in the R1CS module has been reverted to a sorry placeholder.
    • Several lemmas in the WHIR out-of-domain sampling modules (OutofDomainSmpl.lean) remain incomplete.

Infrastructure and CI

  • GitHub Actions: Restructures CI into a modular, "Lean-community-style" configuration to mitigate cache race conditions.
  • AI Workflow: Updates the AI-driven code review process to support targeted context injection via comment commands.
  • Documentation: Synchronizes the blueprint generation process with Lean source code and archives deprecated workflows.

Statistics

Metric Count
📝 Files Changed 21
Lines Added 2041
Lines Removed 531

Lean Declarations

✏️ **Removed:** 15 declaration(s)
  • lemma dotProduct_rightpad {R} [CommSemiring R] in ArkLib/Data/Matrix/Basic.lean
  • lemma runWithOracle_getPutativeRoot (f : (spec α).FunctionType) {n : ℕ} (i : Fin (2 ^ n)) in ArkLib/CommitmentScheme/MerkleTree.lean
  • theorem append_right_of_not_lt {u : Fin m → α} {v : Fin n → α} in ArkLib/Data/Fin/Basic.lean
  • def buildMerkleTree_with_hash (n : ℕ) (leaves : List.Vector α (2 ^ n)) (hashFn : α × α → α) : in ArkLib/CommitmentScheme/MerkleTree.lean
  • def getPutativeRoot_with_hash {n : ℕ} (i : Fin (2 ^ n)) (leaf : α) (proof : List.Vector α n) in ArkLib/CommitmentScheme/MerkleTree.lean
  • def siblingIndex {n : ℕ} (i : Fin (2 ^ (n + 1))) : Fin (2 ^ (n + 1)) in ArkLib/CommitmentScheme/MerkleTree.lean
  • def closeCodewordsRel (C : Code ι F) (y : ι → F) (r : ℝ) : Set (ι → F) in ArkLib/Data/CodingTheory/ListDecodability.lean
  • lemma runWithOracle_listVector_mmap_query (f : (spec α).FunctionType) {m : ℕ} in ArkLib/CommitmentScheme/MerkleTree.lean
  • theorem append_left_of_lt {u : Fin m → α} {v : Fin n → α} in ArkLib/Data/Fin/Basic.lean
  • lemma runWithOracle_query (f : (spec α).FunctionType) (x : α × α) : in ArkLib/CommitmentScheme/MerkleTree.lean
  • theorem functional_completeness {n : ℕ} (leaves : List.Vector α (2 ^ n)) (i : Fin (2 ^ n)) in ArkLib/CommitmentScheme/MerkleTree.lean
  • lemma runWithOracle_buildMerkleTree (f : (spec α).FunctionType) (n : ℕ) in ArkLib/CommitmentScheme/MerkleTree.lean
  • def buildLayer_with_hash (n : ℕ) (leaves : List.Vector α (2 ^ (n + 1))) (hashFn : α × α → α) : in ArkLib/CommitmentScheme/MerkleTree.lean
  • def closeCodewords (C : Code ι F) (y : ι → F) (r : ℕ) : Set (ι → F) in ArkLib/Data/CodingTheory/ListDecodability.lean
  • lemma runWithOracle_buildLayer (f : (spec α).FunctionType) (n : ℕ) in ArkLib/CommitmentScheme/MerkleTree.lean
✏️ **Added:** 58 declaration(s)
  • lemma natWeightedDegree_monomial (i j u v : ℕ) : in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • lemma listOfCloseCodewords_eq_zero : in ArkLib/Data/CodingTheory/ListDecodability.lean
  • lemma sufficient_multiplicity_bound {dist : ℕ} in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • lemma mem_polynomials_degree_lt in ArkLib/Data/CodingTheory/GuruswamiSudan/GuruswamiSudan.lean
  • theorem computableDecoder_output_dist_le in ArkLib/Data/CodingTheory/GuruswamiSudan/GuruswamiSudan.lean
  • theorem decoder_output_dist_le in ArkLib/Data/CodingTheory/GuruswamiSudan/GuruswamiSudan.lean
  • lemma listOfCloseCodewordsRel_eq_zero : in ArkLib/Data/CodingTheory/ListDecodability.lean
  • lemma dvd_eval_of_rootMultiplicity_zero (Q : F[X][Y]) (P : F[X]) (m : ℕ) in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • def polynomialsDegreeLt (F : Type) [CommSemiring F] [Fintype F] in ArkLib/Data/CodingTheory/GuruswamiSudan/GuruswamiSudan.lean
  • lemma guruswami_sudan_for_proximity_gap_property_strong [Fintype F] {k m : ℕ} {ωs : Fin n ↪ F} in ArkLib/Data/CodingTheory/GuruswamiSudan/GuruswamiSudan.lean
  • def HasOrderAt (Q : F[X][Y]) (x y : F) (m : ℕ) : Prop in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • def listOfCloseCodewordsRel (C : Code ι F) (y : ι → F) (r : ℝ) : ℕ in ArkLib/Data/CodingTheory/ListDecodability.lean
  • lemma eval_eq_zero_of_constraint_zero {f : F[X][Y]} {x y : F} {m : ℕ} (hm : 1 ≤ m) in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • lemma rootMultiplicity_le_of_coeff_ne_zero [DecidableEq F] {Q : F[X][Y]} {x y : F} {s t : ℕ} in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • lemma rootMultiplicity_ge_of_shift_zero [DecidableEq F] {f : F[X][Y]} {x y : F} in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • def listOfCloseCodewords (C : Code ι F) (y : ι → F) (r : ℕ) : ℕ in ArkLib/Data/CodingTheory/ListDecodability.lean
  • lemma natWeightedDegree_sum_le {ι : Type*} (s : Finset ι) (f : ι → F[X][Y]) (u v : ℕ) : in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • theorem proximity_gap_divisibility (hk : k + 1 ≤ n) (hm : 1 ≤ m) (p : code ωs k) in ArkLib/Data/CodingTheory/GuruswamiSudan/GuruswamiSudan.lean
  • lemma natWeightedDegree_monomial_eq (i j u v : ℕ) : in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • lemma polySol_multiplicity [DecidableEq F] (i : Fin n) : in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • lemma numVars_eq_of_gt_one {D : ℕ} (hk : 1 < k) : in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • lemma numVars_lower_bound_tight {D : ℕ} (hk : 1 < k) : in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • lemma numVars_gt_numConstraints (k n m : ℕ) : in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • theorem dvd_property [DecidableEq F] (hk : k + 1 ≤ n) (hm : 1 ≤ m) (p : code ωs k) in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • lemma eval_shifted_eq_shifted_eval (Q : F[X][Y]) (P : F[X]) (x y : F) : in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • theorem proximity_gap_existence (k n : ℕ) (ωs : Fin n ↪ F) (f : Fin n → F) (hm : 1 ≤ m) : in ArkLib/Data/CodingTheory/GuruswamiSudan/GuruswamiSudan.lean
  • def constraintIndices (m : ℕ) : Finset (ℕ × ℕ) in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • lemma polySol_roots {ωs : Fin n ↪ F} {f : Fin n → F} (hm : 1 ≤ m) (i : Fin n) : in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • lemma exists_nonzero_solution (k n m : ℕ) (ωs : Fin n ↪ F) (f : Fin n → F) : in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • lemma orderAt_eval_ge (Q : F[X][Y]) (P : F[X]) (x : F) (m : ℕ) in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • lemma natWeightedDegree_smul_le {F : Type} [Semiring F] (a : F) (p : F[X][Y]) (u v : ℕ) : in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • opaque linsolve (A : Matrix (Fin n) (Fin m) F) (b : Fin n → F) : Option (Fin m → F) in ArkLib/Data/CodingTheory/BerlekampWelch/Sorries.lean
  • lemma card_constraintIndices (m : ℕ) : (constraintIndices m).card = m * (m + 1) / 2 in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • lemma shift_eq_zero_iff {F : Type} [Field F] (f : F[X][Y]) (x y : F) : shift f x y = 0 ↔ f = 0 in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • def computableDecoder [Fintype F] (k r D e : ℕ) (ωs : Fin n ↪ F) (f : Fin n → F) : in ArkLib/Data/CodingTheory/GuruswamiSudan/GuruswamiSudan.lean
  • lemma degree_eval_le_weightedDegree (Q : F[X][Y]) (P : F[X]) (k : ℕ) (hP : P.natDegree ≤ k - 1) : in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • lemma card_weigthBoundIndices_eq_sum (D : ℕ) (hk : 1 < k) : in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • lemma polySol_ne_zero : in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • lemma coeff_vec_to_bivariate_ne_zero_of_is_witness_c in ArkLib/Data/CodingTheory/GuruswamiSudan/GuruswamiSudan.lean
  • lemma natWeightedDegree_add_le (p q : F[X][Y]) (u v : ℕ) : in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • theorem computableDecoder_mem_impl_dist in ArkLib/Data/CodingTheory/GuruswamiSudan/GuruswamiSudan.lean
  • def weigthBoundIndices (k D : ℕ) : Finset (ℕ × ℕ) in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • lemma natWeightedDegree_coeffsToPoly_le (k D : ℕ) (c : (weigthBoundIndices k D) → F) : in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • lemma linearIndependent_monomials : in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • def numVars (k D : ℕ) : ℕ in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • lemma roots_le_degree_of_deg_lt_roots (R : F[X]) (m : ℕ) (A : Finset (Fin n)) in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • lemma guruswami_sudan_for_proximity_gap_existence_strong in ArkLib/Data/CodingTheory/GuruswamiSudan/GuruswamiSudan.lean
  • lemma proximity_gap_degree_bound_sq_gt (hn : n ≠ 0) : in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • lemma polySol_weightedDegree_le : in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • lemma list_min_le_of_mem {l : List ℕ} {a m : ℕ} (h_min : l.min? = some m) (h_mem : a ∈ l) : in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • lemma interpolate_eq_of_degree_lt (q : F[X]) (hq : q.natDegree < n) : in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • lemma codewordToPoly_degree_le (hk : k + 1 ≤ n) (p : code ωs k) : in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • def numConstraints (n m : ℕ) : ℕ in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • lemma weightedDegree_ne_none {F : Type} [Semiring F] (f : F[X][Y]) (u v : ℕ) : in ArkLib/Data/Polynomial/Bivariate.lean
  • lemma coeff_vec_to_bivariate_coeff (k D : ℕ) in ArkLib/Data/CodingTheory/GuruswamiSudan/GuruswamiSudan.lean
  • lemma coeff_linearCombination_monomial (c : ℕ × ℕ →₀ F) (i j : ℕ) : in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • lemma numVars_eq_sq {k D : ℕ} (hk : k ≤ 1) : numVars k D = (D + 1) ^ 2 in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
  • lemma numVars_gt_numConstraints_of_gt_one (hn : n ≠ 0) (hk : 1 < k) (hm : 1 ≤ m) : in ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
✏️ **Affected:** 5 declaration(s) (line number changed)
  • def relHammingBall (C : Code ι F) (y : ι → F) (r : ℝ) : Code ι F in ArkLib/Data/CodingTheory/ListDecodability.lean moved from L27 to L29
  • def hammingBall (C : Code ι F) (y : ι → F) (r : ℕ) : Set (ι → F) in ArkLib/Data/CodingTheory/ListDecodability.lean moved from L22 to L23
  • lemma guruswami_sudan_for_proximity_gap_existence {k m : ℕ} {ωs : Fin n ↪ F} {f : Fin n → F} in ArkLib/Data/CodingTheory/ProximityGap/BCIKS20.lean moved from L176 to L176
  • lemma guruswami_sudan_for_proximity_gap_property [Fintype F] {k m : ℕ} {ωs : Fin n ↪ F} in ArkLib/Data/CodingTheory/GuruswamiSudan/GuruswamiSudan.lean moved from L113 to L777
  • lemma guruswami_sudan_for_proximity_gap_existence in ArkLib/Data/CodingTheory/GuruswamiSudan/GuruswamiSudan.lean moved from L103 to L738

sorry Tracking

✅ **Removed:** 4 `sorry`(s)
  • lemma guruswami_sudan_for_proximity_gap_property {k m : ℕ} {ωs : Fin n ↪ F} in ArkLib/Data/CodingTheory/GuruswamiSudan/GuruswamiSudan.lean (L119)
  • lemma guruswami_sudan_for_proximity_gap_existence {k m : ℕ} {ωs : Fin n ↪ F} {f : Fin n → F} : in ArkLib/Data/CodingTheory/GuruswamiSudan/GuruswamiSudan.lean (L105)
  • lemma guruswami_sudan_for_proximity_gap_property {k m : ℕ} {ωs : Fin n ↪ F} in ArkLib/Data/CodingTheory/ProximityGap/BCIKS20.lean (L195)
  • lemma guruswami_sudan_for_proximity_gap_existence {k m : ℕ} {ωs : Fin n ↪ F} {f : Fin n → F} : in ArkLib/Data/CodingTheory/ProximityGap/BCIKS20.lean (L178)
❌ **Added:** 4 `sorry`(s)
  • theorem linsolve_some {A : Matrix (Fin n) (Fin m) F} {b : Fin n → F} {x : Fin m → F} in ArkLib/Data/CodingTheory/BerlekampWelch/Sorries.lean (L64)
  • theorem linsolve_none {A : Matrix (Fin n) (Fin m) F} {b : Fin n → F} in ArkLib/Data/CodingTheory/BerlekampWelch/Sorries.lean (L79)
  • theorem pad_preserves_relation (sz₁ sz₂ : Size) in ArkLib/ProofSystem/ConstraintSystem/R1CS.lean (L90)
  • opaque linsolve (A : Matrix (Fin n) (Fin m) F) (b : Fin n → F) : Option (Fin m → F) in ArkLib/Data/CodingTheory/BerlekampWelch/Sorries.lean (L48)
✏️ **Affected:** 2 `sorry`(s) (line number changed)

🎨 **Style Guide Adherence**

The following violations were identified in the reviewed changes (23 violations total, grouped by rule):

Rule: Functions and Terms must be lowerCamelCase

  • ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean: Line 20 — proximity_gap_degree_bound should be proximityGapDegreeBound.
  • ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean: Line 26 — proximity_gap_johnson should be proximityGapJohnson.
  • ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean: Line 593 — HasOrderAt should be hasOrderAt.

Rule: Standardize on (le) and < (lt). Avoid (ge) and > (gt) in theorem statements and names.

  • ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean: Line 120 — Lemma statement uses .
  • ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean: Line 183 — Lemma name uses gt.
  • ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean: Line 198 — Lemma name uses gt.
  • ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean: Line 217 — Lemma name uses gt.
  • Representative Examples of Statement Violations:
    • Basic.lean:185: ((proximity_gap_degree_bound k n m : ℝ) + 1) ^ 2 > ...
    • Basic.lean:277: Module.finrank F (...) > Module.finrank F (...)

Rule: Use 2 spaces for indentation.

  • ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean: Line 46 — Uses 4-space indentation for have h_split.
  • ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean: Line 56 — Inconsistent indentation in tactic block.
  • ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean: Line 398 — Inconsistent indentation in have h_comb block.

Rule: Avoid using ; to separate tactics or bindings.

  • ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean: Line 80 — let L := D / (k - 1); uses a semicolon.
  • ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean: Line 446 — set g : F[X][Y] := shift Q x y; uses a semicolon.
  • ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean: Line 600 — set P_sh := ... ; uses a semicolon.

Rule: Prefer fun x ↦ ... over λ x, ... (including => syntax).

  • ArkLib/CommitmentScheme/MerkleTree.lean: Line 88 — List.Vector.ofFn (fun i => ...)
  • ArkLib/CommitmentScheme/MerkleTree.lean: Line 121 — Vector.ofFn fun j : Fin m => ...

Rule: Symbol naming dictionary: use for logical connectives and implications.

  • ArkLib/CommitmentScheme/MerkleTree.lean: Line 222 — (hash : α × α -> α) uses -> instead of .

Rule: Put spaces on both sides of :, :=, and infix operators.

  • ArkLib/Data/CodingTheory/BerlekampWelch/Sorries.lean: Line 48 — := sorry lacks a space after the operator.

Rule: Use standard file headers including copyright (c) 2024.

  • ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean: Line 2 — Header uses Copyright (c) 2026 instead of 2024.

Rule: Authors header formatting.

  • ArkLib/ProofSystem/Whir/MutualCorrAgreement.lean: Line 4 — Double space between Alexander Hicks, and Petar Maksimović.

📄 **Per-File Summaries**
  • .github/workflows/pr-summary.yml: Renamed and restructured the PR summary workflow to use top-level permissions and trigger more broadly on pull request targets. These changes streamline the configuration for automatically generating PR summaries via the Gemini API.
  • ArkLib/Data/CodingTheory/BerlekampWelch/Sorries.lean: This PR modifies the linsolve definition and its associated correctness theorems by replacing their implementations and proofs with opaque and sorry placeholders. This change indicates that the linear system solver is currently being treated as a black box until a suitable Mathlib-based implementation is integrated.
  • ArkLib.lean: This change updates the main ArkLib entry point by importing the GuruswamiSudan.Basic module, thereby exposing its definitions and theorems to the rest of the library. The diff contains no sorry or admit placeholders.
  • .github/workflows-archive/README.md: This documentation file explains the purpose of the workflows-archive directory, which stores deprecated monolithic GitHub Actions scripts. It outlines the transition to a more modular and efficient CI structure that follows Lean community best practices to resolve issues like cache race conditions and redundant builds.
  • .github/workflows-archive/blueprint-old.yml: This archived GitHub Actions workflow automates the process of building the Lean project, generating both LaTeX and web-based blueprints, and producing API documentation. It includes steps for verifying blueprint declarations against the Lean source code and deploying the compiled project website to GitHub Pages.
  • .github/workflows/review.yml: This change updates the AI code review workflow to trigger exclusively via a /review comment command rather than automatically on pull request creation. It refines the logic for parsing structured context—such as external references and internal library links—from the user's comment to provide more specific background for the AI-driven Lean code review.
  • ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean: This file formalizes the Guruswami-Sudan list-decoding algorithm for Reed-Solomon codes, including definitions for the proximity gap degree bound and the Johnson radius. It introduces theorems proving the existence of a non-zero bivariate polynomial solution to the interpolation problem and establishes the key divisibility property for codeword recovery. The implementation is complete and contains no sorry placeholders.
  • ArkLib/Data/Matrix/Basic.lean: This change removes the dotProduct_rightpad lemma and its associated proof from the Matrix namespace. No new theorems or definitions were introduced, and no sorry or admit placeholders were added.
  • ArkLib/CommitmentScheme/MerkleTree.lean: The changes refactor the Merkle tree implementation to streamline definitions and simplify proofs using automated tactics like grind and omega. Key modifications include updating generateProof to use a snoc-based vector structure, refining neighbor calculation logic, and removing redundant functional variants and manual lifting lemmas. No sorry or admit placeholders were introduced.
  • ArkLib/Data/CodingTheory/GuruswamiSudan/GuruswamiSudan.lean: This update implements a fully constructive version of the Guruswami-Sudan decoder, replacing abstract specifications with a computableDecoder and supporting infrastructure for Hasse derivatives, linear system solvers, and bivariate root extraction using the CompPoly library. The changes introduce several new theorems and definitions to bridge computable coefficient-vector representations with classical polynomial theory, while retaining sorry placeholders in the specification-level decoder and distance guarantee proofs.
  • ArkLib/Data/Fin/Basic.lean: This change removes the theorems append_left_of_lt and append_right_of_not_lt, which characterized the behavior of Fin.append based on whether a given index falls within the range of the first or second segment. The PR simplifies the file by deleting these specific lemmas without introducing new definitions or sorry placeholders.
  • ArkLib/Data/CodingTheory/ListDecodability.lean: This update refines the definitions of Hamming balls to represent subsets of codewords within a given distance and introduces Nat.card-based functions to quantify list decodability. It adds two new lemmas characterizing when these counts are zero and marks the section as noncomputable.
  • ArkLib/Data/CodingTheory/ProximityGap/BCIKS20.lean: This update replaces sorry placeholders with formal proofs for the Guruswami-Sudan existence and divisibility lemmas used in the proximity gap analysis. It refines theorem statements by adding necessary parameter hypotheses (such as $1 \leq m$) and aligning definitions with the underlying library's GuruswamiSudan implementation.
  • ArkLib/ProofSystem/Stir/OutOfDomSmpl.lean: This change updates the definition of listDecodingCollisionProbability by replacing the closeCodewordsRel predicate with relHammingBall. It is a minor refactoring to ensure consistent naming for Hamming distance relations and introduces no sorry placeholders.
  • ArkLib/ProofSystem/ConstraintSystem/R1CS.lean: This change modifies the pad_preserves_relation theorem by simplifying its hypotheses and replacing the existing detailed formal proof with a sorry placeholder. The update also removes an unused import and its associated documentation regarding the alignment of padded variables.
  • ArkLib/Data/Polynomial/Bivariate.lean: This update redefines rootMultiplicity₀ to represent the order of vanishing by calculating the minimum total degree of non-zero coefficients and introduces a shift operation for bivariate polynomials. It also adds a lemma proving that weightedDegree is always defined and includes minor documentation and formatting improvements to existing proofs.
  • ArkLib/ProofSystem/Whir/BlockRelDistance.lean: This change updates the lemma listBlock_subset_listHamming to include a new hypothesis requiring the relative distance $\delta$ to be at most 1 and renames the target set in the conclusion to relHammingBall. The modification ensures the lemma is consistent with updated naming conventions and domain constraints for relative Hamming distances.
  • ArkLib/ProofSystem/Stir/Quotienting.lean: This change refactors the quotienting lemma by replacing the use of closeCodewordsRel with relHammingBall in its hypotheses. It modifies an existing theorem statement without introducing new definitions or sorry placeholders.
  • ArkLib/ProofSystem/Whir/Folding.lean: This change updates the proof of the theorem folding_listdecoding_if_genMutualCorrAgreement by replacing the use of closeCodewordsRel with the updated definition relHammingBall. No new theorems or sorry placeholders are introduced.
  • ArkLib/ProofSystem/Whir/MutualCorrAgreement.lean: This change updates the proximityListDecodingCondition definition by replacing the function closeCodewordsRel with relHammingBall. This modification aligns the proximity condition with updated terminology for defining sets of codewords within a specific relative Hamming distance.
  • ArkLib/ProofSystem/Whir/OutofDomainSmpl.lean: This Lean 4 file refactors several lemmas related to WHIR out-of-domain sampling by replacing the closeCodewordsRel definition with relHammingBall. The changes update the statements of crs_equiv_rs_random_point_agreement, oodSampling_crs_eq_rs, and oodSampling_rs_le_bound, all of which still contain sorry placeholders.

Last updated: 2026-03-08 11:16 UTC.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: abf6a7f5d2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@eliasjudin eliasjudin force-pushed the fix-issue-213-decoder-constraints branch from 71db7ac to 3fde0b1 Compare February 21, 2026 13:12
@eliasjudin eliasjudin force-pushed the fix-issue-213-decoder-constraints branch from cedd967 to 5a97ec0 Compare February 24, 2026 11:07
@eliasjudin eliasjudin marked this pull request as draft February 24, 2026 12:27
@eliasjudin eliasjudin force-pushed the fix-issue-213-decoder-constraints branch 2 times, most recently from 5a97ec0 to 8aa5bfb Compare February 24, 2026 14:20
@eliasjudin eliasjudin marked this pull request as ready for review February 24, 2026 15:26
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8aa5bfba09

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@quangvdao
Copy link
Copy Markdown
Collaborator

You can use CompPoly now - probably after adding more supporting lemmas there

@eliasjudin eliasjudin marked this pull request as draft February 24, 2026 15:39
@eliasjudin
Copy link
Copy Markdown
Contributor Author

You can use CompPoly now - probably after adding more supporting lemmas there

this is actually exactly what was needed for the computable definition, will update later

@eliasjudin eliasjudin force-pushed the fix-issue-213-decoder-constraints branch from 1a82b33 to a23a779 Compare February 26, 2026 12:39
Resolve the  and  sorries by reusing existing Guruswami-Sudan existence/divisibility results with the required hypotheses and aligned condition types.

Co-authored-by: Aristotle (Harmonic) <aristotle-harmonic@harmonic.fun>
@eliasjudin eliasjudin marked this pull request as ready for review February 26, 2026 20:54
…4-pr300-followup

Follow-up: prove BCIKS20 proximity-gap existence/property lemmas
@eliasjudin eliasjudin force-pushed the fix-issue-213-decoder-constraints branch 5 times, most recently from 67686cf to 8738954 Compare February 27, 2026 12:31
@eliasjudin eliasjudin changed the title fix(coding-theory): resolve issue #213 decoder constraints feat(guruswami-sudan): constructive decoder witness/filter correctness Feb 27, 2026
@eliasjudin eliasjudin requested a review from quangvdao February 27, 2026 12:33
@eliasjudin
Copy link
Copy Markdown
Contributor Author

still trying to write a constructive algorithm for computing a Guruswami–Sudan witness Q directly
(e.g. via linearized system solving over CompPoly) to replace the brute-force fallback

@eliasjudin
Copy link
Copy Markdown
Contributor Author

@quangvdao @dhsorens some of this should probably go into CompPoly. let me know if you have any suggestions.

ster-oc and others added 3 commits February 27, 2026 18:02
Co-authored-by: Aristotle (Harmonic) <aristotle-harmonic@harmonic.fun>
Co-authored-by: Aristotle (Harmonic) <aristotle-harmonic@harmonic.fun>
@eliasjudin eliasjudin force-pushed the fix-issue-213-decoder-constraints branch 2 times, most recently from 862dd94 to db2b88f Compare March 3, 2026 10:50
@eliasjudin eliasjudin marked this pull request as draft March 4, 2026 08:55
@alexanderlhicks
Copy link
Copy Markdown
Collaborator

Thanks for the PR! I'd like to merge #300 and then this one on top of it if you could keep an eye out for that and facilitate this.

@alexanderlhicks alexanderlhicks self-assigned this Mar 7, 2026
@eliasjudin
Copy link
Copy Markdown
Contributor Author

eliasjudin commented Mar 8, 2026

Thanks for the PR! I'd like to merge #300 and then this one on top of it if you could keep an eye out for that and facilitate this.

@alexanderlhicks I'll wait for that and then update! Leaving the proximity generators stuff to @katyhr

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.

Proof obligation for decoder in ArkLib/Data/CodingTheory/GuruswamiSudan/GuruswamiSudan.lean

4 participants