[Math] Set builder notation: Colon or Vertical Line

discrete mathematicselementary-set-theorylogicnotation

I remember once hearing offhandedly that in set builder notation, there was a difference between using a colon versus a vertical line, e.g. $\{x: x \in A\}$ as opposed to $\{x\mid x \in A\}$. I've tried searching for the distinction, but have come up empty-handed.

Best Answer

There is no difference that I've ever heard of. I do strongly prefer "$\vert$" to "$\colon$", though, because I'm often interested in sets of maps, and e.g. $$\{f \mid f\colon \mathbb{R}\rightarrow\mathbb{C}\text{ with $f(6)=24$}\}$$ is easier to read than $$\{f: f\colon \mathbb{R}\rightarrow\mathbb{C}\text{ with $f(6)=24$}\}$$.

EDIT: Note that as Mike Pierce's answer shows, sometimes "$:$" is clearer. At the end of the day, use whichever notation is most clear for your context.

Related Question