Refine¶
Simplifies expressions using assumptions.
A finite factor with a known sign collapses factor * Infinity to the
correctly-signed infinity:
A condition the assumption settles collapses the head around it:
Step functions resolve once the assumption fixes the sign of the argument:
A chained inequality settles the rounding functions whenever the range cannot straddle a boundary:
$ wo '{Refine[Floor[x], 0 < x < 1], Refine[Ceiling[x], 0 < x < 1], Refine[IntegerPart[x], -1 < x < 0]}'
{0, 1, 0}
A range that can straddle one is left alone — x may be 1 below, and Round
turns over at ½:
The sign such a range implies reaches the other refinements too: