The object dim is a method function.
The source of this document is in Macaulay2Doc/functions/dim-doc.m2:16:0.