The areas / V33. Data structures and computation
Mathlib.Control.Lawful
3 declarations. Mathlib docs · Source
theorem StateT.map_const E0 #
∀ {σ : Type u} {m : Type u → Type v} {α β : Type u} [inst : Monad m], Functor.mapConst = Functor.map ∘ Function.const β
A copy of LawfulFunctor.map_const for StateT that holds even if m is not lawful.
theorem StateT.run_mapConst E0 #
∀ {σ : Type u} {m : Type u → Type v} {α β : Type u} [inst : Monad m] [LawfulMonad m] (x : StateT σ m α) (y : β)
(st : σ), (Functor.mapConst y x).run st = Prod.map (Function.const α y) id <$> x.run st
theorem ExceptT.run_monadLift E0 #
∀ {α ε : Type u} {m : Type u → Type v} {n : Type u → Type u_1} [inst : Monad m] [inst_1 : MonadLiftT n m] (x : n α),
(monadLift x).run = Except.ok <$> monadLift x