Evaluation Distributions of Computations with Prod #
Lemmas about evalDist and support involving Prod, ported to generic [HasEvalSPMF m].
@[simp]
theorem
probEvent_fst_map
{m : Type u → Type v}
[Monad m]
[LawfulMonad m]
[HasEvalSPMF m]
{α β : 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]
[HasEvalSPMF m]
{α β : 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]
[HasEvalSPMF m]
{α β : Type u}
(mx : m α)
(my : m β)
:
theorem
finSupport_seq_map_prod_mk
{m : Type u → Type v}
[Monad m]
[LawfulMonad m]
[HasEvalSPMF m]
{α β : Type u}
(mx : m α)
(my : m β)
[HasEvalFinset m]
[DecidableEq α]
[DecidableEq β]
:
@[simp]
@[simp]
@[simp]
@[simp]
theorem
finSupport_seq_map_prod_mk_eq_product
{m : Type u → Type v}
[Monad m]
[LawfulMonad m]
[HasEvalSPMF m]
{α β γ δ : Type u}
(mx : m α)
(my : m β)
(f : α → γ)
(g : β → δ)
[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))