Documentation

VCVio.EvalDist.Monad.Seq

Evaluation Distributions of Computations with seq #

File for lemmas about evalDist and support involving the monadic seq, seqLeft, and seqRight operations.

TODO: many lemmas should probably have mirrored versions for bind_map.

@[simp]
theorem support_seq {α β : Type u} {m : Type u → Type v} [Monad m] [HasEvalSet m] [LawfulMonad m] (mf : m (αβ)) (mx : m α) :
support (mf <*> mx) = fsupport mf, f '' support mx
@[simp]
theorem finSupport_seq {α β : Type u} {m : Type u → Type v} [Monad m] [HasEvalSet m] [HasEvalFinset m] [LawfulMonad m] [DecidableEq (αβ)] [DecidableEq α] [DecidableEq β] (mf : m (αβ)) (mx : m α) :
finSupport (mf <*> mx) = (finSupport mf).biUnion fun (f : αβ) => Finset.image f (finSupport mx)
@[simp]
theorem evalDist_seq {α β : Type u} {m : Type u → Type v} [Monad m] [HasEvalSPMF m] [LawfulMonad m] (mf : m (αβ)) (mx : m α) :
evalDist (mf <*> mx) = evalDist mf <*> evalDist mx
@[simp]
theorem support_seqLeft {α β : Type u} {m : Type u → Type v} [Monad m] [HasEvalSet m] [LawfulMonad m] (mx : m α) (my : m β) [Decidable (support my).Nonempty] :
@[simp]
theorem support_seqRight {α β : Type u} {m : Type u → Type v} [Monad m] [HasEvalSet m] [LawfulMonad m] (mx : m α) (my : m β) [Decidable (support mx).Nonempty] :