Logic & ProofsTopic #4 of 40

Proof Techniques

Direct proof, proof by contraposition, proof by contradiction, and proof by cases.

Direct Proof

To prove pqp \rightarrow q: Assume pp is true, then show qq must be true.

Structure

  1. Assume the hypothesis pp
  2. Use definitions, known theorems, and logical reasoning
  3. Conclude qq

Example

Theorem: If nn is odd, then n2n^2 is odd.

Proof:

  • Assume nn is odd
  • Then n=2k+1n = 2k + 1 for some integer kk
  • n2=(2k+1)2=4k2+4k+1=2(2k2+2k)+1n^2 = (2k+1)^2 = 4k^2 + 4k + 1 = 2(2k^2 + 2k) + 1
  • Let m=2k2+2km = 2k^2 + 2k, which is an integer
  • Then n2=2m+1n^2 = 2m + 1, which is odd \square

Proof by Contraposition

To prove pqp \rightarrow q: Prove the contrapositive ¬q¬p\neg q \rightarrow \neg p.

pq¬q¬pp \rightarrow q \equiv \neg q \rightarrow \neg p

When to Use

Use when assuming ¬q\neg q gives useful information.

Example

Theorem: If n2n^2 is even, then nn is even.

Proof (by contraposition):

  • We prove: If nn is odd, then n2n^2 is odd
  • Assume nn is odd, so n=2k+1n = 2k + 1
  • n2=(2k+1)2=4k2+4k+1=2(2k2+2k)+1n^2 = (2k+1)^2 = 4k^2 + 4k + 1 = 2(2k^2 + 2k) + 1
  • Thus n2n^2 is odd \square

Proof by Contradiction

To prove pp: Assume ¬p\neg p and derive a contradiction.

Structure

  1. Assume ¬p\neg p (the negation of what we want to prove)
  2. Derive a statement that is always false
  3. Conclude pp must be true

Example

Theorem: 2\sqrt{2} is irrational.

Proof:

  • Assume 2\sqrt{2} is rational
  • Then 2=ab\sqrt{2} = \frac{a}{b} where a,bZa, b \in \mathbb{Z}, b0b \neq 0, gcd(a,b)=1\gcd(a,b) = 1
  • 2=a2b22 = \frac{a^2}{b^2}, so a2=2b2a^2 = 2b^2
  • Thus a2a^2 is even, so aa is even (by contraposition of previous theorem)
  • Let a=2ca = 2c, then 4c2=2b24c^2 = 2b^2, so b2=2c2b^2 = 2c^2
  • Thus b2b^2 is even, so bb is even
  • But if both aa and bb are even, gcd(a,b)2\gcd(a,b) \geq 2
  • This contradicts gcd(a,b)=1\gcd(a,b) = 1
  • Therefore 2\sqrt{2} is irrational \square

Proof by Cases

When proving pqp \rightarrow q and pp can be split into cases: (p1p2pn)q(p_1 \lor p_2 \lor \cdots \lor p_n) \rightarrow q

Prove each case: p1qp_1 \rightarrow q, p2qp_2 \rightarrow q, etc.

Example

Theorem: xy=xy|xy| = |x| \cdot |y|

Proof: Consider all combinations of signs of xx and yy:

  • Case 1: x0x \geq 0 and y0y \geq 0: xy=xy=xy|xy| = xy = |x||y|
  • Case 2: x0x \geq 0 and y<0y < 0: xy=xy=x(y)=xy|xy| = -xy = x(-y) = |x||y|
  • Case 3: x<0x < 0 and y0y \geq 0: xy=xy=(x)y=xy|xy| = -xy = (-x)y = |x||y|
  • Case 4: x<0x < 0 and y<0y < 0: xy=xy=(x)(y)=xy|xy| = xy = (-x)(-y) = |x||y|\square

Existence Proofs

Constructive Proof

Explicitly find an example that satisfies the condition.

Example: Prove there exists an irrational number rr such that r2r^{\sqrt{2}} is rational.

Consider r=22r = \sqrt{2}^{\sqrt{2}}. Either it's rational or irrational.

  • If rational, we're done
  • If irrational, let r=22r = \sqrt{2}^{\sqrt{2}}, then r2=(22)2=22=2r^{\sqrt{2}} = (\sqrt{2}^{\sqrt{2}})^{\sqrt{2}} = \sqrt{2}^2 = 2

Nonconstructive Proof

Prove existence without finding a specific example.

Uniqueness Proofs

Existence and Uniqueness

Prove !xP(x)\exists! x \, P(x):

  1. Existence: Show xP(x)\exists x \, P(x)
  2. Uniqueness: Show if P(a)P(a) and P(b)P(b), then a=ba = b

Example

Theorem: There is a unique real number xx such that x+3=5x + 3 = 5.

Proof:

  • Existence: x=2x = 2 satisfies 2+3=52 + 3 = 5
  • Uniqueness: Suppose a+3=5a + 3 = 5 and b+3=5b + 3 = 5
    • Then a+3=b+3a + 3 = b + 3
    • Thus a=ba = b \square

Common Mistakes to Avoid

  1. Circular reasoning: Using what you're trying to prove
  2. Assuming the converse: Proving qpq \rightarrow p instead of pqp \rightarrow q
  3. Proof by example: One example doesn't prove "for all"
  4. Incomplete case analysis: Missing cases in proof by cases