
4Vectors, Substituting Tensors


In Maple 17, it is possible to define a tensor with a tensorial equation, where the tensor being defined is on the lefthand side. Then, on the righthand side, you write either a tensorial expression with free and repeated indices, or a Matrix or Array with the components themselves. With the updated Physics, you can also define a 4Vector with a tensorial equation, where you indicate the vector's components on the righthand side as a list.
One new Library routine specialized for tensor substitutions was added to the Maple library: SubstituteTensor, which substitutes the equation(s) Eqs into an expression, taking care of the free and repeated indices, such that: 1) equations in Eqs are interpreted as mappings having the free indices as parameters, and 2) repeated indices in Eqs do not clash with repeated indices in the expression. This new routine can also substitute algebraic subexpressions of type product or sum within the expression, generalizing and unifying the functionality of the subs and algsubs commands for algebraic tensor expressions.


More Metrics in the Database of Solutions to Einstein's Equations


A database of solutions to Einstein's equations was added to the Maple library in Maple 15 with a selection of metrics from "Stephani, H.; Kramer, D.; MacCallum, M.; Hoenselaers, C.; and Herlt, E., Exact Solutions to Einstein's Field Equations" and "Hawking, Stephen; and Ellis, G. F. R., The Large Scale Structure of SpaceTime". More metrics from these two books were added for Maple 16 and Maple 17. These metrics can be searched using the command DifferentialGeometry:Library:MetricSearch, or directly using g_ (the Physics command representing the spacetime metric that also sets the metric to your choice).
• 
With the updated Physics, fifty more metrics are available in the database from Chapter 28 of the aformentioned book entitled "Exact Solutions to Einstein's Field Equations".

• 
It is now possible to list all the metrics of a chapter by indexing the metric command with the chapter's number, for example, entering g_["28"].



Commutators, AntiCommutators


When computing with products of noncommutative operators, the results depend on the algebra of commutators and anticommutators that you previously set. Besides that, in Physics, various mathematical objects themselves satisfy specific commutation rules. You can query about these rules using the Library commands Commute and Anticommute. Previously existing functionality and enhancements in this area were refined and implemented during 2013. Among them:
• 
Both Commutator and AntiCommutator now accept matrices as arguments.

• 
The AntiCommutator of products of fermionic operators  for instance annihilation and creation operators  is now derived automatically from the intrinsic anticommutation rules they satisfy.

• 
Commutators and Anticommutators of vectorial quantum operators , are now implemented and expressed using the dot (scalar) product, as in



New Enhanced Modes in Physics Setup


Four enhanced modes were added to the Physics setup. With these modes, you can:
3. 
Set Maple to take z and its conjugate, as independent variables and in equal footing; this is Wirtinger calculus.

These options combined provide flexibility, subsequently making the Physics environment more expressive.


Vectors Package


A number of changes were performed in the Vectors subpackage to make the computations more natural and versatile:
• 
You can now use geometrical coordinates indexed, as in , to represent mathematical objects unrelated to the coordinates themselves (in this case the spherical coordinate r). This is a more appropriate mimicry of the way we compute with paper and pencil.

• 
Integrate the Vectors package commands with assuming and accept a tensor with 1 index (of type Library:PhysicsType:Tensor, defined using Define) as a possible abstract representation of the kth component of a vector.

• 
When V is a vector of the Physics:Vectors package, make its absolute value , compute automatically using Physics:Vectors:Norm

• 
When is a quantum operator, Norm returns using Dagger instead of conjugate.

• 
Commutators and Anticommutators of vectorial quantum operators , are now implemented and expressed using the dot (scalar) product, as in

• 
New PhysicsVectors type in the Library of types Library:PhysicsTypes, in order to programmatically identify vectors of the Physics:Vectors package.

Two examples illustrating the use of the new capabilities in the context of a more general problem are found in the MaplePrimes posts Quantum Mechanics using Computer Algebra and Quantum Mechanics (II).


Library


Seventeen new commands, useful for programming and interactive computation, were added to the Physics:Library package. These are:
• 
Add unifies the standard add and sum commands using a more modern handling of arguments, free of premature evaluation problems, and brings new multiindex functionality.

• 
ApplyCommandUsingImplicitAssumptions applies any command to expressions containing sums, integrals or products such that the command is applied to the summand (integrand or 1st argument of the product) taking into account the assumptions implicit in the summation (integration or product) range.

• 
CombinePowersOfSameBase combines powers of the same base in products correctly handling the case of noncommutative products and powers, using Glauber's formula.

• 
FromTensorFunctionalForm is a generalization of the former FromGeneralRelativityTensorFunctionalForm command, that also handles user defined tensor functions.

• 
GetFAndDifferentiationVariables receives a derivative and returns a sequence with derivand and all the differentiation variables.

• 
GetReplacementIndices receives a list of indices of different kinds (spacetime, space, spinor, etc) and any other arguments and returns a list with new indices of the same kinds  useful for replacements  not present in the rest of the arguments.

• 
GetSymbolsWithSameType receives an expression x, of type commutative, anticommutative or noncommutative, and any other arguments, and returns symbols of the same type as x, and not present in the rest of arguments.

• 
GetTensorDependency gets the dependency of a given tensor; this dependency typically depends of the spacetime metric or on the way you defined the tensor using Define.

• 
GetTensorFunctionalForm is a generalization of the former GetGeneralRelativityTensorFunctionalForm command, that also handles user defined tensor functions.

• 
IsLiteralSubscript returns true or false according to whether a symbol s is of the form x__y, that is, it has the substring __ after the first or next characters and before the last one.

• 
IsRealObject returns true or false according to whether a mathematical expression, function or variable passed is known to be real, either because it was assumed to be real, or because it was set to be real using Setup and its realobjects keyword.

• 
RealObjects sets and unsets mathematical variables and functions as real, and answers queries about them.

• 
SortProducts sorts the operands of noncommutative products into any particular desired ordering while taking into account commutator and anticommutator algebra rules, such that the returned product is mathematically equivalent to the one received.

• 
SubstituteTensor substitutes equations into an expression, taking care of the free and repeated indices such that: 1) the substitution equations are interpreted as mappings having the free indices as parameters, and 2) repeated indices in the substitution equations do not clash with existing repeated indices in the target expression.

• 
ToContravariant and ToCovariant rewrite a given expression multiplying by the spacetime metric so that all of its free indices become respectively contravariant or covariant.

• 
ToTensorFunctionalForm reverses the operation performed by the new FromTensorFunctionalForm described above.



Miscellaneous


• 
Implement new PDEtools:dchange rules for changing variables in Bras Kets and Brackets of the Physics package

• 
Library:Degree can now compute the degree for noncommutative products Enhance PDEtools:Library:Degree and PDEtools:Coefficients, to work with Physics:`.` the same way it does with Physics:`*`

a. 
When the spacetime is Euclidean, there is no difference in value between the covariant and contravariant components of a tensor. Therefore, represent both with covariant indices making simplification and all manipulations simpler. This change affects the display of indices on the screen as well as the output of SumOverRepeatedIndices.

b. 
The dot product A . B of quantum operators A and B now returns as a (noncommutative) product A * B when neither A nor B involve Bras or Kets.

c. 
When A is a quantum operator (generic, Hermitian or unitary), the literal subscript object A__x is now considered an operator of the same kind.

d. 
Normal normalizes powers of the same base (including exponentials) by combining them. For example,

e. 
Normal normalizes noncommutative products by sorting objects that commute between themselves putting those that involve Dagger and conjugate to the left, more aligned with normal ordering in quantum field theories.

f. 
FeynmanDiagrams does not return any crossed propagators unless explicitly requested using the new option includecrossedpropagators. The former option, normalproducts, was renamed as externallegs.


