theorem Std.Do.Internal.ErasesTo.of_attach {m : Type u_1 → Type u_2} [Monad m] [LawfulMonad m] [MonadAttach m] [WeaklyLawfulMonadAttach m] {α : Type u_1} {x : m α} :
ErasesTo (MonadAttach.attach x) x
MonadAttach.attach is bind-faithful with x.
theorem Std.Do.Internal.Ensures.weaken {m : Type u → Type v} [Monad m] [LawfulMonad m] {α : Type u} {P Q : α → Prop} {x : m α} (h : Ensures P x) (hPQ : ∀ (a : α), P a → Q a) :
Ensures Q x
Weaken an Ensures-witness via predicate implication.
theorem Std.Do.Internal.Ensures.canReturn {m : Type u_1 → Type u_2} [Monad m] [LawfulMonad m] [MonadAttach m] [WeaklyLawfulMonadAttach m] {α : Type u_1} {x : m α} :
Ensures (MonadAttach.CanReturn x) x
Every value returned by x satisfies MonadAttach.CanReturn x.
theorem Std.Do.Internal.MayReturn.of_canReturn {m : Type u_1 → Type u_2} {α : Type u_1} [Monad m] [LawfulMonad m] [MonadAttach m] [LawfulMonadAttach m] {x : m α} {a : α} (h : MonadAttach.CanReturn x a) :
MayReturn x a
MonadAttach.CanReturn implies MayReturn for LawfulMonadAttach instances.
theorem Std.Do.Internal.MayReturn.canReturn {m : Type u_1 → Type u_2} {α : Type u_1} [Monad m] [LawfulMonad m] [MonadAttach m] [WeaklyLawfulMonadAttach m] {x : m α} {a : α} (h : MayReturn x a) :
MayReturn implies MonadAttach.CanReturn for WeaklyLawfulMonadAttach instances.
theorem Std.Do.Internal.MayReturn.canReturn_iff {m : Type u_1 → Type u_2} {α : Type u_1} [Monad m] [LawfulMonad m] [MonadAttach m] [LawfulMonadAttach m] (x : m α) (a : α) :
MayReturn is equivalent to MonadAttach.CanReturn for LawfulMonadAttach instances.
theorem Std.Do.Internal.MayReturn.canReturn_eq {m : Type u_1 → Type u_2} {α : Type u_1} [Monad m] [LawfulMonad m] [MonadAttach m] [LawfulMonadAttach m] (x : m α) :
theorem Std.Do.Internal.IsAttach.of_attach {m : Type u_1 → Type u_2} [Monad m] [LawfulMonad m] [MonadAttach m] [LawfulMonadAttach m] :
MonadAttach.attach, retagged with MayReturn proofs, witnesses IsAttach.