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

ProofLesson PG1.1 in the Proof Gym, stage PG1: Logic and language. About 25 minutes.

Statements and truth values

Simulate

Check the claim with numbers

A statement is a sentence that is either true or false, never both. "The fund beat the index in 2024 and in 2025" is one. This lesson asks what it takes for such a statement to be false.

Write PP for "the fund beat the index in 2024" and QQ for "the fund beat the index in 2025". Each is true or false, so there are four cases. The cell lists them, with two guesses at what "not (PP and QQ)" means.

⌘/Ctrl + Enter runs the cell

The "or" guess matches the left column in all four rows; the "and" guess fails in rows 2 and 3. In row 2 the fund beat the index in 2024 but not in 2025. The statement is false, yet "it lost in both years" is false too.

The next cell counts the rows where two statements agree, for three candidate laws.

⌘/Ctrl + Enter runs the cell

The first two laws agree in all 4 rows. The third agrees in only 2, so it is not a law.

Conjecture

For any two statements PP and QQ, De Morgan's laws hold:

not (P and Q)≡(not P) or (not Q)not (P or Q)≡(not P) and (not Q)\begin{gathered} \text{not } (P \text{ and } Q) \\ \equiv (\text{not } P) \text{ or } (\text{not } Q) \\[8pt] \text{not } (P \text{ or } Q) \\ \equiv (\text{not } P) \text{ and } (\text{not } Q) \end{gathered}

The symbol ≡\equiv reads "is equivalent to": the two sides are true in exactly the same cases.

Two statements have only four cases between them, and the table checked all four. So here the table is a complete check, a proof by exhaustion. The proof below gives the reason in words, the kind of argument that still works later, when the cases are too many to list.

Statements and how they combine

Lesson 0.2.1 met statements that are true or false about a set. This section gives the rules for building new statements from old ones.

A question ("Is the index up?") or a command ("Buy the index") is not a statement. Neither is "x>3x > 3" on its own, since it is true for some xx and false for others. Lesson PG1.3 turns such sentences into statements.

Three words build new statements: "not", written ¬\neg; "and", written ∧\wedge; and "or", written ∨\vee. Each is defined by the truth values it gives:

PPQQ¬P\neg PP∧QP \wedge QP∨QP \vee Q
truetruefalsetruetrue
truefalsefalsefalsetrue
falsetruetruefalsetrue
falsefalsetruefalsefalse

"And" is true only when both parts are true. "Or" is true when at least one part is true, both included. Everyday English sometimes means "one or the other, not both", but in mathematics "or" always allows both.

Rule: Equivalent statements

A≡BA \equiv B

Two statements AA and BB are equivalent when they have the same truth value in every case. To prove it, show that AA is true exactly when BB is.

Try it

Python's not, and and or follow the same table. Each row of output is PP, QQ, then P∧QP \wedge Q and P∨QP \vee Q.

Notice True or True is True: Python's "or" includes both, as mathematics does.

⌘/Ctrl + Enter runs the cell

Format 1

Reorder the steps

Here is a proof of the first law in words, with its lines shuffled. Put them in order with the arrows, or drag a line by its handle.

  1. First suppose ¬(P∧Q)\neg(P \wedge Q) is true. Then P∧QP \wedge Q is false.
  2. So ¬P\neg P is true or ¬Q\neg Q is true, which makes ¬P∨¬Q\neg P \vee \neg Q true.
  3. An 'and' is true only when both parts are true, so at least one of PP and QQ is false.
  4. Now suppose ¬P∨¬Q\neg P \vee \neg Q is true. Then PP is false or QQ is false.
  5. Either way P∧QP \wedge Q has a false part, so it is false, and ¬(P∧Q)\neg(P \wedge Q) is true.
  6. Take any two statements PP and QQ. We show that ¬(P∧Q)\neg(P \wedge Q) and ¬P∨¬Q\neg P \vee \neg Q are true in exactly the same cases.
  7. Each statement is true exactly when the other is, so they are equivalent.

The second law has the same shape of proof, with "and" and "or" swapped. The table in the simulation already settles it, since it checked all four cases.

Format 3

Find the error

This proof claims that ¬(P∧Q)\neg(P \wedge Q) is equivalent to ¬P∧¬Q\neg P \wedge \neg Q. The simulation found that claim false in two rows, so one line must be wrong. Select it, then say what is wrong with it.

So the statement about 2024 and 2025 is false when the fund missed in 2024, in 2025, or in both. One bad year is enough.

Summary card

  • A statement is true or false, never both. A question, a command or "x>3x > 3" with xx unknown is not a statement.
  • ¬P\neg P flips the truth value. P∧QP \wedge Q needs both parts true. P∨QP \vee Q needs at least one, and allows both.
  • Two statements are equivalent when they agree in every case. For two parts there are four cases, so a full truth table is a proof.
  • De Morgan's laws: ¬(P∧Q)≡¬P∨¬Q\neg(P \wedge Q) \equiv \neg P \vee \neg Q and ¬(P∨Q)≡¬P∧¬Q\neg(P \vee Q) \equiv \neg P \wedge \neg Q.
  • A common mistake: ¬(P∧Q)\neg(P \wedge Q) is not ¬P∧¬Q\neg P \wedge \neg Q. When only one part fails, the first is true and the second is false.

Free further reading

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