Contact
sagemanifolds
GitHub Repository: sagemanifolds/IntroToManifolds
Views: 80
Kernel: SageMath 9.6

# 19. Lie derivative

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'

### Lie derivative of functions

If $ϕ$ is a one-parameter group of transformations on $M$ (notebook 17), then the map $ϕ_t : M → M$, defined by $ϕ_t (x) = ϕ(x, t)$, is smooth and therefore for $f ∈ C^∞ (M),\ \$ $ϕ_t^*f = f\circ \phi_t\$ also belongs to $C^∞ (M)$.

If $X$ is the infinitesimal generator of $ϕ$ (notebook 17), then the Lie derivative of $f$ with respect to $X$ is defined by

$$$\mathcal{L}_Xf=\lim_{t\to 0}\frac{\phi_t^*f-f}{t} =\frac{d}{dt}(\phi_t^*f)\Big|_{t=0}. \tag{19.1}$$$

Example 19.1

Compute $\ \ \mathcal{L}_Xf\ \$ for $f(x)=x^2\cos y \ \$ and $\ \ X=-y\frac{\partial}{\partial x}+x\frac{\partial}{\partial y},$ using SageMath Manifolds.

%display latex
M = Manifold(2, 'M')                # manifold M
c_xy.<x,y> = M.chart()              # chart on M
f = M.scalar_field(x^2*cos(y))      # scalar function f on M
X = M.vector_field(name='X')        # vector field X on M
X[:] = (-y, x)                      # components of X
f.lie_derivative(X).expr()          # Lie derivative L_X(f)


$\displaystyle -x^{3} \sin\left(y\right) - 2 \, x y \cos\left(y\right)$

### Lie derivative of $f$ with respect to $X$ is the value of $\ Xf$

Since the curve $ϕ_x$ given by $ϕ_x (t) = ϕ(x, t)$ is the integral curve of $X$ that starts at $x$ we have

$\lim_{t\to 0}\frac{\phi_t^*f-f}{t}(x)= \lim_{t\to 0}\frac{f(\phi_t(x))-f(x)}{t} =\lim_{t\to 0}\frac{f(\phi(x,t))-f(x)}{t}$$=\lim_{t\to 0}\frac{f(\phi_x(t))-f(\phi_x(0))}{t}\\ =(ϕ_x)'_0 ( f ) = X_x ( f )=(Xf)(x).$

We have checked that $$$\mathcal{L}_Xf=Xf. \tag{19.2}$$$

Thus we can compute $\ \ \mathcal{L}_Xf\ \$ without any knowledge on the integral curves of $X$.

Example 19.2

Check the result of the previous example using (19.2).

We have

$\ \ X(f)=(-y\frac{\partial}{\partial x}+x\frac{\partial}{\partial y})(x^2\cos y )\ \ =-y(2x)\cos y +x(x^2)(-\sin y)\\=-x^3\sin y-2xy\cos y.$
# continuation
X(f).expr()              # value of the vector field X on f


$\displaystyle -x^{3} \sin\left(y\right) - 2 \, x y \cos\left(y\right)$

Example 19.3

Check that SageMath lie_derivative method applied to functions coincides with application of (19.2).

%display latex
N = 2                             # dimension of manifold M
M = Manifold(N, 'M')              # manifold M
c_x = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)]))  # chart on M
x0, x1 = c_x[:]  # coordinates x^0, x^1 of chart c_x as the Python variables x0, x1
X = M.vector_field(name='X')                # vector field X
Xf=[M.scalar_field(function('X'+str(i),     # list of components
latex_name='X'+'^'+str(i))(x0, x1))
for i in range(N)]
X[:] = Xf                           # define all components of X
X.disp()


$\displaystyle X = X^0\left({x^{0}}, {x^{1}}\right) \frac{\partial}{\partial {x^{0}} } + X^1\left({x^{0}}, {x^{1}}\right) \frac{\partial}{\partial {x^{1}} }$

f = M.scalar_field(function('f')(x0, x1))  # scalar function on M
f.disp()


$\displaystyle \begin{array}{llcl} & M & \longrightarrow & \mathbb{R} \\ & \left({x^{0}}, {x^{1}}\right) & \longmapsto & f\left({x^{0}}, {x^{1}}\right) \end{array}$

f.lie_derivative(X).expr()   # Lie derivative of f w.r.t. X


$\displaystyle X^0\left({x^{0}}, {x^{1}}\right) \frac{\partial}{\partial {x^{0}}}f\left({x^{0}}, {x^{1}}\right) + X^1\left({x^{0}}, {x^{1}}\right) \frac{\partial}{\partial {x^{1}}}f\left({x^{0}}, {x^{1}}\right)$

### Commutator of Lie derivatives of functions

From (19.2) it follows $\mathcal{L}_X (\mathcal{L}_Y f ) − \mathcal{L}_Y (\mathcal{L}_X f ) = XY f − YX f = [X, Y] f = \mathcal{L}_{[X,Y]} f,$ i.e. $$$\mathcal{L}_X (\mathcal{L}_Y f ) − \mathcal{L}_Y (\mathcal{L}_X f )= \mathcal{L}_{[X,Y]} f. \tag{19.3}$$$

Example 19.4

Check in SageMath Manifolds that (19.3) holds for 2-dimensional manifolds.

# continuation
Y = M.vector_field(name='Y')                # vector field Y
Yf = [M.scalar_field(function('Y'+str(i),     # list of components
latex_name='Y'+'^'+str(i))(x0, x1))
for i in range(N)]
Y[:] = Yf                                     # define all components
L_XL_Yf = (f.lie_derivative(Y)).lie_derivative(X) # L_X(L_Y(f))
L_YL_Xf = (f.lie_derivative(X)).lie_derivative(Y) # L_Y(L_X(f))
L_bracket_f = f.lie_derivative(X.bracket(Y))  # L_{lie_brack(X,Y)}(f)
L_XL_Yf - L_YL_Xf == L_bracket_f              # check (19.3)


$\displaystyle \mathrm{True}$

Let $ψ : M → N$ be a smooth map between two smooth manifolds. If $X ∈ \mathfrak{X}(M)$ and $Y ∈ \mathfrak{X}(N ).$

$X$ and $Y$ are $ψ$-related if $$$Y_{ψ(p)} = dψ_pX_p , \tag{19.4}$$$ for $p ∈ M.$

If $f ∈ C^∞ (N )$, then from (19.4) and (8.8) it follows

$(Y f ) (ψ( p)) = Y_{ψ( p)} ( f ) = dψ_p X_p ( f ) = X_p ( f ◦ ψ) = (X( f ◦ ψ) )( p),$

for $p ∈ M,$ i.e., $$$(Y f ) ◦ ψ = X( f ◦ ψ), \tag{19.5}$$$
for $f ∈ C^∞ (N).$ An equivalent formulation is

$$$\psi^*(Y f ) = X( \psi^*f), \tag{19.6}$$$

for $f ∈ C^∞ (N).$

### Pullback of a vector field and its properties

Let $M$ and $N$ be smooth manifolds, $ψ : M → N$ be a diffeomorphism and $X$ be a vector field on $N$. The pullback of $X$ under $\psi$ is the vector field on $M$ defined by

$$$(\psi^∗ X)_x = d(ψ^{-1 })_{ψ(x)} X_{ ψ(x)}. \tag{19.7}$$$

Note that (19.7) implies that

$$$X_{\psi(x)}=d\psi_x(\psi^*X)_x, \tag{19.7'}$$$

which means that $ψ^∗ X$ and $X$ are $ψ$-related. If we replace in (19.6) $Y$ by $X$ and $X$ by $\psi^*X$ we obtain

$$$\psi^*(X f ) = (\psi^*X)( \psi^*f), \tag{19.8}$$$

for $f ∈ C^∞ (N ).$

We have also $ψ^∗ ( f X) = (ψ^∗ f )(ψ^∗ X),$

$ψ^∗ (aX + bY) = aψ^∗X + bψ^∗ Y,$

for $X, Y ∈ \mathfrak{X}(N ), f ∈ C^∞ (N ),$ and $a, b ∈ R.$

In fact by (19.7)

$[ψ^∗( f X)]_x = d(ψ^{−1} )_{ψ(x)} ( f X)_{ψ(x)} = d(ψ^{−1} )_{ψ(x)} (f (ψ(x)) X_{ψ(x)})\\ = f (ψ(x)) d(ψ^{−1} )_{ψ(x)} X_{ψ(x)} = (ψ^∗ f )(x) (ψ^∗ X)_x = [(ψ^∗ f )(ψ^∗ X)]_x,$

and

$[ψ^∗ (aX + bY)]_x = d(ψ^{−1})_{ψ(x)} (aX + bY)_{ψ(x)} = d(ψ^{−1} )_{ψ(x)} (aX_{ψ(x)} + bY_{ψ(x)} ) = ad(ψ^{ −1} )_{ψ(x)} X_{ψ(x)} + bd(ψ^{−1} )_{ψ(x)} Y_{ψ(x)} = [aψ^∗ X + bψ^∗ Y]_x.$

If $ψ : M → N$ is a diffeomorphism of smooth manifolds $M$, $N$ and $χ$ is a one-parameter group of transformations on $N$ whose infinitesimal generator is $Y$, then $ϕ_t = ψ^{−1} ◦ χ_t ◦ ψ$ is a one-parameter group of transformations on $M$ whose infinitesimal generator is $ψ^∗ Y$.

This relation follows from

$ϕ_s ◦ϕ_t = (ψ^{−1} ◦ χ_s ◦ ψ) ◦ (ψ^{−1} ◦ χ_t ◦ ψ) \\ = ψ^{−1} ◦ χ_s ◦ χ_t ◦ ψ = ψ^{−1} ◦ χ_{s+t} ◦ ψ = ϕ_{s+t} .$

If $ψ_1 : M_1 → M_2$ and $ψ_2 : M_2 → M_3$ are diffeomorphisms, then $(ψ_2 ◦ ψ_1 )^∗ X = (ψ_1^∗ ◦ ψ_2^∗ )X,$ for $X ∈ \mathfrak{X}(M_3 )$.

The last equality is true, since

$[(ψ_2 ◦ ψ_1 )^∗ X]_x = d((ψ_2 ◦ ψ_1 )^{−1}) _{ (ψ_2 ◦ψ_1 )(x)}X_{( ψ_2 \circ ψ_1 )(x)}\\ = (d(ψ_1^{−1})_{ψ_1 (x)}\circ d(ψ_2^{-1})_{\psi_2(\psi_1(x))}) X_{\psi_2(ψ_1 (x))}\\ =d(\psi_1^{-1})_{\psi_1(x)}(\psi_2^*X)_{\psi_1(x)} = [ψ_1^∗ (ψ_2^∗ X)]_x .$

### Lie derivative of a vector field

If $ϕ$ is a one-parameter group of transformations on a manifold $M$ and $X$ its infinitesimal generator, then for any vector field $Y$ on $M$, the Lie derivative of $Y$ with respect to $X$ is defined by $$$(\mathcal{L}_XY)_x=\lim_{t→0}\frac{(\phi^*_tY)_x-Y_x}{t} =\frac{d}{dt}(\phi_t^*Y)_x\Big|_{t=0}. \tag{9.11}$$$

### Lie derivatives of vector fields are equal to Lie brackets

If $X, Y ∈ \mathfrak{X}(M)$, then $$$\mathcal{L}_XY=[X,Y]. \tag{19.12}$$$

To prove this formula, we will check first a form of Leibniz rule. If $\phi$ is a one-parameter group of transformations on $M$ whose infinitesimal generator is $X$, then

$\mathcal{L}_X(Yf) =\lim_{t→0}\frac{\phi^*_t(Yf)-Yf}{t} =\lim_{t→0}\frac{(\phi^*_tY)(\phi_t^*f)-Yf}{t}$$=\lim_{t→0}\Big[(\phi^*_tY)\frac{\phi^*_tf-f}{t} +\frac{\phi^*_tY-Y}{t}f\Big]=Y(\mathcal{L}_Xf)+(\mathcal{L}_XY)f.$

Notice that $(\phi^*_tY)_x=d(\phi_t^{-1})_{\phi_t(x)}Y_{\phi_t(x)}= d(\phi_{-t})_{\phi_t(x)}Y_{\phi_t(x)}$. We have also $\phi_t(x)\to x, \ \phi_{-t}(x)\to x$ as $t\to 0$ and in local coordinates the components of the matrix of the differential $d(ϕ_{−t} )_{\phi_t(x)} : T_{ϕ_t(x)} M → T_x M$ are $\displaystyle \frac{∂ϕ^i(−t, ϕ(t, x))}{∂x^j}.$ Smoothness of $X$ implies smoothness of $\phi$, which implies that

$\displaystyle \frac{∂ϕ^i(−t, ϕ(t, x))}{∂x^j}\to \frac{\partial\phi^i(0,x)}{\partial x^j}=\frac{\partial x^i}{\partial x^j}=\delta^i_j\quad\text {as}\ t\to 0.$

Consequently, if $Y = Y^j \frac{\partial}{∂ x^j}$, then $d(ϕ_{−t} )_{\phi_t(x)}Y_{ϕ_t (x)} = \frac{∂ϕ^i (−t, ϕ(t, x))}{ ∂ x^j}Y^j(ϕ(t, x))\frac{∂}{∂x^i}\Big|_{x}\to Y_x\quad \mbox{as } t\to 0.$

Since by (19.2) $\mathcal{L}_Xf=Xf,\$ we have

$X(Yf)=\mathcal{L}_X(Yf)=Y(Xf)+(\mathcal{L}_XY)f,$

so $\mathcal{L}_X(Yf)= X(Yf)-Y(Xf)=[X,Y]f,$ i.e., (19.12) holds true.

Thus we can compute $\ \ \mathcal{L}_XY\ \$ without any knowledge on the integral curves of $X$.

Example 19.5

Compute $\ \ \mathcal{L}_XY\ \$ for $\ \ X=-y\frac{\partial}{\partial x}+x\frac{\partial}{\partial y}\ \$ and $\ \ Y=(1-x)\frac{\partial}{\partial x}+(x-y)\frac{\partial}{\partial y}.$

%display latex
M = Manifold(2, 'M')                    # manifold M
c_xy.<x,y> = M.chart()                  # chart on M
X = M.vector_field(-y, x, name='X')     # vector field X
Y = M.vector_field(1-x, x-y, name='Y')  # vector field Y


First we use the lie_derivative method:

Y_X = Y.lie_derivative(X)                 # Lie derivative L_X(Y)
Y_X.disp()


$\displaystyle x \frac{\partial}{\partial x } + \left( -y - 1 \right) \frac{\partial}{\partial y }$

and next the Lie bracket for comparison:

X.bracket(Y).disp()                    # [X,Y]


$\displaystyle \left[X,Y\right] = x \frac{\partial}{\partial x } + \left( -y - 1 \right) \frac{\partial}{\partial y }$

Example 19.6

Use SageMath to check that (19.12) holds for 2-dimensional manifolds.

%display latex

N = 2                             # dimension of manifold M
M = Manifold(N, 'M')              # manifold M
c_x = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)]))  # chart on M
x0, x1 = c_x[:]  # coordinates x^0, x^1 of chart c_x as the Python variables x0, x1
X = M.vector_field(name='X')                  # vector field X
Xf = [M.scalar_field(function('X'+str(i),     # list of components
latex_name='X'+'^'+str(i))(x0,x1))
for i in range(N)]
X[:] = Xf                           # define all components of X
Y = M.vector_field(name='Y')                  # vector field Y
Yf = [M.scalar_field(function('Y'+str(i),     # list of components
latex_name='Y'+'^'+str(i))(x0,x1))
for i in range(N)]
Y[:] = Yf                           # define all components of Y
Y.lie_derivative(X) == X.bracket(Y) # check (19.12)


$\displaystyle \mathrm{True}$

### Basic properties of Lie derivative of vector fields

Using properties of the Lie bracket from notebook 12, one can check that if $X, Y ∈ \mathfrak{X}(M)$ and $f ∈ C^∞ (M),$ then

$\mathcal{L}_X(fY)=[X, f Y] = f [X, Y] + (X f )Y = f \mathcal{L}_X Y + (\mathcal{L}_X f )Y,$

and $\mathcal{L}_X (Y + Z) = [X, Y + Z] = [X, Y] + [X, Z] = \mathcal{L}_X Y + \mathcal{L}_X Z.$

If $X, Y, Z \in \mathfrak{X}(M)$, then using Jacobi identity (notebook 12) we obtain

$\mathcal{L}_X (\mathcal{L}_Y Z) − \mathcal{L}_Y (\mathcal{L}_X Z) = [X, [Y, Z]] − [Y, [X, Z]] = [X, [Y, Z]] + [Y, [Z, X]]\\ = −[Z, [X, Y]]= [[X, Y], Z] =\mathcal{L}_{[X,Y]} Z.$

Example 19.7

For $\ X,Y$ from example 19.5 and $\ Z=y\frac{\partial}{\partial x}+x\frac{\partial}{\partial y}\ \$ compute $\mathcal{L}_X (\mathcal{L}_Y Z) − \mathcal{L}_Y (\mathcal{L}_X Z)\ \$ and $\mathcal{L}_{[X,Y]} Z.$

%display latex
M = Manifold(2, 'M')                           # manifold M
c_xy.<x,y> = M.chart()                         # chart on M
X = M.vector_field(-y, x, name='X')            # vector field X
Y = M.vector_field(1-x, x-y, name='Y')         # vector field Y
Z = M.vector_field(y, x, name='Z')             # vector field Z
Z_YX = (Z.lie_derivative(Y)).lie_derivative(X)   # L_X(L_Y(Z))
Z_XY = (Z.lie_derivative(X)).lie_derivative(Y)   # L_Y(L_X(Z))
(Z_YX - Z_XY).disp()                      # L_X(L_Y(Z)) - L_Y(L_X(Z))


$\displaystyle \left( -2 \, y - 1 \right) \frac{\partial}{\partial x } + 2 \, x \frac{\partial}{\partial y }$

Z_brXY = Z.lie_derivative(X.bracket(Y))          # L_[X,Y](Z)
Z_brXY.disp()


$\displaystyle \left( -2 \, y - 1 \right) \frac{\partial}{\partial x } + 2 \, x \frac{\partial}{\partial y }$

### Some properties of pullback of covariant tensor fields

Let us recall (from notebook 15) that if $M$ and $N$ are smooth manifolds and $ψ : M → N$ is a smooth map then the pullback $\ \psi^*t\$of a smooth tensor field $t\in T^{(0,k)}N$ is defined by

$$$(ψ^∗ t)_p (X_{1p} , . . . , X_{kp} ) = t_{ψ( p)} (dψ_p X_{1p} , . . . , dψ_p X_{kp} ), \tag{19.13}$$$

for $X_{1p},\ldots,X_{kp}\in T_pM$ and $p\in M$.

In (15.2) we have proved that for $f ∈ C^∞ (N )$ $$$ψ^∗ d f=d(\psi^*f), \tag{9.14}$$$

and in (15.3)-(15.5) we justified the relations (for covariant tensor fields $t,s$ and $f\in C^\infty(M),\ a,b\in R$)

$$$\begin{matrix} ψ^∗ (at + bs) = aψ^∗ t + bψ^∗ s,\\ ψ^∗ ( f t) = (ψ^* f )(ψ^* t), \end{matrix} \tag{19.15}$$$
$$$ψ^∗ (t ⊗ s) = (ψ^∗ t) ⊗ (ψ^∗ s). \tag{19.16}$$$

In notebook 15 we also have checked that if $M_1,M_2,M_3\$ are smooth manifolds and $ψ_1 : M_1 → M_2$ and $ψ_2 : M_2 → M_3$ are smooth maps, then $$$(ψ_2 ◦ ψ_1 )^∗ t = (ψ_1^∗ ◦ ψ_2^∗ )\,t. \tag{19.17}$$$

### Lie derivative of covariant tensor fields

If $ϕ$ is a one-parameter group of transformations on $M$ and $X$ its infinitesimal generator, then for any tensor field $t\in T^{(0,k)}M$ the Lie derivative of $t$ with respect to $X$ is defined by $$$(\mathcal{L}_Xt)_x=\lim_{h→0}\frac{(\phi^*_ht)_x-t_x}{h} =\frac{d}{dt}(\phi_t^*t)_x\Big|_{t=0}. \tag{9.18}$$$

For $t\in T^{(0,k)}M,\ s\in T^{(0,m)}M$ we have

$$$\begin{matrix} \displaystyle \mathcal{L}_X(t\otimes s) =\lim_{h→0}\frac{\phi^*_h(t\otimes s)-t\otimes s}{h} =\lim_{h→0}\frac{(\phi^*_ht)\otimes (\phi_h^*s)-t\otimes s}{h}\\ \displaystyle =\lim_{h→0}\Big[(\phi^*_ht)\otimes\frac{\phi^*_hs-s}{h} +\frac{\phi^*_ht-t}{h}\otimes s\Big]\\ \displaystyle =t\otimes(\mathcal{L}_X s)+(\mathcal{L}_Xt)\otimes s. \end{matrix} \tag{19.19}$$$

For $t,s\in T^{(0,k)}M$ and $a,b\in R$

$$$\begin{matrix} \displaystyle \mathcal{L}_X(at+bs) =\lim_{h→0}\frac{\phi^*_h(at+bs)-(at+bs)}{h}\\ \displaystyle =\lim_{h→0}\frac{a\phi^*_ht+b\phi^*_hs-at-bs}{h} =a\mathcal{L}_Xt +b\mathcal{L}_Xs. \end{matrix} \tag{19.20}$$$

For $f ∈ C^∞ (M)$ and $t\in T^{(0,k)}M$

$$$\begin{matrix} \displaystyle \mathcal{L}_X(ft) =\lim_{h→0}\frac{\phi^*_h(ft)-ft}{h} =\lim_{h→0}\frac{(\phi^*_hf)(\phi_h^*t)-ft}{h}\\ \displaystyle =\lim_{h→0}\Big[\phi^*_hf\frac{\phi^*_ht-t}{h} +\frac{\phi^*_hf-f}{h}t\Big] =f(\mathcal{L}_X t)+(\mathcal{L}_Xf)t. \end{matrix} \tag{19.21}$$$
$$$\begin{matrix} \displaystyle \mathcal{L}_Xdf =\lim_{h→0}\frac{\phi^*_hdf-df}{h} =\lim_{h→0}\frac{d(\phi^*_hf)-df}{h} =d(\mathcal{L}_Xf). \end{matrix} \tag{19.22}$$$

### Lie derivative of covariant tensor fields in local components

If $t\in T^{(0,k)}M$ is given locally by $t = t_{i_1... i_k} dx^{i_1} ⊗· · · ⊗ dx^{i_k}$, then

$$\mathcal{L}_X t = \mathcal{L}_X (t_{i_1... i_k} dx^{i_1} ⊗ · · · ⊗ dx^{i_k} )\\ = (\mathcal{L}_X t_{i_1... i_k})dx^{i_1} ⊗ · · · ⊗ dx^{i_k} \\ + t_{i_1... i_k}\big( \mathcal{L}_X dx^{i_1} ⊗ · · · ⊗ dx^{i_k} + · · · + dx^{i_1} ⊗ · · · ⊗ \mathcal{L}_Xdx^{i_k}\big)\\ =(Xt_{i_1... i_k})dx^{i_1} ⊗ · · · ⊗ dx^{i_k}\\ + t_{i_1... i_k}\big[d (\mathcal{L}_X x^{i_1}) ⊗ · · · ⊗ dx^{i_k} + · · · + dx^{i_1} ⊗ · · · ⊗ d(\mathcal{L}_Xx^{i_k})\big].\\$$

If $X = X^m \frac{∂}{∂ x^m}$, then

$\mathcal{L}_Xx^i=Xx^i=\big(X^m \frac{∂}{∂ x^m}\big)x^i=X^i,$

consequently

$$$d(\mathcal{L}_Xx^i)=dX^i=\frac{∂X^i}{∂ x^m}dx^m, \tag{19.22'}$$$

and $\begin{darray}{rcl} &\mathcal{L}_X t = (Xt_{i_1... i_k} ) dx^{i_1} ⊗ · · · ⊗ dx^{i_k}\\ &+t_{i_1... i_k} \big(\frac{∂X^{i_1}}{∂ x^m}dx^m\otimes\ldots\otimes dx^{i_k}+\ldots+dx^{i_1}\otimes\ldots\otimes\frac{∂X^{i_k}}{∂ x^m}dx^m\Big)\\ &=\big(X^m\frac{\partial t_{i_1... i_k}}{∂ x^m}+ t_{i_m... i_k}\frac{∂X^{i_m}}{∂ x^{i_1}}+\ldots +t_{i_1... i_m}\frac{∂X^{i_m}}{∂ x^{i_k}}\Big)dx^{i_1} ⊗ · · · ⊗ dx^{i_k}. \tag{19.23} \end{darray}$

Example 19.8

Compute $\ \mathcal{L}_Xt\ \$ for $\ X=(1-x)\frac{\partial}{\partial x}+(x-y)\frac{\partial}{\partial y}\ \$ and $\ \ t=xdx⊗dx+dx⊗d𝑦+𝑦d𝑦⊗dx.$

First define the tensor field and vector field:

%display latex
M = Manifold(2, 'M')          # manifold M
c_xy.<x,y> = M.chart()        # chart on M
e_xy = c_xy.frame()           # local basis of vector fields
t = M.tensor_field(0, 2, {e_xy: [[x, 1], [y, 0]]}, name='t')
t.disp()                      # tensor field t of (0,2)-type


$\displaystyle t = x \mathrm{d} x\otimes \mathrm{d} x +\mathrm{d} x\otimes \mathrm{d} y + y \mathrm{d} y\otimes \mathrm{d} x$

e_xy                          # show the local basis


$\displaystyle \left(M, \left(\frac{\partial}{\partial x },\frac{\partial}{\partial y }\right)\right)$

X = M.vector_field({e_xy: [1-x, x-y]}, name='X')
X.disp()                      # vector field X


$\displaystyle X = \left( -x + 1 \right) \frac{\partial}{\partial x } + \left( x - y \right) \frac{\partial}{\partial y }$

Now we can compute $\ \mathcal{L}_Xt:\ \$

lt = t.lie_derivative(X)        # Lie derivative L_X(t)
lt.display(e_xy)


$\displaystyle \left( -3 \, x + y + 2 \right) \mathrm{d} x\otimes \mathrm{d} x -2 \mathrm{d} x\otimes \mathrm{d} y + \left( x - 3 \, y \right) \mathrm{d} y\otimes \mathrm{d} x$

Example 19.9

For a deeper understanding of the formula (19.23) let us take a more general example.

Let $\ \ t=𝑡_{00}d𝑥^0⊗d𝑥^0+𝑡_{01}d𝑥^0⊗d𝑥^1+𝑡_{10}d𝑥^1⊗d𝑥^0+𝑡_{11}d𝑥^1⊗d𝑥^1.\ \$

N=2                               # dimension of manifold M
M = Manifold(N, 'M')              # manifold M
c_x = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)]))  # chart on M
x0, x1 = c_x[:]  # coordinates x^0, x^1 of chart c_x as the Python variables x0, x1
t = M.tensor_field(0,2, name='t') # tensor field t of type (0,2)
def f2(i,j): return 't'+str(i)+str(j)  # names of components
# component functions:
f1 = [[M.scalar_field(function(f2(j,k))(x0,x1), name=f2(j,k))
for k in range(N)] for j in range(N)]
t[:] = f1                           # define all components of t
%display latex
Manifold.options.omit_function_arguments=True
t.disp()                          # show tensor field t


$\displaystyle t = 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}}$

and $\ \ X=X^0\frac{\partial}{\partial x^0}+X^1\frac{\partial}{\partial x^1}$

# continuation
X = M.vector_field(name='X')                # vector field X
Xf=[M.scalar_field(function('X'+str(i),     # list of components
latex_name='X'+'^'+str(i))(x0,x1))
for i in range(N)]
X[:] = Xf                                     # define all comp. of X
X.disp()                                    # show vect.field X


$\displaystyle X = X^0 \frac{\partial}{\partial {x^{0}} } + X^1 \frac{\partial}{\partial {x^{1}} }$

Compute the Lie derivative$\ \mathcal{L}_Xt:\ \$

lt = t.lie_derivative(X)
lt.disp()


$\displaystyle \left( 2 \, t_{00} \frac{\partial\,X^0}{\partial {x^{0}}} + {\left(t_{01} + t_{10}\right)} \frac{\partial\,X^1}{\partial {x^{0}}} + X^0 \frac{\partial\,t_{00}}{\partial {x^{0}}} + X^1 \frac{\partial\,t_{00}}{\partial {x^{1}}} \right) \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + \left( t_{01} \frac{\partial\,X^0}{\partial {x^{0}}} + t_{00} \frac{\partial\,X^0}{\partial {x^{1}}} + t_{11} \frac{\partial\,X^1}{\partial {x^{0}}} + t_{01} \frac{\partial\,X^1}{\partial {x^{1}}} + X^0 \frac{\partial\,t_{01}}{\partial {x^{0}}} + X^1 \frac{\partial\,t_{01}}{\partial {x^{1}}} \right) \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + \left( t_{10} \frac{\partial\,X^0}{\partial {x^{0}}} + t_{00} \frac{\partial\,X^0}{\partial {x^{1}}} + t_{11} \frac{\partial\,X^1}{\partial {x^{0}}} + t_{10} \frac{\partial\,X^1}{\partial {x^{1}}} + X^0 \frac{\partial\,t_{10}}{\partial {x^{0}}} + X^1 \frac{\partial\,t_{10}}{\partial {x^{1}}} \right) \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + \left( {\left(t_{01} + t_{10}\right)} \frac{\partial\,X^0}{\partial {x^{1}}} + 2 \, t_{11} \frac{\partial\,X^1}{\partial {x^{1}}} + X^0 \frac{\partial\,t_{11}}{\partial {x^{0}}} + X^1 \frac{\partial\,t_{11}}{\partial {x^{1}}} \right) \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}$

For comparison, using (19.23) without simplifications we obtain

$\begin{matrix} \Big(X^m\frac{\partial t_{i_1... i_k}}{∂ x^m} & +t_{i_m... i_k}\frac{∂X^{i_m}}{∂ x^{i_1}}+ & ...+t_{i_1... i_m}\frac{∂X^{i_m}}{∂ x^{i_k}}\Big) & dx^{i_1} ⊗ · · · ⊗ dx^{i_k}\\ =\Big(X^0\frac{\partial t_{00}}{\partial x^0}+X^1 \frac{\partial t_{00}}{\partial x^1} & +t_{00}\frac{\partial X^0}{\partial x^0}+t_{10}\frac{\partial X^1}{\partial x^0} & +t_{00}\frac{\partial X^0}{\partial x^0}+t_{01}\frac{\partial X^1}{\partial x^0} \Big)& dx^0\otimes dx^0\\ +\Big(X^0\frac{\partial t_{01}}{\partial x^0}+X^1 \frac{\partial t_{01}}{\partial x^1} & +t_{01}\frac{\partial X^0}{\partial x^0}+t_{11}\frac{\partial X^1}{\partial x^0} & +t_{00}\frac{\partial X^0}{\partial x^1}+t_{01}\frac{\partial X^1}{\partial x^1} \Big)& dx^0\otimes dx^1\\ +\Big(X^0\frac{\partial t_{10}}{\partial x^0}+X^1 \frac{\partial t_{10}}{\partial x^1} & +t_{00}\frac{\partial X^0}{\partial x^1}+t_{10}\frac{\partial X^1}{\partial x^1} & +t_{10}\frac{\partial X^0}{\partial x^0}+t_{11}\frac{\partial X^1}{\partial x^0} \Big)& dx^1\otimes dx^0\\ +\Big(X^0\frac{\partial t_{11}}{\partial x^0}+X^1 \frac{\partial t_{11}}{\partial x^1} & +t_{01}\frac{\partial X^0}{\partial x^1}+t_{11}\frac{\partial X^1}{\partial x^1} & +t_{10}\frac{\partial X^0}{\partial x^1}+t_{11}\frac{\partial X^1}{\partial x^1} \Big)& dx^1\otimes dx^1, \end{matrix}$

which of course gives the same result.

# 3 ways how to obtain contraction sign
print(u'\u231F',u'\u300D',u'\uFF63')

⌟ 」 ｣

### Contraction with a vector field (interior product)

If $t\in T^{(0,k)}M,\ X\in \mathfrak{X}(M)$, then the contraction of $t$ with $X$, denoted by $\ X\mathbin{｣}t\$ is a tensor field from $T^{(0,k-1)}M$ defined by

$$$(X\mathbin{｣}t)_p(X_{2p},\ldots,X_{kp})=t_p(X_p,X_{2p},\ldots,X_{kp}). \tag{19.24}$$$

Example 19.10

Let us compute $\ \ X\mathbin{｣}t\ \$ for $\ \ X=X^1\frac{\partial}{\partial x^1}+ X^2\frac{\partial}{\partial x^2}\ \$ and $\ \ 𝑔=d𝑥^1⊗d𝑥^1+d𝑥^2⊗d𝑥^2.$

%display latex
N = 2                                  # dimension of manifold M
M = Manifold(2, 'M',start_index=1)     # manifold M
c_x = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(1, N+1)]))  # chart on M
x1, x2 = c_x[:]  # coordinates x^1, x^2 of chart c_x as the Python variables x1, x2
g = M.tensor_field(0, 2, name='g');    # tensor field of type (0,2)
g[1,1] = 1; g[2,2] = 1                 # set nonzero components
g.display()                            # show g


$\displaystyle g = \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}+\mathrm{d} {x^{2}}\otimes \mathrm{d} {x^{2}}$

X = M.vector_field()                     # vector field X
X[:] = (function('X1', latex_name='X^1')(x1,x2),  # define components of X
function('X2', latex_name='X^2')(x1,x2))
Manifold.options.omit_function_arguments=True
X.display()                            # show X


$\displaystyle X^1 \frac{\partial}{\partial {x^{1}} } + X^2 \frac{\partial}{\partial {x^{2}} }$

X.contract(g).display()                # X 」g