Documentation

VCVio.SSP.Hybrid

State-Separating Proofs: Hybrid arguments and the linked-game reduction #

This file collects two staple SSP results, phrased at the package level:

These two ingredients together justify the standard SSP game-hopping pattern: produce a chain of intermediate games related by link-ed reductions, then collapse the chain via the hybrid inequality.

Universe layout #

Package.shiftLeft and Package.run_link_eq_run_shiftLeft are program-level statements and are kept fully universe-polymorphic in the indices uᵢ, uₘ, uₑ, the import range universe vᵢ, and the export range / state / result universe v (matching Composition.lean). Note that vᵢ does not appear in shiftLeft's own signature: shiftLeft produces an OracleComp M α, which is oblivious to the import spec. vᵢ only enters through the inner package Q : Package I M σ₂ in run_link_eq_run_shiftLeft, whose import range can live in an arbitrary universe independent from v. The hybrid theorem and the advantage-level reduction live in the Type 0 world (forced by ProbComp and Bool); their export indices remain free in uₑ.

Iterated triangle inequality (hybrid argument) #

theorem VCVio.SSP.Package.advantage_hybrid {ιₑ : Type uₑ} {E : OracleSpec ιₑ} {σ : Type} (G : (i : ) → Package unifSpec E (σ i)) (A : OracleComp E Bool) (n : ) :
(G 0).advantage (G n) A iFinset.range n, (G i).advantage (G (i + 1)) A

Hybrid lemma. For any sequence of games G 0, G 1, ..., G n and any single Boolean adversary A, the distinguishing advantage between the endpoints is bounded by the sum of consecutive advantages.

The state types may differ from step to step: σ : ℕ → Type and G i : Package unifSpec E (σ i). This is just the iterated boolDistAdvantage triangle inequality, packaged for SSP-style game-hopping proofs.

Shifted adversary and the SSP reduction lemma #

def VCVio.SSP.Package.shiftLeft {ιₘ : Type uₘ} {ιₑ : Type uₑ} {M : OracleSpec ιₘ} {E : OracleSpec ιₑ} {σ₁ : Type v} (P : Package M E σ₁) {α : Type v} (A : OracleComp E α) :

The shifted adversary obtained by absorbing the outer reduction package P into the adversary. Given an outer reduction P : Package M E σ₁ and an external adversary A : OracleComp E α querying the export interface E, this returns an adversary against the intermediate interface M by simulating A through P.impl and projecting away the final outer state.

This is the SSP "reduction-to-the-distinguisher" move: the outer package becomes part of the adversary, so a fresh round of analysis only needs to consider the inner game.

Instances For
    @[simp]
    theorem VCVio.SSP.Package.shiftLeft_pure {ιₘ : Type uₘ} {ιₑ : Type uₑ} {M : OracleSpec ιₘ} {E : OracleSpec ιₑ} {σ₁ : Type v} (P : Package M E σ₁) {α : Type v} (x : α) :

    Advantage-form reduction #

    Universe-polymorphism sanity checks #