I don't understand what you're getting at with the second part of this comment.  Folding an integral into the parts of piecewise returns incorrect results.

```
>>> from sympy import *
>>> from sympy.abc import x
>>> p = Piecewise((x, x < 1), (1, x >= 1 ))
>>> piecewise_fold(Integral(p,(x,0,2))).doit()
Piecewise((2, Or(x < 1, x >= 1)))
```
To be robust, `piecewise_fold` should not be allowed for certain operators (but that's a different bug).