axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

 From: gdr Subject: [Axiom-developer] Re: symbolic manipulation of expressions in Axiom (was: SymPy on Axiom Wiki) Date: Sun, 01 Apr 2007 04:45:02 -0500 User-agent: Internet Messaging Program (IMP) H3 (4.0.2)

```
```
```Why should InputForm be preferable over Expression T?

```
```
I'm glad you asked. :-)

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

```
```
Yes.

```
```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.
```
```
Sorry, I don't think I'm satisfied with an answer that has to
look at the internal representation before explaining why I
should not believe the interface.

```
```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

 [Prev in Thread] Current Thread [Next in Thread]