Documentation

CslibFrontier.Crypto.Protocols.FRI.Soundness.BinarySoundness

Binary 2-to-1 FRI Round-by-Round Soundness, Escape Bounds, and Interactive Game Corollaries #

Derives unconditional round-by-round soundness (friIOP_rbrSound), query-round escape, conditional commit-round escape, summed interactive IOP soundness, and parameter scaling identities for binary 2-to-1 FRIParams as corollaries of the smooth FRISmoothParams theorems via params.toSmooth.

theorem Cslib.Crypto.Protocols.FRI.friIOP_rbrSound {F : Type} [Field F] [DecidableEq F] (params : FRIParams F) (e : ℕ) :
BCS.IOPRoundByRoundSoundness (friIOP params) (params.proximityLang e) (friDoomed params (2 ^ params.d - e - 1)) (friGoodStep params (2 ^ params.d - e - 1))

Unconditional round-by-round soundness invariant for binary friIOP (corollary of friSmoothIOP_rbrSound).

theorem Cslib.Crypto.Protocols.FRI.card_filter_friFinalPasses_le_of_friDoomed {F : Type} [Field F] [DecidableEq F] (params : FRIParams F) {B : ℕ} {stmt : BCS.OracleTable params.d F} {pref : List (BCS.OracleTable params.d F × FRIChal F params.d params.q)} (hlen : pref.length = params.m) (π : BCS.OracleTable params.d F) (hdoomed : friDoomed params B stmt pref) :
{s : Fin (2 ^ params.d) | friFinalPasses params stmt pref π s}.card ≤ B

When pref.length = m and pref is doomed at threshold B, at most B starting points in Fin (2 ^ d) pass friFinalPasses against any final oracle π.

theorem Cslib.Crypto.Protocols.FRI.friQueryRound_escape_le {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRIParams F) (B : ℕ) (stmt : BCS.OracleTable params.d F) (pref : List (BCS.OracleTable params.d F × FRIChal F params.d params.q)) (hlen : pref.length = params.m) (π : BCS.OracleTable params.d F) (hdoomed : friDoomed params B stmt pref) :
(Probability.PMF.uniformOfFintype (FRIChal F params.d params.q)).toOuterMeasure {c : FRIChal F params.d params.q | ¬friGoodStep params B stmt pref π c} ≤ (↑B / 2 ^ params.d) ^ params.q

Unconditional binary query-round escape bound (corollary of friSmoothQueryRound_escape_le).

theorem Cslib.Crypto.Protocols.FRI.weightedLineEscapePerRound_of_gapPerRound {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRIParams F) {B : ℕ} {B_commit : Fin params.m → ℕ} (hgap : WeightedLineGapPerRound params B B_commit) :
WeightedLineEscapePerRound params B fun (i : Fin params.m) => ↑(B_commit i) / ↑(Fintype.card F)

Every integer per-round bad-scalar bound WeightedLineGapPerRound params B B_commit induces a per-round escape-probability bound ε_commit i = B_commit i / |F|.

theorem Cslib.Crypto.Protocols.FRI.friCommitRound_escape_le_of_weightedLineEscapePerRound {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRIParams F) {B : ℕ} {ε_commit : Fin params.m → ENNReal} (hesc : WeightedLineEscapePerRound params B ε_commit) (stmt : BCS.OracleTable params.d F) (pref : List (BCS.OracleTable params.d F × FRIChal F params.d params.q)) (hpm : pref.length < params.m) (π : BCS.OracleTable params.d F) (hdoomed : friDoomed params B stmt pref) :
(Probability.PMF.uniformOfFintype (FRIChal F params.d params.q)).toOuterMeasure {c : FRIChal F params.d params.q | ¬friGoodStep params B stmt pref π c} ≤ ε_commit ⟨pref.length, hpm⟩

Conditional step (binary commit-round escape bound assuming WeightedLineEscapePerRound) (corollary of friSmoothCommitRound_escape_le_of_weightedCurveEscapePerRound).

theorem Cslib.Crypto.Protocols.FRI.friCommitRound_escape_le_of_weightedLineGapPerRound {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRIParams F) {B : ℕ} {B_commit : Fin params.m → ℕ} (hgap : WeightedLineGapPerRound params B B_commit) (stmt : BCS.OracleTable params.d F) (pref : List (BCS.OracleTable params.d F × FRIChal F params.d params.q)) (hpm : pref.length < params.m) (π : BCS.OracleTable params.d F) (hdoomed : friDoomed params B stmt pref) :
(Probability.PMF.uniformOfFintype (FRIChal F params.d params.q)).toOuterMeasure {c : FRIChal F params.d params.q | ¬friGoodStep params B stmt pref π c} ≤ ↑(B_commit ⟨pref.length, hpm⟩) / ↑(Fintype.card F)

Conditional step (binary commit-round escape bound assuming WeightedLineGapPerRound).

theorem Cslib.Crypto.Protocols.FRI.friCommitRound_escape_le_of_weightedLineGap {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRIParams F) {B B_commit : ℕ} (hgap : WeightedLineGapBound params B B_commit) (stmt : BCS.OracleTable params.d F) (pref : List (BCS.OracleTable params.d F × FRIChal F params.d params.q)) (hpm : pref.length < params.m) (π : BCS.OracleTable params.d F) (hdoomed : friDoomed params B stmt pref) :
(Probability.PMF.uniformOfFintype (FRIChal F params.d params.q)).toOuterMeasure {c : FRIChal F params.d params.q | ¬friGoodStep params B stmt pref π c} ≤ ↑B_commit / ↑(Fintype.card F)

Conditional step (binary commit-round escape bound assuming WeightedLineGapBound).

theorem Cslib.Crypto.Protocols.FRI.sum_friRoundEscape_eq_friSumError {F : Type} [Field F] (params : FRIParams F) (e : ℕ) (ε_commit : Fin params.m → ENNReal) :
∑ j : Fin (params.m + 1), friRoundEscape params e ε_commit j = friSumError params e ε_commit

The sum of friRoundEscape over all m + 1 rounds equals friSumError.

theorem Cslib.Crypto.Protocols.FRI.friSupRBRError_const_le_friRBRError {F : Type} [Field F] [Fintype F] (params : FRIParams F) (e B_commit : ℕ) :
(friSupRBRError params e fun (x : Fin params.m) => ↑B_commit / ↑(Fintype.card F)) ≤ friRBRError params e B_commit

For a uniform commit-round error B_commit / |F|, friSupRBRError is bounded above by friRBRError.

theorem Cslib.Crypto.Protocols.FRI.friPerRoundEscape_of_weightedLineEscapePerRound {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRIParams F) {e : ℕ} {ε_commit : Fin params.m → ENNReal} (hesc : WeightedLineEscapePerRound params (2 ^ params.d - e - 1) ε_commit) (stmt : BCS.OracleTable params.d F) :
stmt ∉ params.proximityLang e → ∀ (j : Fin (params.m + 1)) (pref : List (BCS.OracleTable params.d F × FRIChal F params.d params.q)) (π : BCS.OracleTable params.d F), pref.length = ↑j → friDoomed params (2 ^ params.d - e - 1) stmt pref → (Probability.PMF.uniformOfFintype (FRIChal F params.d params.q)).toOuterMeasure {c : FRIChal F params.d params.q | ¬friGoodStep params (2 ^ params.d - e - 1) stmt pref π c} ≤ friRoundEscape params e ε_commit j

Conditional step (indexed binary per-round escape bound assuming WeightedLineEscapePerRound).

theorem Cslib.Crypto.Protocols.FRI.friRBREscape_of_weightedLineEscapePerRound {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRIParams F) {e : ℕ} {ε_commit : Fin params.m → ENNReal} (hesc : WeightedLineEscapePerRound params (2 ^ params.d - e - 1) ε_commit) (stmt : BCS.OracleTable params.d F) :
stmt ∉ params.proximityLang e → ∀ (pref : List (BCS.OracleTable params.d F × FRIChal F params.d params.q)) (π : BCS.OracleTable params.d F), friDoomed params (2 ^ params.d - e - 1) stmt pref → (Probability.PMF.uniformOfFintype (FRIChal F params.d params.q)).toOuterMeasure {c : FRIChal F params.d params.q | ¬friGoodStep params (2 ^ params.d - e - 1) stmt pref π c} ≤ friSupRBRError params e ε_commit

Conditional step (all-prefix binary sup RBR escape bound assuming WeightedLineEscapePerRound).

theorem Cslib.Crypto.Protocols.FRI.friRBREscape_of_weightedLineGap {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRIParams F) {e B_commit : ℕ} (hgap : WeightedLineGapBound params (2 ^ params.d - e - 1) B_commit) (stmt : BCS.OracleTable params.d F) :
stmt ∉ params.proximityLang e → ∀ (pref : List (BCS.OracleTable params.d F × FRIChal F params.d params.q)) (π : BCS.OracleTable params.d F), friDoomed params (2 ^ params.d - e - 1) stmt pref → (Probability.PMF.uniformOfFintype (FRIChal F params.d params.q)).toOuterMeasure {c : FRIChal F params.d params.q | ¬friGoodStep params (2 ^ params.d - e - 1) stmt pref π c} ≤ friRBRError params e B_commit

Conditional step (uniform binary round-by-round escape bound assuming WeightedLineGapBound).

theorem Cslib.Crypto.Protocols.FRI.friCommitGame_le_of_weightedLineEscapePerRound {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRIParams F) {e : ℕ} {ε_commit : Fin params.m → ENNReal} (hesc : WeightedLineEscapePerRound params (2 ^ params.d - e - 1) ε_commit) {stmt : BCS.OracleTable params.d F} (hfar : stmt ∉ params.proximityLang e) (P : BCS.InteractiveIOPProver params.d F (FRIChal F params.d params.q)) :
(friCommitGame params (2 ^ params.d - e - 1) stmt P) true ≤ ∑ i : Fin params.m, ε_commit i

Conditional step (single-word binary FRI commit-phase union bound assuming WeightedLineEscapePerRound).

theorem Cslib.Crypto.Protocols.FRI.friCommitGame_le_of_weightedLineGapPerRound {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRIParams F) {e : ℕ} {B_commit : Fin params.m → ℕ} (hgap : WeightedLineGapPerRound params (2 ^ params.d - e - 1) B_commit) {stmt : BCS.OracleTable params.d F} (hfar : stmt ∉ params.proximityLang e) (P : BCS.InteractiveIOPProver params.d F (FRIChal F params.d params.q)) :
(friCommitGame params (2 ^ params.d - e - 1) stmt P) true ≤ ∑ i : Fin params.m, ↑(B_commit i) / ↑(Fintype.card F)

Conditional step (single-word binary FRI commit-phase union bound assuming WeightedLineGapPerRound).

theorem Cslib.Crypto.Protocols.FRI.friIOP_interactiveGame_le_of_weightedLineEscapePerRound {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRIParams F) {e : ℕ} {ε_commit : Fin params.m → ENNReal} (hesc : WeightedLineEscapePerRound params (2 ^ params.d - e - 1) ε_commit) {stmt : BCS.OracleTable params.d F} (hfar : stmt ∉ params.proximityLang e) (P : BCS.InteractiveIOPProver params.d F (FRIChal F params.d params.q)) :
(BCS.iopInteractiveGame (friIOP params) stmt P) true ≤ friSumError params e ε_commit

Conditional step (summed interactive soundness for single-word friIOP assuming WeightedLineEscapePerRound).

theorem Cslib.Crypto.Protocols.FRI.friIOP_interactiveGame_le_of_weightedLineGapPerRound {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRIParams F) {e : ℕ} {B_commit : Fin params.m → ℕ} (hgap : WeightedLineGapPerRound params (2 ^ params.d - e - 1) B_commit) {stmt : BCS.OracleTable params.d F} (hfar : stmt ∉ params.proximityLang e) (P : BCS.InteractiveIOPProver params.d F (FRIChal F params.d params.q)) :
(BCS.iopInteractiveGame (friIOP params) stmt P) true ≤ friSumError params e fun (i : Fin params.m) => ↑(B_commit i) / ↑(Fintype.card F)

Conditional step (summed interactive soundness for single-word friIOP assuming WeightedLineGapPerRound).

Binary Parameter Helpers & Unique-Decoding Line-Gap Upgrade #

theorem Cslib.Crypto.Protocols.FRI.FRIParams.fiber_mul_domainSize {F : Type} [Field F] (params : FRIParams F) (i : Fin params.m) :
2 ^ (↑i + 1) * 2 ^ (params.d - (↑i + 1)) = 2 ^ params.d

Fiber-size product identity 2 ^ (i + 1) * 2 ^ (d - (i + 1)) = 2 ^ d for a folding round i : Fin params.m.

theorem Cslib.Crypto.Protocols.FRI.FRIParams.fiber_mul_dim {F : Type} [Field F] (params : FRIParams F) (i : Fin params.m) :
2 ^ (↑i + 1) * params.dim (↑i + 1) = params.dim 0

Round-dimension scaling identity 2 ^ (i + 1) * params.dim (i + 1) = params.dim 0 for a folding round i : Fin params.m.

theorem Cslib.Crypto.Protocols.FRI.FRIParams.one_le_dim {F : Type} [Field F] (params : FRIParams F) (r : ℕ) :
1 ≤ params.dim r

Every round Reed–Solomon dimension params.dim r is at least 1.

theorem Cslib.Crypto.Protocols.FRI.FRIParams.dim_le_domainSize {F : Type} [Field F] (params : FRIParams F) {r : ℕ} (hr : r ≤ params.m) :
params.dim r ≤ 2 ^ (params.d - r)

Each active round dimension fits inside its active coset size (r ≤ m).

theorem Cslib.Crypto.Protocols.FRI.FRIParams.sum_domainSize_succ {F : Type} [Field F] (params : FRIParams F) :
∑ i : Fin params.m, 2 ^ (params.d - (↑i + 1)) = 2 ^ params.d - 2 ^ (params.d - params.m)

Exact geometric sum of active folded coset sizes across all m binary FRI folding rounds: ∑ i : Fin params.m, 2 ^ (params.d - (i.val + 1)) = 2 ^ params.d - 2 ^ (params.d - params.m).

theorem Cslib.Crypto.Protocols.FRI.FRIParams.two_mul_div_add_dim_le {F : Type} [Field F] (params : FRIParams F) {e : ℕ} (huniq : 2 * e + params.dim 0 ≤ 2 ^ params.d) (i : Fin params.m) :
2 * (e / 2 ^ (↑i + 1)) + params.dim (↑i + 1) ≤ 2 ^ (params.d - (↑i + 1))

Transport the initial unique-decoding bound 2 * e + params.dim 0 ≤ 2 ^ params.d to the scaled round-(i + 1) unique-decoding bound.