AlgebraicJulia / Catlab.jl

A framework for applied category theory in the Julia language
https://www.algebraicjulia.org
MIT License
614 stars 58 forks source link

Feature Request: Implement *finite* categories #782

Open diracdeltafunk opened 1 year ago

diracdeltafunk commented 1 year ago

It would be useful to have an implementation for finite categories, that is, categories with finitely many objects and finitely many morphisms.

The importance of such categories is that they are closed under many constructions (finite limits of finite categories always exist, as do finite colimits, duals, internal homs, etc.), and all questions about them are decidable (completeness, connectedness, etc.).

Potential Use Case

This sort of things happens often in other disciplines, e.g. algebraic geometers and commutative algebraists use Macaulay2 and Singular to run computations like these, and group theorists use GAP. Category theorists (currently) have no such tool.


I suggest (as was also recommended by @KevinArlin on Zulip) that a finite category be implemented internally by storing:

With this in place, the aforementioned constructions should not be too hard to implement, nor should it be very difficult to write code to check the aforementioned properties.

Wishlist:

Please note that I am beginner in both Julia and Catlab, so I may be overlooking some important details! I'm happy to help implement things wherever I can, but I think it would be unwise for me to get this off the ground, just because I'm completely unfamiliar with this codebase, and best practices for Julia in general.