๐Ÿ“– Elements of logic and proofs#

โฑ | words

References and additional materials
_images/shsc2016.png

[Sydsรฆter, Hammond, Strรธm, and Carvajal, 2016]

Chapters 1.3, 1.4

  • 3blue1brown Grant Sandersonโ€™s video tale of two problem solvers YouTube

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\)

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

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โ€

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\)