On Mon, 5 Oct 2009, Robert Dodier wrote:
< On Mon, Oct 5, 2009 at 11:38 AM, Leo Butler <l.butler at ed.ac.uk> wrote:
<
< > < 1+2.0 => 3.0
< > < '(1+2.0) => 3.0
< > < '(x+1+2.0) => x+3.0
< >
< > These examples muddy the water, because they clearly are
< > 'simplifications'. There is some arbitrary line that separates a
< > 'simplification' from an 'evaluation' (e.g. in your examples above, one
< > can say that the '+' function is being evaluated.). I was trying to
< > find the line, because it is not where I would naively put it.
<
< The difference is that simplification (in Maxima) is the application
< of identities, that is, equations which hold for all values of any
< variables involved. I guess this isn't explicitly stated anywhere
< in the documentation. Whether or not the identities in questions
< actually make something 'simpler' is beside the point (for the
< purpose of the definition).
<
< Numerical evaluation of built-in functions fit into this scheme in
< the sense that the value of the function must be exactly its
< numerical value. (Simplification of gamma function for integer
< or half-integer values has the same motivation.)
<
< There is some fuzziness here. E.g. x - x = 0 isn't an identity,
< nor is x/x = 1, but Maxima applies them happily.
<
< > < I think this all belongs to a section on simplification in general, which
< > < clarifies that x+1+2.0 == "+"(x,1,2.0) and that Maxima applies
< > < simplification to all mathematical operators. ?The section should also
< > < cross-reference pattern-matching as a way of users' defining simplifying
< > < mathematical functions.
< >
< > Yes, this sounds like an excellent idea. The manual, at the moment,
< > suffers from the problem that it is well-nigh impenetrable to
< > non-acolytes. This is especially true of the sections on simplification
< > and pattern-matching.
<
< True enough about pattern matching, but I'm not sure that there
< is any simpler way to describe the behavior of the code.
< (I'm not sure which sections you mean by "the sections on
< simplification" since there isn't any section specifically about
< simplification. This, in itself, is a problem, of course.)
< To make the documentation simpler probably requires reworking
< the code. I;m not opposed to that btw.
Thanks, Robert, this has been helpful.
Section 7 of the Maxima manual is entitled 'Simplification' and 36 is
entitled 'Rules and Patterns'.
Making the documentation 'simpler' means, in my mind, giving an
exposition which provides:
-an explanation why maxima does what it does (explain the `maxima way`)
-good examples, in increasing complexity, of how to use these tools
(a tutorial).
Leo
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.