Author: Ernesto Posse
This module contains the categorical definitions of colimits. For a formal definition see:
Note: it contains the only the classes that represent colimits, not the algorithms that compute them. For these, see the ‘diagrams’ module.
In particular, the argument to the CoLimit constructor is not the diagram of which the colimit is a colimit of. Instead the arguments are the elements that form a colimit, namely an object and a family of arrows, together with the function that computes the unique arrow to any other cone:
CoLimit(object, arrows, unique_arrow_func, category)
To obtain the colimit of a diagram, one must create an instance of diagram and invoke the colimit method on that instance. This method must return a CoLimit instance.
New: for ease of use, I added a functional interface to compute colimits.