Should maxima know that if A is complex, A = realpart(A) + %i * imagpart(A) ?



Hi Rob,

> (%i49) declare(A, complex);
> (%o49) done
> (%i50) is(realpart(A)=A);
> (%o50) false
> (%i51) is(imagpart(A)=A);
> (%o51) false
> (%i52) is(A=realpart(A)+%i*imagpart(A));
> (%o52) false
> 
> Maxima seems to know that if A is real, realpart(A)=A.

Others already told you about equal().

Unfortunately is() is not very clever, but you might help it,
if you bring it's input in some "canonical" form useful for the
problem you are looking at. For example when working with
complex symbols, rectform might be a good choice.

(%i25) is(rectform(A=realpart(A)+%i*imagpart(A)));
(%o25)                               true

Of course you need to know something about your problem to choose the
right simplifier...

HTH,
Harald