# RegionIntersection not returning what I expected

Consider the following implicit region defined on one variable

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


If I Reduce this system, I obviously get

Reduce[reg]


False

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[]?

• A simpler example (MWE): RegionIntersection[ImplicitRegion[C11 > 0 && C11 < 0, {C11}]] – Michael E2 Mar 4 '19 at 12:38
• @MichaelE2 Thanks. So, why it is not returning EmptyRegion[]? Are my expectations wrong? – apt45 Mar 4 '19 at 12:40
• Try DiscretizeRegion[ImplicitRegion[reg, {C11}]] -- I suppose regions are closed (i.e. boundaries are added). I don't know for sure though. – Michael E2 Mar 4 '19 at 12:41
• RegionIntersection[ImplicitRegion[C11 > 0 && C11 < 0, {C11}]] //ArcLength evaluates to zero! – Ulrich Neumann Mar 4 '19 at 12:43
• 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". – 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]
(*
EmptyRegion
EmptyRegion
*)


Simplification:

MapAt[Simplify, ireg, 1]
MapAt[Reduce, ireg, 1]
(*
EmptyRegion
EmptyRegion
*)


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

$$\underline{\mathbf{UPDATE}}$$

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


returns:

EmptyRegion

• I don't see how this answers the question....and some of this answer was noted in the comments. – Michael E2 Mar 5 '19 at 2:16
• 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. – Michael E2 Mar 5 '19 at 11:49