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


>

$\mathrm{with}\left(\mathrm{Physics}\right)\:$

>

$\mathrm{Setup}\left(\mathrm{mathematicalnotation}\=\mathrm{true}\right)$

$\left[{\mathrm{mathematicalnotation}}{=}{\mathrm{true}}\right]$
 (1) 
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
>

$\mathrm{about}\left(x\right)$

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:
>

$\mathrm{addressof}\left(x\right)$

${36893628291575027356}$
 (2) 
When using the assume command to place assumptions on a variable, this number, associated to it, changes, for example:
>

$\mathrm{assume}\left(0<x\phantom{\rule[0.0ex]{0.5em}{0.0ex}}\mathbf{and}\phantom{\rule[0.0ex]{0.5em}{0.0ex}}x<\frac{1\mathrm{Pi}}{2}\right)$

>

$\mathrm{addressof}\left(x\right)$

${36893628291458330620}$
 (3) 
Indeed, the variable $x$ got redefined and renamed, it is not anymore the variable $x$ referenced in (2):
>

$\mathrm{about}\left(x\right)$

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\u2254\'x\'$

Check the numerical address: it is again equal to (2):
>

$\mathrm{addressof}\left(x\right)$

${36893628291575027356}$
 (5) 
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:
1.

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.

2.

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:
>

$\mathrm{simplify}\left(\mathrm{arccos}\left(\mathrm{cos}\left(x\right)\right)\right)$

${\mathrm{arccos}}{}\left({\mathrm{cos}}{}\left({x}\right)\right)$
 (6) 
Let's assume now that $0<x<\frac{\pi}{2}$
>

$\mathrm{Assume}\left(0<x\phantom{\rule[0.0ex]{0.5em}{0.0ex}}\mathbf{and}\phantom{\rule[0.0ex]{0.5em}{0.0ex}}x<\frac{1\mathrm{Pi}}{2}\right)$

$\left\{{x}{::}\left({0}{\,}\frac{{\mathrm{\pi}}}{{2}}\right)\right\}$
 (7) 
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
>

$\mathrm{addressof}\left(x\right)$

${36893628291575027356}$
 (8) 
So the variable did not get redefined. The system however knows about the assumption  Assume uses all the machinery of the assume command:
>

$\mathrm{about}\left(x\right)$

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
>

$\mathrm{simplify}\left(\right)$

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
>

$\mathrm{Assume}\left(\mathrm{clear}\=x\right)$

>

$\mathrm{about}\left(x\right)$

x:
nothing known about this object
 
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:
>

$\mathrm{Assume}\left(x::\mathrm{positive}\right)$

$\left\{{x}{::}\left({0}{\,}{\mathrm{\infty}}\right)\right\}$
 (11) 
>

$\mathrm{about}\left(x\right)$

Originally x, renamed x:
is assumed to be: RealRange(Open(0),infinity)
 
>

$\mathrm{Assume}\left(\mathrm{additionally}\,x<1\right)$

$\left\{{x}{::}\left({0}{\,}{1}\right)\right\}$
 (12) 
>

$\mathrm{about}\left(x\right)$

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
>

$\mathrm{addressof}\left(x\right)$

${36893628291575027356}$
 (13) 


See Also


about, additionally, assume, assuming, MathematicalFunctions, Physics, Physics conventions, Physics examples, Physics Updates, Tensors  a complete guide, MiniCourse Computer Algebra for Physicists, Setup


Compatibility


•

The Physics[Assume] and Physics[Vectors][Assume] commands were introduced in Maple 2015.

•

The Physics[Vectors][Assume] command was updated in Maple 2023.


