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[1]
EmptyRegion[1]
*)
Simplification:
MapAt[Simplify, ireg, 1]
MapAt[Reduce, ireg, 1]
(*
EmptyRegion[1]
EmptyRegion[1]
*)
It seems Mathematica is missing a RegionSimplify or RegionReduce function. At least, I didn't find one.
RegionIntersection[ImplicitRegion[C11 > 0 && C11 < 0, {C11}]]– Michael E2 Mar 04 '19 at 12:38EmptyRegion[]? Are my expectations wrong? – apt45 Mar 04 '19 at 12:40DiscretizeRegion[ImplicitRegion[reg, {C11}]]-- I suppose regions are closed (i.e. boundaries are added). I don't know for sure though. – Michael E2 Mar 04 '19 at 12:41RegionIntersection[ImplicitRegion[C11 > 0 && C11 < 0, {C11}]] //ArcLengthevaluates to zero! – Ulrich Neumann Mar 04 '19 at 12:43RegionDimensionyields-Infinity, which is consistent withEmptyRegion[1]and not with a singlePoint(which is whatDiscretizeRegionreturns). -- Update:RegionIntersection[reg, reg]fails butRegionIntersection[ImplicitRegion[C11 > 0 && C11 < 0, {C11}], ImplicitRegion[C11 < 0 && C11 > 0, {C11}]]returnsEmptyRegion[1]...Hmm, I suspectRegionIntersection[r]does nothing in all cases, perhaps. – Michael E2 Mar 04 '19 at 12:51RegionIntersection[reg, ImplicitRegion[-Infinity < x < Infinity, {x}]]– Michael E2 Mar 04 '19 at 13:07MapAt[Simplify, ImplicitRegion[reg, {C11}], 1]-- in previous comment, I meantregto be wrapped inImplicitRegion[..]– Michael E2 Mar 04 '19 at 16:14