{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 9. Tensors on $T_pM$\n",
"\n",
"This notebook is part of the [Introduction to manifolds in SageMath](https://sagemanifolds.obspm.fr/intro_to_manifolds.html) by Andrzej Chrzeszczyk (Jan Kochanowski University of Kielce, Poland)."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'SageMath version 9.6, Release Date: 2022-05-15'"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"version()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Warning**. In this notebook there are many repetitions with respect to the notebook [9a. Tensors on modules](https://nbviewer.org/github/sagemanifolds/IntroToManifolds/blob/main/09aManifold_Tensors_onModules.ipynb).\n",
"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](https://nbviewer.org/github/sagemanifolds/IntroToManifolds/blob/main/09aManifold_Tensors_onModules.ipynb).\n",
"\n",
"
\n",
"\n",
"### Differentials of functions, linear forms, covectors\n",
"\n",
"
"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"If $M$ is a smooth manifold, $p ∈ M$, $T_pM$ is the tangent space to $M$ at $p$, and $f ∈ C^∞(M)$, then the **differential of $f$ at $p$**, denoted by $d f_p$, is\n",
"defined by\n",
"\n",
"\\begin{equation}\n",
"df_p(X_p)=X_p(f),\\quad\\mbox{for } X_p\\in T_pM.\n",
"\\label{} \\tag{9.1}\n",
"\\end{equation}\n",
"\n",
"Let us show some examples of scalar functions and differentials."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"**Example 9.1**\n",
"\n",
"\n",
"Define a 3-dimensional manifold $M,$ a point $p\\in M$, the tangent space at $T_pM$, a tangent vector $v\\in T_pM$ and some scalar function $f$ on $M$. "
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Point p on the 3-dimensional differentiable manifold M\n"
]
},
{
"data": {
"text/html": [
"\\(\\displaystyle \\left({x^{0}}, {x^{1}}, {x^{2}}\\right)\\)"
],
"text/latex": [
"$\\displaystyle \\left({x^{0}}, {x^{1}}, {x^{2}}\\right)$"
],
"text/plain": [
"(x0, x1, x2)"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%display latex\n",
"N = 3\n",
"M = Manifold(N, 'M') # manifold M of dimension N\n",
"X = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)])) # chart on M\n",
"p = M.point(X[:], name='p') # generic point p of M\n",
"Tp = M.tangent_space(p) # tangent space at p\n",
" # components of tangent vector v:\n",
"vn = [var('v'+str(i), latex_name='v'+'^'+str(i)) for i in range(N)]\n",
"v = Tp(vn, name='v') # tangent vector v\n",
"f = M.scalar_field(function('f')(*X), name='f') # scalar funct.\n",
"print(p) # information on p\n",
"p.coord() # coordinates of p"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Tangent vector v at Point p on the 3-dimensional differentiable manifold M\n"
]
},
{
"data": {
"text/html": [
"\\(\\displaystyle \\left[{v^0}, {v^1}, {v^2}\\right]\\)"
],
"text/latex": [
"$\\displaystyle \\left[{v^0}, {v^1}, {v^2}\\right]$"
],
"text/plain": [
"[v0, v1, v2]"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"print(v) # information on v\n",
"v.comp()[:] # components of v"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\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}\\)"
],
"text/latex": [
"$\\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}$"
],
"text/plain": [
"f: M → ℝ\n",
" (x0, x1, x2) ↦ f(x0, x1, x2)"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"f.disp() # show scalar function f"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now let us define the differential of $f$ at $p$:"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"df_p is a\n",
"Linear form df on the Tangent space at Point p on the 3-dimensional differentiable manifold M\n",
"Components of df_p:\n"
]
},
{
"data": {
"text/html": [
"\\(\\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]\\)"
],
"text/latex": [
"$\\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]$"
],
"text/plain": [
"[diff(f(x0, x1, x2), x0), diff(f(x0, x1, x2), x1), diff(f(x0, x1, x2), x2)]"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# continuation\n",
"df = f.differential() # differential of f\n",
"dfp = df.at(p) # differential of f at p\n",
"print(\"df_p is a\") \n",
"print(dfp) # information on dfp\n",
"print(\"Components of df_p:\")\n",
"dfp.components()[:] # components of differential at p"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"and check that the value of $df$ at $p$ on the tangent vector $v$\n",
"is equal to $v(f)$:"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\mathrm{True}\\)"
],
"text/latex": [
"$\\displaystyle \\mathrm{True}$"
],
"text/plain": [
"True"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"bool(dfp(v)==v(f)) # check if df_p(v)=v(f)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"### Linearity of $df_p$\n",
"\n",
"
\n",
"\n",
"Recall that for a vector space (or a module) $V$ the map $t:V\\to R$ is linear iff\n",
"\n",
"$$ t (av + bw ) = at(v) + bt(w ),\\quad\\text{for}\\quad v,w\\in V,\\quad a,b\\in R.$$\n",
"\n",
"\n",
"To check that $df_p: T_pM\\to R$ is linear let us note that \n",
"\n",
"$$d f_p (av_p + bw_p ) = (av_p + bw_p )( f )\n",
"= av_p ( f ) + bw_p ( f )\n",
"= a d f_p (v_p ) + b d f_p (w_p ).$$
\n",
"\n",
"
\n",
"\n",
"### Cotangent space $T^*_pM$\n",
"\n",
"
\n",
"\n",
"The space of **linear forms** on $T_pM$ is by definition the **dual space** of $T_pM$ and is denoted by $T_p^*M$. Elements of $T_p^*M$ are called **covectors** or **covariant vectors** and $T_p^*M$ is called the **cotangent space** to $M$ at $p$.
The vector space operations in $T_p^*M$ are defined in a natural way\n",
"\n",
"$$(\\alpha_p+\\beta_p)(v_p)=\\alpha_p(v_p)+\\beta_p(v_p),\\quad\n",
"(aα_p )(v_p ) = a(α_p (v_p )),$$\n",
"\n",
"for $\\ \\ α_p , β_p ∈ T_p^∗ M,\\ \\ v_p ∈ T_p M\\ $ and $a ∈ R$.\n",
"\n",
"To check what kind of object is $df_p$ we can use the `parent` method:\n"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Dual of the Tangent space at Point p on the 3-dimensional differentiable manifold M\n"
]
}
],
"source": [
"# continuation\n",
"# mathematical object of which \"dfp\" is an element.\n",
"print(dfp.parent())"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"**Example 9.2**\n",
"\n",
"If $x^1,\\ldots,x^n$ are local coordinates on $M$, then differentials\n",
"$dx^i_p$ are covectors from $T_p^*M$. From (9.1) it follows that if the tangent vector is expressed as $X_p=X_p(x^i)\\frac{\\partial}{\\partial x^i}\\big|_p$, then\n",
"\n",
"\\begin{equation}\n",
"\\displaystyle dx^i_p(X_p)=X_p(x^i),\n",
"\\label{}\\tag{9.1'}\n",
"\\end{equation}\n",
"\n",
"i.e. $\\ dx^i_p$ is the covector that maps the tangent vector at $p$ to its $i$-th component in the basis $\\displaystyle \\big\\{\\frac{\\partial}{\\partial x^j}\\big|_p\\big\\}_{j=1}^n.$"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"**Example 9.3**\n",
"\n",
"Let us define the scalar functions representing the i-th coordinate of the point."
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\left({x^{0}}, {x^{1}}, {x^{2}}\\right)\\)"
],
"text/latex": [
"$\\displaystyle \\left({x^{0}}, {x^{1}}, {x^{2}}\\right)$"
],
"text/plain": [
"(x0, x1, x2)"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"N = 3 # dimension of manifold M\n",
"M = Manifold(N, 'M') # manifold M of dimension N\n",
"X = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)])) # chart on M\n",
"x0, x1, x2 = X[:]\n",
"p = M.point((x0, x1, x2), name='p') # point of M\n",
"fx0 = M.scalar_field(x0, name='fx0') # fx0: x-->x^0\n",
"fx1 = M.scalar_field(x1, name='fx1') # fx1: x-->x^1\n",
"fx2 = M.scalar_field(x2, name='fx2') # fx2: x-->x^2\n",
"fx0.expr(), fx1.expr(), fx2.expr()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### And next their differentials:"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\left[\\mathrm{d}fx0 = \\mathrm{d} {x^{0}}, \\mathrm{d}fx1 = \\mathrm{d} {x^{1}}, \\mathrm{d}fx2 = \\mathrm{d} {x^{2}}\\right]\\)"
],
"text/latex": [
"$\\displaystyle \\left[\\mathrm{d}fx0 = \\mathrm{d} {x^{0}}, \\mathrm{d}fx1 = \\mathrm{d} {x^{1}}, \\mathrm{d}fx2 = \\mathrm{d} {x^{2}}\\right]$"
],
"text/plain": [
"[dfx0 = dx0, dfx1 = dx1, dfx2 = dx2]"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dx0 = fx0.differential() # differential of fx0\n",
"dx1 = fx1.differential() # differential of fx1\n",
"dx2 = fx2.differential() # differential of fx2\n",
"\n",
"dx0_p = dx0.at(p) # differential of fx0 at p\n",
"dx1_p = dx1.at(p) # differential of fx1 at p\n",
"dx2_p = dx2.at(p) # differential of fx2 at p\n",
"\n",
"[dx0_p.disp(), dx1_p.disp(), dx2_p.disp()] # show all three"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can check that the just defined differentials, when applied to the tangent vector $v$ give its i-th component $v^i$."
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\left({v^0}, {v^1}, {v^1}\\right)\\)"
],
"text/latex": [
"$\\displaystyle \\left({v^0}, {v^1}, {v^1}\\right)$"
],
"text/plain": [
"(v0, v1, v1)"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Tp = M.tangent_space(p) # tangent space at p\n",
" # variables with superscripts:\n",
"vn = [var('v'+str(i), latex_name='v'+'^'+str(i)) for i in range(N)]\n",
"v = Tp(vn, name='v') # tangent vector at p\n",
"(dx0_p(v), dx1_p(v), dx1_p(v)) # values of differentials of xi \n",
" # at p on a tangent vector v"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"### Bases in the cotangent space \n",
"\n",
"
\n",
"\n",
"Using the definition of the basis tangent vectors\n",
"$\\frac{\\partial}{\\partial x^i}\\Big|_p(f)=D_i\\Big|_{\\phi(p)}(f\\circ\\phi^{-1})$ and the fact that\n",
"$(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\n",
"$\\frac{\\partial}{\\partial x^i}\\Big|_p(x^j)=\\delta_i^j$ and consequently $dx^i_p\\big(\\frac{\\partial}{\\partial x^j}\\big|_p\\big)=\n",
"\\frac{\\partial}{\\partial x^j}\\big|_p(x^i)=\\delta_j^i$. \n",
"The last relation implies that:\n",
"
\n",
"\n",
"**The family $\\{dx^i_p\\}_{i=1}^n$ is a basis of $T_p^*M$**.
\n",
"\n",
"In fact if the linear combination $\\ a_idx^i_p\\ $ is equal to zero covector, then $\\ 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**.
\n",
"If $\\ \\alpha_p\\in T^*_pM$, then for $\\ v_p\\in T_pM\\ $ in the form \n",
"$v_p= v_p(x^i)\\frac{\\partial}{\\partial x^i}\\big|_p$ we have\n",
"\n",
"$$\\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).$$\n",
"\n",
"From the definition of the differential it follows $v_p(x^i)=dx^i_p(v_p)$, so\n",
"\n",
"$$\\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),$$ \n",
"\n",
"consequently\n",
"\n",
"\\begin{equation}\n",
"\\alpha_p= \\alpha_p\\Big( \\frac{\\partial}{\\partial x^i}\\big|_p\\Big)dx^i_p.\n",
"\\label{} \\tag{9.2}\n",
"\\end{equation}\n",
"\n",
"Thus **every covector from $T_p^*M$ is a linear combination of** $\\{dx^i_p\\}_{i=1}^n.$
\n",
"\n",
"
\n",
"\n",
"**Example 9.4**\n",
"\n",
"For example the differential of $f$ is a linear combination of $dx^0,dx^1,dx^2$ with coefficients \n",
"$\\frac{\\partial f}{\\partial x^0},\\frac{\\partial f}{\\partial x^1}, \\frac{\\partial f}{\\partial x^2}.$
\n",
"\n",
"**In SageMath Manifolds the index $p$ denoting the point is always dropped**. \n",
"\n",
"\n",
"The function `display` shows the differentials of functions and general linear forms as linear combinations of $dx^i.$"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\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}}\\)"
],
"text/latex": [
"$\\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}}$"
],
"text/plain": [
"df = diff(f(x0, x1, x2), x0) dx0 + diff(f(x0, x1, x2), x1) dx1 + diff(f(x0, x1, x2), x2) dx2"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# continuation\n",
"dfp.disp() # show df_p"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"**Example 9.5**\n",
"\n",
"Let us define a general linear form on the tangent space $T_pM$ of a 3-dimensional manifold."
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
"N = 3 # dimension of manifold M\n",
"M = Manifold(N, 'M') # manifold M of dimension N\n",
"X = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)])) # chart on M\n",
"p = M.point(X[:], name='p') # point of M\n",
"Tp = M.tangent_space(p) # tangent space at p\n",
"a = Tp.linear_form() # linear form on T_pM\n",
"a[:] = var('a', n=3) # coefficients in the basis dx^i"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle a_{0} \\mathrm{d} {x^{0}} + a_{1} \\mathrm{d} {x^{1}} + a_{2} \\mathrm{d} {x^{2}}\\)"
],
"text/latex": [
"$\\displaystyle a_{0} \\mathrm{d} {x^{0}} + a_{1} \\mathrm{d} {x^{1}} + a_{2} \\mathrm{d} {x^{2}}$"
],
"text/plain": [
"a0 dx0 + a1 dx1 + a2 dx2"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"a.disp() # show a"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"**The linear form applied to a tangent vector gives a scalar**."
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle a_{0} {v^0} + a_{1} {v^1} + a_{2} {v^2}\\)"
],
"text/latex": [
"$\\displaystyle a_{0} {v^0} + a_{1} {v^1} + a_{2} {v^2}$"
],
"text/plain": [
"a0*v0 + a1*v1 + a2*v2"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#continuation # variables wit superscripts:\n",
"vn = [var('v'+str(i), latex_name='v'+'^'+str(i)) for i in range(N)]\n",
"v = Tp(vn, name='v') # tangent vector v at p\n",
"a(v) # value of a on v"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**The value of a tangent vector $v\\in T_pM$ on a linear form $a\\in T_p^*M$ is by definition equal to $a(v)$**."
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle a_{0} {v^0} + a_{1} {v^1} + a_{2} {v^2}\\)"
],
"text/latex": [
"$\\displaystyle a_{0} {v^0} + a_{1} {v^1} + a_{2} {v^2}$"
],
"text/plain": [
"a0*v0 + a1*v1 + a2*v2"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"v(a) # value of v on a"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"\n",
"## Tensors in tangent spaces\n",
"\n",
"
"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Recall, that if $V$ is a vector space or a module, by a **multilinear** or more precisely $k$-**linear form** we mean a function $t:\n",
"V^k\\to R$ which is linear in each of its arguments i.e., for $i=1,\\ldots,k$\n",
"\n",
"$$t(v_1\\ldots,\\alpha v_i+\\beta w_i,\\ldots v_k)=\n",
"\\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.$$\n",
"
\n",
"Assume that $M$ is a smooth manifold."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"### Space of tensors $T^{(k,m)}_pM$ of mixed type\n",
"\n",
"
\n",
"\n",
"is the space of multilinear maps:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"$$ T^{(k,m)}_pM = \\{t_p:\\underbrace{T_p^*M\\times\\cdots\\times T_p^*M}_{k\\ \\; \\mbox{times}}\n",
" \\times \\underbrace{T_pM\\times\\cdots\\times T_pM}_{m\\ \\; \\mbox{times}}\\to R\\},$$\n",
"\n",
"where $T_pM$ is the tangent space at $p\\in M$ and\n",
"$T_p^*M$ is the corresponding cotangent space."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Since for linear forms $\\alpha$ and tangent vectors $v$ the assignment $\\alpha\\to v(\\alpha)$ defines a linear form $T_p^*M\\to R$, the elements $v\\in T_pM$ can be considered as elements of $T_p^{(1,0)}$. On the other hand $T^{(0,1)}_p$ as the space of linear forms on $T_pM$ is equal to $T_p^*M$. Thus, the tensor spaces generalize the tangent and cotangent spaces. \n",
"\n",
"
\n",
"\n",
"**Example 9.6**\n",
"\n",
"Let us show how to define tensor modules of type (1,0) and (0,1) in SageMath Manifolds."
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle T_{p}\\,M\\)"
],
"text/latex": [
"$\\displaystyle T_{p}\\,M$"
],
"text/plain": [
"Tangent space at Point p on the 3-dimensional differentiable manifold M"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"N = 3 # manifold dimension\n",
"M = Manifold(N, 'M') # manifold M\n",
"X = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)])) # chart on M\n",
"p = M.point(X[:], name='p') # point on M\n",
"Tp = M.tangent_space(p) # tangent space at p\n",
"Tp.tensor_module(1,0) # T_p^(1,0)M"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Tangent space at Point p on the 3-dimensional differentiable manifold M\n"
]
}
],
"source": [
"print(Tp.tensor_module(1,0)) # tensors (1,0) type are tangent vectors"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle T_{p}\\,M^*\\)"
],
"text/latex": [
"$\\displaystyle T_{p}\\,M^*$"
],
"text/plain": [
"Free module of type-(0,1) tensors on the Tangent space at Point p on the 3-dimensional differentiable manifold M"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Tp.tensor_module(0,1) # tensors of type (0,1) are linear forms on T_pM\n",
"# SageMath output looks a little strange\n",
"# but note that the dual space to V is denoted by V*"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Free module of type-(0,1) tensors on the Tangent space at Point p on the 3-dimensional differentiable manifold M\n"
]
}
],
"source": [
"print(Tp.tensor_module(0,1)) # SageMath naming is ready for arbitrary\n",
" # tensors, covector is just (0,1) tensor"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"### Space $T^{(0,k)}_pM$ - of covariant tensors of rank $k$\n",
"is the space of multilinear maps\n",
"\n",
"
"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"$$ T^{(0,k)}_pM = \\{t_p:\\underbrace{T_pM\\times\\cdots\\times T_pM}_{k\\ \\; \\mbox{times}}\\to R\\},$$\n",
"\n",
"where $T_pM$ denotes the tangent space at $p\\in M$.\n",
"\n",
"For k=1 we obtain the space of covectors at $p$, i.e., linear forms on $T_pM.$"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In $T^{(0,k)}_pM$ we introduce the vector space structure by\n",
"\n",
"$$ (at_p+bs_p)(v_1\\ldots,v_k)=at_p(v_1\\ldots,v_k)+bs_p(v_1\\ldots,v_k),$$\n",
"\n",
"where $t_p,s_p\\in T^{(0,k)}_pM$, $v_1,\\ldots,v_k\\in T_pM$ and $a,b\\in R$."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"For $t_p\\in T^{(0,k)}_pM,\\, s_p\\in T^{(0,m)}_pM$ we define the **tensor product** $t_p\\otimes s_p\\in T_p^{(0,k+m)}M$ by\n",
"\n",
"\\begin{equation}\n",
"(t_p ⊗ s_p )(v_1 ,\\ldots , v_{k+m} ) ≡ t_p (v_1 ,\\ldots, v_k ) s_p (v_{k+1} , . . . , v_{k+m} ),\n",
"\\label{eq:tensor_product}\\tag{9.3}\n",
"\\end{equation}\n",
"\n",
"for $v_1,\\ldots,v_{k+m}\\in T_pM$.
\n",
"In SageMath Manifolds the symbol of tensor product is simply $*$.
\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"### Covariant tensors in local components\n",
"\n",
"
\n",
"\n",
"If the tangent vectors $v_i$ are expressed as \n",
"$v_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 $t_p$ and the definition (9.3) of the tensor product we have for $t_p\\in T^{(0,k)}_p$:
\n",
"$$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)\\\\\n",
"=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)\\\\\n",
"=\\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),\n",
"$$\n",
"so"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\\begin{equation}\n",
"t_p=t_{i_1\\ldots i_k}dx^{i_1}_p\\otimes\\dots\\otimes dx^{i_k}_p,\\\\\n",
"\\label{}\\tag{9.4}\n",
"\\end{equation}\n",
"where\n",
"\\begin{equation}\n",
"t_{i_1\\ldots i_k}=t_p\\big(\\frac{\\partial}{\\partial x^{i_1}}\\big|_p,\\ldots,\\frac{\\partial}{\\partial x^{i_k}}\\big|_p\\big).\n",
"\\label{}\\tag{9.5}\n",
"\\end{equation}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"**Example 9.7**\n",
"\n",
"Let us check the formula (9.3) in the case of two general tensors from $T^{(0,2)}_pM$ for a 2-dimensional manifold $M$."
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [],
"source": [
"N = 2 # dimension of manifold M\n",
"M2 = Manifold(N, 'M2') # manifold M2 of dimension 2\n",
"X = M2.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)])) # chart on M\n",
"p = M2.point(X[:], name='p') # p -point with coordinates (x^0,x^1)\n",
"Tp = M2.tangent_space(p) # Tp -tangent space at p\n",
"t = Tp.tensor((0,2)) # t -tensor from T^{(0,2)}_pM\n",
"s = Tp.tensor((0,2)) # s -tensor from T^{(0,2)}_pM"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"First we define a list of components of four tangent vectors:"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\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]\\)"
],
"text/latex": [
"$\\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]$"
],
"text/plain": [
"[[v00, v10], [v01, v11], [v02, v12], [v03, v13]]"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"M = 4 # number of vectors\n",
"vv=[[var('v'+str(i)+str(j), # components of four vectors\n",
" latex_name='v'+'^{'+str(i)+'}_{'+str(j)+'}')\n",
" for i in range(N)] for j in range(M)]\n",
"vv # show four vectors components"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"and the vectors:"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle {v^{0}_{0}} \\frac{\\partial}{\\partial {x^{0}} } + {v^{1}_{0}} \\frac{\\partial}{\\partial {x^{1}} }\\)"
],
"text/latex": [
"$\\displaystyle {v^{0}_{0}} \\frac{\\partial}{\\partial {x^{0}} } + {v^{1}_{0}} \\frac{\\partial}{\\partial {x^{1}} }$"
],
"text/plain": [
"v00 ∂/∂x0 + v10 ∂/∂x1"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"v=[Tp(vv[k]) for k in range(M)]; # list of 4 tangent vectors\n",
"v[0].disp() # show first tangent vector"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Next we define the components of two (0,2)-type tensors $t\\ $ and $s$."
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [],
"source": [
"tt=[[var('t'+str(i)+str(j)) # components of tensor t\n",
" for j in range(N)] for i in range(N)]\n",
"ss=[[var('s'+str(i)+str(j)) # components of tensor s\n",
" for j in range(N)] for i in range(N)]\n",
"\n",
"\n",
"t[:] = tt # define tensor t components t_{ij}\n",
"s[:] = ss # define tensor s components s_{ij}"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\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}}\\)"
],
"text/latex": [
"$\\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}}$"
],
"text/plain": [
"t00 dx0⊗dx0 + t01 dx0⊗dx1 + t10 dx1⊗dx0 + t11 dx1⊗dx1"
]
},
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"t.disp() # show t"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\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}}\\)"
],
"text/latex": [
"$\\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}}$"
],
"text/plain": [
"s00 dx0⊗dx0 + s01 dx0⊗dx1 + s10 dx1⊗dx0 + s11 dx1⊗dx1"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"s.disp() # show s"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now we are ready to check the formula (9.3)."
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\mathrm{True}\\)"
],
"text/latex": [
"$\\displaystyle \\mathrm{True}$"
],
"text/plain": [
"True"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
" # check the formula (9.3)\n",
"bool((t*s)(v[0],v[1],v[2],v[3]) == t(v[0],v[1])*s(v[2],v[3]))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"### Algebraic properties of tensor product of covariant tensors\n",
"\n",
"
\n",
"\n",
"Tensor product has the following properties\n",
"\n",
"$$\n",
"\\begin{matrix}\n",
"(a\\,r_p + b\\,s_p ) ⊗ t_p = a\\,r_p ⊗ t_p + b\\,s_p ⊗ t_p ,\\\\\n",
"r_p ⊗ (a\\,s_p + b\\,t_p ) = a\\,r_p ⊗ s_p + b\\,r_p ⊗ t_p ,\\\\\n",
"(r_p ⊗ s_p ) ⊗ t_p = r_p ⊗ (s_p ⊗ t_p ),\n",
"\\end{matrix}\n",
"$$\n",
"\n",
"for $a,b\\in R\\ $ and for arbitrary covariant tensors $r_p,s_p,t_p$ (the addition is defined only for tensors of the same rank $(0,k)$).\n",
"\n",
"To check the first formula, let us note that for $X_1,\\ldots X_{k+l}\\in T_pM$"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"$$\n",
"(ar_p+bs_{ p} ) ⊗ t_p (X_1 , . . . , X_{k+l} ) \n",
"= (ar_{ p} + bs_{ p} )(X_1 , . . . , X_k ) t_p (X_{k+1} , . . . , X_{k+l} )\\\\\n",
"= (ar_{ p} (X_1 , . . . , X_k ) + b s_{ p} (X_1 , . . . , X_k ))\n",
"t_p (X_{k+1} , . . . , X_{k+l} ) \\\\\n",
"=ar_{ p} (X_1 , . . . , X_k )t_p (X_{k+1}, . . . , X_{k+l} )\n",
"+b s_{ p} (X_1 , . . . , X_k )t_p (X_{k+1} , . . . , X_{k+l} )\\\\\n",
"= (a r_{ p} ⊗ t_p + b s_{ p} ⊗ t_p) (X_1 , . . . , X_{k+l} ),\n",
"$$\n",
"\n",
"and similarly for the second formula.\n",
"\n",
"The associativity follows from"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"$$\n",
"((r_p ⊗ s_p ) ⊗ t_p)(X_1 , . . . , X_{k+l+m} )\\\\\n",
"= (r_p ⊗ s_p )(X_1 , . . . , X_{k+l} )\\; t_p (X_{k+l+1} , . . . , \n",
"X_{k+l+m} )\\\\\n",
"= (r_p (X_1 , . . . , X_k ) s_p (X_{k+1} , . . . , X_{k+l} )) \n",
"t_p (X_{k+l+1} , . . . , X_{k+l+m})\\\\\n",
"= r_p (X_1 , . . . , X_k )( s_p (X_{k+1} , . . . , X_{k+l} ) \n",
"t_p (X_{k+l+1} , . . . , X_{k+l+m} ))\\\\\n",
"= r_p (X_1 , . . . , X_k ) (s_p ⊗ t_p )(X_{k+1} , . . . , X_{k+l+m} )\\\\\n",
"= (r_p ⊗ (s_p ⊗ t_p )) (X_1 , . . . , X_{k+l+m} ),\n",
"$$\n",
"\n",
"for $X_1 , . . . , X_{k+l+m} \\in T_pM.$"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"**Example 9.8**\n",
"\n",
"Let us show an example of a tensor $t\\in T^{(0,3)}_pM$. First let us define the corresponding 3-dimensional table of components. "
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\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]\\)"
],
"text/latex": [
"$\\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]$"
],
"text/plain": [
"[[[t000, t001], [t010, t011]], [[t100, t101], [t110, t111]]]"
]
},
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"N = 2 # dimension of manifold\n",
"st=[[[var('t'+str(i0)+str(i1)+str(i2)) # components of t\n",
" for i2 in range(N)] \n",
" for i1 in range(N)] \n",
" for i0 in range(N)]\n",
"st"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now we define a manifold $M$, a point $p\\in M$, tangent space $T_pM$\n",
"and the tensor $t\\in T^{(0,3)}_pM$."
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\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}}\\)"
],
"text/latex": [
"$\\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}}$"
],
"text/plain": [
"t = t000 dx0⊗dx0⊗dx0 + t001 dx0⊗dx0⊗dx1 + t010 dx0⊗dx1⊗dx0 + t011 dx0⊗dx1⊗dx1 + t100 dx1⊗dx0⊗dx0 + t101 dx1⊗dx0⊗dx1 + t110 dx1⊗dx1⊗dx0 + t111 dx1⊗dx1⊗dx1"
]
},
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"M = Manifold(N, 'M') # 2-dimensional manifold\n",
"X = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)])) # chart on M\n",
"p = M.point(X[:], name='p') # point in M\n",
"Tp = M.tangent_space(p) # tangent space T_p\n",
"t = Tp.tensor((0,3), name='t') # tensor of type (0,3)\n",
"t[:] = st # define components of t\n",
"t.disp() # show t"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Next we show how to define a tensor of type (0,3) on a 2-dimensional manifold with concrete components."
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\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}}\\)"
],
"text/latex": [
"$\\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}}$"
],
"text/plain": [
"t = dx0⊗dx0⊗dx0 + 2 dx0⊗dx0⊗dx1 + 3 dx0⊗dx1⊗dx0 + 4 dx0⊗dx1⊗dx1 + 5 dx1⊗dx0⊗dx0 + 6 dx1⊗dx0⊗dx1 + 7 dx1⊗dx1⊗dx0 + 8 dx1⊗dx1⊗dx1"
]
},
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ct=range(1,9) # 1,...,8 -components of t\n",
"for i0 in range(N):\n",
" for i1 in range(N):\n",
" for i2 in range(N):\n",
" t[i0,i1,i2]=ct[i0*N*N+i1*N+i2]\n",
"t.disp() # show t"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Define the local basis of $T_pM$."
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\left(\\frac{\\partial}{\\partial {x^{0}} },\\frac{\\partial}{\\partial {x^{1}} }\\right)\\)"
],
"text/latex": [
"$\\displaystyle \\left(\\frac{\\partial}{\\partial {x^{0}} },\\frac{\\partial}{\\partial {x^{1}} }\\right)$"
],
"text/plain": [
"Basis (∂/∂x0,∂/∂x1) on the Tangent space at Point p on the 2-dimensional differentiable manifold M"
]
},
"execution_count": 30,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Xf = X.frame() # default frame\n",
"Xfp = Xf.at(p); Xfp # default frame at p"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Check that the component $t_{011}$ of the tensor from the previous example is equal to $t(\\frac{\\partial}{\\partial x_0},\\frac{\\partial}{\\partial x_1},\\frac{\\partial}{\\partial x_1})$."
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle 4\\)"
],
"text/latex": [
"$\\displaystyle 4$"
],
"text/plain": [
"4"
]
},
"execution_count": 31,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"t(Xfp[0], Xfp[1], Xfp[1]) # value of t(d/dx0,d/dx1,d/dx1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"### Space $T^{(k,0)}_pM $ of contravariant tensors of rank $k$\n",
"is the space of multilinear forms:\n",
"\n",
"
"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"$$ T^{(k,0)}_pM = \\{t_p:\\underbrace{T_p^*M\\times\\cdots\\times T_p^*M}_{k\\ \\;\\mbox{times}}\n",
" \\to R\\},$$\n",
"where $T_p^*M$ is the cotangent space at $p\\in M$."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In $T^{(k,0)}_pM$ we introduce the vector space structure by\n",
"\n",
"$$ (at_p+bs_p)(\\alpha_1\\ldots,\\alpha_k)=at_p(\\alpha_1\\ldots,\\alpha_k)+bs_p(\\alpha_1\\ldots,\\alpha_k),$$\n",
"\n",
"where $t_p,s_p\\in T^{(k,0)}_pM$, $\\alpha_1,\\ldots,\\alpha_k\\in T_p^*M$ and $a,b\\in R$."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"For $t_p\\in T^{(k,0)}_pM,s_p\\in T^{(m,0)}_pM$ we define the **tensor product** $t_p\\otimes s_p$ by\n",
"\n",
"\\begin{equation}\n",
"(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} ),\n",
"\\tag{9.6}\n",
"\\end{equation}\n",
"\n",
"for $\\alpha_1,\\ldots,\\alpha_{k+m}\\in T^*_pM$.\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"### Contravariant tensors in local components\n",
"\n",
"
\n",
"\n",
"Let $t_p\\in T^{(k,0)}_pM,\\ \\ α_1 , . . . , α_k ∈ T_p^∗M $ and let all covectors $\\alpha_i$ be expressed as \n",
"$α_i = α_i \\big(\\frac{∂}{∂ x^j}\\big|_p\\big) dx^j_ p\\ \\ $ (cf. (9.2)). We have\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"$$t_p(\\alpha_1,\\ldots,\\alpha_k)=\n",
"t_p\\big(\\alpha_1\\big(\\frac{\\partial}{\\partial x^{i_1}}\\big|_p\\big)dx^{i_1}_p,\\ldots,\n",
"\\alpha_k\\big(\\frac{\\partial}{\\partial x^{i_k}}\\big|_p\\big)dx^{i_k}_p \\big)\\\\\n",
"=\\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).$$\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Since $v_p(\\alpha_p)=\\alpha_p(v_p)$ we obtain"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"$$t_p(\\alpha_1,\\ldots,\\alpha_k)\n",
"=\\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),\n",
"$$ so\n",
"\\begin{equation}\n",
"t_p=t^{i_1\\ldots i_k}_p\\frac{\\partial}{\\partial x^{i_1}}\\big|_p\\otimes\\dots\\otimes\\frac{\\partial}{\\partial x^{i_k}}\\big|_p,\n",
"\\label{}\\tag{9.7}\n",
"\\end{equation}\n",
"\n",
"\\begin{equation}\n",
"t_p^{i_1\\ldots i_k}=t_p(dx^{i_1}_p,\\ldots,dx^{i_k}_p).\n",
"\\label{}\\tag{9.7'}\n",
"\\end{equation}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Example 9.9**\n",
"\n",
"Let us give an example of a tensor $t_p\\in T^{(3,0)}_pM$.\n",
"\n",
"First we define the corresponding 3-dimensional table of components with upper indices."
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\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]\\)"
],
"text/latex": [
"$\\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]$"
],
"text/plain": [
"[[[t000, t001], [t010, t011]], [[t100, t101], [t110, t111]]]"
]
},
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"N = 2 # dimension of manifold\n",
"st=[[[var('t'+str(i0)+str(i1)+str(i2),\n",
" latex_name='t'+'^'+'{'+str(i0)+str(i1)+str(i2)+'}') \n",
" for i2 in range(N)] \n",
" for i1 in range(N)] # components of t\n",
" for i0 in range(N)] # with superscripts\n",
"st"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now we define a two-dimensional manifold, the tangent space and the tensor $t_p\\in T^{(3,0)}_pM$ t with component from the table st."
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {},
"outputs": [],
"source": [
"M = Manifold(N, 'M') # manifold M\n",
"X = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)])) # chart on M\n",
"p = M.point(X[:], name='p') # point p in M\n",
"Tp = M.tangent_space(p) # tangent space at p\n",
"t = Tp.tensor((3,0), name='t') # tensor of type (3,0)\n",
"t[:] = st # tensor components"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We are ready to display the general tensor of type (3,0) on a 2-dimensional manifold in components."
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\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}} }\\)"
],
"text/latex": [
"$\\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}} }$"
],
"text/plain": [
"t = t000 ∂/∂x0⊗∂/∂x0⊗∂/∂x0 + t001 ∂/∂x0⊗∂/∂x0⊗∂/∂x1 + t010 ∂/∂x0⊗∂/∂x1⊗∂/∂x0 + t011 ∂/∂x0⊗∂/∂x1⊗∂/∂x1 + t100 ∂/∂x1⊗∂/∂x0⊗∂/∂x0 + t101 ∂/∂x1⊗∂/∂x0⊗∂/∂x1 + t110 ∂/∂x1⊗∂/∂x1⊗∂/∂x0 + t111 ∂/∂x1⊗∂/∂x1⊗∂/∂x1"
]
},
"execution_count": 34,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"t.disp() # show t"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Here is a tensor of type (3,0) on a 2-dimensional manifold with concrete components:"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\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}} }\\)"
],
"text/latex": [
"$\\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}} }$"
],
"text/plain": [
"t = ∂/∂x0⊗∂/∂x0⊗∂/∂x0 + 2 ∂/∂x0⊗∂/∂x0⊗∂/∂x1 + 3 ∂/∂x0⊗∂/∂x1⊗∂/∂x0 + 4 ∂/∂x0⊗∂/∂x1⊗∂/∂x1 + 5 ∂/∂x1⊗∂/∂x0⊗∂/∂x0 + 6 ∂/∂x1⊗∂/∂x0⊗∂/∂x1 + 7 ∂/∂x1⊗∂/∂x1⊗∂/∂x0 + 8 ∂/∂x1⊗∂/∂x1⊗∂/∂x1"
]
},
"execution_count": 35,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ct=range(1,9) # 1,...,8 - components of t\n",
"for i0 in range(N):\n",
" for i1 in range(N):\n",
" for i2 in range(N):\n",
" t[i0,i1,i2]=ct[i0*N*N+i1*N+i2]\n",
"t.disp() # show t"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let us define the basis of $T^*_pM$."
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\left(\\mathrm{d} {x^{0}},\\mathrm{d} {x^{1}}\\right)\\)"
],
"text/latex": [
"$\\displaystyle \\left(\\mathrm{d} {x^{0}},\\mathrm{d} {x^{1}}\\right)$"
],
"text/plain": [
"Dual basis (dx0,dx1) on the Tangent space at Point p on the 2-dimensional differentiable manifold M"
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Xcf = X.coframe() # basis of cotangent space\n",
"Xcfp = Xcf.at(p); Xcfp # basis of cotangent space at p "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Check that the component $\\ t_{011}\\ $ is equal to $\\ t( dx^0,dx^1, dx^1)$."
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle 4\\)"
],
"text/latex": [
"$\\displaystyle 4$"
],
"text/plain": [
"4"
]
},
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"t(Xcfp[0], Xcfp[1], Xcfp[1]) # value of t(dx0,dx1,dx1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"### General tensors from $T^{(k,m)}_pM$ \n",
"\n",
"
\n",
"\n",
"Since the definition of $T^{(k,m)}_pM$ was given above we start from definition of tensor product."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"For $t_p\\in T^{(k_1,m_1)},s_p\\in T^{(k_2,m_2)}_pM$ we define the **tensor product** $t_p\\otimes s_p\\in T_p^{(k_1+k_2,m_1+m_2)}$ by
\n",
"\\begin{equation}\n",
"(t_p ⊗ s_p )(\\alpha_1,\\ldots\\alpha_{k_1+k_2},v_1 ,\\ldots , v_{m_1+m_2} )\\\\\n",
"=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} ),\n",
"\\tag{9.8}\n",
"\\end{equation}
\n",
"for $\\alpha_1,\\ldots,\\alpha_{k_1+k_2}\\in T^*_pM$ and $v_1,\\ldots,v_{m_1+m_2}\\in T_pM$.
\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Generalizing the formulas (9.5) and (9.7) we obtain the following expression for the general tensor $t_p\\in T^{(k,l)}_pM$ in local components\n",
"\n",
"\\begin{equation}\n",
"t_p=\n",
"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)\n",
"\\frac{\\partial}{\\partial x^{i_1}}\\big|_p\\otimes..\\otimes\\frac{\\partial}{\\partial x^{i_k}}\\big|_p\\otimes dx^{j_1}_p\\otimes..\\otimes dx^{j_m}_p.\n",
"\\label{}\\tag{9.9}\n",
"\\end{equation}\n",
"\n",
"Very often the notation\n",
"\\begin{equation}\n",
"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)\n",
"\\tag{9.10}\n",
"\\end{equation}\n",
"is used and then \n",
"\\begin{equation}\n",
"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.\n",
"\\tag{9.11}\n",
"\\end{equation}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"To check that the elements\n",
"\n",
"\\begin{equation}\n",
"\\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\n",
"\\label{} \\tag{9.12}\n",
"\\end{equation}\n",
"\n",
"are linearly independent, assume that the linear combination\n",
"\n",
"$$a^{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\n",
"$$\n",
"\n",
"vanishes. If we apply this combination to $\\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 $\\ \\displaystyle a^{q_1\\ldots q_k}_{r_1\\ldots r_m}=0$.
\n",
"Since previously we have checked that elements of the type (9.12) span $T^{(k,l)}_pM$ we have proved, that these elements form a **basis** for $T^{(k,m)}_pM$."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"**Example 9.10**\n",
"\n",
"To show an example of a tensor $t_p\\in T^{(2,2)}_pM$, we first define a 4-dimensional table with lower and upper indices."
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\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]\\)"
],
"text/latex": [
"$\\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]$"
],
"text/plain": [
"[[[[t0000, t0001], [t0010, t0011]], [[t0100, t0101], [t0110, t0111]]],\n",
" [[[t1000, t1001], [t1010, t1011]], [[t1100, t1101], [t1110, t1111]]]]"
]
},
"execution_count": 38,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"N = 2 # dimension of manifold \n",
"st=[[[[var('t'+str(i0)+str(i1)+str(i2)+str(i3),\n",
" latex_name='t'+'^'+'{'+str(i0)+str(i1)+'}'+'_'+'{'+str(i2)+str(i3)+'}') \n",
" for i3 in range(N)] for i2 in range(N)] # components of t with upper\n",
" for i1 in range(N)] for i0 in range(N)] # and lower indices\n",
"st"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now define a 2-dimensional manifold $M$, tangent space at $p$ and $\\ t_p\\in T^{(2,2)}_pM$."
]
},
{
"cell_type": "code",
"execution_count": 39,
"metadata": {},
"outputs": [],
"source": [
"M = Manifold(N, 'M') # manifold M\n",
"X = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)])) # chart on M\n",
"p = M.point(X[:], name='p') # point of M\n",
"Tp = M.tangent_space(p) # tangent space at p\n",
"t = Tp.tensor((2,2), name='t') # tensor of type (2,2)\n",
"t[:] = st # define tensor components"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can display a general tensor from $T_p^{(2,2)}M$ on a 2-dimensional manifold ($2^4$ components)."
]
},
{
"cell_type": "code",
"execution_count": 40,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\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}}\\)"
],
"text/latex": [
"$\\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}}$"
],
"text/plain": [
"t = t0000 ∂/∂x0⊗∂/∂x0⊗dx0⊗dx0 + t0001 ∂/∂x0⊗∂/∂x0⊗dx0⊗dx1 + t0010 ∂/∂x0⊗∂/∂x0⊗dx1⊗dx0 + t0011 ∂/∂x0⊗∂/∂x0⊗dx1⊗dx1 + t0100 ∂/∂x0⊗∂/∂x1⊗dx0⊗dx0 + t0101 ∂/∂x0⊗∂/∂x1⊗dx0⊗dx1 + t0110 ∂/∂x0⊗∂/∂x1⊗dx1⊗dx0 + t0111 ∂/∂x0⊗∂/∂x1⊗dx1⊗dx1 + t1000 ∂/∂x1⊗∂/∂x0⊗dx0⊗dx0 + t1001 ∂/∂x1⊗∂/∂x0⊗dx0⊗dx1 + t1010 ∂/∂x1⊗∂/∂x0⊗dx1⊗dx0 + t1011 ∂/∂x1⊗∂/∂x0⊗dx1⊗dx1 + t1100 ∂/∂x1⊗∂/∂x1⊗dx0⊗dx0 + t1101 ∂/∂x1⊗∂/∂x1⊗dx0⊗dx1 + t1110 ∂/∂x1⊗∂/∂x1⊗dx1⊗dx0 + t1111 ∂/∂x1⊗∂/∂x1⊗dx1⊗dx1"
]
},
"execution_count": 40,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"t.disp() # show t"
]
},
{
"cell_type": "code",
"execution_count": 41,
"metadata": {},
"outputs": [],
"source": [
"#tt=t*t\n",
"#tt[:] very long output"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"A more concrete example can be defined as follows:"
]
},
{
"cell_type": "code",
"execution_count": 42,
"metadata": {},
"outputs": [],
"source": [
"ct=range(1,17) # [1,...,16] consecutive components\n",
"for i0 in range(N):\n",
" for i1 in range(N):\n",
" for i2 in range(N):\n",
" for i3 in range(N):\n",
" t[i0,i1,i2,i3]=ct[i0*N*N*N+i1*N*N+i2*N+i3]"
]
},
{
"cell_type": "code",
"execution_count": 43,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\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}}\\)"
],
"text/latex": [
"$\\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}}$"
],
"text/plain": [
"t = ∂/∂x0⊗∂/∂x0⊗dx0⊗dx0 + 2 ∂/∂x0⊗∂/∂x0⊗dx0⊗dx1 + 3 ∂/∂x0⊗∂/∂x0⊗dx1⊗dx0 + 4 ∂/∂x0⊗∂/∂x0⊗dx1⊗dx1 + 5 ∂/∂x0⊗∂/∂x1⊗dx0⊗dx0 + 6 ∂/∂x0⊗∂/∂x1⊗dx0⊗dx1 + 7 ∂/∂x0⊗∂/∂x1⊗dx1⊗dx0 + 8 ∂/∂x0⊗∂/∂x1⊗dx1⊗dx1 + 9 ∂/∂x1⊗∂/∂x0⊗dx0⊗dx0 + 10 ∂/∂x1⊗∂/∂x0⊗dx0⊗dx1 + 11 ∂/∂x1⊗∂/∂x0⊗dx1⊗dx0 + 12 ∂/∂x1⊗∂/∂x0⊗dx1⊗dx1 + 13 ∂/∂x1⊗∂/∂x1⊗dx0⊗dx0 + 14 ∂/∂x1⊗∂/∂x1⊗dx0⊗dx1 + 15 ∂/∂x1⊗∂/∂x1⊗dx1⊗dx0 + 16 ∂/∂x1⊗∂/∂x1⊗dx1⊗dx1"
]
},
"execution_count": 43,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"t.disp()"
]
},
{
"cell_type": "code",
"execution_count": 44,
"metadata": {},
"outputs": [],
"source": [
"#(t*t).disp() - latex code\n",
"#(t*t)[:] # long output"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Using the bases of $T_pM$ and $T^*_pM$,"
]
},
{
"cell_type": "code",
"execution_count": 45,
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Xfp- Basis (∂/∂x0,∂/∂x1) on the Tangent space at Point p on the 2-dimensional differentiable manifold M\n",
"Xcfp- Dual basis (dx0,dx1) on the Tangent space at Point p on the 2-dimensional differentiable manifold M\n"
]
}
],
"source": [
"Xf = X.frame() # frame (d/dx0,d/dx1)\n",
"Xfp = Xf.at(p); print(\"Xfp-\", Xfp) # frame (d/dx0,d/dx1) at p\n",
"Xcf = X.coframe() # coframe (dx0,dx1)\n",
"Xcfp = Xcf.at(p); print(\"Xcfp-\", Xcfp) # coframe (dx0,dx1) at p"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"one can check that the component $\\ \\ t^{10}_{01}\\ \\ $ is equal to $\\ \\ t(dx_1,dx_0,\\frac{\\partial}{\\partial x_0},\\frac{\\partial}{\\partial x_1})$:"
]
},
{
"cell_type": "code",
"execution_count": 46,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle 10\\)"
],
"text/latex": [
"$\\displaystyle 10$"
],
"text/plain": [
"10"
]
},
"execution_count": 46,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"t(Xcfp[1], Xcfp[0], Xfp[0], Xfp[1]) # value of t(dx1,dx0,d/dx0,d/dx1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## What's next?\n",
"\n",
"Take a look at the notebook [Alternating forms on modules](https://nbviewer.org/github/sagemanifolds/IntroToManifolds/blob/main/10Manifold_AlternatingForms_onModules.ipynb)."
]
}
],
"metadata": {
"kernelspec": {
"display_name": "SageMath 9.6",
"language": "sage",
"name": "sagemath"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
}
},
"nbformat": 4,
"nbformat_minor": 4
}