Introduction to set theory
Learn to describe which values belong to a set, then use that description to count and select. Try the questions as you go.
Set-builder notation
The constructive and conditional forms are both called set-builder notation. Use a constructive rule when it is easy to generate the members. Use a condition when it is easy to decide whether a candidate belongs. The diagram separates the parts of our conditional description.
A vertical bar $\mid$ can replace the colon. It still separates the member description from its restrictions. For example, $\{x\in\mathbb Z\mid-2\le x<3\}$ describes the same set as before.
Now keep our earlier condition but change the domain from $\mathbb Z$ to $\mathbb R$. Every real value from $-2$ up to 3 is eligible, including fractions. This is the interval $[-2,3)$: a square bracket includes the endpoint and a round bracket excludes it.
The five-dot set $S$ and the interval $[-2,3)$ are unequal. Likewise, $[0,\infty)$ describes the nonnegative real numbers, not $\mathbb N_0$. The symbol $\infty$ says the interval continues without a finite upper end; it is not an included endpoint. Read the domain before deciding which values the notation permits.