> For the complete documentation index, see [llms.txt](https://isubasinghe.gitbook.io/isithas-wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://isubasinghe.gitbook.io/isithas-wiki/math/category_theory.md).

# category theory

## Basic idea

Category theory studies mathematical structures through objects and the morphisms between them. Its central discipline is compositional: definitions are expressed by how maps compose rather than by inspecting the internal representation of objects.

## Key formulas

* A category has objects, morphisms $f:A\to B$, identities $1\_A$, and composition $g\circ f$.
* Associativity: $h\circ(g\circ f)=(h\circ g)\circ f$.
* Identity: $f\circ1\_A=f=1\_B\circ f$.
* An isomorphism $f:A\to B$ has an inverse $f^{-1}$ with both composites equal to identities.
* Products, coproducts, limits, and adjunctions are characterized by universal properties.
* Yoneda identifies natural transformations from a hom-functor with elements of the target functor.
* Co-Yoneda reconstructs a functor as a coend of representables weighted by its values.
* Initial algebras support folds over inductive structures; final coalgebras support unfolds and coinductive behavior.

## Resources

<https://en.wikipedia.org/wiki/Category_theory>
