This question is based on this. There are two equations given as solutions by prubin.
However, now I want something different. I want the first constraint to ensure that at least $a$ out of the first $b$ bits in the first group are set to $1$, instead of $0$. The second set of constraints to specify that among the first $b$ bits in each group, if the bit in the first group is $1$ then the corresponding bit in the second group must be $0$. If the bit in the first group is $0$, the corresponding bit in the second group could be either $0$ or $1$. I have these equations as possible solutions (as suggested by prubin in the comments): \begin{align*} \sum_{i=1}^b (1-x_i) & \le b - a\\ x_{i + n} & \ge x_{i} \quad \forall i=1,\dots,b. \end{align*}
Are these constraints correct? I believe the answer is given by @prubin in the last thread at the very end but I still can't figure it out. I believe the first equation is correct now but not the second equation. Please help.