Error, (in assume) cannot assume on a constant object - Maple Programming Help

Home : Support : Online Help : System : Error Message Guide : cannotassumeonaconstantobject

Error, (in assume) cannot assume on a constant object

Error, (in assume) cannot assume on an assigned name

 Description The assume command sets variable properties and relationships between variables. A common use of the assume command is assume(a>0). This states that the symbol $a$ is assumed to be a positive real constant. Having made such an assumption, Maple routines are able to use this information to simplify expressions, for example, $\sqrt{{a}^{2}\cdot b}$to $a\cdot \sqrt{\left(b\right)}$, and evaluate inequalities, for example, is(a+1>0) returns true.   The cannot assume on a constant object error occurs when the expression on which to place the assumption does not contain a name on which to base the assumption, for example, a variable that has been assigned a constant value.

Examples

 > $x\mathit{≔}\mathrm{π}\mathit{;}$$\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}$
 ${x}{:=}{\mathrm{π}}$ (2.1)
 > $\mathrm{assume}\left(x>0\right);$

The variable $x$ is replaced by the value assigned to that variable.

Solution: Use unevaluation quotes to prevent the variable from being replaced by its value.

 > $\mathit{assume}\left(\mathit{0}\mathit{<}'x'\right)\mathit{;}$

Note that this removes the previously assigned value.

 > $x\mathit{;}$
 ${\mathrm{x~}}$ (2.2)

Similarly, an assigned name could be a Maple name, which is protected.

 > $\mathrm{assume}(\mathrm{root}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}>\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}0);$
 > $\mathrm{root}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}:=\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}3;$

Solution: Use a different name.