Documentation

CslibFrontier.Probability.PMF.UniformIndex

Choosing a list entry by a uniform index #

An index drawn uniformly below Q and read as a position in a list selects each of the list's first Q entries with probability at least 1 / Q. Positions at or beyond the end of the list select the default value. This is the guessing step of a reduction that cannot recognize the right answer among an adversary's candidates and outputs one of them at random, as in [BS23], Section 11.5.1, proof of Theorem 11.4 (pp. 446–448), and Section 21.11.4 (p. 908).

The bound holds for every list. Entries beyond the first Q are never selected by an index below Q, so membership in l.take Q, not in l, is what the bound needs; for a list of length at most Q the two agree. Repeated entries only add to the probability.

Main results #

References #

theorem Cslib.Probability.PMF.inv_le_map_uniformOfFintype_getD {α : Type u_1} {Q : ℕ} [NeZero Q] {l : List α} {x : α} (d : α) (hx : x ∈ List.take Q l) :
(↑Q)⁻¹ ≤ (PMF.map (fun (i : Fin Q) => l.getD (↑i) d) (uniformOfFintype (Fin Q))) x

Guessing a list entry: an index drawn uniformly below Q, read as a position in l with default d, selects a member x of the first Q entries of l with probability at least 1 / Q. There is no hypothesis on the length of l, and the default is arbitrary.