In reply to Alokpati:
It will work as solver should take care of it to satisfy the constraint.
There is No constraint ( direct / indirect ) however to ensure this .
The constraint solver could solve the equation ( arr[i]==d ) to be 0 always thereby giving only Unique elements .