Physics[Setup]  set and query the computational environment for the Physics package commands

Calling Sequence


Setup( )
Setup(parameter)
Setup(parameter = value, other_options)


Parameters


parameter



(optional) name (can be the keyword query); query the value of the specified parameter

parameter = value



(optional) equation of the form name = value; set the value of one or many of the parameters of the computational environment

other_options



(optional) any of the keywords: advanced, additionally, clear, conventions, default, keywords, query, quiet, redo, readsetup, savesetup, deletesavedsetup





Description


•

The Setup command is used to set, clear and query the computational environment used by the commands of the Physics package. To avoid having to remember the relatively large number of parameters that can be set, if you type the parameter misspelled, or just a portion of it, a matching against the existing parameters is performed, and when there is only one match, the input is automatically corrected. For example, to see the list of settable parameters, enter Setup(keywords), or simply pass a portion of the word , such as Setup(k).

•

Alternatively, you can launch the graphical interface of the package, a setup applet, and set the values of these parameters directly from it. For this purpose, call Setup with no arguments, as in Setup(), and after closing the applet the entire setup will be returned on the screen as a list of equations with the keywords on the lefthand side and their values on the righthand side.

•

When called with the argument conventions, Setup displays a brief summary of the computational conventions used by the Physics and Physics[Vectors] packages.

•

A summary of the parameters that can be set, the corresponding values when Physics is loaded, and the expected types of new values when you set them by using Setup are as follows:

Parameter

Value

Expected type of new value




abbreviations

= true

truefalse

algebrarules

= none

set((Anti)Commutator = algebraic)

anticommutativeprefix

= none

{symbol, set(symbol)}

bracketbasis

= none

name

bracketrules

= none

set(Bracket(Bra, Ket) = algebraic)

combinepowersofsamebase

= false

truefalse

coordinatesystems

= none

{symbol, set(symbol)} # Capital letters only

Dgammarepresentation

= standard

identical(standard, chiral, Majorana)

differentiationvariables

= none

symbol # Capital letter

dimension

= 4

And(posint, satisfies(d > d > 1))

gaugeindices

= none

same as spacetimeindices

geometricdifferentiation

= false

truefalse

hermitianoperators

= none

{name, set(name)}

levicivita

= galilean

identical(galilean, nongalilean)

mathematicalnotation

= none

truefalse

metric

= Minkowski

<keyword, line_element, Matrix, set(nonzero components)>

noncommutativeprefix

= none

{name={algebraic, range}, set(name={algebraic, range})}

quantumbasisdimension

= none

{name, set(name)}

quantumcontinuousbasis

= none

{name, set(name)}

quantumdiscretebasis

= none

{name, set(name)}

quantumoperators

= none

{name, set(name)}

realobjects

= none

set(Or(name, function))

redefinesum

= false

truefalse

signature

= ``

identical(`+`, ``)

spacetimeindices

= greek

identical(greek, lowercaselatin, lowercaselatin_ah, lowercaselatin_is, uppercaselatin)

spaceindices

= none

same as spacetimeindices

spinorindices

= none

same as spacetimeindices

traceonlymatrices

= true

truefalse

unitaryoperators

= none

{name, set(name)}

usephysicsevaluator

= true

truefalse

usewirtingerderivatives

= false

truefalse

vectorpostfix

= none

symbol



•

Mathematical notation: in the standard GUI, when Physics is loaded and mathematicalnotation is set to true, anticommutative and noncommutative variables are displayed in different colors, mathematical functions are displayed in textbook notation, if Physics[Vectors] is loaded, nonprojected vectors and unit vectors are displayed with an arrow and a hat on top, respectively, the vectorial differential operators (Nabla, Curl, etc.) with an upside down triangle, and more. The same enhancement in the display is obtained by using the Options dialog (go to Tools > Options, select the Display tab, and set the Typesetting level to Extended; see also interface). The notational aspects related to the Physics package can be changed to some point; the corresponding starting and expected values are:

Parameter

Value

Expected type (for details see below)




anticommutativecolor

= purple

identical(none, symbol) # one of 16 colors

noncommutativecolor

= olive

identical(none, symbol) # one of 16 colors

unitvectordisplay

= hat

identical(none, hat)

vectordisplay

= arrow

identical(none, arrow, bold, halfarrow)



•

To set the values of these parameters (could be many at the same time), call the Setup command with equations having the parameter keywords on the righthand side, and their value on the righthand side. The output of Setup is a list of equations of the same kind, echoing the values set.

•

When setting values, some explanatory messages are frequently displayed on the screen. To avoid that verbosity (will not avoid the list output), use the optional argument quiet.

•

To query the current value of any of these parameters, enter Setup(parameter) or Setup(query, parameter), where parameter is one of the keywords in the first column above. Entering Setup(query) returns the current values for all of the parameters.

•

To clear the value of one or many of these parameters, pass the keyword clear together with the parameter(s) that you want to clear; the value is set to none.

•

For most parameters, when setting their values, their previous settings are not discarded. For example, when you set some symbols to represent quantum operators, the previous quantum operators remain set as such. When you want to set the value of a parameter and discard the previous setting, use the optional argument redo.

•

When setting a parameter automatically discards the previous setting, but you want to preserve that setting, use the optional argument additionally.

•

You can also load an advanced setup (available but not loaded automatically when you load Physics) and save the setup existing at any moment, so that the next time Physics is loaded, it automatically loads with the saved setup. For these purposes, call Setup with the optional argument advanced or savesetup, respectively. To restore the starting setup, enter Setup(default). These are the values loaded with the advanced setup:

Parameter

Advanced value



abbreviations

= true

algebrarules

= {_ = 0,


_ = 0,


_ = }

anticommutativeprefix

= {theta, Q}

bracketrules

=

coordinatesystems

= {X}

Dgammarepresentation

= standard

differentiationvariables

= [X]

dimension

= 4

gaugeindices

= uppercaselatin

hermitianoperators

= {R, P}

levicivita

= galilean

mathematicalnotation

= true

metric

= Minkowski

noncommutativeprefix

= {Z}

quantumcontinuousbasis

= {R, P}

quantumdiscretebasis

= {u}

quantumoperators

= none

signature

= ``

spacetimeindices

= greek

spinorindices

= lowercaselatin

usephysicsevaluator

= true

vectorpostfix

= _




The parameters of the computational environment



A description of the parameters and the setting action associated with each of them is as follows.


algebrarules



An equation with a Commutator or AntiCommutator on the lefthand side and an algebraic expression representing the result for that operation on the righthand side; or a set, list or Matrix of them.


The operands in the (Anti)Commutator on the lefthand side of the equations are expected to be names, functions, or indexed functions, in which case the indices and functionality will be taken as parameters of the operation and expected to appear when arguments are passed to perform the operation (see examples of this in Commutator). These are used by Commutator and AntiCommutator to return results accordingly. Tip: when setting algebra rules, use the inert forms %Commutator and %AntiCommutator instead of the active forms Commutator, AntiCommutator; this may help to prevent a premature evaluation of the Commutator or AntiCommutator.



anticommutativecolor



aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, or yellow.



anticommutativeprefix



Any valid sequence of characters.



bracketbasis



A name .



bracketrules



An equation with a Bracket on the lefthand side and an algebraic expression representing the result for that bracket (scalar product) on the righthand side.



combinepowersofsamebase



The default for this option is false. When set to true, combination of powers of the same base (in products of powers or of exponentials) happens automatically, including taking care of the cases where the exponents or the base are not commutative (e.g.: using Glauber's formula to combine exponentials).



coordinatesystems



Any of the keywords cartesian, cylindrical or spherical, or a capital letter, or a set of them.


Aliases are set by using the alias command so that the capital letter represents the sequence of associated coordinates, e.g., the lowercase letters postfixed with a positive integer ranging from 1 to the dimension. For example, coordinatesystems = X sets the alias , and sets . See also Coordinates



Dgammarepresentation



standard, chiral, or Majorana.


Sets the representation to be used for the Dirac matrices. Note: the representation depends on the dimension of spacetime, and for a dimension lower than 4, only the standard representation is implemented.



differentiationvariables



A capital letter, or a set of them.


Sets the default differentiation variables for the d_, D_ and d'Alembertian differentiation commands. These variables are automatically set when you define the first system of coordinates. If the setting for differentiationvariables is cleared (options clear, differentiationvariables), you can still use these three differentiation commands, provided you explicitly indicate the differentiation variables as a second argument.



dimension



A positive integer greater than 1.


Sets the dimension of the spacetime manifold. When this parameter is set, all of the definitions sensitive to the dimension are reset, such as aliases set by Coordinates, the representation for the Dirac matrices, and all tensor definitions introduced by Define. The behavior of the spacetime manifold depends also on the signature, which is another of the parameters that can be set (see below). As a shortcut, you can specify both the dimension and signature in one equation, with a list on the righthand side, as in , where is the dimension and is one of `+`, ``, representing the signature, associated with a Euclidean or Minkowski spacetime, respectively. For example, the default value when you load the Physics package is , representing a 3 + 1 Minkowski spacetime with signature (,,,+). Remark: the conventions for the dimension only affect the results of computations with objects defined by you using Define or known because they were defined automatically when Physics was loaded.



gaugeindices



greek, lowercaselatin, lowercaselatin_ah, lowercaselatin_is, or uppercaselatin.


Sets the identifier for gauge indices in that every index found in a tensor object defined by the Define command that has the gaugeindices prefix as a root and is followed by a positive integer will be interpreted as a gauge index.



hermitianoperators



A name, or a set of them.


Indicates that these names represent linear hermitian quantum operators, that is, they satisfy . This information is taken into account when computing, for example, the Dagger of the operator. When an operator is set to be Hermitian, it is also automatically set to be a noncommutative quantum operator (see quantumoperators below).



levicivita



Indicates that the LeviCivita (pseudo)tensor represents either the galilean totally antisymmetric symbol , whose components are all equal to 0, 1 or 1, or its generalization to curvilinear coordinates (see definition in LeviCivita).



mathematicalnotation



Provides a noticeable improvement in the display of expressions by using traditional mathematical notation for Physics objects. For example, vectors are displayed with an arrow on top, the vectorial differential operators (such as Nabla and Laplacian) are displayed with an upside down triangle, anti and noncommutative variables, and so quantum operators, are displayed in different colors, mathematical functions are displayed using textbook notation, and more. The same enhancement in the display can be obtained by using the Options dialog (go to Tools > Options, select the Display tab, and set the Typesetting level dropdown to Extended; see also interface). To change this mathematical notation to your preferred one, see anticommutativecolor, noncommutativecolor, and vectordisplay.



metric



<keyword, line_element, Matrix, set(nonzero components)>


Indicates the spacetime metric; instead of the word metric the lefthandside can also be the metric tensor itself, as in g_[mu, nu]. The righthandside can be a keyword, for instance any of arbitrary, Euclidean, Minkowski, Schwarzschild, Tolman or related to the metrics of Chapter 12 of "Exact Solutions of Einstein's Field Equations"  see references at the end. Note that you can pass the keyword incomplete or misspelled, in which case a searchtext is performed among the keywords understood by g_ and if a match is found the metric is set accordingly, or if many matches are found then corresponding information is displayed on the screen. See g_ for examples.


The righthandside in metric = ... or g[mu, nu] = ... can also be a line element, quadratic in the differentials of the coordinates (you need to set the Coordinates first), passed using either of d_ or %d_", e.g. as in d_(x), d_(y), or by concatenating d' with the coordinate, e.g. as in dx, dy, ...


Finally, the righthandside in metric = ... can also be a 2 x 2 symmetric Matrix, in which case Setup extracts from it the nonzero elements using ArrayElems and sets the metric with that information; or it can also be the set returned by ArrayElems itself.



noncommutativecolor



aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, or yellow.



noncommutativeprefix



Any valid sequence of characters; the same as anticommutativeprefix.



quantumcontinuousbasis



A name, or a set of them.


Bras and Kets labeled with this name will be considered state vectors of a continuous space of quantum states. This information is taken into account when computing Brackets and Projectors.



quantumdiscretebasis



A name, or a set of them; equivalent to quantumcontinuousbasis.


Indicates that Bras and Kets labelled with the given names belong to a discrete space of quantum states. However, unlike the quantumcontinuousbasis case, when the label (first argument) in a Bra or a Ket has not been set to represent a continuous or discrete space of states, it is assumed that it represents a discrete space.



quantumoperators



A name, or a set of them.


Indicates that these names represent linear quantum operators. This information is taken into account when computing Brackets and scalar products between these quantum operators and Bras or Kets.



realobjects



A name or a function, or set of them


To set and unset (when used together with the keyword clear) mathematical variables and functions as real, so that the is command, and through it the rest of the Maple library, take this property into account.



redefinesum



The default for this option is false. When set to true, the sum command is automatically redefined so that: a) it can perform multiindex summation (see the Add command of Physics Library) and b) it has not premature evaluation problems.



signature



This parameter is associated with a Euclidean or Minkowski spacetime manifold, respectively. See dimension above for details.



spacetimeindices



greek, lowercaselatin, lowercaselatin_ah, lowercaselatin_is, or uppercaselatin; the same as gaugeindices.


Sets the identifier for spacetime indices in that every index found in a tensor object defined by the Define command that has the spacetimeindices prefix as a root and is followed by a positive integer will be interpreted as a spacetime index.



spinorindices



greek, lowercaselatin, lowercaselatin_ah, lowercaselatin_is, or uppercaselatin; the same as spacetimeindices and gaugeindices.


Sets the identifier for spinor indices.



traceonlymatrices



The default value for this option is true, so that Trace considers scalars everything but the algebraic representation for Dirac (Dgamma) and Pauli (Psigma) matrices as tensors of one index, or objects explicitly of type matrix or Matrix (Array). The Maple 16 behavior, where everything but constants were considered traceable objects can be restored with the new Setup option traceonlymatrices = false (its default value is true). This permits using Trace more naturally in the typical case, which is the computation of traces of expressions involving Dirac matrices where the coefficients are not just constants.



unitaryoperators



A name, or a set of them.


Indicates that these names represent unitary quantum operators, that is, they satisfy . This information is taken into account when simplifying products of operators using the Simplify command. When an operator is set to be unitary, it is also automatically set to be a noncommutative quantum operator (see quantumoperators).



usephysicsevaluator



The default for this option is true, and so each pair of contracted tensor indices in a tensorial expression is automatically rewritten as one covariant and one contravariant. If you are handling tensorial expressions of thousands o terms and experience a slowdown in performance you can try changing this setting to false.



usewirtingerderivatives



The default for this option is false. When set to true, the differentiation rule of the six complex components abs, argument, conjugate, Im, Re and signum are redefined taking complex variables and their conjugates as independent and in equal footing.



vectordisplay



none, arrow, bold, or halfarrow.


When mathematicalnotation is set to true, the vectordisplay setting causes the Maple Standard GUI to display nonprojected vectors with an arrow or halfarrow on top, or in bold, as specified.



vectorpostfix



Any valid sequence of characters.


Sets the identifier for nonprojected 3D vectors of the Physics[Vectors] subpackage.





Compatibility


•

The Physics[Setup] command was updated in Maple 18.



Examples


>


 (1) 
>


 (2) 
Query the computational setup that is loaded with the Physics package.
>


 (3) 
Compute the Projector for a basis of state vectors that has not been set: it is assumed that the corresponding space is discrete.
>


 (4) 
Set a label for a continuous space of quantum states; note you do not need to remember the exact keyword to be used, the matching mechanism will also attempt to match a part of a keyword (returning a list of options when there is more than one partial match).
>


 (5) 
The corresponding projector is now a triple integral.
>


 (6) 
Note also the difference in behavior between computing the Bracket in state vectors of discrete and continuous spaces of states. Inert representations for these commands have % as a prefix, and the computation can then be performed by using the value command.
>


 (7) 
>


 (8) 
>


 (9) 
>


 (10) 
Let and represent "position" and "momentum" state vectors; their scalar product is unknown to the system.
>


 (11) 
Let their scalar product be the corresponding normalized plane wave (see references below).
>


 (12) 
To set the above as a rule when computing Brackets between the vectors and , use:
>


 (13) 
Now this rule is used automatically.
>


 (14) 
>


 (15) 
>


 (16) 
>


 (17) 
>


 (18) 
>


 (19) 
In the result above, to compute , the rule for has been used, but you can also state the rule for in addition to the rule for , by using the keyword additionally or stating the two rules at the same time.
A rule can have the same Bra and Ket in its definition and be given using inert commands (same command name preceded by %).
>


 (20) 
>


 (21) 
>


 (22) 
>


 (23) 
Define two quantum operators and a commutator algebra for them.
>


 (24) 
>


 (25) 
>


 (26) 
>


 (27) 
In the output of Setup(query), at the beginning, notice that there is no anticommutative prefix set. To work with anticommutative variables, set the prefix to be used to distinguish them; for example, set it to be theta.
>


 (28) 
Now theta alone, followed by a positive integer, or indexed as in where is any valid maple object, is interpreted as an anticommutative variable.
>


 (29) 
>


 (30) 
After loading the Physics package, you can use delay evaluation quotes to prevent the normalization of powers or products. Then simply execute the output again to evaluate.
>


 (31) 
>


 (32) 
The second mixed derivatives with respect to different anticommutative variables anticommute (note the use of %diff, which could be Diff, the inert representations for diff, turned active by using value).
>


 (33) 
>


 (34) 
Set the vectorpostfix identifier for nonprojected 3D vectors and load the Physics[Vectors] package.
>


 (35) 
>


 (36) 
So, in the framework of the Physics[Vectors] package, any symbol ending with the underscore is now interpreted as a nonprojected vector.
>


 (37) 
>


 (38) 
>


 (39) 
Changing the vectorpostfix; the matching mechanism is used to avoid typing the entire keyword.
>


 (40) 
Now, neither nor are vectors, and and are nonprojected vectors.
>


>


 (41) 
There is no representation attached to the Dirac matrices Dgamma, so the following command returns itself.
>


 (42) 
>


 (43) 
Set the Majorana representation for Dirac matrices.
>


 (44) 
In the Majorana representation implemented in Maple, all of the components of these matrices are purely imaginary.
>


 (45) 
Set a working 3D Euclidean space. The following command is equivalent to Setup(dimension = 3, signature = `+`).
>


 (46) 
Now define as an object having tensor properties; in addition, specify that has only one index.
>


 (47) 
Differentiate with respect to .
>


 (48) 
Because the dimension is equal to 3, this evaluates to:
>


 (49) 
or directly differentiate with respect to , so that:
>


 (50) 
What is known about ?
>


 (51) 
When changing the dimension in the middle of the session, the previous definitions set by Define are erased.
>


 (52) 
>


 (53) 
>


 (54) 
Setting the spacetime metric passing a keyword: it automatically sets the corresponding Coordinates accordingly, and returns the set of nonzero elements of the metric Matrix
>


 (55) 
To see the matrix form of the metric you can enter g_ without indices
>


 (56) 
When there is no exact match, a searchtext is performed against the keywords known, and if there is a single match, the metric is set accordingly
>


 (57) 
When there are many matches, the choices are displayed and you can choose
>


>


 (58) 
Setting the metric by passing the line element, as an expression quadratic in the differentials expressed using d_ or %d_. In order to use as a coordinate, clear first its anticommutative character
>


 (59) 
>


 (60) 
>


 (61) 
>


 (62) 
The Minkowski line element, expressing the differentials concatenating d to the coordinates
>


 (63) 
>


 (64) 
>


 (65) 
Setting the metric passing a Matrix or its nonzero components
>


 (66) 
>


 (67) 
>


 (68) 
By default, usephysicsevaluator is set to true so that contracted indices in tensorial expressions are automatically rewritten as one covariant one contravariant.
>


 (69) 
>


 (70) 
>


 (71) 
When the indices are already given as one covariant, one contravariant, they are not changed
>


 (72) 
If however you are working with tensorial expressions of thousands of terms and experience a slowdown in performance you can try setting the value to false
>


 (73) 
The indices now remain the way you enter them (to enter a contravariant index, prefix it with ~)
>


 (74) 
>


 (75) 
The combinepowersofsamebase keyword: its starting value is false
>


 (76) 
Activate the feature
>


 (77) 
From here on, powers of the same base are automatically combined when that is mathematically correct
>


 (78) 
The combination is valid for noncommutative provided that n and m commute. For exponentials, Glauber's formula is automatically taken into account. Set for instance A, B and C to be noncommutative operators, A and B to commute with C, and C equal to the commutator of A and B
>


 (79) 
Automatic combination of exponentials using Glauber's formula
>


 (80) 
Turn the feature OFF and expand the previous result:
>


 (81) 
>


 (82) 
>




See Also


Bra, Bracket, Conventions, Coordinates, d_, D_, dAlembertian, Define, Dgamma, g_, Ket, Physics, Physics conventions, Physics examples, Physics[`*`], Physics[.], Projector, Vectors


References



CohenTannoudji, C.; Diu, B.; and Laloe, F. Quantum Mechanics, Chapter II. Paris, France: Hermann, 1977.


Stephani, H., Kramer, D., MacCallum, M., Hoenselaers, C. Herlt, E. Exact Solutions of Einstein's Field Equations, Cambridge Monographs on Mathematical Physics, second edition. Cambridge University Press, 2003.


