Documentation

CslibFrontier.Crypto.Protocols.FRI.JohnsonSoundness

Unconditional Unique-Decoding and Johnson-Bound Smooth & Binary FRI, IOP, and BCS-FRI Soundness #

This module discharges the per-round and uniform degree-(l⁽ⁱ⁾ - 1) curve proximity-gap hypotheses of CslibFrontier.Crypto.Protocols.FRI.Soundness unconditionally for the single-word (OracleTable d F) smooth 2 ^ stepLog i-to-1 FRI IOP Cslib.Crypto.Protocols.FRI.friSmoothIOP (and its binary 2-to-1 specialization Cslib.Crypto.Protocols.FRI.friIOP) in both the unique-decoding regime and the Johnson-bound regime, combining Cslib.Code.exists_correlatedAgreement_curve_unique ([BenSassonCarmonIshaiKoppartySaraf2020, Theorems 1.5 and 6.1]) and Cslib.Code.exists_weighted_correlatedAgreement_curve_johnson ([BenSassonCarmonIshaiKoppartySaraf2020, Theorems 1.5, 6.2, and 7.2]) with Cslib.Crypto.Protocols.FRI.friSmoothIOP_rbrSound, the per-round commit and summed interactive IOP soundness providers (friSmoothCommitGame_le_of_weightedCurveGapPerRound, friSmoothIOP_interactiveGame_le_of_weightedCurveGapPerRound), and the two-channel BCS random-oracle soundness provider Cslib.Crypto.Protocols.FRI.friSmoothBCS_romSoundness_bound_of_weightedCurveGap / Cslib.Crypto.Protocols.BCS.bcsROMSoundness_bound ([BSBHR18]; [BSCS16]; [CY24]).

Scope and relationship to the source theorems #

Main definitions #

Main results #

Smooth & binary unique-decoding regime (2 * e + params.dim 0 ≤ 2 ^ params.d) #

Smooth & binary Johnson-bound regime (δ ≤ 1 - √ρ - √ρ / (2 * mJ) and discrete bounds) #

References #

theorem Cslib.Crypto.Protocols.FRI.two_mul_toSmooth_first_sub_le {F : Type} [Field F] (params : FRIParams F) :
2 * (2 ^ params.d - 2 ^ (params.d - params.toSmooth.firstStepLog)) ≤ 2 ^ params.d

At params.toSmooth, twice the round-0 smooth folding drop 2 ^ d - 2 ^ (d - firstStepLog) is bounded by 2 ^ d.

Unconditional Smooth Unique-Decoding FRI, Summed IOP, & BCS-FRI ROM Soundness #

theorem Cslib.Crypto.Protocols.FRI.weightedCurveGapPerRound_of_unique {F : Type} [Field F] [DecidableEq F] (params : FRISmoothParams F) {e : ℕ} (huniq : 2 * e + params.dim 0 ≤ 2 ^ params.d) :
WeightedCurveGapPerRound params (2 ^ params.d - e - 1) fun (i : Fin params.m) => (params.arity i - 1) * params.domainSize (↑i + 1)

Unconditional per-round unique-decoding WeightedCurveGapPerRound across all m single-word smooth FRI folding rounds (instantiating [BenSassonCarmonIshaiKoppartySaraf2020, Theorems 1.5 and 6.1] for degree-(l⁽ⁱ⁾ - 1) curves at each round via FRISmoothParams.two_mul_div_add_dim_le).

Discharges UniqueCurveGapHypothesis directly from Cslib.Code.exists_correlatedAgreement_curve_unique over any field F of characteristic ≠ 2, yielding per-round exceptional-scalar budget (params.arity i - 1) * params.domainSize (i + 1) (telescoping over all m rounds to 2 ^ d - 2 ^ (d - totalLog) < 2 ^ d) with zero gap-assumption premise.

theorem Cslib.Crypto.Protocols.FRI.weightedCurveGapBound_of_unique {F : Type} [Field F] [DecidableEq F] (params : FRISmoothParams F) {e : ℕ} (huniq : 2 * e + params.dim 0 ≤ 2 ^ params.d) :
WeightedCurveGapBound params (2 ^ params.d - e - 1) (2 ^ params.d - 2 ^ (params.d - params.firstStepLog))

Unconditional uniform unique-decoding WeightedCurveGapBound for all m single-word smooth FRI folding rounds (B_commit = 2 ^ d - 2 ^ (d - firstStepLog)), obtained as a monotonicity corollary of weightedCurveGapPerRound_of_unique.

Closed-form telescoping commit-phase error (1 - 1 / 2 ^ totalLog) * (2 ^ d / |F|) across all m single-word smooth FRI folding rounds in the unique-decoding regime (< 2 ^ d / |F| independently of m and per-round arities l⁽ⁱ⁾).

theorem Cslib.Crypto.Protocols.FRI.sum_friSmoothUniqueRoundEscape_eq {F : Type} [Field F] [Fintype F] (params : FRISmoothParams F) :
∑ i : Fin params.m, ↑((params.arity i - 1) * params.domainSize (↑i + 1)) / ↑(Fintype.card F) = ENNReal.ofReal (friSmoothUniqueCommitError params)

Exact telescoping sum of per-round smooth unique-decoding folding escape budgets in ℝ≥0∞.

theorem Cslib.Crypto.Protocols.FRI.friSmoothCommitGame_le_of_unique {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRISmoothParams F) {e : ℕ} (huniq : 2 * e + params.dim 0 ≤ 2 ^ params.d) {stmt : BCS.OracleTable params.d F} (hfar : stmt ∉ params.proximityLang e) (P : BCS.InteractiveIOPProver params.d F (FRIChal F params.d params.q)) :
(friSmoothCommitGame params (2 ^ params.d - e - 1) stmt P) true ≤ ↑(2 ^ params.d - 2 ^ (params.d - params.totalLog)) / ↑(Fintype.card F)

Unconditional summed commit-phase soundness of single-word friSmoothIOP in the unique-decoding regime: for stmt ∉ params.proximityLang e, friSmoothCommitGame exceeds agreement 2 ^ d - e - 1 with probability at most (2 ^ d - 2 ^ (d - totalLog)) / |F| (= ENNReal.ofReal (friSmoothUniqueCommitError params)).

theorem Cslib.Crypto.Protocols.FRI.friSmoothIOP_interactiveGame_le_of_unique {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRISmoothParams F) {e : ℕ} (huniq : 2 * e + params.dim 0 ≤ 2 ^ params.d) {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 (friSmoothIOP params) stmt P) true ≤ ↑(2 ^ params.d - 2 ^ (params.d - params.totalLog)) / ↑(Fintype.card F) + (↑(2 ^ params.d - e - 1) / 2 ^ params.d) ^ params.q

Unconditional summed interactive soundness of single-word friSmoothIOP in the unique-decoding regime: for stmt ∉ params.proximityLang e and any adaptive prover P, the acceptance probability is at most (2 ^ d - 2 ^ (d - totalLog)) / |F| + ((2 ^ d - e - 1) / 2 ^ d) ^ q (telescoping independently of m and per-round arities l⁽ⁱ⁾).

theorem Cslib.Crypto.Protocols.FRI.friSmoothIOP_rbrSound_of_unique {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRISmoothParams F) {e : ℕ} (huniq : 2 * e + params.dim 0 ≤ 2 ^ params.d) :
BCS.IOPRoundByRoundSoundness (friSmoothIOP params) (params.proximityLang e) (friSmoothDoomed params (2 ^ params.d - e - 1)) (friSmoothGoodStep params (2 ^ params.d - e - 1)) ∧ ∀ stmt ∉ params.proximityLang e, ∀ (pref : List (BCS.OracleTable params.d F × FRIChal F params.d params.q)) (π : BCS.OracleTable params.d F), friSmoothDoomed 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 | ¬friSmoothGoodStep params (2 ^ params.d - e - 1) stmt pref π c} ≤ friSmoothRBRError params e (2 ^ params.d - 2 ^ (params.d - params.firstStepLog))

Unconditional round-by-round soundness of single-word friSmoothIOP in the unique-decoding regime ([BSBHR18]; [BenSassonCarmonIshaiKoppartySaraf2020, Theorems 1.5 and 6.1]).

theorem Cslib.Crypto.Protocols.FRI.friSmoothBCS_romSoundness_bound_of_unique {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRISmoothParams F) {e : ℕ} (huniq : 2 * e + params.dim 0 ≤ 2 ^ params.d) {encSym : F → List Bool} {decSym : List Bool → F} (hdec : Function.LeftInverse decSym encSym) (σ : ℕ) {P : OracleComp (BCS.BCSROMSpec (BCS.OracleTable params.d F) (FRIChal F params.d params.q)) (BCS.OracleTable params.d F × BCS.BCSProof (params.m + 1) F)} {t_FS Q_MT : ℕ} (hFS : OracleComp.IsCostBounded BCS.bcsFSCost P t_FS) (hMT : OracleComp.IsCostBounded BCS.bcsMTCost (BCS.bcsSoundnessProg (friSmoothIOP params) encSym (params.proximityLang e) P) Q_MT) :
(BCS.bcsSoundnessGame (friSmoothIOP params) encSym (params.proximityLang e) P σ) true ≤ ↑(t_FS + (params.m + 1)) * (friSmoothRBRError params e (2 ^ params.d - 2 ^ (params.d - params.firstStepLog)) + ↑(t_FS + (params.m + 1)) * (1 / ↑(Fintype.card (FRIChal F params.d params.q)))) + ↑Q_MT * (↑(3 * Q_MT + (params.m + 1) * (t_FS + (params.m + 1))) * (1 / 2 ^ σ))

Unconditional adaptive smooth BCS-FRI ROM soundness in the unique-decoding regime ([BSCS16]; [CY24]), composing weightedCurveGapBound_of_unique with friSmoothBCS_romSoundness_bound_of_weightedCurveGap.

theorem Cslib.Crypto.Protocols.FRI.friSmoothBCS_romSoundness_bound_of_prover_verifier_of_unique {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRISmoothParams F) {e : ℕ} (huniq : 2 * e + params.dim 0 ≤ 2 ^ params.d) {encSym : F → List Bool} {decSym : List Bool → F} (hdec : Function.LeftInverse decSym encSym) (σ : ℕ) {P : OracleComp (BCS.BCSROMSpec (BCS.OracleTable params.d F) (FRIChal F params.d params.q)) (BCS.OracleTable params.d F × BCS.BCSProof (params.m + 1) F)} {t_MT t_FS L_path : ℕ} (hMT : OracleComp.IsCostBounded BCS.bcsMTCost P t_MT) (hFS : OracleComp.IsCostBounded BCS.bcsFSCost P t_FS) (hops : ∀ (x : BCS.OracleTable params.d F) (prf : BCS.BCSProof (params.m + 1) F), (x, prf) ∈ P.support → ∀ op ∈ prf.openings, op.path.length ≤ L_path) :
(BCS.bcsSoundnessGame (friSmoothIOP params) encSym (params.proximityLang e) P σ) true ≤ ↑(t_FS + (params.m + 1)) * (friSmoothRBRError params e (2 ^ params.d - 2 ^ (params.d - params.firstStepLog)) + ↑(t_FS + (params.m + 1)) * (1 / ↑(Fintype.card (FRIChal F params.d params.q)))) + ↑(t_MT + params.proofOracleQueries * (L_path + 1)) * (↑(3 * (t_MT + params.proofOracleQueries * (L_path + 1)) + (params.m + 1) * (t_FS + (params.m + 1))) * (1 / 2 ^ σ))

Unconditional adaptive smooth BCS-FRI ROM soundness with separate prover/verifier Merkle budgets in the unique-decoding regime ([BSCS16]; [CY24]).

Unconditional Smooth Johnson-Bound FRI, Summed IOP, & BCS-FRI ROM Soundness #

@[reducible, inline]
abbrev Cslib.Crypto.Protocols.FRI.friSmoothJohnsonRoundBound {F : Type} [Field F] (params : FRISmoothParams F) (mJ : ℕ) (i : Fin params.m) :

Per-round smooth Siegel-interpolation bad-scalar bound for single-word smooth FRI in the Johnson regime with multiplicity slack mJ at folding round i : Fin params.m: (1800 * (mJ + 1) ^ 6 * ((params.arity i - 1) * params.domainSize (i.val + 1)) * (2 ^ params.d) ^ 2) / params.dim 0 (using this library's original explicit Siegel constant 1800 * (mJ + 1) ^ 6, telescoping over all m rounds without an O(m) factor).

@[reducible, inline]

Conservative uniform per-round commit-phase exceptional-scalar bound for single-word smooth FRI in the Johnson regime with multiplicity slack mJ: (1800 * (mJ + 1) ^ 6 * (2 ^ params.d - 2 ^ (params.d - params.firstStepLog)) * (2 ^ params.d) ^ 2) / params.dim 0.

Every folding round's smooth Johnson budget friSmoothJohnsonRoundBound params mJ i is bounded by the round-0 uniform budget friSmoothJohnsonCommitBound params mJ.

theorem Cslib.Crypto.Protocols.FRI.sum_friSmoothJohnsonRoundBound_le {F : Type} [Field F] (params : FRISmoothParams F) (mJ : ℕ) :
∑ i : Fin params.m, friSmoothJohnsonRoundBound params mJ i ≤ 1800 * (mJ + 1) ^ 6 * (2 ^ params.d - 2 ^ (params.d - params.totalLog)) * (2 ^ params.d) ^ 2 / params.dim 0

Telescoping upper bound on the integer sum of friSmoothJohnsonRoundBound across all m smooth folding rounds (bounded independently of m and per-round arities l⁽ⁱ⁾).

Closed-form telescoping Siegel commit-phase error across all m single-word smooth FRI folding rounds in the Johnson regime: (1 - 1 / 2 ^ totalLog) * (1800 * (mJ + 1) ^ 6 * (2 ^ d) ^ 2 / ((dim 0 / 2 ^ d) * |F|)) (bounded independently of m and per-round arities l⁽ⁱ⁾; uses this library's original explicit Siegel constant).

Telescoping sum of per-round smooth Johnson escape probabilities bounded by friSmoothJohnsonCommitError.

theorem Cslib.Crypto.Protocols.FRI.weightedCurveGapPerRound_of_johnson_discrete {F : Type} [Field F] [DecidableEq F] (params : FRISmoothParams F) {e : ℕ} (he : e < 2 ^ params.d) (mRound DRound : Fin params.m → ℕ) (hm : ∀ (i : Fin params.m), 1 ≤ mRound i) (hk_le : ∀ (i : Fin params.m), params.dim (↑i + 1) ≤ params.domainSize (↑i + 1) - e / 2 ^ params.cumLog (↑i + 1)) (hinterp : ∀ (i : Fin params.m), params.domainSize (↑i + 1) * (mRound i * (mRound i + 1) / 2) < (Code.Sudan.monomials (params.dim (↑i + 1) - 1) (DRound i)).card) (hroot : ∀ (i : Fin params.m), DRound i < mRound i * (params.domainSize (↑i + 1) - e / 2 ^ params.cumLog (↑i + 1))) :
WeightedCurveGapPerRound params (2 ^ params.d - e - 1) fun (i : Fin params.m) => Code.ProximityGap.johnsonCurveBound (params.domainSize (↑i + 1)) (mRound i) (params.dim (↑i + 1) - 1) (DRound i) (params.arity i - 1) (2 ^ params.d)

Explicit-parameter Guruswami–Sudan per-round WeightedCurveGapPerRound across all m single-word smooth FRI folding rounds (in the setting of [BenSassonCarmonIshaiKoppartySaraf2020, Theorems 1.5, 6.2, and 7.2], with exact degree-(l⁽ⁱ⁾ - 1) Cslib.Code.ProximityGap.johnsonCurveBound budgets).

theorem Cslib.Crypto.Protocols.FRI.weightedCurveGapBound_of_johnson_discrete {F : Type} [Field F] [DecidableEq F] (params : FRISmoothParams F) {e B_commit : ℕ} (he : e < 2 ^ params.d) (mRound DRound : Fin params.m → ℕ) (hm : ∀ (i : Fin params.m), 1 ≤ mRound i) (hk_le : ∀ (i : Fin params.m), params.dim (↑i + 1) ≤ params.domainSize (↑i + 1) - e / 2 ^ params.cumLog (↑i + 1)) (hinterp : ∀ (i : Fin params.m), params.domainSize (↑i + 1) * (mRound i * (mRound i + 1) / 2) < (Code.Sudan.monomials (params.dim (↑i + 1) - 1) (DRound i)).card) (hroot : ∀ (i : Fin params.m), DRound i < mRound i * (params.domainSize (↑i + 1) - e / 2 ^ params.cumLog (↑i + 1))) (hbound : ∀ (i : Fin params.m), Code.ProximityGap.johnsonCurveBound (params.domainSize (↑i + 1)) (mRound i) (params.dim (↑i + 1) - 1) (DRound i) (params.arity i - 1) (2 ^ params.d) ≤ B_commit) :
WeightedCurveGapBound params (2 ^ params.d - e - 1) B_commit

Explicit-parameter Guruswami–Sudan uniform WeightedCurveGapBound for all m single-word smooth FRI folding rounds, derived as a monotonicity corollary of weightedCurveGapPerRound_of_johnson_discrete.

theorem Cslib.Crypto.Protocols.FRI.friSmoothCommitGame_le_of_johnson_discrete {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRISmoothParams F) {e : ℕ} (he : e < 2 ^ params.d) (mRound DRound : Fin params.m → ℕ) (hm : ∀ (i : Fin params.m), 1 ≤ mRound i) (hk_le : ∀ (i : Fin params.m), params.dim (↑i + 1) ≤ params.domainSize (↑i + 1) - e / 2 ^ params.cumLog (↑i + 1)) (hinterp : ∀ (i : Fin params.m), params.domainSize (↑i + 1) * (mRound i * (mRound i + 1) / 2) < (Code.Sudan.monomials (params.dim (↑i + 1) - 1) (DRound i)).card) (hroot : ∀ (i : Fin params.m), DRound i < mRound i * (params.domainSize (↑i + 1) - e / 2 ^ params.cumLog (↑i + 1))) {stmt : BCS.OracleTable params.d F} (hfar : stmt ∉ params.proximityLang e) (P : BCS.InteractiveIOPProver params.d F (FRIChal F params.d params.q)) :
(friSmoothCommitGame params (2 ^ params.d - e - 1) stmt P) true ≤ ↑(∑ i : Fin params.m, Code.ProximityGap.johnsonCurveBound (params.domainSize (↑i + 1)) (mRound i) (params.dim (↑i + 1) - 1) (DRound i) (params.arity i - 1) (2 ^ params.d)) / ↑(Fintype.card F)

Explicit-parameter Guruswami–Sudan step toward summed commit-phase soundness of single-word friSmoothIOP.

theorem Cslib.Crypto.Protocols.FRI.friSmoothIOP_interactiveGame_le_of_johnson_discrete {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRISmoothParams F) {e : ℕ} (he : e < 2 ^ params.d) (mRound DRound : Fin params.m → ℕ) (hm : ∀ (i : Fin params.m), 1 ≤ mRound i) (hk_le : ∀ (i : Fin params.m), params.dim (↑i + 1) ≤ params.domainSize (↑i + 1) - e / 2 ^ params.cumLog (↑i + 1)) (hinterp : ∀ (i : Fin params.m), params.domainSize (↑i + 1) * (mRound i * (mRound i + 1) / 2) < (Code.Sudan.monomials (params.dim (↑i + 1) - 1) (DRound i)).card) (hroot : ∀ (i : Fin params.m), DRound i < mRound i * (params.domainSize (↑i + 1) - e / 2 ^ params.cumLog (↑i + 1))) {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 (friSmoothIOP params) stmt P) true ≤ ↑(∑ i : Fin params.m, Code.ProximityGap.johnsonCurveBound (params.domainSize (↑i + 1)) (mRound i) (params.dim (↑i + 1) - 1) (DRound i) (params.arity i - 1) (2 ^ params.d)) / ↑(Fintype.card F) + (↑(2 ^ params.d - e - 1) / 2 ^ params.d) ^ params.q

Explicit-parameter Guruswami–Sudan step toward summed interactive soundness of single-word friSmoothIOP.

theorem Cslib.Crypto.Protocols.FRI.weightedCurveGapPerRound_of_johnson {F : Type} [Field F] [DecidableEq F] (params : FRISmoothParams F) {e mJ : ℕ} (hmJ : 1 ≤ mJ) (he : ↑e / 2 ^ params.d ≤ 1 - √(↑(params.dim 0) / 2 ^ params.d) - √(↑(params.dim 0) / 2 ^ params.d) / (2 * ↑mJ)) :
WeightedCurveGapPerRound params (2 ^ params.d - e - 1) (friSmoothJohnsonRoundBound params mJ)

Original explicit-constant per-round Johnson-bound WeightedCurveGapPerRound across all m single-word smooth FRI folding rounds up to δ ≤ 1 - √ρ - √ρ / (2 * mJ) (in the setting of [BenSassonCarmonIshaiKoppartySaraf2020, Theorems 1.5, 6.2, and 7.2], using this library's explicit Siegel constants).

Reuses Cslib.Code.ProximityGap.johnson_curve_params_bound (at degree r = params.arity i - 1 ≥ 1) and Cslib.Code.ProximityGap.johnsonCurveBound_mul_le at every round i : Fin params.m, retaining the telescoping factor (params.arity i - 1) * params.domainSize (i + 1) in friSmoothJohnsonRoundBound params mJ i so the sum over all m rounds stays independent of m and the per-round arities l⁽ⁱ⁾.

theorem Cslib.Crypto.Protocols.FRI.weightedCurveGapBound_of_johnson {F : Type} [Field F] [DecidableEq F] (params : FRISmoothParams F) {e mJ : ℕ} (hmJ : 1 ≤ mJ) (he : ↑e / 2 ^ params.d ≤ 1 - √(↑(params.dim 0) / 2 ^ params.d) - √(↑(params.dim 0) / 2 ^ params.d) / (2 * ↑mJ)) :
WeightedCurveGapBound params (2 ^ params.d - e - 1) (friSmoothJohnsonCommitBound params mJ)

Original explicit-constant uniform Johnson-bound WeightedCurveGapBound for all m single-word smooth FRI folding rounds up to δ ≤ 1 - √ρ - √ρ / (2 * mJ) (friSmoothJohnsonCommitBound params mJ, in the setting of [BenSassonCarmonIshaiKoppartySaraf2020, Theorems 1.5, 6.2, and 7.2]), obtained as a monotonicity corollary of weightedCurveGapPerRound_of_johnson and friSmoothJohnsonRoundBound_le_commitBound.

Conservative uniform per-round commit-phase exceptional-scalar budget for smooth FRI in the η-gap Johnson regime ((e : ℝ) / 2 ^ d ≤ 1 - √ρ - η, 0 < η): ⌊115200 * (2 ^ d - 2 ^ (d - firstStepLog)) * (2 ^ d) ^ 2 / (dim 0 * η ^ 6)⌋₊ (using this library's original explicit Siegel constant 1800 * 64 = 115200 and η directly rather than min(η, √ρ / 20) in Eq. (1.3)).

theorem Cslib.Crypto.Protocols.FRI.weightedCurveGapBound_of_johnson_eta {F : Type} [Field F] [DecidableEq F] (params : FRISmoothParams F) {e : ℕ} {η : ℝ} (hη : 0 < η) (he : ↑e / 2 ^ params.d ≤ 1 - √(↑(params.dim 0) / 2 ^ params.d) - η) :
WeightedCurveGapBound params (2 ^ params.d - e - 1) (friSmoothJohnsonEtaCommitBound params η)

Original explicit-constant η-gap uniform WeightedCurveGapBound across all m smooth FRI folding rounds up to (e : ℝ) / 2 ^ d ≤ 1 - √ρ - η (0 < η), derived from weightedCurveGapBound_of_johnson and ProximityGap.exists_multiplicity_of_eta (using η directly rather than min(η, √ρ / 20) in Eq. (1.3)).

theorem Cslib.Crypto.Protocols.FRI.friSmoothCommitGame_le_of_johnson {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRISmoothParams F) {e mJ : ℕ} (hmJ : 1 ≤ mJ) (he : ↑e / 2 ^ params.d ≤ 1 - √(↑(params.dim 0) / 2 ^ params.d) - √(↑(params.dim 0) / 2 ^ params.d) / (2 * ↑mJ)) {stmt : BCS.OracleTable params.d F} (hfar : stmt ∉ params.proximityLang e) (P : BCS.InteractiveIOPProver params.d F (FRIChal F params.d params.q)) :
(friSmoothCommitGame params (2 ^ params.d - e - 1) stmt P) true ≤ ENNReal.ofReal (friSmoothJohnsonCommitError params mJ)

Original explicit-constant Johnson summed commit-phase soundness of single-word friSmoothIOP (in the setting of [BSCI+23], using this library's explicit telescoping Siegel commit error friSmoothJohnsonCommitError params mJ, bounded independently of m and per-round arities l⁽ⁱ⁾).

theorem Cslib.Crypto.Protocols.FRI.friSmoothIOP_interactiveGame_le_of_johnson {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRISmoothParams F) {e mJ : ℕ} (hmJ : 1 ≤ mJ) (he : ↑e / 2 ^ params.d ≤ 1 - √(↑(params.dim 0) / 2 ^ params.d) - √(↑(params.dim 0) / 2 ^ params.d) / (2 * ↑mJ)) {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 (friSmoothIOP params) stmt P) true ≤ ENNReal.ofReal (friSmoothJohnsonCommitError params mJ) + (↑(2 ^ params.d - e - 1) / 2 ^ params.d) ^ params.q

Original explicit-constant Johnson summed interactive soundness of single-word friSmoothIOP (in the setting of [BSCI+23], using friSmoothJohnsonCommitError params mJ plus query error ((2 ^ d - e - 1) / 2 ^ d) ^ q, bounded independently of m and per-round arities l⁽ⁱ⁾).

theorem Cslib.Crypto.Protocols.FRI.friSmoothIOP_rbrSound_of_johnson {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRISmoothParams F) {e mJ : ℕ} (hmJ : 1 ≤ mJ) (he : ↑e / 2 ^ params.d ≤ 1 - √(↑(params.dim 0) / 2 ^ params.d) - √(↑(params.dim 0) / 2 ^ params.d) / (2 * ↑mJ)) :
BCS.IOPRoundByRoundSoundness (friSmoothIOP params) (params.proximityLang e) (friSmoothDoomed params (2 ^ params.d - e - 1)) (friSmoothGoodStep params (2 ^ params.d - e - 1)) ∧ ∀ stmt ∉ params.proximityLang e, ∀ (pref : List (BCS.OracleTable params.d F × FRIChal F params.d params.q)) (π : BCS.OracleTable params.d F), friSmoothDoomed 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 | ¬friSmoothGoodStep params (2 ^ params.d - e - 1) stmt pref π c} ≤ friSmoothRBRError params e (friSmoothJohnsonCommitBound params mJ)

Original explicit-constant Johnson round-by-round soundness of single-word friSmoothIOP (in the setting of [BSBHR18] and [BenSassonCarmonIshaiKoppartySaraf2020, Theorems 1.5, 6.2, and 7.2]).

theorem Cslib.Crypto.Protocols.FRI.friSmoothBCS_romSoundness_bound_of_johnson {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRISmoothParams F) {e mJ : ℕ} (hmJ : 1 ≤ mJ) (he : ↑e / 2 ^ params.d ≤ 1 - √(↑(params.dim 0) / 2 ^ params.d) - √(↑(params.dim 0) / 2 ^ params.d) / (2 * ↑mJ)) {encSym : F → List Bool} {decSym : List Bool → F} (hdec : Function.LeftInverse decSym encSym) (σ : ℕ) {P : OracleComp (BCS.BCSROMSpec (BCS.OracleTable params.d F) (FRIChal F params.d params.q)) (BCS.OracleTable params.d F × BCS.BCSProof (params.m + 1) F)} {t_FS Q_MT : ℕ} (hFS : OracleComp.IsCostBounded BCS.bcsFSCost P t_FS) (hMT : OracleComp.IsCostBounded BCS.bcsMTCost (BCS.bcsSoundnessProg (friSmoothIOP params) encSym (params.proximityLang e) P) Q_MT) :
(BCS.bcsSoundnessGame (friSmoothIOP params) encSym (params.proximityLang e) P σ) true ≤ ↑(t_FS + (params.m + 1)) * (friSmoothRBRError params e (friSmoothJohnsonCommitBound params mJ) + ↑(t_FS + (params.m + 1)) * (1 / ↑(Fintype.card (FRIChal F params.d params.q)))) + ↑Q_MT * (↑(3 * Q_MT + (params.m + 1) * (t_FS + (params.m + 1))) * (1 / 2 ^ σ))

Original explicit-constant Johnson adaptive two-channel smooth BCS-FRI ROM soundness ([BSCS16]; [CY24]), composing weightedCurveGapBound_of_johnson with friSmoothBCS_romSoundness_bound_of_weightedCurveGap.

theorem Cslib.Crypto.Protocols.FRI.friSmoothBCS_romSoundness_bound_of_prover_verifier_of_johnson {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRISmoothParams F) {e mJ : ℕ} (hmJ : 1 ≤ mJ) (he : ↑e / 2 ^ params.d ≤ 1 - √(↑(params.dim 0) / 2 ^ params.d) - √(↑(params.dim 0) / 2 ^ params.d) / (2 * ↑mJ)) {encSym : F → List Bool} {decSym : List Bool → F} (hdec : Function.LeftInverse decSym encSym) (σ : ℕ) {P : OracleComp (BCS.BCSROMSpec (BCS.OracleTable params.d F) (FRIChal F params.d params.q)) (BCS.OracleTable params.d F × BCS.BCSProof (params.m + 1) F)} {t_MT t_FS L_path : ℕ} (hMT : OracleComp.IsCostBounded BCS.bcsMTCost P t_MT) (hFS : OracleComp.IsCostBounded BCS.bcsFSCost P t_FS) (hops : ∀ (x : BCS.OracleTable params.d F) (prf : BCS.BCSProof (params.m + 1) F), (x, prf) ∈ P.support → ∀ op ∈ prf.openings, op.path.length ≤ L_path) :
(BCS.bcsSoundnessGame (friSmoothIOP params) encSym (params.proximityLang e) P σ) true ≤ ↑(t_FS + (params.m + 1)) * (friSmoothRBRError params e (friSmoothJohnsonCommitBound params mJ) + ↑(t_FS + (params.m + 1)) * (1 / ↑(Fintype.card (FRIChal F params.d params.q)))) + ↑(t_MT + params.proofOracleQueries * (L_path + 1)) * (↑(3 * (t_MT + params.proofOracleQueries * (L_path + 1)) + (params.m + 1) * (t_FS + (params.m + 1))) * (1 / 2 ^ σ))

Original explicit-constant Johnson adaptive two-channel smooth BCS-FRI ROM soundness with separate prover/verifier Merkle budgets ([BSCS16]; [CY24]).

Binary 2-to-1 Unique-Decoding FRI, Summed IOP, & BCS-FRI Corollaries #

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

Unconditional shrinking per-round unique-decoding WeightedLineGapPerRound across all m single-word binary FRI folding rounds (corollary of weightedCurveGapPerRound_of_unique).

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

Unconditional uniform unique-decoding WeightedLineGapBound for all m single-word FRI folding rounds (B_commit = 2 ^ (d - 1)), obtained as a monotonicity corollary of weightedLineGapPerRound_of_unique.

noncomputable def Cslib.Crypto.Protocols.FRI.friUniqueCommitError {F : Type} [Field F] [Fintype F] (params : FRIParams F) :

Closed-form geometric commit-phase error (1 - 1 / 2 ^ m) * (2 ^ d / |F|) across all m single-word 2-to-1 FRI folding rounds in the unique-decoding regime (< 2 ^ d / |F| independently of m).

theorem Cslib.Crypto.Protocols.FRI.sum_friUniqueRoundEscape_eq {F : Type} [Field F] [Fintype F] (params : FRIParams F) :
∑ i : Fin params.m, ↑(2 ^ (params.d - (↑i + 1))) / ↑(Fintype.card F) = ENNReal.ofReal (friUniqueCommitError params)

Exact geometric sum of per-round unique-decoding folding escape budgets in ℝ≥0∞ (corollary of sum_friSmoothUniqueRoundEscape_eq).

theorem Cslib.Crypto.Protocols.FRI.friCommitGame_le_of_unique {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRIParams F) {e : ℕ} (huniq : 2 * e + params.dim 0 ≤ 2 ^ params.d) {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 ≤ ↑(2 ^ params.d - 2 ^ (params.d - params.m)) / ↑(Fintype.card F)

Unconditional summed commit-phase soundness of single-word friIOP in the unique-decoding regime (corollary of friSmoothCommitGame_le_of_unique).

theorem Cslib.Crypto.Protocols.FRI.friIOP_interactiveGame_le_of_unique {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRIParams F) {e : ℕ} (huniq : 2 * e + params.dim 0 ≤ 2 ^ params.d) {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 ≤ ↑(2 ^ params.d - 2 ^ (params.d - params.m)) / ↑(Fintype.card F) + (↑(2 ^ params.d - e - 1) / 2 ^ params.d) ^ params.q

Unconditional summed interactive soundness of single-word friIOP in the unique-decoding regime (corollary of friSmoothIOP_interactiveGame_le_of_unique).

theorem Cslib.Crypto.Protocols.FRI.friIOP_rbrSound_of_unique {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRIParams F) {e : ℕ} (huniq : 2 * e + params.dim 0 ≤ 2 ^ params.d) :
BCS.IOPRoundByRoundSoundness (friIOP params) (params.proximityLang e) (friDoomed params (2 ^ params.d - e - 1)) (friGoodStep params (2 ^ params.d - e - 1)) ∧ ∀ 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 (2 ^ (params.d - 1))

Unconditional round-by-round soundness of single-word friIOP in the unique-decoding regime ([BSBHR18]; [BenSassonCarmonIshaiKoppartySaraf2020, Theorem 4.1]).

theorem Cslib.Crypto.Protocols.FRI.friBCS_romSoundness_bound_of_unique {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRIParams F) {e : ℕ} (huniq : 2 * e + params.dim 0 ≤ 2 ^ params.d) {encSym : F → List Bool} {decSym : List Bool → F} (hdec : Function.LeftInverse decSym encSym) (σ : ℕ) {P : OracleComp (BCS.BCSROMSpec (BCS.OracleTable params.d F) (FRIChal F params.d params.q)) (BCS.OracleTable params.d F × BCS.BCSProof (params.m + 1) F)} {t_FS Q_MT : ℕ} (hFS : OracleComp.IsCostBounded BCS.bcsFSCost P t_FS) (hMT : OracleComp.IsCostBounded BCS.bcsMTCost (BCS.bcsSoundnessProg (friIOP params) encSym (params.proximityLang e) P) Q_MT) :
(BCS.bcsSoundnessGame (friIOP params) encSym (params.proximityLang e) P σ) true ≤ ↑(t_FS + (params.m + 1)) * (friRBRError params e (2 ^ (params.d - 1)) + ↑(t_FS + (params.m + 1)) * (1 / ↑(Fintype.card (FRIChal F params.d params.q)))) + ↑Q_MT * (↑(3 * Q_MT + (params.m + 1) * (t_FS + (params.m + 1))) * (1 / 2 ^ σ))

Unconditional adaptive BCS-FRI ROM soundness in the unique-decoding regime ([BSCS16]; [CY24]), composing weightedLineGapBound_of_unique (B_commit = 2 ^ (d - 1)) with friBCS_romSoundness_bound_of_weightedLineGap.

theorem Cslib.Crypto.Protocols.FRI.friBCS_romSoundness_bound_of_prover_verifier_of_unique {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRIParams F) {e : ℕ} (huniq : 2 * e + params.dim 0 ≤ 2 ^ params.d) {encSym : F → List Bool} {decSym : List Bool → F} (hdec : Function.LeftInverse decSym encSym) (σ : ℕ) {P : OracleComp (BCS.BCSROMSpec (BCS.OracleTable params.d F) (FRIChal F params.d params.q)) (BCS.OracleTable params.d F × BCS.BCSProof (params.m + 1) F)} {t_MT t_FS L_path : ℕ} (hMT : OracleComp.IsCostBounded BCS.bcsMTCost P t_MT) (hFS : OracleComp.IsCostBounded BCS.bcsFSCost P t_FS) (hops : ∀ (x : BCS.OracleTable params.d F) (prf : BCS.BCSProof (params.m + 1) F), (x, prf) ∈ P.support → ∀ op ∈ prf.openings, op.path.length ≤ L_path) :
(BCS.bcsSoundnessGame (friIOP params) encSym (params.proximityLang e) P σ) true ≤ ↑(t_FS + (params.m + 1)) * (friRBRError params e (2 ^ (params.d - 1)) + ↑(t_FS + (params.m + 1)) * (1 / ↑(Fintype.card (FRIChal F params.d params.q)))) + ↑(t_MT + params.proofOracleQueries * (L_path + 1)) * (↑(3 * (t_MT + params.proofOracleQueries * (L_path + 1)) + (params.m + 1) * (t_FS + (params.m + 1))) * (1 / 2 ^ σ))

Unconditional adaptive BCS-FRI ROM soundness with separate prover/verifier Merkle budgets in the unique-decoding regime ([BSCS16]; [CY24]).

Binary 2-to-1 Johnson-Bound FRI, Summed IOP, & BCS-FRI Corollaries #

@[reducible, inline]
abbrev Cslib.Crypto.Protocols.FRI.friJohnsonRoundBound {F : Type} [Field F] (params : FRIParams F) (mJ : ℕ) (i : Fin params.m) :

Per-round geometric Siegel-interpolation bad-scalar bound for single-word 2-to-1 FRI in the Johnson regime with multiplicity slack mJ at folding round i : Fin params.m: (1800 * (mJ + 1) ^ 6 * 2 ^ (params.d - (i.val + 1)) * (2 ^ params.d) ^ 2) / params.dim 0.

@[reducible, inline]

Conservative uniform per-round commit-phase exceptional-scalar bound for single-word FRI in the Johnson regime with multiplicity slack mJ: (900 * (mJ + 1) ^ 6 * (2 ^ params.d) ^ 3) / params.dim 0.

At params.toSmooth, the smooth uniform Johnson commit budget is bounded above by the binary friJohnsonCommitBound.

theorem Cslib.Crypto.Protocols.FRI.friJohnsonRoundBound_zero {F : Type} [Field F] (params : FRIParams F) (mJ : ℕ) (hm : 0 < params.m) :

At round 0, friJohnsonRoundBound coincides exactly with friJohnsonCommitBound.

Every folding round's geometric budget friJohnsonRoundBound params mJ i is bounded by the round-0 uniform budget friJohnsonCommitBound params mJ.

theorem Cslib.Crypto.Protocols.FRI.sum_friJohnsonRoundBound_le {F : Type} [Field F] (params : FRIParams F) (mJ : ℕ) :
∑ i : Fin params.m, friJohnsonRoundBound params mJ i ≤ 1800 * (mJ + 1) ^ 6 * (2 ^ params.d - 2 ^ (params.d - params.m)) * (2 ^ params.d) ^ 2 / params.dim 0

Geometric telescoping upper bound on the integer sum of friJohnsonRoundBound across all m folding rounds (corollary of sum_friSmoothJohnsonRoundBound_le).

noncomputable def Cslib.Crypto.Protocols.FRI.friJohnsonCommitError {F : Type} [Field F] [Fintype F] (params : FRIParams F) (mJ : ℕ) :

Closed-form geometric Siegel commit-phase error across all m single-word 2-to-1 FRI folding rounds in the Johnson regime ((1 - 1 / 2 ^ m) * 1800 * (mJ + 1) ^ 6 * (2 ^ d) ^ 2 / (ρ * |F|)).

theorem Cslib.Crypto.Protocols.FRI.sum_friJohnsonRoundEscape_le {F : Type} [Field F] [Fintype F] (params : FRIParams F) (mJ : ℕ) :
∑ i : Fin params.m, ↑(friJohnsonRoundBound params mJ i) / ↑(Fintype.card F) ≤ ENNReal.ofReal (friJohnsonCommitError params mJ)

Geometric sum of per-round Johnson escape probabilities bounded by friJohnsonCommitError (corollary of sum_friSmoothJohnsonRoundEscape_le).

theorem Cslib.Crypto.Protocols.FRI.weightedLineGapPerRound_of_johnson_discrete {F : Type} [Field F] [DecidableEq F] (params : FRIParams F) {e : ℕ} (he : e < 2 ^ params.d) (mRound DRound : Fin params.m → ℕ) (hm : ∀ (i : Fin params.m), 1 ≤ mRound i) (hk_le : ∀ (i : Fin params.m), params.dim (↑i + 1) ≤ 2 ^ (params.d - (↑i + 1)) - e / 2 ^ (↑i + 1)) (hinterp : ∀ (i : Fin params.m), 2 ^ (params.d - (↑i + 1)) * (mRound i * (mRound i + 1) / 2) < (Code.Sudan.monomials (params.dim (↑i + 1) - 1) (DRound i)).card) (hroot : ∀ (i : Fin params.m), DRound i < mRound i * (2 ^ (params.d - (↑i + 1)) - e / 2 ^ (↑i + 1))) :
WeightedLineGapPerRound params (2 ^ params.d - e - 1) fun (i : Fin params.m) => Code.ProximityGap.johnsonCurveBound (2 ^ (params.d - (↑i + 1))) (mRound i) (params.dim (↑i + 1) - 1) (DRound i) 1 (2 ^ params.d)

Explicit-parameter Guruswami–Sudan per-round WeightedLineGapPerRound across all m single-word binary FRI folding rounds (corollary of weightedCurveGapPerRound_of_johnson_discrete).

theorem Cslib.Crypto.Protocols.FRI.weightedLineGapBound_of_johnson_discrete {F : Type} [Field F] [DecidableEq F] (params : FRIParams F) {e B_commit : ℕ} (he : e < 2 ^ params.d) (mRound DRound : Fin params.m → ℕ) (hm : ∀ (i : Fin params.m), 1 ≤ mRound i) (hk_le : ∀ (i : Fin params.m), params.dim (↑i + 1) ≤ 2 ^ (params.d - (↑i + 1)) - e / 2 ^ (↑i + 1)) (hinterp : ∀ (i : Fin params.m), 2 ^ (params.d - (↑i + 1)) * (mRound i * (mRound i + 1) / 2) < (Code.Sudan.monomials (params.dim (↑i + 1) - 1) (DRound i)).card) (hroot : ∀ (i : Fin params.m), DRound i < mRound i * (2 ^ (params.d - (↑i + 1)) - e / 2 ^ (↑i + 1))) (hbound : ∀ (i : Fin params.m), Code.ProximityGap.johnsonCurveBound (2 ^ (params.d - (↑i + 1))) (mRound i) (params.dim (↑i + 1) - 1) (DRound i) 1 (2 ^ params.d) ≤ B_commit) :
WeightedLineGapBound params (2 ^ params.d - e - 1) B_commit

Explicit-parameter Guruswami–Sudan uniform WeightedLineGapBound for all m single-word FRI folding rounds, derived as a monotonicity corollary of weightedLineGapPerRound_of_johnson_discrete.

theorem Cslib.Crypto.Protocols.FRI.friCommitGame_le_of_johnson_discrete {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRIParams F) {e : ℕ} (he : e < 2 ^ params.d) (mRound DRound : Fin params.m → ℕ) (hm : ∀ (i : Fin params.m), 1 ≤ mRound i) (hk_le : ∀ (i : Fin params.m), params.dim (↑i + 1) ≤ 2 ^ (params.d - (↑i + 1)) - e / 2 ^ (↑i + 1)) (hinterp : ∀ (i : Fin params.m), 2 ^ (params.d - (↑i + 1)) * (mRound i * (mRound i + 1) / 2) < (Code.Sudan.monomials (params.dim (↑i + 1) - 1) (DRound i)).card) (hroot : ∀ (i : Fin params.m), DRound i < mRound i * (2 ^ (params.d - (↑i + 1)) - e / 2 ^ (↑i + 1))) {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, Code.ProximityGap.johnsonCurveBound (2 ^ (params.d - (↑i + 1))) (mRound i) (params.dim (↑i + 1) - 1) (DRound i) 1 (2 ^ params.d)) / ↑(Fintype.card F)

Explicit-parameter Guruswami–Sudan step toward summed commit-phase soundness of single-word friIOP.

theorem Cslib.Crypto.Protocols.FRI.friIOP_interactiveGame_le_of_johnson_discrete {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRIParams F) {e : ℕ} (he : e < 2 ^ params.d) (mRound DRound : Fin params.m → ℕ) (hm : ∀ (i : Fin params.m), 1 ≤ mRound i) (hk_le : ∀ (i : Fin params.m), params.dim (↑i + 1) ≤ 2 ^ (params.d - (↑i + 1)) - e / 2 ^ (↑i + 1)) (hinterp : ∀ (i : Fin params.m), 2 ^ (params.d - (↑i + 1)) * (mRound i * (mRound i + 1) / 2) < (Code.Sudan.monomials (params.dim (↑i + 1) - 1) (DRound i)).card) (hroot : ∀ (i : Fin params.m), DRound i < mRound i * (2 ^ (params.d - (↑i + 1)) - e / 2 ^ (↑i + 1))) {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 ≤ ↑(∑ i : Fin params.m, Code.ProximityGap.johnsonCurveBound (2 ^ (params.d - (↑i + 1))) (mRound i) (params.dim (↑i + 1) - 1) (DRound i) 1 (2 ^ params.d)) / ↑(Fintype.card F) + (↑(2 ^ params.d - e - 1) / 2 ^ params.d) ^ params.q

Explicit-parameter Guruswami–Sudan step toward summed interactive soundness of single-word friIOP.

theorem Cslib.Crypto.Protocols.FRI.weightedLineGapPerRound_of_johnson {F : Type} [Field F] [DecidableEq F] (params : FRIParams F) {e mJ : ℕ} (hmJ : 1 ≤ mJ) (he : ↑e / 2 ^ params.d ≤ 1 - √(↑(params.dim 0) / 2 ^ params.d) - √(↑(params.dim 0) / 2 ^ params.d) / (2 * ↑mJ)) :
WeightedLineGapPerRound params (2 ^ params.d - e - 1) (friJohnsonRoundBound params mJ)

Original explicit-constant per-round Johnson-bound WeightedLineGapPerRound across all m single-word binary FRI folding rounds up to δ ≤ 1 - √ρ - √ρ / (2 * mJ) (corollary of weightedCurveGapPerRound_of_johnson).

theorem Cslib.Crypto.Protocols.FRI.weightedLineGapBound_of_johnson {F : Type} [Field F] [DecidableEq F] (params : FRIParams F) {e mJ : ℕ} (hmJ : 1 ≤ mJ) (he : ↑e / 2 ^ params.d ≤ 1 - √(↑(params.dim 0) / 2 ^ params.d) - √(↑(params.dim 0) / 2 ^ params.d) / (2 * ↑mJ)) :
WeightedLineGapBound params (2 ^ params.d - e - 1) (friJohnsonCommitBound params mJ)

Original explicit-constant uniform Johnson-bound WeightedLineGapBound for all m single-word FRI folding rounds up to δ ≤ 1 - √ρ - √ρ / (2 * mJ) (friJohnsonCommitBound params mJ), obtained as a monotonicity corollary of weightedLineGapPerRound_of_johnson and friJohnsonRoundBound_le_commitBound.

noncomputable def Cslib.Crypto.Protocols.FRI.friJohnsonEtaCommitBound {F : Type} [Field F] (params : FRIParams F) (η : ℝ) :

Conservative uniform per-round commit-phase exceptional-scalar budget for 2-to-1 FRI in the η-gap Johnson regime ((e : ℝ) / 2 ^ d ≤ 1 - √ρ - η, 0 < η): ⌊57600 * (2 ^ d) ^ 3 / (dim 0 * η ^ 6)⌋₊ (using this library's original explicit Siegel constant 900 * 64 = 57600 and η directly rather than min(η, √ρ / 20) in Eq. (1.3)).

theorem Cslib.Crypto.Protocols.FRI.weightedLineGapBound_of_johnson_eta {F : Type} [Field F] [DecidableEq F] (params : FRIParams F) {e : ℕ} {η : ℝ} (hη : 0 < η) (he : ↑e / 2 ^ params.d ≤ 1 - √(↑(params.dim 0) / 2 ^ params.d) - η) :
WeightedLineGapBound params (2 ^ params.d - e - 1) (friJohnsonEtaCommitBound params η)

Original explicit-constant η-gap uniform WeightedLineGapBound across all m binary FRI folding rounds up to (e : ℝ) / 2 ^ d ≤ 1 - √ρ - η (0 < η), corollary of weightedCurveGapBound_of_johnson_eta.

theorem Cslib.Crypto.Protocols.FRI.friCommitGame_le_of_johnson {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRIParams F) {e mJ : ℕ} (hmJ : 1 ≤ mJ) (he : ↑e / 2 ^ params.d ≤ 1 - √(↑(params.dim 0) / 2 ^ params.d) - √(↑(params.dim 0) / 2 ^ params.d) / (2 * ↑mJ)) {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 ≤ ENNReal.ofReal (friJohnsonCommitError params mJ)

Original explicit-constant Johnson summed commit-phase soundness of single-word friIOP (using friJohnsonCommitError params mJ, bounded independently of m).

theorem Cslib.Crypto.Protocols.FRI.friIOP_interactiveGame_le_of_johnson {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRIParams F) {e mJ : ℕ} (hmJ : 1 ≤ mJ) (he : ↑e / 2 ^ params.d ≤ 1 - √(↑(params.dim 0) / 2 ^ params.d) - √(↑(params.dim 0) / 2 ^ params.d) / (2 * ↑mJ)) {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 ≤ ENNReal.ofReal (friJohnsonCommitError params mJ) + (↑(2 ^ params.d - e - 1) / 2 ^ params.d) ^ params.q

Original explicit-constant Johnson summed interactive soundness of single-word friIOP (using friJohnsonCommitError params mJ plus query error ((2 ^ d - e - 1) / 2 ^ d) ^ q).

theorem Cslib.Crypto.Protocols.FRI.friIOP_rbrSound_of_johnson {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRIParams F) {e mJ : ℕ} (hmJ : 1 ≤ mJ) (he : ↑e / 2 ^ params.d ≤ 1 - √(↑(params.dim 0) / 2 ^ params.d) - √(↑(params.dim 0) / 2 ^ params.d) / (2 * ↑mJ)) :
BCS.IOPRoundByRoundSoundness (friIOP params) (params.proximityLang e) (friDoomed params (2 ^ params.d - e - 1)) (friGoodStep params (2 ^ params.d - e - 1)) ∧ ∀ 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 (friJohnsonCommitBound params mJ)

Original explicit-constant Johnson round-by-round soundness of single-word friIOP (in the setting of [BSBHR18] and [BenSassonCarmonIshaiKoppartySaraf2020, Theorems 1.4, 5.1, and 7.2]).

theorem Cslib.Crypto.Protocols.FRI.friBCS_romSoundness_bound_of_johnson {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRIParams F) {e mJ : ℕ} (hmJ : 1 ≤ mJ) (he : ↑e / 2 ^ params.d ≤ 1 - √(↑(params.dim 0) / 2 ^ params.d) - √(↑(params.dim 0) / 2 ^ params.d) / (2 * ↑mJ)) {encSym : F → List Bool} {decSym : List Bool → F} (hdec : Function.LeftInverse decSym encSym) (σ : ℕ) {P : OracleComp (BCS.BCSROMSpec (BCS.OracleTable params.d F) (FRIChal F params.d params.q)) (BCS.OracleTable params.d F × BCS.BCSProof (params.m + 1) F)} {t_FS Q_MT : ℕ} (hFS : OracleComp.IsCostBounded BCS.bcsFSCost P t_FS) (hMT : OracleComp.IsCostBounded BCS.bcsMTCost (BCS.bcsSoundnessProg (friIOP params) encSym (params.proximityLang e) P) Q_MT) :
(BCS.bcsSoundnessGame (friIOP params) encSym (params.proximityLang e) P σ) true ≤ ↑(t_FS + (params.m + 1)) * (friRBRError params e (friJohnsonCommitBound params mJ) + ↑(t_FS + (params.m + 1)) * (1 / ↑(Fintype.card (FRIChal F params.d params.q)))) + ↑Q_MT * (↑(3 * Q_MT + (params.m + 1) * (t_FS + (params.m + 1))) * (1 / 2 ^ σ))

Original explicit-constant Johnson adaptive two-channel BCS-FRI ROM soundness ([BSCS16]; [CY24]), composing weightedLineGapBound_of_johnson with friBCS_romSoundness_bound_of_weightedLineGap.

theorem Cslib.Crypto.Protocols.FRI.friBCS_romSoundness_bound_of_prover_verifier_of_johnson {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRIParams F) {e mJ : ℕ} (hmJ : 1 ≤ mJ) (he : ↑e / 2 ^ params.d ≤ 1 - √(↑(params.dim 0) / 2 ^ params.d) - √(↑(params.dim 0) / 2 ^ params.d) / (2 * ↑mJ)) {encSym : F → List Bool} {decSym : List Bool → F} (hdec : Function.LeftInverse decSym encSym) (σ : ℕ) {P : OracleComp (BCS.BCSROMSpec (BCS.OracleTable params.d F) (FRIChal F params.d params.q)) (BCS.OracleTable params.d F × BCS.BCSProof (params.m + 1) F)} {t_MT t_FS L_path : ℕ} (hMT : OracleComp.IsCostBounded BCS.bcsMTCost P t_MT) (hFS : OracleComp.IsCostBounded BCS.bcsFSCost P t_FS) (hops : ∀ (x : BCS.OracleTable params.d F) (prf : BCS.BCSProof (params.m + 1) F), (x, prf) ∈ P.support → ∀ op ∈ prf.openings, op.path.length ≤ L_path) :
(BCS.bcsSoundnessGame (friIOP params) encSym (params.proximityLang e) P σ) true ≤ ↑(t_FS + (params.m + 1)) * (friRBRError params e (friJohnsonCommitBound params mJ) + ↑(t_FS + (params.m + 1)) * (1 / ↑(Fintype.card (FRIChal F params.d params.q)))) + ↑(t_MT + params.proofOracleQueries * (L_path + 1)) * (↑(3 * (t_MT + params.proofOracleQueries * (L_path + 1)) + (params.m + 1) * (t_FS + (params.m + 1))) * (1 / 2 ^ σ))

Original explicit-constant Johnson adaptive two-channel BCS-FRI ROM soundness with separate prover/verifier Merkle budgets ([BSCS16]; [CY24]).