Suppose that $(i, j), (k, l)$ and $(m, n)$ are pairs of non-negative integers, satisfying the following constraints:
$$i < j,\;\; k < l, \;\; m < n$$
and
$$ (i, j) < (k, l) < (m, n)$$
...where the ordering of the pairs implied by the last set of inequalities is the lexicographic one (e.g. $(i, j) < (k, l)$ iff either (1) $i < k$, or else (2) $i = k$ and $j < l$).
For each possible cardinality of the set $\{i,j,k,l,m,n\}$, I would like to find, subject to the constraints above, all the possible configurations of equality and inequality relationships among elements of the set that would yield such a cardinality. For example, cardinality 3, one such configuration would be
$$i = k, j = m, l = n$$
The brute-force solution to this problem would be to generate all possible configurations of equality/inequality relationships among the six variables, weed out the ones that are inconsistent (either internally or relative to the constraints), and finally classify the remaining configurations according to the cardinality they imply.
I think I can write the Mathematica code to generate all the possible configurations, but I'm not sure how to weed out the ones that are inconsistent, or incompatible with the constraints.
To give an example of what I mean by "configuration", consider the simpler problem where we have only three variables $i, j, k$, and only one constraint, $i < j$. The following are three possible configurations:
$$i < j,\;\; j < k, \;\; i < k$$ $$i < j,\;\; j = k, \;\; k = i$$ $$i > j,\;\; j > k, \;\; i > k$$
The first one is OK, the second one is internally inconsistent, and the third one is incompatible with the constraint.
When I enter the above expressions in Mathematica, it just returns them verbatim:
In[1]:= i < j && j < k && i < k
Out[1]= i < j && j < k && i < k
In[2]:= i < j && j == k && i == k
Out[2]= i < j && j == k && i == k
(I had hoped that the first expression would have evaluated to True
and the second one to False
.)
Does Mathematica provide a convenient way to weed out the invalid configurations?
In[386]:= Reduce[{i < j, j == k, k == i}, {i, j, k}] Out[386]= False
$\endgroup$In[1]
. $\endgroup$i<j
(for instance) is actually True. It is possible that this statement could be False, in which case the whole thing is False $\endgroup$In[1]
andIn[2]
) are tautologicallyFalse
, irrespective of the truth value of the individual components. $\endgroup$In[1]
andIn[2]
are not compatible? That is true, but you haven't made any assignments in the above and so the second cannot be shown to beFalse
without assigning, for instance,i<j
to beTrue
. Having run the first line, Mathematica does not remember thati
is less thanj
. $\endgroup$