  We develop a general theory of categories that admit a functorial invariant
(the triangulation functor) which generalizes the tree-width of graphs. Our
triangulation functor provides a uniform construction for various
tree-width-like invariants including hypergraph tree-width, and the tree-width
of the modular quotient in the category of modular partition functions.
