Collecting runs in finite vectors #
OracleComp.replicateFin collects successive runs as a function on Fin count.
Listing its coordinates gives exactly the existing list-valued repetition program; the
typed vector does not introduce a new sampling primitive or an efficiency assumption.
Closed ProbComp runs draw independent values.
Main definitions #
Cslib.OracleComp.replicateFin: collect successive runs in a length-indexed vector.
Main results #
Cslib.OracleComp.map_ofFn_replicateFin: agreement with list-valued repetition.Cslib.ProbComp.mem_support_replicateFin_iff: support is coordinatewise, even for infinite types.Cslib.ProbComp.eval_replicateFin: independent finite coordinates have the product law.Cslib.ProbComp.eval_replicateFin_map: list-valued encodings preserve the joint law.Cslib.ProbComp.eval_replicateFin_of_uniformList: a flat fair-bit seed supplies every run.
References #
This is the length-indexed interface to OracleComp.replicate and its product-distribution laws.
Collect successive runs as a length-indexed vector, in execution order.
Instances For
Listing the coordinates gives exactly the existing repeated-run program.
The vector support consists exactly of the tuples of individually supported values.
Finite coordinate distributions give the independent product law.
Repeating a representation of each sampled value gives the represented vector law.
Mapping each coordinate after independent runs agrees with mapping each run's outcome. Neither outcome type needs to be finite.
Disjoint blocks of one uniform tape realize a vector of independently sampled values. The output type may be infinite, and either the count or the block width may be zero.