The boldsymbol and pmb commands  are defined by the amsbsy package (also loaded by amsmath). The boldsymbol command is used to obtain bold numbers and other nonalphabetic symbols, as well as bold Greek letters, which cannot be made bold via the mathbf command.

It can also be used to obtain bold math italic letters.

The availability of bold symbols varies on different systems depending on whether or not suitable fonts are installed. The boldsymbol command should usually work fine for the common math symbols at 10pt size or larger, but if you find that it is not having the desired effect for a particular symbol, you could either (a) verify that the necessary fonts are available and properly installed; or (b) use pmb: ``poor man's bold'', which works by printing multiple copies of the same symbol with slight offsets.

A_\infty + \pi A_0
\sim \mathbf{A}_{\boldsymbol{\infty}} \boldsymbol{+}
  \boldsymbol{\pi} \mathbf{A}_{\boldsymbol{0}}
\sim\pmb{A}_{\pmb{\infty}} \pmb{+}\pmb{\pi} \pmb{A}_{\pmb{0}}