I have created a simplifying function iif(). The code is below. For some reason if I use simp_assuming() instead of my
own concoction it does not work right. The problem is that some facts that were assumptions are left on the facts() db.
I don't know why but was wondering if this might be a bug. Since I don't like to reinvent the wheel, if it is a bug
then I would get rid of my assuming and use simp_assuming(). Here is the code.
simpiif(__cnd, __a, __b):=
block(
[prederror:false],
if is(__cnd)=true then
__a
elseif is(__cnd)=false then
__b
else
simpfuncall('iif, __cnd, simp_assuming(__a, __cnd), simp_assuming(__b, not __cnd))
)$