A regression in Maxima 5.17.1 with limits and assumptions?
Subject: A regression in Maxima 5.17.1 with limits and assumptions?
From: Robert Dodier
Date: Wed, 24 Dec 2008 11:21:28 -0700
On 12/23/08, Barton Willis <willisb at unk.edu> wrote:
> getting that to work is a puzzle -- does it require our favorite ev?
I don't think so --- I think a macro + buildq is just right.
simp_using (e, [a]) ::=
buildq ([e, a], block ([c%], unwind_protect ((supcontext (c%), apply
(assume, a), e), killcontext (c%))));
macroexpand (simp_using (asksign (x), x > 0));
=> block([c%], unwind_protect((supcontext(c%),
apply(assume, [x > 0]), asksign(x)), killcontext(c%)))
load (unwind_protect);
simp_using (asksign (x), x > 0);
=> pos
Probably buildq should substitute a gensym for the name of the context.
Maybe supcontext() (no args) should gensym the context name;
at present supcontext complains if not given the context name.
I've convinced myself that syntax to help distinguish arguments
which have different purposes is usually a good idea.
In this case something like:
simplify asksign (x) assuming x > 0;
or maybe
simplify (asksign (x) assuming x > 0);
I like the latter; the obvious parallel is simplify(asksign(x)) (no
assumptions).
Of course, that suggests there could be a function named "simplify" ....
FWIW
Robert