The possible cardinalities $c+1$ of the set $\{i,j,k,l,m,n\}$ are, of course, $1$ through $6$ inclusive, corresponding to $c=0$ through $5$. Because the question concerns only the relative orders of its elements, then we may--without any loss of generality--replace the elements by their ranks from $0$ (for the smallest) through $c$.
Because the answers I will obtain differ from those offered in another reply, I am going to proceed as carefully as possible so that any possible misunderstandings will be clearly exposed. This solution progresses in two steps, as suggested in the question: a brute-force listing of "partial" solutions, or "candidates," followed by a further test to select those that are truly solutions. It's easy to check that these tests implement the criteria of the question, so the crux of the matter is to verify that this procedure generates all possible solutions.
###Step 1: assuring the first set of inequalities###
To assure that $i\lt j$, $k\lt l$, and $m\lt n$, use Table
to enumerate all such partial solutions:
Flatten[Table[{{i, j}, {k, l}, {m, n}},
{i, 0, c}, {j, i + 1, c}, {k, i, c}, {l, k + 1, c}, {m, k, c}, {n, m + 1, c}], 5]
The output is a list of lists in the form $\{\{i,j\},\{k,l\},\{m,n\}\}$. The tabulation clearly assures the three inequalities; I claim it produces all possible solutions to those three inequalities. I hope the claim is clear, because the tabulation makes the ranges of $i,\ldots,n$ as wide as possible subject to the three constraints. All the ranges have the largest possible upper limit of $c$. The lower limit of $0$ for the $i$ range is unexceptional. $j\gt i$ implies $j \ge i+1$ justifies the lower limit of the $j$ range. $(i,j)\lt(k,l)$ implies $i\le k$, justifying the lower limit of $i$ for the $k$ range. The other three lower limits are similarly justified.
It is also clear, since all ranges run from $0$ through $c$, that the cardinalities cannot exceed $c+1$. However, they could be less than that. We will have to watch out for this below.
###Step 2: assuring the lexicographic inequalities###
The preceding tabulation includes too much: the lexicographic inequalities might not be satisfied. Use Select
to pick out the tabulated sequences that satisfy these inequalities. In addition, to assure that precisely the requested cardinality is achieved, adjoin a cardinality check to the selection criterion.
This is sufficiently straightforward that at this juncture I will offer the full solution, encapsulated in a Module
:
f[card_Integer] := Module[{c = card - 1, lt, good},
lt[{i_, j_}, {k_, l_}] := i < k || (i == k && j < l); (* Lexicographic order *)
good[{{i_, j_}, {k_, l_}, {m_, n_}}] := {i, j}~lt~{k, l} && {k, l}~lt~{m, n};
Select[Flatten[Table[{{i, j}, {k, l}, {m, n}},
{i, 0, c}, {j, i + 1, c}, {k, i, c}, {l, k + 1, c}, {m, k, c}, {n, m + 1, c}], 5],
good[#] && Length[Union[Flatten[#]]] == card &]];
It is evident that good
checks the lexicographic order. The final criterion on the length winnows out any candidates whose cardinality is too small.
It will become evident that this solution could be made more efficient: for instance, we can always take $i=0$. But no matter: it is most important that the solution be as clear and convincing as possible; speed improvements will be unnecessary.
###The solutions###
To assess the scope of the solutions, let's generate and count them all:
Length /@ f /@ Range[6] // AbsoluteTiming
$\{0.0140008,\{0,0,1,16,30,15\}\}$
The code is fast and has generated $62$ solutions for cardinalities through $6$.
Their numbers are small enough to let us inspect them.
f[3]
$\{\{\{0,1\},\{0,2\},\{1,2\}\}\}$
That is, $i=k=0$ are the two smallest values, $j=m=1$ are the next two, and $l=n=2$ the largest. This is the solution named in the question itself.
It is convenient to use a visual representation when inspecting larger numbers of solutions. Let's draw smaller values in darker colors, graduating to lighter ones:
display[f_List] := Grid[Partition[ArrayPlot[#, ColorFunction->"BlueGreenYellow"]& /@ f, 8,8,1,""],
ItemSize -> 3]
Thus the preceding cardinality-$3$ solution will use just three distinct colors:
display[f[3]]
Visually, the constraints of the question translate to
Each right-hand square must be brighter than its neighbor to the left.
Each row must be brighter than the one above it, in the lexicographic sense: either its left square is brighter or, if the left squares are the same color, the right square is brighter.
Here, then, are all the remaining solutions arranged by cardinality (i.e., numbers of distinct colors):
display[f[4]]
display[f[5]]
display[f[6]]