Categories Great and Small
Prev: Types and Functions Next: Kleisli Categories
Prev: Types and Functions Next: Kleisli Categories
Exercises
- Generate a free category from:
- A graph with one node and no edges
- A graph with one node and one (directed) edge (hint: this edge can be composed with itself)
- A graph with two nodes and a single arrow between them
- A graph with a single node and 26 arrows marked with the letters of the alphabet: a, b, c … z.
- What kind of order is this?
- A set of sets with the inclusion relation: is included in if every element of is also an element of .
- C++ types with the following subtyping relation:
T1is a subtype ofT2if a pointer toT1can be passed to a function that expects a pointer toT2without triggering a compilation error.
- Considering that
Boolis a set of two valuesTrueandFalse, show that it forms two (set-theoretical) monoids with respect to, respectively, operator&&(AND) and||(OR). - Represent the
Boolmonoid with the AND operator as a category: List the morphisms and their rules of composition. - Represent addition modulo 3 as a monoid category.