1.2. Basis objects and basis indices
Now that we have bases, we can use basis vectors and work with tensor componentes. Two new kinds of indices are needed:
{a, basisname} : Basis index (BIndex), a is an abstract index.
{i, basisname} : Component index (CIndex), i is a valid coordinate number.
When we define a basis in the tangent bundle, its dual in the cotangent bundle is also automatically defined. This dual basis is called -basisname and has the same cnumbers as the original. The notation for covariant bc-indices is
{-a, -basisname} : Basis index (BIndex), a is an abstract index.
{i, -basisname} : Component index (CIndex), i is a valid coordinate number.
Notice how a covariant b-index is -1 * (corresponding contravariant index), but this is not true for c-indices. This apparent inconsistency is a conscious choice: it allows us to use zero and negative cnumbers (the latter being common in treatments of angular momentum, tensor harmonics, etc.)
NOTE: In versions 0.3 and 0.4 we used b-indices like {a, polar}, {-a, polar} and c-indices like {1, polar} and {-1, polar}. This notational change is not backwards compatible. We apologize to those users of xCoba` who now need to change lots of signs in previously developed notebooks, but we feel that the use of this new notation will pay off.
Several functions are provided to check the validity.
In[63]:=
Out[63]=
In[64]:=
In[65]:=
Out[65]=
In[66]:=
Out[66]=
In[67]:=
Out[67]=
An extra function selects both basis and component indices,
In[68]:=
Out[68]=
On ocassion, it is interesting to know whether an index is either an AIndex or a BIndex. Those are the only types that may be contracted, which makes them important for functions such as ContractBasis. We will call them `contractible indices'.
In[69]:=
Out[69]=
Notice that we can get a False output for several reasons: The basis, abstract index or cnumber might not exist or they might belong to different vbundles.
If we use these indices inside of tensors, Mathematica will display them according to BasisColor,
In[70]:=
Out[70]=
Objects like those in the previous output can be seen as contractions of the tensor with some kind of basis object. xCoba` provides Basis, a 1-covariant, 1-contravariant symmetric tensor. Its meaning depends on the type of indices used:
- Basis[ AIndex, BCIndex] : Basis vector (or dual basis covector).
- Basis[ AIndex, AIndex]: Identity tensor in the corresponding vbundle (turns into δ).
- Basis[ BCIndex, BCIndex]: If the indices belong to different bases, it represents a basis change.
If they belong to the same basis, we have a Kronecker delta (products of the elements of dual bases).
Basis is output as an e:
In[71]:=
Out[71]=
If both indices are abstract, a different symbol (δ) is used. The reason for this is twofold: mathematical and computational. Basis has a lot of associated rules and definitions; if we added to them those of δ, we would have to perform many checks each time one of these objects appeared, thus slowing down the operation. Notice how Basis is Orderless. Indeed, some authors even write its indices stacked rather than staggered.
In[72]:=
Out[72]=
A Basis object with two indices of the same character is converted into a metric tensor. If we have defined more than one metric, the first one is used (see xTensorDoc.nb for details)
In[73]:=
In[74]:=
In[75]:=
Out[75]=
In[76]:=
Basis is considered to be a tensor whose master is Symbol, so it cannot be undefined:
In[77]:=
Out[77]=
In[78]:=
Out[78]=
The bracket of two basis vector fields is automatically converted into a torsion tensor (structure coefficients). This tensor is associated with the PD of the basis
In[79]:=
Out[79]=
In[80]:=
Out[80]=
If and only if the basis is coordinated, its torsion tensor will be Zero.
Basis and Dir act as inverses of each other
In[81]:=
Out[81]=
In[82]:=
Out[82]=
An important issue is when to contract Basis objects with other tensors and with one another:
In[83]:=
Out[83]=
It would be desirable to automatize this behaviour sometimes. We can do it with the command AutomaticBasisContractionStart[]:
AutomaticBasisContractionStart Start automatic contraction of Basis objects
AutomaticBasisContractionStop Stop automatic contraction of Basis objects
Contraction of Basis objects
In[84]:=
In[85]:=
Out[85]=
In[86]:=
When the contraction is between a Basis object and a different tensor, it is only performed if the former is a formal Kronecker delta or an identity tensor,
In[87]:=
Out[87]=
To force the contraction in the last two cases we need a new function (next section). Notice how the third contraction is equivalent to expressing a tensor in its components and the fourth represents a basis change.
We can define a special name for the elements of one particular basis.
In[88]:=
In[89]:=
Out[89]=
In[90]:=
In[91]:=
Out[91]=
We remove the special names:
In[92]:=
Created by Mathematica (May 16, 2008) | ![]() |