Predicate Logic & Quantifiers

This deck covers predicates and open sentences, the universal and existential quantifiers over a stated domain, the order of nested quantifiers, and mechanical negation. It then adds the semantic layer: structures, satisfaction, validity as against satisfiability, Skolemization, and the decidability cliff. It targets the classic errors: swapping the order of quantifiers, negating "for all P" as "for all not P", forgetting the domain, and reading "there exists" as "exactly one".

Subject: Foundations of Higher Mathematics · 107 slides · symbolic lesson

Open the interactive version of this deck · Homework for this lesson

What this lesson covers

The lesson, slide by slide

1. What you will be able to do

Objectives

By the end of this deck you will be able to:

1. Read and write statements with the universal and existential quantifiers over a stated domain.

2. Handle nested quantifiers and explain exactly why order changes meaning.

3. Negate any quantified statement mechanically, driving the negation inward.

4. Translate real mathematics — Goldbach, no largest prime, convergence, continuity — into first-order logic and negate it.

5. Locate the decidability cliff: what first-order logic can and cannot decide.

2. What survived from Propositional Logic & the Architecture of Proof?

Warm-up

Discussion prompt

Before we open Predicate Logic & Quantifiers: without looking back, what was the main idea of Propositional Logic & the Architecture of Proof, and what could you do by the end of it that you could not do before?

Hint: One sentence for the idea, one for the skill. If the second one is blank, that is the part to revisit.

Answer:

That deck builds propositional logic from the ground up. It separates syntax from semantics, defines well-formed formulas by induction, and covers truth tables and the material conditional, tautologies and satisfiability, logical equivalence, and the canonical DNF and CNF forms. It then proves an impossibility result about functional completeness, works through natural deduction, states soundness and completeness, and closes with the Curry-Howard bridge. It targets the classic traps: reading vacuous truth as falsity, affirming the consequent, confusing a conditional with its converse, and treating "or" as exclusive.

3. A predicate is a sentence with a blank

Concept

A proposition is a statement that is flatly true or false. 7 is prime is true; 6 is prime is false.

A predicate is what you get when you leave a blank in such a statement: ___ is prime. Until you fill the blank, it has no truth value.

\[ P(x): \ x \text{ is prime} \]

predicate — An open sentence containing one or more variables. Substituting values from the domain for every variable turns it into a proposition with a definite truth value.

4. Break it if you can: A predicate is a sentence with a blank

Counterexample

Discussion prompt

A proposition is a statement that is flatly true or false. 7 is prime is true; 6 is prime is false.

That is stated as though it always holds. Do one of two things: produce a case where it fails, or say precisely what rules such a case out. "It just does" is not on the menu.

Hint: Hunt at the extremes first — zero, one, negative, empty, equal. If every extreme survives, the reason they survive is the proof.

Answer:

A predicate is what you get when you leave a blank in such a statement: ___ is prime. Until you fill the blank, it has no truth value.

5. A predicate is a Boolean-valued function

Intuition

Here is the mental model your CS background already supplies: a predicate is a function whose output type is bool.

\[ P : D \to \{\, \text{true},\ \text{false} \,\} \]

isPrime(7) returns true; isPrime(6) returns false. The predicate is the function; supplying an argument is what produces a truth value.

A quantifier, which we meet shortly, is then just a way to fold that Boolean function over the entire domain at once.

6. By analogy: A predicate is a Boolean-valued function

Analogy

Discussion prompt

Explain A predicate is a Boolean-valued function by analogy to something with no Foundations of Higher Mathematics in it at all — a queue, a recipe, a map, a bank balance, whatever fits. Then say where your analogy breaks.

Hint: An analogy that never breaks is not an analogy, it is the same idea wearing a hat. Find the seam — that is the part that is actually new.

Answer:

isPrime(7) returns true; isPrime(6) returns false. The predicate is the function; supplying an argument is what produces a truth value.

7. The truth set of a predicate

Concept

For a one-variable predicate over a domain, collect exactly the elements that make it true. That collection is its truth set.

\[ \{\, x \in D : P(x) \,\} \]

truth set — The subset of the domain consisting of every element that satisfies the predicate. A predicate carves the domain into those that satisfy it and those that do not.

8. Take the definitions apart: predicate vs truth set

Definition probe

Sort into buckets

Every line below is part of the definition of predicate or of truth set — one or the other, never both. Put each where it belongs.

predicate
An open sentence containing one or more variables.; Substituting values from the domain for every variable turns it into a proposition with a definite truth value.
truth set
The subset of the domain consisting of every element that satisfies the predicate.; A predicate carves the domain into those that satisfy it and those that do not.
b1
An open sentence containing one or more variables. Substituting values from the domain for every variable turns it into a proposition with a definite truth value.
b2
The subset of the domain consisting of every element that satisfies the predicate. A predicate carves the domain into those that satisfy it and those that do not.

9. What has to happen first: Worked example: a truth set over a finite domain

Ranking

Put in order

Put the moves of Worked example: a truth set over a finite domain into the order they have to happen.

  1. Test each element against the divides condition
  2. Collect the survivors
  3. Verify by counting divisors

Why: These are the moves of the worked example in the order it makes them, and each one is set up by the one before it. A divisor leaves no remainder. Walk the domain once, keeping only the exact divisors.

10. Worked example: a truth set over a finite domain

Worked example

Let the domain be the whole numbers from one to twelve, and let the predicate say the number divides twelve exactly.

\[ D = \{1,2,3,4,5,6,7,8,9,10,11,12\}, \quad P(n): n \mid 12 \]

Test each element against the divides condition

Why: A divisor leaves no remainder. Walk the domain once, keeping only the exact divisors.

ndivides 12?in truth set?
1yesyes
2yesyes
5nono
6yesyes
8nono
12yesyes

Collect the survivors

Why: The elements that passed the test form the truth set.

\[ \{\, n \in D : n \mid 12 \,\} = \{1,2,3,4,6,12\} \]

Verify by counting divisors

Why: Read the divisor count off the prime factorization; it must match the size of our set.

\[ 12 = 2^{2}\cdot 3 \ \Rightarrow\ (2+1)(1+1) = 6 \text{ divisors} \]

Our truth set has six elements, and each listed number divides twelve. Confirmed.

11. a truth set over a finite domain — line by line

Picture it

Animation

Shows: Each line of the worked example "a truth set over a finite domain", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: Read the divisor count off the prime factorization; it must match the size of our set.

12. The domain of discourse

Concept

Every quantified statement is silently relative to a domain: the collection of things the variables range over.

domain of discourse — The non-empty set from which quantified variables draw their values. It is part of the statement's meaning, not decoration; the same words over a different domain can flip from true to false.

State it explicitly. Every element has a strictly larger element is true over the integers and false over any finite set.

13. Teach it back: The domain of discourse

Explain it

Discussion prompt

Explain The domain of discourse to a student a year behind you. No notation, no jargon they have not met — and it still has to be true.

Hint: If your explanation needs a symbol they have never seen, you are describing the notation rather than the idea.

Answer:

Every quantified statement is silently relative to a domain: the collection of things the variables range over.

14. Change the domain, change the truth

Intuition

The single most common error in this whole topic is arguing about a quantified sentence while two people silently picture different domains.

Consider the claim that some number multiplied by itself gives two.

\[ \exists x \, (x \cdot x = 2) \]

Over the rational numbers this is false — no fraction squares to two. Over the real numbers it is true.

\[ \text{false over } \mathbb{Q}, \qquad \text{true over } \mathbb{R} \]

Same symbols, opposite truth value. The domain did all the work.

15. Arity: predicates take arguments

Concept

A predicate can have more than one blank. The number of blanks is its arity.

\[ L(x,y): \ x < y \qquad B(x,y,z): \ x + y = z \]

A zero-arity predicate — no blanks — is just a proposition. Filling every blank of any predicate returns you to a proposition.

16. Trap: forgetting the domain

Trap

The trap

Calling a quantified statement simply true or false with no domain in mind.

\[ \forall x \, \exists y \, (y \cdot y = x) \]

A student reads every number has a square root, calls it true while picturing the reals — but with x ranging over ALL reals it is false.

\[ x = -1 \ \text{has no real } y \text{ with } y \cdot y = -1 \]

The fix

Fix the domain first, then judge. Over the non-negative reals the statement is true; over all reals it is false.

\[ \text{true over } [0,\infty), \qquad \text{false over } \mathbb{R} \]

The witness for x greater than zero is the positive root; for x equal to negative one no real witness exists.

17. The universal quantifier

Concept

To assert a predicate holds for every element of the domain, put the universal quantifier in front of it.

\[ \forall x \, P(x) \]

Read: for all x in the domain, P of x holds.

universal quantifier — The statement for-all-x P(x) is true exactly when P(x) holds for every single element of the domain, and false the moment one element fails.

One counterexample is enough to make a universal statement false. That asymmetry is the engine of a great many proofs.

18. The existential quantifier

Concept

To assert a predicate holds for at least one element, put the existential quantifier in front.

\[ \exists x \, P(x) \]

Read: there exists an x in the domain such that P of x holds.

existential quantifier — The statement there-exists-x P(x) is true exactly when P(x) holds for at least one element of the domain. One witness is enough; it says nothing about how many.

A single witness proves an existential — the mirror image of the universal, which a single counterexample disproves.

19. Quantifiers generalize AND and OR

Intuition

Over a finite domain, quantifiers are literally big conjunctions and disjunctions.

\[ \forall x\, P(x) \ \equiv\ P(a_1) \land P(a_2) \land \cdots \land P(a_n) \]

\[ \exists x\, P(x) \ \equiv\ P(a_1) \lor P(a_2) \lor \cdots \lor P(a_n) \]

Universal is a chain of ANDs: all must hold. Existential is a chain of ORs: one suffices. Over an infinite domain we cannot write the chain out — which is exactly why we need quantifier notation.

20. Plan first: Worked example: evaluating quantifiers on a finite domain

Step zero

Discussion prompt

Worked example: evaluating quantifiers on a finite domain — before any calculation: what is the plan? Name the moves in order, in plain English, without doing the arithmetic.

Hint: It starts with: Evaluate the universal by testing every element

Answer:

  1. Evaluate the universal by testing every element
  2. Read off the universal
  3. Evaluate the existential
  4. Verify both against the truth set

21. Worked example: evaluating quantifiers on a finite domain

Worked example

Domain: the numbers one through four. Let the predicate say the number is less than four.

\[ D = \{1,2,3,4\}, \quad P(x): x < 4 \]

Evaluate the universal by testing every element

Why: For-all is a conjunction; a single failure kills it.

xx < 4
1true
2true
3true
4false

Read off the universal

Why: Because x equal to four fails, the AND-chain is false.

\[ \forall x\, (x < 4) \ \text{is FALSE} \ (\text{witness } x = 4) \]

Evaluate the existential

Why: There-exists is a disjunction; a single success confirms it.

\[ \exists x\, (x < 4) \ \text{is TRUE} \ (\text{witness } x = 1) \]

Verify both against the truth set

Why: The truth set of x less than four is one, two, three: not all of D, so the universal fails; non-empty, so the existential holds. Both readings agree.

22. evaluating quantifiers on a finite domain — line by line

Picture it

Animation

Shows: Each line of the worked example "evaluating quantifiers on a finite domain", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: The truth set of x less than four is one, two, three: not all of D, so the universal fails; non-empty, so the existential holds. Both readings agree.

23. Free versus bound variables

Concept

A variable is bound when a quantifier captures it, and free when nothing does.

\[ \forall x \, (x < y) \]

Here x is bound by the universal quantifier; y is free.

bound variable — A variable governed by a quantifier. Its name is a placeholder with no meaning outside the quantifier's scope; renaming it consistently changes nothing.

free variable — A variable not captured by any quantifier. A formula with a free variable is still an open sentence: its truth depends on what that free variable is.

24. Term to definition: Predicate Logic & Quantifiers

Matching

Match the pairs

Match each term to the definition this lesson gave it — not the one you would guess from the word.

  • t1. predicate
  • t2. truth set
  • t3. universal quantifier
  • t4. existential quantifier
  • t5. bound variable
  • d1. An open sentence containing one or more variables. Substituting values from the domain for every variable turns it into a proposition with a definite truth value.
  • d2. The subset of the domain consisting of every element that satisfies the predicate. A predicate carves the domain into those that satisfy it and those that do not.
  • d3. The statement for-all-x P(x) is true exactly when P(x) holds for every single element of the domain, and false the moment one element fails.
  • d4. The statement there-exists-x P(x) is true exactly when P(x) holds for at least one element of the domain. One witness is enough; it says nothing about how many.
  • d5. A variable governed by a quantifier. Its name is a placeholder with no meaning outside the quantifier's scope; renaming it consistently changes nothing.

Why: These are the working definitions of predicate, truth set, universal quantifier, existential quantifier, bound variable as Predicate Logic & Quantifiers uses them. Pairing them correctly is the test of whether you could state each one with the slide switched off.

25. A bound variable is a loop variable

Intuition

Your CS intuition is exact here. A bound variable is like a loop counter: local to its scope, private, and renameable without changing meaning.

total = sum(P(i) for i in domain)   # 'i' is bound by the comprehension

The name i never escapes the comprehension. Likewise the bound x in a for-all statement means nothing outside the quantifier; renaming x and its uses to z leaves the statement identical.

\[ \forall x\, P(x) \ \equiv\ \forall z\, P(z) \]

This renaming freedom is called alpha-equivalence, and it is why variable capture during substitution is something to watch for.

26. Guess the shape of the answer: Worked example: spotting free and bound…

Estimation

Predict first

Classify every variable occurrence in this formula and give its scope.

Commit before you compute: what does Worked example: spotting free and bound variables come out to? A rough magnitude and the right form is enough — the point is to have something concrete to be wrong about.

Correct: Verify by the free-variable test

Why: A prediction you can defend turns the computation into a check rather than a leap of faith — and an answer that contradicts it is caught on the spot. A variable occurrence is free when it sits outside every matching quantifier.

27. Worked example: spotting free and bound variables

Worked example

Classify every variable occurrence in this formula and give its scope.

\[ \big(\forall x\, (x < y)\big) \ \land\ \exists y\, (y = z) \]

Handle the left conjunct

Why: The universal binds x throughout its parentheses; y is not quantified there.

\[ \forall x\,(x < y): \quad x \text{ bound}, \ y \text{ free} \]

Handle the right conjunct

Why: The existential binds y inside its parentheses; z is never quantified.

\[ \exists y\,(y = z): \quad y \text{ bound}, \ z \text{ free} \]

Combine, watching the two roles of y

Why: The y in the left conjunct is free; the y in the right conjunct is bound. Same name, different status, because scope is local.

Verify by the free-variable test

Why: A variable occurrence is free when it sits outside every matching quantifier. The y on the left and z qualify; x and the y on the right do not. Free variables of the formula: y and z.

28. spotting free and bound variables — line by line

Picture it

Animation

Shows: Each line of the worked example "spotting free and bound variables", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: A variable occurrence is free when it sits outside every matching quantifier. The y on the left and z qualify; x and the y on the right do not. Free variables of the formula: y and z.

29. Closing every blank gives a sentence

Concept

When every variable is bound, the formula has a definite truth value in each structure. We call it a closed formula, or a sentence.

\[ \forall x\, \exists y\, (y > x) \]

No free variables remain, so over a fixed domain this is simply true or false.

A formula with free variables is, by contrast, an open sentence: it defines a property, not a fact, until you supply the free variables.

30. What has to be given first: Worked example: first translations

Missing information

Discussion prompt

Translate two English sentences into first-order logic over the integers.

What do you need to know — or decide — before the first line can be written? List everything the problem has to hand you.

Hint: Anything you would have to invent to get started is a thing the problem must supply.

Answer:

Existence of one even integer; use there-exists with an evenness predicate E.

31. Worked example: first translations

Worked example

Translate two English sentences into first-order logic over the integers.

\[ \text{domain } D = \mathbb{Z} \]

Translate: some integer is even

Why: Existence of one even integer; use there-exists with an evenness predicate E.

\[ \exists x \, E(x) \]

Unfold the evenness predicate

Why: Being even means being twice some integer; predicates can be spelled out.

\[ \exists x \, \exists k \, (x = 2k) \]

Translate: every integer has a strictly larger integer

Why: Universal outside, existential inside; the inner witness may depend on x.

\[ \forall x \, \exists y \, (y > x) \]

Verify each by exhibiting witnesses

Why: For the first, x = 2 with k = 1 works. For the second, given any x take y = x + 1. Both sentences are true over the integers.

32. first translations — line by line

Picture it

Animation

Shows: Each line of the worked example "first translations", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: For the first, x = 2 with k = 1 works. For the second, given any x take y = x + 1. Both sentences are true over the integers.

33. Trap: reading there-exists as exactly one

Trap

The trap

Assuming an existential claim promises a unique witness.

\[ \exists x \, (x^{2} = 4) \]

A student concludes so x is determined and writes down one solution, silently dropping the other.

\[ \text{claimed: only } x = 2 \]

The fix

There-exists means at least one, never exactly one. Both roots witness the same existential.

\[ x = 2 \ \text{and}\ x = -2 \ \text{both satisfy}\ x^{2} = 4 \]

If you truly need a unique witness, that is a different, stronger quantifier — the uniqueness quantifier, coming next.

34. The uniqueness quantifier

Concept

Sometimes we want to say a witness exists and is the only one. That is the uniqueness quantifier.

\[ \exists ! \, x \, P(x) \]

Read: there exists exactly one x such that P of x.

uniqueness quantifier — The statement exists-unique-x P(x) asserts both that at least one element satisfies P and that no two distinct elements do. It is an abbreviation, not a new primitive.

35. Nested quantifiers

Concept

When a statement mentions two related objects, quantifiers stack. The inner quantifier sits inside the scope of the outer one.

\[ \forall x \, \exists y \, R(x,y) \]

For every x there is a y — possibly a different y for each x — related to it.

The crucial feature: an inner existential witness is allowed to depend on the outer variable. That dependence is where all the subtlety lives.

36. Nested quantifiers as a game

Intuition

Picture a two-player game. The for-all player is an adversary; the there-exists player is you, trying to make the statement true.

\[ \forall x \, \exists y \, R(x,y) \]

The adversary picks x first, trying to trip you up. Then you pick y, having seen their x. The statement is true exactly when you have a winning response to every move.

Reversing the quantifiers reverses who moves first — and that usually changes who wins.

37. Picture it first: Who moves first?

Picture it

Figure (svg): Two turn-order diagrams. Top: for-all x then exists y, the adversary picks x first (red) and you answer with y (green) that may depend on x. Bottom: exists y then for-all x, you commit to one y first (green) before the adversary picks x (red), so that single y must beat every x.

Discussion prompt

Read the picture before the words. What is this showing, and what is the one thing it is built to make obvious? Commit to an answer, then read on.

Hint: Name the parts, then say what changes between them — and if nothing changes, say what is being held still.

Answer:

Read the quantifier prefix left to right as turn order. The leftmost quantifier moves first.

38. Who moves first?

Concept

Read the quantifier prefix left to right as turn order. The leftmost quantifier moves first.

Figure (svg): Two turn-order diagrams. Top: for-all x then exists y, the adversary picks x first (red) and you answer with y (green) that may depend on x. Bottom: exists y then for-all x, you commit to one y first (green) before the adversary picks x (red), so that single y must beat every x.

In the first order your y may depend on x. In the second order you must commit to a single y that works against every x at once — a far stronger promise.

39. Complete the line: Worked example: order matters (over the reals)

Fill the middle

Fill in the blanks

From Worked example: order matters (over the reals) — finish the line. Write what belongs on the right of the equals sign before you look.

\textx + 1 \ \Rightarrow \ y > x x, \ \text___ y = ___

Why: Producing the right-hand side unprompted is the difference between recognising this line and being able to use it. You choose y after seeing x, so let y depend on x.

40. Worked example: order matters (over the reals)

Worked example

Compare two statements over the real numbers, differing only in quantifier order.

\[ (A)\ \forall x\, \exists y\, (y > x) \qquad (B)\ \exists y\, \forall x\, (y > x) \]

Evaluate A: adversary picks x first

Why: You choose y after seeing x, so let y depend on x.

\[ \text{given } x, \ \text{take } y = x + 1 \ \Rightarrow \ y > x \]

Conclude A is true

Why: Your response x plus one beats every x the adversary can pick.

Evaluate B: you commit to one y first

Why: That single y must exceed every real x. But taking x equal to y defeats it, since y is not greater than itself.

\[ \text{for any fixed } y, \ x = y \ \Rightarrow \ \lnot (y > x) \]

Conclude B is false

Why: No single real is larger than all reals.

Verify the contrast

Why: Same predicate, swapped prefix: A true, B false. The dependence of y on x is exactly what A allows and B forbids. A statement and its reversal disagree, as expected.

41. order matters (over the reals) — line by line

Picture it

Animation

Shows: Each line of the worked example "order matters (over the reals)", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: Same predicate, swapped prefix: A true, B false. The dependence of y on x is exactly what A allows and B forbids. A statement and its reversal disagree, as expected.

42. Plan first: Worked example: the same swap over the naturals

Step zero

Discussion prompt

Worked example: the same swap over the naturals — before any calculation: what is the plan? Name the moves in order, in plain English, without doing the arithmetic.

Hint: It starts with: Test whether some natural is at least every natural

Answer:

  1. Test whether some natural is at least every natural
  2. Defeat any candidate
  3. Compare with the forward order

43. Worked example: the same swap over the naturals

Worked example

Does restricting to the natural numbers rescue the reversed statement?

\[ D = \mathbb{N}, \quad (B)\ \exists y\, \forall x\, (y \ge x) \]

Test whether some natural is at least every natural

Why: A single such y would be a largest natural number.

\[ \text{need } y \text{ with } y \ge x \ \text{for all } x \in \mathbb{N} \]

Defeat any candidate

Why: Whatever y you name, its successor is larger.

\[ x = y + 1 \ \Rightarrow \ y + 1 > y \ \Rightarrow \ \lnot (y \ge x) \]

Compare with the forward order

Why: The x-first statement stays true: given x, take y equal to x itself.

\[ \forall x\, \exists y\, (y \ge x): \ \text{take } y = x \]

Verify

Why: Over the naturals the x-first statement is true and the y-first statement is false, for the same reason as over the reals: there is no largest element. Domain changed, lesson unchanged.

44. the same swap over the naturals — line by line

Picture it

Animation

Shows: Each line of the worked example "the same swap over the naturals", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: Over the naturals the x-first statement is true and the y-first statement is false, for the same reason as over the reals: there is no largest element. Domain changed, lesson unchanged.

45. Trap: silently swapping quantifier order

Trap

The trap

Treating for-all-then-there-exists and there-exists-then-for-all as interchangeable.

\[ \forall x\, \exists y\, (y > x) \ \overset{?}{=}\ \exists y\, \forall x\, (y > x) \]

The left is true over the reals; the right claims a single largest-beating number exists, which is false.

\[ \text{left: TRUE}, \qquad \text{right: FALSE} \]

The fix

Keep the prefix order sacred. Exactly one legal move exists: adjacent quantifiers of the same kind commute.

\[ \forall x\, \forall y \equiv \forall y\, \forall x, \qquad \exists x\, \exists y \equiv \exists y\, \exists x \]

But a for-all next to a there-exists may never be swapped. Moving an existential outward is the strictly stronger claim that one witness serves all cases.

46. Break it on purpose: silently swapping quantifier order

Break the constraint

Discussion prompt

The rule this trap just fixed:

Keep the prefix order sacred. Exactly one legal move exists: adjacent quantifiers of the same kind commute.

Now break it on purpose. Build a case that violates it and follow the consequences until something visibly fails. Where does the failure first show up — and would you have noticed it if you had not been looking?

Hint: The dangerous rules are the ones whose violation still produces an answer. If yours fails loudly, try to find one that fails quietly.

47. Same-kind quantifiers commute; mixed ones do not

Concept

Two universals in a row can be reordered freely, and so can two existentials. The meaning is untouched.

\[ \forall x\, \forall y\, R(x,y) \ \equiv\ \forall y\, \forall x\, R(x,y) \]

\[ \exists x\, \exists y\, R(x,y) \ \equiv\ \exists y\, \exists x\, R(x,y) \]

A mixed pair is the only dangerous case. When a universal and an existential are adjacent, their order encodes who chooses first, and that cannot be traded away.

48. Guess the shape of the answer: Worked example: unfolding exists-unique

Estimation

Predict first

The uniqueness quantifier is shorthand. Spell it out using only the ordinary quantifiers and equality.

Commit before you compute: what does Worked example: unfolding exists-unique come out to? A rough magnitude and the right form is enough — the point is to have something concrete to be wrong about.

Correct: Verify on a concrete predicate

Why: A prediction you can defend turns the computation into a check rather than a leap of faith — and an answer that contradicts it is caught on the spot. Take P(x): x plus three equals five over the integers.

49. Worked example: unfolding exists-unique

Worked example

The uniqueness quantifier is shorthand. Spell it out using only the ordinary quantifiers and equality.

\[ \exists ! \, x \, P(x) \]

Assert existence

Why: At least one element satisfies P.

\[ \exists x \, P(x) \]

Assert uniqueness

Why: Any two elements that both satisfy P must be equal.

\[ \forall a \, \forall b \, \big( (P(a) \land P(b)) \to a = b \big) \]

Combine into one standard form

Why: Existence plus uniqueness, packaged around a single witness variable.

\[ \exists x \, \big( P(x) \land \forall y \, (P(y) \to y = x) \big) \]

Verify on a concrete predicate

Why: Take P(x): x plus three equals five over the integers. Existence: x = 2 works. Uniqueness: if a plus three and b plus three both equal five then a = b = 2. So exists-unique holds, matching the unfolded form.

50. unfolding exists-unique — line by line

Picture it

Animation

Shows: Each line of the worked example "unfolding exists-unique", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: Take P(x): x plus three equals five over the integers. Existence: x = 2 works. Uniqueness: if a plus three and b plus three both equal five then a = b = 2. So exists-unique holds, matching the unfolded form.

51. Bounded quantifiers

Concept

Often we quantify only over elements meeting a side condition — the positives, the primes, the members of a subset. That is a bounded quantifier.

\[ (\forall x > 0)\ P(x) \ :=\ \forall x \, (x > 0 \to P(x)) \]

\[ (\exists x > 0)\ P(x) \ :=\ \exists x \, (x > 0 \land P(x)) \]

Notice the asymmetry: a bounded universal unfolds with an implication, a bounded existential with a conjunction. Mixing these up is a classic translation bug we will trap shortly.

52. What has to happen first: Worked example: Goldbach's conjecture in logic

Ranking

Put in order

Put the moves of Worked example: Goldbach's conjecture in logic into the order they have to happen.

  1. Set up the bounded universal
  2. Read it back to check the shape
  3. Negate mechanically
  4. Interpret the negation
  5. Verify the negation is a single counterexample

Why: These are the moves of the worked example in the order it makes them, and each one is set up by the one before it. Quantify over even integers exceeding two; a bounded universal uses an implication.

53. Worked example: Goldbach's conjecture in logic

Worked example

Translate: every even integer greater than two is a sum of two primes. Then negate it.

\[ \text{predicates } \text{Even}(n), \ \text{Prime}(p); \quad \text{domain } \mathbb{Z} \]

Set up the bounded universal

Why: Quantify over even integers exceeding two; a bounded universal uses an implication.

\[ \forall n \, \big( (n > 2 \land \text{Even}(n)) \to \exists p\, \exists q\, (\text{Prime}(p) \land \text{Prime}(q) \land n = p + q) \big) \]

Read it back to check the shape

Why: For every n, IF n is even and above two, THEN two primes sum to it. The inner existentials may pick different primes for each n.

Negate mechanically

Why: Push the negation through: not-for-all becomes there-exists, and the negated implication becomes a conjunction.

\[ \exists n \, \big( n > 2 \land \text{Even}(n) \land \forall p\, \forall q\, \lnot(\text{Prime}(p) \land \text{Prime}(q) \land n = p + q) \big) \]

Interpret the negation

Why: There is some even n above two that cannot be written as a sum of two primes — exactly what a counterexample to Goldbach would be.

Verify the negation is a single counterexample

Why: Negating the outer universal yields one existential witness n, and negating the inner existentials yields a universal denial over all prime pairs. The shape is precisely one bad even number, as disproving a universal demands. Confirmed.

54. Goldbach's conjecture in logic — line by line

Picture it

Animation

Shows: Each line of the worked example "Goldbach's conjecture in logic", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: Negating the outer universal yields one existential witness n, and negating the inner existentials yields a universal denial over all prime pairs. The shape is precisely one bad even number, as disproving a universal demands. Confirmed.

55. Negating a universal

Concept

To deny that something holds for everything, you claim it fails for something. Negation turns a universal into an existential.

\[ \lnot \, \forall x \, P(x) \ \equiv\ \exists x \, \lnot P(x) \]

The witness on the right is precisely a counterexample: one element where P fails. This is why disproving a universal means exhibiting a single counterexample.

56. Negating an existential

Concept

To deny that something exists, you claim everything fails it. Negation turns an existential into a universal.

\[ \lnot \, \exists x \, P(x) \ \equiv\ \forall x \, \lnot P(x) \]

Together with the previous rule, these are the De Morgan laws for quantifiers: negation slides inward and flips each quantifier it passes.

57. Negation swaps the players

Intuition

In the game picture, negating a statement swaps the two players' roles: the adversary becomes the responder and the responder becomes the adversary.

So a prefix of quantifiers, when negated, flips every for-all to a there-exists and every there-exists to a for-all, while the body is negated once at the end.

\[ \lnot \, \forall x\, \exists y\, \forall z\, R \ \equiv\ \exists x\, \forall y\, \exists z\, \lnot R \]

That single rule — flip every quantifier, negate the core — mechanizes the negation of any prenex statement, however deeply nested.

58. Worked example: negating a nested statement

Worked example

Negate the statement that every x has a strictly larger y, and simplify until no negation sits in front of a quantifier.

\[ \lnot \, \forall x \, \exists y \, (x < y) \]

Push past the universal

Why: not-for-all-x becomes there-exists-x, and the negation moves inward.

\[ \exists x \, \lnot \, \exists y \, (x < y) \]

Push past the existential

Why: not-there-exists-y becomes for-all-y; the negation keeps moving inward.

\[ \exists x \, \forall y \, \lnot (x < y) \]

Simplify the core

Why: The negation of x less than y is x greater than or equal to y.

\[ \exists x \, \forall y \, (x \ge y) \]

Read the result

Why: There is an x greater than or equal to every y — a largest element. That is the honest negation of every-x-has-a-bigger-y.

Verify by meaning

Why: Over the reals the original is true and the negation asserts a largest real, which is false. A statement and its negation carry opposite truth values, as required. Confirmed.

59. negating a nested statement — line by line

Picture it

Animation

Shows: Each line of the worked example "negating a nested statement", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: Over the reals the original is true and the negation asserts a largest real, which is false. A statement and its negation carry opposite truth values, as required. Confirmed.

60. Trap: negating for-all by negating only the body

Trap

The trap

Turning not everything is P into everything is not P, leaving the quantifier untouched.

\[ \lnot \, \forall x \, P(x) \ \overset{?}{\equiv}\ \forall x \, \lnot P(x) \]

Take P(x): x is even, over the integers. The left says not all integers are even, which is TRUE. The right says all integers are odd, which is FALSE. Different truth values, so the equivalence is wrong.

The fix

Negation must FLIP the quantifier, not just the body.

\[ \lnot \, \forall x \, P(x) \ \equiv\ \exists x \, \lnot P(x) \]

Not all integers are even correctly becomes some integer is not even, which is true — matching the original. Flip first, then negate the core.

61. Plan first: Worked example: there is no largest prime

Step zero

Discussion prompt

Worked example: there is no largest prime — before any calculation: what is the plan? Name the moves in order, in plain English, without doing the arithmetic.

Hint: It starts with: Express that p is a largest prime

Answer:

  1. Express that p is a largest prime
  2. Say no such p exists
  3. Push the negation inward
  4. Read the positive form
  5. Verify the two forms agree

62. Worked example: there is no largest prime

Worked example

Translate there is no largest prime into logic, then unfold its negation to see the positive content.

\[ \text{predicate } \text{Prime}(p); \quad \text{domain } \mathbb{N} \]

Express that p is a largest prime

Why: p is prime and no prime exceeds it.

\[ \text{Prime}(p) \land \forall q \, (\text{Prime}(q) \to q \le p) \]

Say no such p exists

Why: Put a there-is-no in front — a negated existential.

\[ \lnot \, \exists p \, \big( \text{Prime}(p) \land \forall q \, (\text{Prime}(q) \to q \le p) \big) \]

Push the negation inward

Why: not-there-exists becomes for-all; the negated conjunction and implication unfold.

\[ \forall p \, \big( \text{Prime}(p) \to \exists q \, (\text{Prime}(q) \land q > p) \big) \]

Read the positive form

Why: For every prime p there is a larger prime q. That is Euclid's theorem, and it is the shape a proof actually targets.

Verify the two forms agree

Why: Both say the primes have no top element; the second is the first with the negation fully driven in. For any prime p, a larger prime q witnesses the universal, so the driven-in form holds. Confirmed.

63. there is no largest prime — line by line

Picture it

Animation

Shows: Each line of the worked example "there is no largest prime", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: Both say the primes have no top element; the second is the first with the negation fully driven in. For any prime p, a larger prime q witnesses the universal, so the driven-in form holds. Confirmed.

64. Convergence is a quantifier sandwich

Concept

The definition of a sequence converging to a limit is nothing but a nested quantifier statement. Reading it as logic is the whole battle.

\[ \forall \varepsilon > 0 \ \exists N \ \forall n \ge N \ \big( |a_n - L| < \varepsilon \big) \]

For every tolerance epsilon, there is a cutoff N, such that beyond N every term sits within epsilon of L. The order — epsilon, then N, then n — is the meaning.

Because N comes after epsilon, N is allowed to depend on epsilon. Smaller epsilon usually forces a larger N. That dependence is the heart of the definition.

65. State the rule before it runs: Worked example: negating convergence

Hypothesis

Predict first

Worked example: negating convergence is about to be worked. State your hypothesis first: which rule or definition decides this one, and what is the first move it forces? Then watch whether the example agrees with you.

Correct: Flip the leading universal

Why: not-for-all-epsilon becomes there-exists-epsilon.

A hypothesis you wrote down is falsifiable; a vague sense of how it will go is not. If the example opens somewhere else, that gap is the thing worth chasing.

66. Worked example: negating convergence

Worked example

Write down what it means for a sequence to NOT converge to L, by mechanically negating the definition.

\[ \lnot \, \forall \varepsilon > 0 \ \exists N \ \forall n \ge N \ (|a_n - L| < \varepsilon) \]

Flip the leading universal

Why: not-for-all-epsilon becomes there-exists-epsilon.

\[ \exists \varepsilon > 0 \ \lnot \, \exists N \ \forall n \ge N \ (|a_n - L| < \varepsilon) \]

Flip the existential N

Why: not-there-exists-N becomes for-all-N.

\[ \exists \varepsilon > 0 \ \forall N \ \lnot \, \forall n \ge N \ (|a_n - L| < \varepsilon) \]

Flip the bounded universal on n

Why: not-for-all-n-beyond-N becomes there-exists-n-beyond-N, and the strict inequality negates to the reverse non-strict one.

\[ \exists \varepsilon > 0 \ \forall N \ \exists n \ge N \ (|a_n - L| \ge \varepsilon) \]

Read the meaning

Why: There is a fixed tolerance epsilon that the sequence violates infinitely often: no matter how far out N is set, some later term stays at least epsilon from L.

Verify against an example

Why: For the alternating sequence plus-one, minus-one, and candidate limit L = 0, take epsilon = 1: for every N there is a later term of absolute value one, which is at least one. The negation holds, so that sequence does not converge to zero. Confirmed.

67. negating convergence — line by line

Picture it

Animation

Shows: Each line of the worked example "negating convergence", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: For the alternating sequence plus-one, minus-one, and candidate limit L = 0, take epsilon = 1: for every N there is a later term of absolute value one, which is at least one. The negation holds, so that sequence does not converge to zero. Confirmed.

68. Continuity is the same pattern

Concept

Continuity of a function at a point is another quantifier sandwich, with delta depending on epsilon just as N did.

\[ \forall \varepsilon > 0 \ \exists \delta > 0 \ \forall x \ \big( |x - a| < \delta \to |f(x) - f(a)| < \varepsilon \big) \]

For every output tolerance epsilon, there is an input tolerance delta, such that staying within delta of a keeps the output within epsilon of the value at a.

Delta comes after epsilon, so delta may depend on epsilon — and typically on the point a as well. Hold that thought; it separates plain continuity from uniform continuity later.

69. What has to be given first: Worked example: what discontinuity says

Missing information

Discussion prompt

Negate the definition of continuity at a to obtain the precise definition of discontinuity there.

What do you need to know — or decide — before the first line can be written? List everything the problem has to hand you.

Hint: Anything you would have to invent to get started is a thing the problem must supply.

Answer:

not-for-all-epsilon becomes there-exists-epsilon; not-there-exists-delta becomes for-all-delta.

70. Worked example: what discontinuity says

Worked example

Negate the definition of continuity at a to obtain the precise definition of discontinuity there.

\[ \lnot \, \forall \varepsilon > 0 \ \exists \delta > 0 \ \forall x \ (|x - a| < \delta \to |f(x) - f(a)| < \varepsilon) \]

Flip the epsilon and delta quantifiers

Why: not-for-all-epsilon becomes there-exists-epsilon; not-there-exists-delta becomes for-all-delta.

\[ \exists \varepsilon > 0 \ \forall \delta > 0 \ \lnot \, \forall x \ (\cdots) \]

Flip the universal on x and negate the implication

Why: not-for-all-x becomes there-exists-x; a negated implication is the hypothesis together with the negated conclusion.

\[ \exists \varepsilon > 0 \ \forall \delta > 0 \ \exists x \ (|x - a| < \delta \land |f(x) - f(a)| \ge \varepsilon) \]

Read the meaning

Why: There is a bad tolerance epsilon such that no matter how small delta is, some x within delta of a is thrown at least epsilon away in output.

Verify on a jump

Why: For the step function equal to zero for negative inputs and one from zero upward, at the point a = 0 take epsilon = one half: every delta admits a slightly negative x whose output zero is distance one away, which exceeds one half. So the function is discontinuous at zero. Confirmed.

71. what discontinuity says — line by line

Picture it

Animation

Shows: Each line of the worked example "what discontinuity says", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: For the step function equal to zero for negative inputs and one from zero upward, at the point a = 0 take epsilon = one half: every delta admits a slightly negative x whose output zero is distance one away, which exceeds one half. So the function is discontinuous at zero. Confirmed.

72. Trap: choosing delta before epsilon

Trap

The trap

Reversing the tolerance quantifiers, so a single delta is asked to work for every epsilon.

\[ \exists \delta > 0 \ \forall \varepsilon > 0 \ \forall x \ (|x - a| < \delta \to |f(x) - f(a)| < \varepsilon) \]

This says a single delta forces the output within EVERY epsilon at once — which forces f to be constant near a. It is a much stronger, wrong statement.

The fix

Epsilon is the challenge; delta is the response to it. Epsilon must come first so that delta may depend on it.

\[ \forall \varepsilon > 0 \ \exists \delta > 0 \ \forall x \ (|x - a| < \delta \to |f(x) - f(a)| < \varepsilon) \]

Read the prefix as turn order: the adversary names epsilon, then you produce a delta. Swapping the order changes the mathematics entirely.

73. Which of these survive contact with Predicate Logic & Quantifiers?

Two truths and a lie

Sort into buckets

Some of these hold up and some are the exact mistakes this lesson is built to prevent. Sort them.

Holds up
A proposition is a statement that is flatly true or false. 7 is prime is true; 6 is prime is false.; isPrime(7) returns true; isPrime(6) returns false. The predicate is the function; supplying an argument is what produces a truth value.; For a one-variable predicate over a domain, collect exactly the elements that make it true. That collection is its truth set.
Breaks
Calling a quantified statement simply true or false with no domain in mind.; Assuming an existential claim promises a unique witness.
sound
These are stated as this lesson states them — each one survives the edge cases Predicate Logic & Quantifiers puts it through.
flawed
Each of these is lifted from a trap in this deck: reasonable-sounding, and wrong in a way that only shows up once you rely on it.

74. Relativizing quantifiers to a subset

Concept

To quantify over a named subset rather than the whole domain, relativize: guard a universal with an implication and an existential with a conjunction.

\[ (\forall x \in S)\, P(x) \ :=\ \forall x \, (x \in S \to P(x)) \]

\[ (\exists x \in S)\, P(x) \ :=\ \exists x \, (x \in S \land P(x)) \]

This is the general form of the bounded quantifiers from earlier: the side condition is membership in S. The same implication-versus-conjunction asymmetry applies.

75. Guess the shape of the answer: Worked example: relativizing and negating

Estimation

Predict first

Over the integers, translate every prime other than two is odd, treating the primes as the subset S, then negate.

Commit before you compute: what does Worked example: relativizing and negating come out to? A rough magnitude and the right form is enough — the point is to have something concrete to be wrong about.

Correct: Read the negation

Why: A prediction you can defend turns the computation into a check rather than a leap of faith — and an answer that contradicts it is caught on the spot. The negation would require an even prime different from two.

76. Worked example: relativizing and negating

Worked example

Over the integers, translate every prime other than two is odd, treating the primes as the subset S, then negate.

\[ S = \{\, x : \text{Prime}(x) \,\} \]

Relativize the universal to the primes

Why: Guard with membership using an implication, and exclude two inside the guard.

\[ \forall x \, \big( (\text{Prime}(x) \land x \ne 2) \to \text{Odd}(x) \big) \]

Negate mechanically

Why: Flip to there-exists; the negated implication becomes a conjunction.

\[ \exists x \, \big( \text{Prime}(x) \land x \ne 2 \land \lnot \text{Odd}(x) \big) \]

Read the negation

Why: The negation would require an even prime different from two. No such integer exists, so the negation is false and the original is true.

Verify

Why: The only even prime is two, which the guard excludes; every other prime is odd. The universal holds and its negation fails, as required. Confirmed.

77. relativizing and negating — line by line

Picture it

Animation

Shows: Each line of the worked example "relativizing and negating", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: The only even prime is two, which the guard excludes; every other prime is odd. The universal holds and its negation fails, as required. Confirmed.

78. First-order structures give symbols meaning

Concept

Symbols like R, the function f, or the constant c mean nothing on their own. A structure supplies a domain and an interpretation for every symbol.

structure — A non-empty domain together with an interpretation assigning: to each constant an element, to each function symbol an actual function on the domain, and to each predicate symbol an actual relation on the domain.

The same sentence can be read in many structures. Truth is always truth in a particular structure — never absolute.

79. A structure is an implementation

Intuition

Your CS reading: a first-order signature is an interface — a list of symbol names with arities. A structure is a concrete implementation of that interface.

The sentences are specifications written against the interface. One specification can hold in some implementations and fail in others, exactly as an interface can have conforming and non-conforming classes.

Validity will mean: holds in every implementation. Satisfiability will mean: holds in at least one.

80. Satisfaction: truth in a structure

Concept

Given a structure and an assignment of domain elements to any free variables, each formula is either satisfied or not. Quantifiers range over the structure's domain.

\[ \mathcal{M} \models \varphi \]

Read: the structure M satisfies phi.

For a sentence — no free variables — the assignment is irrelevant, and the sentence is simply true or false in M.

81. Validity versus satisfiability

Concept

valid — A sentence is valid when it is true in every structure. Validity is the first-order analogue of a propositional tautology.

satisfiable — A sentence is satisfiable when it is true in at least one structure. It is valid exactly when its negation is unsatisfiable.

\[ \varphi \ \text{valid} \iff \lnot \varphi \ \text{unsatisfiable} \]

Most sentences are neither valid nor contradictory: true in some structures, false in others. Those are the interesting, contingent ones.

82. Plan first: Worked example: satisfiable but not valid

Step zero

Discussion prompt

Worked example: satisfiable but not valid — before any calculation: what is the plan? Name the moves in order, in plain English, without doing the arithmetic.

Hint: It starts with: Build a structure where phi is true

Answer:

  1. Build a structure where phi is true
  2. Check phi in the first structure
  3. Build a structure where phi is false
  4. Check phi in the second structure
  5. Verify the conclusion

83. Worked example: satisfiable but not valid

Worked example

Show the sentence there is an element related to everything is satisfiable but not valid, by exhibiting two structures.

\[ \varphi:\ \exists x \, \forall y \, R(x,y) \]

Build a structure where phi is true

Why: Interpret R as less-than-or-equal on a two-element chain; the bottom element relates to both.

\[ \mathcal{M}_1:\ D = \{0,1\}, \ R = \{(0,0),(0,1),(1,1)\} \]

Check phi in the first structure

Why: Take x = 0; then the pairs zero-zero and zero-one are in R, so for-all-y R(0,y) holds. Phi is true here, hence satisfiable.

Build a structure where phi is false

Why: Interpret R as strict less-than on the same domain; no element relates to itself, so none relates to everything.

\[ \mathcal{M}_2:\ D = \{0,1\}, \ R = \{(0,1)\} \]

Check phi in the second structure

Why: For x = 0 the pair zero-zero is missing; for x = 1 the pairs one-zero and one-one are missing. No x works, so phi is false here.

Verify the conclusion

Why: Phi is true in the first structure and false in the second: satisfiable but not valid. One witnessing structure and one refuting structure settle it. Confirmed.

84. satisfiable but not valid — line by line

Picture it

Animation

Shows: Each line of the worked example "satisfiable but not valid", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: Take x = 0; then the pairs zero-zero and zero-one are in R, so for-all-y R(0,y) holds. Phi is true here, hence satisfiable.

85. Skolemization: naming the witness

Concept

When a for-all is followed by a there-exists, the inner witness depends on the outer variable. Skolemization makes that dependence an explicit function.

\[ \forall x \, \exists y \, R(x,y) \ \rightsquigarrow\ \forall x \, R(x, f(x)) \]

Skolem function — A fresh function symbol f introduced to name, for each x, a witness y making the inner formula true. The existential quantifier is replaced by the term f of x.

Skolemization preserves satisfiability. It trades an existence claim for a function that produces the witnesses.

86. The Skolem function is a chooser

Intuition

A Skolem function chooses one witness per input. When the domain is infinite and no formula pins the choice down, assembling that function silently uses the Axiom of Choice.

This is why the for-all-then-there-exists pattern is often called the logical fingerprint of choice: it promises a witness for every case, and Skolemizing gathers all those witnesses into a single function at once.

In tame cases the chooser is explicit — a formula, not a leap of faith. The next example is one of those.

87. Teach it back: The Skolem function is a chooser

Explain it

Discussion prompt

Explain The Skolem function is a chooser to a student a year behind you. No notation, no jargon they have not met — and it still has to be true.

Hint: If your explanation needs a symbol they have never seen, you are describing the notation rather than the idea.

Answer:

A Skolem function chooses one witness per input. When the domain is infinite and no formula pins the choice down, assembling that function silently uses the Axiom of Choice.

88. What has to happen first: Worked example: Skolemizing successor

Ranking

Put in order

Put the moves of Worked example: Skolemizing successor into the order they have to happen.

  1. Identify the dependence
  2. Exhibit an explicit Skolem function
  3. Rewrite without the existential
  4. Verify the Skolem function works

Why: These are the moves of the worked example in the order it makes them, and each one is set up by the one before it. The inner y is chosen after x, so a witness for y is a function of x.

89. Worked example: Skolemizing successor

Worked example

Skolemize the true statement that every real has something larger, producing an explicit witness function.

\[ \forall x \, \exists y \, (y > x) \]

Identify the dependence

Why: The inner y is chosen after x, so a witness for y is a function of x.

\[ y = f(x) \]

Exhibit an explicit Skolem function

Why: Adding one always produces a larger number, uniformly in x.

\[ f(x) = x + 1 \]

Rewrite without the existential

Why: Replace y by f of x; the statement becomes a plain universal.

\[ \forall x \, \big( f(x) > x \big), \quad f(x) = x + 1 \]

Verify the Skolem function works

Why: For every real x, x plus one is greater than x, so the universal holds and it implies the original existential form. Same satisfiability, explicit witness. Confirmed.

90. Skolemizing successor — line by line

Picture it

Animation

Shows: Each line of the worked example "Skolemizing successor", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: For every real x, x plus one is greater than x, so the universal holds and it implies the original existential form. Same satisfiability, explicit witness. Confirmed.

91. The decidability cliff

Concept

Quantifying over an infinite domain costs you decidability. The staircase down is sharp.

Propositional validity is decidable: a truth table always terminates with a definite yes or no.

First-order validity is only semi-decidable: a proof search will halt and confirm every valid sentence, but may run forever on an invalid one. This is the Church-Turing result — no decision procedure exists.

Truth in arithmetic is undecidable outright, not even semi-decidable. The expressive power that lets us state number theory is exactly what puts its truth beyond any algorithm.

92. By analogy: The decidability cliff

Analogy

Discussion prompt

Explain The decidability cliff by analogy to something with no Foundations of Higher Mathematics in it at all — a queue, a recipe, a map, a bank balance, whatever fits. Then say where your analogy breaks.

Hint: An analogy that never breaks is not an analogy, it is the same idea wearing a hat. Find the seam — that is the part that is actually new.

Answer:

Quantifying over an infinite domain costs you decidability. The staircase down is sharp.

93. Two Gödel theorems, do not confuse them

Concept

Gödel's Completeness Theorem is about the logic itself: semantic entailment and formal provability coincide.

\[ \Gamma \models \varphi \iff \Gamma \vdash \varphi \]

Gödel's Incompleteness Theorem is about strong enough theories of arithmetic: any consistent, effectively axiomatized such theory has true statements it cannot prove.

No contradiction. Completeness says the proof system captures logical consequence perfectly; incompleteness says no fixed axiom set captures all arithmetical truth. Different targets.

94. Break it if you can: Two Gödel theorems, do not confuse them

Counterexample

Discussion prompt

Gödel's Completeness Theorem is about the logic itself: semantic entailment and formal provability coincide.

That is stated as though it always holds. Do one of two things: produce a case where it fails, or say precisely what rules such a case out. "It just does" is not on the menu.

Hint: Hunt at the extremes first — zero, one, negative, empty, equal. If every extreme survives, the reason they survive is the proof.

Answer:

Gödel's Incompleteness Theorem is about strong enough theories of arithmetic: any consistent, effectively axiomatized such theory has true statements it cannot prove.

95. Pattern: negate any quantified statement

Pattern

1. Put the negation at the very front

Why: Start from not-of-the-whole-statement; nothing else changes yet.

2. March the negation rightward through the prefix

Why: Each quantifier it crosses flips: for-all becomes there-exists, there-exists becomes for-all.

\[ \lnot \forall \ \rightsquigarrow\ \exists \lnot, \qquad \lnot \exists \ \rightsquigarrow\ \forall \lnot \]

3. Negate the innermost body last

Why: Once past all quantifiers, negate the core: flip the relation or apply the propositional rules.

\[ \lnot(A \to B) \equiv A \land \lnot B, \qquad \lnot(A \land B) \equiv \lnot A \lor \lnot B \]

4. Clean up the bounded guards

Why: A negated bounded universal keeps its guard as a conjunction; a negated bounded existential keeps its guard as an implication.

Run these four steps and you can negate convergence, continuity, or Goldbach without thinking — the manipulation is purely mechanical.

96. Decode the notation: Pattern: negate any quantified statement

Notation

Annotate

From Pattern: negate any quantified statement — read this one piece at a time. What is each part doing?

On: \( \lnot \forall \ \rightsquigarrow\ \exists \lnot, \qquad \lnot \exists \ \rightsquigarrow\ \forall \lnot \)

  • Start from not-of-the-whole-statement; nothing else changes yet.
  • Each quantifier it crosses flips: for-all becomes there-exists, there-exists becomes for-all.
  • Once past all quantifiers, negate the core: flip the relation or apply the propositional rules.

97. Pattern: translate English into logic

Pattern

1. Fix the domain out loud

Why: Decide what the variables range over before writing a symbol; it is part of the meaning.

2. Name the predicates and their arity

Why: Turn each property and relation in the sentence into a predicate symbol with the right number of slots.

3. Order the quantifiers by dependence

Why: If an object is chosen in response to another, its quantifier goes to the right of the one it depends on.

4. Guard the bounded ranges correctly

Why: A universal over a subset uses an implication; an existential over a subset uses a conjunction.

Domain, predicates, order, guards — in that order. Reverse the recipe to read any formula back into plain English.

98. Where does it stop working: Pattern: translate English into logic

Edge cases

Discussion prompt

Pattern: translate English into logic works on the cases you have just seen. Push it to the edge: what is the most degenerate input it still handles — empty, zero, one item, everything equal — and what is the first case where it stops being true? Name the case, not just "it breaks".

Hint: Try the smallest legal input, then the largest, then the one where two things collide. Methods are specified at their edges; the middle takes care of itself.

Answer:

Domain, predicates, order, guards — in that order. Reverse the recipe to read any formula back into plain English.

99. Rule out three: Check: does order flip the truth?

Elimination

Eliminate the wrong options

Over the reals, what are the truth values of (A) and (B)?

3 of these 4 are wrong. Strike them one at a time, and say what rules each one out before you strike the next. The survivor is the answer.

  • A. (A) true, (B) false
  • B. (A) false, (B) true
  • C. both true
  • D. both false

Survives elimination: A

Why: In (A) the adversary picks x first and you answer y = x + 1, so (A) is true; in (B) one fixed y would have to exceed every real, but x = y refutes it, so (B) is false. Reversing a mixed quantifier pair changes the truth value.

100. Check: does order flip the truth?

Check

Work over the real numbers.

\[ (A)\ \forall x\, \exists y\, (y > x) \qquad (B)\ \exists y\, \forall x\, (y > x) \]

Check your understanding

Over the reals, what are the truth values of (A) and (B)?

  • A. (A) true, (B) false (correct)
  • B. (A) false, (B) true
  • C. both true
  • D. both false

Answer: A

Why: In (A) the adversary picks x first and you answer y = x + 1, so (A) is true; in (B) one fixed y would have to exceed every real, but x = y refutes it, so (B) is false. Reversing a mixed quantifier pair changes the truth value.

Why B tempts people
Reversed the two statements: it is the y-first statement (B) that fails, because no single real beats all reals, while the x-first statement (A) succeeds.
Why C tempts people
Treated the mixed quantifiers as commuting. (B) is genuinely false — no real is greater than every real, itself included.
Why D tempts people
Missed that (A) is true: for each x the witness x + 1 works, so the for-all-then-there-exists statement holds.

101. Check: negate it correctly

Check

Negate the statement and drive the negation all the way in.

\[ \forall x \, \exists y \, (x + y = 0) \]

Check your understanding

Which is the correct negation?

  • A. there exists x such that for all y, x + y is not zero (correct)
  • B. for all x there exists y such that x + y is not zero
  • C. there exists x, there exists y, such that x + y is not zero
  • D. for all x, for all y, x + y is not zero

Answer: A

Why: Negation flips each quantifier as it passes: the leading for-all-x becomes there-exists-x, the inner there-exists-y becomes for-all-y, and the equality is negated. The result is there-exists-x for-all-y with x + y nonzero.

Why B tempts people
Only the inner quantifier and the body were flipped; the leading universal must also flip to an existential.
Why C tempts people
Both quantifiers were left as existentials and only the body negated. Negation must convert for-all into there-exists and there-exists into for-all.
Why D tempts people
Both quantifiers were kept as universals. The leading for-all should flip to there-exists while the inner there-exists flips to for-all.

102. Check: does the domain matter?

Check

Consider the statement that some element squared equals two.

\[ \exists x \, (x \cdot x = 2) \]

Check your understanding

Over which domain is this statement TRUE?

  • A. the real numbers (correct)
  • B. the rational numbers
  • C. the integers
  • D. it is true or false regardless of the domain

Answer: A

Why: A real square root of two exists, so the statement is true over the reals. Over the rationals and the integers there is no element whose square is two, so it is false there. The truth value depends entirely on the domain.

Why B tempts people
The square root of two is irrational; no fraction squares to two, so the statement is false over the rationals.
Why C tempts people
No integer squares to two — one squares to one and two squares to four — so it is false over the integers.
Why D tempts people
Quantified truth is always relative to a domain; this very statement is true over the reals and false over the rationals.

103. Check: what does exists-unique claim?

Check

Read the statement carefully, over the integers.

\[ \exists ! \, x \, (x + 3 = 5) \]

Check your understanding

What does this statement assert?

  • A. exactly one integer satisfies x + 3 = 5, and it does exist (correct)
  • B. at least one integer satisfies it, possibly several
  • C. at most one integer satisfies it, possibly none
  • D. every integer satisfies it

Answer: A

Why: The uniqueness quantifier packages two claims: at least one x satisfies the predicate AND no two distinct elements do. Here x = 2 exists and is the only solution, so the statement is true.

Why B tempts people
That is plain there-exists, which drops the uniqueness half. Exists-unique also forbids a second distinct witness.
Why C tempts people
That is the uniqueness half alone, which drops the existence half. Exists-unique also requires at least one witness.
Why D tempts people
That would be a universal claim. Exists-unique speaks of a single element, not of every element.

104. Rule out three: Check: reading a Skolemization

Elimination

Eliminate the wrong options

What does the Skolem function f capture, and what justifies introducing it?

3 of these 4 are wrong. Strike them one at a time, and say what rules each one out before you strike the next. The survivor is the answer.

  • A. f(x) names a witness y for each x; it is justified because the original statement guarantees a witness for every x
  • B. f(x) is the unique y for each x, guaranteed by the statement
  • C. f is a single constant witness that works for all x at once
  • D. introducing f turns a satisfiable statement into an unsatisfiable one

Survives elimination: A

Why: Skolemization replaces the inner existential by a function that, for each x, returns a witness y making R of x and y hold. It is justified precisely because the original for-all-then-there-exists guarantees such a y for every x, and it preserves satisfiability.

105. Check: reading a Skolemization

Check

A statement is Skolemized by introducing a function f.

\[ \forall x \, \exists y \, R(x,y) \ \rightsquigarrow\ \forall x \, R(x, f(x)) \]

Check your understanding

What does the Skolem function f capture, and what justifies introducing it?

  • A. f(x) names a witness y for each x; it is justified because the original statement guarantees a witness for every x (correct)
  • B. f(x) is the unique y for each x, guaranteed by the statement
  • C. f is a single constant witness that works for all x at once
  • D. introducing f turns a satisfiable statement into an unsatisfiable one

Answer: A

Why: Skolemization replaces the inner existential by a function that, for each x, returns a witness y making R of x and y hold. It is justified precisely because the original for-all-then-there-exists guarantees such a y for every x, and it preserves satisfiability.

Why B tempts people
The statement supplies at least one witness per x, not a unique one; there-exists-y is not exists-unique-y, so f need not be canonical.
Why C tempts people
A single constant witness would model the reversed statement there-exists-y for-all-x, a stronger and generally false claim.
Why D tempts people
Skolemization preserves satisfiability by design; it never turns a satisfiable statement unsatisfiable.

106. Connect it up: Predicate Logic & Quantifiers

Connect it up

Draw it

One page, no notation unless you need it: draw how these connect — Pattern: negate any quantified statement · Pattern: translate English into logic · A predicate is a sentence with a blank · A predicate is a Boolean-valued function · The truth set of a predicate. Put an arrow wherever one of them is what makes another possible, and label the arrow with why.

107. What you can do now

Recap

You can read a quantifier prefix as turn order, and explain precisely why a mixed for-all / there-exists pair changes meaning when reversed.

You can negate any quantified statement mechanically: flip every quantifier as the negation marches inward, then negate the core.

You translated real mathematics into logic — Goldbach, no largest prime, convergence, continuity — and read off each negation.

You met the semantic layer: structures, satisfaction, validity versus satisfiability, and Skolem functions as explicit witness-choosers.

And you located the decidability cliff: propositional validity decidable, first-order validity only semi-decidable, arithmetic truth undecidable — with the two Gödel theorems kept straight.

Quantifier moveWhat it means
for-all x P(x)every element satisfies P; one counterexample kills it
there-exists x P(x)at least one witness; says nothing about how many
negate for-allbecomes there-exists of the negation
negate there-existsbecomes for-all of the negation
for-all then there-existsthe inner witness may depend on the outer choice

Sources

  1. Enderton, A Mathematical Introduction to Logic; and the Wikipedia article on first-order logic (quantifiers, structures, satisfaction, validity).
  2. All translations, negations, witnesses, counterexample structures, and truth-value claims re-derived and checked by hand. — Verified 2026-07-21.

Want this taught 1-on-1? Alexander tutors Foundations of Higher Mathematics — $55/session, free consultation.

Book on Wyzant · Text (657) 465-8108