dom and cod are the domain and codomain of a morphism. They are functions that given a morphism will return the object at the head or tail of the morphism.
I don't think that these articles are a very good self contained explanation of category theory. At the moment, I've been aiming at a supplement written in concrete python to something more thorough.
Bartosz Milewski's series https://bartoszmilewski.com/2014/10/28/category-theory-for-p...
RydeHeard and Burstall - http://www.cs.man.ac.uk/~david/categories/book/book.pdf
Milewski, Fong, and Spivak's course - http://brendanfong.com/programmingcats.html
From a mathematical perspective:
MacLane, Awodey's book, Conceptual Mathematics by Lawvere and Schanuel.
I think I started from known Haskell names, some conventions that I may have absorbed from catlab.jl and other places, and some unthoughtful accidents. I really really wanted id to be the identity, but I'm pretty sure it's a python keyword. I added a d and vowed to never speak of it again. Ever written a program about schools and had to use the variable Klass?
I don't feel too bad about mplus and mzero. It's still pretty clear that they are something like plus and zero, but the m gives you pause. And it should, since in one case mplus is in fact multiplication.
If this was rolled out into a library maybe I'd have both long and short names? I'd never want a library to have only long names for really common things. cod and dom don't actually give me a seconds pause. I like them having the same length too. Makes code prettier and easier to read. I also intend to replace some things with operators which would be even more inscrutable to a newcomer. @ has to be compose for example (to mimic numpy).
It's a built-in function, but you can overload it within a scope you control without problems:
>>> id
<built-in function id>
>>> id = 7
>>> id
7
> And it should, since in one case mplus is in fact multiplication.Good point! I take this part back.
As for having identifiers the same length, I know the urge, but usually find the superficial "elegance" it's not worth it.
Even different programming languages have different conventions (short identifiers fir C and Fortran, long ones for Java and C#), which reflect the habits and preferences of their creators and users.