Interval Arithmetic with Symbolic Intervals

I've run into a problem with IntervalUnion and IntervalIntersection when dealing with symbolic intervals.

The following code should give Interval[{a,b},{c,d}]

IntervalUnion[Interval[{a, b}], Interval[{c, d}]]


...however it spits itself back unevaluated. The same goes for:

IntervalIntersection[Interval[{a, b}], Interval[{c, d}]]


Which one would hope generates another Interval, yet again is unevaluated. But everything is fine as long as you use numbers, for instance:

IntervalIntersection[Interval[{1.2, 3.9}], Interval[{2.6, 5.1}]]


... gives the expected Interval[{2.6, 3.9}]. It seems counterintuitive that I can't use them with symbols. I came across this when trying to find the shared support of two probability distributions (which does nothing):

IntervalIntersection @@ (DistributionDomain /@
{TriangularDistribution[{0, k}, 0], UniformDistribution[{0, 1}]})

(*Result: IntervalIntersection[Interval[{0, k}], Interval[{0, 1}]]  *)


I'd hope to see the result Interval[{0,Min[1,k]}] or is that asking too much of Mathematica to generate assumptions on the k? Mathematica is already good at generating piecewise functions for variables assumptions in many other contexts, but not here. Something like this would be incredibly useful, especially if you wanted to do symbolic intergration restricted to the intersection of lots of symbolic intervals without going through them all or generating a big list of x\[Element]s1 && x\[Element]s2 && x\[Element]s3 ... constraints.

• I've been trawling through the documentation and there is no mention of intervals with symbols, only numbers and Infinity... so it's presumably unimplemented. – Histograms May 26 '15 at 0:18
• This might have something to do with the fact that everything is taken to be complex-valued unless explicitly told otherwise. What if you wrap things in an Assuming[] with the necessary assertions? – J. M. will be back soon May 26 '15 at 1:06
• OK, this produces a better result, but I don't why we have to use {x}: Reduce[{x} \[Element] RegionUnion[Interval[{a, b}], Interval[{c, d}]] && x \[Element] Reals, {x, a, b, c, d}, Reals]. – Michael E2 May 26 '15 at 1:21
• @Guesswhoitis. still just prints itself. I tried doing an internal trace but it got me nowhere. I'm thinking that while this may not necessarially be a bug since the documentation doesn't mention symbolic interval endpoints, this is an overlooked feature that could potentially confuse a lot of users. – Histograms May 26 '15 at 1:33
• Some evidence that M does not do much with symbolic intervals: FullSimplify[IntervalUnion[Interval[{a, b}], Interval[{a, b}]]] returns IntervalUnion[Interval[{a, b}], Interval[{a, b}]]. However, RegionUnion works as one would expect. – Michael E2 May 26 '15 at 1:36