Set first two sets of coordinates:
You can now represent the 4-vectors and by using - say for - either or SpaceTimeVector[mu](X).
In the output above, note that the default differentiation variables are omitted in the display of d_, as well as that of dAlembertian.
Use the inert %diff notation so the derivative is not performed until you activate it by using the value command.
Only the default differentiation variables are omitted in the display of d_ and dAlembertian, so in the following example, is displayed.
Independently of using SpaceTimeVector[mu](X) or the equivalent X[mu] to indicate the dependency of some functions or as differentiation variables, these objects can enter any algebraic computations to representing tensors with 1 index). For example:
The 1st contravariant and covariant components are respectively represented by indexing SpaceTimeVector with the numbers ~1 and 1
To understand the result above, display the current spacetime metric g_ matrix
Compute the derivative with respect to the 1st contravariant component of , that is . Recalling, contravariant differentiation coordinates are the ones entering the covariant differentiation operator . For illustration purposes use the inert form of d_ and diff, prefixing the commands with % and perform the computation using value
You can also represent x1 with SpaceTimeVector[~1](X), and when differentiating with respect to contravariant components of the spacetime vector you can represent them directly with X[~mu] because ~1, ~2, etc. are viewed by the system as symbols (in this context, contravariant indices) not selecting numbers