{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 10. Alternating forms on modules\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 $M$ denotes a module --- not a manifold\n",
"\n",
"
\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Reminder. Bases and dual bases\n",
"\n",
"
"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Le us assume that $e=(e_1,\\ldots,e_n)$ is a basis in a finite dimensional vector space $V$ or more generally finite rank free module $M$ over a ring $R$ (defined in notebook 6), so every vector $v$ can be uniquely represented as a linear combination $v=\\sum_i\\alpha_i e_i=\\alpha_i e_i$, $\\ \\alpha_i\\in R$.\n",
"\n",
"
\n",
"\n",
"**Example 10.1**\n",
"\n",
"Define a basis in a 3-dimensional module over the symbolic ring `SR`."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\left(e_{0},e_{1},e_{2}\\right)\\)"
],
"text/latex": [
"$\\displaystyle \\left(e_{0},e_{1},e_{2}\\right)$"
],
"text/plain": [
"Basis (e_0,e_1,e_2) on the 3-dimensional vector space M over the Symbolic Ring"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"N=3 # dim. of the module M\n",
"%display latex\n",
"M = FiniteRankFreeModule(SR, 3, name='M') # module M\n",
"e = M.basis('e') ;e # basis of M"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"If $(e_1,\\ldots,e_n)$ is a basis we denote by $(e^1,\\ldots,e^n)$\n",
"the dual basis, i.e. the family of linear forms $M\\to R$, such that\n",
"$e^i(e_j)=\\delta_j^i=\n",
"\\begin{cases}\n",
" 1,& \\text{if } i=j,\\\\\n",
" 0, & \\text{otherwise.}\n",
"\\end{cases}\n",
"$\n",
"\n",
"
\n",
"\n",
"**Example 10.2**\n",
"\n",
"Let us define the dual basis to the basis from the previous example."
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\left(\\begin{array}{rrr}\n",
"1 & 0 & 0 \\\\\n",
"0 & 1 & 0 \\\\\n",
"0 & 0 & 1\n",
"\\end{array}\\right)\\)"
],
"text/latex": [
"$\\displaystyle \\left(\\begin{array}{rrr}\n",
"1 & 0 & 0 \\\\\n",
"0 & 1 & 0 \\\\\n",
"0 & 0 & 1\n",
"\\end{array}\\right)$"
],
"text/plain": [
"[1 0 0]\n",
"[0 1 0]\n",
"[0 0 1]"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# continuation\n",
"d=e.dual_basis()\n",
"matrix(N,N,lambda i,j:d[i](e[j])) # matrix of all e^i(e_j)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"### Elements of dual basis are coordinate functions\n",
"\n",
"
\n",
"\n",
"If $(e_1,\\ldots,e_n)$ is a basis and $(e^1,\\ldots,e^n)$ its dual basis, then for $w=\\alpha_je_j$ we have\n",
"\n",
"$$e^i(w)=e^i(\\alpha_je_j)=\\alpha_je^i(e_j)=\\alpha_j\\delta^i_j=\\alpha_i,$$ \n",
"\n",
"so the $i$-th element of the dual basis is the $i$-th coordinate function:\n",
"$$e^i(\\alpha_je_j)=\\alpha_i.$$\n",
"\n",
"
\n",
"\n",
"**Example 10.3**\n",
"\n",
"For example let us check the values of all elements of the dual basis $d=(e^0,e^1,e^2)$ on the vector \n",
"$w=\\alpha_0e_0+\\alpha_1e_1+\\alpha_2e_2$."
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle α_{0} e_{0} + α_{1} e_{1} + α_{2} e_{2}\\)"
],
"text/latex": [
"$\\displaystyle α_{0} e_{0} + α_{1} e_{1} + α_{2} e_{2}$"
],
"text/plain": [
"α0 e_0 + α1 e_1 + α2 e_2"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# continuation\n",
"al=var('α',n=N) #\\alpha+{Tab} \n",
"w=sum([al[k]*e[k] for k in range(N)]) # w=al_k*e_k\n",
"w.disp() # show w"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\left[α_{0}, α_{1}, α_{2}\\right]\\)"
],
"text/latex": [
"$\\displaystyle \\left[α_{0}, α_{1}, α_{2}\\right]$"
],
"text/plain": [
"[α0, α1, α2]"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"[d[i](w) for i in range(N)] # compute e^i(w) for i=0,1,2,"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"### Permutations\n",
"\n",
"
"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"By a **permutation** of a set $Y$ we mean a bijection $\\sigma: Y\\to Y$. In the sequel we will restrict ourselves to finite sets $Y=\\{1,2,\\ldots,k\\}.$ \n",
"In that case, the permutation is just the reordering $(1,2,\\ldots,k)\\to(\\sigma(1),\\sigma(2),\\ldots,\\sigma(k)).$ To define a permutation, it is sufficient to define the image $(\\sigma(1),\\sigma(2),\\ldots,\\sigma(k))$.\n",
"\n",
"
\n",
"\n",
"**Example 10.4**\n",
"\n",
"We can define a permutation of the set $(1,2,3)$ by its image $(p(1),p(2),p(3))$."
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle [2, 1, 3]\\)"
],
"text/latex": [
"$\\displaystyle [2, 1, 3]$"
],
"text/plain": [
"[2, 1, 3]"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"p = Permutation([2,1,3]);p # (1,2,3)->(2,1,3)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The action of $p$ on (1,2,3): "
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\left[2, 1, 3\\right]\\)"
],
"text/latex": [
"$\\displaystyle \\left[2, 1, 3\\right]$"
],
"text/plain": [
"[2, 1, 3]"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"a = [1,2,3] # a -sequence to permute\n",
"p.action(a) # permutation of a"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"### Sign of permutation\n",
"\n",
"
\n",
"\n",
"The permutations form a group if we define the multiplication as the composition: $\\sigma\\tau=\\sigma\\circ\\tau.$ The group of permutations of the set $\\{1,2,\\ldots,k\\}$ is usually denoted by ${S_k}$. \n",
"\n",
"An **inversion of a permutation** $\\sigma$ is a pair $(i, j)$ such that $i < j$\n",
" and $\\sigma(i) > \\sigma(j)$.\n",
"A permutation is **even** or **odd** depending on whether it is the product of an even or odd number of inversions. The **sign of a permutation** $\\sigma$, denoted by $\\mathrm{sign}(\\sigma)$ is defined to be +1 or -1 depending on whether the permutation is even or odd. The sign of permutations satisfies\n",
"\n",
"$$\\mathrm{sign}(\\sigma\\tau)=\\mathrm{sign}(\\sigma)\\mathrm{sign}(\\tau).$$\n",
"\n",
"
\n",
"\n",
"**Example 10.5**\n",
"\n",
"Let us compute for example the sign of the permutation $(4,2,1,3,5)$ of $(1,2,3,4,5)$."
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle 1\\)"
],
"text/latex": [
"$\\displaystyle 1$"
],
"text/plain": [
"1"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"p=Permutation([4,2,1,3,5])\n",
"sign(p)"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\left[\\left(1, 2\\right), \\left(1, 3\\right), \\left(1, 4\\right), \\left(2, 3\\right)\\right]\\)"
],
"text/latex": [
"$\\displaystyle \\left[\\left(1, 2\\right), \\left(1, 3\\right), \\left(1, 4\\right), \\left(2, 3\\right)\\right]$"
],
"text/plain": [
"[(1, 2), (1, 3), (1, 4), (2, 3)]"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# even number of inversions\n",
"p.inversions()"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle 4\\)"
],
"text/latex": [
"$\\displaystyle 4$"
],
"text/plain": [
"4"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"p.number_of_inversions()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"**Example 10.6**"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now let us list all permutations from $S_3$ and their signs."
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\left[\\left([1, 2, 3], 1\\right), \\left([1, 3, 2], -1\\right), \\left([2, 1, 3], -1\\right), \\left([2, 3, 1], 1\\right), \\left([3, 1, 2], 1\\right), \\left([3, 2, 1], -1\\right)\\right]\\)"
],
"text/latex": [
"$\\displaystyle \\left[\\left([1, 2, 3], 1\\right), \\left([1, 3, 2], -1\\right), \\left([2, 1, 3], -1\\right), \\left([2, 3, 1], 1\\right), \\left([3, 1, 2], 1\\right), \\left([3, 2, 1], -1\\right)\\right]$"
],
"text/plain": [
"[([1, 2, 3], 1),\n",
" ([1, 3, 2], -1),\n",
" ([2, 1, 3], -1),\n",
" ([2, 3, 1], 1),\n",
" ([3, 1, 2], 1),\n",
" ([3, 2, 1], -1)]"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"S3=Permutations(3).list() # S_3\n",
"[(p,sign(p)) for p in S3] # signs of all permutations from S_3"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"## Alternating forms\n",
"\n",
"
\n",
"\n",
"Let $M^k=M\\times\\dots\\times M,$ where $M$ is a vector space or a module. Recall that by a $k$-**linear form on $M$** (or covariant tensor of type $(0,k)$) we mean a function $t:\n",
"M^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 M.$$\n",
"\n",
"A $k$-**linear** form $t:M^k\\to R$ is **alternating** if it changes sign every time two of its variables are interchanged, that is, if\n",
"\n",
"$$t (v_1 , . . . , v_i , . . . , v_j , . . . , v_k ) = −t (v_1 , . . . , v_j , . . . , v_i , . . . , v_k ).$$\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let us recall that in the notebook 9a the $k$-linear forms on $M$ were called **covariant tensors from $T^{(0,k)}M$**.\n",
"\n",
"\n",
"In notations used by `SageMath` the module of alternating $k$-forms on a module $M$ is denoted by $\\Lambda^k(M^*)$ ( it is a submodule of $T^{(0,k)}M$).\n",
"\n",
"
\n",
"\n",
"**Example 10.7**\n",
"\n",
"Define a 3-linear form and alternating 3-form on a module M."
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Type-(0,3) tensor t on the 3-dimensional vector space M over the Symbolic Ring\n"
]
}
],
"source": [
"M = FiniteRankFreeModule(SR, 3, name='M') # module M of rank 3 over SR\n",
" # SR is a field, so M is vect.sp.\n",
"e = M.basis('e') # basis of M\n",
"t=M.tensor((0,3),name='t');print(t) # covariant tensor of type (0,3)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"For alternating forms we have a special command: `alternating_form`."
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\mbox{Alternating form of degree 3 on the 3-dimensional vector space M over the Symbolic Ring}\\)"
],
"text/latex": [
"$\\displaystyle \\mbox{Alternating form of degree 3 on the 3-dimensional vector space M over the Symbolic Ring}$"
],
"text/plain": [
"Alternating form of degree 3 on the 3-dimensional vector space M over the Symbolic Ring"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"a=M.alternating_form(3);a # alternating form on M"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"3rd exterior power of the dual of the 3-dimensional vector space M over the Symbolic Ring\n"
]
},
{
"data": {
"text/html": [
"\\(\\displaystyle \\Lambda^{3}\\left(M^*\\right)\\)"
],
"text/latex": [
"$\\displaystyle \\Lambda^{3}\\left(M^*\\right)$"
],
"text/plain": [
"3rd exterior power of the dual of the 3-dimensional vector space M over the Symbolic Ring"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# the mathematical object of which \"a\" is an element.\n",
"print(a.parent())\n",
"show(a.parent())"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"### Antisymmetrization operation\n",
"\n",
"
\n",
"\n",
"If $t$ is a covariant tensor from $T^{(0,k)}M$, then we can define an alternating $k$-form called Alt($t$) in the following way\n",
"\\begin{equation}\n",
"\\mathrm{Alt}(t)(v_1,\\ldots,v_k)=\\frac{1}{k!}\\sum_{\\sigma\\in S_k}\\mathrm{sign}(\\sigma)\\;t(v_{\\sigma(1)},\\ldots,v_{\\sigma(k)}),\n",
"\\label{}\\tag{10.1}\n",
"\\end{equation}\n",
"for $v_i\\in M$."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The antisymmetrization operation in SageMath Manifolds is accessible by the method \n",
"`antisymmetrize`.\n",
"\n",
"
\n",
"\n",
"**Example 10.8**\n",
"\n",
"Let us define a tensor of type $(0,2)$ on a 3-dimensional module $M$ and its antisymmetrization."
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"t: Type-(0,2) tensor on the 3-dimensional vector space M over the Symbolic Ring\n",
"ta: Alternating form of degree 2 on the 3-dimensional vector space M over the Symbolic Ring\n"
]
}
],
"source": [
"M = FiniteRankFreeModule(SR, 3, name='M') # module M of rank 3\n",
"e = M.basis('e') # basis of M\n",
"t = M.tensor((0,2)); print('t:',t) # tensor of type (0,2)\n",
"t[:] = [[1,-2,3], [4,5,6], [7,8,-9]]; # components of t\n",
"ta=t.antisymmetrize();print('ta:',ta) # antisymmetrization of t"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"In the next series of cells we try to show some details of the antisymmetrization operation Alt."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"**Example 10.9**\n",
"\n",
"If $k=2$ there are only two permutations in $S_k$, with signs +1, -1 so the sum from the antisymmetrization definition (10.1), applied to \n",
"$\\ t=t_{ij}e^i\\otimes e^j,\\ i,j=0,1\\ $ computed on the vectors $(v_0,v_1)=(e_0,e_1)$ reduces to\n",
"$\\frac{1}{2!}(t_{01}-t_{10})$.\n",
"\n",
"Define tensor $t$:"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle t_{00} e^{0}\\otimes e^{0} + t_{01} e^{0}\\otimes e^{1} + t_{02} e^{0}\\otimes e^{2} + t_{10} e^{1}\\otimes e^{0} + t_{11} e^{1}\\otimes e^{1} + t_{12} e^{1}\\otimes e^{2} + t_{20} e^{2}\\otimes e^{0} + t_{21} e^{2}\\otimes e^{1} + t_{22} e^{2}\\otimes e^{2}\\)"
],
"text/latex": [
"$\\displaystyle t_{00} e^{0}\\otimes e^{0} + t_{01} e^{0}\\otimes e^{1} + t_{02} e^{0}\\otimes e^{2} + t_{10} e^{1}\\otimes e^{0} + t_{11} e^{1}\\otimes e^{1} + t_{12} e^{1}\\otimes e^{2} + t_{20} e^{2}\\otimes e^{0} + t_{21} e^{2}\\otimes e^{1} + t_{22} e^{2}\\otimes e^{2}$"
],
"text/plain": [
"t00 e^0⊗e^0 + t01 e^0⊗e^1 + t02 e^0⊗e^2 + t10 e^1⊗e^0 + t11 e^1⊗e^1 + t12 e^1⊗e^2 + t20 e^2⊗e^0 + t21 e^2⊗e^1 + t22 e^2⊗e^2"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%display latex\n",
"N=3\n",
"Mo = FiniteRankFreeModule(SR, N, name='Mo') # 3-dim module M\n",
"e = Mo.basis('e') # basis of M\n",
"t=Mo.tensor((0,2)) # (0,2) type tensor\n",
"symb_mat=[[var('t'+str(i)+str(j))\n",
" for j in range(N)] for i in range(N)] # matrix of components\n",
"t[:]=symb_mat # define all components\n",
"t.disp() # show t"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"and list components of $t$ in the sum (10.1):"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\left[t_{01}, t_{10}\\right]\\)"
],
"text/latex": [
"$\\displaystyle \\left[t_{01}, t_{10}\\right]$"
],
"text/plain": [
"[t01, t10]"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"S2=Permutations(2).list() # list of perm.from S_2\n",
"[t(e[p[0]-1],e[p[1]-1]) for p in S2] # elements in the sum (10.1)\n",
"# permutations p[i] give numbers from {1,..,k}, \n",
"# we need indices from {0,..,k-1}, therefore we are subtracting 1"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Compute the sum from the definition (10.1) of antisymmetrization for $(v_0,v_1)=(e_0,e_1)$:"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\frac{1}{2} \\, t_{01} - \\frac{1}{2} \\, t_{10}\\)"
],
"text/latex": [
"$\\displaystyle \\frac{1}{2} \\, t_{01} - \\frac{1}{2} \\, t_{10}$"
],
"text/plain": [
"1/2*t01 - 1/2*t10"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"1/factorial(2)*sum([sign(p)*t(e[p[0]-1],e[p[1]-1]) for p in S2]) "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Check if SageMath Manifolds `antisymmetrize` gives the same result:"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\frac{1}{2} \\, t_{01} - \\frac{1}{2} \\, t_{10}\\)"
],
"text/latex": [
"$\\displaystyle \\frac{1}{2} \\, t_{01} - \\frac{1}{2} \\, t_{10}$"
],
"text/plain": [
"1/2*t01 - 1/2*t10"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ta=t.antisymmetrize()\n",
"ta(e[0],e[1])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"
\n",
"\n",
"**Example 10.10**\n",
"\n",
"Now let us check how the antisymmetrization works for covariant tensors from $T^{(0,3)}M$. We define symbolic 3-dimensional tables first.
"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\left[\\left[\\left[t_{000}, t_{001}, t_{002}, t_{003}\\right], \\left[t_{010}, t_{011}, t_{012}, t_{013}\\right], \\left[t_{020}, t_{021}, t_{022}, t_{023}\\right], \\left[t_{030}, t_{031}, t_{032}, t_{033}\\right]\\right], \\left[\\left[t_{100}, t_{101}, t_{102}, t_{103}\\right], \\left[t_{110}, t_{111}, t_{112}, t_{113}\\right], \\left[t_{120}, t_{121}, t_{122}, t_{123}\\right], \\left[t_{130}, t_{131}, t_{132}, t_{133}\\right]\\right], \\left[\\left[t_{200}, t_{201}, t_{202}, t_{203}\\right], \\left[t_{210}, t_{211}, t_{212}, t_{213}\\right], \\left[t_{220}, t_{221}, t_{222}, t_{223}\\right], \\left[t_{230}, t_{231}, t_{232}, t_{233}\\right]\\right], \\left[\\left[t_{300}, t_{301}, t_{302}, t_{303}\\right], \\left[t_{310}, t_{311}, t_{312}, t_{313}\\right], \\left[t_{320}, t_{321}, t_{322}, t_{323}\\right], \\left[t_{330}, t_{331}, t_{332}, t_{333}\\right]\\right]\\right]\\)"
],
"text/latex": [
"$\\displaystyle \\left[\\left[\\left[t_{000}, t_{001}, t_{002}, t_{003}\\right], \\left[t_{010}, t_{011}, t_{012}, t_{013}\\right], \\left[t_{020}, t_{021}, t_{022}, t_{023}\\right], \\left[t_{030}, t_{031}, t_{032}, t_{033}\\right]\\right], \\left[\\left[t_{100}, t_{101}, t_{102}, t_{103}\\right], \\left[t_{110}, t_{111}, t_{112}, t_{113}\\right], \\left[t_{120}, t_{121}, t_{122}, t_{123}\\right], \\left[t_{130}, t_{131}, t_{132}, t_{133}\\right]\\right], \\left[\\left[t_{200}, t_{201}, t_{202}, t_{203}\\right], \\left[t_{210}, t_{211}, t_{212}, t_{213}\\right], \\left[t_{220}, t_{221}, t_{222}, t_{223}\\right], \\left[t_{230}, t_{231}, t_{232}, t_{233}\\right]\\right], \\left[\\left[t_{300}, t_{301}, t_{302}, t_{303}\\right], \\left[t_{310}, t_{311}, t_{312}, t_{313}\\right], \\left[t_{320}, t_{321}, t_{322}, t_{323}\\right], \\left[t_{330}, t_{331}, t_{332}, t_{333}\\right]\\right]\\right]$"
],
"text/plain": [
"[[[t000, t001, t002, t003],\n",
" [t010, t011, t012, t013],\n",
" [t020, t021, t022, t023],\n",
" [t030, t031, t032, t033]],\n",
" [[t100, t101, t102, t103],\n",
" [t110, t111, t112, t113],\n",
" [t120, t121, t122, t123],\n",
" [t130, t131, t132, t133]],\n",
" [[t200, t201, t202, t203],\n",
" [t210, t211, t212, t213],\n",
" [t220, t221, t222, t223],\n",
" [t230, t231, t232, t233]],\n",
" [[t300, t301, t302, t303],\n",
" [t310, t311, t312, t313],\n",
" [t320, t321, t322, t323],\n",
" [t330, t331, t332, t333]]]"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%display latex\n",
"N=4 # dimension of module\n",
"symb_ten3=[[[var('t'+str(i0)+str(i1)+str(i2))\n",
" for i2 in range(N)] \n",
" for i1 in range(N)] \n",
" for i0 in range(N)] # components of t\n",
"symb_ten3 # show components"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Since $S_3$ contains 3!=6 elements, the sum from antisymmetrization definition (10.1) contains 6 summands."
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [],
"source": [
"# continuation\n",
"Mo = FiniteRankFreeModule(SR, N, name='Mo') # module Mo of dimension 4\n",
"e = Mo.basis('e') # basis of M\n",
"t = Mo.tensor((0,3), name='t') # tensor t of type (0,3)\n",
"t[:]=symb_ten3 # components of t\n",
"S3=Permutations(3).list() # permutation group S_3"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let us apply the antisymmetrization definition (10.1) for $(v_0,v_1,v_2)=(e_0,e_1,e_2)$."
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\frac{1}{6} \\, t_{012} - \\frac{1}{6} \\, t_{021} - \\frac{1}{6} \\, t_{102} + \\frac{1}{6} \\, t_{120} + \\frac{1}{6} \\, t_{201} - \\frac{1}{6} \\, t_{210}\\)"
],
"text/latex": [
"$\\displaystyle \\frac{1}{6} \\, t_{012} - \\frac{1}{6} \\, t_{021} - \\frac{1}{6} \\, t_{102} + \\frac{1}{6} \\, t_{120} + \\frac{1}{6} \\, t_{201} - \\frac{1}{6} \\, t_{210}$"
],
"text/plain": [
"1/6*t012 - 1/6*t021 - 1/6*t102 + 1/6*t120 + 1/6*t201 - 1/6*t210"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"1/factorial(3)*sum([sign(p)*t(e[p[0]-1],e[p[1]-1],e[p[2]-1]) for p in S3])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let us check what gives the `antisymmetrize` method:"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\frac{1}{6} \\, t_{012} - \\frac{1}{6} \\, t_{021} - \\frac{1}{6} \\, t_{102} + \\frac{1}{6} \\, t_{120} + \\frac{1}{6} \\, t_{201} - \\frac{1}{6} \\, t_{210}\\)"
],
"text/latex": [
"$\\displaystyle \\frac{1}{6} \\, t_{012} - \\frac{1}{6} \\, t_{021} - \\frac{1}{6} \\, t_{102} + \\frac{1}{6} \\, t_{120} + \\frac{1}{6} \\, t_{201} - \\frac{1}{6} \\, t_{210}$"
],
"text/plain": [
"1/6*t012 - 1/6*t021 - 1/6*t102 + 1/6*t120 + 1/6*t201 - 1/6*t210"
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ta=t.antisymmetrize()\n",
"ta(e[0],e[1],e[2])"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [],
"source": [
"#ta.antisymmetrize?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Note that in the above calculations we restricted ourselves to one component of the antisymmetrized tensor. \n",
"\n",
"To display the full result we need the notion of tensor and wedge products. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"### Reminder. Tensor product\n",
"\n",
"
\n",
"\n",
"Recall the definition (9.1a) of the tensor product\n",
"\n",
"For $\\ t\\in T^{(0,k)}M,\\,s\\in T^{(0,m)}M\\ $ we define the **tensor product** $\\ \\ t\\otimes s\\in T^{(0,k+m)}M$ by\n",
"\n",
"\\begin{equation}\n",
"(t ⊗ s )(v_1 ,\\ldots , v_{k+m} ) ≡ t (v_1 ,\\ldots, v_k ) s (v_{k+1} , . . . , v_{k+m} ),\n",
"\\tag{9.1a}\n",
"\\end{equation}\n",
"\n",
"for $v_1,\\ldots,v_{k+m}\\in M$."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"### Wedge product\n",
"\n",
"
\n",
"\n",
"Using the antisymmetrization operation Alt we can define the wedge product between alternating forms\n",
" $t ∈ \\Lambda^k(M^*)$ and $s ∈ \\Lambda^m(M^*)$, which gives\n",
" $t ∧ s ∈ \\Lambda^{k+m}(M^*)$ defined by\n",
"\\begin{equation}\n",
"t ∧ s =\\frac{(k + m)!}{k!m!}\\mathrm{Alt}(t ⊗ s).\n",
"\\label{}\\tag{10.2}\n",
"\\end{equation}\n",
"\n",
"
\n",
"\n",
"**Example 10.11** \n",
"\n",
"If $a,b\\in \\Lambda^1(M^*),$ then since $S_2$ contains only two permutations of opposite sign we see that Alt$(a\\otimes b)$ is equal to\n",
"$\\frac{1}{2!}(t\\otimes s -s\\otimes t)$ and $t\\wedge s=\\frac{(1+1)!}{1!1!}\\Big(\\frac{1}{2!}((t\\otimes s -s\\otimes t)\\Big)=t\\otimes s -s\\otimes t$."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"\n",
"One can prove that for $t\\in \\Lambda^k(M^*),s\\in\\Lambda^m(M^*),r\\in\\Lambda^l(M^*)$\n",
"\n",
"$$(t ∧ s) ∧ r = t ∧ (s ∧ r),$$\n",
"\n",
"(in notebook 14 we prove this for differential forms).\n",
"\n",
"Since the order of parentheses in that formula is not essential\n",
"we can replace both sides by $t\\wedge s\\wedge r$, analogously we can form the wedge products of larger number of forms: $t_1\\wedge\\ldots\\wedge t_i$."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"### Bases in the space of alternating forms $\\Lambda^k(M^*)$\n",
" \n",
"
\n",
" \n",
"To show concrete examples of alternating forms we will use bases in the spaces of alternating $k$-forms.\n",
"\n",
"If $e^1,\\ldots,e^n$ is a basis of $M^*$, then the set\n",
"\n",
"$$\n",
"\\{e^{i_1}\\wedge\\dots\\wedge e^{i_k}: 1\\leq i_1<\\ldots\n",
"\n",
"**Example 10.12**\n",
"\n",
"Take two 1-forms $a$ and $b$:"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle a_{0} e^{0} + a_{1} e^{1} + a_{2} e^{2}\\)"
],
"text/latex": [
"$\\displaystyle a_{0} e^{0} + a_{1} e^{1} + a_{2} e^{2}$"
],
"text/plain": [
"a0 e^0 + a1 e^1 + a2 e^2"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%display latex\n",
"M = FiniteRankFreeModule(SR, 3, name='M') # module M of dimension 3\n",
"e = M.basis('e') # basis of M\n",
"a=M.alternating_form(1) # 1-form a\n",
"b=M.alternating_form(1) # 1-form b\n",
"a[:]=var('a',n=3) # a0,a1,a2 # components of a\n",
"b[:]=var('b',n=3) # b0,b1,b2 # components of b\n",
"a.disp() # show a"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle M^*\\)"
],
"text/latex": [
"$\\displaystyle M^*$"
],
"text/plain": [
"Dual of the 3-dimensional vector space M over the Symbolic Ring"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# the mathematical object of which \"a\" is an element.\n",
"a.parent()"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\left[a_{0}, a_{1}, a_{2}\\right]\\)"
],
"text/latex": [
"$\\displaystyle \\left[a_{0}, a_{1}, a_{2}\\right]$"
],
"text/plain": [
"[a0, a1, a2]"
]
},
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"a[:] # comp. in the basis e"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle b_{0} e^{0} + b_{1} e^{1} + b_{2} e^{2}\\)"
],
"text/latex": [
"$\\displaystyle b_{0} e^{0} + b_{1} e^{1} + b_{2} e^{2}$"
],
"text/plain": [
"b0 e^0 + b1 e^1 + b2 e^2"
]
},
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"b.disp() # show b"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Compute the wedge product $a\\wedge b$:"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Alternating form of degree 2 on the 3-dimensional vector space M over the Symbolic Ring\n"
]
},
{
"data": {
"text/html": [
"\\(\\displaystyle \\left( -a_{1} b_{0} + a_{0} b_{1} \\right) e^{0}\\wedge e^{1} + \\left( -a_{2} b_{0} + a_{0} b_{2} \\right) e^{0}\\wedge e^{2} + \\left( -a_{2} b_{1} + a_{1} b_{2} \\right) e^{1}\\wedge e^{2}\\)"
],
"text/latex": [
"$\\displaystyle \\left( -a_{1} b_{0} + a_{0} b_{1} \\right) e^{0}\\wedge e^{1} + \\left( -a_{2} b_{0} + a_{0} b_{2} \\right) e^{0}\\wedge e^{2} + \\left( -a_{2} b_{1} + a_{1} b_{2} \\right) e^{1}\\wedge e^{2}$"
],
"text/plain": [
"(-a1*b0 + a0*b1) e^0∧e^1 + (-a2*b0 + a0*b2) e^0∧e^2 + (-a2*b1 + a1*b2) e^1∧e^2"
]
},
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"t=a.wedge(b);print(t) # wedge prod. a/\\b\n",
"t.disp() # show wedge prod."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let us check the result using the definition of wedge product."
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\left( -a_{1} b_{0} + a_{0} b_{1} \\right) e^{0}\\wedge e^{1} + \\left( -a_{2} b_{0} + a_{0} b_{2} \\right) e^{0}\\wedge e^{2} + \\left( -a_{2} b_{1} + a_{1} b_{2} \\right) e^{1}\\wedge e^{2}\\)"
],
"text/latex": [
"$\\displaystyle \\left( -a_{1} b_{0} + a_{0} b_{1} \\right) e^{0}\\wedge e^{1} + \\left( -a_{2} b_{0} + a_{0} b_{2} \\right) e^{0}\\wedge e^{2} + \\left( -a_{2} b_{1} + a_{1} b_{2} \\right) e^{1}\\wedge e^{2}$"
],
"text/plain": [
"(-a1*b0 + a0*b1) e^0∧e^1 + (-a2*b0 + a0*b2) e^0∧e^2 + (-a2*b1 + a1*b2) e^1∧e^2"
]
},
"execution_count": 30,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%display latex\n",
"tt=factorial(1+1)/factorial(1)/factorial(1)*(a*b).antisymmetrize()\n",
"tt.disp() # show the result of application of definition of a/\\b"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let us note that for 1-forms with components $a_0,a_1,a_2$ and $b_0,b_1,b_2$ the components of $a\\wedge b$ are just the minors of\n",
"$\\Big(\\begin{matrix}\n",
"a_0,a_1,a_2\\\\\n",
"b_0,b_1,b_2\n",
"\\end{matrix}\\Big).\n",
"$"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\left(\\begin{array}{rrr}\n",
"a_{0} & a_{1} & a_{2} \\\\\n",
"b_{0} & b_{1} & b_{2}\n",
"\\end{array}\\right)\\)"
],
"text/latex": [
"$\\displaystyle \\left(\\begin{array}{rrr}\n",
"a_{0} & a_{1} & a_{2} \\\\\n",
"b_{0} & b_{1} & b_{2}\n",
"\\end{array}\\right)$"
],
"text/plain": [
"[a0 a1 a2]\n",
"[b0 b1 b2]"
]
},
"execution_count": 31,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ma=matrix([a[:],b[:]]);ma # matrix with comp. of a and b as rows"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\left[-a_{1} b_{0} + a_{0} b_{1}, -a_{2} b_{0} + a_{0} b_{2}, -a_{2} b_{1} + a_{1} b_{2}\\right]\\)"
],
"text/latex": [
"$\\displaystyle \\left[-a_{1} b_{0} + a_{0} b_{1}, -a_{2} b_{0} + a_{0} b_{2}, -a_{2} b_{1} + a_{1} b_{2}\\right]$"
],
"text/plain": [
"[-a1*b0 + a0*b1, -a2*b0 + a0*b2, -a2*b1 + a1*b2]"
]
},
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ma.minors(2) # 2x2 minors of matrix ma"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"**Example 10.13**\n",
"\n",
"Let us compute the wedge product of three 1-forms in a 3-dimensional module."
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\left( -{\\left(a_{2} b_{1} - a_{1} b_{2}\\right)} c_{0} + {\\left(a_{2} b_{0} - a_{0} b_{2}\\right)} c_{1} - {\\left(a_{1} b_{0} - a_{0} b_{1}\\right)} c_{2} \\right) e^{0}\\wedge e^{1}\\wedge e^{2}\\)"
],
"text/latex": [
"$\\displaystyle \\left( -{\\left(a_{2} b_{1} - a_{1} b_{2}\\right)} c_{0} + {\\left(a_{2} b_{0} - a_{0} b_{2}\\right)} c_{1} - {\\left(a_{1} b_{0} - a_{0} b_{1}\\right)} c_{2} \\right) e^{0}\\wedge e^{1}\\wedge e^{2}$"
],
"text/plain": [
"(-(a2*b1 - a1*b2)*c0 + (a2*b0 - a0*b2)*c1 - (a1*b0 - a0*b1)*c2) e^0∧e^1∧e^2"
]
},
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"M = FiniteRankFreeModule(SR, 3, name='M') # module M of dimension 3\n",
"e = M.basis('e') # basis of M\n",
"d=e.dual_basis() # dual basis\n",
"a=M.alternating_form(1) # 1-form a\n",
"b=M.alternating_form(1) # 1-form b\n",
"c=M.alternating_form(1) # 1-form c\n",
"a[:]=var('a',n=3) # components of a\n",
"b[:]=var('b',n=3) # components of b\n",
"c[:]=var('c',n=3) # components of c\n",
"abc=(a.wedge(b)).wedge(c) # a/\\b/]c\n",
"abc.disp() # show abc"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\Lambda^{3}\\left(M^*\\right)\\)"
],
"text/latex": [
"$\\displaystyle \\Lambda^{3}\\left(M^*\\right)$"
],
"text/plain": [
"3rd exterior power of the dual of the 3-dimensional vector space M over the Symbolic Ring"
]
},
"execution_count": 34,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# the mathematical object of which \"abc\" is an element.\n",
"abc.parent()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can recognize in the result the Laplace expansion of the determinant det $\\left(\\begin{matrix}\n",
"a_0,a_1,a_2\\\\\n",
"b_0,b_1,b_2\\\\\n",
"c_0,c_1,c2\n",
"\\end{matrix}\\right),\n",
"$"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"so we obtain\n",
"$\\quad a\\wedge b\\wedge c=$\n",
"det $\\left(\\begin{matrix}\n",
"a_0,a_1,a_2\\\\\n",
"b_0,b_1,b_2\\\\\n",
"c_0,c_1,c2\n",
"\\end{matrix}\\right)\n",
"e^0\\wedge e^1\\wedge e^2.\n",
"$\n",
"\n",
"SageMath Manifolds also recognizes that equality:"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\mathrm{True}\\)"
],
"text/latex": [
"$\\displaystyle \\mathrm{True}$"
],
"text/plain": [
"True"
]
},
"execution_count": 35,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# compare abc and the 3-form with unique component equal to\n",
"# det of the matrix of coefficients of a,b,c\n",
"abc==det(matrix([a[:],b[:],c[:]]))*(d[0].wedge(d[1])).wedge(d[2])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"**Example 10.14**\n",
"\n",
"For alternating 2-forms the antisymmetry property $a(v_1,v_2)=-a(v_2,v_1)$ implies, that the corresponding component matrices must be antisymmetric, so only upper or lower triangles of the component matrices must be defined."
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\left(\\begin{array}{rrr}\n",
"0 & c_{0} & c_{1} \\\\\n",
"-c_{0} & 0 & c_{2} \\\\\n",
"-c_{1} & -c_{2} & 0\n",
"\\end{array}\\right)\\)"
],
"text/latex": [
"$\\displaystyle \\left(\\begin{array}{rrr}\n",
"0 & c_{0} & c_{1} \\\\\n",
"-c_{0} & 0 & c_{2} \\\\\n",
"-c_{1} & -c_{2} & 0\n",
"\\end{array}\\right)$"
],
"text/plain": [
"[ 0 c0 c1]\n",
"[-c0 0 c2]\n",
"[-c1 -c2 0]"
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"M = FiniteRankFreeModule(SR, 3, name='M') # module M of dimension 3\n",
"e = M.basis('e') # basis of M\n",
"c=var('c',n=3) # c_0,c_1,c_2\n",
"c=M.alternating_form(2) # 2-form\n",
"c[0,1]=c0; c[0,2]=c1; c[1,2]=c2 # components of 2-form\n",
"c[:] # show component matr."
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle a_{0} e^{0} + a_{1} e^{1} + a_{2} e^{2}\\)"
],
"text/latex": [
"$\\displaystyle a_{0} e^{0} + a_{1} e^{1} + a_{2} e^{2}$"
],
"text/plain": [
"a0 e^0 + a1 e^1 + a2 e^2"
]
},
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"a=M.alternating_form(1) # 1-form a\n",
"a[:]=var('a',n=3) # components of a\n",
"a.disp() # show a"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Compute \n",
"1-form times 2-form in 3-dimensional module:"
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\mbox{Alternating form of degree 3 on the 3-dimensional vector space M over the Symbolic Ring}\\)"
],
"text/latex": [
"$\\displaystyle \\mbox{Alternating form of degree 3 on the 3-dimensional vector space M over the Symbolic Ring}$"
],
"text/plain": [
"Alternating form of degree 3 on the 3-dimensional vector space M over the Symbolic Ring"
]
},
"execution_count": 38,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# continuation\n",
"ac=a.wedge(c);ac"
]
},
{
"cell_type": "code",
"execution_count": 39,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\left( a_{2} c_{0} - a_{1} c_{1} + a_{0} c_{2} \\right) e^{0}\\wedge e^{1}\\wedge e^{2}\\)"
],
"text/latex": [
"$\\displaystyle \\left( a_{2} c_{0} - a_{1} c_{1} + a_{0} c_{2} \\right) e^{0}\\wedge e^{1}\\wedge e^{2}$"
],
"text/plain": [
"(a2*c0 - a1*c1 + a0*c2) e^0∧e^1∧e^2"
]
},
"execution_count": 39,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ac.disp() # show ac"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let us apply the definition of wedge product for comparison."
]
},
{
"cell_type": "code",
"execution_count": 40,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\left( a_{2} c_{0} - a_{1} c_{1} + a_{0} c_{2} \\right) e^{0}\\wedge e^{1}\\wedge e^{2}\\)"
],
"text/latex": [
"$\\displaystyle \\left( a_{2} c_{0} - a_{1} c_{1} + a_{0} c_{2} \\right) e^{0}\\wedge e^{1}\\wedge e^{2}$"
],
"text/plain": [
"(a2*c0 - a1*c1 + a0*c2) e^0∧e^1∧e^2"
]
},
"execution_count": 40,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(factorial(3)/factorial(2)*(a*c).antisymmetrize()).disp()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"**Example 10.15**\n",
"\n",
"**Clarification of the factor $\\mathbf {\\frac{1}{k!m!}}$ in the wedge product definition**.\n",
"\n",
"Let us perform the wedge product between a 2-form and 3-form in 5-dimensional module."
]
},
{
"cell_type": "code",
"execution_count": 41,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle a_{12} e^{1}\\wedge e^{2} + a_{24} e^{2}\\wedge e^{4} + a_{35} e^{3}\\wedge e^{5}\\)"
],
"text/latex": [
"$\\displaystyle a_{12} e^{1}\\wedge e^{2} + a_{24} e^{2}\\wedge e^{4} + a_{35} e^{3}\\wedge e^{5}$"
],
"text/plain": [
"a12 e^1∧e^2 + a24 e^2∧e^4 + a35 e^3∧e^5"
]
},
"execution_count": 41,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# 2form times 3form in 5-dimensions\n",
"%display latex\n",
"var('a12,a24,a35') # symbolic components of 2-form w1\n",
"var('b123,b234,b345') # symbolic components of 3-form w2\n",
"V = FiniteRankFreeModule(SR,rank=5, name='V', start_index=1)\n",
"e = V.basis('e'); # basis of V\n",
"w1=V.alternating_form(2) # w1 is 2-form with\n",
"w1[1,2],w1[2,4],w1[3,5]=a12,a24,a35; # components a12,a24,a35\n",
"w2=V.alternating_form(3) # w2 is 3-form\n",
"w2[1,2,3],w2[2,3,4],w2[3,4,5]=b123,b234,b345; # with components\n",
" # b123,b234,b345\n",
"w1.display() # show w1"
]
},
{
"cell_type": "code",
"execution_count": 42,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle b_{123} e^{1}\\wedge e^{2}\\wedge e^{3} + b_{234} e^{2}\\wedge e^{3}\\wedge e^{4} + b_{345} e^{3}\\wedge e^{4}\\wedge e^{5}\\)"
],
"text/latex": [
"$\\displaystyle b_{123} e^{1}\\wedge e^{2}\\wedge e^{3} + b_{234} e^{2}\\wedge e^{3}\\wedge e^{4} + b_{345} e^{3}\\wedge e^{4}\\wedge e^{5}$"
],
"text/plain": [
"b123 e^1∧e^2∧e^3 + b234 e^2∧e^3∧e^4 + b345 e^3∧e^4∧e^5"
]
},
"execution_count": 42,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"w2.display() # show w2"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Here is the wedge product according to SageMath Manifolds:"
]
},
{
"cell_type": "code",
"execution_count": 43,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle a_{12} b_{345} e^{1}\\wedge e^{2}\\wedge e^{3}\\wedge e^{4}\\wedge e^{5}\\)"
],
"text/latex": [
"$\\displaystyle a_{12} b_{345} e^{1}\\wedge e^{2}\\wedge e^{3}\\wedge e^{4}\\wedge e^{5}$"
],
"text/plain": [
"a12*b345 e^1∧e^2∧e^3∧e^4∧e^5"
]
},
"execution_count": 43,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"w1.wedge(w2).display() # show w1/\\w2"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let us apply the definition of wedge product for comparison:"
]
},
{
"cell_type": "code",
"execution_count": 44,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle a_{12} b_{345} e^{1}\\wedge e^{2}\\wedge e^{3}\\wedge e^{4}\\wedge e^{5}\\)"
],
"text/latex": [
"$\\displaystyle a_{12} b_{345} e^{1}\\wedge e^{2}\\wedge e^{3}\\wedge e^{4}\\wedge e^{5}$"
],
"text/plain": [
"a12*b345 e^1∧e^2∧e^3∧e^4∧e^5"
]
},
"execution_count": 44,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"w=w1*w2\n",
"w0=factorial(2+3)/factorial(3)/factorial(2)*w.antisymmetrize()\n",
"w0.display()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"If we drop the factor $\\frac{1}{2!3!}$ and expand the sum from the antisymmetrization definition (cf. (10.1)) we obtain (the factor $(2+3)!$ is canceled by the factor $\\frac{1}{(2+3)!}$ from that definition): "
]
},
{
"cell_type": "code",
"execution_count": 45,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle 12 \\, a_{12} b_{345}\\)"
],
"text/latex": [
"$\\displaystyle 12 \\, a_{12} b_{345}$"
],
"text/plain": [
"12*a12*b345"
]
},
"execution_count": 45,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"S5=Permutations(5).list()\n",
"s0=sum([sign(p)*w1(e[p[0]],e[p[1]])*w2(e[p[2]],e[p[3]],e[p[4]])\n",
" for p in S5])\n",
"s0"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The last sum contains $2!\\cdot 3!=12$ repeated elements.\n",
"\n",
"Below we display all permutations from $S_5$ which give nonzero elements in the sum from the definition of wedge product. All mentioned permutations $p$ give the same result of\n",
"\n",
"$${\\rm{sign}}(p)\\,w_1(e_{p(0)},e_{p(1)})\\,w_2(e_{p(2)},e_{p(3)},e_{p(4)})$$\n",
"\n",
"equal to $\\ \\ a_{12}b_{345}:$"
]
},
{
"cell_type": "code",
"execution_count": 46,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\left[\\left[1, 2, 3, 4, 5, \\verb|---|, a_{12} b_{345}\\right], \\left[1, 2, 3, 5, 4, \\verb|---|, a_{12} b_{345}\\right], \\left[1, 2, 4, 3, 5, \\verb|---|, a_{12} b_{345}\\right], \\left[1, 2, 4, 5, 3, \\verb|---|, a_{12} b_{345}\\right], \\left[1, 2, 5, 3, 4, \\verb|---|, a_{12} b_{345}\\right], \\left[1, 2, 5, 4, 3, \\verb|---|, a_{12} b_{345}\\right], \\left[2, 1, 3, 4, 5, \\verb|---|, a_{12} b_{345}\\right], \\left[2, 1, 3, 5, 4, \\verb|---|, a_{12} b_{345}\\right], \\left[2, 1, 4, 3, 5, \\verb|---|, a_{12} b_{345}\\right], \\left[2, 1, 4, 5, 3, \\verb|---|, a_{12} b_{345}\\right], \\left[2, 1, 5, 3, 4, \\verb|---|, a_{12} b_{345}\\right], \\left[2, 1, 5, 4, 3, \\verb|---|, a_{12} b_{345}\\right]\\right]\\)"
],
"text/latex": [
"$\\displaystyle \\left[\\left[1, 2, 3, 4, 5, \\verb|---|, a_{12} b_{345}\\right], \\left[1, 2, 3, 5, 4, \\verb|---|, a_{12} b_{345}\\right], \\left[1, 2, 4, 3, 5, \\verb|---|, a_{12} b_{345}\\right], \\left[1, 2, 4, 5, 3, \\verb|---|, a_{12} b_{345}\\right], \\left[1, 2, 5, 3, 4, \\verb|---|, a_{12} b_{345}\\right], \\left[1, 2, 5, 4, 3, \\verb|---|, a_{12} b_{345}\\right], \\left[2, 1, 3, 4, 5, \\verb|---|, a_{12} b_{345}\\right], \\left[2, 1, 3, 5, 4, \\verb|---|, a_{12} b_{345}\\right], \\left[2, 1, 4, 3, 5, \\verb|---|, a_{12} b_{345}\\right], \\left[2, 1, 4, 5, 3, \\verb|---|, a_{12} b_{345}\\right], \\left[2, 1, 5, 3, 4, \\verb|---|, a_{12} b_{345}\\right], \\left[2, 1, 5, 4, 3, \\verb|---|, a_{12} b_{345}\\right]\\right]$"
],
"text/plain": [
"[[1, 2, 3, 4, 5, '---', a12*b345],\n",
" [1, 2, 3, 5, 4, '---', a12*b345],\n",
" [1, 2, 4, 3, 5, '---', a12*b345],\n",
" [1, 2, 4, 5, 3, '---', a12*b345],\n",
" [1, 2, 5, 3, 4, '---', a12*b345],\n",
" [1, 2, 5, 4, 3, '---', a12*b345],\n",
" [2, 1, 3, 4, 5, '---', a12*b345],\n",
" [2, 1, 3, 5, 4, '---', a12*b345],\n",
" [2, 1, 4, 3, 5, '---', a12*b345],\n",
" [2, 1, 4, 5, 3, '---', a12*b345],\n",
" [2, 1, 5, 3, 4, '---', a12*b345],\n",
" [2, 1, 5, 4, 3, '---', a12*b345]]"
]
},
"execution_count": 46,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# (shows only the nonzero elements of the sum of 5!=120 elements)\n",
"[[p[0],p[1],p[2],p[3],p[4],'---', \n",
" sign(p)*w1(e[p[0]],e[p[1]])*w2(e[p[2]],e[p[3]],e[p[4]])] \n",
" for p in S5 if (Set(range(1,3))==Set([p[0],p[1]]) and \n",
" Set(range(3,6))==Set([p[2],p[3],p[4]]))]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Thus the factor $\\frac{1}{k!m!}$ in the wedge product definition is reasonable. Some authors use different choices of this factor. We follow the SageMath Manifolds choice."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"### Abbreviated notations for $k$-forms\n",
"\n",
"
\n",
"\n",
"For arbitrary $k$-forms in $\\Lambda^k(M^*)$\n",
"sometimes we would not want to actually write out all the indices from (10.3), so\n",
"instead we will write\n",
"\\begin{equation}\n",
" α =\\sum_I a_I dx^I .\n",
"\\label{}\\tag{10.4}\n",
"\\end{equation}\n",
"Here the $I$ stands for the sequence of $k$ increasing indices $i_1 i_2 \\ldots i_k$: $1 ≤ i_1 < i_2 < \\ldots < i_k ≤ n$. That is, we sum over\n",
"$I ∈ J_{k,n} = \\{(i_1 i_2 \\ldots i_k ) : 1 ≤ i_1 < i_2 < \\ldots < i_k ≤ n\\}$ .
\n",
"\n",
"For example, for $k = 3$ and $n = 4$ we have $I\\in\\{123,124,134,234\\}.$
\n",
"\n",
"If $I$ and $J$ are disjoint then we have $dx^I ∧ dx^J = ±dx^K$ where $K = I ∪ J$ , but is reordered to be in increasing order.\n",
"Elements with repeated indices are dropped. Using this notation we can compute the wedge product as follows\n",
"\n",
"\\begin{equation}\n",
"\\Big(\\sum_I a_Idx^I\\Big)\\wedge\\Big(\\sum_J b_Jdx^J\\Big)=\n",
"\\sum_K\\Big(\\sum_{\\substack{I\\cup J=K\\\\I\\cap J=\\emptyset}}\\pm a_Ib_J\\Big)dx^K.\n",
"\\label{}\\tag{10.5}\n",
"\\end{equation}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
" \n",
" **Example 10.16**\n",
" \n",
" Let us demonstrate this method in the case of the wedge product of 2-form times 2-form in a four-dimensional module."
]
},
{
"cell_type": "code",
"execution_count": 47,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle f_{12} e^{1}\\wedge e^{2} + f_{13} e^{1}\\wedge e^{3} + f_{14} e^{1}\\wedge e^{4} + f_{23} e^{2}\\wedge e^{3} + f_{24} e^{2}\\wedge e^{4} + f_{34} e^{3}\\wedge e^{4}\\)"
],
"text/latex": [
"$\\displaystyle f_{12} e^{1}\\wedge e^{2} + f_{13} e^{1}\\wedge e^{3} + f_{14} e^{1}\\wedge e^{4} + f_{23} e^{2}\\wedge e^{3} + f_{24} e^{2}\\wedge e^{4} + f_{34} e^{3}\\wedge e^{4}$"
],
"text/plain": [
"f12 e^1∧e^2 + f13 e^1∧e^3 + f14 e^1∧e^4 + f23 e^2∧e^3 + f24 e^2∧e^4 + f34 e^3∧e^4"
]
},
"execution_count": 47,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"var('f12,f13,f14, f23, f24, f34') # variables for components of w1\n",
"var('g12,g13,g14, g23, g24, g34') # variables for components of w2\n",
" # module V of dimension 4:\n",
"V = FiniteRankFreeModule(SR,rank=4, name='V', start_index=1)\n",
"e = V.basis('e'); # basis of V\n",
"w1=V.alternating_form(2) # 2-form w1\n",
" # components of w1\n",
"w1[1,2],w1[1,3],w1[1,4],w1[2,3],w1[2,4],w1[3,4]=f12,f13,f14, f23, f24, f34\n",
"w2=V.alternating_form(2) # 2-form w2\n",
" # components of w2\n",
"w2[1,2],w2[1,3],w2[1,4],w2[2,3],w2[2,4],w2[3,4]=g12,g13,g14, g23, g24, g34\n",
"w1.display() # show w1"
]
},
{
"cell_type": "code",
"execution_count": 48,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle g_{12} e^{1}\\wedge e^{2} + g_{13} e^{1}\\wedge e^{3} + g_{14} e^{1}\\wedge e^{4} + g_{23} e^{2}\\wedge e^{3} + g_{24} e^{2}\\wedge e^{4} + g_{34} e^{3}\\wedge e^{4}\\)"
],
"text/latex": [
"$\\displaystyle g_{12} e^{1}\\wedge e^{2} + g_{13} e^{1}\\wedge e^{3} + g_{14} e^{1}\\wedge e^{4} + g_{23} e^{2}\\wedge e^{3} + g_{24} e^{2}\\wedge e^{4} + g_{34} e^{3}\\wedge e^{4}$"
],
"text/plain": [
"g12 e^1∧e^2 + g13 e^1∧e^3 + g14 e^1∧e^4 + g23 e^2∧e^3 + g24 e^2∧e^4 + g34 e^3∧e^4"
]
},
"execution_count": 48,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"w2.display() # show w2"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Computing the wedge product we use all possible strictly increasing and disjoint sequences $I=(i_1,i_2),\\quad J=(j_1,j_2),\\quad$ \n",
"$dx^K=e^1\\wedge e^2\\wedge e^3\\wedge e^4,\\quad$ $K=(1,2,3,4)$ is reordered disjoint union $I\\cup J$.\n",
"\n",
"In our example we take all possible 2-element increasing permutations of indices for the first form: \n",
"\n",
"$$I\\in \\{(1,2), (1,3), (1,4), (2,3), (2,4), (3,4)\\}$$\n",
"\n",
"The corresponding increasing $J$ satisfying $I\\cup J=\\{1,2,3,4\\}$ and $I\\cap J=\\emptyset$ are:\n",
"\n",
"$$J\\in \\{(3,4), (2,4), (2,3), (1,4), (1,3), (1,2)\\}$$\n",
"so, the wedge product is\n",
"$$(f_{12}g_{34}-f_{13}g_{24}+f_{14}g_{23}+f_{23}g_{14}-f_{24}g_{13}+f_{34}g_{12})e^1\\wedge e^2\\wedge e^3\\wedge e^4.$$\n",
"\n",
"The signs in the last result are the signs of the corresponding permutations:"
]
},
{
"cell_type": "code",
"execution_count": 49,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\left[1, -1, 1, 1, -1, 1\\right]\\)"
],
"text/latex": [
"$\\displaystyle \\left[1, -1, 1, 1, -1, 1\\right]$"
],
"text/plain": [
"[1, -1, 1, 1, -1, 1]"
]
},
"execution_count": 49,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"s=[[1,2,3,4],[1,3,2,4],[1,4,2,3],[2,3,1,4],[2,4,1,3],[3,4,1,2]]\n",
"[sign(Permutation(x)) for x in s] # list of signs of permut."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"SageMath Manifolds gives the sum in parentheses in reverse order:"
]
},
{
"cell_type": "code",
"execution_count": 50,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\\(\\displaystyle \\left( f_{34} g_{12} - f_{24} g_{13} + f_{23} g_{14} + f_{14} g_{23} - f_{13} g_{24} + f_{12} g_{34} \\right) e^{1}\\wedge e^{2}\\wedge e^{3}\\wedge e^{4}\\)"
],
"text/latex": [
"$\\displaystyle \\left( f_{34} g_{12} - f_{24} g_{13} + f_{23} g_{14} + f_{14} g_{23} - f_{13} g_{24} + f_{12} g_{34} \\right) e^{1}\\wedge e^{2}\\wedge e^{3}\\wedge e^{4}$"
],
"text/plain": [
"(f34*g12 - f24*g13 + f23*g14 + f14*g23 - f13*g24 + f12*g34) e^1∧e^2∧e^3∧e^4"
]
},
"execution_count": 50,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"w=w1.wedge(w2) # wedge product w1/\\w2\n",
"w.display() # show wedge product"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"\n",
"### Basic properties of the wedge product\n",
"\n",
"
\n",
"\n",
"**Multilinearity**\n",
"\n",
"For $\\alpha,\\alpha_1,\\alpha_2\\in \\Lambda^k(M^*),\\beta,\\beta_1,\\beta_2\\in \\Lambda^m(M^*)$ and $a\\in R$\n",
"\\begin{equation}\n",
"(\\alpha_1+\\alpha_2)\\wedge\\beta=\\alpha_1\\wedge\\beta+\\alpha_2\\wedge\\beta,\\\\\n",
"\\alpha\\wedge(\\beta_1+\\beta_2)=\\alpha\\wedge\\beta_1+\\alpha\\wedge\\beta_2,\\\\\n",
"(a\\alpha)\\wedge\\beta=a(\\alpha\\wedge\\beta)=\\alpha\\wedge(a\\beta).\n",
"\\label{}\\tag{10.6}\n",
"\\end{equation}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Associativity**\n",
"\n",
"For $\\alpha_i\\in \\Lambda^{k_i}(M^*)$\n",
"\n",
"\\begin{equation}\n",
"(\\alpha_1\\wedge \\alpha_2)\\wedge \\alpha_3=\\alpha_1\\wedge(\\alpha_2\\wedge \\alpha_3).\n",
"\\tag{10.7}\n",
"\\end{equation}\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Anticommutativity**\n",
"\n",
"If $t ∈ \\Lambda^k(M^*)$ and $s ∈ \\Lambda^m(M^*)$, then\n",
"\\begin{equation}\n",
"t ∧ s = (−1)^{km} s ∧ t.\n",
"\\label{}\\tag{10.8}\n",
"\\end{equation}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In the [notebook 14](https://nbviewer.org/github/sagemanifolds/IntroToManifolds/blob/main/14Manifold_Differential_Forms.ipynb) we will prove analogous properties in the case of differential forms."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## What's next?\n",
"\n",
"Take a look at the notebook [Vector fields](https://nbviewer.org/github/sagemanifolds/IntroToManifolds/blob/main/11Manifold_Vect_Fields.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
}