"What do you think?
There are simplifications involving sums and products of these functions
that would be difficult to detect; for example
x * (left_continuous_step(x) - right_continuous_step(x)) = 0.
Some days I think we should concentrate on making Maxima conditionals (if
then else)
better instead of appending more step-like functions. It be great if Maxima
do
(if x < 0 then 0 else 1) - (if x <= 0 then 0 else 1) --> if x = 0 then 1
else 0
and
x * (if x = 0 then 1 else 0) --> 0.
At least for linear inequalities, I think this is algorithmically possible."
I have made small changes to pw.mac which makes this possible for simple
cases.
Now you can do this.
(%i2) load(pw)$
(%i3) (if x < 0 then 0 else 1) - (if x <= 0 then 0 else 1);
(out3) (if x < 0 then 0 else 1) - (if x <= 0 then 0 else 1)
(%i4) iif2ifthen(pwsimp(%,x,iif));
(out4) if equal(x, 0) then 1 else 0
"I think this is algorithmically possible."
Yes, it is possible but maybe it should not be part of pw.mac. Pw does it
by converting to iif() then to signum() expressions and then simplifying
them and then converting back to if then. You could start there.
Basically what happened is that if then was converted to a math expression
then converted back to English. In the process it gets simplified.
I would begin by looking at how pwsimp() works in pw.mac. As far as the
Heavyside step function is concerned, I am not for or against it. I suppose
it is more well known than the signum() function historically. The version
that returns 1/2 at zero would be especially easy to work with.
Rich