Documentation

CslibFrontier.Crypto.Protocols.FRI.Soundness.BinaryDefs

Binary 2-to-1 FRI Transcript State, Round-by-Round Predicates, and Line-Gap Contracts #

Defines the binary 2-to-1 FRIParams specialization's transcript target words, fiber weights, acceptance predicates, doomed/good-step predicates, line proximity-gap and escape contracts (WeightedLineGapPerRound, WeightedLineGapBound, WeightedLineEscapePerRound, UniqueLineGapHypothesis), error abbreviations, and commit-phase game friCommitGame.

def Cslib.Crypto.Protocols.FRI.friTargetWord {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)) (i : ℕ) :
i ≤ params.m → Fin (2 ^ (params.d - i)) → F

Expected round-i word along a binary transcript prefix pref: stmt at round 0, and the 2-to-1 coset folding of prefOracle pref i at prefFoldScalar pref i for round i + 1.

def Cslib.Crypto.Protocols.FRI.friPreWeight {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 : ℕ) :
i ≤ params.m → Fin (2 ^ (params.d - i)) → ℕ

Pre-filter integer fiber weight W̃_i : Fin (2 ^ (d - i)) → ℕ along a binary transcript prefix pref, prior to applying the round-i oracle consistency check π_i = friTargetWord ... i.

def Cslib.Crypto.Protocols.FRI.friOracleFilterWeight {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))) :

Filtered round-i weight for an explicit prover oracle π in binary FRI.

def Cslib.Crypto.Protocols.FRI.friNextWeight {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)))) :

Pushed round-(i + 1) weight induced by an explicit prover oracle π at round i in binary FRI.

def Cslib.Crypto.Protocols.FRI.friPrefixPasses {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)) (i : ℕ) (s : Fin (2 ^ params.d)) :

Prefix acceptance predicate for a starting index s : Fin (2 ^ d) through folding rounds 0, ..., i - 1 along a binary transcript pref.

Instances For
    def Cslib.Crypto.Protocols.FRI.friTranscriptSingleAccepts {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)) (s : Fin (2 ^ params.d)) :

    Full single-query acceptance predicate evaluated on a binary transcript list pref at starting index s : Fin (2 ^ d).

    def Cslib.Crypto.Protocols.FRI.friFinalPasses {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)) :

    Final-round acceptance predicate for a length-m binary prefix pref and final oracle πFinal.

    Instances For
      @[instance_reducible]
      instance Cslib.Crypto.Protocols.FRI.instDecidableFriPrefixPasses {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 : ℕ) (s : Fin (2 ^ params.d)) :
      Decidable (friPrefixPasses params stmt pref i s)

      Decidability of the binary prefix-acceptance predicate friPrefixPasses.

      @[instance_reducible]
      instance Cslib.Crypto.Protocols.FRI.instDecidableFriFinalPasses {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)) (πFinal : BCS.OracleTable params.d F) (s : Fin (2 ^ params.d)) :
      Decidable (friFinalPasses params stmt pref πFinal s)

      Decidability of the final-round binary acceptance predicate friFinalPasses.

      def Cslib.Crypto.Protocols.FRI.friCommitDoomed {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)) (i : ℕ) (hi : i ≤ params.m) :

      Binary commit-round doomed predicate at round i ≤ m.

      def Cslib.Crypto.Protocols.FRI.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)) :

      Binary FRI round-by-round doomed-state predicate.

      def Cslib.Crypto.Protocols.FRI.friGoodStep {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) :

      Binary FRI round-by-round good-step predicate.

      def Cslib.Crypto.Protocols.FRI.WeightedLineGapPerRound {F : Type} [Field F] [DecidableEq F] (params : FRIParams F) (B : ℕ) (B_commit : Fin params.m → ℕ) :

      Polymorphic per-round weighted line proximity-gap contract across all m binary FRI folding rounds at agreement threshold B and per-round exceptional-scalar budgets B_commit : Fin params.m → ℕ.

      theorem Cslib.Crypto.Protocols.FRI.WeightedLineGapPerRound.mono {F : Type} [Field F] [DecidableEq F] {params : FRIParams F} {B : ℕ} {B₁ B₂ : Fin params.m → ℕ} (hgap : WeightedLineGapPerRound params B B₁) (hle : ∀ (i : Fin params.m), B₁ i ≤ B₂ i) :

      Pointwise monotonicity of WeightedLineGapPerRound in the per-round scalar budget.

      Polymorphic uniform weighted line proximity-gap contract for all m binary FRI folding rounds at agreement threshold B and uniform bad-scalar budget B_commit.

      def Cslib.Crypto.Protocols.FRI.WeightedLineEscapePerRound {F : Type} [Field F] [Fintype F] [DecidableEq F] (params : FRIParams F) (B : ℕ) (ε_commit : Fin params.m → ENNReal) :

      Polymorphic per-round weighted line escape-probability contract across all m binary FRI folding rounds at agreement threshold B and per-round escape probability budgets ε_commit : Fin params.m → ℝ≥0∞.

      theorem Cslib.Crypto.Protocols.FRI.WeightedLineEscapePerRound.mono {F : Type} [Field F] [Fintype F] [DecidableEq F] {params : FRIParams F} {B : ℕ} {ε₁ ε₂ : Fin params.m → ENNReal} (hesc : WeightedLineEscapePerRound params B ε₁) (hle : ∀ (i : Fin params.m), ε₁ i ≤ ε₂ i) :

      Pointwise monotonicity of WeightedLineEscapePerRound in the per-round escape budget.

      @[reducible, inline]
      noncomputable abbrev Cslib.Crypto.Protocols.FRI.friRoundEscape {F : Type} [Field F] (params : FRIParams F) (e : ℕ) (ε_commit : Fin params.m → ENNReal) (j : Fin (params.m + 1)) :

      Per-round escape budget vector for single-word (m + 1)-round friIOP.

      @[reducible, inline]
      noncomputable abbrev Cslib.Crypto.Protocols.FRI.friSumError {F : Type} [Field F] (params : FRIParams F) (e : ℕ) (ε_commit : Fin params.m → ENNReal) :

      Summed interactive binary FRI soundness error (∑ i : Fin m, ε_commit i) + ((2 ^ d - e - 1) / 2 ^ d) ^ q.

      @[reducible, inline]
      noncomputable abbrev Cslib.Crypto.Protocols.FRI.friSupRBRError {F : Type} [Field F] (params : FRIParams F) (e : ℕ) (ε_commit : Fin params.m → ENNReal) :

      Uniform per-round escape error sup_j (friRoundEscape params e ε_commit j).

      @[reducible, inline]
      noncomputable abbrev Cslib.Crypto.Protocols.FRI.friRBRError {F : Type} [Field F] [Fintype F] (params : FRIParams F) (e B_commit : ℕ) :

      Uniform per-round escape error for binary FRI.

      noncomputable def Cslib.Crypto.Protocols.FRI.friCommitGame {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)) :

      Single-word binary FRI commit-phase game.

      Unweighted line proximity-gap hypothesis across all m binary FRI folding rounds at unique-decoding radii e / 2 ^ (i + 1) (matching [BenSassonCarmonIshaiKoppartySaraf2020, Theorem 4.1]).