In many situations, the index set is not simply an explicit list of elements, as in I = {1,…,n}. Of course, any set expression can be used to construct the index set I. Hence, I could be the union or the intersection of other sets as in the following expression:

This kind of modification does not change anything for the indexed notation. It is immaterial, how the index set is constructed. Sometimes, however, we construct I as a subset of another set, say J, such that I ⊆ J, and we use the notation:

where P(j) is a property about j ∈ J that is either true or false. The notation means: “for all j ∈ J such that P(j) is true”. Clearly, if P(j) is true for all elements in J then the two sets are equal (I = J). However, normally P(j) expresses a property that is true only for a proper subset of J. Using I in an indexed notation, we could write:

However, it is more common and much shorter to use the notation which is as follows:

Hence, we attach the property P(j) directly to the indexing term starting it with the symbol ∣. This is extremely useful and very common in modeling. Suppose we have a list of products. Then it is very common to sum over different subsets of products, for instance “all products for which the demand is larger than x” or “all products that are green” or whatever. It would be exaggerated to generate an explicit named index set each time.

Here are several examples: Suppose we have x_{1} = 10, x_{2} = 8, x_{3} = 2, x_{4} = 15, and x_{5} = 22.
Furthermore, P(i) is defined to be “x_{i} ≤ 9”, and Q(i) is defined as “i ≥ 4” with i ∈ I = {1…5}.
Then the evaluation of the following expressions is:

In the first expression P(i) is true only for x_{2} and x_{3}, hence the sum take place only over these
two terms. In the second expression, Q(i) is true only for i = 4 and i = 5.

There is no need to explicitly name the properties; their corresponding expressions could be directly used in the indexing terms. Hence the two previous expressions could also be written as:

We can write any Boolean expression after ∣… in the indexing term. This expression is called indexing condition.

Other examples with k ∈ K = {1…100} are as following:

∑
_{k∈K∣k2≤100}k | = | 1 + 2 + … + 10 | = | 55 | ||||||

∑
_{k∈K∣3≤k≤5}k^{2} | = | 3^{2} + 4^{2} + 5^{2} | = | 50 | ||||||

∑
_{k∈K∣k is prime}k | = | 2 + 3 + 5 + 7 + 11 + 17 + ... + 97 | = | 1060 |

In the first expression k^{2} ≤ 100 is only true for 1 ≤ k ≤ 10. In the second expression, only
3, 4, 5 are allow for k. In the third, we say to take every k up to 100, such that k is
prime.

We saw, to extend the indexing term from “i ∈ I” to “i ∈ I∣P(i)” does not change the meaning of the indexed notation. The expression i ∈ I∣P(i) is still a set albeit a subset of I that has no explicit name. However, no further concept has been added to the indexed notation.