Eilenberg-Moore (co)algebras for a (co)monad #
This file defines Eilenberg-Moore (co)algebras for a (co)monad, and provides the category instance for them.
Further it defines the adjoint pair of free and forgetful functors, respectively from and to the original category, as well as the adjoint pair of forgetful and cofree functors, respectively from and to the original category.
References #
- [Riehl, Category theory in context, Section 5.2.4][riehl2017]
An Eilenberg-Moore algebra for a monad T
.
cf Definition 5.2.3 in [Riehl][riehl2017].
- A : C
The underlying object associated to an algebra.
- a : T.obj self.A ⟶ self.A
The structure morphism associated to an algebra.
- unit : CategoryTheory.CategoryStruct.comp (T.η.app self.A) self.a = CategoryTheory.CategoryStruct.id self.A
The unit axiom associated to an algebra.
- assoc : CategoryTheory.CategoryStruct.comp (T.μ.app self.A) self.a = CategoryTheory.CategoryStruct.comp (T.map self.a) self.a
The associativity axiom associated to an algebra.
Instances For
The unit axiom associated to an algebra.
The associativity axiom associated to an algebra.
A morphism of Eilenberg–Moore algebras for the monad T
.
- f : A.A ⟶ B.A
The underlying morphism associated to a morphism of algebras.
- h : CategoryTheory.CategoryStruct.comp (T.map self.f) B.a = CategoryTheory.CategoryStruct.comp A.a self.f
Compatibility with the structure morphism, for a morphism of algebras.
Instances For
Compatibility with the structure morphism, for a morphism of algebras.
The identity homomorphism for an Eilenberg–Moore algebra.
Equations
- CategoryTheory.Monad.Algebra.Hom.id A = { f := CategoryTheory.CategoryStruct.id A.A, h := ⋯ }
Instances For
Equations
- CategoryTheory.Monad.Algebra.Hom.instInhabited A = { default := { f := CategoryTheory.CategoryStruct.id A.A, h := ⋯ } }
Composition of Eilenberg–Moore algebra homomorphisms.
Equations
- f.comp g = { f := CategoryTheory.CategoryStruct.comp f.f g.f, h := ⋯ }
Instances For
Equations
- CategoryTheory.Monad.Algebra.instCategoryStruct = CategoryTheory.CategoryStruct.mk CategoryTheory.Monad.Algebra.Hom.id (@CategoryTheory.Monad.Algebra.Hom.comp C inst T)
The category of Eilenberg-Moore algebras for a monad. cf Definition 5.2.4 in [Riehl][riehl2017].
Equations
- CategoryTheory.Monad.Algebra.eilenbergMoore = CategoryTheory.Category.mk ⋯ ⋯ ⋯
To construct an isomorphism of algebras, it suffices to give an isomorphism of the carriers which commutes with the structure morphisms.
Equations
- CategoryTheory.Monad.Algebra.isoMk h w = { hom := { f := h.hom, h := ⋯ }, inv := { f := h.inv, h := ⋯ }, hom_inv_id := ⋯, inv_hom_id := ⋯ }
Instances For
The forgetful functor from the Eilenberg-Moore category, forgetting the algebraic structure.
Equations
Instances For
The free functor from the Eilenberg-Moore category, constructing an algebra for any object.
Equations
Instances For
Equations
- T.instInhabitedAlgebra = { default := T.free.obj default }
The adjunction between the free and forgetful constructions for Eilenberg-Moore algebras for a monad. cf Lemma 5.2.8 of [Riehl][riehl2017].
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given an algebra morphism whose carrier part is an isomorphism, we get an algebra isomorphism.
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Given an algebra morphism whose carrier part is an epimorphism, we get an algebra epimorphism.
Given an algebra morphism whose carrier part is a monomorphism, we get an algebra monomorphism.
Equations
- ⋯ = ⋯
Given a monad morphism from T₂
to T₁
, we get a functor from the algebras of T₁
to algebras of
T₂
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The identity monad morphism induces the identity functor from the category of algebras to itself.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A composition of monad morphisms gives the composition of corresponding functors.
Equations
- One or more equations did not get rendered due to their size.
Instances For
If f
and g
are two equal morphisms of monads, then the functors of algebras induced by them
are isomorphic.
We define it like this as opposed to using eqToIso
so that the components are nicer to prove
lemmas about.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Isomorphic monads give equivalent categories of algebras. Furthermore, they are equivalent as
categories over C
, that is, we have algebraEquivOfIsoMonads h ⋙ forget = forget
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
An Eilenberg-Moore coalgebra for a comonad T
.
- A : C
The underlying object associated to a coalgebra.
- a : self.A ⟶ G.obj self.A
The structure morphism associated to a coalgebra.
- counit : CategoryTheory.CategoryStruct.comp self.a (G.ε.app self.A) = CategoryTheory.CategoryStruct.id self.A
The counit axiom associated to a coalgebra.
- coassoc : CategoryTheory.CategoryStruct.comp self.a (G.δ.app self.A) = CategoryTheory.CategoryStruct.comp self.a (G.map self.a)
The coassociativity axiom associated to a coalgebra.
Instances For
The counit axiom associated to a coalgebra.
The coassociativity axiom associated to a coalgebra.
A morphism of Eilenberg-Moore coalgebras for the comonad G
.
- f : A.A ⟶ B.A
The underlying morphism associated to a morphism of coalgebras.
- h : CategoryTheory.CategoryStruct.comp A.a (G.map self.f) = CategoryTheory.CategoryStruct.comp self.f B.a
Compatibility with the structure morphism, for a morphism of coalgebras.
Instances For
Compatibility with the structure morphism, for a morphism of coalgebras.
The identity homomorphism for an Eilenberg–Moore coalgebra.
Equations
- CategoryTheory.Comonad.Coalgebra.Hom.id A = { f := CategoryTheory.CategoryStruct.id A.A, h := ⋯ }
Instances For
Composition of Eilenberg–Moore coalgebra homomorphisms.
Equations
- f.comp g = { f := CategoryTheory.CategoryStruct.comp f.f g.f, h := ⋯ }
Instances For
The category of Eilenberg-Moore coalgebras for a comonad.
Equations
- CategoryTheory.Comonad.Coalgebra.instCategoryStruct = CategoryTheory.CategoryStruct.mk CategoryTheory.Comonad.Coalgebra.Hom.id (@CategoryTheory.Comonad.Coalgebra.Hom.comp C inst G)
The category of Eilenberg-Moore coalgebras for a comonad.
Equations
- CategoryTheory.Comonad.Coalgebra.eilenbergMoore = CategoryTheory.Category.mk ⋯ ⋯ ⋯
To construct an isomorphism of coalgebras, it suffices to give an isomorphism of the carriers which commutes with the structure morphisms.
Equations
- CategoryTheory.Comonad.Coalgebra.isoMk h w = { hom := { f := h.hom, h := ⋯ }, inv := { f := h.inv, h := ⋯ }, hom_inv_id := ⋯, inv_hom_id := ⋯ }
Instances For
The forgetful functor from the Eilenberg-Moore category, forgetting the coalgebraic structure.
Equations
Instances For
The cofree functor from the Eilenberg-Moore category, constructing a coalgebra for any object.
Equations
Instances For
The adjunction between the cofree and forgetful constructions for Eilenberg-Moore coalgebras for a comonad.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given a coalgebra morphism whose carrier part is an isomorphism, we get a coalgebra isomorphism.
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Given a coalgebra morphism whose carrier part is an epimorphism, we get an algebra epimorphism.
Given a coalgebra morphism whose carrier part is a monomorphism, we get an algebra monomorphism.
Equations
- ⋯ = ⋯