Best practice for typesetting quantifiers?

Simply make these characters what they should be: Operators. They aren't arithmetic operators but logical ones, but that doesn't make any difference here:

\documentclass{article}
\usepackage{amsmath,amssymb}
\DeclareMathOperator{\Exists}{\exists}
\DeclareMathOperator{\Forall}{\forall}
\begin{document}
$\Exists a\in\mathbb{R}\Exists b\in\mathbb{R}\Forall c\in\mathbb{R}\Forall d\in\mathbb{R}$

$\Exists a\in\mathbb{R}:\Exists b\in\mathbb{R}:\Forall c\in\mathbb{R}:\Forall d\in\mathbb{R}$

$\Exists a,b\in\mathbb{R}:\Forall c,d\in\mathbb{R}$
\end{document}

Three versions with <code>\DeclareMathOperator</code>

Additionally, I would add a colon which stands for "such that".

Last but not least, it's equivalent but easier to grasp, if the both "exists" and "foralls" are grouped. R^2 would be wrong in this case, because a and b should each be in R. (a,b) would be in R^2, but that's not written.


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.


In my opinion, the real issue with quantifiers is that it's hard to obtain consistent spacing, as I explained in this answer. The most striking example I found: \[\forall W\forall A\] gives

original output

Of course there should be more space before the second quantifier; a single space \   will usually be OK. The problem is the spacing after the quantifiers. There is no simple solution to this, other than using manual kerning where needed. In this case, \[\forall\mkern2mu W\ \forall\mkern-1mu A\] looks quite alright:

improved output

Let me point out that I'd use quantifiers only in displayed formulas, never in inline math.