Dimension

Description

Dimension is an option of several functions and denotes the space-time dimension. Possible settings are: 4, n, d, D, ... ,the variable does not matter, but it should have Head Symbol.

Options[MetricTensor]

MetricTensor[m, n, Dimension -> d] 
        DiracMatrix[α, Dimension -> d] // FCI

The dimension of the indices is not shown by default but can be inspected easily.

MetricTensor[m, n, Dimension -> d] 
        DiracMatrix[α, Dimension -> d] // StandardForm

Setting the global variable $LorentzIndices to True will display the dimension (if different from 4) as a subscript.

$LorentzIndices = True;

MetricTensor[α, β, Dimension -> n] 
      DiracMatrix[α, Dimension -> n]

% // StandardForm

$LorentzIndices = False;