Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
sagemanifolds
GitHub Repository: sagemanifolds/IntroToManifolds
Path: blob/main/13Manifold_TensorFields.ipynb
Views: 83
Kernel: SageMath 9.6

13. Tensor fields

This notebook is part of the Introduction to manifolds in SageMath by Andrzej Chrzeszczyk (Jan Kochanowski University of Kielce, Poland).

version()
'SageMath version 9.6, Release Date: 2022-05-15'

Linear differential forms (1- forms, covector fields) on a manifold


Let MM be a smooth manifold. A linear differential form or 1-form or covector field αα on MM is a map that assigns to each pMp ∈ M an element α(p)TpMα( p) ∈ T_p^∗M (the space TpMT_p^∗M was defined in notebook 9) . The 1-form α(p)α( p) will also be denoted by αpα_p, it is smooth (of class CC^∞ ) if for all XX(M)X ∈ \mathfrak{X}(M) the function α(X)α(X) defined byParseError: KaTeX parse error: Undefined control sequence: \label at position 67: …{for }\ p\in M \̲l̲a̲b̲e̲l̲{}\tag{13.1} \e… is smooth (of class CC^∞ ).

The set of all smooth 1-forms on MM is denoted by Ω1(M)\Omega^1 (M). The set Ω1(M)\Omega^1(M) is a module over C(M)C^∞ (M) with the algebraic operations given by ParseError: KaTeX parse error: Undefined control sequence: \label at position 95: …, \end{matrix} \̲l̲a̲b̲e̲l̲{}\tag{13.2} \e… for α,βΩ1(M)α, β ∈ \Omega^1 (M) and fC(M).f ∈ C^∞ (M).


Example 13.1

Let us define a 1-form on a 3-dimensional manifold.

%display latex N = 3 # dimension of manifold M M = Manifold(N, 'M') # manifold M a = M.diff_form(1) # 1-form on M a # print information on a

1-form on the 3-dimensional differentiable manifold M\displaystyle \mbox{1-form on the 3-dimensional differentiable manifold M}

# mathematical object of which "a" is an element. a.parent()

Ω1(M)\displaystyle \Omega^{1}\left(M\right)


Differential of scalar functions


If fC(M)f ∈ C^∞ (M), the differential of ff denoted by dfd f is given by df(p)=dfp,for pM,d f ( p) = d f_p,\quad\text{for}\ p\in M, where dfpdf_p is the differential at point defined in (9.1). The differential dfdf belongs to Ω1(M).\Omega^1(M). If XX(M),X ∈ \mathfrak{X}(M), then from (13.1),(11.1),(9.1) it follows that

(df(X))(p)=dfp(Xp)=Xp(f)=(Xf)(p),(df(X))(p)=df_p(X_p)=X_p(f)=(Xf)(p),

for pMp ∈ M i.e., ParseError: KaTeX parse error: Undefined control sequence: \label at position 30: …n} df(X)=X(f). \̲l̲a̲b̲e̲l̲{}\tag{13.3} \e…


Example 13.2

Define a scalar function ff and its differential dfdf. The differential is an example of 1-form.

# continuation f = M.scalar_field() f.differential()

1-form on the 3-dimensional differentiable manifold M\displaystyle \mbox{1-form on the 3-dimensional differentiable manifold M}


The differential of function is a derivation


The map d:C(M)Ω1(M)d : C^∞ (M) →\Omega^1 (M), which sends ff into dfdf, satisfies ParseError: KaTeX parse error: Undefined control sequence: \label at position 97: …, \end{matrix} \̲l̲a̲b̲e̲l̲{}\tag{13.4} \e… for f,gC(M)f, g ∈ C^∞ (M) and a,bR.a, b ∈ R.

To check the first equality note, that for XX(M)X\in \mathfrak{X}(M)

d(af+bg)(X)=X(af+bg)=aXf+bXg=adf(X)+bdg(X)=(adf+bdg)(X).d(a f + bg)(X) = X(a f + bg) = aX f + bXg = a\,d f (X) + b\,dg(X) = (a\,d f + b\,dg)(X).

The second one follows from

d(fg)(X)=X(fg)=fXg+gXf=fdg(X)+gdf(X)=(fdg+gdf)(X).d( f g)(X) = X( f g) = f Xg + gX f = f dg(X) + gd f (X) = ( f dg + gd f )(X).

Differentials of coordinate functions form local bases for Ω1(M)\Omega^1(M)


If (U,φ)(U, φ) is a chart on MM, then as we have checked in notebook 9, the differentials of the coordinate functions x1,x2,...,xnx^1 , x^2 , . . . , x^n computed at pUp\in U form the basis of TpMT_p^*M.
The formula (9.1') implies that on UU we have dxi(X)=X(xi). dx^i(X)=X(x^i).

Since from (8.5) we have on UU: X=X(xi)xi,X=X(x^i)\frac{\partial}{\partial x^i}, the covector field dxidx^i assigns to the vector field XX its ii-th component function X(xi)X(x^i) in the frame {xj}j=1n\{\frac{\partial}{\partial x^j}\}_{j=1}^n.
If αΩ1(M)α\in\Omega^1(M), using (9.2), we obtain for pMp\in M and α(p)Tp(M)α(p) ∈ T_p^∗ (M)

α(p)=α(p)(xip)dxpi=[α(xi)dxi](p).\alpha(p)=\alpha(p)\big(\frac{\partial}{\partial x^i}\Big|_p\big)dx^i_p=\Big[\alpha\big(\frac{\partial}{\partial x^i}\big) dx^i\Big](p).

Thus

ParseError: KaTeX parse error: Undefined control sequence: \label at position 77: …^i}\big) dx^i. \̲l̲a̲b̲e̲l̲{}\tag{13.5} \e…

If we denote α(xi)\alpha\big(\frac{\partial}{\partial x^i}\big) by αi\alpha_i then in local coordinates every element of Ω1(M)\Omega^1(M) is of the form

αidxi.\alpha_idx^i.

Remark. Let us underscore that the last expressions holds only locally (in the domain of a local chart).


Coframe


Recall that in notebook 11 we defined frames.


If UU is an open subset of a manifold MM (for example a coordinate neighborhood) then the coframe on UU is the sequence ee of covector fields on UU such that for each pU, e(p)p∈U, \ e(p) is a basis of the cotangent space TpUT^*_pU.
From (13.5) it follows that the covectors  dx1,,dxn \ dx^1,\ldots,dx^n\ define a coframe on the coordinate neighborhood U. U.\ Let us recall that the linear independence of  dxp1,,dxpn \ dx^1_p,\ldots,dx^n_p\ for every pUp\in U was checked in notebook 9 (cf. the argument before the formula (9.2)).

N = 3 M = Manifold(N, 'M') # manifold M X = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)])) # chart on M X

(M,(x0,x1,x2))\displaystyle \left(M,({x^{0}}, {x^{1}}, {x^{2}})\right)

X.coframe()[:]

(dx0,dx1,dx2)\displaystyle \left(\mathrm{d} {x^{0}}, \mathrm{d} {x^{1}}, \mathrm{d} {x^{2}}\right)

Using the local representation we can give concrete examples of 1-forms/covector fields.


Example 13.3

Define 1-form  a=a0dx0+a1dx1+a2dx2 \ a=a_0dx^0+a_1dx^1+a_2dx^2\ in SageMath.

%display latex N = 3 # dimension of manifold M M = Manifold(N, 'M') # manifold M X = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)])) # chart on M a = M.diff_form(1,name='a') # 1-form a ast = ['a'+str(j) for j in range(N)] # list of component names af = [M.scalar_field(function(ast[j])(*X), name=ast[j]) for j in range(N)] # list of component functions a[:] = af # define all components of a a.disp() # show a

a=a0(x0,x1,x2)dx0+a1(x0,x1,x2)dx1+a2(x0,x1,x2)dx2\displaystyle a = a_{0}\left({x^{0}}, {x^{1}}, {x^{2}}\right) \mathrm{d} {x^{0}} + a_{1}\left({x^{0}}, {x^{1}}, {x^{2}}\right) \mathrm{d} {x^{1}} + a_{2}\left({x^{0}}, {x^{1}}, {x^{2}}\right) \mathrm{d} {x^{2}}

Function arguments can be omitted:

Manifold.options.omit_function_arguments=True a.disp() # show abbreviated a

a=a0dx0+a1dx1+a2dx2\displaystyle a = a_{0} \mathrm{d} {x^{0}} + a_{1} \mathrm{d} {x^{1}} + a_{2} \mathrm{d} {x^{2}}


Example 13.4

Now use the local coordinates to show the differential of a scalar function.

# continuation # scalar function f: f = M.scalar_field(function('f')(*X), name='f') df = f.differential() # differential of f print(df) # show information on df df.disp() # show df
1-form df on the 3-dimensional differentiable manifold M

df=fx0dx0+fx1dx1+fx2dx2\displaystyle \mathrm{d}f = \frac{\partial\,f}{\partial {x^{0}}} \mathrm{d} {x^{0}} + \frac{\partial\,f}{\partial {x^{1}}} \mathrm{d} {x^{1}} + \frac{\partial\,f}{\partial {x^{2}}} \mathrm{d} {x^{2}}

To explain the last formula let us note that by (13.5)  df=df(xi)dxi, \ d f = d f (\frac{∂}{∂ x^i} )dx^i,\ but, by virtue of (13.3),  df(xi)=xif, \ d f (\frac{\partial}{\partial x^i})= \frac{∂}{∂ x^i} f,\ so that ParseError: KaTeX parse error: Undefined control sequence: \label at position 61: …tial x^i}dx^i. \̲l̲a̲b̲e̲l̲{}\tag{13.6} \e…

Tensor fields


Tensor fields of type (0,k)\mathbf{(0,k)} (covariant tensor fields)


A tensor field tt of type (0,k)(0,k) or a covariant tensor field of rank kk on a manifold MM is a map tt that associates with each point pMp∈M a tensor t(p)=tpTp(0,k)M   t(p)=t_p\in T^{(0,k)}_pM\ \ \ (Tp(0,k)MT^{(0,k)}_pM was defined in notebook 9).
If tt is a tensor field of type (0,k)(0, k) and X1,...,XkX_1 , . . . , X_k are vector fields on MM, then t(X1,...,Xk)t (X_1 , . . . , X_k) is the real-valued function given by

[t(X1,...,Xk)](p)=tp(X1(p),...,Xk(p)).[t (X_1 , . . . , X _k )]( p) = t_p (X_1 ( p), . . . , X_k ( p)).

We say that tt is smooth if t(X1,...,Xk)t (X_1 , . . . , X_k ) is a smooth function for all X1,...,XkX(M)X_1 , . . . , X_k ∈ \mathfrak{X}(M).
One can prove that if x1,,xnx^1,\ldots,x^n are local coordinates on UU and ti1ik=t(xi1,,xik)t_{i_1\ldots i_k}=t(\frac{\partial}{\partial x^{i_1}},\ldots,\frac{\partial}{\partial x^{i_k}}), then tt is smooth iff for arbitrary pMp\in M there is a coordinate map (U,(x1,,xn))(U,(x^1,\ldots,x^n)) around pp such that the real functions ti1ikt_{i_1\ldots i_k} are smooth.

The operations of tensor addition, scalar multiplication and tensor product are defined pointwise:

(at+bs)p=atp+bsp,(ft)p=f(p)tp,(ts)p=tpsp,\begin{matrix} (at + bs)_p = at_p + bs_p,\\ ( f t)_p = f ( p)t_p,\\ (t ⊗ s)_p = t_p ⊗ s_p, \end{matrix}

for a,bR a, b ∈ R\ , s,ts, t -covariant tensor fields on MM and f:MR.f : M → R.

Using these formulas and (9.5) we can check that arbitrary tensor field of type (0,k)(0,k) can be expressed in local coordinates as follows

t=ti1ikdxi1dxik,ti1ik=t(xi1,,xik).\begin{equation} \begin{matrix} t=t_{i_1\ldots i_k}dx^{i_1}\otimes\dots\otimes dx^{i_k},\\ t_{i_1\ldots i_k}=t\big(\frac{\partial}{\partial x^{i_1}},\ldots,\frac{\partial}{\partial x^{i_k}}\big). \end{matrix} \tag{13.7} \end{equation}

If X1,...,XkX_1 , . . . , X_k are vector fields on MM and fC(M)f\in C^\infty(M), then from the multi-linearity of tpt_p on TpMT_pM for pMp\in M it follows that

[t(X1,...,fXi,...,Xk)](p)=tp(X1(p),...,(fXi)(p),...,Xk(p))=tp(X1(p),...,f(p)Xi(p),...,Xk(p))=f(p)tp(X1(p),...,Xi(p),...,Xk(p))=f(p)[t(X1,...,Xi,...,Xk)](p),[t (X_1 , . . . , f X_i , . . . , X_k )]( p) = t_p (X_1 ( p), . . . , ( f X_i )( p), . . . , X_k ( p))\\ = t_p (X_1 ( p), . . . , f ( p)X_i ( p), . . . , X_k ( p))\\ = f ( p)t_p( X_1 ( p), . . . , X_i ( p), . . . , X_k ( p))\\ = f ( p)[t (X_1 , . . . , X_i , . . . , X_k )]( p),

for pMp ∈ M. We have checked that

t(X1,...,fXi,...,Xk)=ft(X1,...,Xi,...,Xk),i=1,,k,t (X_1 , . . . , f X_i , . . . , X_k )=ft (X_1 , . . . , X_i , . . . , X_k ),\quad i=1,\ldots,k,

for XiX(M)X_i\in \mathfrak{X}(M) and fC(M).f\in C^\infty(M).

Similarly for Xi,YiX(M)X_i,Y_i\in\mathfrak{X}(M) we can check that for i=1,,ki=1,\ldots,k

t(X1,...,Xi+Yi,...,Xk)=t(X1,...,Xi,...,Xk)+t(X1,...,Yi,...,Xk).t (X_1 , . . . , X_i + Y_i , . . . , X_k ) = t (X_1 , . . . , X_i , . . . , X_k ) + t (X_1 , . . . , Y_i , . . . , X_k ).

Tensorial property


If tt is a map that to each set of kk vector fields XiX(M) X_i\in\mathfrak{X}(M)\ on MM associates a function t(X1,,Xk):MRt(X_1,\ldots,X_k):M\to R with the property that for functions f,gC(M), f,g\in C^\infty(M),\ Xi,YiX(M) X_i,Y_i\in\mathfrak{X}(M)\ and i=1,,ki=1,\ldots,k

t(X1,...,fXi+gYi,...,Xk)=ft(X1,...,Xi,...,Xk)+gt(X1,...,Yi,...,Xk),t (X_1 , . . . , fX_i + gY_i , . . . , X_k ) = ft (X_1 , . . . , X_i , . . . , X_k ) +gt (X_1 , . . . , Y_i , . . . , X_k ),

then tt is a tensor field of type (0,k).(0,k).


Note that the last property means that covariant tensor fields of rank kk are just multilinear functions on the Cartesian product X(M)××X(M)k   times\underbrace{\mathfrak{X}(M)\times\cdots\times \mathfrak{X}(M)}_{k\ \; \mbox{times}} of kk copies of the module X(M)\mathfrak{X}(M) over the ring C(M)C^\infty(M).

The module of covariant tensor fields of type (0,k) (0,k)\ on a manifold MM will be denoted by T(0,k)MT^{(0,k)}M.

Warning. If MM is a module -not a manifold, in notebook 9a the same notations denote the space of covariant tensors of rank kk on the module MM.


Covariant tensor fields in components


Using this property we can give another proof of (13.7). If the vector fields are expressed in the form Xi=dxj(Xi)xj,i=1,...,k,\quad X_i = dx^j (X_i ) \frac{∂}{∂ x^j} ,\quad i = 1, . . . , k, then t(X1,...,Xk)=t(dxi(X1)xi,...,dxm(Xk)xm)=dxi(X1)dxm(Xk)  t(xi,xm)=[t(xi,xm)dxidxm](X1,...,Xk).t (X_1 , . . . , X_k ) = t(dx^i(X_1 )\frac{∂}{∂ x^i} , . . . , dx^m (X_k )\frac{∂}{∂ x^m})\\ = dx^i (X_1 ) · · · dx^m (X_k )\;t( \frac{∂}{∂ x^i},\ldots \frac{∂}{∂ x^m})\\ =\Big[t(\frac{∂}{∂ x^i},\ldots \frac{∂}{∂ x^m})dx^i \otimes · · · \otimes dx^m\Big] (X_1 , . . . , X_k ).


Example 13.5

Define a general (0,2)-type tensor field on a 2-dimensional manifold (4 scalar functions as components).

N = 2 # dimension of manifold M = Manifold(N, 'M') # manifold M of dim. N X = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)])) # chart on M t = M.tensor_field(0, 2, name='t') # tensor field of type (0,2) print(t) # show information on t
Tensor field t of type (0,2) on the 2-dimensional differentiable manifold M

The components of the tensor field tt are scalar functions

x0, x1 = X[:] # coordinates x^0 and x^1 of chart X as the Python variables x0 and x1 f00 = M.scalar_field(function('f00')(x0, x1), name='f00') # scalar functions f01 = M.scalar_field(function('f01')(x0, x1), name='f01') # defining components f10 = M.scalar_field(function('f10')(x0, x1), name='f10') f11 = M.scalar_field(function('f11')(x0, x1), name='f11') t[0,0] = f00; t[0,1] = f01 # components of tensor field t t[1,0] = f10; t[1,1] = f11 t.disp() # show t

t=f00dx0dx0+f01dx0dx1+f10dx1dx0+f11dx1dx1\displaystyle t = f_{00} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + f_{01} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + f_{10} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + f_{11} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}

Let us check that tij=t(xi,xj)t_{ij}=t(\frac{\partial}{\partial x_i},\frac{\partial}{\partial x_j})

fr = X.frame();fr[:] # local frame on M

(x0,x1)\displaystyle \left(\frac{\partial}{\partial {x^{0}} }, \frac{\partial}{\partial {x^{1}} }\right)

matrix(2,2,lambda i,j: t(fr[i],fr[j]).expr()) # compute t(d/dxi,d/dxj)

(f00(x0,x1)f01(x0,x1)f10(x0,x1)f11(x0,x1))\displaystyle \left(\begin{array}{rr} f_{00}\left({x^{0}}, {x^{1}}\right) & f_{01}\left({x^{0}}, {x^{1}}\right) \\ f_{10}\left({x^{0}}, {x^{1}}\right) & f_{11}\left({x^{0}}, {x^{1}}\right) \end{array}\right)

X.coframe()[:] # local coframe

(dx0,dx1)\displaystyle \left(\mathrm{d} {x^{0}}, \mathrm{d} {x^{1}}\right)


Example 13.6

Let us define a more concrete example with variable components (upper indices and powers do not mix well).

# continuation t[:] = matrix(2, 2, lambda i,j: X[i]*X[j]) # t_{ij}=x_i*x_j t.disp()

t=x02dx0dx0+x0x1dx0dx1+x0x1dx1dx0+x12dx1dx1\displaystyle t = {x^{0}}^{2} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + {x^{0}} {x^{1}} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + {x^{0}} {x^{1}} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + {x^{1}}^{2} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}


Example 13.7

An example of a (0,4)-type tensor field (* denotes the tensor product):

(t*t).disp()

tt=x04dx0dx0dx0dx0+x03x1dx0dx0dx0dx1+x03x1dx0dx0dx1dx0+x02x12dx0dx0dx1dx1+x03x1dx0dx1dx0dx0+x02x12dx0dx1dx0dx1+x02x12dx0dx1dx1dx0+x0x13dx0dx1dx1dx1+x03x1dx1dx0dx0dx0+x02x12dx1dx0dx0dx1+x02x12dx1dx0dx1dx0+x0x13dx1dx0dx1dx1+x02x12dx1dx1dx0dx0+x0x13dx1dx1dx0dx1+x0x13dx1dx1dx1dx0+x14dx1dx1dx1dx1\displaystyle t\otimes t = {x^{0}}^{4} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + {x^{0}}^{3} {x^{1}} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + {x^{0}}^{3} {x^{1}} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + {x^{0}}^{2} {x^{1}}^{2} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + {x^{0}}^{3} {x^{1}} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + {x^{0}}^{2} {x^{1}}^{2} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + {x^{0}}^{2} {x^{1}}^{2} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + {x^{0}} {x^{1}}^{3} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + {x^{0}}^{3} {x^{1}} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + {x^{0}}^{2} {x^{1}}^{2} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + {x^{0}}^{2} {x^{1}}^{2} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + {x^{0}} {x^{1}}^{3} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + {x^{0}}^{2} {x^{1}}^{2} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + {x^{0}} {x^{1}}^{3} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + {x^{0}} {x^{1}}^{3} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + {x^{1}}^{4} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}


Example 13.8

Defining tensor fields with symbolic components we can use shorter and more general notation.

Let us define a tensor field of type (0,2) in a more compact way.

N = 2 # dimension of manifold M M = Manifold(N, 'M') # manifold M X = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)])) # chart on M t = M.tensor_field(0,2, name='t') # tensor field of type (0,2) def fn(i,j): return 'f'+str(i)+str(j) # names for components def fl(i,j): return 'f'+'_'+'{'+str(i)+str(j)+'}' # latex comp.names ff=[[M.scalar_field(function(fn(i,j),latex_name=fl(i,j))(*X)) for j in range(N)] for i in range(N)] # nested list of comp. t[:] = ff # define all components t.disp() # show the result

t=f00dx0dx0+f01dx0dx1+f10dx1dx0+f11dx1dx1\displaystyle t = f_{00} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + f_{01} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + f_{10} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + f_{11} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}

As we can see, the result is the same as previously.

The functions arguments can be omitted.

Manifold.options.omit_function_arguments=True t.disp()

t=f00dx0dx0+f01dx0dx1+f10dx1dx0+f11dx1dx1\displaystyle t = f_{00} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + f_{01} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + f_{10} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + f_{11} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}

(t*t).disp()

tt=f002dx0dx0dx0dx0+f00f01dx0dx0dx0dx1+f00f10dx0dx0dx1dx0+f00f11dx0dx0dx1dx1+f00f01dx0dx1dx0dx0+f012dx0dx1dx0dx1+f01f10dx0dx1dx1dx0+f01f11dx0dx1dx1dx1+f00f10dx1dx0dx0dx0+f01f10dx1dx0dx0dx1+f102dx1dx0dx1dx0+f10f11dx1dx0dx1dx1+f00f11dx1dx1dx0dx0+f01f11dx1dx1dx0dx1+f10f11dx1dx1dx1dx0+f112dx1dx1dx1dx1\displaystyle t\otimes t = f_{00}^{2} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + f_{00} f_{01} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + f_{00} f_{10} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + f_{00} f_{11} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + f_{00} f_{01} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + f_{01}^{2} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + f_{01} f_{10} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + f_{01} f_{11} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + f_{00} f_{10} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + f_{01} f_{10} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + f_{10}^{2} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + f_{10} f_{11} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + f_{00} f_{11} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + f_{01} f_{11} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + f_{10} f_{11} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + f_{11}^{2} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}

Manifold.options.omit_function_arguments=False

Remark. If we want to make purely algebraic operations on tensor fields, then we can use symbols, not functions as components (this will not work if we want to use derivatives!).


Example 13.9

Define (0,3) type tensor field on a two dimensional manifold.

N = 2 # dimension of manifold M M = Manifold(N, 'M') # manifold M X = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)])) # chart on M t3 = M.tensor_field(0,3, name='t3')# tensor field of type (0,3) print(t3) # information on t3
Tensor field t3 of type (0,3) on the 2-dimensional differentiable manifold M

We define a three-dimensional table of symbols aijka_{ijk}

a3 =[[[SR('a'+str(i)+str(j)+str(k)) for k in range(N)] for j in range(N)] for i in range(N)] # nested list of components

and all components define with one equality.

t3[:] = a3 # define all components as symbols t3[:] # show components of t3

[[[a000,a001],[a010,a011]],[[a100,a101],[a110,a111]]]\displaystyle \left[\left[\left[a_{000}, a_{001}\right], \left[a_{010}, a_{011}\right]\right], \left[\left[a_{100}, a_{101}\right], \left[a_{110}, a_{111}\right]\right]\right]

t3.disp() # show the tensor

t3=a000dx0dx0dx0+a001dx0dx0dx1+a010dx0dx1dx0+a011dx0dx1dx1+a100dx1dx0dx0+a101dx1dx0dx1+a110dx1dx1dx0+a111dx1dx1dx1\displaystyle t3 = a_{000} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + a_{001} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + a_{010} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + a_{011} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + a_{100} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + a_{101} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + a_{110} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + a_{111} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}

Remember that the components in this example do not depend on coordinates.


Example 13.10

If we need a proper tensor field, with components depending on coordinates, the previous example should be modified.

The first cell remains the same:

N = 2 # dimension of manifold M = Manifold(N, 'M') # manifold M X = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)])) # chart on M t3 = M.tensor_field(0,3, name='t3');print(t3) # tensor field
Tensor field t3 of type (0,3) on the 2-dimensional differentiable manifold M

but to define components we need scalar fields:

def fn(i,j,k): return 'f'+str(i)+str(j)+str(k) # names of components def fl(i,j,k): return 'f'+'_'+'{'+str(i)+str(j)+str(k)+'}' # latex names # nested list of component functions ff = [[[M.scalar_field(function(fn(i,j,k),latex_name=fl(i,j,k))(*X)) for k in range(N)] for j in range(N)] for i in range(N)] t3[:] = ff # define all components t3.disp() # show t3

t3=f000(x0,x1)dx0dx0dx0+f001(x0,x1)dx0dx0dx1+f010(x0,x1)dx0dx1dx0+f011(x0,x1)dx0dx1dx1+f100(x0,x1)dx1dx0dx0+f101(x0,x1)dx1dx0dx1+f110(x0,x1)dx1dx1dx0+f111(x0,x1)dx1dx1dx1\displaystyle t3 = f_{000}\left({x^{0}}, {x^{1}}\right) \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + f_{001}\left({x^{0}}, {x^{1}}\right) \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + f_{010}\left({x^{0}}, {x^{1}}\right) \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + f_{011}\left({x^{0}}, {x^{1}}\right) \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + f_{100}\left({x^{0}}, {x^{1}}\right) \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + f_{101}\left({x^{0}}, {x^{1}}\right) \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + f_{110}\left({x^{0}}, {x^{1}}\right) \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + f_{111}\left({x^{0}}, {x^{1}}\right) \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}

The functions argument can be omitted:

Manifold.options.omit_function_arguments=True t3.disp() # output without component arguments

t3=f000dx0dx0dx0+f001dx0dx0dx1+f010dx0dx1dx0+f011dx0dx1dx1+f100dx1dx0dx0+f101dx1dx0dx1+f110dx1dx1dx0+f111dx1dx1dx1\displaystyle t3 = f_{000} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + f_{001} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + f_{010} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + f_{011} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + f_{100} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + f_{101} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + f_{110} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + f_{111} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}

Manifold.options.omit_function_arguments=False

Unfortunately, (in our system) latex encounters problems if the outputs are to long.

If the latex formatted output is not needed, the %display plain method works properly.

#(t3*t3).disp() returns latex code string #(t3*t3)[:] works OK Manifold.options.omit_function_arguments=True tt = t3*t3 %display plain tt.disp()
t3⊗t3 = f000^2 dx0⊗dx0⊗dx0⊗dx0⊗dx0⊗dx0 + f000*f001 dx0⊗dx0⊗dx0⊗dx0⊗dx0⊗dx1 + f000*f010 dx0⊗dx0⊗dx0⊗dx0⊗dx1⊗dx0 + f000*f011 dx0⊗dx0⊗dx0⊗dx0⊗dx1⊗dx1 + f000*f100 dx0⊗dx0⊗dx0⊗dx1⊗dx0⊗dx0 + f000*f101 dx0⊗dx0⊗dx0⊗dx1⊗dx0⊗dx1 + f000*f110 dx0⊗dx0⊗dx0⊗dx1⊗dx1⊗dx0 + f000*f111 dx0⊗dx0⊗dx0⊗dx1⊗dx1⊗dx1 + f000*f001 dx0⊗dx0⊗dx1⊗dx0⊗dx0⊗dx0 + f001^2 dx0⊗dx0⊗dx1⊗dx0⊗dx0⊗dx1 + f001*f010 dx0⊗dx0⊗dx1⊗dx0⊗dx1⊗dx0 + f001*f011 dx0⊗dx0⊗dx1⊗dx0⊗dx1⊗dx1 + f001*f100 dx0⊗dx0⊗dx1⊗dx1⊗dx0⊗dx0 + f001*f101 dx0⊗dx0⊗dx1⊗dx1⊗dx0⊗dx1 + f001*f110 dx0⊗dx0⊗dx1⊗dx1⊗dx1⊗dx0 + f001*f111 dx0⊗dx0⊗dx1⊗dx1⊗dx1⊗dx1 + f000*f010 dx0⊗dx1⊗dx0⊗dx0⊗dx0⊗dx0 + f001*f010 dx0⊗dx1⊗dx0⊗dx0⊗dx0⊗dx1 + f010^2 dx0⊗dx1⊗dx0⊗dx0⊗dx1⊗dx0 + f010*f011 dx0⊗dx1⊗dx0⊗dx0⊗dx1⊗dx1 + f010*f100 dx0⊗dx1⊗dx0⊗dx1⊗dx0⊗dx0 + f010*f101 dx0⊗dx1⊗dx0⊗dx1⊗dx0⊗dx1 + f010*f110 dx0⊗dx1⊗dx0⊗dx1⊗dx1⊗dx0 + f010*f111 dx0⊗dx1⊗dx0⊗dx1⊗dx1⊗dx1 + f000*f011 dx0⊗dx1⊗dx1⊗dx0⊗dx0⊗dx0 + f001*f011 dx0⊗dx1⊗dx1⊗dx0⊗dx0⊗dx1 + f010*f011 dx0⊗dx1⊗dx1⊗dx0⊗dx1⊗dx0 + f011^2 dx0⊗dx1⊗dx1⊗dx0⊗dx1⊗dx1 + f011*f100 dx0⊗dx1⊗dx1⊗dx1⊗dx0⊗dx0 + f011*f101 dx0⊗dx1⊗dx1⊗dx1⊗dx0⊗dx1 + f011*f110 dx0⊗dx1⊗dx1⊗dx1⊗dx1⊗dx0 + f011*f111 dx0⊗dx1⊗dx1⊗dx1⊗dx1⊗dx1 + f000*f100 dx1⊗dx0⊗dx0⊗dx0⊗dx0⊗dx0 + f001*f100 dx1⊗dx0⊗dx0⊗dx0⊗dx0⊗dx1 + f010*f100 dx1⊗dx0⊗dx0⊗dx0⊗dx1⊗dx0 + f011*f100 dx1⊗dx0⊗dx0⊗dx0⊗dx1⊗dx1 + f100^2 dx1⊗dx0⊗dx0⊗dx1⊗dx0⊗dx0 + f100*f101 dx1⊗dx0⊗dx0⊗dx1⊗dx0⊗dx1 + f100*f110 dx1⊗dx0⊗dx0⊗dx1⊗dx1⊗dx0 + f100*f111 dx1⊗dx0⊗dx0⊗dx1⊗dx1⊗dx1 + f000*f101 dx1⊗dx0⊗dx1⊗dx0⊗dx0⊗dx0 + f001*f101 dx1⊗dx0⊗dx1⊗dx0⊗dx0⊗dx1 + f010*f101 dx1⊗dx0⊗dx1⊗dx0⊗dx1⊗dx0 + f011*f101 dx1⊗dx0⊗dx1⊗dx0⊗dx1⊗dx1 + f100*f101 dx1⊗dx0⊗dx1⊗dx1⊗dx0⊗dx0 + f101^2 dx1⊗dx0⊗dx1⊗dx1⊗dx0⊗dx1 + f101*f110 dx1⊗dx0⊗dx1⊗dx1⊗dx1⊗dx0 + f101*f111 dx1⊗dx0⊗dx1⊗dx1⊗dx1⊗dx1 + f000*f110 dx1⊗dx1⊗dx0⊗dx0⊗dx0⊗dx0 + f001*f110 dx1⊗dx1⊗dx0⊗dx0⊗dx0⊗dx1 + f010*f110 dx1⊗dx1⊗dx0⊗dx0⊗dx1⊗dx0 + f011*f110 dx1⊗dx1⊗dx0⊗dx0⊗dx1⊗dx1 + f100*f110 dx1⊗dx1⊗dx0⊗dx1⊗dx0⊗dx0 + f101*f110 dx1⊗dx1⊗dx0⊗dx1⊗dx0⊗dx1 + f110^2 dx1⊗dx1⊗dx0⊗dx1⊗dx1⊗dx0 + f110*f111 dx1⊗dx1⊗dx0⊗dx1⊗dx1⊗dx1 + f000*f111 dx1⊗dx1⊗dx1⊗dx0⊗dx0⊗dx0 + f001*f111 dx1⊗dx1⊗dx1⊗dx0⊗dx0⊗dx1 + f010*f111 dx1⊗dx1⊗dx1⊗dx0⊗dx1⊗dx0 + f011*f111 dx1⊗dx1⊗dx1⊗dx0⊗dx1⊗dx1 + f100*f111 dx1⊗dx1⊗dx1⊗dx1⊗dx0⊗dx0 + f101*f111 dx1⊗dx1⊗dx1⊗dx1⊗dx0⊗dx1 + f110*f111 dx1⊗dx1⊗dx1⊗dx1⊗dx1⊗dx0 + f111^2 dx1⊗dx1⊗dx1⊗dx1⊗dx1⊗dx1

Tensor fields of type (k,0)(k,0) (contravariant tensor fields of rank kk)


A tensor field of type (k,0)(k, 0) (or a contravariant tensor field of rank kk) on a manifold MM is a map tt that associates to each point pMp ∈ M a tensor t(p)=tpTp(k,0)M   t(p)=t_p\in T^{(k,0)}_pM\ \ \ (Tp(k,0)MT^{(k,0)}_pM was defined in notebook 9).
The tensor field tt is smooth if for arbitrary 1-forms α1,...,αkα_1 , . . . , α_k , the function t(α1,...,αk)t(α_1 , . . . , α_k ), defined by [t(α1,...,αk)](p)=tp(α1(p),...,αk(p))[t (α_1, . . . , α_k )]( p) = t_p( α_1(p), . . . , α_k(p)) , is smooth.

The operations of tensor addition, scalar multiplication and tensor product are defined pointwise as in the case of covariant tensor fields.


Tensorial property


A map tt is a tensor field of type (k,0)(k,0) iff it associates to each set of kk covector fields α1,...,αkα_1 , . . . , α_k on MM a function t(α1,...,αk):MRt(α_1 , . . . , α_k):M\to R with the property that for functions f,g:MRf,g:M\to R, α1,,αk,β1,,βkT(M)\alpha_1,\ldots,\alpha_k,\beta_1,\ldots,\beta_k\in T^*(M), and i=1,,ki=1,\ldots,k

t(α1,...,fαi+gβi,...,αk)=ft(α1,...,αi,...,αk)+gt(α1,...,βi,...,αk).t (\alpha_1 , . . . , f\alpha_i + g\beta_i , . . . , \alpha_k ) = ft (\alpha_1 , . . . , \alpha_i , . . . , \alpha_k ) +gt (\alpha_1 , . . . , \beta_i , . . . , \alpha_k ).

Note that the last property means that contravariant tensor fields of rank kk are just multilinear functions on the Cartesian product Ω1(M)××Ω1(M)k   times\underbrace{\Omega^1(M)\times\cdots\times \Omega^1(M)}_{k\ \; \mbox{times}} of kk copies of the module Ω1(M)\Omega^1(M) over the ring C(M)C^\infty(M).

The module of contravariant tensor fields of type (k,0)(k,0) on a manifold MM will be denoted by T(𝑘,0)M.T^{(𝑘,0)}M.

Warning. If MM is a module -not a manifold, in notebook 9a the same notations denote the space of contravariant tensors of rank 𝑘 on the module MM.


Contravariant tensor fields in components


Using (9.7) we can check that any tensor field of type (k,0)(k,0) on MM is expressed locally as

ParseError: KaTeX parse error: Undefined control sequence: \label at position 142: …tial x^{i_k}}. \̲l̲a̲b̲e̲l̲{}\tag{13.8} \e…

One can prove that if x1,,xnx^1,\ldots,x^n are local coordinates on UU and  ti1ik=t(dxi1,...,dxik) \ t^{i_1\ldots i_k}=t(dx^{i_1} , . . . , dx^{i_k} )\ , then tt is smooth iff for arbitrary pMp\in M there is a coordinate map (U,(x1,,xn))(U,(x^1,\ldots,x^n)) around pp such that the real functions  ti1ik \ t^{i_1\ldots i_k}\ are smooth.


Example 13.11

Let us show an example of tensor field tT(2,0)Mt\in T^{(2,0)}M.

%display latex N = 2 # dimension of manifold M M = Manifold(N, 'M') # manifold M X = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)])) # chart on M t = M.tensor_field(2,0, name='t'); print(t) # tensor field (2,0) type
Tensor field t of type (2,0) on the 2-dimensional differentiable manifold M

Below, we use superscripts to show that the contravariant tensor fields may look in SageMath Manifolds as in textbooks.

def fn(i,j): return 'f'+str(i)+str(j) # component names def fl(i,j): return 'f'+'^'+'{'+str(i)+str(j)+'}' # latex names ff = [[M.scalar_field(function(fn(i,j),latex_name=fl(i,j))(*X)) for j in range(N)] for i in range(N)] # nested list of comp. t[:] = ff # define all components Manifold.options.omit_function_arguments=True # output without comp. arguments t.disp() # show t

t=f00x0x0+f01x0x1+f10x1x0+f11x1x1\displaystyle t = f^{00} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} } + f^{01} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} } + f^{10} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} } + f^{11} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }

Using tensor products it is easy to obtain large outputs.

Manifold.options.omit_function_arguments=False # output with comp. arguments (t*t).disp() # show tensor product

tt=f00(x0,x1)2x0x0x0x0+f00(x0,x1)f01(x0,x1)x0x0x0x1+f00(x0,x1)f10(x0,x1)x0x0x1x0+f00(x0,x1)f11(x0,x1)x0x0x1x1+f00(x0,x1)f01(x0,x1)x0x1x0x0+f01(x0,x1)2x0x1x0x1+f01(x0,x1)f10(x0,x1)x0x1x1x0+f01(x0,x1)f11(x0,x1)x0x1x1x1+f00(x0,x1)f10(x0,x1)x1x0x0x0+f01(x0,x1)f10(x0,x1)x1x0x0x1+f10(x0,x1)2x1x0x1x0+f10(x0,x1)f11(x0,x1)x1x0x1x1+f00(x0,x1)f11(x0,x1)x1x1x0x0+f01(x0,x1)f11(x0,x1)x1x1x0x1+f10(x0,x1)f11(x0,x1)x1x1x1x0+f11(x0,x1)2x1x1x1x1\displaystyle t\otimes t = f^{00}\left({x^{0}}, {x^{1}}\right)^{2} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} } + f^{00}\left({x^{0}}, {x^{1}}\right) f^{01}\left({x^{0}}, {x^{1}}\right) \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} } + f^{00}\left({x^{0}}, {x^{1}}\right) f^{10}\left({x^{0}}, {x^{1}}\right) \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} } + f^{00}\left({x^{0}}, {x^{1}}\right) f^{11}\left({x^{0}}, {x^{1}}\right) \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} } + f^{00}\left({x^{0}}, {x^{1}}\right) f^{01}\left({x^{0}}, {x^{1}}\right) \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} } + f^{01}\left({x^{0}}, {x^{1}}\right)^{2} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} } + f^{01}\left({x^{0}}, {x^{1}}\right) f^{10}\left({x^{0}}, {x^{1}}\right) \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} } + f^{01}\left({x^{0}}, {x^{1}}\right) f^{11}\left({x^{0}}, {x^{1}}\right) \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} } + f^{00}\left({x^{0}}, {x^{1}}\right) f^{10}\left({x^{0}}, {x^{1}}\right) \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} } + f^{01}\left({x^{0}}, {x^{1}}\right) f^{10}\left({x^{0}}, {x^{1}}\right) \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} } + f^{10}\left({x^{0}}, {x^{1}}\right)^{2} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} } + f^{10}\left({x^{0}}, {x^{1}}\right) f^{11}\left({x^{0}}, {x^{1}}\right) \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} } + f^{00}\left({x^{0}}, {x^{1}}\right) f^{11}\left({x^{0}}, {x^{1}}\right) \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} } + f^{01}\left({x^{0}}, {x^{1}}\right) f^{11}\left({x^{0}}, {x^{1}}\right) \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} } + f^{10}\left({x^{0}}, {x^{1}}\right) f^{11}\left({x^{0}}, {x^{1}}\right) \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} } + f^{11}\left({x^{0}}, {x^{1}}\right)^{2} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }

Manifold.options.omit_function_arguments=True # output without comp. arguments %display plain (t*t).disp() # show tensor product
t⊗t = f00^2 ∂/∂x0⊗∂/∂x0⊗∂/∂x0⊗∂/∂x0 + f00*f01 ∂/∂x0⊗∂/∂x0⊗∂/∂x0⊗∂/∂x1 + f00*f10 ∂/∂x0⊗∂/∂x0⊗∂/∂x1⊗∂/∂x0 + f00*f11 ∂/∂x0⊗∂/∂x0⊗∂/∂x1⊗∂/∂x1 + f00*f01 ∂/∂x0⊗∂/∂x1⊗∂/∂x0⊗∂/∂x0 + f01^2 ∂/∂x0⊗∂/∂x1⊗∂/∂x0⊗∂/∂x1 + f01*f10 ∂/∂x0⊗∂/∂x1⊗∂/∂x1⊗∂/∂x0 + f01*f11 ∂/∂x0⊗∂/∂x1⊗∂/∂x1⊗∂/∂x1 + f00*f10 ∂/∂x1⊗∂/∂x0⊗∂/∂x0⊗∂/∂x0 + f01*f10 ∂/∂x1⊗∂/∂x0⊗∂/∂x0⊗∂/∂x1 + f10^2 ∂/∂x1⊗∂/∂x0⊗∂/∂x1⊗∂/∂x0 + f10*f11 ∂/∂x1⊗∂/∂x0⊗∂/∂x1⊗∂/∂x1 + f00*f11 ∂/∂x1⊗∂/∂x1⊗∂/∂x0⊗∂/∂x0 + f01*f11 ∂/∂x1⊗∂/∂x1⊗∂/∂x0⊗∂/∂x1 + f10*f11 ∂/∂x1⊗∂/∂x1⊗∂/∂x1⊗∂/∂x0 + f11^2 ∂/∂x1⊗∂/∂x1⊗∂/∂x1⊗∂/∂x1

Example 13.12

The superscripts in contravariant tensor components are not obligatory. Let us modify the previous example using subscripts.

reset() N = 2 # dimension of manifold M M = Manifold(N, 'M') # manifold M X = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)])) # chart on M t2 = M.tensor_field(2,0, name='t2') # tensor field (2,0) type def hn(i,j): return 'h'+str(i)+str(j) # names for components def hl(i,j): return 'h'+'_'+'{'+str(i)+str(j)+'}' # latex names ff = [[M.scalar_field(function(hn(i,j), latex_name=hl(i,j))(*X)) for j in range(N)] for i in range(N)] # component functions t2[:] = ff # define all components Manifold.options.omit_function_arguments=True # output without comp.arg %display latex t2.disp() # show the tensor field

t2=h00x0x0+h01x0x1+h10x1x0+h11x1x1\displaystyle t2 = h_{00} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} } + h_{01} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} } + h_{10} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} } + h_{11} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }

tt2 = t2*t2 tt2.disp() # show tensor product

t2t2=h002x0x0x0x0+h00h01x0x0x0x1+h00h10x0x0x1x0+h00h11x0x0x1x1+h00h01x0x1x0x0+h012x0x1x0x1+h01h10x0x1x1x0+h01h11x0x1x1x1+h00h10x1x0x0x0+h01h10x1x0x0x1+h102x1x0x1x0+h10h11x1x0x1x1+h00h11x1x1x0x0+h01h11x1x1x0x1+h10h11x1x1x1x0+h112x1x1x1x1\displaystyle t2\otimes t2 = h_{00}^{2} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} } + h_{00} h_{01} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} } + h_{00} h_{10} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} } + h_{00} h_{11} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} } + h_{00} h_{01} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} } + h_{01}^{2} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} } + h_{01} h_{10} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} } + h_{01} h_{11} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} } + h_{00} h_{10} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} } + h_{01} h_{10} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} } + h_{10}^{2} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} } + h_{10} h_{11} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} } + h_{00} h_{11} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} } + h_{01} h_{11} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} } + h_{10} h_{11} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} } + h_{11}^{2} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }


Example 13.13

Let us show an example of (3,0) type tensor field, using superscripts.

%display latex N = 2 # dimension of manifold M M = Manifold(N, 'M') # manifold M X = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)])) # chart on M s3 = M.tensor_field(3,0, name='s3'); # tensor field of type (3,0)
def fn(i,j,k): return 'f'+str(i)+str(j)+str(k) # components names def fl(i,j,k): return 'f'+'^'+'{'+str(i)+str(j)+str(k)+'}' # latex names ff = [[[M.scalar_field(function(fn(i,j,k),latex_name=fl(i,j,k))(*X)) for k in range(N)] for j in range(N)] for i in range(N)] # components s3[:] = ff # define all components Manifold.options.omit_function_arguments=True # output without comp. args s3.disp() # show the tensor

s3=f000x0x0x0+f001x0x0x1+f010x0x1x0+f011x0x1x1+f100x1x0x0+f101x1x0x1+f110x1x1x0+f111x1x1x1\displaystyle s3 = f^{000} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} } + f^{001} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} } + f^{010} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} } + f^{011} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} } + f^{100} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} } + f^{101} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} } + f^{110} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} } + f^{111} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }

# check tensor product ss3 = s3*s3 print(ss3)
Tensor field s3⊗s3 of type (6,0) on the 2-dimensional differentiable manifold M

Tensor fields of type (𝑘,m)(𝑘,m) (mixed tensor fields)


A tensor field of type (k,m)(k,m) (a mixed tensor field) on MM is a map tt that to each point pMp ∈ M associates a tensor t(p)=tpTp(k,m)M   t(p)=t_p\in T^{(k,m)}_pM\ \ \ (Tp(k,m)MT^{(k,m)}_pM was defined in notebook 9.


A tensor field of type (0,0)(0,0) on MM is a scalar function MRM\to R.

A tensor field tt of type (k,m)(k,m) is smooth if for X1,...,XmX(M)X_1 , . . . , X_m ∈ \mathfrak{X}(M) and α1,...,αkΩ1(M)α_1 , . . . , α_k ∈ \Omega^1 (M), the function MRM \to R that to each point pMp ∈ M associates the value tp(α1(p),...,αk(p),X1(p),...,Xm(p))t_p(α_1 ( p), . . . , α_k ( p),X_1 ( p), . . . , X_m ( p) ) is smooth.
The sum, the product by scalars, the product by real-valued functions, and the tensor product of mixed tensor fields are defined pointwise as in the case of covariant and contravariant tensors.

(at+bs)p=atp+bsp,(ft)p=f(p)tp,(ts)p=tpsp,\begin{matrix} (at + bs)_p = at_p + bs_p,\\ ( f t)_p = f ( p)t_p,\\ (t ⊗ s)_p = t_p ⊗ s_p, \end{matrix}

for a,bRa, b ∈ R, s,ts, t mixed tensor fields on MM and f:MRf : M → R (addition is defined only for tensors of the same type).

The set of smooth tensor fields of type (k,m)(k,m) on a manifold MM, will be denoted by T(k,m)MT^{(k,m)}M.
T(k,m)MT^{(k,m)}M is a module over the ring C(M)C^∞(M).

Warning. Recall, that in notebook 9a, the same symbol  T(k,m)M \ T^{(k,m)}M\ denotes the space of mixed tensors on a module MM.


Tensorial property


As previously, we can check, that tensor fields of type (k,m)(k,m) are just multilinear functions on the Cartesian product Ω1(M)××Ω1(M)k   times×X(M)××X(M)m   times\underbrace{\Omega^1(M)\times\cdots\times \Omega^1(M)}_{k\ \; \mbox{times}} \times \underbrace{\mathfrak{X}(M)\times\cdots\times \mathfrak{X}(M)}_{m\ \; \mbox{times}} of kk copies of the module Ω1(M)\Omega^1(M) and mm copies of the module X(M)\mathfrak{X}(M) over the ring C(M)C^\infty(M).


General tensor fields in components


Generalizing the formulas (13.7) and (13.8) we obtain the following expression for the general tensor field tT(k,m)Mt\in T^{(k,m)}M in local components

ParseError: KaTeX parse error: Undefined control sequence: \label at position 256: …imes dx^{j_m}. \̲l̲a̲b̲e̲l̲{}\tag{13.9} \e…

Very often the notation tj1jmi1ik=t(dxi1,..,dxik,xj1,..,xjm)t^{i_1\ldots i_k}_{j_1\ldots j_m}=t\big(dx^{i_1},..,dx^{i_k},\frac{\partial}{\partial x^{j_1}},..,\frac{\partial}{\partial x^{j_m}}\big) is used and then t=tj1jmi1ikxi1xikdxj1dxjm.t=t^{i_1\ldots i_k}_{j_1\ldots j_m}\frac{\partial}{\partial x^{i_1}}\otimes\dots\otimes\frac{\partial}{\partial x^{i_k}}\otimes dx^{j_1}\otimes\ldots\otimes dx^{j_m}.

One can prove that if x1,,xnx^1,\ldots,x^n are local coordinates on UU and tj1jmi1ikt^{i_1\ldots i_k}_{j_1\ldots j_m} are defined as above, then tt is smooth iff for arbitrary pMp\in M there is a coordinate map (U,(x1,,xn))(U,(x^1,\ldots,x^n)) around pp such that the real functions tj1jmi1ikt^{i_1\ldots i_k}_{j_1\ldots j_m} are smooth.


Example 13.14

Consider a 2-dimensional manifold with global coordinates x0,x1x^0,x^1:

%display latex N = 2 # dimension of manifold M M = Manifold(N, 'M') # manifold M X = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)])) # chart on M

Define a general tensor field of type (1,1).

In the case of mixed type tensor fields it is important to distinguish the lower and upper indices!

def fn(i,j): return 't'+str(i)+str(j) # component names def fl(i,j): return 't'+'^'+str(i)+'_'+str(j) # latex names ff = [[M.scalar_field(function(fn(i,j),latex_name=fl(i,j))(*X)) for j in range(N)] for i in range(N)] # list of components t = M.tensor_field(1,1, name='t') # tensor of (1,1) type t[:] = ff # define all components t.disp() # show the tensor

t=t00x0dx0+t10x0dx1+t01x1dx0+t11x1dx1\displaystyle t = t^0_0 \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{0}} + t^0_1 \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{1}} + t^1_0 \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{0}} + t^1_1 \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{1}}

With this notations, the tensor product can be computed without problems:

#t*t works Manifold.options.omit_function_arguments=False # output with comp.args tt = t*t # tensor product tt.disp() # show tensor product

tt=t00(x0,x1)2x0x0dx0dx0+t00(x0,x1)t10(x0,x1)x0x0dx0dx1+t00(x0,x1)t10(x0,x1)x0x0dx1dx0+t10(x0,x1)2x0x0dx1dx1+t00(x0,x1)t01(x0,x1)x0x1dx0dx0+t00(x0,x1)t11(x0,x1)x0x1dx0dx1+t10(x0,x1)t01(x0,x1)x0x1dx1dx0+t10(x0,x1)t11(x0,x1)x0x1dx1dx1+t00(x0,x1)t01(x0,x1)x1x0dx0dx0+t10(x0,x1)t01(x0,x1)x1x0dx0dx1+t00(x0,x1)t11(x0,x1)x1x0dx1dx0+t10(x0,x1)t11(x0,x1)x1x0dx1dx1+t01(x0,x1)2x1x1dx0dx0+t01(x0,x1)t11(x0,x1)x1x1dx0dx1+t01(x0,x1)t11(x0,x1)x1x1dx1dx0+t11(x0,x1)2x1x1dx1dx1\displaystyle t\otimes t = t^0_0\left({x^{0}}, {x^{1}}\right)^{2} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + t^0_0\left({x^{0}}, {x^{1}}\right) t^0_1\left({x^{0}}, {x^{1}}\right) \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + t^0_0\left({x^{0}}, {x^{1}}\right) t^0_1\left({x^{0}}, {x^{1}}\right) \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + t^0_1\left({x^{0}}, {x^{1}}\right)^{2} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + t^0_0\left({x^{0}}, {x^{1}}\right) t^1_0\left({x^{0}}, {x^{1}}\right) \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + t^0_0\left({x^{0}}, {x^{1}}\right) t^1_1\left({x^{0}}, {x^{1}}\right) \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + t^0_1\left({x^{0}}, {x^{1}}\right) t^1_0\left({x^{0}}, {x^{1}}\right) \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + t^0_1\left({x^{0}}, {x^{1}}\right) t^1_1\left({x^{0}}, {x^{1}}\right) \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + t^0_0\left({x^{0}}, {x^{1}}\right) t^1_0\left({x^{0}}, {x^{1}}\right) \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + t^0_1\left({x^{0}}, {x^{1}}\right) t^1_0\left({x^{0}}, {x^{1}}\right) \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + t^0_0\left({x^{0}}, {x^{1}}\right) t^1_1\left({x^{0}}, {x^{1}}\right) \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + t^0_1\left({x^{0}}, {x^{1}}\right) t^1_1\left({x^{0}}, {x^{1}}\right) \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + t^1_0\left({x^{0}}, {x^{1}}\right)^{2} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + t^1_0\left({x^{0}}, {x^{1}}\right) t^1_1\left({x^{0}}, {x^{1}}\right) \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + t^1_0\left({x^{0}}, {x^{1}}\right) t^1_1\left({x^{0}}, {x^{1}}\right) \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + t^1_1\left({x^{0}}, {x^{1}}\right)^{2} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}


Example 13.15

Now let us try to define (2,2)-type tensor field on the same two-dimensional manifold

# continuation; first define names and latex names of components def fl(i0,i1,i2,i3): return 't'+'^'+'{'+str(i0)+str(i1)+'}'+'_'+'{'+str(i2)+str(i3)+'}' def fn(i0,i1,i2,i3): return 't'+str(i0)+str(i1)+str(i2)+str(i3) # define nested list of components of the tensor ff = [[[[M.scalar_field(function(fn(i0,i1,i2,i3),latex_name=fl(i0,i1,i2,i3))(*X)) for i3 in range(N)] for i2 in range(N)] for i1 in range(N)] for i0 in range(N)] t = M.tensor_field(2,2, name='t') # tensor field of type (2,2) t[:] = ff # define all components# Manifold.options.omit_function_arguments=True # output without comp. args t.disp() # show the tensor

t=t0000x0x0dx0dx0+t0100x0x0dx0dx1+t1000x0x0dx1dx0+t1100x0x0dx1dx1+t0001x0x1dx0dx0+t0101x0x1dx0dx1+t1001x0x1dx1dx0+t1101x0x1dx1dx1+t0010x1x0dx0dx0+t0110x1x0dx0dx1+t1010x1x0dx1dx0+t1110x1x0dx1dx1+t0011x1x1dx0dx0+t0111x1x1dx0dx1+t1011x1x1dx1dx0+t1111x1x1dx1dx1\displaystyle t = t^{00}_{00} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + t^{00}_{01} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + t^{00}_{10} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + t^{00}_{11} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + t^{01}_{00} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + t^{01}_{01} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + t^{01}_{10} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + t^{01}_{11} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + t^{10}_{00} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + t^{10}_{01} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + t^{10}_{10} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + t^{10}_{11} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + t^{11}_{00} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + t^{11}_{01} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + t^{11}_{10} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + t^{11}_{11} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}

Tensor product works with this notations (but the output is very long).

#t*t works tt = t*t
# tt.disp() -latex code # tt[:] very long output after very long time
# %display plain # tt.disp() # very-very long output

It is easier to check that the linear operations work:

Manifold.options.omit_function_arguments=True # output without comp.args (t + 2*t).disp() # show t+2*t

3t0000x0x0dx0dx0+3t0100x0x0dx0dx1+3t1000x0x0dx1dx0+3t1100x0x0dx1dx1+3t0001x0x1dx0dx0+3t0101x0x1dx0dx1+3t1001x0x1dx1dx0+3t1101x0x1dx1dx1+3t0010x1x0dx0dx0+3t0110x1x0dx0dx1+3t1010x1x0dx1dx0+3t1110x1x0dx1dx1+3t0011x1x1dx0dx0+3t0111x1x1dx0dx1+3t1011x1x1dx1dx0+3t1111x1x1dx1dx1\displaystyle 3 \, t^{00}_{00} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + 3 \, t^{00}_{01} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + 3 \, t^{00}_{10} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + 3 \, t^{00}_{11} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + 3 \, t^{01}_{00} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + 3 \, t^{01}_{01} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + 3 \, t^{01}_{10} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + 3 \, t^{01}_{11} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + 3 \, t^{10}_{00} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + 3 \, t^{10}_{01} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + 3 \, t^{10}_{10} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + 3 \, t^{10}_{11} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + 3 \, t^{11}_{00} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + 3 \, t^{11}_{01} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + 3 \, t^{11}_{10} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + 3 \, t^{11}_{11} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}

What's next?

Take a look at the notebook Differential k-forms.