Algebras of endofunctors #
This file defines (co)algebras of an endofunctor, and provides the category instance for them.
It also defines the forgetful functor from the category of (co)algebras. It is shown that the
structure map of the initial algebra of an endofunctor is an isomorphism. Furthermore, it is shown
that for an adjunction F β£ G the category of algebras over F is equivalent to the category of
coalgebras over G.
TODO #
- Prove that if the countable infinite product over the powers of the endofunctor exists, then algebras over the endofunctor coincide with algebras over the free monad on the endofunctor.
An algebra of an endofunctor; str stands for "structure morphism"
- a : C
carrier of the algebra
structure morphism of the algebra
Instances For
A morphism between algebras of endofunctor F
underlying morphism between the carriers
- h : CategoryStruct.comp (F.map self.f) Aβ.str = CategoryStruct.comp Aβ.str self.f
compatibility condition
Instances For
compatibility condition
The identity morphism of an algebra of endofunctor F
Instances For
The composition of morphisms between algebras of endofunctor F
Instances For
Algebras of an endofunctor F form a category
To construct an isomorphism of algebras, it suffices to give an isomorphism of the As which commutes with the structure morphisms.
Instances For
The forgetful functor from the category of algebras, forgetting the algebraic structure.
Instances For
An algebra morphism with an underlying isomorphism hom in C is an algebra isomorphism.
An algebra morphism with an underlying epimorphism hom in C is an algebra epimorphism.
An algebra morphism with an underlying monomorphism hom in C is an algebra monomorphism.
From a natural transformation Ξ± : G β F we get a functor from
algebras of F to algebras of G.
Instances For
The identity transformation induces the identity endofunctor on the category of algebras.
Instances For
A composition of natural transformations gives the composition of corresponding functors.
Instances For
If Ξ± and Ξ² are two equal natural transformations, then the functors of algebras induced by them
are isomorphic.
We define it like this as opposed to using eq_to_iso so that the components are nicer to prove
lemmas about.
Instances For
Naturally isomorphic endofunctors give equivalent categories of algebras.
Furthermore, they are equivalent as categories over C, that is,
we have equiv_of_nat_iso h β forget = forget.
Instances For
The inverse of the structure map of an initial algebra
Instances For
The structure map of the initial algebra is an isomorphism, hence endofunctors preserve their initial algebras
A coalgebra of an endofunctor; str stands for "structure morphism"
- V : C
carrier of the coalgebra
structure morphism of the coalgebra
Instances For
A morphism between coalgebras of an endofunctor F
underlying morphism between two carriers
- h : CategoryStruct.comp Vβ.str (F.map self.f) = CategoryStruct.comp self.f Vβ.str
compatibility condition
Instances For
compatibility condition
The identity morphism of an algebra of endofunctor F
Instances For
The composition of morphisms between algebras of endofunctor F
Instances For
Coalgebras of an endofunctor F form a category
To construct an isomorphism of coalgebras, it suffices to give an isomorphism of the Vs which commutes with the structure morphisms.
Instances For
The forgetful functor from the category of coalgebras, forgetting the coalgebraic structure.
Instances For
A coalgebra morphism with an underlying isomorphism hom in C is a coalgebra isomorphism.
An algebra morphism with an underlying epimorphism hom in C is an algebra epimorphism.
An algebra morphism with an underlying monomorphism hom in C is an algebra monomorphism.
From a natural transformation Ξ± : F β G we get a functor from
coalgebras of F to coalgebras of G.
Instances For
The identity transformation induces the identity endofunctor on the category of coalgebras.
Instances For
A composition of natural transformations gives the composition of corresponding functors.
Instances For
If Ξ± and Ξ² are two equal natural transformations, then the functors of coalgebras induced by
them are isomorphic.
We define it like this as opposed to using eq_to_iso so that the components are nicer to prove
lemmas about.
Instances For
Naturally isomorphic endofunctors give equivalent categories of coalgebras.
Furthermore, they are equivalent as categories over C, that is,
we have equiv_of_nat_iso h β forget = forget.
Instances For
The inverse of the structure map of a terminal coalgebra
Instances For
The structure map of the terminal coalgebra is an isomorphism, hence endofunctors preserve their terminal coalgebras
Given an adjunction F β£ G, the functor that associates to an algebra over F a
coalgebra over G defined via adjunction applied to the structure map.
Instances For
Given an adjunction F β£ G, the functor that associates to a coalgebra over G an algebra over
F defined via adjunction applied to the structure map.
Instances For
Given an adjunction, assigning to an algebra over the left adjoint a coalgebra over its right adjoint and going back is isomorphic to the identity functor.
Instances For
Given an adjunction, assigning to a coalgebra over the right adjoint an algebra over the left adjoint and going back is isomorphic to the identity functor.
Instances For
If F is left adjoint to G, then the category of algebras over F is equivalent to the
category of coalgebras over G.