Nested for-loop math notation
The $\sum$ notation is specifically summation. There is also product notation:
$$n! = \prod_{i=1}^{n} i $$
But I think what you want is some kind of Zermelo-Fraenkel notation?
$$\left\{ f(a,b)\,|\,a,b \in P \right\}$$