NapkinCalc

Proofs & Logic — How We Know

Direct proof & counterexamples

continues from lesson 2 — values defined earlier in the course stay live here

ELI5: a direct proof argues straight from definitions: "the sum of two even numbers is even" because 2a + 2b = 2(a + b), which is divisible by 2. The opposite tool is the counterexample — a single case that demolishes a universal claim. "All primes are odd" dies the instant you remember 2.

✓ pass mod(8+14,2)==0mod(8 + 14, 2) == 0 even + even is even (a concrete instance of the proof)
✓ pass mod(2,2)==0mod(2, 2) == 0 2 is an EVEN prime — the counterexample to "all primes are odd"

Real-world hook: finding one counterexample is how bugs are reported and how security flaws are demonstrated — a single failing case is enough to disprove "it always works."