axiom-developer
[Top][All Lists]

## [Axiom-developer] symbolic manipulation of expressions in Axiom (was: Sy

 From: Bill Page Subject: [Axiom-developer] symbolic manipulation of expressions in Axiom (was: SymPy on Axiom Wiki) Date: Sun, 1 Apr 2007 03:03:38 -0400

```On March 31, 2007 7:10 PM Gaby wrote:
>
> "Bill Page" <address@hidden> writes:
>
> > [...]

Since I am changing the subject line, let me also re-insert
a little more context from my previous email:

> | I think it would be much better if the coercion to
> | OutputForm from InputForm looked more (or even exactly)
> | like the syntax of input to the Axiom interpreter. Then
> | we could add symbolic manipulations such as are done in
> | SymPy directly to Axiom. In fact this would be very easy
> | to do and the fact that it has not yet been done in Axiom
> | can only related to the pre-occupation of the original
> | Axiom developers with what Stephen Watt calls "computer
> | algebra" as opposed to the much simpler problem of symbolic
> | computation. But I think symbolic computation has an
> | important place in Axiom.
> |
> | I would like to discuss this more with other active Axiom
> | developers.
>
> Why should InputForm be preferable over Expression T?
>

I presume that by "Expression T" you mean such domains as
'Expression Integer' and 'Expression Float' etc.

For me to answer your question it is important to understand
what Expression in Axiom really is. One way to do that is to
look at the internal representation.

Rep:=Fraction SparseMultivariatePolynomial(T, Kernel %)

So Expression is a mathematical domain of rational functions
(ratio of two polymonials) where the polynomial variables
are extended to kernels including various special functions.
It is of course a very general so many symbolic expressions
can be evaluated as operations on members of this domain.
But the members of this domain are *not* general symbolic
expressions! They are quite literally things represented as
the ratio of two polynomials, which in turn are represented
by however ratios and polynomials are represented, etc. And
the OutputForm for the members of this domain correspond to
a much reduced set of symbolic expressions.

That is the reason why when you enter something like this:

(1) -> 1/sin(x)+y

Axiom responds with:

y sin(x) + 1
(1)  ------------
sin(x)
Type: Expression Integer

Even though perhaps it looks like it, Axiom is not performing
some kind of arbitrary "simplification" of symbolic expressions.
Instead what is happening is that Axiom is interpreting the
symbols in the input expression as operations performed in
some domain and evaluating those operations *algebraically*
to ultimately create a member of that domain - in this case
Expression Integer. Then the Axiom interpreter displays this
member using the coercion to OutputForm defined by the
domain.

In contrast the members of the domain InputForm represent
exactly the symbolic expression that is the *input* to the
interpreter. Manipulating members of this domain amounts to
directly manipulating the expressions.

Regards,
Bill Page

```

reply via email to