There are actually a couple of interacting problems here.
(1) Should branches of conditionals be simplified when the conditional expression is simplified?
(2) Should errors be triggered in simplification?
At present branches of conditionals are simplified, and errors are triggered in simplification (e.g. 1/0, log(0), gamma(0)).
Either (1) or (2) or both could go the other way. My own preference is for (1) but not (2), i.e. continue to simplify branches, and prohibit errors in simplification.
Given the current policies (1) and (2), the observed behavior is to be expected; I guess it's a misfeature but I don't know if it's accurate to call it a bug.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I guess there's actually (3) should relational expressions simplify to Boolean values (when possible), and (4) should conditional expressions in which conditions are literal true or false simplify to the appropriate branch.
Current policy is neither (3) nor (4). I'm pretty sure I 'm in favor (3) and probably (4) as well.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, I think subst is just incidental here.
There are actually a couple of interacting problems here.
(1) Should branches of conditionals be simplified when the conditional expression is simplified?
(2) Should errors be triggered in simplification?
At present branches of conditionals are simplified, and errors are triggered in simplification (e.g. 1/0, log(0), gamma(0)).
Either (1) or (2) or both could go the other way. My own preference is for (1) but not (2), i.e. continue to simplify branches, and prohibit errors in simplification.
Given the current policies (1) and (2), the observed behavior is to be expected; I guess it's a misfeature but I don't know if it's accurate to call it a bug.
I guess there's actually (3) should relational expressions simplify to Boolean values (when possible), and (4) should conditional expressions in which conditions are literal true or false simplify to the appropriate branch.
Current policy is neither (3) nor (4). I'm pretty sure I 'm in favor (3) and probably (4) as well.