Subject: Implicit: Taylor, Poiseux and Newton's diagram
From: Oliver Kullmann
Date: Fri, 1 Jun 2012 08:29:12 +0100
On Fri, Jun 01, 2012 at 01:28:37AM +0000, Robert Dodier wrote:
> On 2012-06-01, Barton Willis <willisb at unk.edu> wrote:
>
> > (b) consider changing tests for equality from "=" to equal.
>
> Specifically, a = b is true iff a and b are identical, while equal(a, b)
> is pretty much the same as ratsimp(a - b) = 0.
>
> Tests such as if length(L) = 0 then ... have the expected effect. Tests
> like if a = b then ... where a and b are general expressions probably
> should be changed to equal(a, b) unless you are specifically looking for
> identical expressions.
>
Just a comment: I find the Maxima-usage of the notion of "identity" rather
misleading, since in mathematical logic or other related areas, like
term rewriting, "identity" just means identity, namely the terms are identical.
So 1+1 is not identical to 2, not is 1+2 identical to 2+1.
If you use "=" in Maxima, then you don't get identity, but I would call
it "simple equivalence", or "syntactical equivalence", that is, some
rewrite-rules are applied, e.g.
if 1+1=2 then 0 else 1;
0
By the way, how would one actually check in Maxima for identity, so that
"1+1" is only identical to "1+1" and nothing else? It seems the evaluation
(rewriting) of 1+1 to 2 is hard to avoid?
Oliver
P.S. In our application we use nearly only "=" in tests, since we are
typically handling basic combinatorial objects, lists of sets of lists
and the like, with simple terms in it, and then "=" does the job,
and is likely faster:
if {1+1,3-2}={1,2} then 0 else 1;
0