CurvatureTensor - Maple Help

Tensor[CurvatureTensor] - calculate the curvature tensor of a linear connection on the tangent bundle or on a vector bundle

Calling Sequences

CurvatureTensor(g)

CurvatureTensor(C)

Parameters

g    - a metric on the tangent bundle of a manifold

C    - a connection on the tangent bundle of a manifold or on a vector bundle

Description

 • Let $\nabla$ be a connection on the tangent bundle of a manifold $M$ and let $\mathrm{χ}\left(M\right)$ be the module of all vector fields on $M$. The curvature tensor of $\nabla$is the type $\left(1,3\right)$ tensor $R$ (contravariant rank 1, covariant rank 3) which, when viewed as a linear map $R:\mathrm{χ}\left(M\right)×\mathrm{χ}\left(M\right)\to L\left(\mathrm{χ}\left(M\right)\right)$, is given by

Here, $Y$, and $Z$ are vector fields on and $L$ denotes the set of linear mappings $L:\mathrm{\chi }\left(M\right)\to \mathrm{\chi }\left(M\right)$.

 • More generally, let $\nabla$ be a connection on a vector bundle $E\to M$ and let $\mathrm{Σ}\left(E\right)$ be the module of all sections of $E$. The curvature tensor of $\nabla ,$ when viewed as a linear map $\mathrm{Ω}:\mathrm{χ}\left(M\right)×\mathrm{χ}\left(M\right)\to L\left(\mathrm{Σ}\left(E\right)\right)$, is given by

Here $X$ and $Y$ are vector fields on $M$ and $\mathrm{σ}\in \mathrm{Σ}\left(E\right)$ is a section of $E$.

 • The first calling sequence computes the Christoffel symbol of the input metric $g$ and returns the Riemann curvature tensor on the tangent bundle as a tensor of type $\left(\genfrac{}{}{0}{}{1}{3}\right)$. The index type of the output is ["con_bas", "cov_bas", "cov_bas", "cov_bas"]. See TensorIndexType.
 • The second calling sequence returns the curvature tensor of the input connection $C$. The index type of the output is ["con_vrt", "cov_vrt", "cov_bas", "cov_bas"]. See TensorIndexType.
 • The first Bianchi identity for the curvature tensor of a connection on the tangent bundle of a manifold asserts that

Here $S$ is the torsion tensor of the connection, and $S·S$ is the contraction of $S\otimes S$ over the 3rd and 4th indices.

 • The second Bianchi Identity asserts that . Here $R·S$ denotes the contraction of $R\otimes S$ on the third and fifth indices.
 • This command is part of the DifferentialGeometry:-Tensor package, and so can be used in the form CurvatureTensor(...) only after executing the command with(DifferentialGeometry) and with(Tensor) in that order. It can always be used in the long form DifferentialGeometry:-Tensor:-CurvatureTensor.

Examples

 > $\mathrm{with}\left(\mathrm{DifferentialGeometry}\right):$$\mathrm{with}\left(\mathrm{Tensor}\right):$

Example 1.

First create a 3 dimensional manifold $M$ and define a metric on the tangent space of $M$.

 > $\mathrm{DGsetup}\left(\left[x,y,z\right],M\right)$
 ${\mathrm{frame name: M}}$ (2.1)
 M > $\mathrm{g1}≔\mathrm{evalDG}\left(\mathrm{exp}\left(y\right)\mathrm{dx}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dx}+\mathrm{dy}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dy}+\mathrm{dz}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dz}\right)$
 ${\mathrm{g1}}{:=}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}\right]{,}{{ⅇ}}^{{y}}\right]{,}\left[\left[{2}{,}{2}\right]{,}{1}\right]{,}\left[\left[{3}{,}{3}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}\right]{,}{{ⅇ}}^{{y}}\right]{,}\left[\left[{2}{,}{2}\right]{,}{1}\right]{,}\left[\left[{3}{,}{3}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}\right]{,}{{ⅇ}}^{{y}}\right]{,}\left[\left[{2}{,}{2}\right]{,}{1}\right]{,}\left[\left[{3}{,}{3}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}\right]{,}{{ⅇ}}^{{y}}\right]{,}\left[\left[{2}{,}{2}\right]{,}{1}\right]{,}\left[\left[{3}{,}{3}\right]{,}{1}\right]\right]\right]\right)$ (2.2)

Calculate the curvature tensor for the metric $\mathrm{g1}$.

 M > $\mathrm{R1}≔\mathrm{CurvatureTensor}\left(\mathrm{g1}\right)$
 ${\mathrm{R1}}{:=}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{2}{,}{1}{,}{2}\right]{,}{-}\frac{{1}}{{4}}\right]{,}\left[\left[{1}{,}{2}{,}{2}{,}{1}\right]{,}\frac{{1}}{{4}}\right]{,}\left[\left[{2}{,}{1}{,}{1}{,}{2}\right]{,}\frac{{{ⅇ}}^{{y}}}{{4}}\right]{,}\left[\left[{2}{,}{1}{,}{2}{,}{1}\right]{,}{-}\frac{{{ⅇ}}^{{y}}}{{4}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{2}{,}{1}{,}{2}\right]{,}{-}\frac{{1}}{{4}}\right]{,}\left[\left[{1}{,}{2}{,}{2}{,}{1}\right]{,}\frac{{1}}{{4}}\right]{,}\left[\left[{2}{,}{1}{,}{1}{,}{2}\right]{,}\frac{{{ⅇ}}^{{y}}}{{4}}\right]{,}\left[\left[{2}{,}{1}{,}{2}{,}{1}\right]{,}{-}\frac{{{ⅇ}}^{{y}}}{{4}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{2}{,}{1}{,}{2}\right]{,}{-}\frac{{1}}{{4}}\right]{,}\left[\left[{1}{,}{2}{,}{2}{,}{1}\right]{,}\frac{{1}}{{4}}\right]{,}\left[\left[{2}{,}{1}{,}{1}{,}{2}\right]{,}\frac{{{ⅇ}}^{{y}}}{{4}}\right]{,}\left[\left[{2}{,}{1}{,}{2}{,}{1}\right]{,}{-}\frac{{{ⅇ}}^{{y}}}{{4}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{2}{,}{1}{,}{2}\right]{,}{-}\frac{{1}}{{4}}\right]{,}\left[\left[{1}{,}{2}{,}{2}{,}{1}\right]{,}\frac{{1}}{{4}}\right]{,}\left[\left[{2}{,}{1}{,}{1}{,}{2}\right]{,}\frac{{{ⅇ}}^{{y}}}{{4}}\right]{,}\left[\left[{2}{,}{1}{,}{2}{,}{1}\right]{,}{-}\frac{{{ⅇ}}^{{y}}}{{4}}\right]\right]\right]\right)$ (2.3)

Example 2.

First create a 3 dimensional manifold $M$ and define a connection on the tangent space of $M$.

 M > $\mathrm{DGsetup}\left(\left[x,y,z\right],M\right)$
 ${\mathrm{frame name: M}}$ (2.4)
 M > $\mathrm{C2}≔\mathrm{Connection}\left({x}^{2}\left(\mathrm{D_x}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dx}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dy}-{y}^{2}\left(\mathrm{D_x}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dy}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dy}+yz\left(\mathrm{D_x}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dz}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dy}\right)$
 ${\mathrm{C2}}{:=}{\mathrm{_DG}}{}\left(\left[\left[{"connection"}{,}{M}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}{,}{2}\right]{,}{{x}}^{{2}}\right]{,}\left[\left[{1}{,}{2}{,}{2}\right]{,}{-}{{y}}^{{2}}\right]{,}\left[\left[{1}{,}{3}{,}{2}\right]{,}{y}{}{z}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"connection"}{,}{M}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}{,}{2}\right]{,}{{x}}^{{2}}\right]{,}\left[\left[{1}{,}{2}{,}{2}\right]{,}{-}{{y}}^{{2}}\right]{,}\left[\left[{1}{,}{3}{,}{2}\right]{,}{y}{}{z}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"connection"}{,}{M}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}{,}{2}\right]{,}{{x}}^{{2}}\right]{,}\left[\left[{1}{,}{2}{,}{2}\right]{,}{-}{{y}}^{{2}}\right]{,}\left[\left[{1}{,}{3}{,}{2}\right]{,}{y}{}{z}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"connection"}{,}{M}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}{,}{2}\right]{,}{{x}}^{{2}}\right]{,}\left[\left[{1}{,}{2}{,}{2}\right]{,}{-}{{y}}^{{2}}\right]{,}\left[\left[{1}{,}{3}{,}{2}\right]{,}{y}{}{z}\right]\right]\right]\right)$ (2.5)
 M > $\mathrm{R2}≔\mathrm{CurvatureTensor}\left(\mathrm{C2}\right)$
 ${\mathrm{R2}}{:=}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}{,}{1}{,}{2}\right]{,}{2}{}{x}\right]{,}\left[\left[{1}{,}{1}{,}{2}{,}{1}\right]{,}{-}{2}{}{x}\right]{,}\left[\left[{1}{,}{3}{,}{2}{,}{3}\right]{,}{-}{y}\right]{,}\left[\left[{1}{,}{3}{,}{3}{,}{2}\right]{,}{y}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}{,}{1}{,}{2}\right]{,}{2}{}{x}\right]{,}\left[\left[{1}{,}{1}{,}{2}{,}{1}\right]{,}{-}{2}{}{x}\right]{,}\left[\left[{1}{,}{3}{,}{2}{,}{3}\right]{,}{-}{y}\right]{,}\left[\left[{1}{,}{3}{,}{3}{,}{2}\right]{,}{y}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}{,}{1}{,}{2}\right]{,}{2}{}{x}\right]{,}\left[\left[{1}{,}{1}{,}{2}{,}{1}\right]{,}{-}{2}{}{x}\right]{,}\left[\left[{1}{,}{3}{,}{2}{,}{3}\right]{,}{-}{y}\right]{,}\left[\left[{1}{,}{3}{,}{3}{,}{2}\right]{,}{y}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}{,}{1}{,}{2}\right]{,}{2}{}{x}\right]{,}\left[\left[{1}{,}{1}{,}{2}{,}{1}\right]{,}{-}{2}{}{x}\right]{,}\left[\left[{1}{,}{3}{,}{2}{,}{3}\right]{,}{-}{y}\right]{,}\left[\left[{1}{,}{3}{,}{3}{,}{2}\right]{,}{y}\right]\right]\right]\right)$ (2.6)

Here are two simple procedures we shall use for checking the Bianchi identities.

 > Bianchi1 := proc(R, C)
 >
 > $S≔\mathrm{TorsionTensor}\left(C\right)$
 > $\mathrm{T1}≔R$
 > $\mathrm{T2}≔\mathrm{CovariantDerivative}\left(S,C\right):$
 > $\mathrm{T3}≔\mathrm{ContractIndices}\left(S,S,\left[\left[3,1\right]\right]\right)$
 > $\mathrm{T4}≔\mathrm{evalDG}\left(\mathrm{T1}-\mathrm{T2}+\mathrm{T3}\right)$
 > $\mathrm{SymmetrizeIndices}\left(\mathrm{T4},\left[2,3,4\right],"SkewSymmetric"\right)$
 M > end:

 > Bianchi2 := proc(R, C)
 >
 > $S≔\mathrm{TorsionTensor}\left(C\right)$
 > $\mathrm{T1}≔\mathrm{CovariantDerivative}\left(R,C\right)$
 > $\mathrm{T2}≔\mathrm{ContractIndices}\left(R,S,\left[\left[3,1\right]\right]\right)$
 > $\mathrm{SymmetrizeIndices}\left(\mathrm{T1}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&plus\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{T2},\left[3,4,5\right],"SkewSymmetric"\right)$
 M1 > end:

Use the above programs to check the Bianchi identities.

 M > $\mathrm{Bianchi1}\left(\mathrm{R2},\mathrm{C2}\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}{,}{1}{,}{1}\right]{,}{0}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}{,}{1}{,}{1}\right]{,}{0}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}{,}{1}{,}{1}\right]{,}{0}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}{,}{1}{,}{1}\right]{,}{0}\right]\right]\right]\right)$ (2.7)
 M > $\mathrm{Bianchi2}\left(\mathrm{R2},\mathrm{C2}\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}{,}{1}{,}{1}{,}{1}\right]{,}{0}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}{,}{1}{,}{1}{,}{1}\right]{,}{0}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}{,}{1}{,}{1}{,}{1}\right]{,}{0}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}{,}{1}{,}{1}{,}{1}\right]{,}{0}\right]\right]\right]\right)$ (2.8)

Example 3.

Define a frame on $M$ and use this frame to specify a connection on the tangent space of $M$.

 M > $\mathrm{DGsetup}\left(\left[x,y,z\right],M\right)$
 ${\mathrm{frame name: M}}$ (2.9)
 M > $\mathrm{FR}≔\mathrm{FrameData}\left(\left[\frac{{x}^{2}}{y}\mathrm{dx},\frac{z}{x}\mathrm{dy},xy\mathrm{dz}\right],\mathrm{M1}\right):$
 M > $\mathrm{DGsetup}\left(\mathrm{FR}\right)$
 ${\mathrm{frame name: M1}}$ (2.10)
 M1 > $\mathrm{C3}≔\mathrm{Connection}\left(\left(\mathrm{E2}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{Θ1}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{Θ2}\right)$
 ${\mathrm{C3}}{:=}{\mathrm{_DG}}{}\left(\left[\left[{"connection"}{,}{\mathrm{M1}}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{2}{,}{1}{,}{2}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"connection"}{,}{\mathrm{M1}}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{2}{,}{1}{,}{2}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"connection"}{,}{\mathrm{M1}}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{2}{,}{1}{,}{2}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"connection"}{,}{\mathrm{M1}}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{2}{,}{1}{,}{2}\right]{,}{1}\right]\right]\right]\right)$ (2.11)
 M1 > $\mathrm{R3}≔\mathrm{CurvatureTensor}\left(\mathrm{C3}\right)$
 ${\mathrm{R3}}{:=}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{\mathrm{M1}}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{2}{,}{1}{,}{1}{,}{2}\right]{,}{-}\frac{{y}}{{{x}}^{{3}}}\right]{,}\left[\left[{2}{,}{1}{,}{2}{,}{1}\right]{,}\frac{{y}}{{{x}}^{{3}}}\right]{,}\left[\left[{2}{,}{1}{,}{2}{,}{3}\right]{,}{-}\frac{{1}}{{z}{}{x}{}{y}}\right]{,}\left[\left[{2}{,}{1}{,}{3}{,}{2}\right]{,}\frac{{1}}{{z}{}{x}{}{y}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{\mathrm{M1}}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{2}{,}{1}{,}{1}{,}{2}\right]{,}{-}\frac{{y}}{{{x}}^{{3}}}\right]{,}\left[\left[{2}{,}{1}{,}{2}{,}{1}\right]{,}\frac{{y}}{{{x}}^{{3}}}\right]{,}\left[\left[{2}{,}{1}{,}{2}{,}{3}\right]{,}{-}\frac{{1}}{{z}{}{x}{}{y}}\right]{,}\left[\left[{2}{,}{1}{,}{3}{,}{2}\right]{,}\frac{{1}}{{z}{}{x}{}{y}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{\mathrm{M1}}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{2}{,}{1}{,}{1}{,}{2}\right]{,}{-}\frac{{y}}{{{x}}^{{3}}}\right]{,}\left[\left[{2}{,}{1}{,}{2}{,}{1}\right]{,}\frac{{y}}{{{x}}^{{3}}}\right]{,}\left[\left[{2}{,}{1}{,}{2}{,}{3}\right]{,}{-}\frac{{1}}{{z}{}{x}{}{y}}\right]{,}\left[\left[{2}{,}{1}{,}{3}{,}{2}\right]{,}\frac{{1}}{{z}{}{x}{}{y}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{\mathrm{M1}}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{2}{,}{1}{,}{1}{,}{2}\right]{,}{-}\frac{{y}}{{{x}}^{{3}}}\right]{,}\left[\left[{2}{,}{1}{,}{2}{,}{1}\right]{,}\frac{{y}}{{{x}}^{{3}}}\right]{,}\left[\left[{2}{,}{1}{,}{2}{,}{3}\right]{,}{-}\frac{{1}}{{z}{}{x}{}{y}}\right]{,}\left[\left[{2}{,}{1}{,}{3}{,}{2}\right]{,}\frac{{1}}{{z}{}{x}{}{y}}\right]\right]\right]\right)$ (2.12)

Use the above programs to check the Bianchi identities.

 M1 > $\mathrm{Bianchi1}\left(\mathrm{R3},\mathrm{C3}\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{\mathrm{M1}}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}{,}{1}{,}{1}\right]{,}{0}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{\mathrm{M1}}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}{,}{1}{,}{1}\right]{,}{0}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{\mathrm{M1}}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}{,}{1}{,}{1}\right]{,}{0}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{\mathrm{M1}}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}{,}{1}{,}{1}\right]{,}{0}\right]\right]\right]\right)$ (2.13)
 M1 > $\mathrm{Bianchi2}\left(\mathrm{R3},\mathrm{C3}\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{\mathrm{M1}}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}{,}{1}{,}{1}{,}{1}\right]{,}{0}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{\mathrm{M1}}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}{,}{1}{,}{1}{,}{1}\right]{,}{0}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{\mathrm{M1}}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}{,}{1}{,}{1}{,}{1}\right]{,}{0}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{\mathrm{M1}}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}{,}{1}{,}{1}{,}{1}\right]{,}{0}\right]\right]\right]\right)$ (2.14)

Example 4.

First create a rank 3 vector bundle $E\to M$ and define a connection on $E$.

 M1 > $\mathrm{DGsetup}\left(\left[x,y,z\right],\left[u,v,w\right],E\right)$
 ${\mathrm{frame name: E}}$ (2.15)
 E > $\mathrm{C4}≔\mathrm{Connection}\left(xz\left(\mathrm{D_v}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{du}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dy}\right)$
 ${\mathrm{C4}}{:=}{\mathrm{_DG}}{}\left(\left[\left[{"connection"}{,}{E}{,}\left[\left[{"con_vrt"}{,}{"cov_vrt"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{5}{,}{4}{,}{2}\right]{,}{x}{}{z}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"connection"}{,}{E}{,}\left[\left[{"con_vrt"}{,}{"cov_vrt"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{5}{,}{4}{,}{2}\right]{,}{x}{}{z}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"connection"}{,}{E}{,}\left[\left[{"con_vrt"}{,}{"cov_vrt"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{5}{,}{4}{,}{2}\right]{,}{x}{}{z}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"connection"}{,}{E}{,}\left[\left[{"con_vrt"}{,}{"cov_vrt"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{5}{,}{4}{,}{2}\right]{,}{x}{}{z}\right]\right]\right]\right)$ (2.16)
 E > $\mathrm{R4}≔\mathrm{CurvatureTensor}\left(\mathrm{C4}\right)$
 ${\mathrm{R4}}{:=}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{E}{,}\left[\left[{"con_vrt"}{,}{"cov_vrt"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{5}{,}{4}{,}{1}{,}{2}\right]{,}{z}\right]{,}\left[\left[{5}{,}{4}{,}{2}{,}{1}\right]{,}{-}{z}\right]{,}\left[\left[{5}{,}{4}{,}{2}{,}{3}\right]{,}{-}{x}\right]{,}\left[\left[{5}{,}{4}{,}{3}{,}{2}\right]{,}{x}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{E}{,}\left[\left[{"con_vrt"}{,}{"cov_vrt"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{5}{,}{4}{,}{1}{,}{2}\right]{,}{z}\right]{,}\left[\left[{5}{,}{4}{,}{2}{,}{1}\right]{,}{-}{z}\right]{,}\left[\left[{5}{,}{4}{,}{2}{,}{3}\right]{,}{-}{x}\right]{,}\left[\left[{5}{,}{4}{,}{3}{,}{2}\right]{,}{x}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{E}{,}\left[\left[{"con_vrt"}{,}{"cov_vrt"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{5}{,}{4}{,}{1}{,}{2}\right]{,}{z}\right]{,}\left[\left[{5}{,}{4}{,}{2}{,}{1}\right]{,}{-}{z}\right]{,}\left[\left[{5}{,}{4}{,}{2}{,}{3}\right]{,}{-}{x}\right]{,}\left[\left[{5}{,}{4}{,}{3}{,}{2}\right]{,}{x}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{E}{,}\left[\left[{"con_vrt"}{,}{"cov_vrt"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{5}{,}{4}{,}{1}{,}{2}\right]{,}{z}\right]{,}\left[\left[{5}{,}{4}{,}{2}{,}{1}\right]{,}{-}{z}\right]{,}\left[\left[{5}{,}{4}{,}{2}{,}{3}\right]{,}{-}{x}\right]{,}\left[\left[{5}{,}{4}{,}{3}{,}{2}\right]{,}{x}\right]\right]\right]\right)$ (2.17)