Discussion:
[Axiom-math] About rewrited expressions for power, log, exp and so.
Francois Maltey
2006-11-30 14:52:18 UTC
Permalink
Hello,

I try to understand how axiom is sure in Expression domain.
and what suppositions axiom does.

It seems that axiom makes a lot of fuzzy simplifications.
Of corse it's possible to delete such rules in elemntry.spad.

But then how can I test if standard exemples of axiom continue to be right
with a new elemntry.spad ?

sqrt (u^2) ---> sqrt (u^2) I agree sqrt ((-1)^2) = 1
but (u^a)^(1/a) ---> u not coherent with a=2

(u^a)^2 ---> u^(2a) is right
but (u^a)^b ---> u^(ab) I prefer (u^a)^b
and (u^2)^a ---> u^(2a)

u^a*u^b ---> u^a u^b is right but u^(a+b) is also possible.

The question is the same for asin (sin x), log (exp x), etc.
For sin it's line 486 in elemntry.spad

What rules might apply axiom for expressions ?
Is there a reason that theses rules aren't usual mathematic rules ?
What is the axiom policy ? What is your advice ?

Have a nice day.

Francois
Martin Rubey
2006-11-30 15:58:26 UTC
Permalink
Post by Francois Maltey
Hello,
I try to understand how axiom is sure in Expression domain.
and what suppositions axiom does.
It seems that axiom makes a lot of fuzzy simplifications.
yes.
Post by Francois Maltey
But then how can I test if standard exemples of axiom continue to be right
with a new elemntry.spad ?
Well, I'm still hoping for a unit testing package. But in fact, I wouldn't mind
if some "standard example" stops working, but in exchange a dozen others start
working.

The "simplifier" in EXPR is nearly non-existent, and those bits that do exist
are quite broken.
Post by Francois Maltey
sqrt (u^2) ---> sqrt (u^2) I agree sqrt ((-1)^2) = 1
but (u^a)^(1/a) ---> u not coherent with a=2
quite right. In fact, I believe I corrected this behaviour in "hackroot"
once. I didn't realize that there were other places with that nonsense, too.
Post by Francois Maltey
What rules might apply axiom for expressions ? Is there a reason that theses
rules aren't usual mathematic rules ? What is the axiom policy ? What is
your advice ?
My advice is: look at MuPaD and see how things are done there. I think they got
it right.

Apart from that, implement many good computable domains.


Great that you are working on this stuff.


Martin
Francois Maltey
2006-11-30 18:04:28 UTC
Permalink
Hello Martin,
Post by Martin Rubey
Post by Francois Maltey
But then how can I test if standard exemples of axiom continue to be right
with a new elemntry.spad ?
Well, I'm still hoping for a unit testing package. But in fact, I
wouldn't mind if some "standard example" stops working, but in
exchange a dozen others start working.
So the first thing is to write a such list of exemples.
I'll begin soon.
Post by Martin Rubey
My advice is: look at MuPaD and see how things are done there. I
think they got it right.
Mupad was the finest one for that.
I have enumerate theses properties in my book about mupad.
I'll take it again for testing and debugging axiom...

And mupad had 2 features which aren't (yet) in axiom expressions :

1/ The assume command :
assume (a>1) ; limit (a^x, x=%plusInfinity) --> %plusInfinity
assume (a=1) ; limit (a^x, x=%plusInfinity) --> 1
assume (a<1 and -1<a) ; limit (a^x, x=%plusInfinity) --> 0
assume (a<-1) ; limit (a^x, x=%plusInfinity) --> "failed"

2/ the piecewise command :
solve (a*(a-1)*x=a, x)
x = 1/(a-1) if a in C \setminus {0, 1}
x in C if a=0
x in emptyset if a=1
Post by Martin Rubey
Apart from that, implement many good computable domains.
You advise me to write a new domain,
not to correct (with a pamphlet file) the historic files ?

What method do you advice ?

I copy the efstruct.spad in a new directory, modify it, comment it,
compile it and load it at the beginning of the session.

I will complete my expand / rewrite / combine package
in order to be coherent too.

Thanks for your interest.

Francois
Gabriel Dos Reis
2006-11-30 19:21:23 UTC
Permalink
Francois Maltey <***@nerim.fr> writes:

[...]

| And mupad had 2 features which aren't (yet) in axiom expressions :
|
| 1/ The assume command :
| assume (a>1) ; limit (a^x, x=%plusInfinity) --> %plusInfinity
| assume (a=1) ; limit (a^x, x=%plusInfinity) --> 1
| assume (a<1 and -1<a) ; limit (a^x, x=%plusInfinity) --> 0
| assume (a<-1) ; limit (a^x, x=%plusInfinity) --> "failed"

maple has same. This is what Tim refers to in general as "provisos".

| 2/ the piecewise command :
| solve (a*(a-1)*x=a, x)
| x = 1/(a-1) if a in C \setminus {0, 1}
| x in C if a=0
| x in emptyset if a=1

this can be worked into Axiom, assuming we have provisos.

-- Gaby

Loading...