Nonsimplifying nounforms: abs, realpart, carg, etc. (maxima-Bugs-902290)
Subject: Nonsimplifying nounforms: abs, realpart, carg, etc. (maxima-Bugs-902290)
From: Dieter Kaiser
Date: Mon, 12 Jan 2009 00:49:27 +0100
________________________________________________________________________
> Von:macrakis at gmail.com [mailto:macrakis at gmail.com] Im Auftrag von
> Stavros Macrakis
> Gesendet: Sonntag, 11. Januar 2009 19:54
> An: maxima at math.utexas.edu
> Cc: Dieter Kaiser
> Betreff: Nonsimplifying nounforms: abs, realpart, carg, etc.
> (maxima-Bugs-902290)
> The bug is that some nounforms, like realpart(1), do not simplify.
To have this simplification we need a function which can be called by
the simplifier. I think we have the following options:
1. Implement a simplifying function like sin, cos, ...
Evaluation and simplification is done by a function which
is called only by the simplifer. No VERB function is needed.
The decision is: Should the functions for the complex components
including realpart and imagpart be simplifying functions or not.
The next question is: Can we use a call to trisplit to get a
simplified expressions. What should be improved e.g.
'realpart(z+w) --> realpart(z+w) and not realpart(z)+realpart(w)?
2. Implement VERB/NOUN concept like diff, integrate, ...
Implement both functions: The VERB function is called by the Maxima
user. The NOUN function again is called only by the simplifier and
supports some elementary simplifications e.g. like 'diff(x,x)--> 1
or 'integrate(0,x) --> 0.
The decision is: What code should be duplicated for the simplifier
function e.g. 'realpart(x) --> x for all symbols not declared to be
complex and real numbers. Should complex numbers also be included
like 'realpart(x+%i*y) --> x ?
3. Do nothing
In this case 'realpart(1) --> realpart(1) is not a bug. A
simplification is not supported.
Dieter Kaiser