maths.freeDiscrete Math & Logic › Predicate logic and quantifiers

Predicate logic and quantifiers

Predicates, "for all" and "there exists", negating quantified statements, and why the order of quantifiers matters.

A proposition is a sentence that is simply true or false. Most mathematical sentences are not like that on their own: "\( n \) is even" depends on \( n \). A predicate is such a sentence with a variable in it, written \( P(n) \), and it becomes a proposition once we substitute a value or quantify the variable. The universal quantifier \( \forall n\, P(n) \) says \( P(n) \) holds for every \( n \) in the domain; the existential quantifier \( \exists n\, P(n) \) says it holds for at least one. The domain is part of the statement: \( \exists x\,(x^2 = 2) \) is false over the rationals and true over the reals.

On a finite domain the quantifiers are just long conjunctions and disjunctions. Over the domain \( \{a, b\} \), \( \forall x\,P(x) \) means \( P(a) \land P(b) \) and \( \exists x\,P(x) \) means \( P(a) \lor P(b) \). That is why the rules for negating quantifiers are De Morgan's laws in disguise: \[ \lnot\,\forall x\,P(x) \equiv \exists x\,\lnot P(x), \qquad \lnot\,\exists x\,P(x) \equiv \forall x\,\lnot P(x). \] The example checks the two-element case, \( \lnot(p \land q) \leftrightarrow (\lnot p \lor \lnot q) \), and finds a tautology. To negate a statement with several quantifiers, push the negation inwards one quantifier at a time, flipping each one as it passes.

The order of different quantifiers changes the meaning. Over the integers, \( \forall n\,\exists m\,(m > n) \) says every integer has a larger one, which is true: the \( m \) may depend on \( n \). But \( \exists m\,\forall n\,(m > n) \) says one integer is larger than all of them, which is false. Quantifiers of the same kind commute: \( \forall x\,\forall y \) is the same as \( \forall y\,\forall x \). The definition of a limit, \( \forall \varepsilon > 0\ \exists \delta > 0\ \forall x \dots \), is the standard example of a statement whose whole content lies in its quantifier order.

Picture it: draw the domain as a row of boxes, one per element, each lit if \( P \) holds there. "For all" asks whether every box is lit; "there exists" asks whether at least one is. Negating "every box is lit" does not give "no box is lit"; it gives "some box is dark".

Think it: read \( \forall\exists \) statements as a game. An opponent picks the universally quantified value, you answer with the existential one, and the statement is true when you have a winning strategy. In \( \forall n\,\exists m\,(m > n) \) you win by answering \( m = n + 1 \). Swapping the quantifiers makes you move first, and then the opponent always wins.

工作范例 · truth table of not (p and q) iff (not p or not q)

Truth table of not (p and q) iff (not p or not q)

一步

  1. \neg \left(p \wedge q\right) \Leftrightarrow \left(\neg p \vee \neg q\right)

    2 variable(s) → 4 rows. Fill in every combination.

  2. \

    A tautology (always true).

发送答案
\neg \left(p \wedge q\right) \Leftrightarrow \left(\neg p \vee \neg q\right)

现在轮到你 选择问题, 输入或绘制您自己的 。 每一步, 图片, 答案隐藏到您询问 。

保持你自己的工作

免费账户在每一课上都添加注解, 记录你完成的, 在一个地方解决的, 以及您可以询问的关于此页的导师。 数学本身向每个人开放, 是否签名 。

签名上签名 登录

此处所用符号

输入完整定义、图片和其中每个字母的含义的符号。

如何: Predicate logic and quantifiers

  1. Name the domain and write each predicate with its variables.
  2. Translate "every", "all", "any" as a universal quantifier and "some", "there is", "at least one" as an existential one.
  3. To negate, move the negation inwards past each quantifier, swapping for all and there exists.
  4. Negate the innermost statement last: not (P implies Q) is P and not Q.
  5. Check the meaning by testing a small domain or a specific counterexample.

人们对人们提出的问题

Is "for all x, P(x)" true when the domain is empty?

Yes, vacuously: there is no element to be a counterexample. Correspondingly "there exists x with P(x)" is false over an empty domain.

How do I disprove a "for all" statement?

Give one counterexample. Its negation is an existence statement, and a single witness proves an existence statement.

What makes mathematics "discrete"?

It deals with separate, countable objects (integers, graphs, statements) rather than continuous quantities. No limits, no infinitesimals; instead induction, counting and logic.

How does a proof by induction work?

Show the statement for the first case, then show that whenever it holds for n it holds for n + 1. Like dominoes: the first falls, and each knocks over the next.

What order should I take these lessons in?

Logic and proof first, because every later lesson proves things. Then induction, sets, relations and functions, counting, recurrences, graphs, Boolean algebra and automata, and finally algorithms and complexity, which use nearly everything before them.

Is discrete mathematics the same as the maths of computer science?

Largely. Data structures are graphs and trees, correctness arguments are induction, running times are recurrences and sums, circuits are Boolean algebra, and what a computer can do efficiently is the subject of the last lessons. It is also ordinary mathematics in its own right.

Do I need calculus for this course?

No. School algebra is enough. A little familiarity with limits helps when comparing growth rates, and the lesson on asymptotic analysis explains the one limit fact it uses.

更多 Discrete Math & Logic