πŸ“– Elements of logic and proofs#

⏱ | words

References and additional materials
_images/simon1994.png

[Simon and Blume, 1994]

Appendix A1.3

_images/sundaram1996.png

[Sundaram, 1996]

Appendix A.2, A.3, A.4


The Wason selection paradox#

  • Mathematics relies on rules of logic

  • Yet, for human brain applying mathematical logic may be difficult, and dependent on the domain

_images/wason.png
  • Peter Cathcart Wason (1924 – 2003)

  • cognitive psychologist at University College, London

  • pioneered the psychology of reasoning

The Wason selection task

Given four cards showing 3, 8, blue and red faces, which cards have to be flipped over to ensure the rule if card shows even number on one side, the other side is blue is satisfied?

Let’s play Wason Selection Task at Mentimeter

Analysis of Wason selection task
  • Let \(P\) denote card shows even number on one side

  • Let \(Q\) denote the side is blue

Number

Color

\(P\)

\(Q\)

Rule is satisfied

Even

Blue

True

True

Yes

Even

Red

True

False

No

Odd

Blue

False

True

Yes

Odd

Red

False

False

Yes

  • the rule we are checking is \(P \implies Q\)

  • it is only brocken in case \(P\) is True and \(Q\) is False

  • therefore the two cards that have to be flipped are

    • Even, \(P\) is True

    • Red, \(Q\) is False

Definition

\(\implies\) denotes logical implication:
If whenever logical statment \(P\) is true, \(Q\) is also true, we write \(P \implies Q\).

Example

If \(x\) is an even number, then \(x^2\) is also an even number.

OR

\(x\) is an even \(\implies\) \(x^2\) is also even.

Necessary and Sufficient conditions#

Definition

\(P\) is a sufficient condition for \(Q\) means \(P \implies Q\)
\(P\) is a necessary condition for \(Q\) means \(Q \implies P\), or \(P \impliedby Q\)

Definition

\(P\) is said to be if and only if \(Q\) when \(P \implies Q\) and \(Q \implies P\), also written as \(P \iff Q\)

Example

\[\begin{split} x > 3 \implies x^2 >9 \text{ yet converse is not true} \\ x^2 > 9 \iff \{x > 3 \text{ or } x<-3\} \end{split}\]

Converse and contrapositive#

Definition

A logical statement \(P \implies Q\) is converse to \(Q \implies P\)

Note

There is no logical relationship between a statement and its converse!

  • bases for common logical mistakes

Example

β€œAll cats are animals who have tails” does not imply β€œAll animals with tails are cats”

Definition

A logical statement opposite to \(P\) is denoted \(\neg P\)

Definition

A logical statement \(\neg P \implies \neg Q\) is contrapositive to \(Q \implies P\)

Fact: Contrapositive principle

The statement \(P \implies Q\) is equivalent to the statement \((\text{not } Q) \implies (\text{not }P)\):

\[ (P \implies Q) \iff (\neg Q \implies \neg P) \]
  • this is very handy in proofs: instead of proving a statement it may be easier to prove its contrapositive

Example

\[ x > 3 \implies x^2 >9 \]

We can check that the contrapositive is also true:

\[\begin{split} \begin{array}{rcl} \neg \{x^2 >9\} & \implies & \neg\{x > 3\} \\ x^2 \leq 9 & \implies & x \leq 3 \qquad \text{! INCORRECT !} \end{array} \end{split}\]

But the contrapositive is equivalent to the original statement.

\[ \{x > 3 \implies x^2 >9\} \iff \{x^2 \leq 9 \implies \neg\{x > 3\} \} \]

Types of mathematical proofs#

Direct proof#

\(A\) is true \(\implies\) \(B\) is True \(\implies\) \(S\) is True

Example

Prove that \(p^2-1\) is divisible by 24 for all prime \(p>3\).

Note

The symbol \(\blacksquare\) marks the end of the proof, and is equivalent to the QED symbol (”quod erat demonstrandum”, or β€œthat which was to be demonstrated”).

Proof by contradiction#

\[\begin{split} \left. \begin{array}{r} \text{Assume } S \text{ is not True }\\ A \text{ is True} \end{array} \right \} \implies \text{Contradiction} \implies \text{Assumption was wrong} \implies S \text{ is True } \end{split}\]

Example

Prove that the set of prime numbers is infinite.

Proof by mathematical induction#

\[\begin{split} \left. \begin{array}{r} S_1 \text{ is True }\\ S_n \text{ is True} \implies S_{n+1} \text{ is True} \end{array} \right \} \implies S_k \text{ is True for all } k=1,2,3,\dots \end{split}\]

Example

Prove that \(n^3+2n\) is divisible by 3 for all \(n=1,2,\dots\)

Note

Be careful to make sure that the induction step holds for all \(n\) starting with the base case \(n=1\).

Example

Statement: all horses are the same color.

  1. Base of the induction: for \(n=1\) there is only one horse, and only one color, so the statement holds for \(n=1\).

  2. Induction step. Assume that any group of \(n\) horses are the same color. We can show that the same is true for any group of \(n+1\) horses.

Indeed, in the group of \(n+1\) hourses, take all but the one hourse: by induction hypothesis this subgroup of \(n\) horses is the same color. Now take all but another horse: by induction hypothesis this second subgroup of \(n\) horses is the same color. Thus, no different color can be observed, and therefore the groupd of \(n+1\) horse is the same color.

  1. By the principle of mathematical induction, we have thus shown that all horses are the same color.


Hand written notes from the lecture

_images/w1_1.png _images/w1_2.png