Documentation

CslibFrontier.Crypto.Protocols.FRI.Soundness.SmoothEscape

Smooth FRI Final-Round Counting, Round-by-Round Invariant, and Query/Commit Escape Bounds #

Proves the final-round acceptance counting bound (card_filter_friSmoothFinalPasses_le), unconditional smooth round-by-round soundness (friSmoothIOP_rbrSound), unconditional query-round escape (friSmoothQueryRound_escape_le), and conditional commit-round escape bounds under WeightedCurveEscapePerRound / WeightedCurveGapPerRound.

theorem Cslib.Crypto.Protocols.FRI.card_filter_friSmoothFinalPasses_le {F : Type} [Field F] [DecidableEq F] (params : FRISmoothParams F) (stmt : BCS.OracleTable params.d F) (pref : List (BCS.OracleTable params.d F × FRIChal F params.d params.q)) (hlen : pref.length = params.m) (πFinal : BCS.OracleTable params.d F) :
{s : Fin (2 ^ params.d) | friSmoothFinalPasses params stmt pref πFinal s}.card ≤ ∑ j : Fin (params.domainSize params.m) with friSmoothTargetWord params stmt pref params.m ⋯ j = friSmoothFinalCodeword params πFinal j, friSmoothPreWeight params stmt pref params.m ⋯ j

Smooth final query-acceptance counting bound: for a length-m prefix pref and any final oracle πFinal, the number of starting indices s : Fin (2 ^ d) satisfying friSmoothFinalPasses is at most the pre-filter weighted agreement of friSmoothTargetWord ... m with friSmoothFinalCodeword params πFinal.

theorem Cslib.Crypto.Protocols.FRI.friSmoothIOP_rbrSound {F : Type} [Field F] [DecidableEq F] (params : FRISmoothParams F) (e : ℕ) :
BCS.IOPRoundByRoundSoundness (friSmoothIOP params) (params.proximityLang e) (friSmoothDoomed params (2 ^ params.d - e - 1)) (friSmoothGoodStep params (2 ^ params.d - e - 1))

Unconditional round-by-round soundness invariant for smooth friSmoothIOP: for every distance threshold e : ℕ, friSmoothIOP params satisfies IOPRoundByRoundSoundness with respect to params.proximityLang e, friSmoothDoomed params (2 ^ params.d - e - 1), and friSmoothGoodStep params (2 ^ params.d - e - 1).

Projecting a uniform FRIChal F d q onto its folding scalar foldScalar yields the uniform distribution on F.

theorem Cslib.Crypto.Protocols.FRI.card_filter_friSmoothFinalPasses_le_of_friSmoothDoomed {F : Type} [Field F] [DecidableEq F] (params : FRISmoothParams 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 : friSmoothDoomed params B stmt pref) :
{s : Fin (2 ^ params.d) | friSmoothFinalPasses 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 friSmoothFinalPasses against any final oracle π.

theorem Cslib.Crypto.Protocols.FRI.friSmoothQueryRound_escape_le {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRISmoothParams 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 : friSmoothDoomed params B stmt pref) :
(Probability.PMF.uniformOfFintype (FRIChal F params.d params.q)).toOuterMeasure {c : FRIChal F params.d params.q | ¬friSmoothGoodStep params B stmt pref π c} ≤ (↑B / 2 ^ params.d) ^ params.q

Unconditional smooth query-round escape bound: when pref.length = m and pref is doomed at threshold B, the probability over a uniform FRIChal that all q query repetitions pass is at most (B / 2 ^ d) ^ q.

theorem Cslib.Crypto.Protocols.FRI.friSmoothCommitRound_escape_le_of_weightedCurveEscapePerRound {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRISmoothParams F) {B : ℕ} {ε_commit : Fin params.m → ENNReal} (hesc : WeightedCurveEscapePerRound 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 : friSmoothDoomed params B stmt pref) :
(Probability.PMF.uniformOfFintype (FRIChal F params.d params.q)).toOuterMeasure {c : FRIChal F params.d params.q | ¬friSmoothGoodStep params B stmt pref π c} ≤ ε_commit ⟨pref.length, hpm⟩

Conditional step (smooth commit-round escape bound assuming WeightedCurveEscapePerRound): when pref.length < m and pref is doomed at threshold B, the probability over a uniform FRIChal that the l⁽ⁱ⁾-to-1 folded target escapes to > B weighted agreement with params.rsCode (pref.length + 1) is at most ε_commit ⟨pref.length, hpm⟩. Reuses Folding.lean's exists_mem_reedSolomon_weighted_agree_lift and foldWord_eq_sum_smul.

theorem Cslib.Crypto.Protocols.FRI.friSmoothCommitRound_escape_le_of_weightedCurveGapPerRound {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRISmoothParams F) {B : ℕ} {B_commit : Fin params.m → ℕ} (hgap : WeightedCurveGapPerRound 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 : friSmoothDoomed params B stmt pref) :
(Probability.PMF.uniformOfFintype (FRIChal F params.d params.q)).toOuterMeasure {c : FRIChal F params.d params.q | ¬friSmoothGoodStep params B stmt pref π c} ≤ ↑(B_commit ⟨pref.length, hpm⟩) / ↑(Fintype.card F)

Conditional step (smooth commit-round escape bound assuming WeightedCurveGapPerRound): discharging WeightedCurveGapPerRound is left to the caller.

theorem Cslib.Crypto.Protocols.FRI.friSmoothCommitRound_escape_le_of_weightedCurveGap {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRISmoothParams F) {B B_commit : ℕ} (hgap : WeightedCurveGapBound 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 : friSmoothDoomed params B stmt pref) :
(Probability.PMF.uniformOfFintype (FRIChal F params.d params.q)).toOuterMeasure {c : FRIChal F params.d params.q | ¬friSmoothGoodStep params B stmt pref π c} ≤ ↑B_commit / ↑(Fintype.card F)

Conditional step (smooth commit-round escape bound assuming WeightedCurveGapBound): discharging WeightedCurveGapBound is left to the caller.