How to check if region made by one IntervalBox() contains a region made by another IntervalBox()?


I want to check if Z = IntervalBox(-1..1, 4) lies in F = f(X...) where f(a, b, c, d) = [a, b, c, d] is a vector function, and X=IntervalBox(-10..10, 4) . Using IntervalArithmetic.jl package, I tried Z \in F and Z \subseteq F . Both command give false . Could you please let me know how can I check whether F contains Z or not? The result should be true as region F contains region Z.

Thank you

I think the problem is that IntervalArithmetic might not have an internal definition for \subseteq (or at least there might be some bug - because calling methods(⊆) outputs methods for issubset). This might warrant deeper investigation (I suggest also checking the issues section and potentially reporting a new issue).

However, \subset is doing the job. Both the following are evaluated as true in the context stated by your MWE:

Z ⊂ X
X ⊃ Z

# alternatively, you can use:
issubset(Z, X) # true