Courses / Computer Science I
Discrete Mathematics

Proof Techniques

Computer Science I 231 words Free to read

Establishing Truth Beyond Doubt

Mathematics advances by proof: an airtight chain of logical steps from accepted premises to a conclusion. A correct proof settles a claim for all cases at once.

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.

Proof by contrapositive proves pqp \to q by instead proving the equivalent ¬q¬p\neg q \to \neg p. 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."

Contradiction, Disproof, and Pitfalls

Proof by contradiction assumes the claim is false, then derives an impossibility. The classic example proves 2\sqrt{2} is irrational by assuming it equals a fraction in lowest terms and deriving that both parts are even.

Disproof uses a counterexample to show a universal claim is false. One failure demolishes it.

TechniqueWhat You AssumeWhat You Show
Directppqq
Contrapositive¬q\neg q¬p\neg p
Contradiction¬(claim)\neg(\text{claim})absurdity
Common pitfall: Confusing contradiction (assumes whole claim false, seeks any absurdity) with contrapositive (proves ¬q¬p\neg q \to \neg p). A supporting example never proves a universal claim.
Two fresh collisions, not the two this corpus already owns

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

Discrete Mathematics