All proofs
Project-declaredLean 4.31.0 · mathlib@fabf563a7c95

Function binding game ext eq function binding game

KZG.CommitmentScheme.function_binding_game_ext_eq_function_binding_game

Plain-language statement

Transition 1: extending output for proofs and commitment preserves the condition

Exact Lean statement

lemma function_binding_game_ext_eq_function_binding_game {n L : ℕ} {AuxState : Type}
    [SampleableType G₁]
    (adversary : KzgFunctionBindingAdversary p G₁ G₂ n unifSpec L AuxState) :
    Pr[Commitment.functionBindingCondition (Data := Fin (n + 1) → ZMod p) |
      Commitment.functionBindingGame (init := pure ∅) (impl := randomOracle) (hn := rfl)
        (AuxState := AuxState)
        (scheme := kzg (n := n) (g₁ := g₁) (g₂ := g₂) (pairing := pairing))
        (adversary := adversary)]
    = Pr[functionBindingCondExt n L |
      functionBindingGameExt (g₁ := g₁) (g₂ := g₂) AuxState adversary
        (kzg (n := n) (g₁ := g₁) (g₂ := g₂) (pairing := pairing))]

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
lemma function_binding_game_ext_eq_function_binding_game {n L : } {AuxState : Type}    [SampleableType G₁]    (adversary : KzgFunctionBindingAdversary p G₁ G₂ n unifSpec L AuxState) :    Pr[Commitment.functionBindingCondition (Data := Fin (n + 1)  ZMod p) |      Commitment.functionBindingGame (init := pure ∅) (impl := randomOracle) (hn := rfl)        (AuxState := AuxState)        (scheme := kzg (n := n) (g₁ := g₁) (g₂ := g₂) (pairing := pairing))        (adversary := adversary)]    = Pr[functionBindingCondExt n L |      functionBindingGameExt (g₁ := g₁) (g₂ := g₂) AuxState adversary        (kzg (n := n) (g₁ := g₁) (g₂ := g₂) (pairing := pairing))] := by  -- Define the projection from the extended output tuple to the basic output tuple.  let proj : (ZMod p × (Vector G₁ (n + 1) × Vector G₂ 2) × G₁ ×      (Fin L  ZMod p) × (Fin L  ZMod p) × (Fin L  Bool) × (Fin L  G₁))       ((queryOf : Fin L  OracleInterface.Query (Fin (n + 1)  ZMod p)) ×        ((i : Fin L)  OracleInterface.Response (queryOf i)) × (Fin L  Bool)) :=    fun x => x.2.2.2.1, x.2.2.2.2.1, x.2.2.2.2.2.1  -- The extended condition factors through the projection.  have hcond_eq :      (functionBindingCondExt n L : _  Prop) =        (Commitment.functionBindingCondition (Data := Fin (n + 1)  ZMod p)) ∘ proj := by    funext x    rcases x with _, _, _, _, _, _, _    rfl  rw [hcond_eq]  -- Apply the OptionT bridge lemma with the run-level equality proved inline.  apply OptionT.probEvent_eq_of_run_map_eq _ _ proj    (Commitment.functionBindingCondition (Data := Fin (n + 1)  ZMod p))  simp only [Commitment.functionBindingGame, functionBindingGameExt, kzg, OptionT.run,    OptionT.mk]  rw [pure_bind]  have hsample :      (simulateQ randomOracle (Groups.sampleNonzeroZMod (p := p))).run' ∅ =        Groups.sampleNonzeroZMod (p := p) :=    Groups.simulateQ_randomOracle_sampleNonzeroZMod (p := p)  have hkeygen :      (simulateQ randomOracle (do        let a  Groups.sampleNonzeroZMod (p := p)        pure (Groups.PowerSrs.generate (g₁ := g₁) (g₂ := g₂) n a,          Groups.PowerSrs.generate (g₁ := g₁) (g₂ := g₂) n a))).run' ∅        =      (fun a => (Groups.PowerSrs.generate (g₁ := g₁) (g₂ := g₂) n a,        Groups.PowerSrs.generate (g₁ := g₁) (g₂ := g₂) n a))          <$> Groups.sampleNonzeroZMod (p := p) := by    calc      (simulateQ randomOracle (do        let a  Groups.sampleNonzeroZMod (p := p)        pure (Groups.PowerSrs.generate (g₁ := g₁) (g₂ := g₂) n a,          Groups.PowerSrs.generate (g₁ := g₁) (g₂ := g₂) n a))).run' ∅          = (fun a => (Groups.PowerSrs.generate (g₁ := g₁) (g₂ := g₂) n a,              Groups.PowerSrs.generate (g₁ := g₁) (g₂ := g₂) n a))              <$> (simulateQ randomOracle (Groups.sampleNonzeroZMod (p := p))).run' ∅ := by            rw [ StateT.run'_map_comm,  simulateQ_map]            rfl      _ = (fun a => (Groups.PowerSrs.generate (g₁ := g₁) (g₂ := g₂) n a,              Groups.PowerSrs.generate (g₁ := g₁) (g₂ := g₂) n a))              <$> Groups.sampleNonzeroZMod (p := p) := by            rw [hsample]  rw [hkeygen]  simp only [map_eq_bind_pure_comp, bind_assoc, pure_bind, Function.comp]  congr 1  funext τ  rw [ map_eq_bind_pure_comp,  StateT.run'_map_comm,  simulateQ_map]  simp only [map_eq_bind_pure_comp, bind_assoc, pure_bind, Function.comp]  congr 1  funext x  apply congr_fun  apply congr_arg  congr 1  funext x_1  rw [Reduction.allVerdicts_eq_map_allOutputs_fst (fun result =>    (result.1.1 0 : G₁))]  simp only [map_eq_bind_pure_comp, bind_assoc, Option.map_bind]  congr 1  funext resultPairs  cases resultPairs <;> rfl
Project
ArkLib
License
Apache-2.0
Commit
fad5cbf80877
Source
ArkLib/Commitments/Functional/KZG/FunctionBinding/Basic.lean:192-267

Reuse this declaration

Bring the exact result into your workflow

The import identifies the source module. Your project still needs the pinned package dependency shown on this page.

What this badge means

This completion status comes from the project or community source. It has not yet been represented here as an independent rebuild and axiom audit.

Continue in this project

Related declarations

Project-declaredLean 4.31.0

Affine gaps lifted to interleaved codes

affine_gaps_lifted_to_interleaved_codes

Project documentation

This lemma proves the final algebraic step in the DG25 Theorem 3.1 proof. It shows that if R > e + 1, then e * (R / (R - 1)) < e + 1. The intuition is that the fraction R / (R - 1) is always greater than 1, but as R gets larger, it gets closer to 1. The hypothesis R > e + 1 provides a strong enough bound to ensure the product e * (fraction) do...

cryptographyproof systemscoding theory

Source project: ArkLib

Person-level attribution pending.

View proof record
Project-declaredLean 4.31.0

Gadget Decompose coeff

ArkLib.Lattices.Ajtai.gadgetDecompose_coeff

Plain-language statement

The k-th coefficient (k < deg φ) of a gadget-decomposition block is exactly the corresponding digit of the corresponding input coefficient.

cryptographyproof systemscoding theory

Source project: ArkLib

Person-level attribution pending.

View proof record
Project-declaredLean 4.31.0

Gadget Decompose lawful

ArkLib.Lattices.Ajtai.gadgetDecompose_lawful

Plain-language statement

The base-b gadget decomposition is a lawful gadget decomposition.

cryptographyproof systemscoding theory

Source project: ArkLib

Person-level attribution pending.

View proof record