SigmaField
Mathematical Foundations for Quant Finance
0 of 256 lessons
    1. PG1.1 Statements and truth valuesProof · 25 min
    2. PG1.2 Implication, converse and contrapositiveProof · 30 min
    3. PG1.3 Quantifiers: for every and there existsProof · 30 min
    4. PG1.4 Negating a statementProof · 30 min
    5. PG1.5 Stage review: for every ε there exists δProof · 35 min
Proof Gym overview →

Proof Gym PG1 Logic and language Lesson 3 of 5

ProofLesson PG1.3 in the Proof Gym, stage PG1: Logic and language. About 30 minutes.

Quantifiers: for every and there exists

Simulate

Check the claim with numbers

Lesson 0.2.1 read ∀\forall as "for every" and ∃\exists as "there exists". A sentence such as "x2≥xx^2 \ge x" is neither true nor false until you say which xx. Put "for every real xx" in front and it becomes a statement.

Python can test a "for every" on many numbers at once. The cell takes 601 exact fractions from −3-3 to 33, in steps of 0.010.01, and tests two claims at each.

⌘/Ctrl + Enter runs the cell

The first claim fails at 99 points, every one strictly between 0 and 1, from 1100\frac{1}{100} to 99100\frac{99}{100}. The second never fails, and its smallest value is 1. Now a "there exists": is there a whole number xx with x2=x+6x^2 = x + 6?

⌘/Ctrl + Enter runs the cell

Two whole numbers work, −2-2 and 33, and only 33 is positive. The last cell shows that the order of "for every" and "there exists" matters. It works on the whole numbers from −5-5 to 55.

⌘/Ctrl + Enter runs the cell

For each xx some yy works, namely −x-x. But no single yy works for every xx at once.

Conjecture

  1. For every real number xx, x2−2x+2>0x^2 - 2x + 2 > 0.
  2. The statement "for every real number xx, x2≥xx^2 \ge x" is false.
  3. There is a positive real number xx with x2=x+6x^2 = x + 6.
  4. For every real xx there is a real yy with x+y=0x + y = 0. But no single real yy has x+y=0x + y = 0 for every real xx.

The cells tried 601 fractions, but claims 1 and 4 are about every real number, which no computer can try. Claims 2 and 3 are different: one well-chosen number settles each of them.

Proving and disproving with quantifiers

A quantifier says how many elements a statement is about. "For every" (∀\forall) is a promise about all of them, so it needs an argument that covers them all. "There exists" (∃\exists) is a promise about at least one, so showing one is enough.

Todo this
prove ∀x∈A, P(x)\forall x \in A,\ P(x)take any x∈Ax \in A, assume nothing else about it, and show P(x)P(x)
disprove itfind one x∈Ax \in A where P(x)P(x) fails: a counterexample
prove ∃ x∈A:P(x)\exists\, x \in A : P(x)find one x∈Ax \in A and check P(x)P(x)
disprove itshow that P(x)P(x) fails for every x∈Ax \in A

Here AA is a set and P(x)P(x) a sentence about each of its elements xx. Two quantifiers in a row are read left to right, and swapping them changes the meaning.

Rule: The order of quantifiers

∀x, ∃ y:x+y=0∃ y:∀x, x+y=0\begin{gathered} \forall x,\ \exists\, y : x + y = 0 \\ \exists\, y : \forall x,\ x + y = 0 \end{gathered}

In the first, yy is chosen after xx, so it may depend on xx: y=−xy = -x works, and the statement is true. In the second, one yy must be chosen first and then work for every xx. No yy can, so it is false.

Analysis writes small positive numbers with the Greek letters ε\varepsilon (epsilon) and δ\delta (delta). "For every ε>0\varepsilon > 0 there is a δ>0\delta > 0 …" lets δ\delta depend on ε\varepsilon, exactly as yy depended on xx above. Lesson PG1.5 builds on this.

Format 2

Fill the gap

Four short proofs, one for each move in the table. Type each missing piece as you would a quick answer, such as 1/4 or -x, then check.

Claim 1, a "for every". Take any real number xx. Completing the square (lesson 1.2.2) gives x2−2x+2=(x−1)2+x^2 - 2x + 2 = (x - 1)^2 + . A square is never negative, so x2−2x+2≥1>0x^2 - 2x + 2 \ge 1 > 0. Nothing was assumed about xx except that it is real, so the claim holds for every real xx.

Claim 2, a counterexample. One number settles it. Take x=12x = \tfrac{1}{2}. Then x2=x^2 = , which is less than 12\tfrac{1}{2}, so "x2≥xx^2 \ge x for every real xx" is false.

Claim 3, a "there exists". Take x=x = . It is positive, and x2x^2 and x+6x + 6 are both . So such an xx exists.

Claim 4, two quantifiers. Take any real xx, and choose y=y = . Then x+y=0x + y = 0, so for every xx there is such a yy.

Now suppose one yy had x+y=0x + y = 0 for every real xx. Taking x=0x = 0 forces y=y = , and taking x=1x = 1 forces y=y = . One number cannot be both, so no such yy exists.

How to type answers
  • Powers with ^, brackets round a power that is a sum: r^k, r^(k+1).
  • Fractions with / and brackets: (1-r)/(1+r). Multiply with * or side by side: 2k+1.
  • Press Enter in any box to check them all.

Simulate

Check a claim about ε and δ

Here is a claim with its quantifiers the other way round: there is a δ>0\delta > 0 smaller than every ε>0\varepsilon > 0. First, each ε\varepsilon does have a smaller positive number below it, such as ε/2\varepsilon / 2.

⌘/Ctrl + Enter runs the cell

But a single δ\delta chosen first is always beaten: take ε=δ\varepsilon = \delta.

⌘/Ctrl + Enter runs the cell

Each of the three δ\delta prints False: it is not below the ε\varepsilon equal to itself.

Format 3

Find the error

This proof claims there is a δ>0\delta > 0 with δ<ε\delta < \varepsilon for every ε>0\varepsilon > 0. The simulation says the claim is false. Select the line where the proof goes wrong, then say why.

Summary card

  • To prove "for every xx": take an arbitrary xx and argue. To disprove it: one counterexample.
  • To prove "there exists": show one example and check it. To disprove it: show every xx fails.
  • Order matters. In "∀x, ∃ y\forall x,\ \exists\, y" the yy may depend on xx; in "∃ y:∀x\exists\, y : \forall x" one yy must work for all xx.
  • For every ε>0\varepsilon > 0 there is a smaller δ>0\delta > 0, but no δ>0\delta > 0 is smaller than every ε>0\varepsilon > 0.

Free further reading

Optional. This lesson covers what you need; these add more examples and practice. All are free to read.