there are probably at least 2 different concepts at work here.
simplification of if A then x else x
could plausibly be replaced by x.
using "if" as a programming construct requires that
(exactly) one branch be evaluated.
Maybe there should be 2 different pieces of syntax.
Just as using "x" as an indeterminate as in diff(f(x),x),
and using "x" as a programming variable as in x: 34
leads to problems.
RJF