Documentation

CslibFrontier.Computability.Interactive.AuxZK

Auxiliary-input zero knowledge and product composition for interactive reductions #

This module extends the public-coin interactive reduction core (Cslib.Interactive) in two directions from the zero-knowledge roadmap:

  1. Auxiliary-input zero knowledge ([Gol01], §4.3.3, Definition 4.3.10; [AB09], Chapter 9):
  2. Product (AND) composition of interactive reductions (Verifier.seqProd, Reduction.seqProd) over s₁ ++ s₂ for product relations relProd (alongside the disjunctive relation relDisj):

Main definitions #

Main results #

References #

Part 1: Auxiliary-input zero knowledge #

@[reducible, inline]
noncomputable abbrev Cslib.Interactive.Reduction.honestTranscript {s : Spec} {StmtIn WitIn StmtOut WitOut : Type} (R : Reduction OracleSpec.empty OracleSpec.empty s StmtIn WitIn StmtOut WitOut) (x : StmtIn) (w : WitIn) :

The distribution of transcripts in an honest plain-model run of R on (x, w).

theorem Cslib.Interactive.Reduction.honestTranscript_eq_plainLaw {s : Spec} {StmtIn WitIn StmtOut WitOut : Type} (R : Reduction OracleSpec.empty OracleSpec.empty s StmtIn WitIn StmtOut WitOut) (x : StmtIn) (w : WitIn) :

In the plain model, R.honestTranscript x w is the first marginal of running R.prover x w against R.verifier.samplers.

def Cslib.Interactive.Reduction.PerfectHVZK {s : Spec} {StmtIn WitIn StmtOut WitOut : Type} (R : Reduction OracleSpec.empty OracleSpec.empty s StmtIn WitIn StmtOut WitOut) (relIn : StmtIn → WitIn → Prop) (Sim : StmtIn → ProbComp s.Transcript) :

Perfect honest-verifier zero knowledge in the plain model: on every valid (x, w) in relIn, the simulator's transcript law equals the honest transcript law.

theorem Cslib.Interactive.Reduction.PerfectHVZK.hvzk {s : Spec} {StmtIn WitIn StmtOut WitOut : Type} {R : Reduction OracleSpec.empty OracleSpec.empty s StmtIn WitIn StmtOut WitOut} {relIn : StmtIn → WitIn → Prop} {Sim : StmtIn → ProbComp s.Transcript} (h : R.PerfectHVZK relIn Sim) :
R.HVZK relIn Sim 0

Perfect HVZK implies 0-error statistical HVZK.

theorem Cslib.Interactive.Reduction.HVZK.mono {s : Spec} {StmtIn WitIn StmtOut WitOut : Type} {R : Reduction OracleSpec.empty OracleSpec.empty s StmtIn WitIn StmtOut WitOut} {relIn : StmtIn → WitIn → Prop} {Sim : StmtIn → ProbComp s.Transcript} {ε δ : ENNReal} (h : R.HVZK relIn Sim ε) (hle : ε ≤ δ) :
R.HVZK relIn Sim δ

Enlarging the statistical error preserves Reduction.HVZK.

def Cslib.Interactive.Reduction.AuxHVZK {s : Spec} {StmtIn WitIn StmtOut WitOut Aux : Type} (R : Reduction OracleSpec.empty OracleSpec.empty s StmtIn WitIn StmtOut WitOut) (relIn : StmtIn → WitIn → Prop) (Sim : StmtIn → Aux → ProbComp s.Transcript) (ε : StmtIn → Aux → ENNReal) :

Auxiliary-input honest-verifier zero knowledge ([Gol01], §4.3.3, Definition 4.3.10 for an honest verifier) with statistical error ε x z, in the plain model: on every (x, w) in relIn and every auxiliary input z : Aux, the simulator Sim x z produces transcripts within statistical distance ε x z of the honest transcript distribution.

def Cslib.Interactive.Reduction.PerfectAuxHVZK {s : Spec} {StmtIn WitIn StmtOut WitOut Aux : Type} (R : Reduction OracleSpec.empty OracleSpec.empty s StmtIn WitIn StmtOut WitOut) (relIn : StmtIn → WitIn → Prop) (Sim : StmtIn → Aux → ProbComp s.Transcript) :

Perfect auxiliary-input honest-verifier zero knowledge in the plain model: on every (x, w) in relIn and every auxiliary input z : Aux, the simulator Sim x z reproduces the honest transcript distribution exactly.

theorem Cslib.Interactive.Reduction.PerfectAuxHVZK.auxHVZK {s : Spec} {StmtIn WitIn StmtOut WitOut Aux : Type} {R : Reduction OracleSpec.empty OracleSpec.empty s StmtIn WitIn StmtOut WitOut} {relIn : StmtIn → WitIn → Prop} {Sim : StmtIn → Aux → ProbComp s.Transcript} (h : R.PerfectAuxHVZK relIn Sim) :
R.AuxHVZK relIn Sim fun (x : StmtIn) (x_1 : Aux) => 0

Perfect auxiliary-input HVZK implies 0-error statistical AuxHVZK.

theorem Cslib.Interactive.Reduction.AuxHVZK.mono {s : Spec} {StmtIn WitIn StmtOut WitOut Aux : Type} {R : Reduction OracleSpec.empty OracleSpec.empty s StmtIn WitIn StmtOut WitOut} {relIn : StmtIn → WitIn → Prop} {Sim : StmtIn → Aux → ProbComp s.Transcript} {ε δ : StmtIn → Aux → ENNReal} (h : R.AuxHVZK relIn Sim ε) (hle : ∀ (x : StmtIn) (z : Aux), ε x z ≤ δ x z) :
R.AuxHVZK relIn Sim δ

Enlarging the error bound pointwise preserves Reduction.AuxHVZK.

theorem Cslib.Interactive.Reduction.HVZK.auxHVZK {s : Spec} {StmtIn WitIn StmtOut WitOut Aux : Type} {R : Reduction OracleSpec.empty OracleSpec.empty s StmtIn WitIn StmtOut WitOut} {relIn : StmtIn → WitIn → Prop} {Sim : StmtIn → ProbComp s.Transcript} {ε : ENNReal} (h : R.HVZK relIn Sim ε) :
R.AuxHVZK relIn (fun (x : StmtIn) (x_1 : Aux) => Sim x) fun (x : StmtIn) (x_1 : Aux) => ε

Every HVZK reduction is automatically AuxHVZK: an honest-verifier simulator only needs the statement x and can ignore the auxiliary input z.

theorem Cslib.Interactive.Reduction.PerfectHVZK.perfectAuxHVZK {s : Spec} {StmtIn WitIn StmtOut WitOut Aux : Type} {R : Reduction OracleSpec.empty OracleSpec.empty s StmtIn WitIn StmtOut WitOut} {relIn : StmtIn → WitIn → Prop} {Sim : StmtIn → ProbComp s.Transcript} (h : R.PerfectHVZK relIn Sim) :
R.PerfectAuxHVZK relIn fun (x : StmtIn) (x_1 : Aux) => Sim x

Every PerfectHVZK reduction is automatically PerfectAuxHVZK by ignoring the auxiliary input z.

theorem Cslib.Interactive.Reduction.AuxHVZK.hvzk {s : Spec} {StmtIn WitIn StmtOut WitOut Aux : Type} {R : Reduction OracleSpec.empty OracleSpec.empty s StmtIn WitIn StmtOut WitOut} {relIn : StmtIn → WitIn → Prop} {Sim : StmtIn → Aux → ProbComp s.Transcript} {ε : StmtIn → Aux → ENNReal} {ε₀ : ENNReal} (h : R.AuxHVZK relIn Sim ε) (z₀ : Aux) (hle : ∀ (x : StmtIn), ε x z₀ ≤ ε₀) :
R.HVZK relIn (fun (x : StmtIn) => Sim x z₀) ε₀

Instantiating an AuxHVZK simulator at a fixed auxiliary input z₀ yields HVZK when the error bound at z₀ is at most ε.

theorem Cslib.Interactive.Reduction.PerfectAuxHVZK.perfectHVZK {s : Spec} {StmtIn WitIn StmtOut WitOut Aux : Type} {R : Reduction OracleSpec.empty OracleSpec.empty s StmtIn WitIn StmtOut WitOut} {relIn : StmtIn → WitIn → Prop} {Sim : StmtIn → Aux → ProbComp s.Transcript} (h : R.PerfectAuxHVZK relIn Sim) (z₀ : Aux) :
R.PerfectHVZK relIn fun (x : StmtIn) => Sim x z₀

Instantiating a PerfectAuxHVZK simulator at any z₀ : Aux yields PerfectHVZK.

theorem Cslib.Interactive.Reduction.AuxHVZK.coe_advantage_le {s : Spec} {StmtIn WitIn StmtOut WitOut Aux : Type} {R : Reduction OracleSpec.empty OracleSpec.empty s StmtIn WitIn StmtOut WitOut} {relIn : StmtIn → WitIn → Prop} {Sim : StmtIn → Aux → ProbComp s.Transcript} {ε : StmtIn → Aux → ENNReal} (h : R.AuxHVZK relIn Sim ε) (D : StmtIn → Aux → s.Transcript → Crypto.Game) {x : StmtIn} {w : WitIn} (z : Aux) (hxw : relIn x w) :
↑(Crypto.Game.advantage ((R.honestTranscript x w).bind (D x z)) ((Sim x z).eval.bind (D x z))) ≤ ε x z

Under AuxHVZK, any randomized Boolean distinguisher D : StmtIn → Aux → Transcript s → Game (receiving the statement, the auxiliary input, and the transcript) has distinguishing advantage at most ε x z on every valid (x, w).

Malicious-verifier auxiliary-input zero knowledge in the plain model #

@[reducible]

A strategy of the verifier's role over the rounds s, in the monad m, ending with an output of type α (its view). It receives each prover message and chooses each challenge.

def Cslib.Interactive.runAgainst {m : Type → Type} [Monad m] {α β : Type} (s : Spec) :
ProverStrategy m s α → VerifierStrategy m s β → m (s.Transcript × α × β)

Run a prover strategy against a verifier strategy, returning the transcript and both outputs.

noncomputable def Cslib.Interactive.Reduction.viewOf {s : Spec} {StmtIn WitIn StmtOut WitOut Aux View : Type} (R : Reduction OracleSpec.empty OracleSpec.empty s StmtIn WitIn StmtOut WitOut) (Vstar : StmtIn → Aux → ProbOracleComp OracleSpec.empty (VerifierStrategy (ProbOracleComp OracleSpec.empty) s View)) (x : StmtIn) (w : WitIn) (z : Aux) :
PMF View

The law of a malicious verifier's view after interacting with the honest prover of R on (x, w) and auxiliary input z : Aux.

def Cslib.Interactive.Reduction.ZK {s : Spec} {StmtIn WitIn StmtOut WitOut Aux View : Type} (R : Reduction OracleSpec.empty OracleSpec.empty s StmtIn WitIn StmtOut WitOut) (relIn : StmtIn → WitIn → Prop) (Sim : (StmtIn → Aux → ProbOracleComp OracleSpec.empty (VerifierStrategy (ProbOracleComp OracleSpec.empty) s View)) → StmtIn → Aux → ProbComp View) (ε : StmtIn → Aux → ENNReal) :

Statistical malicious-verifier auxiliary-input zero knowledge, with an unbounded simulator and verifier, in the plain model: for every malicious verifier Vstar, every valid (x, w) in relIn, and every auxiliary input z : Aux, the simulator Sim Vstar x z reproduces Vstar's view within statistical distance ε x z. Neither Vstar nor Sim is required to be efficient, and closeness is statistical, so this is not the computational auxiliary-input definition of [Gol01], §4.3.3, Definition 4.3.10, whose verifiers and simulators are efficient. An efficient variant is not formalized.

def Cslib.Interactive.VerifierStrategy.map {m : Type → Type} [Functor m] {α β : Type} (s : Spec) :
(α → β) → VerifierStrategy m s α → VerifierStrategy m s β

Map a function over the output view of a VerifierStrategy.

theorem Cslib.Interactive.plainLaw_runAgainst_map (s : Spec) {α β γ : Type} (f : β → γ) (p : ProverStrategy (ProbOracleComp OracleSpec.empty) s α) (v : VerifierStrategy (ProbOracleComp OracleSpec.empty) s β) :
plainLaw (runAgainst s p (VerifierStrategy.map s f v)) = PMF.map (fun (x : s.Transcript × α × β) => match x with | (τ, a, b) => (τ, a, f b)) (plainLaw (runAgainst s p v))

Running against a mapped VerifierStrategy maps the verifier's output in plainLaw.

The honest public-coin verifier's challenge samplers embedded as a VerifierStrategy whose output view is the complete transcript Transcript s.

Running a prover strategy against honestVerifierStrategy has the same law as runStrategy, recording the transcript as the verifier's output view as well.

theorem Cslib.Interactive.Reduction.viewOf_honestVerifierStrategy {s : Spec} {StmtIn WitIn StmtOut WitOut Aux : Type} (R : Reduction OracleSpec.empty OracleSpec.empty s StmtIn WitIn StmtOut WitOut) (x : StmtIn) (w : WitIn) (z : Aux) :
R.viewOf (fun (x : StmtIn) (x_1 : Aux) => pure (honestVerifierStrategy s R.verifier.samplers)) x w z = R.honestTranscript x w

The view of honestVerifierStrategy on (x, w) is R.honestTranscript x w.

theorem Cslib.Interactive.Reduction.ZK.auxHVZK {s : Spec} {StmtIn WitIn StmtOut WitOut Aux : Type} {R : Reduction OracleSpec.empty OracleSpec.empty s StmtIn WitIn StmtOut WitOut} {relIn : StmtIn → WitIn → Prop} {Sim : (StmtIn → Aux → ProbOracleComp OracleSpec.empty (VerifierStrategy (ProbOracleComp OracleSpec.empty) s s.Transcript)) → StmtIn → Aux → ProbComp s.Transcript} {ε : StmtIn → Aux → ENNReal} (h : R.ZK relIn Sim ε) :
R.AuxHVZK relIn (Sim fun (x : StmtIn) (x_1 : Aux) => pure (honestVerifierStrategy s R.verifier.samplers)) ε

Statistical malicious-verifier auxiliary-input zero knowledge (Reduction.ZK) implies honest-verifier auxiliary-input zero knowledge (Reduction.AuxHVZK).

Efficient and computational auxiliary-input HVZK #

@[reducible, inline]
abbrev Cslib.Interactive.Encoding.encStatementAux {I : Type} {sI : I → Spec} {StmtI : I → Type} (enc : Encoding I sI StmtI) :

Family index, encoded statement and auxiliary input word (i, x, z): the index under enc.index, then x and z as bit words (enc.index and x framed, z unframed). An auxiliary-input simulator reads this triple; a transcript distinguisher reads it after the unary parameter, paired with an encoded transcript, with an auxiliary input word in the z slot.

def Cslib.Interactive.AuxSimulatorRealizedBy {I : Type} {sI : I → Spec} {StmtI AuxI : I → Type} (enc : Encoding I sI StmtI) (encAux : (i : I) → AuxI i ↪ List Bool) (Sim : (i : I) → StmtI i → AuxI i → ProbComp (sI i).Transcript) (program : I × List Bool × List Bool → ProbComp (List Bool)) (δ : I → ENNReal) :

The program program realizes the auxiliary-input simulator family Sim on encodings up to statistical distance δ: on (i, enc.statement i x, encAux i z), its output is within δ i of the encoded transcript sampled by Sim i x z.

theorem Cslib.Interactive.AuxSimulatorRealizedBy.closeTo_run {I : Type} {sI : I → Spec} {StmtI WitI StmtOutI WitOutI AuxI : I → Type} {R : (i : I) → Reduction OracleSpec.empty OracleSpec.empty (sI i) (StmtI i) (WitI i) (StmtOutI i) (WitOutI i)} {rel : (i : I) → StmtI i → WitI i → Prop} {enc : Encoding I sI StmtI} {encAux : (i : I) → AuxI i ↪ List Bool} {Sim : (i : I) → StmtI i → AuxI i → ProbComp (sI i).Transcript} {program : I × List Bool × List Bool → ProbComp (List Bool)} {ε δ : I → ENNReal} (hzk : ∀ (i : I), (R i).AuxHVZK (rel i) (Sim i) fun (x : StmtI i) (x_1 : AuxI i) => ε i) (h : AuxSimulatorRealizedBy enc encAux Sim program δ) {i : I} {x : StmtI i} {w : WitI i} (z : AuxI i) (hxw : rel i x w) :
Probability.CloseTo (PMF.map (⇑(enc.transcript i)) ((R i).honestTranscript x w)) (program (i, (enc.statement i) x, (encAux i) z)).eval (ε i + δ i)

A program realizing an AuxHVZK simulator up to δ is ε i + δ i-close to the honest encoded transcript for every valid (x, w) and auxiliary input z.

theorem Cslib.Interactive.SimulatorRealizedBy.auxSimulatorRealizedBy {I : Type} {sI : I → Spec} {StmtI AuxI : I → Type} {enc : Encoding I sI StmtI} (encAux : (i : I) → AuxI i ↪ List Bool) {Sim : (i : I) → StmtI i → ProbComp (sI i).Transcript} {program : I × List Bool → ProbComp (List Bool)} {δ : I → ENNReal} (h : SimulatorRealizedBy enc Sim program δ) :
AuxSimulatorRealizedBy enc encAux (fun (i : I) (x : StmtI i) (x_1 : AuxI i) => Sim i x) (fun (x : I × List Bool × List Bool) => match x with | (i, xw, snd) => program (i, xw)) δ

A SimulatorRealizedBy witness lifts to AuxSimulatorRealizedBy by ignoring the encoded auxiliary input.

structure Cslib.Interactive.Reduction.EfficientAuxHVZK {I : Type} {sI : I → Spec} {StmtI WitI StmtOutI WitOutI AuxI : I → Type} (R : (i : I) → Reduction OracleSpec.empty OracleSpec.empty (sI i) (StmtI i) (WitI i) (StmtOutI i) (WitOutI i)) (rel : (i : I) → StmtI i → WitI i → Prop) (enc : Encoding I sI StmtI) (encAux : (i : I) → AuxI i ↪ List Bool) (Sim : (i : I) → StmtI i → AuxI i → ProbComp (sI i).Transcript) (ε δ : I → ENNReal) :

Efficient auxiliary-input honest-verifier zero knowledge, with simulation error ε and realization error δ. At every index i, Sim i is an ε i-AuxHVZK simulator for R i, and one uniform strict PPT program of (i, enc.statement i x, encAux i z) realizes the simulator family on encoded transcripts up to δ.

theorem Cslib.Interactive.Reduction.EfficientHVZK.efficientAuxHVZK {I : Type} {sI : I → Spec} {StmtI WitI StmtOutI WitOutI AuxI : I → Type} {R : (i : I) → Reduction OracleSpec.empty OracleSpec.empty (sI i) (StmtI i) (WitI i) (StmtOutI i) (WitOutI i)} {rel : (i : I) → StmtI i → WitI i → Prop} {enc : Encoding I sI StmtI} (encAux : (i : I) → AuxI i ↪ List Bool) {Sim : (i : I) → StmtI i → ProbComp (sI i).Transcript} {ε δ : I → ENNReal} (h : EfficientHVZK R rel enc Sim ε δ) :
EfficientAuxHVZK R rel enc encAux (fun (i : I) (x : StmtI i) (x_1 : AuxI i) => Sim i x) ε δ

Every EfficientHVZK reduction is automatically EfficientAuxHVZK: the simulator and its strict PPT realizing program ignore the auxiliary input.

structure Cslib.Interactive.Reduction.ComputationalHVZK {I : Type} {sI : I → Spec} {StmtI WitI StmtOutI WitOutI : I → Type} (R : (i : I) → Reduction OracleSpec.empty OracleSpec.empty (sI i) (StmtI i) (WitI i) (StmtOutI i) (WitOutI i)) (rel : (i : I) → StmtI i → WitI i → Prop) (enc : Encoding I sI StmtI) (program : I × List Bool → ProbComp (List Bool)) :

Computational honest-verifier zero knowledge over an indexed family of reductions: one uniform strict PPT simulator program on (i, enc.statement i x) produces encoded transcripts that are computationally indistinguishable from honest encoded transcripts across all polynomially bounded valid families (i n, x n, w n) and distinguisher auxiliary inputs z n, against every uniform strict PPT distinguisher clocked on ((1^n, i n, enc.statement (i n) (x n), z n), τ).

structure Cslib.Interactive.Reduction.ComputationalAuxHVZK {I : Type} {sI : I → Spec} {StmtI WitI StmtOutI WitOutI AuxI : I → Type} (R : (i : I) → Reduction OracleSpec.empty OracleSpec.empty (sI i) (StmtI i) (WitI i) (StmtOutI i) (WitOutI i)) (rel : (i : I) → StmtI i → WitI i → Prop) (enc : Encoding I sI StmtI) (encAux : (i : I) → AuxI i ↪ List Bool) (program : I × List Bool × List Bool → ProbComp (List Bool)) :

Computational auxiliary-input honest-verifier zero knowledge ([Gol01], §4.3.3, Definition 4.3.10 for an honest verifier) over an indexed family of reductions: one uniform strict PPT simulator program on (i, enc.statement i x, encAux i z) produces encoded transcripts that are computationally indistinguishable from honest encoded transcripts across all polynomially bounded valid families (i n, x n, w n, z n), against every uniform strict PPT distinguisher clocked on ((1^n, i n, enc.statement (i n) (x n), encAux (i n) (z n)), τ).

theorem Cslib.Interactive.Reduction.ComputationalHVZK.computationalAuxHVZK {I : Type} {sI : I → Spec} {StmtI WitI StmtOutI WitOutI AuxI : I → Type} {R : (i : I) → Reduction OracleSpec.empty OracleSpec.empty (sI i) (StmtI i) (WitI i) (StmtOutI i) (WitOutI i)} {rel : (i : I) → StmtI i → WitI i → Prop} {enc : Encoding I sI StmtI} (encAux : (i : I) → AuxI i ↪ List Bool) {program : I × List Bool → ProbComp (List Bool)} (h : ComputationalHVZK R rel enc program) :
ComputationalAuxHVZK R rel enc encAux fun (x : I × List Bool × List Bool) => match x with | (i, xw, snd) => program (i, xw)

Every ComputationalHVZK reduction is automatically ComputationalAuxHVZK: the simulator ignores the encoded auxiliary input while still handling auxiliary-input distinguishers.

theorem Cslib.Interactive.AuxSimulatorRealizedBy.computationalAuxHVZK {I : Type} {sI : I → Spec} {StmtI WitI StmtOutI WitOutI AuxI : I → Type} {R : (i : I) → Reduction OracleSpec.empty OracleSpec.empty (sI i) (StmtI i) (WitI i) (StmtOutI i) (WitOutI i)} {rel : (i : I) → StmtI i → WitI i → Prop} {enc : Encoding I sI StmtI} {encAux : (i : I) → AuxI i ↪ List Bool} {Sim : (i : I) → StmtI i → AuxI i → ProbComp (sI i).Transcript} {program : I × List Bool × List Bool → ProbComp (List Bool)} {ε δ : I → ENNReal} (hzk : ∀ (i : I), (R i).AuxHVZK (rel i) (Sim i) fun (x : StmtI i) (x_1 : AuxI i) => ε i) (hppt : Probability.IsPPTOn enc.encStatementAux Turing.MultiTapeTM.encBits program) (hreal : AuxSimulatorRealizedBy enc encAux Sim program δ) {η : I → NNReal} (hη : ∀ (i : I), ε i + δ i ≤ ↑(η i)) (hnegl : ∀ (idx : ℕ → I), (PolynomiallyBounded fun (n : ℕ) => (enc.index (idx n)).length) → Crypto.Negligible fun (n : ℕ) => η (idx n)) :
Reduction.ComputationalAuxHVZK R rel enc encAux program

Statistical AuxSimulatorRealizedBy with negligible total error ε i + δ i implies Reduction.ComputationalAuxHVZK (in fact against arbitrary, even unbounded distinguishers).

theorem Cslib.Interactive.Reduction.EfficientAuxHVZK.exists_computationalAuxHVZK {I : Type} {sI : I → Spec} {StmtI WitI StmtOutI WitOutI AuxI : I → Type} {R : (i : I) → Reduction OracleSpec.empty OracleSpec.empty (sI i) (StmtI i) (WitI i) (StmtOutI i) (WitOutI i)} {rel : (i : I) → StmtI i → WitI i → Prop} {enc : Encoding I sI StmtI} {encAux : (i : I) → AuxI i ↪ List Bool} {Sim : (i : I) → StmtI i → AuxI i → ProbComp (sI i).Transcript} {ε δ : I → ENNReal} (h : EfficientAuxHVZK R rel enc encAux Sim ε δ) {η : I → NNReal} (hη : ∀ (i : I), ε i + δ i ≤ ↑(η i)) (hnegl : ∀ (idx : ℕ → I), (PolynomiallyBounded fun (n : ℕ) => (enc.index (idx n)).length) → Crypto.Negligible fun (n : ℕ) => η (idx n)) :
∃ (program : I × List Bool × List Bool → ProbComp (List Bool)), ComputationalAuxHVZK R rel enc encAux program

Efficient statistical EfficientAuxHVZK implies ComputationalAuxHVZK whenever ε + δ is negligible along polynomially bounded index families (for instance when ε = 0 and δ = 0).

theorem Cslib.Interactive.Reduction.EfficientHVZK.exists_computationalHVZK_zero {I : Type} {sI : I → Spec} {StmtI WitI StmtOutI WitOutI : I → Type} {R : (i : I) → Reduction OracleSpec.empty OracleSpec.empty (sI i) (StmtI i) (WitI i) (StmtOutI i) (WitOutI i)} {rel : (i : I) → StmtI i → WitI i → Prop} {enc : Encoding I sI StmtI} {Sim : (i : I) → StmtI i → ProbComp (sI i).Transcript} (h : EfficientHVZK R rel enc Sim (fun (x : I) => 0) fun (x : I) => 0) :
∃ (program : I × List Bool → ProbComp (List Bool)), ComputationalHVZK R rel enc program

Efficient statistical EfficientHVZK with zero error (ε = 0, δ = 0) implies both ComputationalHVZK and ComputationalAuxHVZK.

Part 2: Product (AND) and disjunctive (OR) relations and product composition #

def Cslib.Interactive.relProd {S₁ W₁ S₂ W₂ : Type} (rel₁ : S₁ → W₁ → Prop) (rel₂ : S₂ → W₂ → Prop) :
S₁ × S₂ → W₁ × W₂ → Prop

The product (AND) of two relations: (x₁, x₂) is related to (w₁, w₂) when both components are related.

def Cslib.Interactive.relDisj {S₁ W₁ S₂ W₂ : Type} (rel₁ : S₁ → W₁ → Prop) (rel₂ : S₂ → W₂ → Prop) :
S₁ × S₂ → W₁ ⊕ W₂ → Prop

The disjunctive (OR) relation on product statements S₁ × S₂ with sum witnesses W₁ ⊕ W₂: Sum.inl w₁ witnesses x.1 in rel₁ and Sum.inr w₂ witnesses x.2 in rel₂.

@[simp]
theorem Cslib.Interactive.language_relProd {S₁ W₁ S₂ W₂ : Type} (rel₁ : S₁ → W₁ → Prop) (rel₂ : S₂ → W₂ → Prop) :
language (relProd rel₁ rel₂) = language rel₁ ×ˢ language rel₂

The language of a product relation is the Cartesian product of the component languages.

theorem Cslib.Interactive.notMem_language_relProd {S₁ W₁ S₂ W₂ : Type} {rel₁ : S₁ → W₁ → Prop} {rel₂ : S₂ → W₂ → Prop} {x : S₁ × S₂} :
x ∉ language (relProd rel₁ rel₂) ↔ x.1 ∉ language rel₁ ∨ x.2 ∉ language rel₂

A pair (x₁, x₂) is outside language (relProd rel₁ rel₂) iff x₁ ∉ language rel₁ or x₂ ∉ language rel₂.

@[simp]
theorem Cslib.Interactive.mem_language_relDisj {S₁ W₁ S₂ W₂ : Type} {rel₁ : S₁ → W₁ → Prop} {rel₂ : S₂ → W₂ → Prop} {x : S₁ × S₂} :
x ∈ language (relDisj rel₁ rel₂) ↔ x.1 ∈ language rel₁ ∨ x.2 ∈ language rel₂

A pair (x₁, x₂) belongs to language (relDisj rel₁ rel₂) iff x₁ ∈ language rel₁ or x₂ ∈ language rel₂.

def Cslib.Interactive.Verifier.liftFirst {ιV : Type} {oV : OracleSpec ιV} {s₁ : Spec} {S₁ S₁' S₂ : Type} (V₁ : Verifier oV s₁ S₁ S₁') :
Verifier oV s₁ (S₁ × S₂) (S₁' × S₂)

Lift a verifier V₁ on the first coordinate to a verifier on S₁ × S₂ that passes x.2 through unchanged.

def Cslib.Interactive.Verifier.liftSecond {ιV : Type} {oV : OracleSpec ιV} {s₂ : Spec} {S₁' S₂ S₂' : Type} (V₂ : Verifier oV s₂ S₂ S₂') :
Verifier oV s₂ (S₁' × S₂) (S₁' × S₂')

Lift a verifier V₂ on the second coordinate to a verifier on S₁' × S₂ that passes y.1 through unchanged.

def Cslib.Interactive.Verifier.seqProd {ιV : Type} {oV : OracleSpec ιV} {s₁ s₂ : Spec} {S₁ S₁' S₂ S₂' : Type} (V₁ : Verifier oV s₁ S₁ S₁') (V₂ : Verifier oV s₂ S₂ S₂') :
Verifier oV (s₁ ++ s₂) (S₁ × S₂) (S₁' × S₂')

Product composition of verifiers over s₁ ++ s₂: run V₁ on x.1 in the first phase and V₂ on x.2 in the second phase, accepting with some (y₁, y₂) when both accept.

def Cslib.Interactive.Reduction.liftFirst {ιP ιV : Type} {oP : OracleSpec ιP} {oV : OracleSpec ιV} {s₁ : Spec} {S₁ W₁ S₁' W₁' S₂ W₂ : Type} (R₁ : Reduction oP oV s₁ S₁ W₁ S₁' W₁') :
Reduction oP oV s₁ (S₁ × S₂) (W₁ × W₂) (S₁' × S₂) (W₁' × W₂)

Lift a reduction R₁ on the first coordinate to a reduction on (S₁ × S₂, W₁ × W₂) that threads (x.2, w.2) through unchanged.

def Cslib.Interactive.Reduction.liftSecond {ιP ιV : Type} {oP : OracleSpec ιP} {oV : OracleSpec ιV} {s₂ : Spec} {S₁' W₁' S₂ W₂ S₂' W₂' : Type} (R₂ : Reduction oP oV s₂ S₂ W₂ S₂' W₂') :
Reduction oP oV s₂ (S₁' × S₂) (W₁' × W₂) (S₁' × S₂') (W₁' × W₂')

Lift a reduction R₂ on the second coordinate to a reduction on (S₁' × S₂, W₁' × W₂) that threads (y.1, w.1) through unchanged.

def Cslib.Interactive.Reduction.seqProd {ιP ιV : Type} {oP : OracleSpec ιP} {oV : OracleSpec ιV} {s₁ s₂ : Spec} {S₁ W₁ S₁' W₁' S₂ W₂ S₂' W₂' : Type} (R₁ : Reduction oP oV s₁ S₁ W₁ S₁' W₁') (R₂ : Reduction oP oV s₂ S₂ W₂ S₂' W₂') :
Reduction oP oV (s₁ ++ s₂) (S₁ × S₂) (W₁ × W₂) (S₁' × S₂') (W₁' × W₂')

Product (AND) composition of interactive reductions over s₁ ++ s₂: run R₁ on the first coordinate and then R₂ on the second coordinate.

@[simp]
theorem Cslib.Interactive.Reduction.verifier_seqProd {ιP ιV : Type} {oP : OracleSpec ιP} {oV : OracleSpec ιV} {s₁ s₂ : Spec} {S₁ W₁ S₁' W₁' S₂ W₂ S₂' W₂' : Type} (R₁ : Reduction oP oV s₁ S₁ W₁ S₁' W₁') (R₂ : Reduction oP oV s₂ S₂ W₂ S₂' W₂') :
(R₁.seqProd R₂).verifier = R₁.verifier.seqProd R₂.verifier
@[simp]
theorem Cslib.Interactive.Verifier.outputOn_liftFirst {s₁ : Spec} {S₁ S₁' S₂ : Type} (V₁ : Verifier OracleSpec.empty s₁ S₁ S₁') (x : S₁ × S₂) (τ₁ : s₁.Transcript) :
V₁.liftFirst.outputOn x τ₁ = Option.map (fun (x_1 : S₁') => (x_1, x.2)) (V₁.outputOn x.1 τ₁)
@[simp]
theorem Cslib.Interactive.Verifier.outputOn_liftSecond {s₂ : Spec} {S₁' S₂ S₂' : Type} (V₂ : Verifier OracleSpec.empty s₂ S₂ S₂') (y : S₁' × S₂) (τ₂ : s₂.Transcript) :
V₂.liftSecond.outputOn y τ₂ = Option.map (fun (x : S₂') => (y.1, x)) (V₂.outputOn y.2 τ₂)
theorem Cslib.Interactive.Verifier.outputOn_seqProd {s₁ s₂ : Spec} {S₁ S₁' S₂ S₂' : Type} (V₁ : Verifier OracleSpec.empty s₁ S₁ S₁') (V₂ : Verifier OracleSpec.empty s₂ S₂ S₂') (x : S₁ × S₂) (τ : (s₁ ++ s₂).Transcript) :
(V₁.seqProd V₂).outputOn x τ = (V₁.outputOn x.1 (Spec.Transcript.split s₁ s₂ τ).1).bind fun (y₁ : S₁') => Option.map (fun (y₂ : S₂') => (y₁, y₂)) (V₂.outputOn x.2 (Spec.Transcript.split s₁ s₂ τ).2)

The output of V₁.seqProd V₂ on a transcript τ pairs the outputs of V₁ and V₂ on the two halves of τ.

theorem Cslib.Interactive.Verifier.outputOn_seqProd_eq_some_iff {s₁ s₂ : Spec} {S₁ S₁' S₂ S₂' : Type} (V₁ : Verifier OracleSpec.empty s₁ S₁ S₁') (V₂ : Verifier OracleSpec.empty s₂ S₂ S₂') (x : S₁ × S₂) (τ : (s₁ ++ s₂).Transcript) (y : S₁' × S₂') :
(V₁.seqProd V₂).outputOn x τ = some y ↔ V₁.outputOn x.1 (Spec.Transcript.split s₁ s₂ τ).1 = some y.1 ∧ V₂.outputOn x.2 (Spec.Transcript.split s₁ s₂ τ).2 = some y.2

(V₁.seqProd V₂).outputOn x τ = some y iff V₁ outputs some y.1 on the first half and V₂ outputs some y.2 on the second half.

theorem Cslib.Interactive.Reduction.plainLaw_run_liftFirst {s₁ : Spec} {S₁ W₁ S₁' W₁' S₂ W₂ : Type} (R₁ : Reduction OracleSpec.empty OracleSpec.empty s₁ S₁ W₁ S₁' W₁') (x : S₁ × S₂) (w : W₁ × W₂) :
plainLaw (R₁.liftFirst.prover x w >>= runStrategy s₁ R₁.liftFirst.verifier.samplers) = PMF.map (fun (x_1 : s₁.Transcript × S₁' × W₁') => match x_1 with | (τ, y₁, w₁) => (τ, (y₁, x.2), w₁, w.2)) (plainLaw (R₁.prover x.1 w.1 >>= runStrategy s₁ R₁.verifier.samplers))

Plain-model execution law of R₁.liftFirst.

theorem Cslib.Interactive.Reduction.plainLaw_run_liftSecond {s₂ : Spec} {S₁' W₁' S₂ W₂ S₂' W₂' : Type} (R₂ : Reduction OracleSpec.empty OracleSpec.empty s₂ S₂ W₂ S₂' W₂') (y : S₁' × S₂) (w : W₁' × W₂) :
plainLaw (R₂.liftSecond.prover y w >>= runStrategy s₂ R₂.liftSecond.verifier.samplers) = PMF.map (fun (x : s₂.Transcript × S₂' × W₂') => match x with | (τ, y₂, w₂) => (τ, (y.1, y₂), w.1, w₂)) (plainLaw (R₂.prover y.2 w.2 >>= runStrategy s₂ R₂.verifier.samplers))

Plain-model execution law of R₂.liftSecond.

theorem Cslib.Interactive.Reduction.Complete.liftFirst {s₁ : Spec} {S₁ W₁ S₁' W₁' S₂ W₂ : Type} {R₁ : Reduction OracleSpec.empty OracleSpec.empty s₁ S₁ W₁ S₁' W₁'} {relIn₁ : S₁ → W₁ → Prop} {relOut₁ : S₁' → W₁' → Prop} {rel₂ : S₂ → W₂ → Prop} {ε₁ : ENNReal} (h₁ : Complete World.plain R₁ relIn₁ relOut₁ ε₁) :
Complete World.plain R₁.liftFirst (relProd relIn₁ rel₂) (relProd relOut₁ rel₂) ε₁

R₁.liftFirst preserves completeness with the same error.

theorem Cslib.Interactive.Reduction.Complete.liftSecond {s₂ : Spec} {S₁' W₁' S₂ W₂ S₂' W₂' : Type} {R₂ : Reduction OracleSpec.empty OracleSpec.empty s₂ S₂ W₂ S₂' W₂'} {rel₁ : S₁' → W₁' → Prop} {relIn₂ : S₂ → W₂ → Prop} {relOut₂ : S₂' → W₂' → Prop} {ε₂ : ENNReal} (h₂ : Complete World.plain R₂ relIn₂ relOut₂ ε₂) :
Complete World.plain R₂.liftSecond (relProd rel₁ relIn₂) (relProd rel₁ relOut₂) ε₂

R₂.liftSecond preserves completeness with the same error.

theorem Cslib.Interactive.Reduction.Complete.seqProd {s₁ s₂ : Spec} {S₁ W₁ S₁' W₁' S₂ W₂ S₂' W₂' : Type} {R₁ : Reduction OracleSpec.empty OracleSpec.empty s₁ S₁ W₁ S₁' W₁'} {R₂ : Reduction OracleSpec.empty OracleSpec.empty s₂ S₂ W₂ S₂' W₂'} {relIn₁ : S₁ → W₁ → Prop} {relOut₁ : S₁' → W₁' → Prop} {relIn₂ : S₂ → W₂ → Prop} {relOut₂ : S₂' → W₂' → Prop} {ε₁ ε₂ : ENNReal} (h₁ : Complete World.plain R₁ relIn₁ relOut₁ ε₁) (h₂ : Complete World.plain R₂ relIn₂ relOut₂ ε₂) :
Complete World.plain (R₁.seqProd R₂) (relProd relIn₁ relIn₂) (relProd relOut₁ relOut₂) (ε₁ + ε₂)

Completeness of product composition (Reduction.seqProd): completeness errors add up.

theorem Cslib.Interactive.Reduction.Complete.seqProd_zero {s₁ s₂ : Spec} {S₁ W₁ S₁' W₁' S₂ W₂ S₂' W₂' : Type} {R₁ : Reduction OracleSpec.empty OracleSpec.empty s₁ S₁ W₁ S₁' W₁'} {R₂ : Reduction OracleSpec.empty OracleSpec.empty s₂ S₂ W₂ S₂' W₂'} {relIn₁ : S₁ → W₁ → Prop} {relOut₁ : S₁' → W₁' → Prop} {relIn₂ : S₂ → W₂ → Prop} {relOut₂ : S₂' → W₂' → Prop} (h₁ : Complete World.plain R₁ relIn₁ relOut₁ 0) (h₂ : Complete World.plain R₂ relIn₂ relOut₂ 0) :
Complete World.plain (R₁.seqProd R₂) (relProd relIn₁ relIn₂) (relProd relOut₁ relOut₂) 0

Perfect completeness of product composition: if both R₁ and R₂ are perfectly complete, so is R₁.seqProd R₂.

theorem Cslib.Interactive.Verifier.Sound.seqProd {s₁ s₂ : Spec} {S₁ S₁' S₂ S₂' : Type} {V₁ : Verifier OracleSpec.empty s₁ S₁ S₁'} {V₂ : Verifier OracleSpec.empty s₂ S₂ S₂'} {L₁ : Set S₁} {L₁' : Set S₁'} {L₂ : Set S₂} {L₂' : Set S₂'} {ε₁ ε₂ : ENNReal} (h₁ : Sound World.plain V₁ L₁ L₁' ε₁) (h₂ : Sound World.plain V₂ L₂ L₂' ε₂) :
Sound World.plain (V₁.seqProd V₂) (L₁ ×ˢ L₂) (L₁' ×ˢ L₂') (max ε₁ ε₂)

Soundness of product composition (Verifier.seqProd): on any pair (x₁, x₂) ∉ L₁ ×ˢ L₂, either x₁ ∉ L₁ (bounded by ε₁) or x₂ ∉ L₂ (bounded by ε₂), so the soundness error of V₁.seqProd V₂ is at most max ε₁ ε₂.

def Cslib.Interactive.Verifier.extractSeqProd {s₁ s₂ : Spec} {S₁ W₁ W₁' S₂ W₂ W₂' : Type} (E₁ : S₁ → s₁.Transcript → W₁' → W₁) (E₂ : S₂ → s₂.Transcript → W₂' → W₂) :
S₁ × S₂ → (s₁ ++ s₂).Transcript → W₁' × W₂' → W₁ × W₂

Product straight-line extractor: extract the first witness from the first half of the transcript and the second witness from the second half.

theorem Cslib.Interactive.Verifier.KnowledgeSound.seqProd {s₁ s₂ : Spec} {S₁ W₁ S₁' W₁' S₂ W₂ S₂' W₂' : Type} {V₁ : Verifier OracleSpec.empty s₁ S₁ S₁'} {V₂ : Verifier OracleSpec.empty s₂ S₂ S₂'} {relIn₁ : S₁ → W₁ → Prop} {relOut₁ : S₁' → W₁' → Prop} {relIn₂ : S₂ → W₂ → Prop} {relOut₂ : S₂' → W₂' → Prop} {E₁ : S₁ → s₁.Transcript → W₁' → W₁} {E₂ : S₂ → s₂.Transcript → W₂' → W₂} {κ₁ κ₂ : ENNReal} (h₁ : V₁.KnowledgeSound relIn₁ relOut₁ E₁ κ₁) (h₂ : V₂.KnowledgeSound relIn₂ relOut₂ E₂ κ₂) :
(V₁.seqProd V₂).KnowledgeSound (relProd relIn₁ relIn₂) (relProd relOut₁ relOut₂) (extractSeqProd E₁ E₂) (κ₁ + κ₂)

Straight-line knowledge soundness of product composition (Verifier.seqProd): running both extractors recovers a valid witness pair (w₁, w₂) with error at most κ₁ + κ₂.

theorem Cslib.Interactive.Reduction.honestTranscript_seqProd {s₁ s₂ : Spec} {S₁ W₁ S₁' W₁' S₂ W₂ S₂' W₂' : Type} (R₁ : Reduction OracleSpec.empty OracleSpec.empty s₁ S₁ W₁ S₁' W₁') (R₂ : Reduction OracleSpec.empty OracleSpec.empty s₂ S₂ W₂ S₂' W₂') (x : S₁ × S₂) (w : W₁ × W₂) :
(R₁.seqProd R₂).honestTranscript x w = (R₁.honestTranscript x.1 w.1).bind fun (τ₁ : s₁.Transcript) => PMF.map (fun (τ₂ : s₂.Transcript) => Spec.Transcript.append s₁ s₂ τ₁ τ₂) (R₂.honestTranscript x.2 w.2)

The honest transcript of R₁.seqProd R₂ on (x, w) is the concatenation of independent honest transcripts of R₁ on (x.1, w.1) and R₂ on (x.2, w.2).

def Cslib.Interactive.simSeqProd {s₁ s₂ : Spec} {S₁ S₂ : Type} (Sim₁ : S₁ → ProbComp s₁.Transcript) (Sim₂ : S₂ → ProbComp s₂.Transcript) (x : S₁ × S₂) :
ProbComp (s₁ ++ s₂).Transcript

Product simulator for Reduction.seqProd: run Sim₁ on x.1 and Sim₂ on x.2, and concatenate their transcripts.

def Cslib.Interactive.auxSimSeqProd {Aux : Type} {s₁ s₂ : Spec} {S₁ S₂ : Type} (Sim₁ : S₁ → Aux → ProbComp s₁.Transcript) (Sim₂ : S₂ → Aux → ProbComp s₂.Transcript) (x : S₁ × S₂) (z : Aux) :
ProbComp (s₁ ++ s₂).Transcript

Product auxiliary-input simulator for Reduction.seqProd: run Sim₁ on (x.1, z) and Sim₂ on (x.2, z), and concatenate their transcripts.

@[simp]
theorem Cslib.Interactive.eval_auxSimSeqProd {Aux : Type} {s₁ s₂ : Spec} {S₁ S₂ : Type} (Sim₁ : S₁ → Aux → ProbComp s₁.Transcript) (Sim₂ : S₂ → Aux → ProbComp s₂.Transcript) (x : S₁ × S₂) (z : Aux) :
(auxSimSeqProd Sim₁ Sim₂ x z).eval = (Sim₁ x.1 z).eval.bind fun (τ₁ : s₁.Transcript) => PMF.map (fun (τ₂ : s₂.Transcript) => Spec.Transcript.append s₁ s₂ τ₁ τ₂) (Sim₂ x.2 z).eval
@[simp]
theorem Cslib.Interactive.eval_simSeqProd {s₁ s₂ : Spec} {S₁ S₂ : Type} (Sim₁ : S₁ → ProbComp s₁.Transcript) (Sim₂ : S₂ → ProbComp s₂.Transcript) (x : S₁ × S₂) :
(simSeqProd Sim₁ Sim₂ x).eval = (Sim₁ x.1).eval.bind fun (τ₁ : s₁.Transcript) => PMF.map (fun (τ₂ : s₂.Transcript) => Spec.Transcript.append s₁ s₂ τ₁ τ₂) (Sim₂ x.2).eval
theorem Cslib.Interactive.Reduction.AuxHVZK.seqProd {Aux : Type} {s₁ s₂ : Spec} {S₁ W₁ S₁' W₁' S₂ W₂ S₂' W₂' : Type} {R₁ : Reduction OracleSpec.empty OracleSpec.empty s₁ S₁ W₁ S₁' W₁'} {R₂ : Reduction OracleSpec.empty OracleSpec.empty s₂ S₂ W₂ S₂' W₂'} {relIn₁ : S₁ → W₁ → Prop} {relIn₂ : S₂ → W₂ → Prop} {Sim₁ : S₁ → Aux → ProbComp s₁.Transcript} {Sim₂ : S₂ → Aux → ProbComp s₂.Transcript} {ε₁ : S₁ → Aux → ENNReal} {ε₂ : S₂ → Aux → ENNReal} (h₁ : R₁.AuxHVZK relIn₁ Sim₁ ε₁) (h₂ : R₂.AuxHVZK relIn₂ Sim₂ ε₂) :
(R₁.seqProd R₂).AuxHVZK (relProd relIn₁ relIn₂) (auxSimSeqProd Sim₁ Sim₂) fun (x : S₁ × S₂) (z : Aux) => ε₁ x.1 z + ε₂ x.2 z

Auxiliary-input HVZK of product composition (Reduction.seqProd): independent auxiliary-input simulation preserves AuxHVZK with error ε₁ x.1 z + ε₂ x.2 z.

theorem Cslib.Interactive.Reduction.PerfectAuxHVZK.seqProd {Aux : Type} {s₁ s₂ : Spec} {S₁ W₁ S₁' W₁' S₂ W₂ S₂' W₂' : Type} {R₁ : Reduction OracleSpec.empty OracleSpec.empty s₁ S₁ W₁ S₁' W₁'} {R₂ : Reduction OracleSpec.empty OracleSpec.empty s₂ S₂ W₂ S₂' W₂'} {relIn₁ : S₁ → W₁ → Prop} {relIn₂ : S₂ → W₂ → Prop} {Sim₁ : S₁ → Aux → ProbComp s₁.Transcript} {Sim₂ : S₂ → Aux → ProbComp s₂.Transcript} (h₁ : R₁.PerfectAuxHVZK relIn₁ Sim₁) (h₂ : R₂.PerfectAuxHVZK relIn₂ Sim₂) :
(R₁.seqProd R₂).PerfectAuxHVZK (relProd relIn₁ relIn₂) (auxSimSeqProd Sim₁ Sim₂)

Perfect auxiliary-input HVZK of product composition (Reduction.seqProd).

theorem Cslib.Interactive.Reduction.HVZK.seqProd {s₁ s₂ : Spec} {S₁ W₁ S₁' W₁' S₂ W₂ S₂' W₂' : Type} {R₁ : Reduction OracleSpec.empty OracleSpec.empty s₁ S₁ W₁ S₁' W₁'} {R₂ : Reduction OracleSpec.empty OracleSpec.empty s₂ S₂ W₂ S₂' W₂'} {relIn₁ : S₁ → W₁ → Prop} {relIn₂ : S₂ → W₂ → Prop} {Sim₁ : S₁ → ProbComp s₁.Transcript} {Sim₂ : S₂ → ProbComp s₂.Transcript} {ε₁ ε₂ : ENNReal} (h₁ : R₁.HVZK relIn₁ Sim₁ ε₁) (h₂ : R₂.HVZK relIn₂ Sim₂ ε₂) :
(R₁.seqProd R₂).HVZK (relProd relIn₁ relIn₂) (simSeqProd Sim₁ Sim₂) (ε₁ + ε₂)

HVZK of product composition (Reduction.seqProd): independent transcript simulation preserves HVZK with the sum of the statistical errors.

theorem Cslib.Interactive.Reduction.PerfectHVZK.seqProd {s₁ s₂ : Spec} {S₁ W₁ S₁' W₁' S₂ W₂ S₂' W₂' : Type} {R₁ : Reduction OracleSpec.empty OracleSpec.empty s₁ S₁ W₁ S₁' W₁'} {R₂ : Reduction OracleSpec.empty OracleSpec.empty s₂ S₂ W₂ S₂' W₂'} {relIn₁ : S₁ → W₁ → Prop} {relIn₂ : S₂ → W₂ → Prop} {Sim₁ : S₁ → ProbComp s₁.Transcript} {Sim₂ : S₂ → ProbComp s₂.Transcript} (h₁ : R₁.PerfectHVZK relIn₁ Sim₁) (h₂ : R₂.PerfectHVZK relIn₂ Sim₂) :
(R₁.seqProd R₂).PerfectHVZK (relProd relIn₁ relIn₂) (simSeqProd Sim₁ Sim₂)

Perfect HVZK of product composition (Reduction.seqProd).