Finite Presheaf categories as a nice setting for doing generic programming - Menni, Matías (1997)
The purpose of this paper is to describe how some theorems about constructions in categories can be seen as a way of doing generic programming. No prior knowledge of category theory is required to understand the paper. We explore the class of nite presheaf categories. Each of these categories can be seen as a type or universe of structures parameterized by a diagram (actually a nite category) C. Examples of these categories are: graphs, labeled graphs, nite automata and evolutive sets. Limits and colimits are very general ways of combining objects in categories in such a way that a new object is built and satis es a certain universal property. When con- centrating on nite presheaf categories and interpreting them as types or structures, limits and colimits can be interpreted as very general operations on types. Theorems on the construction of limits and colimits in arbitrary categories will provide a generic implementation of these operations. Also, nite presheaf categories are toposes. Because of this, each of these categories has an internal logic. We are going to show that some theorems about the truth of sentences of this logic can be interpreted as a way an implementing a generic theorem prover. The paper discusses non trivial theorems and de nitions from category and topos theory but the emphasis is put on their computational content and in what way they provide rich and abstract data structures and algorithms.