Courses / Computer Science I
Discrete Mathematics

Proof Techniques

Computer Science I 290 words Free to read

Establishing Truth Beyond Doubt

Mathematics advances by proof — an airtight chain of logical steps from accepted premises (axioms, definitions, prior theorems) to a conclusion. Unlike experiment, a correct proof settles a claim for all cases at once, forever. Several standard techniques cover most theorems.

Direct proof assumes the hypothesis and derives the conclusion step by step. To prove "if nn is even then n2n^2 is even," write n=2kn = 2k, so n2=4k2=2(2k2)n^2 = 4k^2 = 2(2k^2), which is even. Straight-line reasoning from assumption to conclusion.

Proof by contrapositive proves pqp \to q by instead proving the equivalent ¬q¬p\neg q \to \neg p. Since a statement and its contrapositive are logically equivalent (Lesson 2), this is completely valid, and sometimes the contrapositive is far easier. To prove "if n2n^2 is even then nn is even," it is cleaner to prove "if nn is odd then n2n^2 is odd."

Proof by contradiction assumes the claim is false, then derives a logical impossibility, so the assumption must have been wrong. The classic example proves 2\sqrt{2} is irrational: assume it equals a fraction in lowest terms, and derive that both numerator and denominator are even — contradicting "lowest terms."

Disproof is different and often easier: to show a universal claim is false, exhibit a single counterexample. One example where the claim fails demolishes it; you never need to prove the negation for all cases.

Common pitfall: confusing proof by contradiction with proof by contrapositive, and misusing counterexamples. Contradiction assumes the whole statement is false and seeks any absurdity; contrapositive proves the equivalent ¬q¬p\neg q \to \neg p directly. And a counterexample disproves a universal but a single supporting example never proves one — "it works for n=1,2,3n=1,2,3" is not a proof.

Practise this lesson

The explanation above is free to read. The graded practice for this lesson lives in the Tryals app.

10practice questions
2interactive scenes
Start Computer Science I free

Discrete Mathematics