# How to compare ImplicitRegion with empty region?

I have the following function using ImplicitRegion:

Region222[a_] :=
ImplicitRegion[
Sqrt[x^2 + y^2 - a^2] >= 9, {{x, a, a + 2}, {y, a, a + 1}}]
Region222Reduced[a_] :=
MapAt[Reduce, Region222[a], 1]
Function12[a_] := If[Region222Reduced[a] == EmptyRegion, 0, 222]


Function12 should compare ImplicitRegion with the empty region and return 0 if they coincide and 222 if they don't coincide. But it does not work properly for the case when the region does not coincide with EmptyRegion.

Could you please tell me what I do incorrectly?

Perhaps you can use one of the following predicates instead:

predicate1[region_] := RegionDimension[region]<0
predicate2[region_] := RegionMeasure[region] == 0


region = Region222
predicate1[region]
predicate2[region]


ImplicitRegion[ Sqrt[-9 + x^2 + y^2] >= 9 && 3 <= x <= 5 && 3 <= y <= 4, {x, y}]

True

True

And a non-empty region:

region = Region222
predicate1[region]
predicate2[region]


ImplicitRegion[ Sqrt[-100 + x^2 + y^2] >= 9 && 10 <= x <= 12 && 10 <= y <= 11, {x, y}]

False

False

You can use RegionEqual for this.

RegionEqual[Region222, EmptyRegion]

True

RegionEqual[Region222, EmptyRegion]

False

RegionEqual[Region222[a], EmptyRegion]

-9 < a <= -5 || 0 <= a < -3 + Sqrt

• RegionEqual doesn't work so well for inexact regions, as in the OP's previous queston. Oct 9 '18 at 18:49
• I think this is a common problem with a lot of the region functions. In:= predicate3[region_] := RegionEqual[region, EmptyRegion] In:= Through[{predicate1, predicate2, predicate3}[ Region222[#[-3 + Sqrt]]]] & /@ {Identity, N} Out= {{False, False, False}, {True, True, True}} Oct 9 '18 at 21:35