The first successful IID trial #
Map Fin.findSome? over a finite tuple of independent Option-valued trials. Failure means that
every trial returned none, so its mass is the one-trial failure mass raised to the tuple length.
Main definitions #
This module adds no definitions; it composes PMF.iid with Fin.findSome?.
Main results #
Cslib.Probability.PMF.iid_map_findSomeidentifies the whole first-answer law with an on-demand search through the same number of trials.Cslib.Probability.PMF.map_findSome_iid_apply_none: exact failure mass of the first-success map over IID trials.
References #
The identity is the elementary product rule for independent failures.
theorem Cslib.Probability.PMF.iid_map_findSome {α β ι : Type} (p : PMF α) (finish : α → Option β) (xs : List ι) :
Searching an IID tape gives the same first terminal answer as drawing on demand and stopping.