On Wed, Oct 15, 2008 at 6:52 PM, Stephen Montgomery-Smith
> I am trying to get axiom to accept the input "f(x)" as meaning "an
> unspecified function f applied to the variable x". I looked briefly
> through the documentation at
> http://www.axiom-developer.org/axiom-website/documentation.html, but I
> am not seeing which section to look at. I can see how to create
> functions that do something, but not variable functions.
> (1) -> f(x)
> There are no library operations named f
> Use HyperDoc Browse or issue
> )what op f
> to learn if there is any operation containing " f " in its name.
> Cannot find a definition or applicable library operation named f
> with argument type(s)
> Variable x
> Perhaps you should use "@" to indicate the required return type,
> or "$" to specify which version of the function you need.
The AXIOM family systems differ from the traditional computer algebra systems
in that it insists on working on values of some datatype (called
domain). What this
entails is that every expression is evaluated to a normal form defined by some
domain of computation. Specifically, it means that in
OpenAxiom insists that 'f' must be belongs to a domain of computation that can
evaluate `f(x)' to some value. The fundamental way that OpenAxiom does that
is to start type checking the arguments (and evaluate them where necessary)
so that it gets a guidance on how 'f' should be evaluated, therefore the whole
The system starts with 'x', and see that there is no declaration for `x'. So, it
concludes that 'x' is a value of type Variable x -- meaning a variable named x.
Next, it tries to figure out whether there is any function named 'f' that can
accept a value of type Variable x. It can't find any. Consequently, it
declares that the expression 'f(x)' is not meaningful. Hence the error.
If OpenAxiom were a symbolic computation system where the fundamental
basic datatype is abstract syntax tree (AST), then it would just automatically
decide that f(x) is a call to an unspecified function 'f' with
On the other hand, OpenAxiom (and all systems in the AXIOM family) does
have a parameterized domain to support some form of symbolic computation
called Expression. Since you think of `f' as a unspecified function,
the first thing
to do is to tell the interpreter that `f' does stand for an operator
(which will be
called 'f' for the moment).
f := operator 'f
so that now 'f' belows to the BasicOperator domain of computation.
Next, there is a `function call' operator
elt: (BasicOperator, %) -> %
from the Expression domain of computation that makes an Expression out
of a operator applied to another Expression. However, 'x' does not
seem to belong to that domain. But,there is an implicit conversion
that can take the symbol 'x' into the Expression(Integer) domain, so that
possesses an interpretation in the domain of computation Expression(Integer).
Now, Expression(Integer) is a domain that furnishes the basic operations you
would need to conduct some form of `symbolic computation' as found in
other computer algebra systems (though obviously, there are things that
Expression does not do well).
I hope you find this explanation useful to get you started with the
philosophy behind OpenAxiom and the AXIOM family systems.