Functor Laws, applicative laws, and monad Laws #
Equations
- ReaderT.mk f = f
Instances For
@[simp]
theorem
ReaderT.run_mk
{m : Type u → Type v}
{α σ : Type u}
(f : σ → m α)
(r : σ)
:
(ReaderT.mk f).run r = f r
@[simp]
theorem
OptionT.run_mk
{α : Type u}
{m : Type u → Type v}
(x : m (Option α))
:
(OptionT.mk x).run = x
@[simp]
theorem
OptionT.run_map
{α β : Type u}
{m : Type u → Type v}
(x : OptionT m α)
[Monad m]
(f : α → β)
[LawfulMonad m]
:
(f <$> x).run = Option.map f <$> x.run
instance
instLawfulMonadOptionT_mathlib
(m : Type u → Type v)
[Monad m]
[LawfulMonad m]
:
LawfulMonad (OptionT m)
Equations
- ⋯ = ⋯