Proofs

Lecture 10, DSCI 220, 2026W1

Announcements

  • EX2 is next week, Thu 10/8 through Sun 10/11. It covers through today.
  • Practice problems are on PrairieLearn.
  • HW2 is due Sun Oct 4.

What is a proof?

You Have Been Writing Them

A proof is a finite chain of statements that

  • starts from assumptions and definitions
  • moves by valid rules
  • ends with the claim


You’ve already done each of those pieces. The rules are the ten on your Formula Sheet, together with notions of equivalence. What is new today is the story that you tell with the arguments.

First Proof

Theorem: For any integers \(a\) and \(b\), if \(ab\) is even, then \(a\) is even or \(b\) is even.


Important definitions:

   An integer \(a\) is even iff ______________________

   For integers \(d \neq 0\) and \(n\), \(d\) divides \(n\) (written \(d \mid n\)) iff __________________

Technical Rewrite


\(\forall a,b\in \mathbb{Z}\)
    \(( (\exists k\in\mathbb{Z}, ab=2k) \to ((\exists j\in\mathbb{Z}, a = 2j) \lor (\exists j\in\mathbb{Z}, b=2j)))\)


You cannot check every pair. So how does a proof of a \(\forall\) statement start?


____________________________________________

Which are valid arguments?

Four attempts at the theorem above.

  • Pf1: Suppose \(a\) and \(b\) are odd. Then there are integers \(k\) and \(j\) so \(a=2k+1\) and \(b=2j+1\). Then \(ab=(2k+1)(2j+1) = 2(2jk + j + k) +1\). Since \(2jk+j+k\) is an integer, \(ab\) is odd.

  • Pf2: Assume \(a\) or \(b\) is even. Suppose \(a\) is even – the argument is the same if it is \(b\). Then \(ab=2kb\) for some \(k\), and thus \(ab\) is even.

  • Pf3: Suppose that \(ab\) is even but \(a\) and \(b\) are both odd. Namely, \(ab=2n\), \(a=2k+1\), and \(b=2j+1\), for some integers \(n\), \(j\), and \(k\). Then \(2n=(2k+1)(2j+1)\) and \(n = 2jk + k + j + 1/2\) which is a contradiction.

  • Pf4: Let \(ab\) be an even number, say \(ab=2n\), and \(a\) be an odd number, say \(a=2k+1\). Then \(2n = (2k+1)b\) and thus \(b=2(n-kb)\) and \(b\) is even.

Proof Skeleton Cards

\(\to\) Direct Proof of \(P\to Q\)

  1. Assume \(P\).
  2. Reason – Unpack definitions / apply given rules to derive needed facts from \(P\).
  3. … Therefore \(Q\).

\(\leftrightsquigarrow\) Contrapositive Proof of \(P\to Q\)

  1. Assume \(\neg Q\)
  2. Use rules/definitions that match \(\neg Q\) to drive toward \(\neg P\).
  3. … Therefore \(\neg Q\to\neg P\), and thus \(P\to Q\).

↯ Contradiction Proof of \(P\to Q\)

  1. Assume \(P\) and \(\neg Q\).
  2. Reason – Unpack definitions / apply given rules to derive needed facts from \(P\land \neg Q\), watch for contradiction (\(a\land\neg a\)).
  3. … Therefore False, and our assumption of \(\neg Q\) must be false, so \(P\to Q\).

⊞ Cases Proof of \(P\to Q\)

  1. Partition \(P\) into cases \(P_1\), \(P_2\), etc. covering all possibilities.
  2. For each \(P_k\), show that \(P_k\to Q\).
  3. … Therefore, in each case \(Q\), and \(P\to Q\).

\(\to\) Pause and Try: Direct

Let \(T_n = \frac{n(n+1)}{2}\) be the \(n\)th triangular number: \(T_0 = 0\), \(T_1 = 1\), \(T_2 = 3\), etc.

A positive integer \(g\) is a glow number if there exists a positive integer \(k\) so that \(g = T_{k-1} + T_k\).

A positive integer \(n\) is a perfect square if there is a positive integer \(m\) with \(n = m^2\).

Theorem: every glow number is a perfect square.

Proof: Consider an arbitrary glow number \(g\)…

 

 

 

 

… therefore \(g\) is a perfect square.

Aside: Is the converse true?

Converse: every perfect square is a glow number.


Come to class Monday with an answer!

\(\leftrightsquigarrow\) Pause and Try: Contrapositive

Definitions:

  • A number \(n\) is even if there is an integer \(k\) such that \(n=2k\).
  • A number \(n\) is odd if there is an integer \(k\) such that \(n=2k+1\).

Theorem: If \(3n+2\) is odd, then \(n\) is odd.


↯ Pause and Try: Contradiction

Claim: \(\sqrt 2\) is irrational.


Proof: Suppose, for contradiction, that \(\sqrt 2\) is rational. Then there are integers \(p\) and \(q\), sharing no common factor, with \(\sqrt 2 = p/q\).


⊞ Proof by Cases

Claim: \(n^3 - n\) is divisible by ___ , for every integer \(n\).


First, factor it: \(n^3 - n =\) ____________________


Overview: ____________________________________

⊞ Divisible by 3

Consider an arbitrary \(n\). One of these must hold:

  • Case A: \(n=3k\)    then __________ is divisible by 3


  • Case B: \(n=3k+1\)   then __________ is divisible by 3


  • Case C: \(n=3k+2\)   then __________ is divisible by 3


In all three cases, \(n^3-n\) is divisible by 3.

⊞ Divisible by 2

Consider an arbitrary \(n\). One of these must hold:

  • Case A: \(n=2k\)    then __________ is even


  • Case B: \(n=2k+1\)   then __________ is even



So 2 and 3 both divide \(n^3-n\), and therefore _______ does.

Words and Ideas

Proof

Arbitrary element

Universal instantiation, universal generalization

Direct proof

Proof by contrapositive

Proof by contradiction

Proof by cases, exhaustive cases