import hedrax as hdx
import seaborn as sns
sns.set_theme(style="darkgrid")
domain = """
{ [i0, i1] : (i1 <= 18 - 2i0 and i1 <= 9 + i0 and 2i1 >= 24 - i0) or
(i1 >= -41 + 3i0 and 35 - i0 <= i1 < i0) or
(24 - i0 <= i1 <= 29 - i0 and 2 + 2i0 <= 3i1 <= 7 + 2i0) or
(i1 >= 12 and 63 - 3i0 <= i1 <= 72 - 3i0 and i1 <= 16) or
(11 <= i0 <= 13 and 2 <= i1 <= 6) or
(6 <= i0 <= 8 and 2 <= i1 <= 6) or
(i0 >= 4 and i1 >= -22 + 2i0 and 6 <= i1 <= 26 - i0 and i1 <= 14 and i1 <= 2 + 2i0) }
"""
addressess, unravel = hdx.compile_table_indexer(domain)
points = unravel(addressess)
ax = sns.scatterplot(x=points[:, 0], y=points[:, 1], color="purple")