Tactics for cryptographic game hops and shared random draws #
Cryptographic security proofs repeatedly step across explicit sequences of hybrid games and couple
shared leading PMF.bind (or Game.runStatelessOracle) stages while retaining support membership.
This module provides two focused, deterministic tactics that keep intermediate games and variable
couplings explicit in the proof script while removing routine triangle, symmetry, coercion, and
bind-coupling plumbing:
game_trans: split a distinguishing-advantage, success-probability, orCloseTobound along an explicit list of intermediate games or distributions, with optionalusing [...]hop discharge handling symmetry (Game.advantage_comm,CloseTo.symm), equality (Game.advantage_self,CloseTo.refl), andℝ≥0 → ℝcoercion.peel_binds: normalize visible monadic sampling chains and peel sharedPMF.bindandGame.runStatelessOraclestages onGame.advantage,CloseTo, orPMFequality goals, introducing each drawxtogether withx_mem : x ∈ μ.support. A leading draw can align with any independent later draw using the same bind-chain engine aspmf_swapandpmf_hoist, with the stateless-oracle commutation rules supplied by this module.
Main definitions #
game_trans: chain game-hop bounds across explicit intermediate games or distributions.peel_binds: peel coupled leadingPMF.bindandGame.runStatelessOraclestages with support hypotheses.
Main results #
Cslib.Crypto.Game.coe_advantage_triangle_add: real-valued triangle step combining two hop bounds.Cslib.Crypto.Game.succProbability_le_of_advantage_pure_false_le,Cslib.Crypto.Game.coe_succProbability_le_of_advantage_pure_false_le: bridge lemmas reducing one-sidedGame.succProbabilitybounds toGame.advantage · (PMF.pure false).Cslib.Crypto.Game.coe_advantage_bind_le_of_support,Cslib.Crypto.Game.coe_advantage_runStatelessOracle_le_of_support,Cslib.Crypto.Game.closeTo_runStatelessOracle,Cslib.Crypto.Game.runStatelessOracle_congr_on_support,Cslib.Crypto.Game.runStatelessOracle_comm: support-restricted and commutation bridge lemmas forℝ-valuedGame.advantage,CloseTo, andGame.runStatelessOracle.
Bounding advantage g₀ (PMF.pure false) ≤ B bounds succProbability g₀ ≤ B.
Real-valued version of succProbability_le_of_advantage_pure_false_le.
Support-restricted real-valued continuation bound for runStatelessOracle.
Support-restricted CloseTo continuation bound for runStatelessOracle.
Support-restricted continuation congruence for runStatelessOracle.
Commute two independent runStatelessOracle stages.
Bind-stage representation and independent-stage commutation #
Target decomposition for relational PMF / Game goals #
peel_binds syntax and elaborator #
Binder name or _ placeholder accepted by peel_binds.
Peel shared leading PMF.bind and Game.runStatelessOracle stages on Game.advantage,
Encryption.advantage, CloseTo, or PMF equality goals, introducing each draw x and its
support witness x_mem : x ∈ μ.support.
peel_bindspeels all shared leading stages. When they differ, it brings a matching independent stage to the front from anywhere in the opposite sampling chain. Matching leading draws keep their original order, including repeated draws of the same distribution.peel_binds x₁ x₂ ...peels exactly those stages using the given binder names (_names the drawxand leaves its support witness inaccessible).
Normalization follows the alignment path. An unmatched continuation stays in its original form so that a supplied continuation bound still applies directly.
game_trans syntax and elaborator #
Bracketed or comma-separated list of intermediate games or distributions for game_trans.
Bracketed list or single hop proof term for game_trans ... using ....
Step a Game.advantage, (Game.advantage : ℝ), Encryption.advantage,
Game.succProbability, (Game.succProbability : ℝ), or CloseTo goal across an explicit list of
intermediate games or distributions:
game_trans [g₁, g₂, ...](orgame_trans g₁, g₂, ...) creates one hop subgoal per step (G₀ → g₁,g₁ → g₂, ...,gₘ → Gₖ) followed by a trailing bound subgoal?ε₀ + ?ε₁ + ... + ?εₘ ≤ B. One-sidedGame.succProbability G₀ ≤ Bgoals (whenBdoes not already addGame.succProbability G₁) hop fromG₀toPMF.pure falseand acceptGame.succProbability gₘ ≤ εhop proofs atPMF.pure false.game_trans [g₁, g₂] using [h₀, h₁, h₂]discharges hop subgoals directly (use_to leave a hop open), automatically orienting reversedGame.advantage_comm/CloseTo.symmbounds, liftingℝ≥0advantage bounds toℝ, turning equalitiesA = Binto0error, and closing the trailing sum bound when it holds byrfl,ac_rfl, orring.game_trans(with no intermediates) unfoldsEncryption.advantage, reducesGame.succProbability G₀ ≤ Game.succProbability G₁ + BtoGame.advantage G₀ G₁ ≤ B, or reducesGame.succProbability G₀ ≤ BtoGame.advantage G₀ (PMF.pure false) ≤ B(game_trans using [h]also closes a single hop up to symmetry).