fix inconsistent typing in divisor()
Merge pull request #2197 from zanzibar7/issue3882

fix inconsistent typing in divisor()
simplify(): Call piecewise_fold for expr with Piecewise (issue 3902)