Should maxima know that if A is complex, A = realpart(A) + %i * imagpart(A) ?
Subject: Should maxima know that if A is complex, A = realpart(A) + %i * imagpart(A) ?
From: Stavros Macrakis
Date: Wed, 12 Dec 2007 12:05:47 -0500
Rob,
The complex/real declaration and the realpart/imagpart forms (what we
call noun forms) are not understood by most parts of Maxima,
unfortunately.
As for your particular examples, first of all, I think you intend to
be checking for mathematical (semantic) equality, not just syntactic
equality (what "=" means to "is"). But alas as far as "is" is
concerned, "realpart" is just as much an uninterpreted function as
"f", so that won't help much.
It would actually be fairly trivial to handle some of the simple
cases: if "is" noticed a realpart, imagpart, cabs, or carg nounform
anywhere within an equal-expression, it could replace is( equal(X,Y) )
with is( equal(realpart(X-Y),0) and equal(imagpart(X-Y),0) ); this
would handle all your cases, but I'm sure how useful this would be...
and there would be many other cases it would not help on....
-s