Skip to content

Folding Polynomial definition and Fact 4.6 proof from STIR paper#384

Draft
ElijahVlasov wants to merge 46 commits intoVerified-zkEVM:mainfrom
NethermindEth:ElijahVlasov/folding-poly
Draft

Folding Polynomial definition and Fact 4.6 proof from STIR paper#384
ElijahVlasov wants to merge 46 commits intoVerified-zkEVM:mainfrom
NethermindEth:ElijahVlasov/folding-poly

Conversation

@ElijahVlasov
Copy link
Collaborator

No description provided.

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

🤖 Gemini PR Summary

Mathematical Formalization: Folding Polynomials

Formalizes the bivariate decomposition $f(Z) = Q(q(Z), Z)$ as described in Fact 4.6 of the STIR paper (Ben-Sasson and Sudan).

  • Decomposition Framework: Adds FoldingPolynomial.lean and EvenAndOdd.lean to define existence, uniqueness, and degree bounds for polynomial representations.
  • FRI Integration: Refactors the Fast Reed-Solomon Interactive Oracle Proof (FRI) implementation to use the polyFold API, simplifying round consistency completeness proofs.

Algebraic Infrastructure

Provides robust typeclasses and data structures optimized for Lean’s kernel performance.

  • Definitional Associativity: Implements CNat and AssocNat (Church-encoded natural numbers) to make addition and multiplication definitionally associative, reducing manual rewriting in complex proofs.
  • Polynomial Abstractions: Introduces PolynomialLike and MvPolynomialLike typeclasses to abstract universal properties, allowing theorems to apply across different polynomial ring representations.
  • Arithmetic Interfaces: Adds HasSucc, HasPred, and ToNat for standardized successor-based arithmetic and conversion logic.

Coding Theory & Protocol Specifications

Standardizes proximity definitions and expands the library’s support for modern proof systems.

  • Unified Proximity: Transitions to relHammingBall as a centralized definition for proximity and distance across STIR, WHIR, and list-decoding modules.
  • IOP Protocols: Establishes top-level modules and architectural skeletons for STIR, WHIR, and Binius (Binary Basefold), incorporating folding, quotienting, and out-of-domain sampling.
  • Sum-check Foundation: Adds foundational operations for the sum-check protocol, including multivariate polynomial partial evaluation and summation.

General Utilities

  • Data Structures: Introduces heterogeneous lists (HList), partial sum operations in BigOperators, and enhanced search predicates for List and Vector (e.g., findIdx').
  • Machine Integers: Maps Fin (2^n) to UInt64 and BitVec types, bridging formal algebraic proofs with hardware-level representations.
  • Verification State: Includes skeletal proofs for protocol completeness (using sorry placeholders) to establish the architectural framework for future formal verification.

Analysis of Changes

Metric Count
📝 Files Changed 87
Lines Added 4441
Lines Removed 1295

Lean Declarations

✏️ **Removed:** 13 declaration(s)
  • theorem append_right_of_not_lt {u : Fin m → α} {v : Fin n → α} in ArkLib/Data/Fin/Basic.lean
  • def weightedDegree.{u} {F : Type u} [Semiring F] (p : F[X][Y]) (u v : ℕ) : Option ℕ in ArkLib/Data/Polynomial/Bivariate.lean
  • lemma dotProduct_rightpad {R} [CommSemiring R] in ArkLib/Data/Matrix/Basic.lean
  • def natWeightedDegree.{u} {F : Type u} [Semiring F] (f : F[X][Y]) (u v : ℕ) : ℕ in ArkLib/Data/Polynomial/Bivariate.lean
  • def closeCodewordsRel (C : Code ι F) (y : ι → F) (r : ℝ) : Set (ι → F) in ArkLib/Data/CodingTheory/ListDecodability.lean
  • lemma foldNth_zero {s : ℕ} {α : 𝔽} : foldNth (2 ^ s) 0 α = 0 in ArkLib/Data/Polynomial/SplitFold.lean
  • def coeff.{u} {F : Type u} [Semiring F] (f : F[X][Y]) (i j : ℕ) : F in ArkLib/Data/Polynomial/Bivariate.lean
  • lemma foldNth_degree_le {n : ℕ} {f : 𝔽[X]} {α : 𝔽} [inst : NeZero n] : in ArkLib/Data/Polynomial/SplitFold.lean
  • def closeCodewords (C : Code ι F) (y : ι → F) (r : ℕ) : Set (ι → F) in ArkLib/Data/CodingTheory/ListDecodability.lean
  • def rootMultiplicity.{u} {F : Type u} [CommSemiring F] [DecidableEq F] in ArkLib/Data/Polynomial/Bivariate.lean
  • lemma foldNth_degree_le' {n : ℕ} {f : 𝔽[X]} {α : 𝔽} [inst : NeZero n] : in ArkLib/Data/Polynomial/SplitFold.lean
  • def rootMultiplicity₀.{u} {F : Type u} [Semiring F] [DecidableEq F] (f : F[X][Y]) : Option ℕ in ArkLib/Data/Polynomial/Bivariate.lean
  • theorem append_left_of_lt {u : Fin m → α} {v : Fin n → α} in ArkLib/Data/Fin/Basic.lean
✏️ **Added:** 275 declaration(s)
  • def listOfCloseCodewords (C : Code ι F) (y : ι → F) (r : ℕ) : ℕ in ArkLib/Data/CodingTheory/ListDecodability.lean
  • abbrev HList in ArkLib/Data/List/HList.lean
  • def churchOr (p q : ChurchBool α) : ChurchBool α in ArkLib/Data/CNat/Church.lean
  • lemma List.get_nil (i : Fin 0) (a : α) : [].get i = a in ArkLib/Data/List/HList.lean
  • theorem pow_three_eq_mul_sq {a : CNat 1} : a ^ 3 = a * (a * a) in ArkLib/Data/CNat/Defs.lean
  • lemma C_injective : Function.Injective (C : R → P) in ArkLib/Data/Polynomial/PolynomialLike.lean
  • def aeval {A : Type w} [CommSemiring A] [Algebra R A] (s : A) : P →ₐ[R] A in ArkLib/Data/Polynomial/PolynomialLike.lean
  • def leq {α : Type} (m n : ChurchNat α) : ChurchBool α in ArkLib/Data/CNat/Church.lean
  • def churchRecNat {β : Type} (n : ChurchNat ℕ) (step : β → β) (base : β) : β in ArkLib/Data/CNat/Church.lean
  • def churchFalse : ChurchBool α in ArkLib/Data/CNat/Church.lean
  • def getTypes {αs : List Type} (_ : HList αs) : List Type in ArkLib/Data/List/HList.lean
  • def length : HList' β ls → Nat in ArkLib/Data/List/HList.lean
  • theorem mul_assoc (m n p : ChurchNat α) : mul (mul m n) p = mul m (mul n p) in ArkLib/Data/CNat/Church.lean
  • lemma aeval_C {A : Type w} [CommSemiring A] [Algebra R A] (x : A) (r : R) : in ArkLib/Data/Polynomial/PolynomialLike.lean
  • lemma aeval_eq {A : Type y} [CommSemiring A] [Algebra R A] (f : P →ₐ[R] A) : in ArkLib/Data/MvPolynomial/MvPolynomialLike.lean
  • def isZero {α : Type} (n : ChurchNat α) : ChurchBool α in ArkLib/Data/CNat/Church.lean
  • def weightedDegree {F : Type u} [Semiring F] (p : F[X][Y]) (u v : ℕ) : Option ℕ in ArkLib/Data/Polynomial/Bivariate.lean
  • def sumPartial (m : ℕ) (n : ℕ) (D : Fin n → Finset R) : in ArkLib/Data/MvPolynomial/Sumcheck.lean
  • theorem le_iff_toNat_le (a b : AssocNat) : a ≤ b ↔ toNat a ≤ toNat b in ArkLib/Data/CNat/AssocNat.lean
  • -- theorem pow_add_self {a : CNat 2} : a ^ 2 * a = a ^ 3 in ArkLib/Data/CNat/Defs.lean
  • def one : ChurchNat α in ArkLib/Data/CNat/Church.lean
  • -- theorem toNat_injective : Function.Injective (@ToNat.toNat α _ _) in ArkLib/Data/Classes/ToNat.lean
  • lemma eq_zero_of_folding_polynomial_eq_zero {q f : F[X]} in ArkLib/Data/Polynomial/FoldingPolynomial.lean
  • theorem folding_polynomial_is_unique' {q f : Polynomial F} {Q : Polynomial (Polynomial F)} in ArkLib/Data/Polynomial/FoldingPolynomial.lean
  • def partialProd {α : Type*} [Monoid α] (l : List α) : List α in ArkLib/Data/List/BigOperators.lean
  • theorem ranges_length_eq_self_length {l : List ℕ} : l.ranges.length = l.length in ArkLib/Data/List/BigOperators.lean
  • -- theorem mul_distrib_add {a b c : CNat 2} : a * (b + c) = a * b + a * c in ArkLib/Data/CNat/Defs.lean
  • lemma evenPart_x_eval_eq {f : Polynomial F} {s : F} : in ArkLib/Data/Polynomial/EvenAndOdd.lean
  • lemma eval₂_eq' {S : Type w} [CommSemiring S] (g : P →+* S) (p : P) : in ArkLib/Data/Polynomial/PolynomialLike.lean
  • lemma folding_polynomial_eq_sum_splitNth {𝔽 : Type} [Field 𝔽] in ArkLib/Data/Polynomial/SplitFold.lean
  • def mul (a b : AssocNat) : AssocNat in ArkLib/Data/CNat/AssocNat.lean
  • theorem add_comm (m n : ChurchNat α) : add m n = add n m in ArkLib/Data/CNat/Church.lean
  • lemma getTypes_cons (x : Σ α : Type u, α) (xs : HList) : in ArkLib/Data/List/HList.lean
  • def DVec {m : Type v} (α : m → Type u) : Type (max u v) in ArkLib/Data/List/HList.lean
  • def finUInt16Equiv : Fin (2 ^ 16) ≃ UInt16 where in ArkLib/ToMathlib/UInt/Equiv.lean
  • theorem mul_one {a : CNat 50} : a * 1 = a in ArkLib/Data/CNat/Defs.lean
  • lemma length_nil : nil.length = 0 in ArkLib/Data/List/HList.lean
  • instance instOfNat {n : ℕ} : OfNat (CNat n) n in ArkLib/Data/CNat/Defs.lean
  • def ofFin {n : AssocNat} (f : Fin (AssocNat.toNat n)) : AssocFin n in ArkLib/Data/CNat/AssocNat.lean
  • def rootMultiplicity₀ {F : Type u} [Semiring F] [DecidableEq F] (f : F[X][Y]) : Option ℕ in ArkLib/Data/Polynomial/Bivariate.lean
  • lemma oddPart_def : in ArkLib/Data/Polynomial/EvenAndOdd.lean
  • def finUInt8Equiv : Fin (2 ^ 8) ≃ UInt8 where in ArkLib/ToMathlib/UInt/Equiv.lean
  • -- def pow (m n : ChurchNat α) : ChurchNat α in ArkLib/Data/CNat/Church.lean
  • theorem succ_succ {T : Type u} [HasSucc T] [Add T] [One T] [LawfulHasSucc T] (x : T) : in ArkLib/Data/Classes/HasSucc.lean
  • lemma polyFold_eq_sum_of_splitNth {𝔽 : Type} [Field 𝔽] in ArkLib/Data/Polynomial/SplitFold.lean
  • lemma aeval_X {A : Type y} [CommSemiring A] [Algebra R A] {F : Type z} [FunEquiv F σ A] (g : F) in ArkLib/Data/MvPolynomial/MvPolynomialLike.lean
  • lemma eval₂_C' {r : R} {S : Type w} [CommSemiring S] (f : R →+* S) (x : S) : in ArkLib/Data/Polynomial/PolynomialLike.lean
  • def findFinIdxIfTrue (p : α → Bool) (l : List α) (h : ∃ x ∈ l, p x) : Fin l.length in ArkLib/Data/List/Find.lean
  • def mulNat [Zero T] (a : Cayley T) : Nat → Cayley T in ArkLib/Data/CNat/Defs.lean
  • lemma folded_poly_degree_bound {Q : F[X][Y]} {q : F[X]} {t : ℕ} in ArkLib/Data/Polynomial/FoldingPolynomial.lean
  • def EvenPoly (f : Polynomial F) : Prop in ArkLib/Data/Polynomial/EvenAndOdd.lean
  • theorem idxOf'_eq_idxOf : @idxOf' = @idxOf in ArkLib/Data/List/Find.lean
  • lemma folding_polynomial_eq_map_of_f_degree_lt_q_degree {q f : F[X]} in ArkLib/Data/Polynomial/FoldingPolynomial.lean
  • def HList.toDVec (l : HList) : DVec (m in ArkLib/Data/List/HList.lean
  • lemma even_eval {f : Polynomial F} {s : F} (hEven : EvenPoly f) : in ArkLib/Data/Polynomial/EvenAndOdd.lean
  • theorem succ_eq_one_add (n : ChurchNat α) : succ n = add one n in ArkLib/Data/CNat/Church.lean
  • def C : R →+* P in ArkLib/Data/Polynomial/PolynomialLike.lean
  • def ChurchNat (α : Type) : Type in ArkLib/Data/CNat/Church.lean
  • lemma length_getTypes (l : HList) : l.getTypes.length = l.length in ArkLib/Data/List/HList.lean
  • lemma HList.toDVec_eq_getValue (l : HList) (i : Fin l.length) : l.toDVec i = l.getValue i in ArkLib/Data/List/HList.lean
  • -- -- def CNat.mul (m n : CNat) : CNat in ArkLib/Data/CNat/Church.lean
  • theorem pow_two_eq_mul {a : CNat 2} : a ^ 2 = a * a in ArkLib/Data/CNat/Defs.lean
  • def partialSum {α : Type*} [AddMonoid α] (l : List α) : List α in ArkLib/Data/List/BigOperators.lean
  • lemma oddPart_coeff {f : Polynomial F} {n : ℕ} : in ArkLib/Data/Polynomial/EvenAndOdd.lean
  • theorem ext' {a b : AssocNat} (h : a 0 = b 0) : a = b in ArkLib/Data/CNat/AssocNat.lean
  • def finBitVecEquiv {n : ℕ} : Fin (2 ^ n) ≃ BitVec n where in ArkLib/ToMathlib/UInt/Equiv.lean
  • def sub (a b : AssocNat) : AssocNat in ArkLib/Data/CNat/AssocNat.lean
  • def subNat (c : AssocNat) : Nat → AssocNat in ArkLib/Data/CNat/AssocNat.lean
  • def findSum (l : List α) (j : α) : Option α in ArkLib/Data/List/BigOperators.lean
  • def example1 : ChurchVec ℕ in ArkLib/Data/CNat/Church.lean
  • def eval₂AlgHom {A B : Type*} [CommSemiring A] [CommSemiring B] [MvPolynomialLike σ A P] in ArkLib/Data/MvPolynomial/MvPolynomialLike.lean
  • lemma polyFold_zero_eq_zero {k : ℕ} {r : F} : in ArkLib/Data/Polynomial/FoldingPolynomial.lean
  • theorem add_zero : @add α zero = @id (ChurchNat α) in ArkLib/Data/CNat/Church.lean
  • lemma eval₂AlgHom_apply {A : Type w} {B : Type*} [CommSemiring A] [CommSemiring B] in ArkLib/Data/Polynomial/PolynomialLike.lean
  • instance instHasPred {n : ℕ} : HasPred (CNat n) in ArkLib/Data/CNat/Defs.lean
  • def finIdxOfIfTrue [BEq α] [LawfulBEq α] (a : α) (l : List α) (h : a ∈ l) : Fin l.length in ArkLib/Data/List/Find.lean
  • theorem degrees_peval {x : σ₁ → R} {f : σ → σ₁ ⊕ σ₂} {p : MvPolynomial σ R} : in ArkLib/Data/MvPolynomial/Sumcheck.lean
  • -- def churchNatIso : ValidChurchNat ≃ ℕ in ArkLib/Data/CNat/Church.lean
  • -- def pairwise {α : Type} {n : Nat} (v : Vector α (2 * n)) : Vector (α × α) n in ArkLib/Data/List/Vector.lean
  • theorem folding_polynomial_deg_x {q f : F[X]} : in ArkLib/Data/Polynomial/FoldingPolynomial.lean
  • theorem peval_eq_eval_sumToIter_rename (f : σ → σ₁ ⊕ σ₂) (x : σ₁ → R) (p : MvPolynomial σ R) : in ArkLib/Data/MvPolynomial/Sumcheck.lean
  • theorem zero_add {n : ℕ} (a : CNat (n + 1)) : 0 + a = a in ArkLib/Data/CNat/Defs.lean
  • instance [Zero T] [ToNat T] : DecidableRel (@LE.le (Cayley T) _) in ArkLib/Data/CNat/Defs.lean
  • def sumExceptFirst' (n : ℕ) (h : n > 0) (D : Fin (n - 1) → Finset R) : in ArkLib/Data/MvPolynomial/Sumcheck.lean
  • lemma aeval_eq' {A : Type y} [CommSemiring A] [Algebra R A] {F : Type z} [FunEquiv F σ A] in ArkLib/Data/MvPolynomial/MvPolynomialLike.lean
  • def cons (x : Σ α : Type u, α) (xs : HList) : HList in ArkLib/Data/List/HList.lean
  • lemma evenize_coeff {f : Polynomial F} {n : ℕ} : in ArkLib/Data/Polynomial/EvenAndOdd.lean
  • instance instNatPow {n : ℕ} : NatPow (CNat n) in ArkLib/Data/CNat/Defs.lean
  • -- def CNat : Type in ArkLib/Data/CNat/Church.lean
  • def powNat [Zero T] [One T] [ToNat T] (a : Cayley T) : Nat → Cayley T in ArkLib/Data/CNat/Defs.lean
  • lemma eval₂_eq' {S : Type y} [CommSemiring S] {F : Type z} [FunEquiv F σ S] (h : P →+* S) (p : P) : in ArkLib/Data/MvPolynomial/MvPolynomialLike.lean
  • theorem polynomial_sum_ext.{u, u_1} in ArkLib/Data/CodingTheory/BerlekampWelch/ToMathlib.lean
  • def succ (n : ChurchNat α) : ChurchNat α in ArkLib/Data/CNat/Church.lean
  • theorem pow_one {a : CNat 50} : a ^ 1 = a in ArkLib/Data/CNat/Defs.lean
  • lemma even_poly_has_even_degree {f : F[X]} in ArkLib/Data/Polynomial/EvenAndOdd.lean
  • -- theorem zero_mul (n : ChurchNat α) : mul zero n = zero in ArkLib/Data/CNat/Church.lean
  • def HList.ofDVec {α : Fin n → Type u} (l : DVec (m in ArkLib/Data/List/HList.lean
  • theorem mul_two (n : ChurchNat α) : mul n two = add n n in ArkLib/Data/CNat/Church.lean
  • abbrev CNat (n : ℕ) : Type in ArkLib/Data/CNat/Defs.lean
  • -- theorem mul_distrib_add (m n p : ChurchNat α) : mul m (add n p) = add (mul m n) (mul m p) in ArkLib/Data/CNat/Church.lean
  • instance instPow {n : ℕ} : Pow (CNat n) Nat in ArkLib/Data/CNat/Defs.lean
  • def nil : HList in ArkLib/Data/List/HList.lean
  • def ofNat (n : ℕ) : ValidChurchNat in ArkLib/Data/CNat/Church.lean
  • theorem ofNat_toNat (n : ChurchNat ℕ) : ofNat (toNat n) = n in ArkLib/Data/CNat/Church.lean
  • lemma evenPart_def : in ArkLib/Data/Polynomial/EvenAndOdd.lean
  • instance instMul {n : ℕ} : Mul (CNat n) in ArkLib/Data/CNat/Defs.lean
  • def Fin.sumCommEquiv (m : ℕ) (n : ℕ) : Fin (m + n) ≃ (Fin n) ⊕ (Fin m) in ArkLib/Data/MvPolynomial/Sumcheck.lean
  • theorem folding_polynomial_is_unique {q f : F[X]} {Q : F[X][Y]} in ArkLib/Data/Polynomial/FoldingPolynomial.lean
  • def churchNot (p : ChurchBool α) : ChurchBool α in ArkLib/Data/CNat/Church.lean
  • def tail {α : Type u} {αs : List (Type u)} : HList (α :: αs) → HList αs in ArkLib/Data/List/HList.lean
  • lemma ofPolynomialAlgHom_X : ofPolynomialAlgHom (Polynomial.X : R[X]) = (X : P) in ArkLib/Data/Polynomial/PolynomialLike.lean
  • theorem pow_zero {a : CNat 50} : a ^ 0 = 1 in ArkLib/Data/CNat/Defs.lean
  • def monomial (n : ℕ) (r : R) : P in ArkLib/Data/Polynomial/PolynomialLike.lean
  • -- theorem mul_assoc_self {a : CNat 2} : (a * a) * a = a * (a * a) in ArkLib/Data/CNat/Defs.lean
  • lemma aeval_eq' {A : Type w} [CommSemiring A] [Algebra R A] (f : P →ₐ[R] A) (p : P) : in ArkLib/Data/Polynomial/PolynomialLike.lean
  • def churchVecFold (xs : ChurchVec α) (f : α → List α → List α) (base : List α) : List α in ArkLib/Data/CNat/Church.lean
  • theorem mul_succ (m n : ChurchNat α) : mul n (succ m) = add n (mul n m) in ArkLib/Data/CNat/Church.lean
  • def pred (n : ChurchNat α) : ChurchNat α in ArkLib/Data/CNat/Church.lean
  • def ValidChurchNat : Type in ArkLib/Data/CNat/Church.lean
  • def toNat (f : ValidChurchNat) : ℕ in ArkLib/Data/CNat/Church.lean
  • def interleave {n : Nat} (xs : Vector α n) (ys : Vector α n) : Vector α (2 * n) in ArkLib/Data/List/Vector.lean
  • def natWeightedDegree {F : Type u} [Semiring F] (f : F[X][Y]) (u v : ℕ) : ℕ in ArkLib/Data/Polynomial/Bivariate.lean
  • def finUInt64Equiv : Fin (2 ^ 64) ≃ UInt64 where in ArkLib/ToMathlib/UInt/Equiv.lean
  • def toList (xs : ChurchVec α) : List α in ArkLib/Data/CNat/Church.lean
  • lemma polyFold_natDegree_le {f : F[X]} {k : ℕ} {r : F} : in ArkLib/Data/Polynomial/FoldingPolynomial.lean
  • lemma getTypes_nil : getTypes [] = [] in ArkLib/Data/List/HList.lean
  • def churchRec {α : Type} (n : ChurchNat α) (step : α → α) (base : α) : α in ArkLib/Data/CNat/Church.lean
  • -- instance instDiv {n : ℕ} : Div (CNat n) in ArkLib/Data/CNat/Defs.lean
  • lemma length_cons (x : Σ α : Type u, α) (xs : HList) : (x ::ₕ xs).length = xs.length + 1 in ArkLib/Data/List/HList.lean
  • theorem mul_zero (n : ChurchNat α) : mul n zero = zero in ArkLib/Data/CNat/Church.lean
  • def finIdxOf [BEq α] [LawfulBEq α] (a : α) (l : List α) : Fin (l.length + 1) in ArkLib/Data/List/Find.lean
  • lemma listOfCloseCodewords_eq_zero : in ArkLib/Data/CodingTheory/ListDecodability.lean
  • lemma evenize_eq_comp_x_squared {f : Polynomial F} : in ArkLib/Data/Polynomial/EvenAndOdd.lean
  • def two : ChurchNat α in ArkLib/Data/CNat/Church.lean
  • theorem zero_add (n : ChurchNat α) : add zero n = n in ArkLib/Data/CNat/Church.lean
  • def findSumIdxWith (l : List ℕ) (j : Fin l.sum) : (i : Fin l.length) × Fin (l.get i) in ArkLib/Data/List/BigOperators.lean
  • lemma evenPart_even {f : Polynomial F} : in ArkLib/Data/Polynomial/EvenAndOdd.lean
  • lemma eval₂AlgHom_apply {A B : Type*} [CommSemiring A] [CommSemiring B] [MvPolynomialLike σ A P] in ArkLib/Data/MvPolynomial/MvPolynomialLike.lean
  • def subNat [Zero T] [ToNat T] (a : Cayley T) : Nat → Cayley T in ArkLib/Data/CNat/Defs.lean
  • theorem ranges_succ {a : ℕ} {l : List ℕ} : in ArkLib/Data/List/BigOperators.lean
  • lemma foldingPolynomial_C_f {f : F} {q : F[X]} : in ArkLib/Data/Polynomial/FoldingPolynomial.lean
  • theorem zero_mul {a : AssocNat} : 0 * a = 0 in ArkLib/Data/CNat/AssocNat.lean
  • -- theorem mul_add_distrib (m n p : ChurchNat α) : mul (add m n) p = add (mul m p) (mul n p) in ArkLib/Data/CNat/Church.lean
  • def three : ChurchNat α in ArkLib/Data/CNat/Church.lean
  • def sumExceptFirst (n : ℕ) (D : Fin n → Finset R) : in ArkLib/Data/MvPolynomial/Sumcheck.lean
  • theorem one_mul (n : ChurchNat α) : mul one n = n in ArkLib/Data/CNat/Church.lean
  • instance instOne {n : ℕ} : One (CNat n) in ArkLib/Data/CNat/Defs.lean
  • lemma evenPart_by_2 : in ArkLib/Data/Polynomial/EvenAndOdd.lean
  • theorem add_assoc (a b c : AssocNat) : (a + b) + c = a + (b + c) in ArkLib/Data/CNat/AssocNat.lean
  • def lt {α : Type} (m n : ChurchNat α) : ChurchBool α in ArkLib/Data/CNat/Church.lean
  • def finUInt32Equiv : Fin (2 ^ 32) ≃ UInt32 where in ArkLib/ToMathlib/UInt/Equiv.lean
  • -- theorem sum_of_sumExceptFirst'_eval_eq_sumAll (n : ℕ+) (D : Finset R) in ArkLib/Data/MvPolynomial/Sumcheck.lean
  • theorem succ_mul {a b : AssocNat} : (succ a) * b = a * b + b in ArkLib/Data/CNat/AssocNat.lean
  • theorem lt_iff_toNat_lt (a b : AssocNat) : a < b ↔ toNat a < toNat b in ArkLib/Data/CNat/AssocNat.lean
  • lemma eq_evenize_deevenize {f : Polynomial F} (hEven : EvenPoly f) : in ArkLib/Data/Polynomial/EvenAndOdd.lean
  • theorem support_C {r : R} [h : Decidable (r = 0)] : in ArkLib/Data/MvPolynomial/Degrees.lean
  • theorem findSum_of_le_sum {l : List ℕ} {j : ℕ} (h : j < l.sum) : ∃ n, findSum l j = some n in ArkLib/Data/List/BigOperators.lean
  • lemma eval₂_monomial {S : Type w} [CommSemiring S] (f : R →+* S) (x : S) (n : ℕ) (r : R) : in ArkLib/Data/Polynomial/PolynomialLike.lean
  • theorem partialSum_nil : [].partialSum = [0] in ArkLib/Data/List/BigOperators.lean
  • theorem findIdx'_eq_findIdx : @findIdx' = @findIdx in ArkLib/Data/List/Find.lean
  • def peval (f : σ → σ₁ ⊕ σ₂) (x : σ₁ → R) : MvPolynomial σ R →+* MvPolynomial σ₂ R in ArkLib/Data/MvPolynomial/Sumcheck.lean
  • def test : HList [Nat, String, Nat] in ArkLib/Data/List/HList.lean
  • instance instToNat {n : ℕ} : ToNat (CNat n) in ArkLib/Data/CNat/Defs.lean
  • def aeval {A : Type y} [CommSemiring A] [Algebra R A] {F : Type z} [FunEquiv F σ A] (g : F) : in ArkLib/Data/MvPolynomial/MvPolynomialLike.lean
  • theorem ofNat_zero : ofNat 0 = @zero α in ArkLib/Data/CNat/Church.lean
  • def churchTrue : ChurchBool α in ArkLib/Data/CNat/Church.lean
  • def findSumIdx' (l : List ℕ) (j : Fin l.sum) : Fin l.length in ArkLib/Data/List/BigOperators.lean
  • theorem toNat_succ (n : ChurchNat ℕ) : toNat (succ n) = n.toNat.succ in ArkLib/Data/CNat/Church.lean
  • theorem mul_add {a b c : AssocNat} : a * (b + c) = a * b + a * c in ArkLib/Data/CNat/AssocNat.lean
  • def someValues : HList' (fun x => x) someTypes in ArkLib/Data/List/HList.lean
  • theorem partialSum_length (l : List ℕ) : l.partialSum.length = l.length + 1 in ArkLib/Data/List/BigOperators.lean
  • -- theorem toNat_eq_iff [LawfulToNat α] (a b : α) : ToNat.toNat a = ToNat.toNat b ↔ a = b in ArkLib/Data/Classes/ToNat.lean
  • theorem add_assoc (m n p : ChurchNat α) : add (add m n) p = add m (add n p) in ArkLib/Data/CNat/Church.lean
  • instance instHasSucc {n : ℕ} : HasSucc (CNat n) in ArkLib/Data/CNat/Defs.lean
  • lemma toPolynomialAlgHom_X : toPolynomialAlgHom (X : P) = Polynomial.X in ArkLib/Data/Polynomial/PolynomialLike.lean
  • -- theorem mul_distrib_add_one {a b : CNat 2} : a * (b + 1) = a * b + a in ArkLib/Data/CNat/Defs.lean
  • theorem succ'_ne_zero (n : Nat) : succ' n ≠ 0 in ArkLib/Data/Classes/HasSucc.lean
  • lemma getTypes_hcons (x : Σ α : Type u, α) (xs : HList) : in ArkLib/Data/List/HList.lean
  • def sumAll (n : ℕ) (D : Fin n → Finset R) : MvPolynomial (Fin n) R →ₗ[R] R in ArkLib/Data/MvPolynomial/Sumcheck.lean
  • def add (m n : ChurchNat α) : ChurchNat α in ArkLib/Data/CNat/Church.lean
  • def head {α : Type u} {αs : List (Type u)} : HList (α :: αs) → α in ArkLib/Data/List/HList.lean
  • def get (mls : HList' β ls) : member a ls → β a in ArkLib/Data/List/HList.lean
  • lemma polynomialAlgEquiv_unique (f : P ≃ₐ[R] R[X]) : f = polynomialAlgEquiv in ArkLib/Data/Polynomial/PolynomialLike.lean
  • def chunkPairwise {α : Type} : {n : Nat} → Vector α (2 * n) → Vector (α × α) n in ArkLib/Data/List/Vector.lean
  • def ChurchBool (α : Type) : Type in ArkLib/Data/CNat/Church.lean
  • theorem pred_succ {T : Type u} [HasSucc T] [Zero T] [ToNat T] (x : Cayley T) : in ArkLib/Data/CNat/Defs.lean
  • def ChurchVec (α : Type) : Type in ArkLib/Data/CNat/Church.lean
  • theorem mul_one (n : ChurchNat α) : mul n one = n in ArkLib/Data/CNat/Church.lean
  • lemma evenize_is_even {f : Polynomial F} : in ArkLib/Data/Polynomial/EvenAndOdd.lean
  • -- theorem mul_assoc {a b c : CNat 2} : (a * b) * c = a * (b * c) in ArkLib/Data/CNat/Defs.lean
  • lemma deevenize_comp_x_squared {f : Polynomial F} (hEven : EvenPoly f) : in ArkLib/Data/Polynomial/EvenAndOdd.lean
  • lemma ext {m n : ChurchNat α} (h : ∀ f x, m f x = n f x) : m = n in ArkLib/Data/CNat/Church.lean
  • lemma f_eq_evenPart_plus_x_oddPart {f : Polynomial F} : in ArkLib/Data/Polynomial/EvenAndOdd.lean
  • def churchNil : ChurchVec α in ArkLib/Data/CNat/Church.lean
  • lemma eval₂_induction_on : True in ArkLib/Data/Polynomial/PolynomialLike.lean
  • -- def CNat₂.add (m n : CNat₂) : CNat₂ in ArkLib/Data/CNat/Church.lean
  • lemma getTypes_eq_get_fst (l : HList) (i : Fin l.length) : l.getTypes[i] = l[i].1 in ArkLib/Data/List/HList.lean
  • -- theorem mulNat_distrib_add_one {a : CNat 1} {b _ : Nat} : in ArkLib/Data/CNat/Defs.lean
  • lemma evenize_eval {f : Polynomial F} {s : F} : in ArkLib/Data/Polynomial/EvenAndOdd.lean
  • lemma poly_fold_k_eq_2 {f : F[X]} {r : F} : in ArkLib/Data/Polynomial/EvenAndOdd.lean
  • lemma foldingPolynomial_zero {q : F[X]} : in ArkLib/Data/Polynomial/FoldingPolynomial.lean
  • theorem folding_polynomial_deg_y_bound {q f : F[X]} (h : 0 < q.degree) : in ArkLib/Data/Polynomial/FoldingPolynomial.lean
  • def toFin (f : AssocFin n) : Fin (AssocNat.toNat n) in ArkLib/Data/CNat/AssocNat.lean
  • def modNat [Zero T] [DecidableEq T] [ToNat T] in ArkLib/Data/CNat/Defs.lean
  • def coeff {F : Type u} [Semiring F] (f : F[X][Y]) (i j : ℕ) : F in ArkLib/Data/Polynomial/Bivariate.lean
  • def churchAnd (p q : ChurchBool α) : ChurchBool α in ArkLib/Data/CNat/Church.lean
  • -- def DVec.toHList (l : DVec (m in ArkLib/Data/List/HList.lean
  • instance instZero {n : ℕ} : Zero (CNat n) in ArkLib/Data/CNat/Defs.lean
  • def mul (m n : ChurchNat α) : ChurchNat α in ArkLib/Data/CNat/Church.lean
  • theorem add_zero {n : ℕ} (a : CNat (n + 1)) : a + 0 = a in ArkLib/Data/CNat/Defs.lean
  • theorem toNat_ofNat (n : ℕ) : toNat (ofNat n) = n in ArkLib/Data/CNat/Church.lean
  • def sub (m n : ChurchNat α) : ChurchNat α in ArkLib/Data/CNat/Church.lean
  • def somePairs : HList' (fun x => x × x) someTypes in ArkLib/Data/List/HList.lean
  • -- def evalFirstVar (p : MvPolynomial (Fin n) R) (r : R) (pos : n > 0) : in ArkLib/Data/MvPolynomial/Sumcheck.lean
  • lemma folding_polynomial_C_q {q : F} {f : F[X]} : in ArkLib/Data/Polynomial/FoldingPolynomial.lean
  • lemma listOfCloseCodewordsRel_eq_zero : in ArkLib/Data/CodingTheory/ListDecodability.lean
  • -- def join {αs : List (Type u)} {βs : αs → List (Type v)} : HList (List (HList βs)) → HList αs in ArkLib/Data/List/HList.lean
  • theorem mul_two_eq_add {a : CNat 50} : a * 2 = a + a in ArkLib/Data/CNat/Defs.lean
  • lemma aeval_eq {A : Type w} [CommSemiring A] [Algebra R A] (f : P →ₐ[R] A) : f = aeval (f X) in ArkLib/Data/Polynomial/PolynomialLike.lean
  • def listOfCloseCodewordsRel (C : Code ι F) (y : ι → F) (r : ℝ) : ℕ in ArkLib/Data/CodingTheory/ListDecodability.lean
  • theorem add_assoc {n : ℕ} (a b c : CNat (n + 1)) : (a + b) + c = a + (b + c) in ArkLib/Data/CNat/Defs.lean
  • theorem add_succ (m n : ChurchNat α) : add (succ m) n = succ (add m n) in ArkLib/Data/CNat/Church.lean
  • def findFinIdx (p : α → Bool) (l : List α) : Fin (l.length + 1) in ArkLib/Data/List/Find.lean
  • -- theorem ne_of_toNat_ne (a b : α) (h : ToNat.toNat a ≠ ToNat.toNat b) : a ≠ b in ArkLib/Data/Classes/ToNat.lean
  • lemma ofPolynomialAlgHom_toPolynomialAlgHom_X : in ArkLib/Data/Polynomial/PolynomialLike.lean
  • lemma deevenize_evenize {f : Polynomial F} : in ArkLib/Data/Polynomial/EvenAndOdd.lean
  • def eval₂AlgHom {A : Type w} {B : Type*} [CommSemiring A] [CommSemiring B] [PolynomialLike A P] in ArkLib/Data/Polynomial/PolynomialLike.lean
  • theorem peval_def (f : σ → σ₁ ⊕ σ₂) (x : σ₁ → R) (p : MvPolynomial σ R) : in ArkLib/Data/MvPolynomial/Sumcheck.lean
  • def churchCons (x : α) (xs : ChurchVec α) : ChurchVec α in ArkLib/Data/CNat/Church.lean
  • lemma oddPart_even {f : Polynomial F} : in ArkLib/Data/Polynomial/EvenAndOdd.lean
  • theorem ranges_nil : List.ranges [] = [] in ArkLib/Data/List/BigOperators.lean
  • def mulNat (a : AssocNat) : Nat → AssocNat in ArkLib/Data/CNat/AssocNat.lean
  • def idxOf' [BEq α] (a : α) (l : List α) : ℕ in ArkLib/Data/List/Find.lean
  • def C : R →+* P in ArkLib/Data/MvPolynomial/MvPolynomialLike.lean
  • lemma evenPart_coeff {f : Polynomial F} {n : ℕ} : in ArkLib/Data/Polynomial/EvenAndOdd.lean
  • theorem toNat_zero : toNat zero = 0 in ArkLib/Data/CNat/Church.lean
  • def divNat [Zero T] [DecidableEq T] [ToNat T] in ArkLib/Data/CNat/Defs.lean
  • -- def CNat₂ : Type in ArkLib/Data/CNat/Church.lean
  • theorem sum_mem_partialSum (l : List ℕ) : l.sum ∈ l.partialSum in ArkLib/Data/List/BigOperators.lean
  • lemma oddPart_by_2 : in ArkLib/Data/Polynomial/EvenAndOdd.lean
  • def zero : ChurchNat α in ArkLib/Data/CNat/Church.lean
  • -- def mapNth (n : Fin' αs.length) (f : (αs.get' n) → β) (h : HList αs) : in ArkLib/Data/List/HList.lean
  • lemma eval₂_f_eq_C (r : R) (x : P) : eval₂ (P in ArkLib/Data/Polynomial/PolynomialLike.lean
  • -- def mapNthNoMetaEval : (n : Fin αs.length) → ((αs.get n) → β) → HList αs → HList (αs.repla n β) in ArkLib/Data/List/HList.lean
  • lemma cons_eq_List.cons : x ::ₕ xs = x :: xs in ArkLib/Data/List/HList.lean
  • lemma aeval_apply {A : Type w} [CommSemiring A] [Algebra R A] (s : A) : in ArkLib/Data/Polynomial/PolynomialLike.lean
  • -- theorem mul_zero {n : ℕ} (a : CNat (n + 1)) : a * 0 = 0 in ArkLib/Data/CNat/Defs.lean
  • lemma ofPolynomialAlgHom_toPolynomialAlgHom_C {r : R} : in ArkLib/Data/Polynomial/PolynomialLike.lean
  • def rootMultiplicity {F : Type u} [CommSemiring F] [DecidableEq F] in ArkLib/Data/Polynomial/Bivariate.lean
  • lemma folding_polynomial_deg_x_bound {q f : F[X]} {t : ℕ} in ArkLib/Data/Polynomial/FoldingPolynomial.lean
  • lemma oddPart_x_eval_eq {f : Polynomial F} {s : F} : in ArkLib/Data/Polynomial/EvenAndOdd.lean
  • def findSumIdx (l : List α) (j : α) : ℕ in ArkLib/Data/List/BigOperators.lean
  • instance instSub {n : ℕ} : Sub (CNat n) in ArkLib/Data/CNat/Defs.lean
  • lemma deevenize_zero : in ArkLib/Data/Polynomial/EvenAndOdd.lean
  • instance [ToString α] (αs : List Type) [HListString (HList αs)] : in ArkLib/Data/List/HList.lean
  • lemma eval₂_C' {S : Type y} [CommSemiring S] {F : Type z} [FunEquiv F σ S] in ArkLib/Data/MvPolynomial/MvPolynomialLike.lean
  • -- theorem DVec.toHList_getTypes (l : DVec (m in ArkLib/Data/List/HList.lean
  • lemma even_y_odd_eq_folding_polynomial {f : Polynomial F} : in ArkLib/Data/Polynomial/EvenAndOdd.lean
  • lemma substitution_property_of_folding_polynomial {q f : F[X]} : in ArkLib/Data/Polynomial/FoldingPolynomial.lean
  • instance instAdd {n : ℕ} : Add (CNat n) in ArkLib/Data/CNat/Defs.lean
  • lemma aeval_X {A : Type w} [CommSemiring A] [Algebra R A] (s : A) : aeval s X (P in ArkLib/Data/Polynomial/PolynomialLike.lean
  • theorem ofNat_succ (n : ℕ) : @ofNat α (n.succ) = succ (ofNat n) in ArkLib/Data/CNat/Church.lean
  • lemma eval₂_comp_C {S : Type w} [CommSemiring S] (f : R →+* S) (x : S) : in ArkLib/Data/Polynomial/PolynomialLike.lean
  • -- theorem mul_succ {a b : AssocNat} : a * (succ b) = a + a * b in ArkLib/Data/CNat/AssocNat.lean
  • theorem toFun_eq_const_plus (t : AssocNat) : ∀ m : Nat, t m = t 0 + m in ArkLib/Data/CNat/AssocNat.lean
  • def findIdx' (p : α → Bool) (l : List α) : ℕ in ArkLib/Data/List/Find.lean
  • def getValue (l : HList) (i : Fin l.length) in ArkLib/Data/List/HList.lean
  • theorem sumExceptFirst'_degree_le (n : ℕ) (h : n > 0) (D : Fin (n - 1) → Finset R) in ArkLib/Data/MvPolynomial/Sumcheck.lean
  • def someTypes : List Type in ArkLib/Data/List/HList.lean
  • def toAssocNat (f : AssocFin n) : AssocNat in ArkLib/Data/CNat/AssocNat.lean
  • lemma deevenize_coeff {f : Polynomial F} {n : ℕ} : in ArkLib/Data/Polynomial/EvenAndOdd.lean
  • theorem partialSum_succ {a : α} {l : List α} : in ArkLib/Data/List/BigOperators.lean
  • lemma folding_polynomial_is_the_reminder {q f : F[X]} : in ArkLib/Data/Polynomial/FoldingPolynomial.lean
  • instance [Repr α] (αs : List Type) [HListRepr (HList αs)] : HListRepr (HList (α :: αs)) where in ArkLib/Data/List/HList.lean
  • theorem succ'_injective : Function.Injective (succ' : Nat → Nat) in ArkLib/Data/Classes/HasSucc.lean
✏️ **Affected:** 4 declaration(s) (line number changed)
  • def hammingBall (C : Code ι F) (y : ι → F) (r : ℕ) : Set (ι → F) in ArkLib/Data/CodingTheory/ListDecodability.lean moved from L22 to L23
  • def relHammingBall (C : Code ι F) (y : ι → F) (r : ℝ) : Code ι F in ArkLib/Data/CodingTheory/ListDecodability.lean moved from L27 to L29
  • lemma not_collisionPerm_of_not_combined (h : ¬ E trace) : ¬ E_prp trace in ArkLib/OracleReduction/FiatShamir/DuplexSponge/Security/BadEvents.lean moved from L213 to L213
  • lemma rootMultiplicity_some_implies_root {F : Type} [CommSemiring F] [DecidableEq F] in ArkLib/Data/Polynomial/Bivariate.lean moved from L148 to L150

sorry Tracking

❌ **Added:** 40 `sorry`(s)
  • theorem mul_add {a b c : AssocNat} : a * (b + c) = a * b + a * c in ArkLib/Data/CNat/AssocNat.lean
  • def OracleVerifier.addSalt (V : OracleVerifier oSpec StmtIn OStmtIn StmtOut OStmtOut pSpec) : in ArkLib/OracleReduction/Salt.lean
  • lemma OracleVerifier.id_toVerifier : in ArkLib/OracleReduction/Basic.lean
  • def pred (n : ChurchNat α) : ChurchNat α in ArkLib/Data/CNat/Church.lean
  • instance [Zero T] [ToNat T] : DecidableEq (Cayley T) in ArkLib/Data/CNat/Defs.lean
  • lemma aeval_eq' {A : Type y} [CommSemiring A] [Algebra R A] {F : Type z} [FunEquiv F σ A] in ArkLib/Data/MvPolynomial/MvPolynomialLike.lean
  • def interleave {n : Nat} (xs : Vector α n) (ys : Vector α n) : Vector α (2 * n) in ArkLib/Data/List/Vector.lean
  • lemma powContraction_is_right_inverse_to_linearMvExtension in ArkLib/Data/MvPolynomial/LinearMvExtension.lean
  • lemma C_injective : Function.Injective (C : R → P) in ArkLib/Data/Polynomial/PolynomialLike.lean
  • theorem fiatShamir_completeness (relIn : Set (StmtIn × WitIn)) (relOut : Set (StmtOut × WitOut)) in ArkLib/OracleReduction/FiatShamir/Basic.lean
  • lemma matching_set_is_a_sub_of_coeffs_of_close_proximity in ArkLib/Data/CodingTheory/ProximityGap/BCIKS20.lean
  • theorem cast_runToRound (j : Fin (n₁ + 1)) (stmt : StmtIn) (wit : WitIn) in ArkLib/OracleReduction/Cast.lean
  • theorem succ_mul {a b : AssocNat} : (succ a) * b = a * b + b in ArkLib/Data/CNat/AssocNat.lean
  • lemma rootMultiplicity_some_implies_root {F : Type} [CommSemiring F] [DecidableEq F] in ArkLib/Data/Polynomial/Bivariate.lean
  • lemma runWithLogToRound_discard_log_eq_runToRound (i : Fin (n + 1)) in ArkLib/OracleReduction/Execution.lean
  • lemma polynomialAlgEquiv_unique (f : P ≃ₐ[R] R[X]) : f = polynomialAlgEquiv in ArkLib/Data/Polynomial/PolynomialLike.lean
  • theorem cast_run (stmt : StmtIn) (wit : WitIn) : in ArkLib/OracleReduction/Cast.lean
  • lemma aeval_eq {A : Type y} [CommSemiring A] [Algebra R A] (f : P →ₐ[R] A) : in ArkLib/Data/MvPolynomial/MvPolynomialLike.lean
  • theorem pred_succ {T : Type u} [HasSucc T] [Zero T] [ToNat T] (x : Cayley T) : in ArkLib/Data/CNat/Defs.lean
  • lemma principal_is_maximal_iff_irred {F : Type} [Field F] (f : F[X]) : in ArkLib/Data/Polynomial/Prelims.lean
  • def sub (m n : ChurchNat α) : ChurchNat α in ArkLib/Data/CNat/Church.lean
  • theorem pad_preserves_relation (sz₁ sz₂ : Size) in ArkLib/ProofSystem/ConstraintSystem/R1CS.lean
  • theorem cast_id : in ArkLib/OracleReduction/Cast.lean
  • theorem ofNat_toNat (n : ChurchNat ℕ) : ofNat (toNat n) = n in ArkLib/Data/CNat/Church.lean
  • theorem mul_distrib_add {a b : CNat 1} : a * (b + 1) = a * b + a in ArkLib/Data/CNat/Defs.lean
  • theorem vappend_ext (u₁ u₂ : Fin m → α) (v₁ v₂ : Fin n → α) : in ArkLib/Data/Fin/Tuple/Lemmas.lean
  • lemma separable_iff_discr_eq_zero {F : Type} [Field F] [Inhabited F] (f : F[X]) : in ArkLib/Data/Polynomial/Prelims.lean
  • lemma eval₂_induction_on : True in ArkLib/Data/Polynomial/PolynomialLike.lean
  • theorem toFun_eq_const_plus (t : AssocNat) : ∀ m : Nat, t m = t 0 + m in ArkLib/Data/CNat/AssocNat.lean
  • instance instDCast₃ : DCast₃ Nat (fun n => Fin (n + 1)) (fun n _ => ProtocolSpec n) in ArkLib/OracleReduction/ProtocolSpec/Cast.lean
  • theorem sumExceptFirst'_degree_le (n : ℕ) (h : n > 0) (D : Fin (n - 1) → Finset R) in ArkLib/Data/MvPolynomial/Sumcheck.lean
  • def findSumIdxWith (l : List ℕ) (j : Fin l.sum) : (i : Fin l.length) × Fin (l.get i) in ArkLib/Data/List/BigOperators.lean
  • theorem add_comm (m n : ChurchNat α) : add m n = add n m in ArkLib/Data/CNat/Church.lean
  • lemma ofPolynomialAlgHom_toPolynomialAlgHom_X : in ArkLib/Data/Polynomial/PolynomialLike.lean
  • theorem singleton_append (a : α) (v : Fin n → α) : in ArkLib/Data/Fin/Tuple/Lemmas.lean
  • lemma irreducible_H in ArkLib/Data/CodingTheory/ProximityGap/BCIKS20.lean
  • theorem zero_mul {a : AssocNat} : 0 * a = 0 in ArkLib/Data/CNat/AssocNat.lean
  • theorem degrees_peval {x : σ₁ → R} {f : σ → σ₁ ⊕ σ₂} {p : MvPolynomial σ R} : in ArkLib/Data/MvPolynomial/Sumcheck.lean
  • def findSumIdx' (l : List ℕ) (j : Fin l.sum) : Fin l.length in ArkLib/Data/List/BigOperators.lean
  • lemma not_collisionPerm_of_not_combined (h : ¬ E trace) : ¬ E_prp trace in ArkLib/OracleReduction/FiatShamir/DuplexSponge/Security/BadEvents.lean

🎨 **Style Guide Adherence**

The following specific lines in the provided diff violate the style guide:

  • ArkLib/Data/CNat/AssocNat.lean

    • Line 1: Missing standard copyright/license header. (Rule: "Headers: Use standard file headers including copyright, license (Apache 2.0), and authors.")
    • Line 3: Missing module docstring header. (Rule: "Module Docstrings: Each file should start with a /-! ... -/ block containing a title, summary, notation, and references.")
    • Line 5: Names like Nat and AssocNat in docstrings should be enclosed in backticks. (Rule: "Syntax: Use backticks for Lean names: `List.map`.")
    • Line 9: Line exceeds 100 characters. (Rule: "Line Length: Keep lines under 100 characters.")
    • Line 44: The tactic keyword by should be placed at the end of the preceding line. (Rule: "Tactic Mode: Place by at the end of the line preceding the tactic block.")
    • Lines 84–85: Indentation uses more than 2 spaces. (Rule: "Indentation: Use 2 spaces for indentation.")
    • Line 195: Theorem name ext' is not in snake_case. (Rule: "Theorems and Proofs: snake_case (e.g., add_comm, list_reverse_id).")
    • Line 212: Theorem name toFun_eq_const_plus uses plus instead of the standard name add. (Rule: "Symbol Naming Dictionary: + -> add.")
    • Line 253: The tactic keyword by should be placed at the end of the preceding line. (Rule: "Tactic Mode: Place by at the end of the line preceding the tactic block.")
  • ArkLib/Data/CNat/Church.lean

    • Line 113: Line exceeds 100 characters. (Rule: "Line Length: Keep lines under 100 characters.")
    • Lines 117–119: Definitions one, two, and three are missing docstrings. (Rule: "Every definition and major theorem should have a docstring.")
    • Lines 207, 210, 213, 217, 221: Definitions churchTrue, churchFalse, churchAnd, churchOr, and churchNot are missing docstrings. (Rule: "Every definition and major theorem should have a docstring.")
    • Lines 235, 239, 276, 279, 283, 287, 290, 301, 305: Definitions leq, lt, churchNil, churchCons, churchVecFold, toList, example1, churchRec, and churchRecNat are missing docstrings. (Rule: "Every definition and major theorem should have a docstring.")
  • ArkLib/Data/CNat/Defs.lean

    • Lines 24–25: Lines exceed 100 characters. (Rule: "Line Length: Keep lines under 100 characters.")
    • Lines 275, 279, 283, 287, 291, 295, 299, 303, 307: Instances instZero, instToNat, instOfNat, instOne, instAdd, instHasPred, instSub, instMul, instNatPow, and instPow should use the where syntax. (Rule: "Instances: Use the where syntax for defining instances and structures.")
  • ArkLib/Data/CodingTheory/BerlekampWelch/BerlekampWelch.lean

    • Line 140: Missing space after the binder in ∃p. (Rule: "Binders: Use a space after binders (e.g., ∀ x, not ∀x,).")
  • ArkLib/Data/Polynomial/Bivariate.lean

    • Line 339: The tactic keyword by should be placed at the end of the line preceding the tactic block. (Rule: "Tactic Mode: Place by at the end of the line preceding the tactic block.")
  • ArkLib/Data/Polynomial/EvenAndOdd.lean

    • Line 89: The Prop-valued class EvenPoly is an adjective and must use the Is prefix. (Rule: "Prop-valued Classes: ... If the class is an adjective, use the Is prefix (e.g., IsCompact, IsPrime).")
  • ArkLib/Data/Polynomial/PolynomialLike.lean

    • Line 44: The term X should be in lowerCamelCase. (Rule: "Functions and Terms: lowerCamelCase (e.g., binarySearch, isPrime).")
  • ArkLib/Data/MvPolynomial/MvPolynomialLike.lean

    • Line 44: The term X should be in lowerCamelCase. (Rule: "Functions and Terms: lowerCamelCase (e.g., binarySearch, isPrime).")
  • ArkLib/ToMathlib/UInt/Equiv.lean

    • Lines 8, 14, 20, 26: Acronyms should be treated as words; UInt should be formatted as Uint (e.g., finUint8Equiv). (Rule: "Acronyms: Treat as words (e.g., HtmlParser not HTMLParser).")
  • ArkLib/Data/List/HList.lean

    • Line 90: The definition getValue is missing a docstring. (Rule: "Every definition and major theorem should have a docstring.")
  • ArkLib/ProofSystem/Binius/BinaryBasefold/QueryPhase.lean

    • Line 130: The tactic keyword by should be placed at the end of the line preceding the tactic block. (Rule: "Tactic Mode: Place by at the end of the line preceding the tactic block.")

📄 **Per-File Summaries**
  • ArkLib/Data/CNat/Church.lean: This file introduces definitions and theorems for a simplified Church encoding of natural numbers, booleans, and vectors in Lean, providing arithmetic operations and proving properties such as the definitional associativity of addition and multiplication.
  • ArkLib/CommitmentScheme/Basic.lean: This change modifies the correctness definition by replacing the explicit arguments passed to the commitment scheme's opening execution with sorry placeholders, effectively deferring the formalization of the opening verification logic.
  • ArkLib/Data/Classes/HasPred.lean: This file introduces the HasPred and LawfulHasPred typeclasses to provide a principled interface for predecessor operations, defining the core requirement that predecessor is a left-inverse to successor and providing foundational instances for Nat.
  • ArkLib.lean: This change expands the ArkLib library's top-level exports by importing new modules covering commitment schemes, algebraic data structures, coding theory, and components for advanced proof systems like STIR and WHIR.
  • ArkLib/Data/CNat/AssocNat.lean: This new file introduces the AssocNat type, representing natural numbers as successor-preserving endomorphisms to achieve definitionally associative addition, and includes basic arithmetic definitions, theorems, and a corresponding finite type AssocFin.
  • ArkLib/Data/CNat/Defs.lean: This file introduces the Cayley transformation and the CNat hierarchy of iterated natural number encodings, providing new definitions and theorems for arithmetic operations designed to satisfy properties like associativity definitionally.
  • ArkLib/CommitmentScheme/InductiveMerkleTree.lean: This change modifies the proofs of runWithOracle_buildMerkleTree and runWithOracle_getPutativeRoot by replacing their implementation details with sorry placeholders and commented-out tactics.
  • ArkLib/CommitmentScheme/Trivial.lean: This new file introduces the module and documentation for trivial commitment schemes, laying the groundwork for implementations where the prover sends raw data directly to the verifier.
  • ArkLib/CommitmentScheme/Tensor.lean: This new file establishes the framework for tensor-based polynomial commitment schemes (such as Ligero and Brakedown) by setting up necessary imports and module documentation, though it does not yet introduce specific definitions or theorems.
  • ArkLib/Data/CodingTheory/Basic.lean: This change modifies a proof in the finite_relHammingDistRange lemma by replacing a sequence of algebraic tactics with field_simp and a temporary sorry placeholder.
  • ArkLib/Data/Classes/HasSucc.lean: This file introduces the HasSucc and LawfulHasSucc typeclasses to provide a generic interface for successor operations and their relation to addition, along with corresponding instances and theorems for natural numbers.
  • ArkLib/Data/CodingTheory/BerlekampWelch/Existence.lean: This modification introduces a sorry placeholder in the proof of the E_and_Q_BerlekampWelch_condition lemma, temporarily bypassing the formal verification of a degree bound for the polynomial $Q$.
  • ArkLib/Data/Classes/ToNat.lean: This file introduces the ToNat and LawfulToNat type classes and their basic instances to provide a uniform interface and algebraic laws for converting types to natural numbers while preserving zero and successor structures.
  • ArkLib/Data/CodingTheory/BerlekampWelch/BerlekampWelch.lean: This change refactors the proof of the not_exists_of_decoder_eq_none theorem to utilize aesop for more concise automated reasoning.
  • ArkLib/Data/CodingTheory/BerlekampWelch/ToMathlib.lean: This file introduces a new extensionality theorem, polynomial_sum_ext, to facilitate proving equality between sums over polynomial coefficients.
  • ArkLib/Data/CodingTheory/JohnsonBound/Choose2.lean: This change refactors the proof of the choose_2_convex theorem by replacing manual rewrites with the field_simp tactic, though it introduces a temporary placeholder for the final arithmetic step.
  • ArkLib/Data/CodingTheory.lean: This new Lean file serves as a central umbrella module that aggregates the library’s coding theory components, including definitions and theorems for Reed-Solomon codes, Reed-Muller codes, and list decodability.
  • ArkLib/Data/CodingTheory/JohnsonBound/Basic.lean: This modification modifies several proofs related to the Johnson bound, including sqrt_le_J and the main johnson_bound theorem, by replacing their detailed implementations with sorry placeholders.
  • ArkLib/Data/CodingTheory/JohnsonBound/Lemmas.lean: This refactor standardizes variable naming and streamlines proof scripts within the Johnson Bound lemmas using automated tactics like aesop and grind, while temporarily stubbing out several complex proof sections with sorry for future refinement.
  • ArkLib/Data/CodingTheory/Prelims.lean: This change modifies the proof of the cRank_rank_conversion lemma by updating a cardinal inequality reference to use the more specific Cardinal.nat_lt_aleph0 theorem.
  • ArkLib/Data/CodingTheory/ProximityGap/BCIKS20.lean: This change modifies the proofs of several lemmas and theorems related to the BCIKS20 proximity gap results by replacing existing logic with sorry placeholders.
  • ArkLib/Data/CodingTheory/ProximityGap/DG25.lean: This change introduces NoZeroSMulDivisors instances for field-word scalar multiplication and modifies several proofs by temporarily stubbing out complex logic with sorry placeholders.
  • ArkLib/Data/CodingTheory/ReedMuller.lean: This file establishes the module for Reed-Muller codes by providing introductory documentation and necessary imports, though it does not yet include formal definitions or theorems.
  • ArkLib/Data/Fin/Tuple/Lemmas.lean: This update modifies the proofs of several existing theorems involving tuple operations by replacing detailed proof implementations with sorry placeholders and refactoring induction structures.
  • ArkLib/Data/Fin/Tuple/TakeDrop.lean: This change streamlines and simplifies the proofs of several existing theorems regarding tuple operations by optimizing simp arguments and removing redundant rfl steps.
  • ArkLib/Data/Fin/Basic.lean: This change simplifies the Fin.append API by removing the redundant theorems append_left_of_lt and append_right_of_not_lt.
  • ArkLib/Data/CodingTheory/ListDecodability.lean: This file refactors the definitions of Hamming balls to directly incorporate code membership, replaces set cardinality with Nat.card for counting close codewords, and introduces new lemmas characterizing zero-cardinality cases.
  • ArkLib/Data/List/BigOperators.lean: This new file introduces definitions and theorems for calculating and querying partial sums and products of lists, including functions to locate indices based on cumulative sums.
  • ArkLib/Data/List/Vector.lean: This new file introduces basic utility definitions for Vector manipulation, specifically providing an interleave stub and a recursive chunkPairwise function to group elements into pairs.
  • ArkLib/Data/Matrix/Basic.lean: This change removes the dotProduct_rightpad theorem, which characterized the dot product of vectors extended via right-padding.
  • ArkLib/Data/List/Find.lean: This file introduces new definitions and theorems for list index searching, specifically providing findIdx' and idxOf' for improved definitional equality alongside new functions that return results as bounded Fin types.
  • ArkLib/Data/MvPolynomial/MvPolynomialLike.lean: This file introduces the MvPolynomialLike type class to characterize multivariate polynomial-like structures via their universal property and establishes their equivalence to the standard MvPolynomial type.
  • ArkLib/Data/MvPolynomial/LinearMvExtension.lean: This change replaces several proofs regarding the linear multivariate extension and its right-inverse property with sorry placeholders and removes the auxiliary binary_repr_sum lemma.
  • ArkLib/Data/List/HList.lean: This file introduces a new HList definition as an abbreviation for a list of sigma types, providing basic operations, custom notation, and theorems for converting between heterogeneous lists and dependent vectors.
  • ArkLib/Data/MvPolynomial/Degrees.lean: This change introduces the theorem support_C to explicitly characterize the support of a constant multivariate polynomial based on whether the coefficient is zero.
  • ArkLib/Data/MvPolynomial/Sumcheck.lean: This new file introduces definitions and theorems for the partial evaluation and summation of multivariate polynomials, providing the foundational operations required for the sum-check protocol.
  • ArkLib/Data/Polynomial/Bivariate.lean: This update standardizes universe levels across several bivariate polynomial definitions, refactors grind attribute syntax, and modifies the statement and proof of the rootMultiplicity_some_implies_root lemma.
  • ArkLib/Data/Polynomial/FoldingPolynomial.lean: This new Lean file formalizes the "folding polynomial" decomposition by introducing definitions and proving theorems for the existence, uniqueness, and degree bounds of the bivariate representation $f(Z) = Q(q(Z), Z)$, a key technical result from Ben-Sasson and Sudan used in proof systems like FRI and STIR.
  • ArkLib/Data/Polynomial/EvenAndOdd.lean: This file introduces new definitions and theorems for decomposing a polynomial into even and odd parts, establishing their basic properties and providing a bridge to the FoldingPolynomial framework used in FRI protocols.
  • ArkLib/Data/Polynomial/Prelims.lean: This change replaces the detailed proofs for the theorems separable_iff_discr_eq_zero and principal_is_maximal_iff_irred with sorry placeholders.
  • ArkLib/Data/Probability/Instances.lean: This change refactors the proof for the IsEmpty (PMF α) instance to be more explicit and removes an outdated maintenance comment.
  • ArkLib/Data/Polynomial/RationalFunctions.lean: This change replaces the formal proofs justifying the well-definedness of the embeddingOf𝒪Into𝕃 and π_z definitions with sorry placeholders.
  • ArkLib/OracleReduction/Basic.lean: This update introduces sorry placeholders to stub out type-casting logic in the toVerifier definition and the proof of the OracleVerifier.id_toVerifier lemma.
  • ArkLib/Data/Polynomial/SplitFold.lean: This PR refactors the file to integrate with a generalized folding framework by replacing the local foldNth definition and its properties with new theorems that relate splitNth decomposition to FoldingPolynomial.polyFold.
  • ArkLib/Data/Polynomial/PolynomialLike.lean: This file introduces the PolynomialLike typeclass to abstract the universal property of polynomial rings, providing new definitions and theorems that establish a formal isomorphism between generic polynomial-like structures and Mathlib's Polynomial.
  • ArkLib/OracleReduction/Composition/Sequential/Append.lean: This update replaces an explicit proof for the toFun_empty property in the StateFunction.append definition with a sorry placeholder.
  • ArkLib/OracleReduction/Cast.lean: This change modifies several theorems related to OracleProver and Reduction casting by replacing their existing proofs and certain implementation details with sorry placeholders.
  • ArkLib/OracleReduction/FiatShamir/Basic.lean: This change introduces a sorry placeholder in the initialization logic of the fiatShamir_completeness theorem, stubbing out the previously used default challenge values.
  • ArkLib/OracleReduction/FiatShamir/DuplexSponge/Security/BadEvents.lean: This change modifies the not_collisionPerm_of_not_combined lemma by replacing its detailed proof with a sorry placeholder, effectively deferring the formal verification of the relationship between collision events.
  • ArkLib/OracleReduction/Execution.lean: This update refactors the execution logic for oracle reductions by removing a deprecated private lemma and stubbing out several theorem proofs with sorry placeholders, likely in preparation for a larger refactor of the logging and simulation framework.
  • ArkLib/OracleReduction/ProtocolSpec/Basic.lean: This update replaces the tactic-based proofs for DecidableEq and Fintype instances of the challenge oracles with sorry stubs.
  • ArkLib/OracleReduction/ProtocolSpec/Cast.lean: The changes in this Lean file modify the proofs for the instDCast₃ instance and the challengeOracleInterface_cast theorem by replacing existing logic with sorry placeholders, effectively deferring the completion of these proofs.
  • ArkLib/OracleReduction/OracleInterface.lean: Refines the proof for the univariate polynomial distance theorem and simplifies the distance bound for multivariate polynomials.
  • ArkLib/OracleReduction/LiftContext/Reduction.lean: This update refactors and simplifies the proof scripts for the liftContext_processRound and liftContext_run theorems, though it leaves the proofs incomplete by introducing stop and sorry commands.
  • ArkLib/OracleReduction/ProtocolSpec/SeqCompose.lean: This change simplifies the proof of the take_append_left theorem by removing a redundant rfl tactic.
  • ArkLib/OracleReduction/Salt.lean: This change stubs out the OracleVerifier.addSalt definition with sorry placeholders, indicating a refactor of the verification logic for salted oracle reductions.
  • ArkLib/OracleReduction/Security/RoundByRound.lean: This change modifies existing proofs for the round-by-round soundness and knowledge soundness of identity verifiers, replacing explicit proof steps with sorry placeholders and updated simplification tactics.
  • ArkLib/ProofSystem/Binius/BinaryBasefold/Basic.lean: Modifies the proof of the lemma take_snoc_oracle_eq_oStmtIn by introducing explicit case analysis on whether a round is a commitment round to ensure more robust simplification.
  • ArkLib/ProofSystem/Binius/BinaryBasefold/CoreInteractionPhase.lean: This change modifies several proofs for perfect completeness and round-by-round knowledge soundness by replacing their existing implementations with sorry placeholders.
  • ArkLib/ProofSystem/Binius/BinaryBasefold/Steps.lean: This PR modifies the proof implementations for round-by-round knowledge soundness across the commitment, relay, and final sumcheck components of the Binary Basefold system by replacing several specialized proof tactics with sorry placeholders.
  • ArkLib/ProofSystem/Binius/BinaryBasefold/Prelude.lean: The changes in this file refactor multivariate polynomial proofs by removing several private degree-restriction lemmas and updating theorem calls to align with library naming conventions, while modifying the proof of fixFirstVariablesOfMQP_degreeLE to include a sorry.
  • ArkLib/ProofSystem/Binius/BinaryBasefold/QueryPhase.lean: This change refines the indexing logic and associated proof obligations within the proximityChecksSpec definition to ensure correct bounds while introducing a placeholder sorry in the queryKnowledgeStateFunction proof.
  • ArkLib/ProofSystem/Binius/RingSwitching/BatchingPhase.lean: This change updates the batchingKnowledgeStateFunction definition by explicitly naming the output relation hypothesis in the toFun_full proof obligation, facilitating the eventual completion of the formal proof.
  • ArkLib/ProofSystem/Binius/RingSwitching/SumcheckPhase.lean: This change modifies the iteratedSumcheckKnowledgeStateFunction definition by replacing the proof logic for toFun_next with a sorry placeholder and refactoring the argument handling in toFun_full.
  • ArkLib/ProofSystem/Component/RandomQuery.lean: This update refines the knowledgeStateFunction definition by adding a missing hypothesis to the toFun_full proof obligation.
  • ArkLib/ProofSystem/Component/SendClaim.lean: This change replaces the formal definitions and proofs for the embed and hEq fields within the oracleVerifier definition with sorry placeholders.
  • ArkLib/ProofSystem/Component/ReduceClaim.lean: This change refactors the toFun_full proof within the oracleKnowledgeStateFunction definition by moving the hypothesis introduction directly into the function parameters for conciseness.
  • ArkLib/ProofSystem/ConstraintSystem/R1CS.lean: This change simplifies the statement of the pad_preserves_relation theorem by removing its preconditions and replaces the detailed formal proof with a placeholder sorry.
  • ArkLib/ProofSystem/DSL.lean: This file introduces new definitions for an experimental domain-specific language (DSL) designed to specify vector- and polynomial-based Interactive Oracle Proofs (IORs) through formal representations of scalars, vectors, and their associated arithmetic operations.
  • ArkLib/ProofSystem/Fri/Domain.lean: This change stubs out several intermediate algebraic proof steps in the FRI domain lemmas by replacing established simp proofs with sorry placeholders.
  • ArkLib/ProofSystem/Fri/RoundConsistency.lean: Refactors the roundConsistencyCheck definition to represent points as a function rather than a list and significantly simplifies the proof of generalised_round_consistency_completeness by leveraging Lagrange.eq_interpolate and the FoldingPolynomial API.
  • ArkLib/ProofSystem/Stir.lean: This file establishes the top-level module for the STIR (Shift-To-Iterative-Rate) proof system by aggregating its constituent definitions and theorems, including folding, proximity bounds, and the main protocol result.
  • ArkLib/ProofSystem/Stir/OutOfDomSmpl.lean: Refactors the listDecodingCollisionProbability definition by replacing the closeCodewordsRel predicate with relHammingBall to standardize how codeword proximity is expressed.
  • ArkLib/ProofSystem/Fri/Spec/SingleRound.lean: This change updates the FRI single-round specification to utilize the FoldingPolynomial.polyFold definition and provides a significantly more detailed proof for the witness_lift lemma to establish rigorous degree bounds after polynomial folding.
  • ArkLib/ProofSystem/Stir/Folding.lean: This change modifies several proofs and internal justifications within the polyQ, degree_bound_bivariate, and polyFold declarations by replacing their implementations with sorry placeholders.
  • ArkLib/ProofSystem/Stir/Quotienting.lean: This change modifies the quotienting lemma to utilize the relHammingBall definition in place of the deprecated closeCodewordsRel.
  • ArkLib/ProofSystem/Whir/BlockRelDistance.lean: This change modifies the listBlock_subset_listHamming lemma to use relHammingBall with an added distance constraint and reverts its existing proof to a sorry.
  • ArkLib/ProofSystem/Whir.lean: This new file establishes the top-level module for the WHIR proof system by aggregating its constituent definitions and theorems, such as folding and soundness results, through a series of imports.
  • ArkLib/ProofSystem/Whir/MutualCorrAgreement.lean: This change updates the proximityListDecodingCondition definition by renaming the closeCodewordsRel function to relHammingBall to align with updated terminology.
  • ArkLib/ProofSystem/Whir/OutofDomainSmpl.lean: This Lean file updates out-of-domain sampling lemmas by transitioning to the relHammingBall definition and replacing the proof of oodSampling_crs_eq_rs with a sorry.
  • ArkLib/ProofSystem/Whir/Folding.lean: This update modifies the folding_listdecoding_if_genMutualCorrAgreement theorem by replacing the use of the closeCodewordsRel definition with relHammingBall.
  • ArkLib/ToMathlib/UInt/Equiv.lean: This file introduces definitions for the logical equivalences between Fin (2^n) and various fixed-width unsigned integer types, specifically UInt8, UInt16, UInt32, UInt64, and BitVec.

Last updated: 2026-03-03 13:44 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.

3 participants