axiom-developer
[Top][All Lists]

## [Axiom-developer] [DefiniteIntegration] declaring 'n' as PositiveInteger

 From: Bill Page Subject: [Axiom-developer] [DefiniteIntegration] declaring 'n' as PositiveInteger Date: Mon, 24 Jan 2005 14:12:04 -0600

I think the idea that one should be able to "declare the type" of a
variable in Axiom by the command
\begin{axiom}
n:PositiveInteger
\end{axiom}

is a frequent expectation of new users of Axiom - especially if one
have used other computer algebra systems, after all Axiom is supposed
to be a "strongly typed" system, right? Certainly I was surprized (and
disappointed) by Axiom's limitations in this reguard.

Unfortunately Axiom does not attempt to use this type information
when forming expressions - but worse - declaring the type actually
interferes with the use of the variable to form expressions!

When you write
\begin{axiom}
n:PositiveInteger
\end{axiom}
what this tells Axiom is that 'n' will be assigned an integer
value greater than 0 - only that. After it is actually assigned
some value, then it can be used exactly like that value, but
not before.

To me, this is a tremedous waste of an opportunity in Axiom to
to deal with "domain of computation" issues such as are
addressed in other untyped computer algebra systems by the use
of "assumptions" such as::

assume(x,PositiveInteger);

Such knowledge can be used to considerably improve the quality
and generality of the computations.

--