Equality WAS: question regarding simplication



On Sat, Nov 26, 2011 at 07:13:56AM -0500, Stavros Macrakis wrote:
> Maxima has two equality operations: a = b and equal (a, b).? The first is
> strict syntactic (structural) equality. The second is semantic (mathematical
> value) equality (though not very powerful). You want the second.
> 
> ?? -s
>

Oh, yes, thanks! I forgot about that.
(The reason is that nearly always for our applications, "is(a=b)" is fully
sufficient. I guess "syntactic equality" means "syntactic equality"
after evaluation, which includes various standardisations, so that e.g.
is(4*x-x=7*x-4*x) returns true. And this form of simple term rewriting 
is for most of our applications exactly what we want.)

So "is(equal(a,b))" is a form of "simplify(t)" for t : a=b.

Oliver

> On Nov 26, 2011 5:14 AM, "Oliver Kullmann" <O.Kullmann at swansea.ac.uk> wrote:
> 
>     Hello,
> 
>     I encountered the example
> 
>     is((y1-y2)^2+(x1-x2)^2 = (y2-y1)^2+(x2-x1)^2);
>     ?false
> 
>     Is this to be expected? I understand that standard simplification
>     only performs very simple operations, but that it doesn't recognise
>     that simple equation?
> 
>     I know that applying "expand" and/or "radcan" often helps,
>     and so it does here:
> 
>     is(expand((y1-y2)^2+(x1-x2)^2 = (y2-y1)^2+(x2-x1)^2));
>     ?true
> 
>     Now two remarks:
> 
>     1) The above comes from working with the Euclidian norm. As far as I know,
>     there is no built-in function for this norm, or the more general p-norms.
>     And as far as I know, having such functions provided by Maxima itself could
>     enhance the possibilities for handling equations correctly.
> 
>     2) Before Maxima I used MuPad, which was open at the beginning; when
>     they went commercial I stopped using it. This was (is) likely not a
>     very powerful computer-algebra system, but nevertheless several times
>     I had nice surprises by using its "simplify"-function: it came up with
>     interesting simplifications, which I could actually use for papers.
> 
>     It is really a pity that Maxima doesn't have such a function:
>     In it would be collected heuristical knowledge, analysing the expression,
>     and applying the given simplification-functions in all kinds of different
>     ways.
> 
> 
>     Thanks for your attention.
> 
>     Oliver
> 
>     _______________________________________________
>     Maxima mailing list
>     Maxima at math.utexas.edu
>     http://www.math.utexas.edu/mailman/listinfo/maxima
> 

-- 
Dr. Oliver Kullmann
Department of Computer Science
College of Science, Swansea University
Faraday Building, Singleton Park
Swansea SA2 8PP, UK
http://cs.swan.ac.uk/~csoliver/