Try trace("not")--I think you'll discover the problem is with "not," and not with
simp_assuming. Try replacing
simp_assuming(__b, not __cnd))
with
simp_assuming(__b, mynot(__cnd)))
where mynot is something like (would need to be extended)
mynot(e) := psubst(["<" = ">=", ">=" = "<"],e);
Right now, I can't decide if this is a bug with "not", an evaluation policy (likely), or ...
--Barton
-----maxima-bounces at math.utexas.edu wrote: -----
>Here?is?a?better?example.??Much?simpler?to?reproduce.??Try
>(%i4)?simpiif(__cnd,?__a,?__b):=
>block(
>????????[prederror:false],
>????????if?not?member(safe_op(__cnd),?[">",?"<",?">=",?"<=",?'equal,
>'notequal,?"not"])?then
>????????????????error("Only?relational?operators?are?allowed?including
>equal(),?notequal()?and?not.")
>????????elseif?is(__cnd)=true?then
>????????????????__a
>????????elseif?is(__cnd)=false?then
>????????????????__b
>????????else
>????????????????/*??????simp_assuming?does?not?work?right?here?for?some
>reason,?it?leaves?facts?on?the?facts?list?
>without?removing?them?all.??Don't?know?why.?*/
>????????????????simpfuncall('iif,?__cnd,?simp_assuming(__a,?__cnd),
>simp_assuming(__b,?not?__cnd))
>)$
>