News for hackers. Stuff that matters.
Re:Category Theory, Syntactically (2016) by agumonkey on Thursday April 27, 2017 @09:05AM (#14211140)
So it's more a generalization of Groups right ?
Re:Category Theory, Syntactically (2016) by stabbles on Thursday April 27, 2017 @09:23AM (#14211241)
A monoid (weaker than group: doesn't need to have an inverse) is an example of a category, with a single object G (namely the underlying set) and a lot of arrows from G -> G.

If you take the natural numbers N = {0, 1, ...} as a set and + as a binary operator forming a monoid (N, +, 0), then the arrows would correspond to (. + 0), (. + 1), (. + 2) etc. Here (. + 0) can be seen as the identity arrow, and composition of arrows (. + a) and (. + b) yields a new arrow (. + (a+b)).

Re:Category Theory, Syntactically (2016) by ihm on Thursday April 27, 2017 @11:22AM (#14212153)
Yes, roughly. You can think about a category like a group which carries around "type parameters" to say which "elements" you can and can't multiply. Also, "elements" may not be invertible.

For example, for each N, there is a group of invertible N by N matrices. If we want to allow non-square matrices too, we can bundle them up as a category:

- The objects are the natural numbers

- A map from N to M is an M row by N column matrix

- We compose A : N -> M and B : M -> K by multiplying them as matrices to get BA : N -> K. The objects (i.e., the dimensions) are type checking which things we can and can't multiply

Re:Category Theory, Syntactically (2016) by jules on Thursday April 27, 2017 @12:22PM (#14212699)
There are two differences:

1) Groups have an inverse operation, categories don't.

2) You can compose any two elements in a group, whereas in a category the input and output types have to match up.

Re:Category Theory, Syntactically (2016) by tel on Thursday April 27, 2017 @10:58AM (#14211979)
The category-like generalization of the group is the groupoid: all arrows are isomorphisms.