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

9a. Tensors on modules

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'

Reminder. Vectors and linear forms on modules


Recall that for free modules of finite rank (in notebook 6) we have introduced vectors and linear forms.


Example 9.1a

Define a free module of finite rank and some vector and linear form.

N=3 # dimension of the module %display latex M=FiniteRankFreeModule(SR,3,name='M') # 3-dim module over SR e = M.basis('e') # basis of M v=var('v',n=3) # components of vector v v=M(list(v)) # define vector v
print(v) # information on v v.comp()[:] # components of v
Element of the 3-dimensional vector space M over the Symbolic Ring

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

General linear forms on a 3-dimensional module can be defined as follows:

a=M.linear_form() # linear form a on M a[:]=var('a',n=4) # components of a
a.disp() # show a as combination # of dual basis

a0e0+a1e1+a2e2\displaystyle a_{0} e^{0} + a_{1} e^{1} + a_{2} e^{2}

The linear form applied to a vector gives a scalar.

a(v) # value a(v)

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

The value of a vector vMv\in M on a linear form aMa\in M^* is by definition equal to a(v)a(v).

v(a) # value v(a)

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


Now we are ready to define more general objects.


Tensors on modules


If MM is a vector space or a module, by a multilinear or more precisely kk-linear form we mean a function t:MkRt: M^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,wiM.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 M.

Assume that MM is a module.

Tensor module T(k,l)MT^{(k,l)}M


Tensors of type (k,l) on M M are multilinear maps:

T(k,l)M={t:M××Mk   times×M××Ml   timesR},T^{(k,l)}M = \{t:\underbrace{M^*\times\cdots\times M^*}_{k\ \; \mbox{times}} \times \underbrace{M\times\cdots\times M}_{l\ \; \mbox{times}}\to R\},

where  M \ M^*\ denotes the dual module, i.e. the module of linear forms on MM (cf. notebook 6).

Since av(a)a\to v(a) defines a linear form MRM^*\to R, the elements vMv\in M can be considered as elements of T(1,0)MT^{(1,0)}M. On the other hand T(0,1)MT^{(0,1)}M as the space of linear forms on MM is equal to MM^*. Thus, tensors generalize vectors and linear forms.


Example 9.2a

Let us show how to use tensor_module method of SageMath Manifolds.

# continuation M.tensor_module(1,0) # elements of T^(1,0) are vectors

M\displaystyle M

print(M.tensor_module(1,0)) # T^(1,0) = M # since the ring SR is a field we obtain vector space
3-dimensional vector space M over the Symbolic Ring
M.tensor_module(0,1) # T^(0,1) = M*

M\displaystyle M^*

print(M.tensor_module(0,1))
Free module of type-(0,1) tensors on the 3-dimensional vector space M over the Symbolic Ring

Module T(0,k)MT^{(0,k)}M - of covariant tensors of rank kk


is the module of multilinear maps

T(0,k)M={t:M××Mk   timesR}.T^{(0,k)}M = \{t:\underbrace{M\times\cdots\times M}_{k\ \; \mbox{times}}\to R\}.

For k=1 we obtain the module of linear forms or covectors on MM.

In T(0,k)MT^{(0,k)}M we introduce the algebraic operations by

(at+bs)(v1,vk)=at(v1,vk)+bs(v1,vk),(at+bs)(v_1\ldots,v_k)=at(v_1\ldots,v_k)+bs(v_1\ldots,v_k),

where t,sT(0,k)Mt,s\in T^{(0,k)}M, v1,,vkMv_1,\ldots,v_k\in M and a,bRa,b\in R.

For tT(0,k), sT(0,l)Mt\in T^{(0,k)},\ s\in T^{(0,l)}M we define the tensor product  tsT(0,k+l)M \ t\otimes s\in T^{(0,k+l)}M\ by

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

for v1,,vk+lMv_1,\ldots,v_{k+l}\in M.

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


Example 9.3a

Let us check the last formula in the case of two general tensors from T(0,2)T^{(0,2)} and 2-dimensional module.

N=2; # dimension of module %display latex Mo=FiniteRankFreeModule(SR,2,name='Mo') # module Mo e = Mo.basis('e') # basis of Mo t=Mo.tensor((0,2)) # (0,2) type tensor t s=Mo.tensor((0,2)) # (0,2) type tensor s
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

[[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]

v=[Mo(vv[k]) for k in range(M)] # list of vectors tt=[[var('t'+str(i)+str(j)) # components of tensor t for j in range(M)] for i in range(N)] ss=[[var('t'+str(i)+str(j)) # components of tensor s for j in range(M)] for i in range(N)] t[:]=tt # define tensor t components t_{ij} s[:]=ss # define tensor s components s_{ij}
# check the equality (9.1a) defining tensor product 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}


Tensor product has the following properties (proofs for modules TpM,T_pM, where MM denotes a manifold are given in the next notebook)

ParseError: KaTeX parse error: Undefined control sequence: \label at position 149: …, \end{matrix} \̲l̲a̲b̲e̲l̲{eq:tensor_prod…

for a,bR a,b\in R\ and for arbitrary covariant tensors r,s,tr,s,t (the addition is defined only for tensors of the same rank (0,k)(0,k)).


Covariant tensors in components


One can check that if e1,,ene_1,\ldots,e_n is a basis of the module MM and e1,,en e^1,\ldots,e^n\ its dual basis (defined in notebook 6), then the elements

ej1ejm,jq{1,,n}\begin{equation} e^{j_1}\otimes\ldots \otimes e^{j_m}, \quad j_q\in\{1,\ldots,n\} \tag{9.2a} \end{equation}

form a basis for T(0,m)MT^{(0,m)}M and if we put

tj1jm=t(ej1,,ejm),t_{j_1\ldots j_m} =t(e_{j_1},\ldots,e_{j_m}),

then

t=tj1jmej1ejm,for  tT(0,m)M.\begin{equation} t=t_{j_1\ldots j_m} e^{j_1}\otimes\ldots\otimes e^{j_m}, \quad \text{for }\ t\in T^{(0,m)}M. \tag{9.3a} \end{equation}

In fact, since  v1=ej1(v1)ej1,,vm=ejm(vm)ejm, \ v_1=e^{j_1}(v_1)e_{j_1},\ldots, v_m=e^{j_m}(v_m)e_{j_m},\ then

t(v1,,vm)=t(ej1(v1)ej1,,ejm(vm)ejm)=ej1(v1)ejm(vm)t(ej1,,ejm)=tj1jmej1ejm(v1,vm).t(v_1,\ldots,v_m)=t(e^{j_1}(v_1)e_{j_1},\ldots,e^{j_m}(v_m)e_{j_m})\\ =e^{j_1}(v_1)\ldots e^{j_m}(v_m)t(e_{j_1},\ldots,e_{j_m})\\ =t_{j_1\ldots j_m}e^{j_1}\otimes \ldots \otimes e^{j_m}(v_1,\ldots v_m).

Example 9.4a

Let us show the representation of a tensor  tT(0,3)M \ t\in T^{(0,3)}M\ in components.

N=2 # dimension of module 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 # show components

[[[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]

Mo=FiniteRankFreeModule(SR,2,name='Mo') # module Mo e = Mo.basis('e') # basis of Mo %display latex t = Mo.tensor((0,3), name='t') # tensor of (0,3) type t[:]=st # define all components

General tensor of type (0,3) on a 2-dimensional module:

t.disp() # show t

t=t000e0e0e0+t001e0e0e1+t010e0e1e0+t011e0e1e1+t100e1e0e0+t101e1e0e1+t110e1e1e0+t111e1e1e1\displaystyle t = t_{000} e^{0}\otimes e^{0}\otimes e^{0} + t_{001} e^{0}\otimes e^{0}\otimes e^{1} + t_{010} e^{0}\otimes e^{1}\otimes e^{0} + t_{011} e^{0}\otimes e^{1}\otimes e^{1} + t_{100} e^{1}\otimes e^{0}\otimes e^{0} + t_{101} e^{1}\otimes e^{0}\otimes e^{1} + t_{110} e^{1}\otimes e^{1}\otimes e^{0} + t_{111} e^{1}\otimes e^{1}\otimes e^{1}

Tensor of type (0,3) on a 2-dimensional module with concrete components:

# continuation ct=range(1,9) # [1,...,8] consecutive components 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()

t=e0e0e0+2e0e0e1+3e0e1e0+4e0e1e1+5e1e0e0+6e1e0e1+7e1e1e0+8e1e1e1\displaystyle t = e^{0}\otimes e^{0}\otimes e^{0} + 2 e^{0}\otimes e^{0}\otimes e^{1} + 3 e^{0}\otimes e^{1}\otimes e^{0} + 4 e^{0}\otimes e^{1}\otimes e^{1} + 5 e^{1}\otimes e^{0}\otimes e^{0} + 6 e^{1}\otimes e^{0}\otimes e^{1} + 7 e^{1}\otimes e^{1}\otimes e^{0} + 8 e^{1}\otimes e^{1}\otimes e^{1}

print(e) # basis
Basis (e_0,e_1) on the 2-dimensional vector space Mo over the Symbolic Ring

Check that the coefficient t011t_{011} is equal to t(e0,e1,e1)t(e_0,e_1,e_1):

t(e[0],e[1],e[1]) # t(e_0,e_1,e_1)

4\displaystyle 4


Module T(k,0)MT^{(k,0)}M of contravariant tensors of rank kk


is the module of kk-linear forms:

T(k,0)M={t:M××Mk   timesR}.T^{(k,0)}M = \{t:\underbrace{M^*\times\cdots\times M^*}_{k\ \;\mbox{times}} \to R\}.

In T(k,0)MT^{(k,0)}M we introduce the module structure by

(at+bs)(α1,αk)=at(α1,αk)+bs(α1,αk),(at+bs)(\alpha_1\ldots,\alpha_k)=at(\alpha_1\ldots,\alpha_k)+bs(\alpha_1\ldots,\alpha_k),

where t,sT(k,0)Mt,s\in T^{(k,0)}M, α1,,αkM\alpha_1,\ldots,\alpha_k\in M^* and a,bRa,b\in R.

For t,sT(k,0)Mt,s\in T^{(k,0)}M we define the tensor product ts t\otimes s\ by

(ts)(α1,,αk+l)t(α1,,αk)s(αk+1,,αk+l),\begin{equation} (t ⊗ s )(\alpha_1 ,\ldots , \alpha_{k+l} ) ≡ t (\alpha_1 ,\ldots, \alpha_k ) s(\alpha_{k+1} , \ldots , \alpha_{k+l} ), \tag{9.4a} \end{equation}

for α1,,αk+lM\alpha_1,\ldots,\alpha_{k+l}\in M^*.


Contravariant tensors in components


One can check that if e1,,ene_1,\ldots,e_n is a basis of the module MM and e1,,ene^1,\ldots,e^n its dual basis then the elements

ei1eik,ip{1,,n}e_{i_1}\otimes\ldots\otimes e_{i_k}, \quad i_p\in\{1,\ldots,n\}

form a basis for T(k,0)MT^{(k,0)}M and if we put

ti1ik=t(ei1,,eik),t^{i_1\ldots i_k} =t(e^{i_1},\ldots,e^{i_k}),

then

t=ti1ikei1eik,for  tT(k,0)M.\begin{equation} t=t^{i_1\ldots i_k} e_{i_1}\otimes\ldots\otimes e_{i_k}, \quad \text{for }\ t\in T^{(k,0)}M. \tag{9.5a} \end{equation}

This follows from α(v)=α(ei(v)ei)=α(ei)ei(v), \alpha(v)=\alpha(e^i(v)e_ i)=\alpha(e_i)e^i(v),\ and  v(α)=α(v)\ v(\alpha)=\alpha(v) for linear form  αM \ \alpha\in M^*\ and  vM, \ v\in M,\ since we have

t(α1,,αk)=t(α1(ei1)ei1,,αk(eik)eik)=α1(ei1)αk(eik)t(ei1,,eik)=ei1(α1)eik(αk)t(ei1,,eik)=ti1ikei1eik(α1,,αk).t(\alpha_1,\ldots,\alpha_k)= t(\alpha_1(e_{i_1})e^{i_1},\ldots,\alpha_k(e_{i_k})e^{i_k})\\ =\alpha_1(e_{i_1})\ldots \alpha_k(e_{i_k})t(e^{i_1},\ldots,e^{i_k})\\ =e_{i_1}(\alpha_1)\ldots e_{i_k}(\alpha_k)t(e^{i_1},\ldots, e^{i_k})\\ =t^{i_1\ldots i_k} e_{i_1}\otimes \ldots \otimes e_{i_k}(\alpha_1,\ldots,\alpha_k).

Example 9.5a

Let us show the representation of a tensor of type (3,0) in components.

%display latex N=2 # dimension of module 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 # show components

[[[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]

Mo=FiniteRankFreeModule(SR,2,name='Mo') # module Mo e = Mo.basis('e') # basis of Mo t = Mo.tensor((3,0), name='t') # tensor of (3,0) type t[:]=st # define all components

General tensor of type (3,0) on a 2-dimensional module:

t.disp() # show t

t=t000e0e0e0+t001e0e0e1+t010e0e1e0+t011e0e1e1+t100e1e0e0+t101e1e0e1+t110e1e1e0+t111e1e1e1\displaystyle t = {t^{000}} e_{0}\otimes e_{0}\otimes e_{0} + {t^{001}} e_{0}\otimes e_{0}\otimes e_{1} + {t^{010}} e_{0}\otimes e_{1}\otimes e_{0} + {t^{011}} e_{0}\otimes e_{1}\otimes e_{1} + {t^{100}} e_{1}\otimes e_{0}\otimes e_{0} + {t^{101}} e_{1}\otimes e_{0}\otimes e_{1} + {t^{110}} e_{1}\otimes e_{1}\otimes e_{0} + {t^{111}} e_{1}\otimes e_{1}\otimes e_{1}

Tensor of type (3,0) on a 2-dimensional module with concrete components:

# continuation ct=range(1,9) # [1,...,8]- consecutive components 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()

t=e0e0e0+2e0e0e1+3e0e1e0+4e0e1e1+5e1e0e0+6e1e0e1+7e1e1e0+8e1e1e1\displaystyle t = e_{0}\otimes e_{0}\otimes e_{0} + 2 e_{0}\otimes e_{0}\otimes e_{1} + 3 e_{0}\otimes e_{1}\otimes e_{0} + 4 e_{0}\otimes e_{1}\otimes e_{1} + 5 e_{1}\otimes e_{0}\otimes e_{0} + 6 e_{1}\otimes e_{0}\otimes e_{1} + 7 e_{1}\otimes e_{1}\otimes e_{0} + 8 e_{1}\otimes e_{1}\otimes e_{1}

d=e.dual_basis() # dual basis print(d)
Dual basis (e^0,e^1) on the 2-dimensional vector space Mo over the Symbolic Ring

Check that the coefficient t011t^{011} is equal to t(e0,e1,e1)t( e^0,e^1, e^1):

t(d[0],d[1],d[1]) # t(e^0,e^1,e^1)

4\displaystyle 4


General tensors from T(k,l)MT^{(k,l)}M in components


For tT(k1,l1)M,  sT(k2,l2)Mt\in T^{(k_1,l_1)}M,\ \ s\in T^{(k_2,l_2)}M we define the tensor product tsT(k1+k2,l1+l2)t\otimes s\in T^{(k_1+k_2,l_1+l_2)} by

(ts)(α1,αk1+k2,v1,,vl1+l2)=t(α1,,αk1,v1,,vl1)s(αk1+1,,αk1+k2,vl1+1,,vl1+l2),\begin{equation} (t ⊗ s )(\alpha_1,\ldots\alpha_{k_1+k_2},v_1 ,\ldots , v_{l_1+l_2} )\\ =t(\alpha_1,\ldots,\alpha_{k_1},v_1 ,\ldots, v_{l_1} ) s (\alpha_{k_1+1},\ldots,\alpha_{k_1+k_2},v_{l_1+1},\ldots, v_{l_1+l_2} ), \tag{9.6a} \end{equation}

for α1,,αk1+k2M\alpha_1,\ldots,\alpha_{k_1+k_2}\in M^* and v1,,vl1+l2Mv_1,\ldots,v_{l_1+l_2}\in M.

Generalizing the formulas (9.3a) and (9.5a) we obtain the following expression for the general tensor tT(k,l)Mt\in T^{(k,l)}M in components

ParseError: KaTeX parse error: Undefined control sequence: \label at position 147: …imes e^{j_l}. \̲l̲a̲b̲e̲l̲{}\tag{9.7a} \e…

Very often the notation tj1jli1ik=tp(ei1,..,eik,ej1,..,ejl)t^{i_1\ldots i_k}_{j_1\ldots j_l}=t_p\big(e^{i_1},..,e^{i_k},e_{j_1},..,e_{j_l}) is used and then t=tj1jli1ikei1eikej1ejl.t=t^{i_1\ldots i_k}_{j_1\ldots j_l}e_{i_1}\otimes\dots\otimes e_{i_k}\otimes e^{j_1}\otimes\ldots\otimes e^{j_l}.

To check that the elements ParseError: KaTeX parse error: Undefined control sequence: \label at position 96: …otimes e^{j_l} \̲l̲a̲b̲e̲l̲{} \tag{9.8a} \…

are linearly independent, assume that the linear combination

aj1jli1ikei1eikej1ejla^{i_1\ldots i_k}_{j_1\ldots j_l}e_{i_1}\otimes\dots\otimes e_{i_k}\otimes e^{j_1}\otimes\ldots\otimes e^{j_l}

vanishes. If we apply this combination to (em1,,emk,en1,..,enl)\quad(e^{m_1},\ldots,e^{m_k}, e_{n_1},..,e_{n_l}\big) we get an1nlm1mk=0\displaystyle a^{m_1\ldots m_k}_{n_1\ldots n_l}=0.
Since as in previous cases we can check that elements of the type (9.8a) span T(k,l)MT^{(k,l)}M, we have proved that these elements form a basis for T(k,l)MT^{(k,l)}M.


Example 9.6a

Now we show the representation of a tensor of (2,2) type in components.

%display latex N=2 # dimension of module 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)] # comp. with upper for i1 in range(N)] for i0 in range(N)] # and lower indices st # show components

[[[[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]

Mo=FiniteRankFreeModule(SR,2,name='Mo') # module Mo e = Mo.basis('e') # basis of Mo t = Mo.tensor((2,2), name='t') # tensor of (2,2) type t[:]=st # define all components

General tensor from T(2,2)MT^{(2,2)}M on a 2-dimensional module (242^4 components):

t.disp() # show t

t=t0000e0e0e0e0+t0100e0e0e0e1+t1000e0e0e1e0+t1100e0e0e1e1+t0001e0e1e0e0+t0101e0e1e0e1+t1001e0e1e1e0+t1101e0e1e1e1+t0010e1e0e0e0+t0110e1e0e0e1+t1010e1e0e1e0+t1110e1e0e1e1+t0011e1e1e0e0+t0111e1e1e0e1+t1011e1e1e1e0+t1111e1e1e1e1\displaystyle t = {t^{00}_{00}} e_{0}\otimes e_{0}\otimes e^{0}\otimes e^{0} + {t^{00}_{01}} e_{0}\otimes e_{0}\otimes e^{0}\otimes e^{1} + {t^{00}_{10}} e_{0}\otimes e_{0}\otimes e^{1}\otimes e^{0} + {t^{00}_{11}} e_{0}\otimes e_{0}\otimes e^{1}\otimes e^{1} + {t^{01}_{00}} e_{0}\otimes e_{1}\otimes e^{0}\otimes e^{0} + {t^{01}_{01}} e_{0}\otimes e_{1}\otimes e^{0}\otimes e^{1} + {t^{01}_{10}} e_{0}\otimes e_{1}\otimes e^{1}\otimes e^{0} + {t^{01}_{11}} e_{0}\otimes e_{1}\otimes e^{1}\otimes e^{1} + {t^{10}_{00}} e_{1}\otimes e_{0}\otimes e^{0}\otimes e^{0} + {t^{10}_{01}} e_{1}\otimes e_{0}\otimes e^{0}\otimes e^{1} + {t^{10}_{10}} e_{1}\otimes e_{0}\otimes e^{1}\otimes e^{0} + {t^{10}_{11}} e_{1}\otimes e_{0}\otimes e^{1}\otimes e^{1} + {t^{11}_{00}} e_{1}\otimes e_{1}\otimes e^{0}\otimes e^{0} + {t^{11}_{01}} e_{1}\otimes e_{1}\otimes e^{0}\otimes e^{1} + {t^{11}_{10}} e_{1}\otimes e_{1}\otimes e^{1}\otimes e^{0} + {t^{11}_{11}} e_{1}\otimes e_{1}\otimes e^{1}\otimes e^{1}

Here is a version with concrete components:

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=e0e0e0e0+2e0e0e0e1+3e0e0e1e0+4e0e0e1e1+5e0e1e0e0+6e0e1e0e1+7e0e1e1e0+8e0e1e1e1+9e1e0e0e0+10e1e0e0e1+11e1e0e1e0+12e1e0e1e1+13e1e1e0e0+14e1e1e0e1+15e1e1e1e0+16e1e1e1e1\displaystyle t = e_{0}\otimes e_{0}\otimes e^{0}\otimes e^{0} + 2 e_{0}\otimes e_{0}\otimes e^{0}\otimes e^{1} + 3 e_{0}\otimes e_{0}\otimes e^{1}\otimes e^{0} + 4 e_{0}\otimes e_{0}\otimes e^{1}\otimes e^{1} + 5 e_{0}\otimes e_{1}\otimes e^{0}\otimes e^{0} + 6 e_{0}\otimes e_{1}\otimes e^{0}\otimes e^{1} + 7 e_{0}\otimes e_{1}\otimes e^{1}\otimes e^{0} + 8 e_{0}\otimes e_{1}\otimes e^{1}\otimes e^{1} + 9 e_{1}\otimes e_{0}\otimes e^{0}\otimes e^{0} + 10 e_{1}\otimes e_{0}\otimes e^{0}\otimes e^{1} + 11 e_{1}\otimes e_{0}\otimes e^{1}\otimes e^{0} + 12 e_{1}\otimes e_{0}\otimes e^{1}\otimes e^{1} + 13 e_{1}\otimes e_{1}\otimes e^{0}\otimes e^{0} + 14 e_{1}\otimes e_{1}\otimes e^{0}\otimes e^{1} + 15 e_{1}\otimes e_{1}\otimes e^{1}\otimes e^{0} + 16 e_{1}\otimes e_{1}\otimes e^{1}\otimes e^{1}

d=e.dual_basis() # dual basis

Check that the coefficient t0110t^{10}_{01} is equal to t(e1,e0,e0,e1)t(e^1,e^0,e_0,e_1):

t(d[1],d[0],e[0],e[1]) # t(e^1,e^0,e_0,e_1)

10\displaystyle 10

What's next?

Take a look at the notebook Tensors on TpMT_pM.