This is abbreviated notation for a 1ptdimension, as included in latex.ltx (originally in plain.tex) and therefore common to all LaTeX documents:
\newdimen\p@ \p@=1pt % this saves macro space and time
\newdimen\z@ \z@=0pt % can be used both for 0pt and 0
As such, you can use it in calculation with dimensions, such that 60\p@ translates to 60 times 1pt, or 60pt. In a similar fashion, \z@ provides a 0pt dimension.
Using
\makeatletter
\show\p@
\makeatother
yields
\p@=\dimen11
indicating that it is a TeX dimension (number 11). Consequently, issuing \showthe\p@ yields 1.0pt in your .log.
The problem in \lie[\slr[2]] is that the optional argument to \lie is taken to be \slr[2. You can solve the issue with xparse:
\documentclass{article}
\usepackage{amsmath,amssymb,xparse}
\DeclareMathOperator{\slrop}{\mathbf{SL}}
\DeclareMathOperator{\lieop}{\mathbf{L}}
\NewDocumentCommand{\slr}{O{n}}{\slrop(#1,\mathbb{R})}
\NewDocumentCommand{\lie}{O{G}}{\lieop(#1)}
\begin{document}
Here it is: $\lie[\slr]$
With optional argument: $\lie[\slr[2]]$
\end{document}
I removed \ensuremath as I believe that you gain nothing from using \lie in text rather than $\lie$; to the contrary, I firmly believe that the latter form is much better, because math is always treated as math.
Best Answer
the names come from lisp.
In lisp, car returns the head of a list, cdr returns the tail of a list and nil is an empty list.
in latex
(
\@nil
is not defined at all)so
expands to
a
and
expands to
bc