#### 6.66 Assume a constant (3.2.00)

I would like to assume a parameter as a constant using MAPLE V R5 I used the
following:

> assume(L, constant);
> type(L, constant);
false
> whattype(L);
symbol

how can I assume a constant

Here is one possible solution (in Maple V R5.1, but I think this has worked in most previous
releases of Maple V):

> constants := L, constants;
constants := L, false, gamma, infinity, true, Catalan, FAIL, Pi
> type(L, constant);
true

Here is one possible solution (in Maple V R5.1, but I think this has worked in most previous
releases of Maple V):

> constants := L, constants;
constants := L, false, gamma, infinity, true, Catalan, FAIL, Pi
> type(L, constant);
true

There is a global variable "constants" that contains all names that Maple knows as
symbolic constants. To make L a constant, you just append it to this variable’s
value:

> constants:= constants, L;
> type(L, constant);
true

If you want "evalf" to give L a numerical value, you can assign that to ``evalf/constant/L``

.
For example:

> `evalf/constant/L`:= 1.2345;
> evalf(2+L);
3.2345

I get as result: 2. + L. As stated in the help page of evalf you should deﬁne
``evalf/constant/L``

as a procedure. If I do so: ``evalf/constant/L` := proc() 1.2345 end:`

I get the above mentioned result for `evalf(2+L).`

(U. Klein)

The error is that assume ﬁxes properties of variables and relationships between them. It
cannot aﬀect types. The correct syntax for checking properties is:

> is(L,constant);
true

The confusion was caused because, as well as the property constant, there is also a type
constant, which seems to include the type numeric and any names held within the global
variable constants.

Thus it is possible to give a name or symbol the type constant, using a command
like:

> constants := constants,myconstant;

I don’t know what the beneﬁt of doing this is.

There are other properties and types that share names, such as integer.

I hope this helps, but I am not sure what signiﬁcance the property constant has in
Maple. Perhaps the question should be "Why do you want to assume that L is
constant?"