Evaluation Distributions of Computations with Prod #
Lemmas about evalSPMF and support involving Prod, ported to generic [MonadLiftT m SPMF].
@[simp]
theorem
probEvent_fst_map
{m : Type u → Type v}
[Monad m]
[LawfulMonad m]
[MonadLiftT m SPMF]
[LawfulMonadLiftT m SPMF]
{α β : Type u}
(mx : m (α × β))
(p : α → Prop)
:
Unlike probEvent_map this unfolds the function composition automatically.
@[simp]
theorem
probEvent_snd_map
{m : Type u → Type v}
[Monad m]
[LawfulMonad m]
[MonadLiftT m SPMF]
[LawfulMonadLiftT m SPMF]
{α β : Type u}
(mx : m (α × β))
(p : β → Prop)
:
Unlike probEvent_map this unfolds the function composition automatically.
@[simp]
theorem
support_seq_map_prod_mk
{m : Type u → Type v}
[Monad m]
[LawfulMonad m]
{α β : Type u}
(mx : m α)
(my : m β)
[MonadAttach m]
[ExactMonadAttach m]
:
theorem
finSupport_seq_map_prod_mk
{m : Type u → Type v}
[Monad m]
[LawfulMonad m]
{α β : Type u}
(mx : m α)
(my : m β)
[MonadAttach m]
[ExactMonadAttach m]
[HasEvalFinset m]
[DecidableEq α]
[DecidableEq β]
:
@[simp]
theorem
probOutput_seq_map_prod_mk_map_eq_mul
{m : Type u → Type v}
[Monad m]
[LawfulMonad m]
[MonadLiftT m SPMF]
[LawfulMonadLiftT m SPMF]
{α β γ δ : Type u}
(mx : m α)
(my : m β)
(f : α → γ)
(g : β → δ)
(z : γ × δ)
:
@[simp]
theorem
probOutput_seq_map_prod_mk_map_eq_mul'
{m : Type u → Type v}
[Monad m]
[LawfulMonad m]
[MonadLiftT m SPMF]
[LawfulMonadLiftT m SPMF]
{α β γ δ : Type u}
(mx : m α)
(my : m β)
(f : α → γ)
(g : β → δ)
(z : γ × δ)
:
@[simp]
theorem
probOutput_bind_map_prod_mk_eq_mul
{m : Type u → Type v}
[Monad m]
[LawfulMonad m]
[MonadLiftT m SPMF]
[LawfulMonadLiftT m SPMF]
{α β γ δ : Type u}
(mx : m α)
(my : m β)
(f : α → γ)
(g : β → δ)
(z : γ × δ)
:
@[simp]
theorem
probOutput_bind_map_prod_mk_eq_mul'
{m : Type u → Type v}
[Monad m]
[LawfulMonad m]
[MonadLiftT m SPMF]
[LawfulMonadLiftT m SPMF]
{α β γ δ : Type u}
(mx : m α)
(my : m β)
(f : α → γ)
(g : β → δ)
(z : γ × δ)
:
@[simp]
theorem
support_seq_map_prod_mk_eq_sprod
{m : Type u → Type v}
[Monad m]
[LawfulMonad m]
{α β γ δ : Type u}
(mx : m α)
(my : m β)
(f : α → γ)
(g : β → δ)
[MonadAttach m]
[ExactMonadAttach m]
:
theorem
finSupport_seq_map_prod_mk_eq_product
{m : Type u → Type v}
[Monad m]
[LawfulMonad m]
{α β γ δ : Type u}
(mx : m α)
(my : m β)
(f : α → γ)
(g : β → δ)
[MonadAttach m]
[ExactMonadAttach m]
[HasEvalFinset m]
[DecidableEq α]
[DecidableEq β]
[DecidableEq γ]
[DecidableEq δ]
:
finSupport ((fun (x1 : α) (x2 : β) => (f x1, g x2)) <$> mx <*> my) = (Finset.image f (finSupport mx)).product (Finset.image g (finSupport my))
theorem
probOutput_bind_bind_prod_mk_eq_mul
{m : Type u → Type v}
[Monad m]
[LawfulMonad m]
[MonadLiftT m SPMF]
[LawfulMonadLiftT m SPMF]
{α β γ δ : Type u}
(mx : m α)
(my : m β)
(f : α → γ)
(g : β → δ)
(z : γ × δ)
:
theorem
probOutput_bind_bind_prod_mk_eq_mul'
{m : Type u → Type v}
[Monad m]
[LawfulMonad m]
[MonadLiftT m SPMF]
[LawfulMonadLiftT m SPMF]
{α β γ δ : Type u}
(mx : m α)
(my : m β)
(f : α → γ)
(g : β → δ)
(x : γ)
(y : δ)
:
theorem
sq_probOutput_bind_le_probOutput_bind_prod
{m : Type u → Type v}
[Monad m]
[LawfulMonad m]
[MonadLiftT m SPMF]
[LawfulMonadLiftT m SPMF]
{α β : Type u}
(source : m α)
(kernel : α → m β)
(y : β)
:
Two conditionally independent executions dominate the square of the corresponding single-execution output probability.