This post aims at summarizing the developments of the last 12 months of the Physics package, which were focused on: Vector Analysis, symbolic Tensor manipulations, Quantum Mechanics, and General Relativity including a new Tetrads subpackage. Besides that, there is a new command, Assume with valuable new features, and a new computing modality: automaticsimplification, as well as an enlargement of the database of solutions to Einstein's equations with more than 100 new metrics. As is always the case, there is still a lot more to do, of course. But It has been an year of tremendous developments, worth recapping.
I would also like to acknowledge and specially thank Pascal Szriftgiser, Directeur de recherche CNRS from the "Laboratoire de Physique des Lasers Atomes et Molécules" (Lille, France), and Denitsa Staicova from the Bulgarian Academy of Science, "Institute for Nuclear Research and Nuclear Energy", for their constant, constructive and valuable feedback along the year, respectively in the areas of Quantum Mechanics and General Relativity. Thanks also to all of you who reported bugs and emailed suggestions as physics@maplesoft.com; this kind of feedback is a pillar of the development of this Physics project. As usual, the latest version of the package including the developments mentioned below can be downloaded from the Maple Physics: Research and Development web site. Some examples illustrating the use of the new capabilities in the context of more general problems are found in the 2014 MaplePrimes post Computer Algebra for Theoretical Physics. (At the end of this post there are two links: a pdf file with all the sections open, and this worksheet itself for whoever wants to play around).

Simplification


Simplification is perhaps the most common operation performed in a computer algebra system. In Physics, this typically entails simplifying tensorial expressions, or expressions involving noncommutative operators that satisfy certain commutator/anticommutator rules, or sums and integrals involving quantum operators and Dirac delta functions in the summands and integrands. Relevant enhancements were introduced for all these cases, including enhancements in the simplification of:
• 
Products of LeviCivita tensors in curved spacetimes when LeviCivita represents the Galilean pseudotensor (related to Setup(levicivita = Galilean) ), instead of its generalization to curved spaces (related to Setup(levicivita = nongalilean) ).

• 
Tensorial expressions in general that have spacetime, space, and/or tetrad contracted indices, possibly at the same time.

• 
New option tryhard, that resolves zero recognition in an important number of nontrivial situations.

• 
Expressions involving the Dirac function.

• 
Vectorial expressions involving cylindrical or spherical coordinates and related unit vectors.

• 
Expressions simplified with respect to side relations (equations) in the presence of quantum vectorial equations.

• 
Expressions involving products of quantum operators entering parameterized algebra rules.

• 
Expressions involving vectorial quantum operators simplified with respect to other vectorial equations.

• 
Add support for the simplification and integration of spherical harmonics ( SphericalY ) relevant in quantum mechanics.



Tensors


A number of relevant changes happened in the tensor routines of the Physics package, towards making the routines pack more functionality, the simplification more powerful, and the handling of symmetries, substitutions, and other operations more flexible and natural.
• 
Physics now works with four kinds of Minkowski spaces (different signatures) to accommodate the typical situations seen in textbooks; to these, correspond the signatures +, +, +++ and +++.

• 
Allow setting the metric by specifying the signature directly, as in g_[``] or g_[`+`], or or .

• 
The signature keyword of the Physics Setup is now in use, to set the metric and to indicate the form of the orthonormal tetrad, in turn used to derive the form of a null tetrad.

• 
Automatic detection of the position of t as the time variable when you set the coordinates automatically sets the signature of the default Minkowski spacetime metric accordingly to + or +.

• 
New keywords with special meaning when indexing the Physics (also the user defined) tensors: · `~`; for example g_[`~`] returns the allcontravariant matrix form of the metric. · definition; for example Ricci[definition] returns the definition of the Ricci tensor; works also with userdefined tensors. · scalars; for example Weyl[scalars] and Ricci[scalars] return the five Weyl and seven Ricci scalars used to perform a Petrof classification and in the NewmanPenrose formalism. · scalarsdefinition, and invariantsdefinition; for example Weyl[scalarsdefinition] or Riemann[invariantsdefinition] return the corresponding definitions for the scalars and invariants. · nullvectors; for example, when the new Tetrads subpackage is loaded, e_[nullvectors] returns a sequence of null vectors with their products normalized according to the NewmanPenrose formalism. · matrix; this keyword was introduced in previous releases, and now it can appear after a space index (not spacetime), in which case a matrix with only the space components is returned.

• 
Tensorial expressions can now have spacetime indices (related to a global system of references) and tetrad indices (related to a local system of references) at the same time, or they be rewritten in one (spacetime) or the other (tetrad) frames.

• 
The matrix keyword can be used with spacetime, space, or tetrad indices, resulting in the corresponding matrix

• 
Implement automatic determination of symmetry under permutation of tensor indices when the tensor is defined as a matrix.

• 
New conversions from the Weyl to the Ricci tensors, and from Weyl to the Christoffel symbols.

• 
New option evaluatetrace = true or false within convert/Ricci, to avoid automatically evaluating the Ricci trace when performing conversions that involve this trace.

• 
New option 'evaluate' to convert/g_, convert/Christoffel and convert/Ricci. With this option set to false, it is possible to see the algebraic form of the result (that is, of the tensors involved) before evaluating it.

• 
The Maple 18 Library:SubstituteTensor command, got enhanced and transformed into one of the main Physics commands, that substitutes tensorial 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, 2) repeated indices in Eqs do not clash with repeated indices in the expression and 3) spacetime, space, and tetrad indices are handled independently, so they can all be present in Eqs and in the expression at the same time. This new command 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.



Tetrads in General Relativity


The formalism of tetrads in general relativity got implemented within Physics as a new package, Physics:Tetrads , with 13 commands, mainly the null vectors of the NewmanPenrose formalism, the tetrad tensors , respectively: the tetrad, the tetrad metric, the Ricci rotation coefficients, and the lambda tensor, plus five algebraic manipulation commands: IsTetrad , NullTetrad , OrthonormalTetrad , SimplifyTetrad , and TransformTetrad to construct orthonormal and null tetrads of different forms and using different methods.


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, Maple 17, and Maple 18. These metrics can be searched using g_ (the Physics command representing the spacetime metric that also sets the metric to your choice in one go) or using the command DifferentialGeometry:Library:MetricSearch .
• 
New, one hundred and four more metrics were added to the database from various Chapters of the aforementioned book entitled "Exact Solutions to Einstein's Field Equations". Among new metrics for other chapters, with this addition, the solutions found in the literature and collected in Chapters 13 and 14 of this book are all present as well in database of solutions to Einstein's equations.

• 
It is now possible to manipulate algebraically the properties of these metrics, for example, computing tetrads and null vectors for them  using the 13 commands of new Physics:Tetrads package.



Commutators, AntiCommutators, and Dirac notation in quantum mechanics


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. These include:
• 
Computing Commutators and Anticommutators between equations, or of an expression with an equation.

• 
whenever A is a quantum operator and F is a commutative mapping (see CohenTannoudji, Quantum Mechanics, page 171).

• 
Differentiating with respect to a noncommutative variable whenever all the variables present in the derivand commute with the differentiation variable.

• 
Automatic computation of , that is the automatic computation of a function of an operator applied to its eigenkets (see CohenTannoudji, Quantum Mechanics, page 171).

• 
Automatic derivation of a commutator rule: Commutator(A, F(B)) = F '(B) when Commutator(A, C) = Commutator(B, C) = 0 and C = Commutator(A, B), as shown in (see CohenTannoudji, Quantum Mechanics, page 171).

• 
New mechanism to have more than one algebra rule related to the same function (for example, a function of two arguments that come in different order).

• 
The dot product of the inverse of an operator, Inverse(A) · Ket, now returns the same as 1/A · Ket.

• 
Implement that is Hermitian if is Hermitian and F is a mathematical real function, that is, one that maps real objects into real objects; in this change only exp, the trigonometric functions and their inert forms are included.

• 
Add a few previously missing Unitary and Hermitian operator cases:


a) if \035U and V are unitary, the U V is also unitary.


b) if A is Hermitian then is unitary.


c) if U is unitary and A is Hermitian, then is also Hermitian.

• 
Make the type definition for ExtendedQuantumOperator more precise to include as such any arbitrary function of an ExtendedQuantumOperator.



New Assume command and new enhanced Mode: automaticsimplification


One new enhanced mode was added to the Physics setup, automaticsimplification, and a new Physics:Assume command make expressions be automatically expressed in simpler forms and allow for very flexible ways of implementing assumptions, making the Physics environment concretely more expressive.

Assume


In almost any mathematical formulation in Physics, there are objects that are real, positive, or just angles that have a restricted range; for example: Planck's constant, time, the mass and position of particles, and so on. When placing assumptions using the assume command, however, expressions entered before placing the assumptions and those entered with the assumptions cannot be reused in case the the assumptions are removed. Also, when using assume variables get redefined so that geometrical coordinates (spacetime, Cartesian, cylindrical, and spherical) loss their identity. These issues got addressed with a new Assume command, that does not redefine the variables, implementing the concept of an "extended assuming ", allowing for reusing expressions entered before placing assumptions and also after removing them. Assume also includes the functionality of the additionally command.


Automatic simplification


This new Physics mode of computation means that, after you enter , the output corresponding to every single input (not just related to Physics) gets automatically simplified in size before being returned to the screen. This is fantastically convenient for interactive work in most situations.



Vectors Package


A number of changes were performed in the Vectors subpackage to make the computations more natural and versatile:
• 
Enhancement in the algebraic manipulations of inert vectorial differential operators.

• 
Improvements in the manipulation of of scalar products of vector or scalar functions (to the left) with vectorial differential operators (to the right), that result in vectorial or scalar differential operators.

• 
Several improvements in the use of trigonometric simplifications when changing the basis or the coordinates in vectorial expressions.

• 
Add new functionality mapping Vectors:Component over equations, automatically changing basis if the two sides are not projected over the same base.

• 
Implement the expansion of the square of a vectorial expression as the scalar (dot) product of the expression with itself, including the case of a vectorial quantum operator expression.

• 
Allow multiplying equations also when the product operator is in scalar and vector products (Vectors:`.` and Vectors:`&x`).

• 
ChangeBasis : allow changing coordinates between sets of orthogonal coordinates also when the expression is not vectorial.

• 
New command: ChangeCoordinates , to rewrite an algebraic expression, using Cartesian, cylindrical, and spherical coordinates, an expression that involves these coordinates, either a scalar expression, or vectorial one but then not changing the orthonormal basis.



The Physics Library


Twentysix new commands, useful for programming and interactive computation, have been added to the Physics:Library package. These are:
• 
ExpandProductsInExpression

• 
FlipCharacterOfFreeIndices

• 
FromMinkowskiKindToSignature

• 
FromSignatureToMinkowskiKind

• 
FromTetradToTetradMetric

• 
HasOriginalTypeOfIndices

• 
IsOrthonormalTetradMetric

• 
RepositionRepeatedIndicesAsIn

Additionally, several improvements in the previously existing Physics:Library commands have been implemented:
• 
Add the types spacetimeindex, spaceindex, spinorindex, gaugeindex, and tetradindex to the exports of the Library:PhysicsType package.

• 
Library:ToCovariant and Library:ToContravariant when the spacetime is curved and some 'tensors' involved are not actually a tensor in a curved space.

• 
Add new options changefreeindices and flipcharacterofindices to the Library:ToCovariant and Library:ToContravariant commands, to actually lower and raise the free indices as necessary, instead of the default behavior of returning an expression that is mathematically equivalent to the given one.

• 
Extend the Library commands GetCommutativeSymbol , GetAntiCommutativeSymbol , and GetNonCommutativeSymbol to return vectorial symbols when Vectors is loaded and a vectorial symbol is requested.

• 
Add functionality to the Library command GetSymbolsWithSameType so that when the input is a list of objects, it returns a list with new symbols of the corresponding types, automatically taking into account the vectorial (Y/N) kind of the symbols.



Miscellaneous


• 
Add several fields to the Physics:Setup() applet in order to allow for manipulating all the Physics settings from within the applet.

• 
New Physics:Setup options: automaticsimplification and normusesconjugate.

• 
When any of Physics or Physics:Vectors are loaded, dtheta, dphi, etc. are now displayed as , , etc.

• 
Implement, within the `*` operator, both the global and the Physics one , the product of equations as the product of lefthand sides equal the product of righthand sides, eliminating the frequently tedious typing "". You can now just enter "".

• 
Automatically distribute dot products over lists, as in .

• 
Allow (A = B)  C also when A, B, and C are Matrices.

• 
Add and to convert Physics:Vectors, Matrices of equations, etc. into sets or lists of equations.

• 
Annihilation and Creation operators are now displayed as in textbooks using and .

• 
It is now possible to use equation labels to copy and paste expressions involving Annihilation and Creation operators.

• 
Implement the ability in Fundiff to compute functional derivatives by passing only a function name as second argument. This works okay when the derivand contains this function with only one dependency (perhaps with many variables), say X, permitting varying a function quite like that done using paper and pencil.

• 
The determination of symmetries and antisymmetries of tensorial expressions got enhanced.

• 
Add keyword option attemptzerorecognition in TensorArray , so that each component of the array is tested for 0.

• 
Allow to sum over a list of objects, or over `in` structures like '' when redefining sum, and also in Physics:Library:Add .

• 
Harmonize the use of simplify/siderels with Physics, so that anticommutative and noncommutative objects, whether they are vectorial or not, are respected as such and not transformed into commutative objects when the simplification is performed.

a. 
The output of KillingVectors has now the format of a vector solution by default, that is, a 4D vector on the lefthand side and a list with its components on the righthand side and as such can be repassed to the Define command for posterior use as a tensor. To recover the old format of a set of equation solutions for each vector component, a new optional argument, output = componentsolutions, got implemented.

b. 
Vectors:Norm now returns the Euclidean real norm by default, that is: , and only return using conjugate, as in , when the option conjugate is passed, or the setting normusesconjugate is set using Physics:Setup .

c. 
The output of FeynmanDiagrams now discards, by default, all terms that include tadpoles. Also, an option, includetadpoles, to have these terms included as in previous releases, got implemented.

g. 
When Vectors is loaded, the Hermitian and Unitary properties of operators set using the Setup command are now propagated to "the name under the arrow" and vice versa, so that if is a Hermitian Operator, or Unitary, then is too.

h. 
The SpaceTimeVector can now have dependency other than a coordinate system.

j. 
Diminish the use of KroneckerDelta as a tensor, using the metric g_ instead in the output of Physics commands, reserving KroneckerDelta to be used as the standard corresponding symbol in quantum mechanics, so not as a tensor.


