Evaluation Distributions of Computations with Bind #
File for lemmas about evalDist and support involving the monadic pure and bind.
@[simp]
theorem
finSupport_pure
{α : Type u}
{m : Type u → Type v}
[Monad m]
[HasEvalSet m]
[HasEvalFinset m]
[DecidableEq α]
(x : α)
:
theorem
mem_finSupport_pure_iff
{α : Type u}
{m : Type u → Type v}
[Monad m]
[HasEvalSet m]
[HasEvalFinset m]
[DecidableEq α]
(x y : α)
:
theorem
mem_finSupport_pure_iff'
{α : Type u}
{m : Type u → Type v}
[Monad m]
[HasEvalSet m]
[HasEvalFinset m]
[DecidableEq α]
(x y : α)
:
@[simp]
theorem
finSupport_bind
{α β : Type u}
{m : Type u → Type v}
[Monad m]
[HasEvalSet m]
[HasEvalFinset m]
[DecidableEq α]
[DecidableEq β]
(mx : m α)
(my : α → m β)
:
theorem
mem_finSupport_bind_iff
{α β : Type u}
{m : Type u → Type v}
[Monad m]
[HasEvalSet m]
[HasEvalFinset m]
[DecidableEq α]
[DecidableEq β]
(mx : m α)
(my : α → m β)
(y : β)
:
theorem
probOutput_bind_eq_tsum_subtype
{α β : Type u}
{m : Type u → Type v}
[Monad m]
[HasEvalSPMF m]
(mx : m α)
(my : α → m β)
(y : β)
:
Version of probOutput_bind_eq_tsum that sums only over the subtype given by the support
of the first computation. This can be useful to avoid looking at edge cases that can't actually
happen in practice after the first computation. A common example is if the first computation
does some error handling to avoids returning malformed outputs.
theorem
probOutput_bind_eq_sum_finSupport
{α β : Type u}
{m : Type u → Type v}
[Monad m]
[HasEvalSPMF m]
[HasEvalFinset m]
(mx : m α)
(my : α → m β)
[DecidableEq α]
(y : β)
:
theorem
probEvent_bind_eq_sum_finSupport
{α β : Type u}
{m : Type u → Type v}
[Monad m]
[HasEvalSPMF m]
[HasEvalFinset m]
(mx : m α)
(my : α → m β)
[DecidableEq α]
(q : β → Prop)
:
@[simp]
theorem
finSupport_bind_const
{α β : Type u}
{m : Type u → Type v}
[Monad m]
[HasEvalSet m]
[HasEvalFinset m]
[DecidableEq β]
[DecidableEq α]
(mx : m α)
(my : m β)
:
theorem
probFailure_bind_of_const
{α β : Type u}
{m : Type u → Type v}
[Monad m]
[HasEvalSPMF m]
{mx : m α}
{my : α → m β}
{r : ENNReal}
(h : ∀ x ∈ support mx, Pr[⊥ | my x] = r)
:
Write the probability of mx >>= my failing given that my has constant failure chance over
the possible outputs in support mx as a fixed expression without any sums.
theorem
probFailure_bind_le_of_forall'
{α β : Type u}
{m : Type u → Type v}
[Monad m]
[HasEvalSPMF m]
{mx : m α}
{s : ENNReal}
(h' : Pr[⊥ | mx] = s)
(my : α → m β)
{r : ENNReal}
(hr : ∀ x ∈ support mx, Pr[⊥ | my x] ≤ r)
:
Version of probFailure_bind_le_of_forall with the 1 - s factor ommited for convenience.