[Top][All Lists]

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

[Axiom-developer] RE: More AxiomUI

From: Page, Bill
Subject: [Axiom-developer] RE: More AxiomUI
Date: Tue, 21 Jun 2005 22:27:00 -0400


On Tuesday, June 21, 2005 9:47 PM you wrote:

> The integrate() function seems to work quite well, despite the fact
> that I might add two disparate things.
> (8) -> integrate(log(x)+x, x)
>                     2
>        2x log(x) + x  - 2x
>   (8)  -------------------
>                 2
>                              Type: Union(Expression Integer,...)
> Simplification rules must be domain-specific.  However the domain
> that is used in most engineering-type CAS' (maple/mathematica/maxima)
> is essentially "Complex Expression".

Yes. As I understand the Expression domain was an attempt to "simulate"
this enginerring-type CAS concept in Axiom.

>  Is Union(Expression Integer,...) equivalent?

No. Union(Expression Integer,...) is just an abbreviation for the full
type of the result. You can ask Axiom for the complete type information
using the fuction `typeOf'

(1) -> integrate(log(x)+x, x)
        2x log(x) + x  - 2x
   (1)  -------------------
                            Type: Union(Expression Integer,...)
(2) -> typeOf %

   (2)  Union(Expression Integer,List Expression Integer)
                            Type: Domain

So the result is either of type Expression Integer or a List of
that type. On the other hand

(3) -> integrate(x^2, x)
   Loading C:/Program Files/axiom/mnt/windows/algebra/POLY2.o for
      package PolynomialFunctions2

        1  3
   (3)  - x
                            Type: Polynomial Fraction Integer

> It's been mentioned before that the "Expression" domain needs a
> lot of work.  This talk of simplification probably belongs there.

Yes maybe. I think this is partly a philosophical design issue.
There is a sense in which the Expression domain does not really
conform to Axiom's apparent original design philosophy. The reason
is that as a *mathematical domain* the concept of Expression is
too weak. It represents perhaps a kind of compromise. Should it be
possible in principle to coerce any object in Axiom to something
of type Expression Integer?

In general I still find the Axiom concept of domain and it's
relationship to type rather hard to "grok". Sometimes it seems
to be talking about semantics (in the sense of mathematics)
and sometimes it has more to do with representation and syntax -
like the distinction between Polynomial Integer and Expression

> However if we were very smart we would have domain-specific rules,
> and a generic format (such as the s-expression example you mention
> above), and *one* set of simplify/factor/expand functions.  The
> result would be as it is from integrate(), Union(something) or
> Expression(something).  The type should be derivable...

In the case of the above examples, this conversion seems quite

(4) -> %%(1)::InputForm

   (4)  (/ (+ (* (* 2 x) (log x)) (+ (** x 2) (* - 2 x))) 2)
                                             Type: InputForm
(5) -> %%(3)::InputForm

   (5)  (* (/ 1 3) (** x 3))
                                             Type: InputForm

But I am not so sure how it could be used to achieve the results
you are looking for. I'll have to think about this some more.


Bill Page.

reply via email to

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