Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What are standard ways to write mathematical expressions involving quantifiers in a (semi)formal way ? In different posts of mine concerning similar question I have encountered for a generic expression of the type "for all $x\in I$ and $y\in J$ holds $P(x,y)$" the following writing conventions

1) $\forall y\in J \ \ \forall x \in I: P(x,y)$ (this was how I would usually write statements in a formal way; sometimes also as $\forall y\in J: \ \ \forall x \in I: P(x,y)$ ;don't know if it standard)

2) $(\forall y)(\forall x)(x \in I \land y\in J \Rightarrow P(x,y))$ (in the accepted answer from this question)

3) $(\forall y: \ y \in J) (\forall x: \ x \in I) (P(x,y))$ (form the same answer as above)

4) $\forall y \ \forall x\ (x \in I \land y \in J \Rightarrow P(x,y))$ (in the accepted answer fromthis question)

5) $(\forall y\in J )(\forall x \in I) [P(x,y)] $ (in the accepted answer from this question).

( (I hope I "generalised" them correctly, because at some points, they where written only for one variable, for example 3) was written just as $(\forall x: \ x \in I) (P(x))$ )

Could you tell me which ones are generally accepted an if there is a standard to how these should be written ?

(I think unique readability should be a criterion and I'm not sure the way I'm used to writing mathematical expression satisfies that)

share|cite|improve this question
There is a similar discussion here about the order of application of quantifiers:… – HbCwiRoJDp Nov 5 '11 at 12:13
up vote 11 down vote accepted

As your own survey shows, there is no real standard here. In general is is acceptable to write whatever is likely to be understood -- except perhaps in a class setting where the formal notation itself is the subject of the course, rather than just a background skill.

The design space can roughly be classified as

  1. Punctuation. Parentheses/brackets around the quantifier? Colon, space, or dot? (Dots seem to be found mainly among computer scientists, perhaps influenced by the lambda calculus). Parentheses around the body formula? Nobody really cares about these choices, except that, as always, being consistent within a book or paper is a plus.

  2. Multiple quantifiers. Some authors allow multiple quantifiers of the same kind to be collapsed into one piece of syntax, such as $(\forall x, y)P(x,y)$ instead of $(\forall x)(\forall y)P(x,u)$. This is almost always just treated as an abbreviation.

  3. Precedence. When the syntax doesn't include explicit brackets around the body formula, the problem of delineating the scope of the quantifier arises. Does $\forall x : \phi \to \psi$ mean $(\forall x:\phi)\to\psi$ or $\forall x:(\phi\to\psi)$? There is a real risk of misunderstanding here, and unfortunately there doesn't seem to be a real consensus about the binding strength (at least not if we include computer science). Formal metamathematics generally insist of having everything fully parenthesized in principle, but seldom adhere to this in running text anyway. When there is any doubt, put in too many parentheses rather than too few!

  4. Bounds. Here's a real distinction. In formal logic the "real" quantifiers are almost always "naked" and range over the entire universe. Most presentations allow bounds within the quantifiers in informal notation, but insist that they are really abbreviations for, say $\forall x(x\in I\to \phi(x))$ or $\exists x(x\in I\land \phi(x))$. On the other hand, in much of mathematics outside formal logic, the very meaning of many short notations (such as $x^y$ or $x'$ or $x^*$ or $x(y)$ or $xy$) depend on what kind of things $x$ and $y$ are. In such a setting, a "naked" quantifier would lead to intolerable confusion and ambiguity, so everyday mathematics almost always uses some kind of explicit bounds in the quantifiers that tell at least what the variable ranges over. It is generally understood that if we need to translate an everyday formula into formal logic, we'll need to expand the bound into a "logician's abbreviation", and use information from the bound to figure out which formal unfolding of $x^*$ to use in the scope of the quantifier.

At least the symbols $\forall$ and $\exists$ are fairly universal these days. In older logical literature (before about 1950) you can find a bewildering variety of quantification notations that don't include these symbols. For example, Gödel's original incompleteness proof notates $\forall x.\phi$ as "$x\Pi(\phi)$" in one part of the development and as "$(x)[\phi]$" in another.

share|cite|improve this answer
Could you give me a concrete example of "...if we need to translate an everyday formula into formal logic, we'll need to expand the bound into a "logician's abbreviation", and use information from the bound to figure out which formal unfolding of $x^*$ to use in the scope of the quantifier." ? – temo Nov 11 '11 at 9:10

Every book has its own standard, and the details do very from author to author. As you say, unique readability is one of the main requirements, along with the ability to perform syntactic manipulations effectively.

There are two general areas of variation in the formal definition:

  • Quantifiers can be written inside parentheses "$(\forall x)$" or not "$\forall x$".

  • The matrix can be embedded in a pair or parentheses "$\forall x\,(P(x))$" or not "$\forall x\,P(x)$".

Mathematical logic books generally do not use colons or periods to separate pieces of the formula. People with a computer science background seem more prone to writing colons, in my experience.

In normal writing we sometimes replace parentheses with square brackets to make human readability easier, but in formal treatments it's more common to just have parentheses.

Bounded quantifiers are usually just written as "$(\forall x \in Z)P(x)$", with the variations from the first two bullets. "$(\forall x : x \in Z)P(x)$" is not at all common in print.

The implicit idea that most authors have is that although there is a formal definition of a well-formed formula that they use, the actual formulas that they write in prose may not be well-formed formulas. The reader is expected to translate the symbols on the page into the appropriate well formed formula. For example, it may be that the definition requires parentheses like "$(\forall x)((P(x) \lor Q(x))\lor R(x))$" but most authors would just write "$(\forall x)(P(x) \lor Q(x) \lor R(x))$" and expect the reader to insert parentheses if needed.

share|cite|improve this answer

I find option 1 the easiest to read, but I think you would be more likely to find that style written on a blackboard than in a paper or book. The other options seem pedantic to me. I think that a good style in general is to not make simple statements look overly complicated, because it can then be hard to see the point.

That said, the other options you wrote might be more appropriate in logic, where one is very careful about such symbols. I think in most of math people are more concerned about whatever property $P$ would be than they are in what is a variable, what is a bound variable, etc. But in the field of logic sometimes the precise way of writing a statement is the point, and any resulting complexity is an important part of the theory. In fact I expect that most people with a strong opinion on this will be people who work in logic.

In a paper or book that is not about logic, I think you would be more likely to find the statement just written out verbally like this:

$$\text{For all }x\in I\text{ and for all }y\in J, (x,y)\text{ satisfies property }P.$$

This would look more natural with property $P$ replaced with some particular property. And this property would most likely be the thing that made the statement interesting.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.