DifferentialGeometry Lessons
Lesson 3: Some DifferentialGeometry Utilities
Overview
DGinfo/CoefficientSet, DGinfo/CoefficientList
GetComponents
GenerateForms, GenerateTensors, GenerateSymmetricTensors
DGbasis
ComplementaryBasis
DualBasis
Annihilator
Exercises
DifferentialGeometry includes a powerful set of utilities for performing linear algebra computations on spaces of vectors, differential forms, and tensors (VFT).
In this lesson, you will learn to do the following:
Extract the set of coefficients of a DifferentialGeometry VFT.
Extract specific coefficients of a DifferentialGeometry VFT.
Determine if a given VFT is a linear combination of a set of VFT.
Create a spanning list of independent VFT (a basis) from a list of VFT.
Generate a basis for the space of p-forms.
Generate a collection of tensors.
Extend a given set of independent VFT to a basis for a subspace.
Find the dual basis for the cotangent space from a basis for the tangent space.
Find the annihilator subspace for a given set of vectors or forms.
The command DGinfo can be used to extract all or some of the coefficients of a vector, differential form or tensor. Exercises 11 illustrates the use of these commands in programming differential geometry applications.
with(DifferentialGeometry): with(Tools):
DGsetup([x, y ,z], "M");
frame name: M
Define a vector X = aD_x + bD_y + bD_z
X := evalDG(a*D_x + b*D_y + b*D_z);
X:=a⁢D_x+b⁢D_y+b⁢D_z
Find the set of coefficients of X.
DGinfo(X, "CoefficientSet");
a,b
Find the list of all coefficients of X.
DGinfo(X, "CoefficientList", "all");
a,b,b
Find the coefficients of D_x and D_y in X (Method 1).
DGinfo(X, "CoefficientList", [[1], [2]]);
Find the coefficients of D_x and D_y in X (Method 2).
DGinfo(X, "CoefficientList", [D_x, D_y]);
Define a type (1,1) tensor T.
T := evalDG(a*dx &t D_x + b*dy &t D_z + c*dz &t D_x);
T:=a⁢dx⁢D_x+b⁢dy⁢D_z+c⁢dz⁢D_x
Find the coefficient of dx D_x in T.
DGinfo(T, "CoefficientList", [[1, 1]]);
a
Find the coefficients of dy D_z and dz D_z in T.
DGinfo(alpha, "CoefficientList", [dy &tensor D_z, dz &tensor D_z]);
α
The command GetComponents provides a very useful set of procedures for determining if a given VFT or list of VFT can be expressed as a linear combination of a set of VFT.
DGsetup([x, y ,z], "M"):
Example 1. Express the vector X as a linear combination of the vectors in the list B. Check the result with DGzip.
X := evalDG(2*D_x + D_y - D_z);
X:=2⁢D_x+D_y−D_z
B := evalDG([D_x - D_y, D_y - D_z, D_z + D_x]);
B:=D_x−D_y,D_y−D_z,D_x+D_z
C := GetComponents(X, B);
C:=1,2,1
DGzip(C, B, "plus");
2⁢D_x+D_y−D_z
Example 2. GetComponents returns an empty list if the VFT is not a linear combination of the given list of VFT. For example, the 2-form alpha is not a linear combination of the 2-forms in the list S.
alpha := dy &wedge dz;
α:=dy⁢⋀⁢dz
S := [dx &wedge dy, dx &wedge dz];
S:=dx⁢⋀⁢dy,dx⁢⋀⁢dz
GetComponents(alpha, S);
Example 3. The first argument to GetComponents can also be a list of VFTs, in which case the list of lists of components is returned. In this example, we find all the components C of all the vectors in the basis A as linear combinations of the vectors in the basis B. We find the change of basis Matrix P relating the two bases A and B.
A := evalDG([D_x + D_y + 2*D_z, D_y + D_z, 2*D_z]);
A:=D_x+D_y+2⁢D_z,D_y+D_z,2⁢D_z
C := GetComponents(A, B);
C:=−1,0,2,−1,0,1,−1,−1,1
P := LinearAlgebra[Transpose](Matrix(C));
Example 4. With the optional argument method = "real", the GetComponents command will determine if the linear combination can be found with real numbers as coefficients -- (no functions allowed). Compare the results of the following commands.
GetComponents(x &mult D_x, [D_x]);
x
GetComponents(x &mult D_x, [D_x], method = "real");
GetComponents(x &mult D_x, [D_x, x &mult D_x, (x^2) &mult D_x], method = "real");
0,1,0
The utilities GenerateForms, GenerateTensors, GenerateSymmetricTensors are used to generate bases for different spaces of differential forms and tensors.
with(DifferentialGeometry): with(Tools): with(Tensor):
DGsetup([u, v, w, x, y], E5);
frame name: E5
Example 1. Define a list Omega of four 1-forms.
Omega := [du, dv, dw, dx];
Ω:=du,dv,dw,dx
Find a basis for the space of all 2-forms generated by Omega.
GenerateForms(Omega, 2);
du⁢⋀⁢dv,du⁢⋀⁢dw,du⁢⋀⁢dx,dv⁢⋀⁢dw,dv⁢⋀⁢dx,dw⁢⋀⁢dx
Find a basis for the space of all 4-forms generated by Omega.
GenerateForms(Omega, 4);
du⁢⋀⁢dv⁢⋀⁢dw⁢⋀⁢dx
Example 2. Find a basis for the space of all rank 3 tensors whose first components are taken from the list S1, whose second components come from S2 and whose third components come from S3.
S1 := [D_x, D_y];
S1:=D_x,D_y
S2 := [du, dv];
S2:=du,dv
S3 := [dw, dx];
S3:=dw,dx
GenerateTensors([S1, S2, S3]);
D_x⁢du⁢dw,D_x⁢du⁢dx,D_x⁢dv⁢dw,D_x⁢dv⁢dx,D_y⁢du⁢dw,D_y⁢du⁢dx,D_y⁢dv⁢dw,D_y⁢dv⁢dx
Example 3. Find a basis for the space of all rank 2 symmetric tensors generated by Omega.
GenerateSymmetricTensors(Omega, 2);
du⁢du,12⁢du⁢dv+12⁢dv⁢du,12⁢du⁢dw+12⁢dw⁢du,12⁢du⁢dx+12⁢dx⁢du,dv⁢dv,12⁢dv⁢dw+12⁢dw⁢dv,12⁢dv⁢dx+12⁢dx⁢dv,dw⁢dw,12⁢dw⁢dx+12⁢dx⁢dw,dx⁢dx
The utility DGbasis will select a maximal collection of independent VFT from a list of VFT. With method = "real", the program finds a maximal collection of independent VFT over the real numbers, otherwise independence is taken with respect to the ring of functions on the manifold.
with(DifferentialGeometry):
DGsetup([x, y, z], E3):
Example 1. The 2nd and 3rd vectors in S1 define a basis for the subspace spanned by the vectors in the list S1.
S1 := evalDG([D_x, 2*D_x, D_x - D_y, D_y]);
S1:=D_x,2⁢D_x,D_x−D_y,D_y
DGbasis(S1);
D_x,D_x−D_y
Example 2. Over the ring of functions, the 2nd and 3rd vectors in the list S2 are linearly dependent on the 1st vector. Over the real numbers, the vectors in S2 are linearly independent.
S2 := evalDG([D_x, x*D_x, x^2*D_x]);
S2:=D_x,x⁢D_x,x2⁢D_x
DGbasis(S2);
D_x
DGbasis(S2, method = "real");
D_x,x⁢D_x,x2⁢D_x
Let S1 be a subspace of S2 (a vector space of vectors, differential forms, or tensors) with basis B1 and B2 respectively. The command ComplementaryBasis calculates a complementary subspace C to S1 in S2, that is, S1 + C = S2 (direct sum). The vectors defining the basis for C are chosen from B2.
DGsetup([x, y, z, w], E4):
Example 1. To extend the set of basis vectors B1 to a basis for the span of B2, we need to include the vector D_w.
B1 := evalDG([D_x, D_y]);
B1:=D_x,D_y
B2 := [D_x, D_y, D_w];
B2:=D_x,D_y,D_w
ComplementaryBasis(B1, B2);
D_w
Example 2. We calculate a complement to the subspace of 2-forms spanned by B1 in the space of all 2-forms on E4.
B1 := [dx &wedge dy, dx &wedge dz, dx &wedge dw];
B1:=dx⁢⋀⁢dy,dx⁢⋀⁢dz,dx⁢⋀⁢dw
Omega := Tools:-DGinfo("FrameBaseForms");
Ω:=dx,dy,dz,dw
B2 := Tools:-GenerateForms(Omega, 2);
B2:=dx⁢⋀⁢dy,dx⁢⋀⁢dz,dx⁢⋀⁢dw,dy⁢⋀⁢dz,dy⁢⋀⁢dw,dz⁢⋀⁢dw
dy⁢⋀⁢dz,dy⁢⋀⁢dw,dz⁢⋀⁢dw
If X[i], i = 1 ... n is a basis for a vector space V, then the dual basis for the dual space V^* consists of the 1-forms theta[j], j = 1 ... n, satisfying theta[j](X[i]) = delta[i, j], where delta[i, j] is the Kronecker delta.
Example 1. The vectors in the list B define a basis for the tangent space to E3 at each point.
B := evalDG([D_x + D_y + D_z, D_y + D_z, D_z]);
B:=D_x+D_y+D_z,D_y+D_z,D_z
Calculate the basis Theta for the cotangent space which is dual to B.
Theta := DualBasis(B);
Θ:=dx,−dx+dy,−dy+dz
Let us check this result using the procedure Hook.
Matrix(3, 3, (i, j) -> Hook(B[i], Theta[j]));
Example 2. The command DualBasis can also be applied to a list of 1-forms. In this example, the dual basis to the 1-forms Theta are the vectors B we started with in Example 1.
DualBasis(Theta);
D_x+D_y+D_z,D_y+D_z,D_z
Let A be a set of vectors in a vector space V. Then the annihilating space B is the subspace of covectors alpha in the dual space V^* such that alpha(X) = 0 for all X in A. The dimension of B is dim(B) = dim(V) - dim(span(A)).
DGsetup([x, y, z, u, v], "M"):
Example 1. Find the annihilating subspace B to the set of vectors A and check the result.
A := [D_x, D_y];
A:=D_x,D_y
B := Annihilator(A);
B:=dv,du,dz
Matrix(2, 3, (i, j) -> Hook(A[i], B[j]));
Example 2. Find the annihilating subspace B to the set of 1-forms A.
A := evalDG([dx + dy, dy - du]);
A:=dx+dy,dy−du
B:=D_v,−D_x+D_y+D_u,D_z
Matrix(3, 2, (i, j) -> Hook(B[i], A[j]));
Exercise 1
For what values of the parameter a are the differential 1-forms in the set S linearly independent?
Hint: A list of 1-forms are independent if and only if the their wedge product is non-zero.
DGsetup([x, y, z, w], "M"):
S := evalDG([dx + a*dy, dx - a*dy + dz, dx + dy - a*dz]);
S:=dx+a⁢dy,dx−a⁢dy+dz,dx+dy−a⁢dz
Solution
Compute the wedge product of the forms in S (Method 1).
Omega := S[1] &wedge S[2] &wedge S[3];
Ω:=a−1+2⁢a2⁢dx⁢⋀⁢dy⁢⋀⁢dz
Compute the wedge product of the forms in S (Method 2).
Omega := DGzip(S, "wedge");
Get the coefficient of Omega, set it to zero, and solve for a.
Eq := Tools:-DGinfo(Omega, "CoefficientSet");
Eq:=a−1+2⁢a2
solve(Eq, {a});
a=12,a=−1
The 3 1-forms in the set S are linearly independent except when a = 1/2 and a = -1.
Exercise 2
Write a program ChangeCoefficient that will change the value of a prescribed coefficient in a vector, differential form, or tensor. Take as input for the program a VFT, a "monomial" VFT representing the term in the VFT that is to be changed, and the new value of the coefficient. Use your program to change the coefficient of dx^dz in Omega from 2 to K.
Omega := evalDG(dx &w dy + 2*dx &w dz + 3*dy &w dz);
Ω:=dx⁢⋀⁢dy+2⁢dx⁢⋀⁢dz+3⁢dy⁢⋀⁢dz
ChangeCoefficient := proc(X, T, a)
local b;
b := DifferentialGeometry:-Tools:-DGinfo(X, "CoefficientList", [T])[1];
X &plus ((a - b) &mult T);
end:
Example 1. Change the coefficient of dx^dz in Omega from 2 to K.
ChangeCoefficient(Omega, dx &wedge dz, K);
dx⁢⋀⁢dy+K⁢dx⁢⋀⁢dz+3⁢dy⁢⋀⁢dz
Example 2. Change the coefficient of dx dx D_y in T from 1 to 4.
T := evalDG(dx &t dy &t D_z + 2*dx &t dz &t D_x + 3*dy &t dz &t D_y);
T:=dx⁢dy⁢D_z+2⁢dx⁢dz⁢D_x+3⁢dy⁢dz⁢D_y
ChangeCoefficient(T, dx &t dx &t D_y, 4);
4⁢dx⁢dx⁢D_y+dx⁢dy⁢D_z+2⁢dx⁢dz⁢D_x+3⁢dy⁢dz⁢D_y
Exercise 3
[i] Express the vector field X as a linear combination of the vector fields B1. Check your result using DGzip.
X := evalDG(D_x + 3*D_y - D_z);
X:=D_x+3⁢D_y−D_z
B1 := evalDG([D_x - 2*D_y, D_y + D_z, D_x - D_y + 2*D_z]);
B1:=D_x−2⁢D_y,D_y+D_z,D_x−D_y+2⁢D_z
[ii] Express the differential 2-form alpha as a linear combination of the 2-forms B2. Check your result using DGzip.
alpha := evalDG(2*dx &w dy);
α:=2⁢dx⁢⋀⁢dy
B2 := evalDG([dx &w dy + dz &w dw, dx &w dz + dy &w dw, dx &w dw + dy &w dz, dx &w dy + dx &w dz, dx &w dz + dy &w dz, dy &w dz + dy &w dw]);
B2:=dx⁢⋀⁢dy+dz⁢⋀⁢dw,dx⁢⋀⁢dz+dy⁢⋀⁢dw,dx⁢⋀⁢dw+dy⁢⋀⁢dz,dx⁢⋀⁢dy+dx⁢⋀⁢dz,dx⁢⋀⁢dz+dy⁢⋀⁢dz,dy⁢⋀⁢dz+dy⁢⋀⁢dw
[iii] Express the rank 3 tensor T as a linear combination of the tensors B3. Check your result using DGzip.
T := evalDG(dx &t D_y &t D_z - dx &t D_z &t D_x + 2*dy &t D_z &t D_z - 2*dz &t D_z &t D_y);
T:=dx⁢D_y⁢D_z−dx⁢D_z⁢D_x+2⁢dy⁢D_z⁢D_z−2⁢dz⁢D_z⁢D_y
B3 := evalDG([dx &t D_y &t D_z - dz &t D_z &t D_y, dx &t D_z &t D_x + dz &t D_z &t D_y, dy &t D_z &t D_z]);
B3:=dx⁢D_y⁢D_z−dz⁢D_z⁢D_y,dx⁢D_z⁢D_x+dz⁢D_z⁢D_y,dy⁢D_z⁢D_z
C1 := GetComponents(X, B1);
C1:=7,11,−6
X &minus DGzip(C1, B1, "plus");
0⁢D_x
C2 := GetComponents(alpha, B2);
C2:=0,−1,0,2,−1,1
alpha &minus DGzip(C2, B2, "plus");
0⁢dx⁢⋀⁢dy
C3 := GetComponents(T, B3);
C3:=1,−1,2
T &minus DGzip(C3, B3, "plus");
0⁢dx⁢D_x⁢D_x
Exercise 4
Show that the vector X is a linear combination of the vectors with variable coefficients but not with constant coefficients.
DGsetup([x, y, z], "M"):
X := D_z;
X:=D_z
B := evalDG([x*D_x + y*D_y + z*D_z, x*D_y - y*D_x, x*D_z - z*D_x, z*D_y - y*D_z]);
B:=x⁢D_x+y⁢D_y+z⁢D_z,−y⁢D_x+x⁢D_y,−z⁢D_x+x⁢D_z,z⁢D_y−y⁢D_z
GetComponents(X, B);
zx2+y2+z2,−_t151,1⁢x2+y2⁢_t151,1+y+_t151,1⁢z2⁢zx⁢x2+y2+z2,x2+y2+y⁢_t151,1⁢x2+y3⁢_t151,1+y⁢_t151,1⁢z2x⁢x2+y2+z2,_t151,1
The presence of the parameter _t[1, 1] indicates that the vectors in B are not linearly independent and that X can be expressed in terms of the vectors in B in infinitely many ways.
To see if X is a constant coefficient linear combination of the vectors in B, use GetComponents with the option method = "real".
GetComponents(X, B, method = "real");
Exercise 5
Extend the set of 1 forms S to a basis for the cotangent space of M.
S := evalDG([dx - dy + dz, dy + dw]);
S:=dx−dy+dz,dy+dw
Use the ComplementaryBasis command with the standard basis for the cotangent space as the second argument.
C := ComplementaryBasis(S, [dx, dy, dz, dw]);
C:=dx,dy
The 1-forms S and C together form a basis for the cotangent space of M.
Exercise 6
Find a maximally independent set of VFT from each of the following lists of VFT.
[i]
B1 := evalDG([ D_x, D_y, D_z, D_z, D_y, D_w]);
B1:=D_x,D_y,D_z,D_z,D_y,D_w
[ii]
B2 := evalDG([D_x &t dx, D_y &t dy, D_x &t dx + D_y &t dy, D_y &t dx]);
B2:=D_x⁢dx,D_y⁢dy,D_x⁢dx+D_y⁢dy,D_y⁢dx
[iii] Most of the linear algebra utilities in DifferentialGeometry also work with Vectors and Matrices.
B3 := [Matrix([[1, 0], [0, 1]]), Matrix([[1, 2], [0, 1]]), Matrix([[1, 1], [0, 1]]), Matrix([[1, -1], [0, -1]])];
Part [i]
B1, DGbasis(B1);
D_x,D_y,D_z,D_z,D_y,D_w,D_x,D_y,D_z,D_w
Part[ii]
B2, DGbasis(B2);
D_x⁢dx,D_y⁢dy,D_x⁢dx+D_y⁢dy,D_y⁢dx,D_x⁢dx,D_y⁢dy,D_y⁢dx
Part[iii]
B3, DGbasis(B3);
Exercise 7
Show that the vectors in the list B are linearly independent over the real numbers but not over the ring of real-valued functions on M.
DGsetup([x, y], "M"):
B := evalDG([D_x, D_y, x*D_x, y*D_x, x*D_y, y*D_y]);
B:=D_x,D_y,x⁢D_x,y⁢D_x,x⁢D_y,y⁢D_y
Note that there are 6 vectors in the list B.
nops(B);
6
We apply the DGbasis procedure with the option method = "real".
C1 := DGbasis(B, method = "real");
C1:=D_x,D_y,x⁢D_x,y⁢D_x,x⁢D_y,y⁢D_y
nops(C1);
Since the number of vectors in B equals the number of vectors in C1, the vectors in B must be independent over the real numbers.
However, over the ring of functions, there are only two independent vectors.
C2 := DGbasis(B);
C2:=D_x,D_y
Exercise 8
a) Generate a basis of all 3-forms for the manifold N with coordinates z1, z2, z3, z4, z5.
b) Generate all symmetric rank 4 contravariant tensors for the manifold P with coordinates u, v.
c) Generate all type (2, 1) tensors (covariant rank 2, contravariant rank 1) which are skew-symmetric in the first two arguments for the manifold Q with coordinates x, y, z.
a)
with(DifferentialGeometry): with(Tools): DGsetup([z1, z2, z3, z4, z5], "N"):
Omega := DGinfo("FrameBaseForms");
Ω:=dz1,dz2,dz3,dz4,dz5
GenerateForms(Omega, 3);
dz1⁢⋀⁢dz2⁢⋀⁢dz3,dz1⁢⋀⁢dz2⁢⋀⁢dz4,dz1⁢⋀⁢dz2⁢⋀⁢dz5,dz1⁢⋀⁢dz3⁢⋀⁢dz4,dz1⁢⋀⁢dz3⁢⋀⁢dz5,dz1⁢⋀⁢dz4⁢⋀⁢dz5,dz2⁢⋀⁢dz3⁢⋀⁢dz4,dz2⁢⋀⁢dz3⁢⋀⁢dz5,dz2⁢⋀⁢dz4⁢⋀⁢dz5,dz3⁢⋀⁢dz4⁢⋀⁢dz5
b)
with(DifferentialGeometry): with(Tensor): DGsetup([u, v], "P"):
GenerateSymmetricTensors([D_u, D_v], 4);
D_u⁢D_u⁢D_u⁢D_u,14⁢D_u⁢D_u⁢D_u⁢D_v+14⁢D_u⁢D_u⁢D_v⁢D_u+14⁢D_u⁢D_v⁢D_u⁢D_u+14⁢D_v⁢D_u⁢D_u⁢D_u,16⁢D_u⁢D_u⁢D_v⁢D_v+16⁢D_u⁢D_v⁢D_u⁢D_v+16⁢D_u⁢D_v⁢D_v⁢D_u+16⁢D_v⁢D_u⁢D_u⁢D_v+16⁢D_v⁢D_u⁢D_v⁢D_u+16⁢D_v⁢D_v⁢D_u⁢D_u,14⁢D_u⁢D_v⁢D_v⁢D_v+14⁢D_v⁢D_u⁢D_v⁢D_v+14⁢D_v⁢D_v⁢D_u⁢D_v+14⁢D_v⁢D_v⁢D_v⁢D_u,D_v⁢D_v⁢D_v⁢D_v
c)
with(DifferentialGeometry): with(Tensor): DGsetup([x, y, z], "Q"):
T1 := GenerateSymmetricTensors([dx, dy, dz], 2);
T1:=dx⁢dx,12⁢dx⁢dy+12⁢dy⁢dx,12⁢dx⁢dz+12⁢dz⁢dx,dy⁢dy,12⁢dy⁢dz+12⁢dz⁢dy,dz⁢dz
T2 := [D_x, D_y, D_z];
T2:=D_x,D_y,D_z
GenerateTensors([T1, T2]);
dx⁢dx⁢D_x,dx⁢dx⁢D_y,dx⁢dx⁢D_z,12⁢dx⁢dy⁢D_x+12⁢dy⁢dx⁢D_x,12⁢dx⁢dy⁢D_y+12⁢dy⁢dx⁢D_y,12⁢dx⁢dy⁢D_z+12⁢dy⁢dx⁢D_z,12⁢dx⁢dz⁢D_x+12⁢dz⁢dx⁢D_x,12⁢dx⁢dz⁢D_y+12⁢dz⁢dx⁢D_y,12⁢dx⁢dz⁢D_z+12⁢dz⁢dx⁢D_z,dy⁢dy⁢D_x,dy⁢dy⁢D_y,dy⁢dy⁢D_z,12⁢dy⁢dz⁢D_x+12⁢dz⁢dy⁢D_x,12⁢dy⁢dz⁢D_y+12⁢dz⁢dy⁢D_y,12⁢dy⁢dz⁢D_z+12⁢dz⁢dy⁢D_z,dz⁢dz⁢D_x,dz⁢dz⁢D_y,dz⁢dz⁢D_z
Exercise 9
Find a complementary basis in the space of rank 3 contravariant tensors to the space of symmetric rank 3 contravariant tensors for the manifold P with coordinates u, v.
with(Tensor):
DGsetup([u, v], Q):
Omega := [du, dv]:
Use the GenerateSymmetricTensors command to find a basis for the rank 3 symmetric covariant tensors.
T1 := GenerateSymmetricTensors(Omega, 3);
T1:=du⁢du⁢du,13⁢du⁢du⁢dv+13⁢du⁢dv⁢du+13⁢dv⁢du⁢du,13⁢du⁢dv⁢dv+13⁢dv⁢du⁢dv+13⁢dv⁢dv⁢du,dv⁢dv⁢dv
Use the GenerateTensors command to find a basis for the rank 3 covariant tensors.
T2 := GenerateTensors([Omega, Omega, Omega]);
T2:=du⁢du⁢du,du⁢du⁢dv,du⁢dv⁢du,du⁢dv⁢dv,dv⁢du⁢du,dv⁢du⁢dv,dv⁢dv⁢du,dv⁢dv⁢dv
Answer := ComplementaryBasis(T1, T2);
Answer:=du⁢du⁢dv,du⁢dv⁢du,du⁢dv⁢dv,dv⁢du⁢dv
Exercise 10
Find the dual basis for each of the following. Check your result.
DGsetup([x, y, u, v], M):
A := evalDG([D_x + D_y + D_u + D_v, D_y + D_u + D_v, D_u + D_v, D_v]);
A:=D_x+D_y+D_u+D_v,D_y+D_u+D_v,D_u+D_v,D_v
B := evalDG([dx + dy, dy + du, du + dv, dv - dx]);
B:=dx+dy,dy+du,du+dv,−dx+dv
Answer1 := DualBasis(A);
Answer1:=dx,−dx+dy,−dy+du,−du+dv
Matrix(4, 4, (i, j) -> Hook(A[i], Answer1[j]));
Part [ii]
Answer2 := DualBasis(B);
Answer2:=12⁢D_x+12⁢D_y−12⁢D_u+12⁢D_v,−12⁢D_x+12⁢D_y+12⁢D_u−12⁢D_v,12⁢D_x−12⁢D_y+12⁢D_u+12⁢D_v,−12⁢D_x+12⁢D_y−12⁢D_u+12⁢D_v
Matrix(4, 4, (i, j) -> Hook(Answer2[i], B[j]));
Exercise 11
Write a program TestIndependence (without using DGbasis) that will return true if a given list of VFT are linearly independent and false otherwise.
This exercise introduces some important coding techniques which are used repeatedly in the DifferentialGeometry procedures and which are often needed to create new applications.
Hint: Use DGzip to form a VFT X from the given list with unknown coefficients. Extract the coefficients of X to obtain a set of equations Eq. Use LinearAlgebra:-GenerateMatrix to obtain the coefficient matrix A for the system of linear equations defined by Eq. Use LinearAlgebra:-Rank to calculate the rank of the matrix A.
Test you program on the list of vectors B1 and the list of 2-forms B2.
DGsetup([x, y, z], M);
B1 := evalDG([D_x - D_y, D_y + D_z, D_x - 2*D_y + 3*D_z]);
B1:=D_x−D_y,D_y+D_z,D_x−2⁢D_y+3⁢D_z
B2 := evalDG([dx &w dy, dx &w dz, dx &w dy + dz &w dx]);
B2:=dx⁢⋀⁢dy,dx⁢⋀⁢dz,dx⁢⋀⁢dy−dx⁢⋀⁢dz
TestIndependence := proc(VFTlist)
local A, X, n, vars, Eq, r, answer;
n := nops(VFTlist);
vars := [seq(_a||i, i = 1 .. n)];
X := DGzip(vars, VFTlist, "plus");
Eq := Tools:-DGinfo(X, "CoefficientSet");
A := LinearAlgebra:-GenerateMatrix(Eq, vars)[1];
r := LinearAlgebra:-Rank(A);
if r < n then answer := false else answer := true fi;
answer;
TestIndependence(B1);
true
TestIndependence(B2);
false
To watch the program at work, use the Maple debug command.
debug(TestIndependence);
TestIndependence
{--> enter TestIndependence, args = [_DG([[vector, M, []], [[[1], 1], [[2], -1]]]), _DG([[vector, M, []], [[[2], 1], [[3], 1]]]), _DG([[vector, M, []], [[[1], 1], [[2], -2], [[3], 3]]])]
n:=3
vars:=_a1,_a2,_a3
X:=_a3+_a1⁢D_x−2⁢_a3−_a2+_a1⁢D_y+3⁢_a3+_a2⁢D_z
Eq:=_a3+_a1,3⁢_a3+_a2,−2⁢_a3+_a2−_a1
r:=3
answer:=true
<-- exit TestIndependence (now at top level) = true}
There is one change in the program that should be made -- there is no assurance that the variables _a1, _a2, _a3 are not defined by the user, in which case, the program will not work. We can avoid this problem by using a little utility program from the Maple tools package. This program is guaranteed to generate a sequence of unassigned names.
`tools/_Qn`(p,[],4);
p1,p2,p3,p4
p1 := 3: p5 := 0:
p2,p3,p4,p6
Therefore the line vars := [seq(_a||i, i = 1 .. n)]; should be replaced by vars := [`tools/_Qn`(_a, [], n)].
Exercise 12
A p-form omega is called decomposable if it is the wedge product of p 1-forms. If we define A = {X : Hook(X, omega) = 0}, then it is not difficult to prove that omega is decomposable if and only if dim(A) = n - p, where n is the dimension of the ambient manifold. The space A is called the retracting space for omega. Moreover, if omega is decomposable, then it is a multiple of the wedge product of the 1-forms in Annihilator(A). (See Hook, Annihilator)
[i] Write a program RetractingSpace that will compute the retracting space for a p-form omega.
Hint: Follow Example 11 and use LinearAlgebra:-NullSpace.
[ii] Write a program DecomposeForm that will determine if a p-form is decomposable and, if so, return a list of p 1-forms whose wedge product is the given p-form. If the form is not decomposable return an empty list.
Test your programs on the forms alpha, beta, theta.
DGsetup([x, y, z, u, v], M):
alpha := dx &wedge dy &wedge dz;
α:=dx⁢⋀⁢dy⁢⋀⁢dz
beta := evalDG(dx &w dy + du &w dv);
β:=dx⁢⋀⁢dy+du⁢⋀⁢dv
theta := evalDG(9*dx &w dy &w du - 13*dx &w dy &w dv + 5*dx &w du &w dv + 2*dy &w du &w dv);
θ:=9⁢dx⁢⋀⁢dy⁢⋀⁢du−13⁢dx⁢⋀⁢dy⁢⋀⁢dv+5⁢dx⁢⋀⁢du⁢⋀⁢dv+2⁢dy⁢⋀⁢du⁢⋀⁢dv
RetractingSpace := proc(omega0)
local omega, A, X, n, vars, alpha, Eq, B, N, p, C, c, i;
omega := evalDG(omega0);
A := Tools:-DGinfo("FrameBaseVectors");
n := Tools:-DGinfo("FrameBaseDimension");
vars := [`tools/_Qn`(_a,[],n)];
X := DGzip(vars, A,"plus");
alpha := Hook(X, omega);
Eq := Tools:-DGinfo(alpha, "CoefficientSet");
B := LinearAlgebra:-GenerateMatrix(Eq, vars)[1];
N := LinearAlgebra:-NullSpace(B);
p := nops(N);
C := Array(1 .. p);
for i to p do
c := convert(N[i], list);
C[i] := DGzip(c, A, "plus");
od;
convert(C, list);
DecomposeForm := proc(omega0)
local A, omega, n, p, q, B, C, alpha, Eq, soln, newC1, k;
p := Tools:-DGinfo(omega, "FormDegree");
A := RetractingSpace(omega);
q := nops(A);
if q <> n - p then return [] fi;
B := Tools:-DGinfo("FrameBaseForms");
C := Annihilator(A, B);
alpha := k &mult DGzip(C, "wedge");
Eq := Tools:-DGinfo(omega0 &minus alpha, "CoefficientSet");
soln:= solve(Eq, {k});
newC1 := eval(k &mult C[1], soln);
[newC1, op(C[2 .. -1])];
Example 1.
alpha;
dx⁢⋀⁢dy⁢⋀⁢dz
RetractingSpace(alpha);
D_v,D_u
DecomposeForm(alpha);
−dy,dx,dz
Example 2.
beta;
dx⁢⋀⁢dy+du⁢⋀⁢dv
RetractingSpace(beta);
D_z
DecomposeForm(beta);
Example 3.
theta;
9⁢dx⁢⋀⁢dy⁢⋀⁢du−13⁢dx⁢⋀⁢dy⁢⋀⁢dv+5⁢dx⁢⋀⁢du⁢⋀⁢dv+2⁢dy⁢⋀⁢du⁢⋀⁢dv
RetractingSpace(theta);
−29⁢D_x+59⁢D_y+139⁢D_u+D_v,D_z
F := DecomposeForm(theta);
F:=−9⁢dx−2⁢dv,132⁢dx+du,52⁢dx+dy
theta &minus DGzip(F, "wedge");
0⁢dx⁢⋀⁢dy⁢⋀⁢dz
Download Help Document