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

9. Tensors on TpMT_pM

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'

Warning. In this notebook there are many repetitions with respect to the notebook 9a. Tensors on modules. Although mathematically tensors on modules are generalizations of tensors on the tangent spaces, the SageMath Manifolds code in the present notebook differs significantly from that in notebook 9a.


Differentials of functions, linear forms, covectors


If MM is a smooth manifold, pMp ∈ M, TpMT_pM is the tangent space to MM at pp, and fC(M)f ∈ C^∞(M), then the differential of ff at pp, denoted by dfpd f_p, is defined by

ParseError: KaTeX parse error: Undefined control sequence: \label at position 65: …} X_p\in T_pM. \̲l̲a̲b̲e̲l̲{} \tag{9.1} \e…

Let us show some examples of scalar functions and differentials.


Example 9.1

Define a 3-dimensional manifold M,M, a point pMp\in M, the tangent space at TpMT_pM, a tangent vector vTpMv\in T_pM and some scalar function ff on MM.

%display latex N = 3 M = Manifold(N, 'M') # manifold M of dimension N X = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)])) # chart on M p = M.point(X[:], name='p') # generic point p of M Tp = M.tangent_space(p) # tangent space at p # components of tangent vector v: vn = [var('v'+str(i), latex_name='v'+'^'+str(i)) for i in range(N)] v = Tp(vn, name='v') # tangent vector v f = M.scalar_field(function('f')(*X), name='f') # scalar funct. print(p) # information on p p.coord() # coordinates of p
Point p on the 3-dimensional differentiable manifold M

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

print(v) # information on v v.comp()[:] # components of v
Tangent vector v at Point p on the 3-dimensional differentiable manifold M

[v0,v1,v2]\displaystyle \left[{v^0}, {v^1}, {v^2}\right]

f.disp() # show scalar function f

f:MR(x0,x1,x2)f(x0,x1,x2)\displaystyle \begin{array}{llcl} f:& M & \longrightarrow & \mathbb{R} \\ & \left({x^{0}}, {x^{1}}, {x^{2}}\right) & \longmapsto & f\left({x^{0}}, {x^{1}}, {x^{2}}\right) \end{array}

Now let us define the differential of ff at pp:

# continuation df = f.differential() # differential of f dfp = df.at(p) # differential of f at p print("df_p is a") print(dfp) # information on dfp print("Components of df_p:") dfp.components()[:] # components of differential at p
df_p is a Linear form df on the Tangent space at Point p on the 3-dimensional differentiable manifold M Components of df_p:

[x0f(x0,x1,x2),x1f(x0,x1,x2),x2f(x0,x1,x2)]\displaystyle \left[\frac{\partial}{\partial {x^{0}}}f\left({x^{0}}, {x^{1}}, {x^{2}}\right), \frac{\partial}{\partial {x^{1}}}f\left({x^{0}}, {x^{1}}, {x^{2}}\right), \frac{\partial}{\partial {x^{2}}}f\left({x^{0}}, {x^{1}}, {x^{2}}\right)\right]

and check that the value of dfdf at pp on the tangent vector vv is equal to v(f)v(f):

bool(dfp(v)==v(f)) # check if df_p(v)=v(f)

True\displaystyle \mathrm{True}


Linearity of dfpdf_p


Recall that for a vector space (or a module) VV the map t:VRt:V\to R is linear iff

t(av+bw)=at(v)+bt(w),forv,wV,a,bR.t (av + bw ) = at(v) + bt(w ),\quad\text{for}\quad v,w\in V,\quad a,b\in R.

To check that dfp:TpMRdf_p: T_pM\to R is linear let us note that

dfp(avp+bwp)=(avp+bwp)(f)=avp(f)+bwp(f)=adfp(vp)+bdfp(wp).d f_p (av_p + bw_p ) = (av_p + bw_p )( f ) = av_p ( f ) + bw_p ( f ) = a d f_p (v_p ) + b d f_p (w_p ).

Cotangent space TpMT^*_pM


The space of linear forms on TpMT_pM is by definition the dual space of TpMT_pM and is denoted by TpMT_p^*M. Elements of TpMT_p^*M are called covectors or covariant vectors and TpMT_p^*M is called the cotangent space to MM at pp.
The vector space operations in TpMT_p^*M are defined in a natural way

(αp+βp)(vp)=αp(vp)+βp(vp),(aαp)(vp)=a(αp(vp)),(\alpha_p+\beta_p)(v_p)=\alpha_p(v_p)+\beta_p(v_p),\quad (aα_p )(v_p ) = a(α_p (v_p )),

for   αp,βpTpM,  vpTpM \ \ α_p , β_p ∈ T_p^∗ M,\ \ v_p ∈ T_p M\ and aRa ∈ R.

To check what kind of object is dfpdf_p we can use the parent method:

# continuation # mathematical object of which "dfp" is an element. print(dfp.parent())
Dual of the Tangent space at Point p on the 3-dimensional differentiable manifold M

Example 9.2

If x1,,xnx^1,\ldots,x^n are local coordinates on MM, then differentials dxpidx^i_p are covectors from TpMT_p^*M. From (9.1) it follows that if the tangent vector is expressed as Xp=Xp(xi)xipX_p=X_p(x^i)\frac{\partial}{\partial x^i}\big|_p, then

ParseError: KaTeX parse error: Undefined control sequence: \label at position 54: …X_p)=X_p(x^i), \̲l̲a̲b̲e̲l̲{}\tag{9.1'} \e…

i.e.  dxpi\ dx^i_p is the covector that maps the tangent vector at pp to its ii-th component in the basis {xjp}j=1n.\displaystyle \big\{\frac{\partial}{\partial x^j}\big|_p\big\}_{j=1}^n.


Example 9.3

Let us define the scalar functions representing the i-th coordinate of the point.

N = 3 # dimension of manifold M M = Manifold(N, 'M') # manifold M of dimension N X = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)])) # chart on M x0, x1, x2 = X[:] p = M.point((x0, x1, x2), name='p') # point of M fx0 = M.scalar_field(x0, name='fx0') # fx0: x-->x^0 fx1 = M.scalar_field(x1, name='fx1') # fx1: x-->x^1 fx2 = M.scalar_field(x2, name='fx2') # fx2: x-->x^2 fx0.expr(), fx1.expr(), fx2.expr()

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

And next their differentials:

dx0 = fx0.differential() # differential of fx0 dx1 = fx1.differential() # differential of fx1 dx2 = fx2.differential() # differential of fx2 dx0_p = dx0.at(p) # differential of fx0 at p dx1_p = dx1.at(p) # differential of fx1 at p dx2_p = dx2.at(p) # differential of fx2 at p [dx0_p.disp(), dx1_p.disp(), dx2_p.disp()] # show all three

[dfx0=dx0,dfx1=dx1,dfx2=dx2]\displaystyle \left[\mathrm{d}fx0 = \mathrm{d} {x^{0}}, \mathrm{d}fx1 = \mathrm{d} {x^{1}}, \mathrm{d}fx2 = \mathrm{d} {x^{2}}\right]

We can check that the just defined differentials, when applied to the tangent vector vv give its i-th component viv^i.

Tp = M.tangent_space(p) # tangent space at p # variables with superscripts: vn = [var('v'+str(i), latex_name='v'+'^'+str(i)) for i in range(N)] v = Tp(vn, name='v') # tangent vector at p (dx0_p(v), dx1_p(v), dx1_p(v)) # values of differentials of xi # at p on a tangent vector v

(v0,v1,v1)\displaystyle \left({v^0}, {v^1}, {v^1}\right)


Bases in the cotangent space


Using the definition of the basis tangent vectors xip(f)=Diϕ(p)(fϕ1)\frac{\partial}{\partial x^i}\Big|_p(f)=D_i\Big|_{\phi(p)}(f\circ\phi^{-1}) and the fact that (xjϕ1(x1(p),,xn(p))=(xjϕ1)(ϕ(p))=xj(p), (x^j\circ\phi^{-1}(x^1(p),\ldots,x^n(p))=(x^j\circ\phi^{-1})(\phi(p))=x^j(p),\ we see that xip(xj)=δij\frac{\partial}{\partial x^i}\Big|_p(x^j)=\delta_i^j and consequently dxpi(xjp)=xjp(xi)=δjidx^i_p\big(\frac{\partial}{\partial x^j}\big|_p\big)= \frac{\partial}{\partial x^j}\big|_p(x^i)=\delta_j^i. The last relation implies that:

The family {dxpi}i=1n\{dx^i_p\}_{i=1}^n is a basis of TpMT_p^*M.

In fact if the linear combination  aidxpi \ a_idx^i_p\ is equal to zero covector, then  0=(aidxpi)(/xjp)=aiδji=aj \ 0 = (a_i dx^i_p ) (∂/∂ x^j|_p)= a_i\delta_j^i=a_j\ i.e., the coefficients of this combination vanish, so the family is linearly independent.
If  αpTpM\ \alpha_p\in T^*_pM, then for  vpTpM \ v_p\in T_pM\ in the form vp=vp(xi)xipv_p= v_p(x^i)\frac{\partial}{\partial x^i}\big|_p we have

αp(vp)=αp(vp(xi)xip)=vp(xi)αp(xip).\alpha_p(v_p)=\alpha_p\big( v_p(x^i)\frac{\partial}{\partial x^i}\big|_p\big)= v_p(x^i)\alpha_p\big(\frac{\partial}{\partial x^i}\big|_p\big).

From the definition of the differential it follows vp(xi)=dxpi(vp)v_p(x^i)=dx^i_p(v_p), so

αp(vp)=αp(xip)dxpi(vp)=[αp(xip)dxpi](vp),\alpha_p(v_p)= \alpha_p\big(\frac{\partial}{\partial x^i}\big|_p\big)dx^i_p(v_p)=\Big[ \alpha_p\big(\frac{\partial}{\partial x^i}\big|_p\big)dx^i_p\Big](v_p),

consequently

ParseError: KaTeX parse error: Undefined control sequence: \label at position 91: …_p\Big)dx^i_p. \̲l̲a̲b̲e̲l̲{} \tag{9.2} \e…

Thus every covector from TpMT_p^*M is a linear combination of {dxpi}i=1n.\{dx^i_p\}_{i=1}^n.


Example 9.4

For example the differential of ff is a linear combination of dx0,dx1,dx2dx^0,dx^1,dx^2 with coefficients fx0,fx1,fx2.\frac{\partial f}{\partial x^0},\frac{\partial f}{\partial x^1}, \frac{\partial f}{\partial x^2}.

In SageMath Manifolds the index pp denoting the point is always dropped.

The function display shows the differentials of functions and general linear forms as linear combinations of dxi.dx^i.

# continuation dfp.disp() # show df_p

df=x0f(x0,x1,x2)dx0+x1f(x0,x1,x2)dx1+x2f(x0,x1,x2)dx2\displaystyle \mathrm{d}f = \frac{\partial}{\partial {x^{0}}}f\left({x^{0}}, {x^{1}}, {x^{2}}\right) \mathrm{d} {x^{0}} + \frac{\partial}{\partial {x^{1}}}f\left({x^{0}}, {x^{1}}, {x^{2}}\right) \mathrm{d} {x^{1}} + \frac{\partial}{\partial {x^{2}}}f\left({x^{0}}, {x^{1}}, {x^{2}}\right) \mathrm{d} {x^{2}}


Example 9.5

Let us define a general linear form on the tangent space TpMT_pM of a 3-dimensional manifold.

N = 3 # dimension of manifold M M = Manifold(N, 'M') # manifold M of dimension N X = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)])) # chart on M p = M.point(X[:], name='p') # point of M Tp = M.tangent_space(p) # tangent space at p a = Tp.linear_form() # linear form on T_pM a[:] = var('a', n=3) # coefficients in the basis dx^i
a.disp() # show a

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


The linear form applied to a tangent vector gives a scalar.

#continuation # variables wit superscripts: vn = [var('v'+str(i), latex_name='v'+'^'+str(i)) for i in range(N)] v = Tp(vn, name='v') # tangent vector v at p a(v) # value of a on v

a0v0+a1v1+a2v2\displaystyle a_{0} {v^0} + a_{1} {v^1} + a_{2} {v^2}

The value of a tangent vector vTpMv\in T_pM on a linear form aTpMa\in T_p^*M is by definition equal to a(v)a(v).

v(a) # value of v on a

a0v0+a1v1+a2v2\displaystyle a_{0} {v^0} + a_{1} {v^1} + a_{2} {v^2}


Tensors in tangent spaces


Recall, that if VV is a vector space or a module, by a multilinear or more precisely kk-linear form we mean a function t:VkRt: V^k\to R which is linear in each of its arguments i.e., for i=1,,ki=1,\ldots,k

t(v1,αvi+βwi,vk)=αt(v1,vi,vk)+βt(v1,wi,vk),α,βR,vi,wiV.t(v_1\ldots,\alpha v_i+\beta w_i,\ldots v_k)= \alpha t(v_1\ldots,v_i,\ldots v_k)+\beta t(v_1\ldots,w_i,\ldots v_k),\quad \alpha,\beta\in R,\quad v_i,w_i\in V.

Assume that MM is a smooth manifold.

Space of tensors Tp(k,m)MT^{(k,m)}_pM of mixed type


is the space of multilinear maps:

Tp(k,m)M={tp:TpM××TpMk   times×TpM××TpMm   timesR},T^{(k,m)}_pM = \{t_p:\underbrace{T_p^*M\times\cdots\times T_p^*M}_{k\ \; \mbox{times}} \times \underbrace{T_pM\times\cdots\times T_pM}_{m\ \; \mbox{times}}\to R\},

where TpMT_pM is the tangent space at pMp\in M and TpMT_p^*M is the corresponding cotangent space.

Since for linear forms α\alpha and tangent vectors vv the assignment αv(α)\alpha\to v(\alpha) defines a linear form TpMRT_p^*M\to R, the elements vTpMv\in T_pM can be considered as elements of Tp(1,0)T_p^{(1,0)}. On the other hand Tp(0,1)T^{(0,1)}_p as the space of linear forms on TpMT_pM is equal to TpMT_p^*M. Thus, the tensor spaces generalize the tangent and cotangent spaces.


Example 9.6

Let us show how to define tensor modules of type (1,0) and (0,1) in SageMath Manifolds.

N = 3 # manifold dimension M = Manifold(N, 'M') # manifold M X = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)])) # chart on M p = M.point(X[:], name='p') # point on M Tp = M.tangent_space(p) # tangent space at p Tp.tensor_module(1,0) # T_p^(1,0)M

TpM\displaystyle T_{p}\,M

print(Tp.tensor_module(1,0)) # tensors (1,0) type are tangent vectors
Tangent space at Point p on the 3-dimensional differentiable manifold M
Tp.tensor_module(0,1) # tensors of type (0,1) are linear forms on T_pM # SageMath output looks a little strange # but note that the dual space to V is denoted by V*

TpM\displaystyle T_{p}\,M^*

print(Tp.tensor_module(0,1)) # SageMath naming is ready for arbitrary # tensors, covector is just (0,1) tensor
Free module of type-(0,1) tensors on the Tangent space at Point p on the 3-dimensional differentiable manifold M

Space Tp(0,k)MT^{(0,k)}_pM - of covariant tensors of rank kk

is the space of multilinear maps


Tp(0,k)M={tp:TpM××TpMk   timesR},T^{(0,k)}_pM = \{t_p:\underbrace{T_pM\times\cdots\times T_pM}_{k\ \; \mbox{times}}\to R\},

where TpMT_pM denotes the tangent space at pMp\in M.

For k=1 we obtain the space of covectors at pp, i.e., linear forms on TpM.T_pM.

In Tp(0,k)MT^{(0,k)}_pM we introduce the vector space structure by

(atp+bsp)(v1,vk)=atp(v1,vk)+bsp(v1,vk),(at_p+bs_p)(v_1\ldots,v_k)=at_p(v_1\ldots,v_k)+bs_p(v_1\ldots,v_k),

where tp,spTp(0,k)Mt_p,s_p\in T^{(0,k)}_pM, v1,,vkTpMv_1,\ldots,v_k\in T_pM and a,bRa,b\in R.

For tpTp(0,k)M,spTp(0,m)Mt_p\in T^{(0,k)}_pM,\, s_p\in T^{(0,m)}_pM we define the tensor product tpspTp(0,k+m)Mt_p\otimes s_p\in T_p^{(0,k+m)}M by

ParseError: KaTeX parse error: Undefined control sequence: \label at position 115: …. , v_{k+m} ), \̲l̲a̲b̲e̲l̲{eq:tensor_prod…

for v1,,vk+mTpMv_1,\ldots,v_{k+m}\in T_pM.

In SageMath Manifolds the symbol of tensor product is simply *.


Covariant tensors in local components


If the tangent vectors viv_i are expressed as vi=vi(xj)xjp=dxpj(vi)xjp,  i=1,kv_i=v_i(x^j)\frac{\partial}{\partial x^j}\big|_p=dx^j_p(v_i)\frac{\partial}{\partial x^j}\big|_p, \ \ i=1,\ldots k, then by the multilinearity of tpt_p and the definition (9.3) of the tensor product we have for tpTp(0,k)t_p\in T^{(0,k)}_p:
tp(v1,,vk)=tp(dxpi1(v1)xi1p,,dxpik(vk)xikp)=dxpi1(v1)dxpik(vk)tp(xi1p,,xikp)=[tp(xi1p,,xikp)dxpi1dxpik](v1,,vk),t_p(v_1,\ldots,v_k)=t_p\big(dx^{i_1}_p(v_1)\frac{\partial}{\partial x^{i_1}}\big|_p,\ldots,dx^{i_k}_p(v_k)\frac{\partial}{\partial x^{i_k}}\big|_p\big)\\ =dx^{i_1}_p(v_1)\dots dx^{i_k}_p(v_k)t_p\big(\frac{\partial}{\partial x^{i_1}}\big|_p,\ldots,\frac{\partial}{\partial x^{i_k}}\big|_p\big)\\ =\Big[t_p\big(\frac{\partial}{\partial x^{i_1}}\big|_p,\ldots,\frac{\partial}{\partial x^{i_k}}\big|_p\big)dx^{i_1}_p\otimes\dots\otimes dx^{i_k}_p\Big](v_1,\ldots,v_k), so

ParseError: KaTeX parse error: Undefined control sequence: \label at position 83: … dx^{i_k}_p,\\ \̲l̲a̲b̲e̲l̲{}\tag{9.4} \en…

where ParseError: KaTeX parse error: Undefined control sequence: \label at position 139: …}\big|_p\big). \̲l̲a̲b̲e̲l̲{}\tag{9.5} \en…


Example 9.7

Let us check the formula (9.3) in the case of two general tensors from Tp(0,2)MT^{(0,2)}_pM for a 2-dimensional manifold MM.

N = 2 # dimension of manifold M M2 = Manifold(N, 'M2') # manifold M2 of dimension 2 X = M2.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)])) # chart on M p = M2.point(X[:], name='p') # p -point with coordinates (x^0,x^1) Tp = M2.tangent_space(p) # Tp -tangent space at p t = Tp.tensor((0,2)) # t -tensor from T^{(0,2)}_pM s = Tp.tensor((0,2)) # s -tensor from T^{(0,2)}_pM

First we define a list of components of four tangent vectors:

M = 4 # number of vectors vv=[[var('v'+str(i)+str(j), # components of four vectors latex_name='v'+'^{'+str(i)+'}_{'+str(j)+'}') for i in range(N)] for j in range(M)] vv # show four vectors components

[[v00,v01],[v10,v11],[v20,v21],[v30,v31]]\displaystyle \left[\left[{v^{0}_{0}}, {v^{1}_{0}}\right], \left[{v^{0}_{1}}, {v^{1}_{1}}\right], \left[{v^{0}_{2}}, {v^{1}_{2}}\right], \left[{v^{0}_{3}}, {v^{1}_{3}}\right]\right]

and the vectors:

v=[Tp(vv[k]) for k in range(M)]; # list of 4 tangent vectors v[0].disp() # show first tangent vector

v00x0+v01x1\displaystyle {v^{0}_{0}} \frac{\partial}{\partial {x^{0}} } + {v^{1}_{0}} \frac{\partial}{\partial {x^{1}} }

Next we define the components of two (0,2)-type tensors t t\ and ss.

tt=[[var('t'+str(i)+str(j)) # components of tensor t for j in range(N)] for i in range(N)] ss=[[var('s'+str(i)+str(j)) # components of tensor s for j in range(N)] for i in range(N)] t[:] = tt # define tensor t components t_{ij} s[:] = ss # define tensor s components s_{ij}
t.disp() # show t

t00dx0dx0+t01dx0dx1+t10dx1dx0+t11dx1dx1\displaystyle t_{00} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + t_{01} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + t_{10} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + t_{11} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}

s.disp() # show s

s00dx0dx0+s01dx0dx1+s10dx1dx0+s11dx1dx1\displaystyle s_{00} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + s_{01} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + s_{10} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + s_{11} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}

Now we are ready to check the formula (9.3).

# check the formula (9.3) bool((t*s)(v[0],v[1],v[2],v[3]) == t(v[0],v[1])*s(v[2],v[3]))

True\displaystyle \mathrm{True}


Algebraic properties of tensor product of covariant tensors


Tensor product has the following properties

(arp+bsp)tp=arptp+bsptp,rp(asp+btp)=arpsp+brptp,(rpsp)tp=rp(sptp),\begin{matrix} (a\,r_p + b\,s_p ) ⊗ t_p = a\,r_p ⊗ t_p + b\,s_p ⊗ t_p ,\\ r_p ⊗ (a\,s_p + b\,t_p ) = a\,r_p ⊗ s_p + b\,r_p ⊗ t_p ,\\ (r_p ⊗ s_p ) ⊗ t_p = r_p ⊗ (s_p ⊗ t_p ), \end{matrix}

for a,bR a,b\in R\ and for arbitrary covariant tensors rp,sp,tpr_p,s_p,t_p (the addition is defined only for tensors of the same rank (0,k)(0,k)).

To check the first formula, let us note that for X1,Xk+lTpMX_1,\ldots X_{k+l}\in T_pM

(arp+bsp)tp(X1,...,Xk+l)=(arp+bsp)(X1,...,Xk)tp(Xk+1,...,Xk+l)=(arp(X1,...,Xk)+bsp(X1,...,Xk))tp(Xk+1,...,Xk+l)=arp(X1,...,Xk)tp(Xk+1,...,Xk+l)+bsp(X1,...,Xk)tp(Xk+1,...,Xk+l)=(arptp+bsptp)(X1,...,Xk+l),(ar_p+bs_{ p} ) ⊗ t_p (X_1 , . . . , X_{k+l} ) = (ar_{ p} + bs_{ p} )(X_1 , . . . , X_k ) t_p (X_{k+1} , . . . , X_{k+l} )\\ = (ar_{ p} (X_1 , . . . , X_k ) + b s_{ p} (X_1 , . . . , X_k )) t_p (X_{k+1} , . . . , X_{k+l} ) \\ =ar_{ p} (X_1 , . . . , X_k )t_p (X_{k+1}, . . . , X_{k+l} ) +b s_{ p} (X_1 , . . . , X_k )t_p (X_{k+1} , . . . , X_{k+l} )\\ = (a r_{ p} ⊗ t_p + b s_{ p} ⊗ t_p) (X_1 , . . . , X_{k+l} ),

and similarly for the second formula.

The associativity follows from

((rpsp)tp)(X1,...,Xk+l+m)=(rpsp)(X1,...,Xk+l)  tp(Xk+l+1,...,Xk+l+m)=(rp(X1,...,Xk)sp(Xk+1,...,Xk+l))tp(Xk+l+1,...,Xk+l+m)=rp(X1,...,Xk)(sp(Xk+1,...,Xk+l)tp(Xk+l+1,...,Xk+l+m))=rp(X1,...,Xk)(sptp)(Xk+1,...,Xk+l+m)=(rp(sptp))(X1,...,Xk+l+m),((r_p ⊗ s_p ) ⊗ t_p)(X_1 , . . . , X_{k+l+m} )\\ = (r_p ⊗ s_p )(X_1 , . . . , X_{k+l} )\; t_p (X_{k+l+1} , . . . , X_{k+l+m} )\\ = (r_p (X_1 , . . . , X_k ) s_p (X_{k+1} , . . . , X_{k+l} )) t_p (X_{k+l+1} , . . . , X_{k+l+m})\\ = r_p (X_1 , . . . , X_k )( s_p (X_{k+1} , . . . , X_{k+l} ) t_p (X_{k+l+1} , . . . , X_{k+l+m} ))\\ = r_p (X_1 , . . . , X_k ) (s_p ⊗ t_p )(X_{k+1} , . . . , X_{k+l+m} )\\ = (r_p ⊗ (s_p ⊗ t_p )) (X_1 , . . . , X_{k+l+m} ),

for X1,...,Xk+l+mTpM.X_1 , . . . , X_{k+l+m} \in T_pM.


Example 9.8

Let us show an example of a tensor tTp(0,3)Mt\in T^{(0,3)}_pM. First let us define the corresponding 3-dimensional table of components.

N = 2 # dimension of manifold st=[[[var('t'+str(i0)+str(i1)+str(i2)) # components of t for i2 in range(N)] for i1 in range(N)] for i0 in range(N)] st

[[[t000,t001],[t010,t011]],[[t100,t101],[t110,t111]]]\displaystyle \left[\left[\left[t_{000}, t_{001}\right], \left[t_{010}, t_{011}\right]\right], \left[\left[t_{100}, t_{101}\right], \left[t_{110}, t_{111}\right]\right]\right]

Now we define a manifold MM, a point pMp\in M, tangent space TpMT_pM and the tensor tTp(0,3)Mt\in T^{(0,3)}_pM.

M = Manifold(N, 'M') # 2-dimensional manifold X = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)])) # chart on M p = M.point(X[:], name='p') # point in M Tp = M.tangent_space(p) # tangent space T_p t = Tp.tensor((0,3), name='t') # tensor of type (0,3) t[:] = st # define components of t t.disp() # show t

t=t000dx0dx0dx0+t001dx0dx0dx1+t010dx0dx1dx0+t011dx0dx1dx1+t100dx1dx0dx0+t101dx1dx0dx1+t110dx1dx1dx0+t111dx1dx1dx1\displaystyle t = t_{000} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + t_{001} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + t_{010} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + t_{011} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + t_{100} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + t_{101} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + t_{110} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + t_{111} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}

Next we show how to define a tensor of type (0,3) on a 2-dimensional manifold with concrete components.

ct=range(1,9) # 1,...,8 -components of t for i0 in range(N): for i1 in range(N): for i2 in range(N): t[i0,i1,i2]=ct[i0*N*N+i1*N+i2] t.disp() # show t

t=dx0dx0dx0+2dx0dx0dx1+3dx0dx1dx0+4dx0dx1dx1+5dx1dx0dx0+6dx1dx0dx1+7dx1dx1dx0+8dx1dx1dx1\displaystyle t = \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + 2 \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + 3 \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + 4 \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + 5 \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + 6 \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + 7 \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + 8 \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}

Define the local basis of TpMT_pM.

Xf = X.frame() # default frame Xfp = Xf.at(p); Xfp # default frame at p

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

Check that the component t011t_{011} of the tensor from the previous example is equal to t(x0,x1,x1)t(\frac{\partial}{\partial x_0},\frac{\partial}{\partial x_1},\frac{\partial}{\partial x_1}).

t(Xfp[0], Xfp[1], Xfp[1]) # value of t(d/dx0,d/dx1,d/dx1)

4\displaystyle 4


Space Tp(k,0)MT^{(k,0)}_pM of contravariant tensors of rank kk

is the space of multilinear forms:


Tp(k,0)M={tp:TpM××TpMk   timesR},T^{(k,0)}_pM = \{t_p:\underbrace{T_p^*M\times\cdots\times T_p^*M}_{k\ \;\mbox{times}} \to R\},

where TpMT_p^*M is the cotangent space at pMp\in M.

In Tp(k,0)MT^{(k,0)}_pM we introduce the vector space structure by

(atp+bsp)(α1,αk)=atp(α1,αk)+bsp(α1,αk),(at_p+bs_p)(\alpha_1\ldots,\alpha_k)=at_p(\alpha_1\ldots,\alpha_k)+bs_p(\alpha_1\ldots,\alpha_k),

where tp,spTp(k,0)Mt_p,s_p\in T^{(k,0)}_pM, α1,,αkTpM\alpha_1,\ldots,\alpha_k\in T_p^*M and a,bRa,b\in R.

For tpTp(k,0)M,spTp(m,0)Mt_p\in T^{(k,0)}_pM,s_p\in T^{(m,0)}_pM we define the tensor product tpspt_p\otimes s_p by

(tpsp)(α1,,αk+m)=tp(α1,,αk)sp(αk+1,,αk+m),\begin{equation} (t_p ⊗ s_p )(\alpha_1 ,\ldots , \alpha_{k+m} ) = t_p (\alpha_1 ,\ldots, \alpha_k ) s_p (\alpha_{k+1} , \ldots , \alpha_{k+m} ), \tag{9.6} \end{equation}

for α1,,αk+mTpM\alpha_1,\ldots,\alpha_{k+m}\in T^*_pM.


Contravariant tensors in local components


Let tpTp(k,0)M,  α1,...,αkTpMt_p\in T^{(k,0)}_pM,\ \ α_1 , . . . , α_k ∈ T_p^∗M and let all covectors αi\alpha_i be expressed as αi=αi(xjp)dxpj  α_i = α_i \big(\frac{∂}{∂ x^j}\big|_p\big) dx^j_ p\ \ (cf. (9.2)). We have

tp(α1,,αk)=tp(α1(xi1p)dxpi1,,αk(xikp)dxpik)=α1(xi1p)αk(xikp)tp(dxpi1dxpik).t_p(\alpha_1,\ldots,\alpha_k)= t_p\big(\alpha_1\big(\frac{\partial}{\partial x^{i_1}}\big|_p\big)dx^{i_1}_p,\ldots, \alpha_k\big(\frac{\partial}{\partial x^{i_k}}\big|_p\big)dx^{i_k}_p \big)\\ =\alpha_1\big(\frac{\partial}{\partial x^{i_1}}\big|_p\big)\ldots\alpha_k\big(\frac{\partial}{\partial x^{i_k}}\big|_p\big)t_p(dx^{i_1}_p\dots dx^{i_k}_p).

Since vp(αp)=αp(vp)v_p(\alpha_p)=\alpha_p(v_p) we obtain

tp(α1,,αk)=[tp(dxpi1,,dxpik)xi1pxikp](α1,,αk),t_p(\alpha_1,\ldots,\alpha_k) =\Big[t_p(dx^{i_1}_p,\dots, dx^{i_k}_p)\frac{\partial}{\partial x^{i_1}}\big|_p\otimes\ldots\otimes\frac{\partial}{\partial x^{i_k}}\big|_p\Big](\alpha_1,\ldots,\alpha_k),ParseError: KaTeX parse error: Undefined control sequence: \label at position 142: …{i_k}}\big|_p, \̲l̲a̲b̲e̲l̲{}\tag{9.7} \en…ParseError: KaTeX parse error: Undefined control sequence: \label at position 73: …s,dx^{i_k}_p). \̲l̲a̲b̲e̲l̲{}\tag{9.7'} \e…

Example 9.9

Let us give an example of a tensor tpTp(3,0)Mt_p\in T^{(3,0)}_pM.

First we define the corresponding 3-dimensional table of components with upper indices.

N = 2 # dimension of manifold st=[[[var('t'+str(i0)+str(i1)+str(i2), latex_name='t'+'^'+'{'+str(i0)+str(i1)+str(i2)+'}') for i2 in range(N)] for i1 in range(N)] # components of t for i0 in range(N)] # with superscripts st

[[[t000,t001],[t010,t011]],[[t100,t101],[t110,t111]]]\displaystyle \left[\left[\left[{t^{000}}, {t^{001}}\right], \left[{t^{010}}, {t^{011}}\right]\right], \left[\left[{t^{100}}, {t^{101}}\right], \left[{t^{110}}, {t^{111}}\right]\right]\right]

Now we define a two-dimensional manifold, the tangent space and the tensor tpTp(3,0)Mt_p\in T^{(3,0)}_pM t with component from the table st.

M = Manifold(N, 'M') # manifold M X = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)])) # chart on M p = M.point(X[:], name='p') # point p in M Tp = M.tangent_space(p) # tangent space at p t = Tp.tensor((3,0), name='t') # tensor of type (3,0) t[:] = st # tensor components

We are ready to display the general tensor of type (3,0) on a 2-dimensional manifold in components.

t.disp() # show t

t=t000x0x0x0+t001x0x0x1+t010x0x1x0+t011x0x1x1+t100x1x0x0+t101x1x0x1+t110x1x1x0+t111x1x1x1\displaystyle t = {t^{000}} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} } + {t^{001}} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} } + {t^{010}} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} } + {t^{011}} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} } + {t^{100}} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} } + {t^{101}} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} } + {t^{110}} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} } + {t^{111}} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }

Here is a tensor of type (3,0) on a 2-dimensional manifold with concrete components:

ct=range(1,9) # 1,...,8 - components of t for i0 in range(N): for i1 in range(N): for i2 in range(N): t[i0,i1,i2]=ct[i0*N*N+i1*N+i2] t.disp() # show t

t=x0x0x0+2x0x0x1+3x0x1x0+4x0x1x1+5x1x0x0+6x1x0x1+7x1x1x0+8x1x1x1\displaystyle t = \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} } + 2 \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} } + 3 \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} } + 4 \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} } + 5 \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} } + 6 \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} } + 7 \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} } + 8 \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }

Let us define the basis of TpMT^*_pM.

Xcf = X.coframe() # basis of cotangent space Xcfp = Xcf.at(p); Xcfp # basis of cotangent space at p

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

Check that the component  t011 \ t_{011}\ is equal to  t(dx0,dx1,dx1)\ t( dx^0,dx^1, dx^1).

t(Xcfp[0], Xcfp[1], Xcfp[1]) # value of t(dx0,dx1,dx1)

4\displaystyle 4


General tensors from Tp(k,m)MT^{(k,m)}_pM


Since the definition of Tp(k,m)MT^{(k,m)}_pM was given above we start from definition of tensor product.

For tpT(k1,m1),spTp(k2,m2)Mt_p\in T^{(k_1,m_1)},s_p\in T^{(k_2,m_2)}_pM we define the tensor product tpspTp(k1+k2,m1+m2)t_p\otimes s_p\in T_p^{(k_1+k_2,m_1+m_2)} by

(tpsp)(α1,αk1+k2,v1,,vm1+m2)=tp(α1,,αk1,v1,,vm1)sp(αk1+1,,αk1+k2,vm1+1,,vm1+m2),\begin{equation} (t_p ⊗ s_p )(\alpha_1,\ldots\alpha_{k_1+k_2},v_1 ,\ldots , v_{m_1+m_2} )\\ =t_p (\alpha_1,\ldots,\alpha_{k_1},v_1 ,\ldots, v_{m_1} ) s_p (\alpha_{k_1+1},\ldots,\alpha_{k_1+k_2},v_{m_1+1},\ldots, v_{m_1+m_2} ), \tag{9.8} \end{equation}

for α1,,αk1+k2TpM\alpha_1,\ldots,\alpha_{k_1+k_2}\in T^*_pM and v1,,vm1+m2TpMv_1,\ldots,v_{m_1+m_2}\in T_pM.

Generalizing the formulas (9.5) and (9.7) we obtain the following expression for the general tensor tpTp(k,l)Mt_p\in T^{(k,l)}_pM in local components

ParseError: KaTeX parse error: Undefined control sequence: \label at position 289: …es dx^{j_m}_p. \̲l̲a̲b̲e̲l̲{}\tag{9.9} \en…

Very often the notation tj1jmi1ik=tp(dxpi1,..,dxpik,xj1p,..,xjmp)\begin{equation} t^{i_1\ldots i_k}_{j_1\ldots j_m}=t_p\big(dx^{i_1}_p,..,dx^{i_k}_p,\frac{\partial}{\partial x^{j_1}}\big|_p,..,\frac{\partial}{\partial x^{j_m}}\big|_p\big) \tag{9.10} \end{equation} is used and then tp=tj1jmi1ikxi1pxikpdxpj1dxpjm.\begin{equation} t_p=t^{i_1\ldots i_k}_{j_1\ldots j_m}\frac{\partial}{\partial x^{i_1}}\big|_p\otimes\dots\otimes\frac{\partial}{\partial x^{i_k}}\big|_p\otimes dx^{j_1}_p\otimes\ldots\otimes dx^{j_m}_p. \tag{9.11} \end{equation}

To check that the elements

ParseError: KaTeX parse error: Undefined control sequence: \label at position 167: …mes dx^{j_m}_p \̲l̲a̲b̲e̲l̲{} \tag{9.12} \…

are linearly independent, assume that the linear combination

aj1jmi1ikxi1pxikpdxpj1dxpjma^{i_1\ldots i_k}_{j_1\ldots j_m}\frac{\partial}{\partial x^{i_1}}\big|_p\otimes\dots\otimes\frac{\partial}{\partial x^{i_k}}\big|_p\otimes dx^{j_1}_p\otimes\ldots\otimes dx^{j_m}_p

vanishes. If we apply this combination to (dxpq1,,dxpqk,xr1p,..,xrmp) \quad(dx^{q_1}_p,\ldots,dx^{q_k}_p,\frac{\partial}{\partial x^{r_1}}\big|_p,..,\frac{\partial}{\partial x^{r_m}}\big|_p\big)\ we get  ar1rmq1qk=0\ \displaystyle a^{q_1\ldots q_k}_{r_1\ldots r_m}=0.
Since previously we have checked that elements of the type (9.12) span Tp(k,l)MT^{(k,l)}_pM we have proved, that these elements form a basis for Tp(k,m)MT^{(k,m)}_pM.


Example 9.10

To show an example of a tensor tpTp(2,2)Mt_p\in T^{(2,2)}_pM, we first define a 4-dimensional table with lower and upper indices.

N = 2 # dimension of manifold st=[[[[var('t'+str(i0)+str(i1)+str(i2)+str(i3), latex_name='t'+'^'+'{'+str(i0)+str(i1)+'}'+'_'+'{'+str(i2)+str(i3)+'}') for i3 in range(N)] for i2 in range(N)] # components of t with upper for i1 in range(N)] for i0 in range(N)] # and lower indices st

[[[[t0000,t0100],[t1000,t1100]],[[t0001,t0101],[t1001,t1101]]],[[[t0010,t0110],[t1010,t1110]],[[t0011,t0111],[t1011,t1111]]]]\displaystyle \left[\left[\left[\left[{t^{00}_{00}}, {t^{00}_{01}}\right], \left[{t^{00}_{10}}, {t^{00}_{11}}\right]\right], \left[\left[{t^{01}_{00}}, {t^{01}_{01}}\right], \left[{t^{01}_{10}}, {t^{01}_{11}}\right]\right]\right], \left[\left[\left[{t^{10}_{00}}, {t^{10}_{01}}\right], \left[{t^{10}_{10}}, {t^{10}_{11}}\right]\right], \left[\left[{t^{11}_{00}}, {t^{11}_{01}}\right], \left[{t^{11}_{10}}, {t^{11}_{11}}\right]\right]\right]\right]

Now define a 2-dimensional manifold MM, tangent space at pp and  tpTp(2,2)M\ t_p\in T^{(2,2)}_pM.

M = Manifold(N, 'M') # manifold M X = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)])) # chart on M p = M.point(X[:], name='p') # point of M Tp = M.tangent_space(p) # tangent space at p t = Tp.tensor((2,2), name='t') # tensor of type (2,2) t[:] = st # define tensor components

We can display a general tensor from Tp(2,2)MT_p^{(2,2)}M on a 2-dimensional manifold (242^4 components).

t.disp() # show t

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}}

#tt=t*t #tt[:] very long output

A more concrete example can be defined as follows:

ct=range(1,17) # [1,...,16] consecutive components for i0 in range(N): for i1 in range(N): for i2 in range(N): for i3 in range(N): t[i0,i1,i2,i3]=ct[i0*N*N*N+i1*N*N+i2*N+i3]
t.disp()

t=x0x0dx0dx0+2x0x0dx0dx1+3x0x0dx1dx0+4x0x0dx1dx1+5x0x1dx0dx0+6x0x1dx0dx1+7x0x1dx1dx0+8x0x1dx1dx1+9x1x0dx0dx0+10x1x0dx0dx1+11x1x0dx1dx0+12x1x0dx1dx1+13x1x1dx0dx0+14x1x1dx0dx1+15x1x1dx1dx0+16x1x1dx1dx1\displaystyle t = \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + 2 \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + 3 \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + 4 \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + 5 \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + 6 \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + 7 \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + 8 \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + 9 \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + 10 \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + 11 \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + 12 \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + 13 \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + 14 \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + 15 \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + 16 \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}

#(t*t).disp() - latex code #(t*t)[:] # long output

Using the bases of TpMT_pM and TpMT^*_pM,

Xf = X.frame() # frame (d/dx0,d/dx1) Xfp = Xf.at(p); print("Xfp-", Xfp) # frame (d/dx0,d/dx1) at p Xcf = X.coframe() # coframe (dx0,dx1) Xcfp = Xcf.at(p); print("Xcfp-", Xcfp) # coframe (dx0,dx1) at p
Xfp- Basis (∂/∂x0,∂/∂x1) on the Tangent space at Point p on the 2-dimensional differentiable manifold M Xcfp- Dual basis (dx0,dx1) on the Tangent space at Point p on the 2-dimensional differentiable manifold M

one can check that the component   t0110  \ \ t^{10}_{01}\ \ is equal to   t(dx1,dx0,x0,x1)\ \ t(dx_1,dx_0,\frac{\partial}{\partial x_0},\frac{\partial}{\partial x_1}):

t(Xcfp[1], Xcfp[0], Xfp[0], Xfp[1]) # value of t(dx1,dx0,d/dx0,d/dx1)

10\displaystyle 10

What's next?

Take a look at the notebook Alternating forms on modules.