DifferentialGeometry
Preferences
Calling Sequence
Parameters
Description
Details
Preferences(keyword)
Preferences(keyword, value)
keyword
-
a string, the name of the particular preference
value
the value to be assigned to the preference
This command allows the user to control various display conventions used by the DifferentialGeometry package; to specify the LaTeX formatting of DifferentialGeometry objects such as vectors, differential forms and tensors; and to specify how commonly used Maple commands are used internally by DifferentialGeometry procedures.
The following are the admissible keywords strings:
DisplayFrameDefinitions
ErrorInfoLevel
ErrorPrintLength
HistoryDepth
JetNotation
Keywords
PrettyPrint
PromptLength
SafeMode
Show
ShowFramePrompt
TensorDisplay
TeXBiformList
TeXFormList
TeXLineBreak
TeXPrintOrder
TeXVectorList
WedgeDisplay
dsolve
nullspace
pdsolve
rref
simplification
solve
The paragraphs below describes the use of each of these keywords.
This command is part of the DifferentialGeometry package, and so can be used in the form Preferences(...) only after executing the command with(DifferentialGeometry). It can always be used in the long form DifferentialGeometry:-Preferences.
"DisplayFrameDefinitions"
This preference controls what information is displayed when the command DGsetup is executed. When this preference is false, no display is displayed. When this preference is true, the names of the coordinate variables and the labels for the frame vectors and coframe 1-forms are displayed. The default preference is false.
with(DifferentialGeometry):
Preferences("DisplayFrameDefinitions");
false
DGsetup([x, y, z], E3);
frame name: E3
Preferences("DisplayFrameDefinitions", true);
The following coordinates have been protected:
x,y,z
The following vector fields have been defined and protected:
D_x,D_y,D_z
The following differential 1-forms have been defined and protected:
dx,dy,dz
"ErrorInfoLevel"
This preference controls the amount of information provided by an error message from a DifferentialGeometry command. The default for ErrorInfoLevel is 1.
"ErrorPrintLength"
For many of the error messages returned by the DifferentialGeometry commands, it is not necessary to display all the component information of the vectors, differential forms, and tensors provided as input. By suppressing the component information, the error messages are generally much easier to read. The ErrorPrintLength preference controls the number of components which will be displayed -- the first k components will be displayed if the sum of their lengths does not exceed the integer specified by the ErrorPrintLength preference. The length of each component is calculated using the Maple length command. The default value for this preference is 0 so that no component information is displayed. To display all component information, set this preference to infinity.
"HistoryDepth"
The Tools command CalculationHistory will store the results of certain critical intermediate computations which the user may wish to view. The HistoryDepth preference specifies the number of such computations to store. The default value for this preference is 10.
To illustrate this preference, we create a small procedure called Test and store some values calculated by this program using the CalculationHistory command.
Test := proc(n) local i; for i to n do Tools:-CalculationHistory:-Update("Test", [i, i^2]) od; n^2 end:
Run the program Test.
Test(25);
625
Retrieve the calculated values.
Tools:-CalculationHistory:-Get("Test");
25,625,24,576,23,529,22,484,21,441,20,400,19,361,18,324,17,289,16,256
Change the HistoryDepth preference to 3.
Preferences("HistoryDepth", 3);
10
Rerun the program Test and retrieve the calculated values. This time only 3 values are stored.
25,625,24,576,23,529
"JetNotation"
In the mathematical literature, there are two standard index notations for representing derivatives of a function. For example, if u = u(x, y) then we have:
JetNotation1: u[1] = u_x, u[2] = u_y, u[1, 1] = u_xx, u[1, 2] = u_xy, u[2, 2] = u_yy, u[1, 1, 1] = u_xxx, u[1, 1, 2] = u_xxy, u[1, 2, 2] = u_xyy, u[2, 2, 2] = u_yyy.
JetNotation2: u[1, 0] = u_x, u[0, 1] = u_y, u[2, 0] = u_xx, u[1, 1] = u_xy, u[0, 2] = u_yy, u[3, 0] = u_xxx, u[2, 1] = u_xxy, u[1, 2] = u_xyy, u[0, 3] = u_yyy.
The JetNotation preference determines which notation is used by the DifferentialGeometry package (and the JetCalculus subpackage). The default is JetNotation1.
Preferences("JetNotation");
JetNotation1
DGsetup([x,y], [u], Jet, 3, verbose);
x,y,u,u1,u2,u1,1,u1,2,u2,2,u1,1,1,u1,1,2,u1,2,2,u2,2,2
D_x,D_y,D_u,D_u1,D_u2,D_u1,1,D_u1,2,D_u2,2,D_u1,1,1,D_u1,1,2,D_u1,2,2,D_u2,2,2
dx,dy,du,du1,du2,du1,1,du1,2,du2,2,du1,1,1,du1,1,2,du1,2,2,du2,2,2
The following type [1,0] biforms have been defined and protected::
Dx,Dy
The following type [0,1] biforms (contact 1-forms) have been defined and protected::
Cu,Cu1,Cu2,Cu1,1,Cu1,2,Cu2,2,Cu1,1,1,Cu1,1,2,Cu1,2,2,Cu2,2,2
frame name: Jet
Preferences("JetNotation", "JetNotation2");
DGsetup([x, y], [u], Jet, 3, verbose);
x,y,u0,0,u1,0,u0,1,u2,0,u1,1,u0,2,u3,0,u2,1,u1,2,u0,3
D_x,D_y,D_u0,0,D_u1,0,D_u0,1,D_u2,0,D_u1,1,D_u0,2,D_u3,0,D_u2,1,D_u1,2,D_u0,3
dx,dy,du0,0,du1,0,du0,1,du2,0,du1,1,du0,2,du3,0,du2,1,du1,2,du0,3
Cu0,0,Cu1,0,Cu0,1,Cu2,0,Cu1,1,Cu0,2,Cu3,0,Cu2,1,Cu1,2,Cu0,3
"Keywords"
The option Keywords returns the list of all admissible keywords for the Preferences procedure.
Preferences("Keywords");
DisplayFrameDefinitions,ErrorInfoLevel,ErrorPrintLength,HistoryDepth,JetNotation,Macros,PrettyPrint,PromptLength,SafeMode,ShowFramePrompt,TeXBiformList,TeXFormList,TeXLineBreak,TeXPrintOrder,TeXVectorList,TensorDisplay,VectorDisplay,WedgeDisplay,dsolve,is,nullspace,pdsolve,rref,simplification,solve
"PrettyPrint"
With the PrettyPrint preference set to true, the components of vectors, differential forms and tensors are always displayed on the main text line -- they will not appear as numerators in fractions. This is somewhat easier to read but has the disadvantage that the resulting outline (for vectors and 1-forms) cannot be copied and pasted. The default for the PrettyPrint preference is false.
DGsetup([x, y, z], M):
Preferences("PrettyPrint");
X := evalDG(1/(x^2 + y^2)*dx &w dy - dx &w dz);
X≔dxx2+y2⁢⋀⁢dy−dx⁢⋀⁢dz
Preferences("PrettyPrint", true);
X≔1x2+y2⁢dx⁢⋀⁢dy−dx⁢⋀⁢dz
"PromptLength"
This preference specifies the maximum number of characters that will be displayed in the frame prompt.
DGsetup([x], Newton);
x
D_x
dx
frame name: Newton
Preferences("PromptLength", 4);
1000
"SafeMode"
With the SafeMode preference set to false, no global assignments are made for the coordinate vectors and 1-forms when the command DGsetup is called. Use this preference when writing programs in which temporary manifolds, Lie algebras, etc... need to be constructed. This will avoid introducing globals into the Maple namespace.
Preferences("SafeMode");
DGsetup([x], R1):
assigned(D_x), assigned(dx);
true,true
Now set the SafeMode preference to true. The names D_y and dy are not assigned nor are they protected.
Preferences("SafeMode", true);
DGsetup([y], R2):
y
vector,R2,,1,1
form,R2,1,1,1
assigned(D_y), assigned(dy);
D_y := 3;
D_y≔3
Note that the coordinate vectors and forms for the frame R2 can still be accessed using commands from the Tools subpackage. In SafeMode, the internal representations of DifferentialGeometry are displayed as output.
Tools:-DGvector(y);
Tools:-DGinfo("FrameBaseForms");
Preferences("SafeMode", false);
true
"Show"
The option Show returns the list of all the preference values.
Preferences("Show");
DisplayFrameDefinitions=true,ErrorInfoLevel=0,ErrorPrintLength=0,HistoryDepth=3,JetNotation=JetNotation2,Macros=off,PrettyPrint=true,PromptLength=4,SafeMode=false,ShowFramePrompt=true,TeXLineBreak=8,TeXPrintOrder=,TensorDisplay=0,VectorDisplay=0,WedgeDisplay=1,dsolve=dsolve,is=is,nullspace=LinearAlgebra:−NullSpace,pdsolve=pdsolve,rref=LinearAlgebra:−ReducedRowEchelonForm,simplification=DGsimp,solve=solve
"ShowFramePrompt"
With the ShowFramePrompt set to false, the standard Maple prompt will be used.
Preferences("ShowFramePrompt", false);
DGsetup([x, y], Gauss);
x,y
D_x,D_y
dx,dy
frame name: Gauss
LieBracket(D_x, x*D_y);
D_y
Notice that the prompt has remained the standard Maple prompt '>'.
Preferences("ShowFramePrompt", true);
Now the prompt contains the name of the current frame.
"TensorDisplay"
The preference TensorDisplay controls how the tensor product is displayed in Maple output. If this preference is 0, no symbol is printed; if this preference is 1, then '&t' is printed. The default TensorDisplay preference is 0.
alpha := evalDG(2*dx &t dy - dy &t dz);
α≔2⁢dx⁢dy−dy⁢dz
Preferences("TensorDisplay", 1);
0
alpha;
2⁢dx⁢⊗⁢dy−dy⁢⊗⁢dz
Preferences("TensorDisplay", 0);
1
"TeXFormList", "TeXVectorList", "TeXBiformList", "TeXPrintOrder", "TeXLineBreak"
These preferences control how the Maple latex command will TeX the components of a vector, differential form or tensor. These preferences must be set by the user for each frame.
DGsetup([x, y, z], M): DGsetup([x, y, z], N):
Specify the LaTeX representations for the frame [D_x, D_y, D_z] on M.
Preferences("TeXVectorList", M, ["\\partial_x", "\\partial_y", "\\partial_z"]);
\partial_x,\partial_y,\partial_z
Specify the LaTeX representations for the coframe [dx, dy, dz] on M.
Preferences("TeXFormList", M, ["dx", "dy", "d,z"]);
dx,dy,d,z
Specify the LaTeX representations for the frame [D_x, D_y, D_z] on N.
Preferences("TeXVectorList", N, ["\\frac{\\partial\\hfill}{\\partial_x}", "\\frac{\\partial\\hfill}{\\partial_y}", "\\frac{\\partial\\hfill}{\\partial_y}"]);
\frac{\partial\hfill}{\partial_x},\frac{\partial\hfill}{\partial_y},\frac{\partial\hfill}{\partial_y}
Specify the LaTeX representations for the coframe [dx, dy, dz] on N.
Preferences("TeXFormList", N, ["\\alpha", "\\beta", "\\gamma"]);
\alpha,\beta,\gamma
Define a vector X1 and a form alpha1 on M and convert to LaTeX.
ChangeFrame(M);
N
X1 := evalDG(3*D_x - D_y + z*D_z);
X1≔3⁢D_x−D_y+z⁢D_z
alpha1 := evalDG(y*dx - sin(z)*dy + (1/z)*dz);
α1≔y⁢dx−sin⁡z⁢dy+1z⁢dz
latex(X1);
3 \textit{D\_x} -\textit{D\_y} +z \textit{D\_z}
latex(alpha1);
y \mathit{dx} -\sin \! \left(z \right) \mathit{dy} +\left(\frac{1}{z}\right)_{} \mathit{dz}
Now LaTeX the same vector and form, but viewed as objects on N.
ChangeFrame(N);
M
X2 := evalDG(3*D_x - D_y + z*D_z);
X2≔3⁢D_x−D_y+z⁢D_z
alpha2 := evalDG(y*dx - sin(z)*dy + (1/z)*dz);
α2≔y⁢dx−sin⁡z⁢dy+1z⁢dz
latex(X2);
latex(alpha2);
The TeXPrintOrder preference allows the user to specify the ordering of components in the TeX representation of a vector, differential form, or tensor.
ChangeFrame(M):
Preferences("TeXPrintOrder", [dy, dz, dx]);
TensorOrder := evalDG([dx &t dx, dy &t dy, dz &t dz, dx &t dy, dx &t dz, dy &t dz]);
TensorOrder≔dx⁢dx,dy⁢dy,dz⁢dz,dx⁢dy,dx⁢dz,dy⁢dz
Preferences("TeXPrintOrder", TensorOrder);
2,3,1
T := evalDG(dx &t dy + dy &t dy);
T≔dx⁢dy+dy⁢dy
latex(T);
\mathit{dx} \mathit{dy} +\mathit{dy} \mathit{dy}
To LaTeX a vector or a form the TeXPrintOrder preference must now be reset. Often, the user may wish to insert the latex output into a LaTeX alignment environment. With the TeXLineBreak preference, a carriage return \' and alignment character & can be automatically placed.after any number of components.
Preferences("TeXLineBreak", [1]);
8
Preferences("TeXLineBreak", [1, 2]);
"WedgeDisplay"
The preference WedgeDisplay controls how the wedge product of differential forms is displayed in Maple output. If this preference is 0, no symbol is printed; if this preference is 1, a '^' is printed; and if the preference is 2, then '&w' is printed. The default WedgeDisplay preference is 1.
alpha := evalDG(2*dx &w dy - dy &w dz);
α≔2⁢dx⁢⋀⁢dy−dy⁢⋀⁢dz
Preferences("WedgeDisplay", 0);
2⁢dx⁢dy−dy⁢dz
Preferences("WedgeDisplay", 2);
2⁢dx⁢ &w ⁢dy−dy⁢ &w ⁢dz
"dsolve", "nullspace","pdsolve", "rref", "simplification", "solve"
These preferences allow the user to customize the procedures which will be used with DifferentialGeometry programs for dsolve, LinearAlgebra:-Nullspace, pdsolve, LinearAlgebra:-ReducedRowEchelonForm, simplify, and solve. Here is a simple example.
DGsetup([x], M);
frame name: M
ExteriorDerivative(sqrt(x^2));
csgn⁡x⁢dx
To obtain the simpler result dx, we can change the simplification command used by the DifferentialGeometry package. Call the new simplification command MySimplify and pass this procedure name to the Preferences. Then rerun the ExteriorDerivative command.
MySimplify := x -> simplify(x, symbolic);
MySimplify≔x↦simplify⁡x,symbolic
Preferences("simplification", MySimplify);
proclocaltmp,tmp2;tmp:=`simplify/nosize`⁡args,if⁡nargs=1,':-normalize_rational_funcs',NULL;ifhastype⁡tmp,'trig'thentmp2:=subs[eval]⁡cot=cos/sin,csc=1/sin,sec=1/cos,tan=sin/cos,coth=cosh/sinh,csch=1/sinh,sech=1/cosh,tanh=sinh/cosh,tmp;iflength⁡tmp2<=length⁡tmpthenreturntmp2end ifend if;returntmpend proc
See Also
Tools
CalculationHistory
DGsetup
evalDG
latex
Download Help Document