Here's an approach using Reduce
.
The first step is to construct all of the inequalities. Consider a bit vector $b(1, 0, 1, 0)$. The inequalities that can be generated with this vector are $b(1, 0, 1, 0 \ge b(0, 0, 1, 0)$ and $b(1, 0, 1, 0) \ge b(1, 0, 0, 0)$. Basically, for each bit vector, subtract 1 from each nonzero position, and create the inequality. Here is some code that does this:
monotone[n_, max_] := Module[{ineq, tup, z = Array[w, 2^n, 0]},
eqns = Flatten @ Table[
If[Min[t - UnitVector[n, k]]>=0,
w[toNumber[t, n]] >= w[toNumber[t-UnitVector[n,k], n]],
Nothing
],
{t, Rest @ Tuples[Range[0, 1], n]},
{k, n}
];
res = Reduce[
And@@eqns && Min[z]>=0 && Max[z]<=max,
z,
Integers
];
Values @ {ToRules @ res}
]
toNumber[t_, n_] := NumberCompose[t, 2^Range[n-1, 0, -1]]
Let's check the two simple cases:
monotone[2, 1]
% //Length
{{0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 1, 1}, {0, 1, 0, 1}, {0, 1, 1, 1}, {1, 1,
1, 1}}
6
monotone[3, 1]
% //Length
{{0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 1}, {0, 0, 0, 0, 0, 0, 1,
1}, {0, 0, 0, 0, 0, 1, 0, 1}, {0, 0, 0, 0, 0, 1, 1, 1}, {0, 0, 0, 0, 1, 1,
1, 1}, {0, 0, 0, 1, 0, 0, 0, 1}, {0, 0, 0, 1, 0, 0, 1, 1}, {0, 0, 0, 1, 0,
1, 0, 1}, {0, 0, 0, 1, 0, 1, 1, 1}, {0, 0, 0, 1, 1, 1, 1, 1}, {0, 0, 1, 1,
0, 0, 1, 1}, {0, 0, 1, 1, 0, 1, 1, 1}, {0, 0, 1, 1, 1, 1, 1, 1}, {0, 1, 0,
1, 0, 1, 0, 1}, {0, 1, 0, 1, 0, 1, 1, 1}, {0, 1, 0, 1, 1, 1, 1, 1}, {0, 1,
1, 1, 0, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1}}
20
The case with $n=4$ takes a bit more time:
s = monotone[4, 1]; //AbsoluteTiming
s //Length
{37.3793, Null}
168
in agreement with the linked reference. Finally, an example that isn't just 0s and 1s:
monotone[2, 2]
% //Length
{{0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 0, 2}, {0, 0, 1, 1}, {0, 0, 1, 2}, {0, 0,
2, 2}, {0, 1, 0, 1}, {0, 1, 0, 2}, {0, 1, 1, 1}, {0, 1, 1, 2}, {0, 1, 2,
2}, {0, 2, 0, 2}, {0, 2, 1, 2}, {0, 2, 2, 2}, {1, 1, 1, 1}, {1, 1, 1,
2}, {1, 1, 2, 2}, {1, 2, 1, 2}, {1, 2, 2, 2}, {2, 2, 2, 2}}
20
f[0,0,0] =0
andf[1,1,1] =1
? Or, areConstantArray[0, 2^n]
andConstantArray[1, 2^n]
monotone? $\endgroup$n=2
the full list is{{0, 0, 0, 1}, {0, 0, 1, 1}, {0, 1, 1, 1}, {0, 1, 0, 1}}
? $\endgroup$