Cslib.FreeM.comp_map
theoremverifiedformalizationimported Lean
Cslib.FreeM.comp_map
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 theorem Cslib.FreeM.comp_map (h : β → γ) (g : α → β) : ∀ x : FreeM F α, map (h ∘ g) x = map h (map g x)
- Formalizes
- CSLib, `Cslib.FreeM.comp_map`
- 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.comp_map← Cslib.FreeM.comp_map (Cslib/Foundations/Control/Monad/Free.lean:191): verbatim
- Verified
- 08 Oct 2026
- Axioms
Quot.soundpropext- Built on 15
- Cslib.FreeM.instFunctorCslib.FreeM.instFunctor
- Cslib.FreeM.mapMap a function over a
FreeMmonad. The builtin<$>notation should be preferred whenαandβare in the same universe. - Cslib.FreeM.liftBind_eqCslib.FreeM.liftBind_eq
- Cslib.FreeM.bind_pureCslib.FreeM.bind_pure
- Cslib.FreeM.bind_eq_bindNote that this lemma does not always apply, as it is universe-constrained by
Bind.bind. - Cslib.FreeM.instBindCslib.FreeM.instBind
- Cslib.FreeM.map_eq_mapNote that this lemma does not always apply, as it is universe-constrained by
Functor.map. - Cslib.FreeM.map_bindCslib.FreeM.map_bind
- Cslib.FreeM.map_pureCslib.FreeM.map_pure
- Cslib.FreeM.id_mapCslib.FreeM.id_map
- Cslib.FreeM.bindBind operation for the
FreeMmonad. The builtin>>=notation should be preferred whenαandβare in the same universe. - Cslib.FreeM.instPureCslib.FreeM.instPure
- Cslib.FreeM.liftLift an operation from the effect signature
Finto theFreeM Fmonad. - Cslib.FreeM.bind_pure_compCslib.FreeM.bind_pure_comp
- 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 2
- Cslib.FreeM.instLawfulFunctorCslib.FreeM.instLawfulFunctor
- PFunctor.FreeM.comp_mapPFunctor.FreeM.comp_map
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
set_option autoImplicit true inset_option relaxedAutoImplicit true inuniverse u v w w' w'' invariable {F : Type u → Type v} {ι : Type u} {α : Type w} {β : Type w'} {γ : Type w''} intheorem Cslib.FreeM.comp_map (h : β → γ) (g : α → β) : ∀ x : FreeM F α, map (h ∘ g) x = map h (map g x) | .pure a => rfl | .liftBind op cont => by simp [map, comp_map]