Cslib.FreeM.foldFreeM_lift
theoremverifiedformalizationimported Lean
Cslib.FreeM.foldFreeM_lift
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in universe u v w w' in variable {F : Type u → Type v} {ι : Type u} {α : Type w} {β : Type w'} in @[simp] theorem Cslib.FreeM.foldFreeM_lift (onValue : ι → β) (onEffect : {ι : Type u} → F ι → (ι → β) → β) (op : F ι) : foldFreeM onValue onEffect (lift op) = onEffect op onValue
- Formalizes
- CSLib, `Cslib.FreeM.foldFreeM_lift`
- Lean proof
- By Tanner Duve, 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.foldFreeM_lift← Cslib.FreeM.foldFreeM_lift (Cslib/Foundations/Control/Monad/Free/Fold.lean:81): verbatim
- Verified
- 08 Oct 2026
- Axioms
- none — Lean reports it depends on no axioms
- Built on 29
- Cslib.FreeM.liftM_seqLeftCslib.FreeM.liftM_seqLeft
- Cslib.FreeM.liftM_bindCslib.FreeM.liftM_bind
- Cslib.FreeM.foldFreeM_lift_bindCslib.FreeM.foldFreeM_lift_bind
- Cslib.FreeM.foldFreeM_lift_bind'Cslib.FreeM.foldFreeM_lift_bind'
- Cslib.FreeM.liftM_seqRightCslib.FreeM.liftM_seqRight
- Cslib.FreeM.liftM_liftCslib.FreeM.liftM_lift
- Cslib.FreeM.liftM_seqCslib.FreeM.liftM_seq
- Cslib.FreeM.liftM_mapCslib.FreeM.liftM_map
- Cslib.FreeM.foldFreeMFold function for the
FreeMmonad - Cslib.FreeM.liftLift an operation from the effect signature
Finto theFreeM Fmonad. - Cslib.FreeM.pure_eq_pureCslib.FreeM.pure_eq_pure
- Cslib.FreeM.bind_eq_bindNote that this lemma does not always apply, as it is universe-constrained by
Bind.bind. - Cslib.FreeM.map_eq_mapNote that this lemma does not always apply, as it is universe-constrained by
Functor.map. - Cslib.FreeM.liftBind_eqCslib.FreeM.liftBind_eq
- Cslib.FreeM.pure_bind
.pure afollowed bybindcollapses immediately. - Cslib.FreeM.bind_pureCslib.FreeM.bind_pure
- Cslib.FreeM.bind_pure_compCslib.FreeM.bind_pure_comp
- Cslib.FreeM.map_pureCslib.FreeM.map_pure
- Cslib.FreeM.map_bindCslib.FreeM.map_bind
- Cslib.FreeM.id_mapCslib.FreeM.id_map
- Cslib.FreeM.liftM_pureCslib.FreeM.liftM_pure
- Cslib.FreeM.liftM_lift_bindCslib.FreeM.liftM_lift_bind
- Cslib.FreeM.foldFreeM_pureCslib.FreeM.foldFreeM_pure
- Cslib.FreeM.instPureCslib.FreeM.instPure
- Cslib.FreeM.instBindCslib.FreeM.instBind
- Cslib.FreeM.instFunctorCslib.FreeM.instFunctor
- Cslib.FreeM.instLawfulFunctorCslib.FreeM.instLawfulFunctor
- Cslib.FreeM.instMonadCslib.FreeM.instMonad
- Cslib.FreeM.instLawfulMonadCslib.FreeM.instLawfulMonad
- Used by 1
- Cslib.FreeM.foldFreeM_uniqueUniversal Property: If
h : FreeM F α → βsatisfies: *h (pure a) = onValue a*…
- Cslib.FreeM.foldFreeM_uniqueUniversal Property: If
Lean source view module on GitHub
set_option autoImplicit true in set_option relaxedAutoImplicit true in universe u v w w' in variable {F : Type u → Type v} {ι : Type u} {α : Type w} {β : Type w'} in @[simp] theorem Cslib.FreeM.foldFreeM_lift (onValue : ι → β) (onEffect : {ι : Type u} → F ι → (ι → β) → β) (op : F ι) : foldFreeM onValue onEffect (lift op) = onEffect op onValue := rfl