So suppose I have integer variables $x_1,x_2,\dots,x_N$ and I enforce that the integer variables are bounded i.e $1 \leq x_i \leq N$
I was interested in posing a constraint so that in the collection $\{ x_i\}$ I would see all values $1,\dots,N$. This is to say that each variable $x_i$ is assigned uniquely a value in the interval $1,\dots,N$.
One way to do this constraint I thought was to just do:
$$\prod_{i=1}^{N} x_i = N! = N(N-1)(N-2)\cdots(2)(1)$$
I believe this fits the bill, but is there a better way of how to pose this constraint? I would suspect integer solvers would have difficulty with this constraint - perhaps there is a better formulation? I could not figure out a straightforward linear representation, and would be interested in seeing if one exists. I know from linear programming I could do $|x_i-x_j| =|e_{i,j}|\geq 1, i\neq j$, but I think this eventually will lead to a similar constraint $e^+e^-$=0.