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 4 of 5

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

Negating a statement

Simulate

Check the claim with numbers

The negation of a statement SS is a statement that is true exactly when SS is false. Take SS: "the fund beats the index every year". Three sentences sound like its opposite, but at most one can be its negation.

The cell uses ten years of made-up annual returns, in percent, and tests SS and the three candidates. The fund beats the index in a year when its return is higher.

⌘/Ctrl + Enter runs the cell

The fund wins 8 of the 10 years, so SS is false. Candidate A is true, but B and C are false, like SS. A negation must have the opposite truth value, so neither B nor C is one.

One record cannot settle A. The next cell tries 10,000 random three-year records, each year a win with probability 0.7.

⌘/Ctrl + Enter runs the cell

Candidate A has the opposite truth value to SS in all 10,000 records. Candidate B manages only 3,656.

Conjecture

Let AA be a set and P(x)P(x) a sentence about each element xx of AA. Then

¬(∀x∈A, P(x))≡ ∃ x∈A:¬P(x)\begin{gathered} \neg\big(\forall x \in A,\ P(x)\big) \\ \equiv \ \exists\, x \in A : \neg P(x) \end{gathered}

So the negation of "the fund beats the index every year" is "in some year, the fund does not beat the index".

Ten thousand records agree, but the claim is about every set and every sentence, which no simulation can cover. The proof below does.

The rules for negating

In words: "not every element passes" means "some element fails". Here ¬\neg is "not", ∧\wedge "and", ∨\vee "or" (lesson PG1.1), and ⇒\Rightarrow "implies" (lesson PG1.2). Each rule below pushes a "not" one step inwards, until it sits on the simplest pieces.

Rule: Negation rules

¬(∀x, P(x))≡∃ x:¬P(x)¬(∃ x:P(x))≡∀x, ¬P(x)¬(P∧Q)≡¬P∨¬Q¬(P∨Q)≡¬P∧¬Q¬(P⇒Q)≡P∧¬Q\begin{gathered} \neg(\forall x,\ P(x)) \equiv \exists\, x : \neg P(x) \\ \neg(\exists\, x : P(x)) \equiv \forall x,\ \neg P(x) \\ \neg(P \wedge Q) \equiv \neg P \vee \neg Q \\ \neg(P \vee Q) \equiv \neg P \wedge \neg Q \\ \neg(P \Rightarrow Q) \equiv P \wedge \neg Q \end{gathered}

A "for every" becomes a "there exists" and the other way round. "And" and "or" swap, as in De Morgan's laws. The negation of an implication is not an implication: it says the hypothesis holds and the conclusion fails.

Lesson PG1.1 proved the two De Morgan laws. The first rule is proved below, and the second in Write it.

For the last rule, lesson PG1.2 showed that P⇒QP \Rightarrow Q is false exactly when PP is true and QQ is false. So ¬(P⇒Q)\neg(P \Rightarrow Q) is true exactly when P∧¬QP \wedge \neg Q is.

Negating a comparison follows the same idea. The negation of f>if > i is f≤if \le i, not f<if < i: a tie is not a win, so "does not beat" includes a tie.

Format 1

Reorder the steps

Here is a proof of the first rule, with its lines shuffled. Put them in order. The name x0x_0 (read 'x nought') stands for one particular element of AA.

  1. Suppose ¬(∀x∈A, P(x))\neg(\forall x \in A,\ P(x)) is true, so it is not the case that every element of AA satisfies PP.
  2. Each statement is true exactly when the other is, so they are equivalent.
  3. Now suppose some x0∈Ax_0 \in A has ¬P(x0)\neg P(x_0) true, so P(x0)P(x_0) is false.
  4. Then x0x_0 is a counterexample, so ∀x∈A, P(x)\forall x \in A,\ P(x) is false, and its negation is true.
  5. That x0x_0 has ¬P(x0)\neg P(x_0) true, so ∃ x∈A:¬P(x)\exists\, x \in A : \neg P(x) is true.
  6. Let AA be a set and P(x)P(x) a sentence about each x∈Ax \in A. We show that the two statements are true in exactly the same cases.
  7. Then at least one element fails: there is some x0∈Ax_0 \in A with P(x0)P(x_0) false.

Simulate

Check a negation with an implication

A harder statement mixes a quantifier and an implication: "every year in which the market rose, the fund beat the index". The market rose in a year when the index return was positive. Here are four years in which the statement holds, and two attempts at its negation.

⌘/Ctrl + Enter runs the cell

The statement is true and the first attempt is false, as a negation must be. The second attempt is true as well, so it is not the negation. In the falling year, the second in the list, its "if … then" holds whatever the fund did.

Format 3

Find the error

This negates 'every year in which the market rose, the fund beat the index' step by step. One step breaks a rule. Select it, then say what is wrong.

Simulate

A claim of your own to prove

The second negation rule turns "no element passes" into "every element fails". The cell tests it on 10,000 random lists of four whole numbers from −3-3 to 33, with P(v)P(v) the sentence "v>2v > 2".

⌘/Ctrl + Enter runs the cell

The two sides agree in all 10,000 lists.

Conjecture

For any set AA and sentence P(x)P(x),

¬(∃ x∈A:P(x))≡ ∀x∈A, ¬P(x)\begin{gathered} \neg\big(\exists\, x \in A : P(x)\big) \\ \equiv \ \forall x \in A,\ \neg P(x) \end{gathered}

Agreement in 10,000 lists is evidence. Prove it for every set and every sentence, then use the rules on a sentence about the fund.

Format 4

Write it

First prove the rule above: show that each side is true exactly when the other is. Then use the rules to negate 'in some year, the fund beat the index in every month', and say what the negation means.

Saved in this browser as you type.

Write your own first: a proof you have tried to write teaches far more than one you only read.

Summary card

  • The negation of SS is true exactly when SS is false. "It never happens" and "the opposite always happens" are usually not negations.
  • ¬∀≡∃¬\neg \forall \equiv \exists \neg and ¬∃≡∀¬\neg \exists \equiv \forall \neg: a "not" swaps each quantifier it passes.
  • ¬(P⇒Q)≡P∧¬Q\neg(P \Rightarrow Q) \equiv P \wedge \neg Q. The negation of an implication is not an implication.
  • The negation of "the fund beats the index every year" is "in some year, the fund does not beat the index".
  • The negation of f>if > i is f≤if \le i.

Free further reading

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