Denotational Semantics Over AlternativeMonad. #
This file defines a type-class for HasEvalSet when given an AlternativeMonad instance
on the base monad, enforcing that failure maps to the empty sub-distribution.
Compatibility conditions then force the correct semantics for evalDist, see _.
Type-class for HasEvalSet when given an AlternativeMonad instance on the base monad,
enforcing that failure maps to the empty sub-distribution.
Compatibility conditions then force the correct semantics for evalDist, see below.
Instances
@[simp]
theorem
support_failure
{m : Type u → Type v}
[AlternativeMonad m]
{α : Type u}
[HasEvalSet m]
[HasEvalSet.LawfulFailure m]
:
@[simp]
theorem
finSupport_failure
{m : Type u → Type v}
[AlternativeMonad m]
{α : Type u}
[HasEvalSet m]
[HasEvalSet.LawfulFailure m]
[HasEvalFinset m]
[DecidableEq α]
:
@[simp]
theorem
probOutput_failure
{m : Type u → Type v}
[AlternativeMonad m]
{α : Type u}
[HasEvalSPMF m]
[HasEvalSet.LawfulFailure m]
(x : α)
:
@[simp]
theorem
probEvent_failure
{m : Type u → Type v}
[AlternativeMonad m]
{α : Type u}
[HasEvalSPMF m]
[HasEvalSet.LawfulFailure m]
(p : α → Prop)
:
@[simp]
theorem
probFailure_failure
{m : Type u → Type v}
[AlternativeMonad m]
{α : Type u}
[HasEvalSPMF m]
[HasEvalSet.LawfulFailure m]
:
@[simp]
theorem
evalDist_failure
{m : Type u → Type v}
[AlternativeMonad m]
{α : Type u}
[HasEvalSPMF m]
[HasEvalSet.LawfulFailure m]
: