login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for ExpressionInteger revision 1 of 1

1
Editor: hemmecke
Time: 2008/08/15 07:44:41 GMT-7
Note:

changed:
-
This page gives a few comments about the expression domain 'Expression Integer'
and the use of more specific domains.

The 'Integer' in 'Expression Integer' is maybe misleading.
Just think of 'Expression Integer' as something that makes panAxiom behave
like a (nearly) untyped computer algebra system like Maple or Mathematica.

Roughly speaking, you forget about all the type stuff.
That's not totally true, but for a new user it is probably the best way
to do the first steps just with (untyped) expressions.

You can only appreciate all those different types if you do more advanced
things in panAxiom.
Types especially become important if one wants to implement a bigger library.

One big difference for example is: In 'Expression Integer' it is
undecidable whether an element is actually equal to zero.
So if you say zero?(e) for some expresssion e you might get false
although e can actually be simplified to zero.

\begin{axiom}
e: Expression Integer := sin(x)^2 -1 + cos(x)^2
zero? e
simplify e
\end{axiom}

For more specialized domains like 'DMP([a,b], Integer)',
the function zero? always returns what you expect.


This page gives a few comments about the expression domain Expression Integer and the use of more specific domains.

The Integer in Expression Integer is maybe misleading. Just think of Expression Integer as something that makes panAxiom behave like a (nearly) untyped computer algebra system like Maple or Mathematica.

Roughly speaking, you forget about all the type stuff. That's not totally true, but for a new user it is probably the best way to do the first steps just with (untyped) expressions.

You can only appreciate all those different types if you do more advanced things in panAxiom. Types especially become important if one wants to implement a bigger library.

One big difference for example is: In Expression Integer it is undecidable whether an element is actually equal to zero. So if you say zero?(e) for some expresssion e you might get false although e can actually be simplified to zero.

fricas
(1) -> e: Expression Integer := sin(x)^2 -1 + cos(x)^2

\label{eq1}{{\sin \left({x}\right)}^{2}}+{{\cos \left({x}\right)}^{2}}- 1(1)
Type: Expression(Integer)
fricas
zero? e

\label{eq2} \mbox{\rm false} (2)
Type: Boolean
fricas
simplify e

\label{eq3}0(3)
Type: Expression(Integer)

For more specialized domains like 'DMP([a,b]?, Integer)', the function zero? always returns what you expect.