# Is there a difference between absolute and OR (logic) symbols?

I'm converting a document to LaTeX for a friend and it has the following equation: I've asked him if it's correct and he says it is (I'm not an engineer/mathematician). The author is good at what he does but doesn't care too much about presentation – he used Epsilons to represent the IN SET \in symbol.

I've come up with the following LaTeX code for it:

\begin{equation}
C\left(P_{s1}, P_{s2} \right) = \frac{\left| \left\{\left. y \in  P_{s2} \right| \exists x \in P_{s1}:x > y \right\} \right|}{\left| P_{s2} \right|}
\end{equation}


Which gives the following: My concern is with accuracy; Are the absolute (mathematics) symbol and the OR (logic) symbol represented the same way in LaTeX? Is there a standard way to allow the reader to differentiate them?

• The bar in the middle is not the “or”, but just a common separator in a set description, better denoted by \mid that adds suitable space around it. Remove all \left and \right that do nothing good and, probably, change s1 and s2 into s_{1} and s_{2}, unless these are really double indices like for matrices. – egreg Mar 29 '18 at 8:37

Don't overuse \left and \right. In fact, for the present equation, don't use them at all, since they don't actually change the sizes of the parentheses but do mess up spacing. If you need larger "fence" symbols, employ \bigl and \bigr directives.

Use \colon instead of :, and use either \mid or \bigm\vert for the vertical bar that denotes conditioning (of the material to its left on the material to its right). \documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
C(P_{s1}, P_{s2} ) = \frac{\bigl\lvert \bigl\{ \,
y \in  P_{s2} \bigm\vert \exists x \in P_{s1}\colon x > y
\, \bigr\} \bigr\rvert }{\lvert P_{s2}\rvert}
\end{equation}
\end{document}