Physics[Assume] - place assumptions without redefining the variables receiving assumptions - suitable for working with the Physics, VectorCalculus, DifferentialGeometry and MathematicalFunctions packages
Physics[Vectors][Assume] - synonym of Physics[Assume]
Calling Sequence
Assume(assumption1, assumption2, ...)
Assume(additionally, assumption1, ...)
Assume(clear = {x1, x2})
Parameters
assumption
-
assumption on variables x1, ..., expressed as boolean structures constructed using the boolean functions And, Or or Not, or the corresponding boolean operators and, or, not; they can be arbitrarily nested
additionally
the keyword additionally, to place assumptions on variables in addition to previously existing assumptions on the same variables
x1, x2, ...
names or functions, the variables receiving assumptions
Description
In almost any mathematical formulation in Physics or when working with MathematicalFunctions, there are variables that are real, positive, or represent angles that have a restricted range. For example: Planck's constant, time, the mass and position of particles, spherical coordinates, the domain of some special function parameters, etc. One typically perform algebraic computations with these variables, and at some point wants to place assumptions on them, because the results appear somewhat unsimplified, under the generic assumption that every name represents a complex variable defined over the whole complex plane.
Assume is a command for placing these assumptions on variables and is the preferred command for this purpose when working with the Physics and MathematicalFunctions packages. Assume also includes the functionality of the additionally command. All the assumptions placed using Assume are taken into account by the commands coulditbe, is, getassumptions and assuming (with option additionally), and through them by the whole Maple library, in exactly the same way they are taken into account when placed using assume.
To understand the motivation for Assume note that when placing assumptions using the assume command, expressions entered before placing the assumptions cannot be reused and results involving assumed variables, obtained after placing the assumptions, cannot be reused in case the assumptions are removed, or more or different assumptions are placed on the same variables. This is so because assume redefines the variables receiving assumptions each time you place assumptions on them.
These restrictions do not exist when placing assumptions with Assume, because it does not redefine the variables receiving assumptions - it only places the assumptions - and in that way allows for reusing expressions entered before placing assumptions, or reusing results that involve assumed variables after removing or changing the assumptions to something more precise/appropriate. This is a typical situation when working on Physics problems or performing algebraic exploration with mathematical functions.
More important, when using assume, because the variables receiving assumptions get redefined, geometrical coordinates (spacetime, Cartesian, cylindrical and spherical) loss their identity and are not recognized anymore by the Physics package commands or those from the VectorCalculus package. This is not an issue when placing assumptions with Assume because it does not redefine the variables, they remain the same, before, during and after removing the assumptions placed, in some way implementing the concept of an assuming command of extended action.
Examples
with⁡Physics:
Setup⁡mathematicalnotation=true
mathematicalnotation=true
To understand what Assume does it is necessary to concisely review what assume does and focus the difference. Consider a generic variable x. Nothing is known about it
about⁡x
x: nothing known about this object
Each variable has associated a number that depends on the session, and the computer (internally) uses this number to refer to the variable:
addressof⁡x
36893628512123923548
When using the assume command to place assumptions on a variable, this number, associated to it, changes, for example:
assume⁡0<xandx<12⁢π
36893628512000574044
Indeed, the variable x got redefined and renamed, it is not anymore the variable x referenced in (2):
Originally x, renamed x~: is assumed to be: RealRange(Open(0),Open(1/2*Pi))
To undo assumptions placed using the assume command one reassigns the variable x to itself:
x≔x
Check the numerical address: it is again equal to (2):
The key observation here is that variables that receive assumptions using assume get redefined each time you place assumptions on them. Although this redefinition of variables is convenient in some contexts, it also means two things:
All the equations/expressions, entered before placing the assumptions on x using assume, involve a variable x that is different than the one that exists after placing the assumptions. So, these previous expressions cannot be reused, because they involve a different variable.
Because, after placing the assumptions using assume, x refers to a different variable, programs that depend on the x that existed before placing the assumptions (e.g. the spacetime metric g_, general relativity tensors, Physics:-Vectors and VectorCalculus commands) do not recognize the new x redefined by assume.
To addressed these issues, Assume places the assumptions without redefining the variables, and allows for placing assumptions in addition to previously placed assumptions also without redefining the variables. For example, before placing assumptions this simplification attempt accomplishes nothing:
simplify⁡arccos⁡cos⁡x
arccos⁡cos⁡x
Let's assume now that 0<x<π2
Assume⁡0<xandx<12⁢π
x::0,π2
For convenience, the Assume command also echoes the assumptions you place. Now, the address of x is still the same as in (2) before placing the assumption
So the variable did not get redefined. The system however knows about the assumption - Assume uses all the machinery of the assume command:
Originally x, renamed x: is assumed to be: RealRange(Open(0),Open(1/2*Pi))
Hence, expressions entered before placing assumptions can be reused. For example, you can reuse (6), we now have
simplify⁡
x
To clear the assumptions on x, you can use Assume(x = x), or Assume(clear = {x, ..}) in the case of many variables being cleared in one go or, in the case of a single variable being cleared, also
Assume⁡clear=x
∅
In summary, the Assume implements the concept of an assuming of extended action, where assumptions can be turned ON and OFF at any moment without changing the variables involved.
Assume includes the functionality of the additionally command, also without redefining the variables receiving additional assumptions. For that purpose add the keyword additionally anywhere in the calling sequence. For example:
Assume⁡x::positive
x::0,∞
Originally x, renamed x: is assumed to be: RealRange(Open(0),infinity)
Assume⁡additionally,x<1
x::0,1
Originally x, renamed x: is assumed to be: RealRange(Open(0),Open(1))
The variable x always refer to the same object, itself, the same as in (2) before placing any assumption
See Also
about, additionally, assume, assuming, MathematicalFunctions, Physics, Physics conventions, Physics examples, Physics Updates, Tensors - a complete guide, Mini-Course Computer Algebra for Physicists, Setup
Compatibility
The Physics[Assume] and Physics[Vectors][Assume] commands were introduced in Maple 2015.
For more information on Maple 2015 changes, see Updates in Maple 2015.
The Physics[Vectors][Assume] command was updated in Maple 2023.
Download Help Document