[Tex/LaTex] Best practice for typesetting quantifiers

best practicesspacing

When I work with quantifiers I noted that are very close to the other symbols and the result does not look good, for example

$\exists a\in\mathbb{R}\exists b\in\mathbb{R}\forall c\in\mathbb{R}\forall d\in\mathbb{R}$

Which is the proper form to write quantifiers?

Best Answer

It depends on the context.

If this is part of a piece of text, then you might consider Peter Grill's suggestion:

$\exists a\in\mathbb{R}$, $\exists b\in\mathbb{R}$, 
$\forall c\in\mathbb{R}$, and $\forall b\in\mathbb{R}$

enter image description here

On the other hand, if the quantifiers are part of a logical formula, you might consider a dot between the quantifiers, like this:

$\exists a\in\mathbb{R}\ldotp\exists b\in\mathbb{R}\ldotp
\forall c\in\mathbb{R}\ldotp\forall b\in\mathbb{R}\ldotp P$

enter image description here

This dot notation is inherited, I think, from Russell and Whitehead's Principia Mathematica, and is quite widely used, particularly in computer science. A comma between quantifiers is quite unusual, though it does appear in the syntax of the Coq theorem prover.

$\exists a\in\mathbb{R}, \exists b\in\mathbb{R}, 
\forall c\in\mathbb{R}, \forall d\in\mathbb{R}, P$

enter image description here

The comma notation becomes awkward when you want to quantify several variables at the same time, because then you have two different types of comma in the same formula:

$\exists a,b\in\mathbb{R}, \forall c,d\in\mathbb{R}, P$

enter image description here

In such cases, you might consider putting just a space between the variables, like this:

$\exists a\;b\in\mathbb{R}, \forall c\;d\in\mathbb{R}, P$

enter image description here

The idea of putting spaces between variables, rather than commas, is taken from the syntax of the Isabelle theorem prover.