When I read some math books, I often see two different symbols to represent a specific condition for a set. Some of them use "$|$" before the condition, while others use "$:$".
For example of the first case, we define the outer measure induced by $\mu$ as \begin{align*} \mu^*(E) = \inf \Big\{\sum_{i=1}^\infty \mu(E_i) \; \big| \; E_i \in \mathbb{R}, \; E \subset \bigcup_{i=1}^\infty E_i \Big\} \end{align*} that I find in a textbook where it uses "$|$" before the condition.
As an example of the second case, we define the Sobolev space with $D^α$ denoting a weak derivative of order |α| \begin{align*} W_p^k(Ω) = \{ u ∈ L_p (Ω) : D^α u ∈ L_p (Ω), \; |α| ≤ k \} \end{align*} that I find in a lecture note where it uses "$:$" before the condition.
My question is quite simple: Are the symbols "$|$" and "$:$" here totally interchangeable with exactly the same meaning? Otherwise, do they emphasize on anything different?
If they are the same, is the existence of two different notations due to some historical reason?
They have the same meaning. Choosing one or the other is a matter of style, but you should take readability into consideration.
Using $|$ gets confusing when there are absolute values involved, as in $$ \{ |x| | |x - 2| < 3\}$$ You need to use
\midto get better spacing: $$ \{ |x| \mid |x - 2| < 3\}$$ but it is still not easy to read.In this example, $:$ reads better: $$ \{ |x| : |x - 2| < 3\} $$
I prefer to use $:$ always because it gives better spacing and is smaller.