Difference between {... | ...} and {... : ...}

635 Views Asked by At

Is there a difference between the following two set related notations:

$$\{~\dots~:~\dots~\}~\text{vs.}~\{~\dots~|~\dots~\}?$$

I take it they both mean "such that" but I was wondering why some authors prefer one to the other, maybe there is a historical background to it?

3

There are 3 best solutions below

2
On BEST ANSWER

it's exactly the same. But if you need a "such that " twice, it's better to use $\mid$ and then $:$. For example, $$\{y\mid \exists x\in \mathbb R: y=f(x)\}$$

0
On

There is no difference between both notation. One author may prefer the first one, the other the second one. See https://en.wikipedia.org/wiki/Set-builder_notation for more details.

0
On

They are the same, but there are occasion where one would be less practical to use. For example the $|$ sign has uses that makes $|$ non-practical for set building. For example $\{P|ab: P\in X\}$ (ie the set of distances to the line $ab$ for points in $X$) and $\{f|_A: f\in X\}$ (ie the set of restrictions to $A$ for functions in $X$) would be less obvious if you used $|$ sign instead of $:$ sign. There are other uses for the $:$ sign to (fx mappings which would lead to constructs like $\{f:\mathbb R\to \mathbb Z|\, f(-x)=f(x)\}$) so if there's risk of running into these cases the author should select the notation that results in the least confusing set-building notation.