Question regarding the rat-function (and "CRE" in general)



On Wed, Nov 30, 2011 at 15:39, Oliver Kullmann <O.Kullmann at swansea.ac.uk>wrote:

> On Wed, Nov 30, 2011 at 02:51:31PM -0500, Stavros Macrakis wrote:
> > On Wed, Nov 30, 2011 at 14:31, Oliver Kullmann <O.Kullmann at swansea.ac.uk
> >
> > wrote:
>


> >     Only ratprint does not have the default-value, and it should not
> >     have any effect here? So is the documentation of rat outdated?
> >
> >
> > I am surprised that ratprint isn't true (by default) in your system.  It
> is in
> > mine (Maxima 5.25.1 GCL Windows).
> >
>
> ratprint by default is true, but we set it to false, since it creates
> a lot of output when running our tests.
>

Hmm. Then I don't understand your question about the default and the
documentation.


> >     (%i45) rat(x)-x;
> >     (%o45)/R/                                        0
> >
> >     So apparently /R/0 and 0 are "syntactically equal" ?
> >
> >
> > Not sure why you conclude this.
>
> I thought that two expressions a,b would be syntactically equal iff
> is(a=b)
> yields true; however, as you said above, "is" itself performs certain
> simplifications itself (beyond "syntactical equality").
>

Still not sure what this has to do with rat(x)-x => 0.

Wouldn't ratexpand be more appropriate here?:
>

Yes, I suppose that's a "fairer" comparison.  But the goal of expansion is
often to make certain further manipulations easy -- sometimes rat form is
better for that, sometimes fully expanded form is better.

         -s