File: .lake/packages/lean4/src/lean/Init/Control/ExceptCps.lean

full_name: ExceptCpsT
code: def ExceptCpsT (ε : Type u) (m : Type u → Type v) (α : Type u) 
goal: Type (max (u + 1) v)

full_name: ExceptCpsT.run
code: @[always_inline, inline]
def run {ε α : Type u} [Monad m] (x : ExceptCpsT ε m α) : m (Except ε α) 
goal: m (Except ε α)

full_name: ExceptCpsT.runK
code: @[always_inline, inline]
def runK {ε α : Type u} (x : ExceptCpsT ε m α) (s : ε) (ok : α → m β) (error : ε → m β) : m β 
goal: m β

full_name: ExceptCpsT.runCatch
code: @[always_inline, inline]
def runCatch [Monad m] (x : ExceptCpsT α m α) : m α 
goal: m α

full_name: ExceptCpsT.instMonad
code: @[always_inline]
instance : Monad (ExceptCpsT ε m) 
goal: Monad (ExceptCpsT ε m)

full_name: ExceptCpsT.instLawfulMonad
code: instance : LawfulMonad (ExceptCpsT σ m) 
goal: LawfulMonad (ExceptCpsT σ m)

full_name: ExceptCpsT.instMonadExceptOf
code: instance : MonadExceptOf ε (ExceptCpsT ε m) 
goal: MonadExceptOf ε (ExceptCpsT ε m)

full_name: ExceptCpsT.lift
code: @[always_inline, inline]
def lift [Monad m] (x : m α) : ExceptCpsT ε m α 
goal: ExceptCpsT ε m α

full_name: ExceptCpsT.instMonadLiftOfMonad
code: instance [Monad m] : MonadLift m (ExceptCpsT σ m) 
goal: MonadLift m (ExceptCpsT σ m)

full_name: ExceptCpsT.instInhabited
code: instance [Inhabited ε] : Inhabited (ExceptCpsT ε m α) 
goal: Inhabited (ExceptCpsT ε m α)

full_name: ExceptCpsT.run_pure
code: @[simp] theorem run_pure [Monad m] : run (pure x : ExceptCpsT ε m α) = pure (Except.ok x) 
goal: (pure x).run = pure (Except.ok x)

full_name: ExceptCpsT.run_lift
code: @[simp] theorem run_lift {α ε : Type u} [Monad m] (x : m α) : run (ExceptCpsT.lift x : ExceptCpsT ε m α) = (x >>= fun a => pure (Except.ok a) : m (Except ε α)) 
goal: (ExceptCpsT.lift x).run = do
  let a ← x
  pure (Except.ok a)

full_name: ExceptCpsT.run_throw
code: @[simp] theorem run_throw [Monad m] : run (throw e : ExceptCpsT ε m β) = pure (Except.error e) 
goal: (throw e).run = pure (Except.error e)

full_name: ExceptCpsT.run_bind_lift
code: @[simp] theorem run_bind_lift [Monad m] (x : m α) (f : α → ExceptCpsT ε m β) : run (ExceptCpsT.lift x >>= f : ExceptCpsT ε m β) = x >>= fun a => run (f a) 
goal: (ExceptCpsT.lift x >>= f).run = do
  let a ← x
  (f a).run

full_name: ExceptCpsT.run_bind_throw
code: @[simp] theorem run_bind_throw [Monad m] (e : ε) (f : α → ExceptCpsT ε m β) : run (throw e >>= f : ExceptCpsT ε m β) = run (throw e) 
goal: (throw e >>= f).run = (throw e).run

full_name: ExceptCpsT.runCatch_pure
code: @[simp] theorem runCatch_pure [Monad m] : runCatch (pure x : ExceptCpsT α m α) = pure x 
goal: (pure x).runCatch = pure x

full_name: ExceptCpsT.runCatch_lift
code: @[simp] theorem runCatch_lift {α : Type u} [Monad m] [LawfulMonad m] (x : m α) : runCatch (ExceptCpsT.lift x : ExceptCpsT α m α) = x 
goal: (ExceptCpsT.lift x).runCatch = x

full_name: ExceptCpsT.runCatch_throw
code: @[simp] theorem runCatch_throw [Monad m] : runCatch (throw a : ExceptCpsT α m α) = pure a 
goal: (throw a).runCatch = pure a

full_name: ExceptCpsT.runCatch_bind_lift
code: @[simp] theorem runCatch_bind_lift [Monad m] (x : m α) (f : α → ExceptCpsT β m β) : runCatch (ExceptCpsT.lift x >>= f : ExceptCpsT β m β) = x >>= fun a => runCatch (f a) 
goal: (ExceptCpsT.lift x >>= f).runCatch = do
  let a ← x
  (f a).runCatch

full_name: ExceptCpsT.runCatch_bind_throw
code: @[simp] theorem runCatch_bind_throw [Monad m] (e : β) (f : α → ExceptCpsT β m β) : runCatch (throw e >>= f : ExceptCpsT β m β) = pure e 
goal: (throw e >>= f).runCatch = pure e