Extended-nonnegative-real expectation on ProbComp #
Expected value Cslib.ProbComp.expect m f = ∑' a, (eval m) a * f a for a closed probabilistic
program m : ProbComp α and cost function f : α → ℝ≥0∞.
Working in ℝ≥0∞ makes expectation total without [Fintype α], [MeasurableSpace α], or
summability hypotheses. Every PMF has countable support, while program state spaces such as
machine configurations with infinite memory ℕ → ℕ need not be finite or carry a measurable space.
Unbounded or faulting branches naturally evaluate to ⊤.
Main definitions #
Cslib.ProbComp.expect:ℝ≥0∞-valued expectation∑' a, (eval m) a * f aoverProbComp.
Main results #
Cslib.ProbComp.expect_pure,Cslib.ProbComp.expect_bind,Cslib.ProbComp.expect_map: monadic laws forexpect(return, tower/law of total expectation, and postprocessing).Cslib.ProbComp.expect_const,Cslib.ProbComp.expect_add,Cslib.ProbComp.expect_mul_left,Cslib.ProbComp.expect_mul_right: linearity overℝ≥0∞.Cslib.ProbComp.expect_congr_on_support,Cslib.ProbComp.expect_mono_on_support,Cslib.ProbComp.expect_eq_top_of_mem_support: support-localized congruence, monotonicity, and divergence propagation.Cslib.ProbComp.expect_unifFin,Cslib.ProbComp.expect_uniform: uniform finite averages.
References #
theorem Cslib.ProbComp.expect_congr_on_support {α : Type} {m : ProbComp α} {f g : α → ENNReal} (h : ∀ a ∈ OracleComp.support m, f a = g a) :
theorem Cslib.ProbComp.expect_mono_on_support {α : Type} {m : ProbComp α} {f g : α → ENNReal} (h : ∀ a ∈ OracleComp.support m, f a ≤ g a) :
theorem Cslib.ProbComp.expect_le_of_forall_support {α : Type} {m : ProbComp α} {f : α → ENNReal} {B : ENNReal} (h : ∀ a ∈ OracleComp.support m, f a ≤ B) :