Collision probability #
The collision probability of a discrete distribution is the probability that two independent samples agree, equivalently the sum of the squared masses. This quantity lets extraction bounds avoid logarithms: a pointwise mass bound also bounds collision probability. The ambient type may be infinite, including the type of binary words used by the computational definitions.
The distance-to-uniform estimate is the Cauchy–Schwarz step in the leftover hash lemma.
Main definitions #
Cslib.Probability.PMF.collisionProbability: sum of squared probability masses.
Main results #
Cslib.Probability.PMF.collisionProbability_eq_probability: independent-sample experiment.Cslib.Probability.PMF.collisionProbability_le_of_mass_le: pointwise mass upper bounds.Cslib.Probability.PMF.dist_uniform_le: distance to uniform from excess collisions.
References #
- T. Holenstein, Pseudorandom Generators from One-Way Functions: A Simple Construction for Any Hardness, Section 3.3, proof of Lemma 1, equation (2).
Adapted from Probability/Collision.lean on the cslib crypto branch at
5ff69ca93402e7c947208dc56396d6d86203ccd8, using the upstream statistical-distance metric.
The probability that two independent samples from a discrete distribution agree.
Instances For
For a finite ambient type, collision probability is a finite sum.
The collision probability is nonnegative.
The sum of squared masses is exactly the success probability of comparing independent draws, using any equality decision procedure.
The collision probability of a uniform source is its reciprocal cardinality.
Independent sources multiply their collision probabilities.
A deterministic image collides exactly when the original samples have the same image.
An injective encoding does not change collision probability. Both types may be infinite.
A uniform input conditioned on its image has collision probability reciprocal to the size of that image's fiber, even when different images have different fiber sizes.
Squared distance to uniform is controlled by the excess collision probability.
Cauchy–Schwarz bounds distance to uniform by the square root of excess collisions.