-2

I'd like to have in Python the list of the conditions to have an non empty intersection of two intervals, where their bounds are only symbolic. For example for this input:

a,b,z = Symbols('a b z')
intersect([a,b],[a,b]/z)

the output should be the list of the conditions on z such that this intersection is non empty.

Thank you

1 Answers1

0

General intersections code is implemented in this SymPy PR that could be used to do this, but it is not wired directly into Set intersections; it is used to resolve intervals in which something like Piecewise((1, And(x<b,x>c)), (2, x<d), (0, True)) will give the different values of 1, 2 or 3. But I am not sure what you mean by [a,b]/z.

smichr
  • 16,948
  • 2
  • 27
  • 34