[Maxima] the argument simp:false
robert.dodier at gmail.com
Tue Sep 1 10:40:22 CDT 2009
On Mon, Aug 31, 2009 at 5:22 PM, Alejandro Jakubi<jakubi at df.uba.ar> wrote:
> The examples for 'tellsimp' in the manual include the statement
> ev (tellsimp (0^0, 1), simp: false);
That example unnecessarily introduces a question about ev,
which is something of a mess ... it would be simpler to understand
(%i3) tellsimp (0^0, 1);
(%o3) [^rule1, simpexpt]
It's often necessary to bind simp to false when constructing
simplification rules. Otherwise the existing rules can interfere
with the one you are trying to define.
> "simp causes expr to be simplified regardless of the setting of the switch simp
> which inhibits simplification if false."
> and I interpret this sentence as describing a situation like:
> (%i2) simp : false$
> (%i3) ev(1 + 1, simp);
> (%o3) 2
> rather than the previous one.
Yes, you're right.
> So, I wonder whether this argument "simp: false" is undocumented.
Well, ev(expr, foo:bar) or equivalently ev(expr, foo=bar) just means
to evaluate expr while foo is temporarily bound to bar.
Some flags (the so-called evflags; ? evflag tells about that) have the
property that ev(expr, foo) is equivalent to ev(expr, foo=true).
ev has accumulated a lot of disparate functionality over the years.
More information about the Maxima