Documentation

CslibFrontier.Crypto.Protocols.FRI.Soundness.BinaryBridge

Binary-to-Smooth FRI Bridges and Transcript/Counting/Unique-Decoding Corollaries #

Establishes exact equivalences between binary FRIParams state, doomed/good-step predicates, commit games, and line proximity-gap contracts and their smooth FRISmoothParams counterparts at params.toSmooth, together with binary transcript-update, weight-bound, starting-point counting, and unique-decoding line-gap upgrade corollaries.

Binary-to-Smooth State and Game Bridges #

theorem Cslib.Crypto.Protocols.FRI.friFinalPasses_iff_friSmoothFinalPasses {F : Type} [Field F] (params : FRIParams F) (stmt : BCS.OracleTable params.d F) (pref : List (BCS.OracleTable params.d F × FRIChal F params.d params.q)) (πFinal : BCS.OracleTable params.d F) (s : Fin (2 ^ params.d)) :
friFinalPasses params stmt pref πFinal s ↔ friSmoothFinalPasses params.toSmooth stmt pref πFinal s

Exact equivalence between binary friFinalPasses and smooth friSmoothFinalPasses at params.toSmooth.

theorem Cslib.Crypto.Protocols.FRI.friDoomed_iff_friSmoothDoomed {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)) :
friDoomed params B stmt pref ↔ friSmoothDoomed params.toSmooth B stmt pref

Exact equivalence between binary friDoomed and smooth friSmoothDoomed at params.toSmooth.

theorem Cslib.Crypto.Protocols.FRI.friGoodStep_iff_friSmoothGoodStep {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)) (π : BCS.OracleTable params.d F) (c : FRIChal F params.d params.q) :
friGoodStep params B stmt pref π c ↔ friSmoothGoodStep params.toSmooth B stmt pref π c

Exact equivalence between binary friGoodStep and smooth friSmoothGoodStep at params.toSmooth.

theorem Cslib.Crypto.Protocols.FRI.friCommitGame_eq_friSmoothCommitGame {F : Type} [Field F] [Fintype F] (params : FRIParams F) (B : ℕ) (stmt : BCS.OracleTable params.d F) (P : BCS.InteractiveIOPProver params.d F (FRIChal F params.d params.q)) :
friCommitGame params B stmt P = friSmoothCommitGame params.toSmooth B stmt P

Exact equality between binary friCommitGame and smooth friSmoothCommitGame at params.toSmooth.

Binary-to-Smooth Line/Curve Proximity-Gap Bridges #

Exact equivalence between binary WeightedLineGapPerRound and smooth WeightedCurveGapPerRound at params.toSmooth.

Exact equivalence between binary WeightedLineEscapePerRound and smooth WeightedCurveEscapePerRound at params.toSmooth.

Binary Transcript-State, Weight, Counting, and Unique-Upgrade Corollaries #

theorem Cslib.Crypto.Protocols.FRI.friTargetWord_append {F : Type} [Field F] (params : FRIParams F) (stmt : BCS.OracleTable params.d F) (pref extra : List (BCS.OracleTable params.d F × FRIChal F params.d params.q)) {i : ℕ} (hi : i ≤ params.m) (hlen : i ≤ pref.length) :
friTargetWord params stmt (pref ++ extra) i hi = friTargetWord params stmt pref i hi

Appending suffix rounds extra preserves friTargetWord at round i ≤ pref.length.

theorem Cslib.Crypto.Protocols.FRI.friPreWeight_append {F : Type} [Field F] [DecidableEq F] (params : FRIParams F) (stmt : BCS.OracleTable params.d F) (pref extra : List (BCS.OracleTable params.d F × FRIChal F params.d params.q)) {i : ℕ} (hi : i ≤ params.m) (hlen : i ≤ pref.length) :
friPreWeight params stmt (pref ++ extra) i hi = friPreWeight params stmt pref i hi

Appending suffix rounds extra does not change friPreWeight at round i ≤ pref.length.

theorem Cslib.Crypto.Protocols.FRI.friTargetWord_append_step {F : Type} [Field F] (params : FRIParams F) (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) (c : FRIChal F params.d params.q) :
friTargetWord params stmt (pref ++ [(π, c)]) (pref.length + 1) hpm = fold2 (params.g ^ 2 ^ pref.length) (params.ω ^ 2 ^ pref.length) (fun (idx : Fin (2 * 2 ^ (params.d - (pref.length + 1)))) => restrictOracle π (reindexDouble ⋯ idx)) c.foldScalar

One-step folding update for friTargetWord after appending round (π, c).

theorem Cslib.Crypto.Protocols.FRI.friPreWeight_append_step {F : Type} [Field F] [DecidableEq F] (params : FRIParams F) (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) (c : FRIChal F params.d params.q) :
friPreWeight params stmt (pref ++ [(π, c)]) (pref.length + 1) hpm = friNextWeight params stmt pref pref.length hpm π

One-step update for friPreWeight after appending round (π, c) equals friNextWeight.

theorem Cslib.Crypto.Protocols.FRI.friOracleFilterWeight_le {F : Type} [Field F] [DecidableEq F] (params : FRIParams F) (stmt : BCS.OracleTable params.d F) (pref : List (BCS.OracleTable params.d F × FRIChal F params.d params.q)) (i : ℕ) (hi : i ≤ params.m) (π : BCS.OracleTable params.d F) (j : Fin (2 ^ (params.d - i))) :
friOracleFilterWeight params stmt pref i hi π j ≤ friPreWeight params stmt pref i hi j

Oracle-filtered weight is bounded pointwise by friPreWeight.

theorem Cslib.Crypto.Protocols.FRI.friPreWeight_le {F : Type} [Field F] [DecidableEq F] (params : FRIParams F) (stmt : BCS.OracleTable params.d F) (pref : List (BCS.OracleTable params.d F × FRIChal F params.d params.q)) (i : ℕ) (hi : i ≤ params.m) (j : Fin (2 ^ (params.d - i))) :
friPreWeight params stmt pref i hi j ≤ 2 ^ i

Pointwise bound on pre-filter weights: friPreWeight ... i j ≤ 2 ^ i.

theorem Cslib.Crypto.Protocols.FRI.friNextWeight_le {F : Type} [Field F] [DecidableEq F] (params : FRIParams F) (stmt : BCS.OracleTable params.d F) (pref : List (BCS.OracleTable params.d F × FRIChal F params.d params.q)) (i : ℕ) (hi : i < params.m) (π : BCS.OracleTable params.d F) (j : Fin (2 ^ (params.d - (i + 1)))) :
friNextWeight params stmt pref i hi π j ≤ 2 ^ (i + 1)

Pointwise bound on pushed weights friNextWeight ... i π j ≤ 2 ^ (i + 1).

theorem Cslib.Crypto.Protocols.FRI.sum_friPreWeight_le {F : Type} [Field F] [DecidableEq F] (params : FRIParams F) (stmt : BCS.OracleTable params.d F) (pref : List (BCS.OracleTable params.d F × FRIChal F params.d params.q)) (i : ℕ) (hi : i ≤ params.m) :
∑ j : Fin (2 ^ (params.d - i)), friPreWeight params stmt pref i hi j ≤ 2 ^ params.d

Total-weight bound: ∑ j, friPreWeight ... i j ≤ 2 ^ d.

theorem Cslib.Crypto.Protocols.FRI.sum_friNextWeight_le {F : Type} [Field F] [DecidableEq F] (params : FRIParams F) (stmt : BCS.OracleTable params.d F) (pref : List (BCS.OracleTable params.d F × FRIChal F params.d params.q)) (i : ℕ) (hi : i < params.m) (π : BCS.OracleTable params.d F) :
∑ j : Fin (2 ^ (params.d - (i + 1))), friNextWeight params stmt pref i hi π j ≤ 2 ^ params.d

Total-weight bound on pushed weights: ∑ j, friNextWeight ... i π j ≤ 2 ^ d.

theorem Cslib.Crypto.Protocols.FRI.sum_agree_friOracleFilterWeight_le {F : Type} [Field F] [DecidableEq F] (params : FRIParams F) (stmt : BCS.OracleTable params.d F) (pref : List (BCS.OracleTable params.d F × FRIChal F params.d params.q)) (i : ℕ) (hi : i ≤ params.m) (π : BCS.OracleTable params.d F) (c : Fin (2 ^ (params.d - i)) → F) :
∑ j : Fin (2 ^ (params.d - i)) with restrictOracle π j = c j, friOracleFilterWeight params stmt pref i hi π j ≤ ∑ j : Fin (2 ^ (params.d - i)) with friTargetWord params stmt pref i hi j = c j, friPreWeight params stmt pref i hi j

Monotonicity of filtered weighted agreement in binary FRI.

theorem Cslib.Crypto.Protocols.FRI.friTranscriptSingleAccepts_append_iff {F : Type} [Field F] (params : FRIParams 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) (c : FRIChal F params.d params.q) (s : Fin (2 ^ params.d)) :
friTranscriptSingleAccepts params stmt (pref ++ [(πFinal, c)]) s ↔ friFinalPasses params stmt pref πFinal s

On a complete transcript pref ++ [(πFinal, c)], friTranscriptSingleAccepts coincides with friFinalPasses.

theorem Cslib.Crypto.Protocols.FRI.friTranscriptSingleAccepts_ofFn_iff {F : Type} [Field F] (params : FRIParams F) (stmt : BCS.OracleTable params.d F) (oracles : Fin (params.m + 1) → BCS.OracleTable params.d F) (chals : Fin (params.m + 1) → FRIChal F params.d params.q) (s : Fin (2 ^ params.d)) :
friTranscriptSingleAccepts params stmt (List.ofFn fun (j : Fin (params.m + 1)) => (oracles j, chals j)) s ↔ friSingleAccepts params stmt chals oracles s

On a List.ofFn transcript, friTranscriptSingleAccepts coincides with friSingleAccepts.

theorem Cslib.Crypto.Protocols.FRI.card_filter_friPrefixPasses_eq {F : Type} [Field F] [DecidableEq F] (params : FRIParams F) (stmt : BCS.OracleTable params.d F) (pref : List (BCS.OracleTable params.d F × FRIChal F params.d params.q)) (i : ℕ) (hi : i ≤ params.m) (j : Fin (2 ^ (params.d - i))) :
{s : Fin (2 ^ params.d) | ↑s % 2 ^ (params.d - i) = ↑j ∧ friPrefixPasses params stmt pref i s}.card = friOracleFilterWeight params stmt pref i hi (prefOracle pref i) j

Exact binary starting-point counting identity (corollary of card_filter_friSmoothPrefixPasses_eq).

theorem Cslib.Crypto.Protocols.FRI.card_filter_friFinalPasses_le {F : Type} [Field F] [DecidableEq F] (params : FRIParams 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) | friFinalPasses params stmt pref πFinal s}.card ≤ ∑ j : Fin (2 ^ (params.d - params.m)) with friTargetWord params stmt pref params.m ⋯ j = friFinalCodeword params πFinal j, friPreWeight params stmt pref params.m ⋯ j

Binary final query-acceptance counting bound (corollary of card_filter_friSmoothFinalPasses_le).

theorem Cslib.Crypto.Protocols.FRI.weightedLineGapPerRound_of_uniqueLineGap {F : Type} [Field F] [DecidableEq F] (params : FRIParams F) {e : ℕ} (huniq : 2 * e + params.dim 0 ≤ 2 ^ params.d) (hgap : UniqueLineGapHypothesis params e) :
WeightedLineGapPerRound params (2 ^ params.d - e - 1) fun (i : Fin params.m) => 2 ^ (params.d - (↑i + 1))

Conditional step (shrinking per-round binary unique-decoding weighted upgrade) (corollary of weightedCurveGapPerRound_of_uniqueCurveGap).

theorem Cslib.Crypto.Protocols.FRI.weightedLineGapBound_of_uniqueLineGap {F : Type} [Field F] [DecidableEq F] (params : FRIParams F) {e : ℕ} (huniq : 2 * e + params.dim 0 ≤ 2 ^ params.d) (hgap : UniqueLineGapHypothesis params e) :
WeightedLineGapBound params (2 ^ params.d - e - 1) (2 ^ (params.d - 1))

Conditional step (uniform binary unique-decoding weighted upgrade).