Categories by Kan extension
Categories can be identified—up to isomorphism—with polynomial comonads on . The left Kan extension of a functor along itself is always a comonad—called the density comonad—so it defines a category when its carrier is polynomial. We provide a number of generalizations of this to produce new categories from old, as well as from distributive laws of monads over comonads. For example, all Lawvere theories, all product completions of small categories, and the simplicial indexing category arise in this way. Along the way, we will see various constructions of non-polynomial comonads as well.