You may find it more convenient to embed min_index(Vars) in a constraint expression.
As with all constraints that involve indexes, the index starts from 1, unlike Gecode's native indexes that starts from 0 - a dummy first element is added to Collection in the constraint posted to Gecode if Collection is not empty.
ConsistencyModule is the optional module specification to give the consistency level for the propagation for this constraint: gfd_gac for domain (generalised arc) consistency.
This constraint is known as min_index in the global constraint catalog, and is implemented using Gecode's minarg() constraint with tie-break set to false.
[eclipse 1]: min_index([1,2,3], I). I = 1 [eclipse 2]: min_index([1,2,3,1,10,9,10], I). I = I{[1, 4]} [eclipse 4]: L = [A,B,C,D,E], L :: 1..10, min_index(L, 3), C #> 4. L = [A{[5 .. 10]}, B{[5 .. 10]}, C{[5 .. 10]}, D{[5 .. 10]}, E{[5 .. 10]}] A = A{[5 .. 10]} B = B{[5 .. 10]} C = C{[5 .. 10]} D = D{[5 .. 10]} E = E{[5 .. 10]} [eclipse 5]: L = [A,B,C,D,E], L :: 1..10, min_index(L, 3), B #> 4. L = [A{[1 .. 10]}, B{[5 .. 10]}, C{[1 .. 10]}, D{[1 .. 10]}, E{[1 .. 10]}] A = A{[1 .. 10]} B = B{[5 .. 10]} C = C{[1 .. 10]} D = D{[1 .. 10]} E = E{[1 .. 10]} [eclipse 6]: L = [A,B,C,D,E], L :: 1..10, min_index(L, 3), B #< 4. L = [A{[1 .. 10]}, B{[1 .. 3]}, C{[1 .. 3]}, D{[1 .. 10]}, E{[1 .. 10]}] A = A{[1 .. 10]} B = B{[1 .. 3]} C = C{[1 .. 3]} D = D{[1 .. 10]} E = E{[1 .. 10]} [eclipse 7]: [A,B,D] :: 1..10, C :: 20..30, min_index([A,B,C,D], I). A = A{[1 .. 10]} B = B{[1 .. 10]} D = D{[1 .. 10]} C = C{[20 .. 30]} I = I{[1, 2, 4]}