I have a set of sets $G = \{D_{0,0}\,D_{0,1}\,D_{0,2}\,D_{1,0},...,D_{n,0}\,D_{n,m}\} $
What I know want to express is a constraint that for each set in $ G $, if $ x \in D_{0,0} $ then the statement $ y \in D_{0,1} $ can't be true. So basically, if the set with index 0 has the element $x$ in it, the set with index 1 is not allowed to have an element y. Now the problem is, that I want to have this constraint for all the possible combinations.
$ D_{0,0} $ and $ D_{0,1} $, $ D_{0,1} $ and $ D_{0,2} $, $ D_{1,0} $ and $ D_{1,1} $, and so on. In programming this would basically be a nested for loop. But how would I express something like that in Mathematics?
What I have so far is this: I count all the violations, and if they are 0, it is correct. Is this possible in Mathematics?
$\sum_{i = 1}^{n} \sum_{j = 1}^{m-1} x \in D_{i,j}\wedge y \in D_{i,j+1})=0 $