IndexType
represents a type of a single index. It encodes mathematical nature of indices with different types (e.g. Lorentz, SU(N) etc.). One can print all available index types as follows:
println IndexType.values()
> [LatinLower, LatinUpper, GreekLower, GreekUpper, Matrix1, Matrix2, Matrix3, Matrix4]
If two indices have different types, then they have different mathematical nature. Thus, for example, two tensors f_ab
and f_AB
have different mathematical nature and one can not rename indices of tensor f_ab
to _AB
. This, in turn, enables us to associate different space dimensions with different index types:
//dimension for Latin lower case indices def dimLower = 'd^a_a = X'.t //dimension for Latin upper case indices def dimUpper = 'd^A_A = Y'.t //expression contains both lower and upper case indices def t = 'g_ab*g^ab + g_AB*g^AB'.t t = (EliminateMetrics & dimLower & dimUpper) >> t println t
> X + YBy default, all types except
Matrix
are metric, and a corresponding metric tensor is set up (g_ab
for LatinLower
, g_\\alpha\\beta
for Greek lower etc.).
In order to obtain IndexType
of a particular index one can use .type
property; in order to check whether IndexType
is metric, one can use isMetric()
method:
def indices = '''_{a}^{A \\alpha}_{a'} '''.si println indices.collect { [[type: it.type, metric: it.type.isMetric()]] }
> [[[type:LatinLower, metric:true]], [[type:LatinUpper, metric:true]], [[type:GreekLower, metric:true]], [[type:Matrix1, metric:false]]]
The possible values of IndexType
are:
IndexType | Description |
LatinLower |
Latin lower case indices from a to z and subscripted like a_{12} etc. |
LatinUpper |
Latin upper case indices from A to Z and subscripted like X_{12} etc. |
GreekLower |
Greek lower case indices like \\alpha , \\theta and subscripted like \\rho_{123} etc. |
GreekUpper |
Greek upper case indices like \\Lambda , \\Theta and subscripted like \\Psi_{123} etc. Note, that some letters are excluded since they have same UTF8 representation as Latin letters (e.g. capital alpha to beta). |
Matrix1 |
Latin lower case indices with strokes from a' to z' and subscripted like a'_{12} etc. |
Matrix2 |
Latin upper case indices with strokes like A' or E'_{12} . |
Matrix3 |
Greek lower case indices with strokes like \\alpha' or \\theta'_{12} . |
Matrix4 |
Greek upper case indices with strokes like \\Lambda' or \\Psi'_{12} . |
By default all Matrix
index types are used for matrix indices and there is no metric specified for indices of Matrix
types.