convert routines of the DifferentialGeometry package - Maple Programming Help

Home : Support : Online Help : Mathematics : DifferentialGeometry : DifferentialGeometry/Convert

convert routines of the DifferentialGeometry package

 Calling Sequence convert(A, DGArray) convert(B, DGvector) convert(C, DGform) convert(C, DGspinor) convert(E, DGtensor) convert(F, DGjet) convert(F, DGdiff) convert(G, DGbiform, bidegree)

Parameters

 A - a tensor B - a Matrix, a tensor, or the infinitesimal symmetry generators for a system of differential equations, as calculated by PDEtools:-Infinitesimals C - a differential form or a differential biform E - an Array, a vector, a differential form, or a spinor-tensor F - a Maple expression G - a differential form

Description

 • convert(A, DGArray) will convert a rank r tensor A to an r-dimensional array.  For example, if A= a * dx1 &t dx2 &t dx3 and T = convert(A, DGArray), then T[1, 2, 3] = a  and all other entries of T are 0.
 • If B is a square matrix, then convert(B, DGvector) will return a linear vector field.
 • If B is a a rank 1 contravariant tensor, then convert(B, DGvector) will return the corresponding vector field.
 • If B is a list of infinitesimal symmetry generators for a system of differential equations, as calculated by PDEtools:-Infinitesimals, then convert(B, DGvector) will return a list of vector fields.
 • If C is a rank 1 covariant tensor, then convert(B, DGform) will return a differential 1-form.
 • If C is a differential biform, that is, a form expressed in terms of the contact forms on a jet space, then convert(C, DGform) will return the differential form on jet space obtained by replacing the contact forms by their coordinate formulas.
 • If E is a spin-tensor, then convert(E, DGspinor, sigma, indexlist) will convert tensorial indices of E to pairs of spinorial indices.
 • If E is an Array, then convert(E, DGtensor, indextype) will convert E to an r-dimensional array.
 • If E is a vector field, then convert(E, DGtensor) will convert E to a rank 1 contravariant tensor.
 • If E is a differential p-form, then convert(E, DGtensor) will convert E to a rank p contravariant tensor.
 • If E is a spinor-tensor, convert(E, DGtensor, sigma, indexlist) will convert pairs of spinorial indices of E to tensorial indices.
 • convert(F, DGjet) will convert a Maple expression F involving the Maple command diff, applied to functions u(x, y, z, ...), v(x, y, z, ...), ... to the standard indexed notation for derivatives, for example, diff(u(x, y, z), x) -> u[1], diff(u(x, y, z), x, y, z, z) -> u[1, 2, 3, 3] etc.
 • convert(F, DGdiff) performs the inverse to the conversion command convert/DGjet, it will convert expressions F involving the indexed notation for derivatives to expressions containing the Maple  diff command.
 • convert(G, DGbiform) will convert a differential p-form G, defined on a jet space J^k(M, N) , into a list of (p + 1)-biforms, Theta = [theta_0, theta_1, theta_2, .. theta_p], where theta_k has contact degree k, and G = theta_0 + theta_1 + theta_2 + ... + theta_p.

Examples

convert/DGArray

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

Example 1.

We define a manifold M with coordinates [x, y, z]. On M we define two tensors T1 and T2.  We convert these tensors to a Maple Array

 > $\mathrm{DGsetup}\left(\left[x,y,z\right],M\right):$
 > $\mathrm{T1}≔\mathrm{evalDG}\left(\mathrm{D_z}&t\mathrm{D_x}+\mathrm{D_x}&t\mathrm{D_y}\right)$
 ${\mathrm{T1}}{≔}{\mathrm{D_x}}{}{\mathrm{D_y}}{+}{\mathrm{D_z}}{}{\mathrm{D_x}}$ (1)
 > $\mathrm{T2}≔\mathrm{evalDG}\left(2\left(\mathrm{dx}&t\mathrm{D_x}\right)&t\mathrm{dy}+\left(\mathrm{dz}&t\mathrm{D_z}\right)&t\mathrm{dx}\right)$
 ${\mathrm{T2}}{≔}\left(\left({2}{}{\mathrm{dx}}\right){}{\mathrm{D_x}}\right){}{\mathrm{dy}}{+}\left({\mathrm{dz}}{}{\mathrm{D_z}}\right){}{\mathrm{dx}}$ (2)
 > $\mathrm{A1}≔\mathrm{convert}\left(\mathrm{T1},\mathrm{DGArray}\right)$
 ${\mathrm{A1}}{≔}\left[\begin{array}{rrr}{0}& {1}& {0}\\ {0}& {0}& {0}\\ {1}& {0}& {0}\end{array}\right]$ (3)
 > $\mathrm{A2}≔\mathrm{convert}\left(\mathrm{T2},\mathrm{DGArray}\right)$
 ${\mathrm{A2}}{≔}\left[\begin{array}{c}{\mathrm{1..3 x 1..3 x 1..3}}{\mathrm{Array}}\\ {\mathrm{Data Type:}}{\mathrm{anything}}\\ {\mathrm{Storage:}}{\mathrm{rectangular}}\\ {\mathrm{Order:}}{\mathrm{Fortran_order}}\end{array}\right]$ (4)
 > ${\mathrm{A2}}_{1,1,2}$
 ${2}$ (5)

convert/DGvector

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

Example 1.

We define a manifold M with coordinates [x, y, z].  We convert a matrix to a linear vector field.

 > $\mathrm{DGsetup}\left(\left[x,y,z\right],M\right):$
 > $A≔\mathrm{Matrix}\left(\left[\left[1,0,1\right],\left[0,2,0\right],\left[0,3,0\right]\right]\right)$
 ${A}{≔}\left[\begin{array}{rrr}{1}& {0}& {1}\\ {0}& {2}& {0}\\ {0}& {3}& {0}\end{array}\right]$ (6)
 > $\mathrm{convert}\left(A,\mathrm{DGvector}\right)$
 $\left({x}{+}{z}\right){}{\mathrm{D_x}}{+}{2}{}{y}{}{\mathrm{D_y}}{+}{3}{}{y}{}{\mathrm{D_z}}$ (7)

Example 2.

We define a manifold M with coordinates [x, y, z].  On M we define two tensors T1 and T2 and contract the 1st and 3 indices of T1 against the 1st and second indices of T2.  The result is a contravariant rank 1 tensor S on M.  We then convert S to a vector field X.

 > $\mathrm{DGsetup}\left(\left[x,y,z\right],M\right):$
 > $\mathrm{T1}≔\mathrm{evalDG}\left(2\left(\mathrm{dx}&t\mathrm{D_x}\right)&t\mathrm{dy}+\left(\mathrm{dz}&t\mathrm{D_z}\right)&t\mathrm{dx}\right)$
 ${\mathrm{T1}}{≔}\left(\left({2}{}{\mathrm{dx}}\right){}{\mathrm{D_x}}\right){}{\mathrm{dy}}{+}\left({\mathrm{dz}}{}{\mathrm{D_z}}\right){}{\mathrm{dx}}$ (8)
 > $\mathrm{T2}≔\mathrm{evalDG}\left(\mathrm{D_z}&t\mathrm{D_x}+\mathrm{D_x}&t\mathrm{D_y}\right)$
 ${\mathrm{T2}}{≔}{\mathrm{D_x}}{}{\mathrm{D_y}}{+}{\mathrm{D_z}}{}{\mathrm{D_x}}$ (9)
 > $S≔\mathrm{ContractIndices}\left(\mathrm{T1},\mathrm{T2},\left[\left[1,1\right],\left[3,2\right]\right]\right)$
 ${S}{≔}{2}{}{\mathrm{D_x}}{+}{\mathrm{D_z}}$ (10)
 > $X≔\mathrm{convert}\left(S,\mathrm{DGvector}\right)$
 ${X}{≔}{2}{}{\mathrm{D_x}}{+}{\mathrm{D_z}}$ (11)
 > $\mathrm{Tools}:-\mathrm{DGinfo}\left(S,"ObjectType"\right),\mathrm{Tools}:-\mathrm{DGinfo}\left(X,"ObjectType"\right)$
 ${"tensor"}{,}{"vector"}$ (12)
 > $\mathrm{lprint}\left(S\right),\mathrm{lprint}\left(X\right)$
 _DG([["tensor", M, [["con_bas"], []]], [[[1], 2], [[3], 1]]]) _DG([["vector", M, []], [[[1], 2], [[3], 1]]])

Example 3.

We use the PDEtools:-Infinitesimals program to find the infinitesimals symmetries of a system of differential equations.  We convert the output of this program, which lists of the components of the infinitesimal symmetries, to a list of vector fields on the manifold of independent and dependent variables.

 > $\mathrm{DE}≔\left[\frac{{\partial }^{2}}{\partial y\partial x}u\left(x,y\right)={v\left(x,y\right)}^{2},\frac{{\partial }^{2}}{\partial {x}^{2}}v\left(x,y\right)=u\left(x,y\right)\right]$
 ${\mathrm{DE}}{≔}\left[\frac{{{\partial }}^{{2}}}{{\partial }{y}{}{\partial }{x}}{}{u}{}\left({x}{,}{y}\right){=}{{v}{}\left({x}{,}{y}\right)}^{{2}}{,}\frac{{{\partial }}^{{2}}}{{\partial }{{x}}^{{2}}}{}{v}{}\left({x}{,}{y}\right){=}{u}{}\left({x}{,}{y}\right)\right]$ (13)
 > $\mathrm{Sym}≔\mathrm{PDEtools}:-\mathrm{Infinitesimals}\left(\mathrm{DE},\left[u,v\right]\right)$
 ${\mathrm{Sym}}{≔}\left[{{\mathrm{_ξ}}}_{{x}}{}\left({x}{,}{y}{,}{u}{,}{v}\right){=}{0}{,}{{\mathrm{_ξ}}}_{{y}}{}\left({x}{,}{y}{,}{u}{,}{v}\right){=}{1}{,}{{\mathrm{_η}}}_{{u}}{}\left({x}{,}{y}{,}{u}{,}{v}\right){=}{0}{,}{{\mathrm{_η}}}_{{v}}{}\left({x}{,}{y}{,}{u}{,}{v}\right){=}{0}\right]{,}\left[{{\mathrm{_ξ}}}_{{x}}{}\left({x}{,}{y}{,}{u}{,}{v}\right){=}{1}{,}{{\mathrm{_ξ}}}_{{y}}{}\left({x}{,}{y}{,}{u}{,}{v}\right){=}{0}{,}{{\mathrm{_η}}}_{{u}}{}\left({x}{,}{y}{,}{u}{,}{v}\right){=}{0}{,}{{\mathrm{_η}}}_{{v}}{}\left({x}{,}{y}{,}{u}{,}{v}\right){=}{0}\right]{,}\left[{{\mathrm{_ξ}}}_{{x}}{}\left({x}{,}{y}{,}{u}{,}{v}\right){=}{0}{,}{{\mathrm{_ξ}}}_{{y}}{}\left({x}{,}{y}{,}{u}{,}{v}\right){=}{y}{,}{{\mathrm{_η}}}_{{u}}{}\left({x}{,}{y}{,}{u}{,}{v}\right){=}{-}{u}{,}{{\mathrm{_η}}}_{{v}}{}\left({x}{,}{y}{,}{u}{,}{v}\right){=}{-}{v}\right]{,}\left[{{\mathrm{_ξ}}}_{{x}}{}\left({x}{,}{y}{,}{u}{,}{v}\right){=}{x}{,}{{\mathrm{_ξ}}}_{{y}}{}\left({x}{,}{y}{,}{u}{,}{v}\right){=}{0}{,}{{\mathrm{_η}}}_{{u}}{}\left({x}{,}{y}{,}{u}{,}{v}\right){=}{-}{5}{}{u}{,}{{\mathrm{_η}}}_{{v}}{}\left({x}{,}{y}{,}{u}{,}{v}\right){=}{-}{3}{}{v}\right]$ (14)
 > $\mathrm{DGsetup}\left(\left[x,y\right],\left[u,v\right],J,2\right)$
 ${\mathrm{frame name: J}}$ (15)
 > $\mathrm{convert}\left(\left[\mathrm{Sym}\right],\mathrm{DGvector}\right)$
 $\left[{\mathrm{D_y}}{,}{\mathrm{D_x}}{,}{y}{}{\mathrm{D_y}}{-}\left({u}\left[\right]{}{\mathrm{D_u}}\left[\right]\right){-}\left({v}\left[\right]{}{\mathrm{D_v}}\left[\right]\right){,}{x}{}{\mathrm{D_x}}{-}\left({5}{}{u}\left[\right]{}{\mathrm{D_u}}\left[\right]\right){-}\left({3}{}{v}\left[\right]{}{\mathrm{D_v}}\left[\right]\right)\right]$ (16)

convert/DGform

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

Example 1.

We define a manifold M with coordinates [x, y, z].  On M we define a tensor T and contract the 1st and 3rd indices of T.  The result is a covariant rank 1 tensor S on M.  We then convert S to a differential 1-form alpha.

 > $\mathrm{DGsetup}\left(\left[x,y,z\right],M\right):$
 > $\mathrm{T1}≔\mathrm{evalDG}\left(2\left(\mathrm{dx}&t\mathrm{D_x}\right)&t\mathrm{dy}+\left(\mathrm{dz}&t\mathrm{D_z}\right)&t\mathrm{dx}\right)$
 ${\mathrm{T1}}{≔}\left(\left({2}{}{\mathrm{dx}}\right){}{\mathrm{D_x}}\right){}{\mathrm{dy}}{+}\left({\mathrm{dz}}{}{\mathrm{D_z}}\right){}{\mathrm{dx}}$ (17)
 > $S≔\mathrm{ContractIndices}\left(\mathrm{T1},\left[\left[1,2\right]\right]\right)$
 ${S}{≔}{\mathrm{dx}}{+}{2}{}{\mathrm{dy}}$ (18)
 > $X≔\mathrm{convert}\left(S,\mathrm{DGform}\right)$
 ${X}{≔}{\mathrm{dx}}{+}{2}{}{\mathrm{dy}}$ (19)

The  tensor S and the 1 form alpha both have the same external displays but are have different internal representations.  We can see this using DGinfo or lprint.

 > $\mathrm{Tools}:-\mathrm{DGinfo}\left(S,"ObjectType"\right),\mathrm{Tools}:-\mathrm{DGinfo}\left(X,"ObjectType"\right)$
 ${"tensor"}{,}{"form"}$ (20)
 > $\mathrm{lprint}\left(S\right),\mathrm{lprint}\left(X\right)$
 _DG([["tensor", M, [["cov_bas"], []]], [[[1], 1], [[2], 2]]]) _DG([["form", M, 1], [[[1], 1], [[2], 2]]])

Example 2.

 > $\mathrm{DGsetup}\left(\left[x,y\right],\left[u\right],\mathrm{Jet},2\right):$
 > $\mathrm{θ1},\mathrm{θ2},\mathrm{θ3}≔{\mathrm{Cu}}_{[]},{\mathrm{Cu}}_{1},{\mathrm{Cu}}_{2}$
 ${\mathrm{θ1}}{,}{\mathrm{θ2}}{,}{\mathrm{θ3}}{≔}{\mathrm{Cu}}\left[\right]{,}{{\mathrm{Cu}}}_{{1}}{,}{{\mathrm{Cu}}}_{{2}}$ (21)
 > $\mathrm{convert}\left(\mathrm{θ1},\mathrm{DGform}\right)$
 ${-}\left({{u}}_{{1}}{}{\mathrm{dx}}\right){-}\left({{u}}_{{2}}{}{\mathrm{dy}}\right){+}{\mathrm{du}}\left[\right]$ (22)
 > $\mathrm{convert}\left(\mathrm{θ2},\mathrm{DGform}\right)$
 ${-}\left({{u}}_{{1}{,}{1}}{}{\mathrm{dx}}\right){-}\left({{u}}_{{1}{,}{2}}{}{\mathrm{dy}}\right){+}{{\mathrm{du}}}_{{1}}$ (23)
 > $\mathrm{convert}\left(\mathrm{θ3},\mathrm{DGform}\right)$
 ${-}\left({{u}}_{{1}{,}{2}}{}{\mathrm{dx}}\right){-}\left({{u}}_{{2}{,}{2}}{}{\mathrm{dy}}\right){+}{{\mathrm{du}}}_{{2}}$ (24)

convert/DGspinor

The solder form sigma is the fundamental spin-tensor in spinor algebra.  It provides for a 1-1 correspondence between vectors and rank 2 Hermitian spinors. The convert/DGspinor uses a user-specified solder form to convert tensor indices of a given spinor-tensor to pairs of spinor indices.

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

To illustrate this convert procedure we first construct a solder form. Define a vector bundle over M with base coordinates [x, y, z, t] and fiber coordinates [z1, z2, w1, w2].

 > $\mathrm{DGsetup}\left(\left[t,x,y,z\right],\left[\mathrm{z1},\mathrm{z2},\mathrm{w1},\mathrm{w2}\right],M\right)$
 ${\mathrm{frame name: M}}$ (25)

Define a spacetime metric g on M. Our spinor conventions assume the metric has signature [1, -1, -1, -1].

 > $g≔\mathrm{evalDG}\left(\mathrm{dt}&t\mathrm{dt}-\mathrm{dx}&t\mathrm{dx}-\mathrm{dy}&t\mathrm{dy}-\mathrm{dz}&t\mathrm{dz}\right)$
 ${g}{≔}{\mathrm{dt}}{}{\mathrm{dt}}{-}\left({\mathrm{dx}}{}{\mathrm{dx}}\right){-}\left({\mathrm{dy}}{}{\mathrm{dy}}\right){-}\left({\mathrm{dz}}{}{\mathrm{dz}}\right)$ (26)

Define an orthonormal frame on M with respect to the metric g.

 > $F≔\left[\mathrm{D_t},\mathrm{D_x},\mathrm{D_y},\mathrm{D_z}\right]$
 ${F}{≔}\left[{\mathrm{D_t}}{,}{\mathrm{D_x}}{,}{\mathrm{D_y}}{,}{\mathrm{D_z}}\right]$ (27)

Calculate the solder form sigma from the frame F.  See Spinor, SolderForm.

 > $\mathrm{σ}≔\mathrm{SolderForm}\left(F\right)$
 ${\mathrm{σ}}{≔}\left(\frac{\sqrt{{2}}{}{\mathrm{dt}}}{{2}}{}{\mathrm{D_z1}}\right){}{\mathrm{D_w1}}{+}\left(\frac{\sqrt{{2}}{}{\mathrm{dt}}}{{2}}{}{\mathrm{D_z2}}\right){}{\mathrm{D_w2}}{+}\left(\frac{\sqrt{{2}}{}{\mathrm{dx}}}{{2}}{}{\mathrm{D_z1}}\right){}{\mathrm{D_w2}}{+}\left(\frac{\sqrt{{2}}{}{\mathrm{dx}}}{{2}}{}{\mathrm{D_z2}}\right){}{\mathrm{D_w1}}{-}\left(\left(\left(\frac{{I}}{{2}}{}\sqrt{{2}}{}{\mathrm{dy}}\right){}{\mathrm{D_z1}}\right){}{\mathrm{D_w2}}\right){+}\left(\left(\frac{{I}}{{2}}{}\sqrt{{2}}{}{\mathrm{dy}}\right){}{\mathrm{D_z2}}\right){}{\mathrm{D_w1}}{+}\left(\frac{\sqrt{{2}}{}{\mathrm{dz}}}{{2}}{}{\mathrm{D_z1}}\right){}{\mathrm{D_w1}}{-}\left(\left(\frac{\sqrt{{2}}{}{\mathrm{dz}}}{{2}}{}{\mathrm{D_z2}}\right){}{\mathrm{D_w2}}\right)$ (28)

Example 1.

Define a vector X and convert it to a contravariant rank 2 spinor psi.  The convert/DGspinor command requires the solder form as a 3rd argument and a list of tensorial indices to be converted to spinorial indices as a 4th argument.

 > $X≔\mathrm{evalDG}\left(a\mathrm{D_t}+b\mathrm{D_y}\right)$
 ${X}{≔}{a}{}{\mathrm{D_t}}{+}{b}{}{\mathrm{D_y}}$ (29)
 > $\mathrm{ψ}≔\mathrm{convert}\left(X,\mathrm{DGspinor},\mathrm{σ},\left[1\right]\right)$
 ${\mathrm{ψ}}{≔}\frac{\sqrt{{2}}{}{a}{}{\mathrm{D_z1}}}{{2}}{}{\mathrm{D_w1}}{-}\left(\left(\frac{{I}}{{2}}{}\sqrt{{2}}{}{b}{}{\mathrm{D_z1}}\right){}{\mathrm{D_w2}}\right){+}\left(\frac{{I}}{{2}}{}\sqrt{{2}}{}{b}{}{\mathrm{D_z2}}\right){}{\mathrm{D_w1}}{+}\frac{\sqrt{{2}}{}{a}{}{\mathrm{D_z2}}}{{2}}{}{\mathrm{D_w2}}$ (30)

Example 2.

Define a rank 3 tensor and convert the 1st and 3rd indices to pairs of spinor indices to obtain a rank 5 spin-tensor chi. Note that the spinorial indices are moved to the right.

 > $T≔\mathrm{evalDG}\left(\left(\mathrm{D_x}&t\mathrm{D_y}\right)&t\mathrm{dz}\right)$
 ${T}{≔}\left({\mathrm{D_x}}{}{\mathrm{D_y}}\right){}{\mathrm{dz}}$ (31)
 > $\mathrm{χ}≔\mathrm{convert}\left(T,\mathrm{DGspinor},\mathrm{σ},\left[1,3\right]\right)$
 ${\mathrm{χ}}{≔}\left(\left(\left(\frac{{\mathrm{D_y}}}{{2}}{}{\mathrm{D_z1}}\right){}{\mathrm{D_w2}}\right){}{\mathrm{dz1}}\right){}{\mathrm{dw1}}{-}\left(\left(\left(\left(\frac{{\mathrm{D_y}}}{{2}}{}{\mathrm{D_z1}}\right){}{\mathrm{D_w2}}\right){}{\mathrm{dz2}}\right){}{\mathrm{dw2}}\right){+}\left(\left(\left(\frac{{\mathrm{D_y}}}{{2}}{}{\mathrm{D_z2}}\right){}{\mathrm{D_w1}}\right){}{\mathrm{dz1}}\right){}{\mathrm{dw1}}{-}\left(\left(\left(\left(\frac{{\mathrm{D_y}}}{{2}}{}{\mathrm{D_z2}}\right){}{\mathrm{D_w1}}\right){}{\mathrm{dz2}}\right){}{\mathrm{dw2}}\right)$ (32)

Example 3.

With the convert/DGspinor command, the spinor psi. can be converted back to the vector X and the spin-tensor chi back to the tensor T.

 > $\mathrm{convert}\left(\mathrm{ψ},\mathrm{DGtensor},\mathrm{σ},\left[\left[1,2\right]\right]\right)$
 ${a}{}{\mathrm{D_t}}{+}{b}{}{\mathrm{D_y}}$ (33)
 > $\mathrm{convert}\left(\mathrm{χ},\mathrm{DGtensor},\mathrm{σ},\left[\left[2,3\right],\left[4,5\right]\right]\right)$
 $\left({\mathrm{D_y}}{}{\mathrm{D_x}}\right){}{\mathrm{dz}}$ (34)

convert/DGtensor

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

We define a manifold M with coordinates [x, y, z].

 > $\mathrm{DGsetup}\left(\left[x,y,z\right],M\right):$

Example 1.

We define a Matrix' A1 and convert it to a rank 2 tensor in 4 different ways:

 > $\mathrm{A1}≔\mathrm{Matrix}\left(\left[\left[1,0,2\right],\left[0,2,4\right],\left[1,0,0\right]\right]\right)$
 ${\mathrm{A1}}{≔}\left[\begin{array}{rrr}{1}& {0}& {2}\\ {0}& {2}& {4}\\ {1}& {0}& {0}\end{array}\right]$ (35)
 > $\mathrm{convert}\left(\mathrm{A1},\mathrm{DGtensor},\left[\left["con_bas","con_bas"\right],\left[\right]\right]\right)$
 ${\mathrm{D_x}}{}{\mathrm{D_x}}{+}\left({2}{}{\mathrm{D_x}}\right){}{\mathrm{D_z}}{+}\left({2}{}{\mathrm{D_y}}\right){}{\mathrm{D_y}}{+}\left({4}{}{\mathrm{D_y}}\right){}{\mathrm{D_z}}{+}{\mathrm{D_z}}{}{\mathrm{D_x}}$ (36)
 > $\mathrm{convert}\left(\mathrm{A1},\mathrm{DGtensor},\left[\left["cov_bas","con_bas"\right],\left[\right]\right]\right)$
 ${\mathrm{dx}}{}{\mathrm{D_x}}{+}\left({2}{}{\mathrm{dx}}\right){}{\mathrm{D_z}}{+}\left({2}{}{\mathrm{dy}}\right){}{\mathrm{D_y}}{+}\left({4}{}{\mathrm{dy}}\right){}{\mathrm{D_z}}{+}{\mathrm{dz}}{}{\mathrm{D_x}}$ (37)
 > $\mathrm{convert}\left(\mathrm{A1},\mathrm{DGtensor},\left[\left["con_bas","cov_bas"\right],\left[\right]\right]\right)$
 ${\mathrm{D_x}}{}{\mathrm{dx}}{+}\left({2}{}{\mathrm{D_x}}\right){}{\mathrm{dz}}{+}\left({2}{}{\mathrm{D_y}}\right){}{\mathrm{dy}}{+}\left({4}{}{\mathrm{D_y}}\right){}{\mathrm{dz}}{+}{\mathrm{D_z}}{}{\mathrm{dx}}$ (38)
 > $\mathrm{convert}\left(\mathrm{A1},\mathrm{DGtensor},\left[\left["cov_bas","cov_bas"\right],\left[\right]\right]\right)$
 ${\mathrm{dx}}{}{\mathrm{dx}}{+}\left({2}{}{\mathrm{dx}}\right){}{\mathrm{dz}}{+}\left({2}{}{\mathrm{dy}}\right){}{\mathrm{dy}}{+}\left({4}{}{\mathrm{dy}}\right){}{\mathrm{dz}}{+}{\mathrm{dz}}{}{\mathrm{dx}}$ (39)

Example 2.

We define an 4 dimensional array and convert it to a rank 4 covariant tensor.

 > $\mathrm{A2}≔\mathrm{Array}\left(1..3,1..3,1..3,1..3\right):$
 >