Cslib.FreeM.lift
defimported Lean
Lift an operation from the effect signature F into the FreeM F monad.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in universe u v w w' w'' in variable {F : Type u → Type v} {ι : Type u} {α : Type w} {β : Type w'} {γ : Type w''} in def Cslib.FreeM.lift (op : F ι) : FreeM F ι
- Defined in
- CSLib, `Cslib.FreeM.lift`
- Lean proof
- By Tanner Duve, Eric Wieser, from github.com/leanprover/cslib at
3951377e5a3f(Copyright (c) 2025 Tanner Duve. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.33.0.Cslib.FreeM.lift← Cslib.FreeM.lift (Cslib/Foundations/Control/Monad/Free.lean:136): verbatim
- Verified
- 08 Oct 2026
- Axioms
- none listed
- Built on 4
- Cslib.FreeM.instFunctorCslib.FreeM.instFunctor
- Cslib.FreeM.instBindCslib.FreeM.instBind
- Cslib.FreeM.instPureCslib.FreeM.instPure
- Cslib.FreeMThe Free monad over a type constructor
F. AFreeM F ais a tree of operations from the type constructorF, with leaves of typea.…
- Used by 37
- Cslib.FreeM.FreeCont.run_bindCslib.FreeM.FreeCont.run_bind
- Cslib.FreeM.liftM_lift_bindCslib.FreeM.liftM_lift_bind
- Cslib.FreeM.liftM_bindCslib.FreeM.liftM_bind
- Cslib.FreeM.FreeWriter.tellWrites a log entry. This creates an effectful node in the computation tree.
- Cslib.FreeM.FreeState.run'_setCslib.FreeM.FreeState.run'_set
- Cslib.FreeM.liftBind_eqCslib.FreeM.liftBind_eq
- Cslib.FreeM.FreeWriter.tell_defCslib.FreeM.FreeWriter.tell_def
- Cslib.FreeM.comp_mapCslib.FreeM.comp_map
- Cslib.FreeM.bind_pureCslib.FreeM.bind_pure
- Cslib.FreeM.foldFreeM_lift_bindCslib.FreeM.foldFreeM_lift_bind
- Cslib.FreeM.FreeReader.read_defCslib.FreeM.FreeReader.read_def
- Cslib.FreeM.Interprets.eqCslib.FreeM.Interprets.eq
- Cslib.FreeM.foldFreeM_lift_bind'Cslib.FreeM.foldFreeM_lift_bind'
- Cslib.FreeM.FreeWriter.run_lift_tellCslib.FreeM.FreeWriter.run_lift_tell
- Cslib.FreeM.FreeWriter.run_bindCslib.FreeM.FreeWriter.run_bind
- Cslib.FreeM.Interprets.liftMCslib.FreeM.Interprets.liftM
- Cslib.FreeM.inductionAn override for the default induction principle that is in simp-normal form. Note that when
αandιare in the same universe, this… - Cslib.FreeM.FreeState.instMonadStateOfCslib.FreeM.FreeState.instMonadStateOf
- Cslib.FreeM.FreeState.run'_getCslib.FreeM.FreeState.run'_get
- Cslib.FreeM.FreeState.run_bindCslib.FreeM.FreeState.run_bind
- Cslib.FreeM.liftM_liftCslib.FreeM.liftM_lift
- Cslib.FreeM.FreeState.run_setCslib.FreeM.FreeState.run_set
- Cslib.FreeM.FreeCont.run_toContTThe canonical interpreter
toContTderived fromliftMagrees with the hand-written recursive interpreterrunforFreeCont. - Cslib.FreeM.FreeCont.run_callCC
runof acallCCnode simplifies to running the handler with the current continuation. - Cslib.FreeM.id_mapCslib.FreeM.id_map
- Cslib.FreeM.InterpretsA predicate stating that
interp : FreeM F α → m αis an interpreter for the effect handlerhandler : ∀ {α}, F α → m α. This means that… - Cslib.FreeM.bind_assocCslib.FreeM.bind_assoc
- Cslib.FreeM.foldFreeM_liftCslib.FreeM.foldFreeM_lift
- Cslib.FreeM.FreeCont.callCCCall with current continuation for the Free continuation monad.
- Cslib.FreeM.FreeState.set_defCslib.FreeM.FreeState.set_def
- Cslib.FreeM.foldFreeM_uniqueUniversal Property: If
h : FreeM F α → βsatisfies: *h (pure a) = onValue a*… - Cslib.FreeM.FreeState.run_getCslib.FreeM.FreeState.run_get
- Cslib.FreeM.FreeState.get_defCslib.FreeM.FreeState.get_def
- Cslib.FreeM.FreeWriter.listen_lift_tell_bindCslib.FreeM.FreeWriter.listen_lift_tell_bind
- Cslib.FreeM.FreeCont.run_lift_callCCCslib.FreeM.FreeCont.run_lift_callCC
- Cslib.FreeM.FreeReader.instMonadReaderOfCslib.FreeM.FreeReader.instMonadReaderOf
- Cslib.FreeM.FreeWriter.run_toWriterTThe canonical interpreter
toWriterTderived fromliftMagrees with the hand-written recursive interpreterrunforFreeWriter.
Lean source view module on GitHub
set_option autoImplicit true in set_option relaxedAutoImplicit true in universe u v w w' w'' in variable {F : Type u → Type v} {ι : Type u} {α : Type w} {β : Type w'} {γ : Type w''} in /-- Lift an operation from the effect signature `F` into the `FreeM F` monad. -/ def Cslib.FreeM.lift (op : F ι) : FreeM F ι := .liftBind op pure