Consider the following implicit region defined on one variable

reg = {x > 0 && x < 0}

If I Reduce this system, I obviously get



However, If I use

RegionIntersection[ImplicitRegion[reg, {x}]]

I expect to get EmptyRegion[], instead I get the output

ImplicitRegion[x > 0 && x < 0, {x}]

Why does RegionIntersection not return EmptyRegion[]?

  • 1
    $\begingroup$ A simpler example (MWE): RegionIntersection[ImplicitRegion[C11 > 0 && C11 < 0, {C11}]] $\endgroup$ – Michael E2 Mar 4 '19 at 12:38
  • $\begingroup$ @MichaelE2 Thanks. So, why it is not returning EmptyRegion[]? Are my expectations wrong? $\endgroup$ – apt45 Mar 4 '19 at 12:40
  • $\begingroup$ Try DiscretizeRegion[ImplicitRegion[reg, {C11}]] -- I suppose regions are closed (i.e. boundaries are added). I don't know for sure though. $\endgroup$ – Michael E2 Mar 4 '19 at 12:41
  • $\begingroup$ RegionIntersection[ImplicitRegion[C11 > 0 && C11 < 0, {C11}]] //ArcLength evaluates to zero! $\endgroup$ – Ulrich Neumann Mar 4 '19 at 12:43
  • $\begingroup$ Reply to comment: If I knew why, I'd answer. You could simplify the question, though, by editing to the question to show a "minimal working code example". $\endgroup$ – Michael E2 Mar 4 '19 at 12:44

Region-combination functions such as RegionIntersection call BooleanRegion to compute the result. For instance, RegionIntersection[reg1, reg2,…] is equivalent to BooleanRegion[And, {reg1, reg2,…}]

In turn, BooleanRegion seems to apply some basic logic to eliminate unnecessary computation. The following and their equivalent RegionIntersection calls return region without inspecting, simplifying, or otherwise altering region:

BooleanRegion[And, {region}]
BooleanRegion[And, {region, region}]  (* DeleteDuplicates[] is used to remove copies *)
BooleanRegion[And, {region, FullRegion[n]}]  (* where n is the dimension of region *)

Possible workarounds include intersecting region with a region distinct from region and FullRegion[n] that covers region. Simply specifying a full region as an ImplicitRegion or changing the variables in region suffice. Unfortunately Simplify[ImplicitRegion[..]] does nothing. In this case, if we apply Simplify or Reduce to the first argument gets around this.

ireg = ImplicitRegion[x < 0 && x > 0, {x}]
yreg = ireg /. x -> y  (* change variable *)
fullreg = ImplicitRegion[-Infinity < x < Infinity, {x}] (* a disguised full region *)
  ImplicitRegion[x < 0 && x > 0, {x}]
  ImplicitRegion[y < 0 && y > 0, {y}]
  ImplicitRegion[-∞ < x < ∞, {x}]

RegionIntersection[ireg, yreg]
RegionIntersection[ireg, fullreg]


MapAt[Simplify, ireg, 1]
MapAt[Reduce, ireg, 1]

It seems Mathematica is missing a RegionSimplify or RegionReduce function. At least, I didn't find one.

|improve this answer|||||


Q = ImplicitRegion[x > 0 && x < 0, {x}];
Q = If[RegionDimension[Q] == -\[Infinity], EmptyRegion[1]]


|improve this answer|||||
  • $\begingroup$ I don't see how this answers the question....and some of this answer was noted in the comments. $\endgroup$ – Michael E2 Mar 5 '19 at 2:16
  • $\begingroup$ The region of intersection is the empty region, which is one of the OP's points. The question is how to get it to simplify to it. It's okay to repeat from the comments, but usually the practice is to acknowledge the prior post(s). -- Not sure why the downvotes here. $\endgroup$ – Michael E2 Mar 5 '19 at 11:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.