Survey of Mathematics
Unit 0

Thinking in proofs

How to read a theorem, prove it, and check your own proof.

7 chapters written · 44 definitions · 51 theorems · start here

The story

Every later unit is written in one language: statements with "for every" and "there exists", and proofs that connect them. This unit teaches that language before it is needed, so that a proof in Unit 1 reads as a sequence of reasons instead of a wall of symbols.

It starts with reading (0.1: what a theorem says, and what its negation says), then doing (0.2: the five ways to prove something), then the objects every proof talks about (0.3 to 0.6: sets, functions, equivalence relations, the integers mod nn, complex numbers and polynomials). It ends with writing (0.7): turning scratch work into a proof a grader accepts.

Nothing here depends on calculus. If a later proof feels like a jump, the missing skill is almost always in this unit.

Chapters

  1. 0.1How to read a theoremEvery theorem is built from a few logical pieces (and, or, not, if-then, for every, there exists). Read them exactly, negate them correctly, and half of every proof is already done.
  2. 0.2Proof techniquesAlmost every proof uses one of six shapes (direct, contrapositive, contradiction, cases, induction, well-ordering). Knowing the shape tells you what to assume, what to show, and where to start.
  3. 0.3Sets, functions, and counting infinitySets and functions are the language everything else is written in. A perfect matching (a bijection) is how we compare sizes, and it shows that the integers and the rationals are as small as the counting numbers while the real numbers are strictly larger.
  4. 0.4Equivalence relations and partitionsWhen we say two things are "the same for our purposes", we are using an equivalence relation. It always sorts the set into non-overlapping groups (a partition), and each group can then be treated as a single new object.
  5. 0.5Integers mod n, gcd and BézoutDividing with remainder gives a way to find the greatest common divisor (Euclid's algorithm) and to write it as a combination of the two numbers (Bézout). That in turn decides when you can divide in clock arithmetic, proves unique factorization into primes, and powers RSA encryption and check digits.
  6. 0.6Complex numbers and polynomials, done properlyA complex number is a pair of reals with a chosen product, which turns i squared equals minus one into a theorem and multiplication into "turn and stretch". Polynomials over R and C then divide with remainder, have at most n roots, and over C always have one.
  7. 0.7Writing a proof a grader acceptsA proof is an argument written for a reader. It declares its objects, gives every step with its reason, and ends by stating what was shown. You can check your own proof against a short list before anyone else does.

The theorem chain

Every theorem in the unit, in the order it is proved. Each one is used by the ones after it. The label says whether it is on the 375/376 exams (T), an Apostol extra (A), or beyond both (B).

0.1 How to read a theorem

  1. Theorem · B An implication equals its contrapositive P⇒QP \Rightarrow Q and ¬Q⇒¬P\neg Q \Rightarrow \neg P are true in exactly the same situations.
  2. Fact · B Rules for negating Not(and) is or-of-nots; not(or) is and-of-nots; not(if P then Q) is P and not Q; not(for all) is exists-not; not(exists) is for-all-not.

0.2 Proof techniques

  1. Theorem · B The square root of 2 is irrational There are no integers p,qp, q with (p/q)2=2(p/q)^2 = 2.

0.3 Sets, functions, and counting infinity

  1. Theorem · B Double inclusion A=BA = B exactly when A⊆BA \subseteq B and B⊆AB \subseteq A.
  2. Fact · B Rules for not in Not in an intersection means missing from at least one; not in a union means missing from both; not in a complement means in the original set.
  3. Theorem · B De Morgan's laws for sets (A∪B)c=Ac∩Bc(A \cup B)^c = A^c \cap B^c and (A∩B)c=Ac∪Bc(A \cap B)^c = A^c \cup B^c.
  4. Proposition · B Composition of injections and surjections If ff and gg are injective, so is g∘fg \circ f; if both are surjective, so is g∘fg \circ f; hence a composition of bijections is a bijection.
  5. Theorem · B Bijections and inverses f:A→Bf: A \to B is bijective exactly when there is a function g:B→Ag: B \to A that undoes it in both orders; this gg is the inverse f−1f^{-1}.
  6. Theorem · B Pigeonhole principle
  7. Theorem · B Three ways to show a set is countable AA is countable iff there is an injection A→NA \to \mathbb N; and a non-empty AA is countable iff there is a surjection N→A\mathbb N \to A (a list that may have repeats).
  8. Corollary · B Closure properties of countable sets Subsets of countable sets are countable; the image of a countable set under any function is countable; a product of two countable sets is countable.
  9. Theorem · B The integers are countable Z\mathbb Z can be listed as 0,1,−1,2,−2,3,−3,…0, 1, -1, 2, -2, 3, -3, \dots with every integer exactly once.
  10. Theorem · B The counting-number pairs are countable N×N\mathbb N \times \mathbb N can be listed diagonal by diagonal, and the position of (m,n)(m, n) is P(m,n)=(m+n−2)(m+n−1)2+mP(m, n) = \tfrac{(m + n - 2)(m + n - 1)}{2} + m.
  11. Theorem · B The rationals are countable Q\mathbb Q can be listed, even though between any two rationals there are infinitely many more.
  12. Theorem · B The real numbers are uncountable The interval (0,1)(0, 1), and so the set R\mathbb R of all real numbers, cannot be listed.

0.4 Equivalence relations and partitions

  1. Proposition · B Same value is an equivalence relation For any function f:A→Bf: A \to B, the relation a∼ba \sim b iff f(a)=f(b)f(a) = f(b) is an equivalence relation on AA.
  2. Lemma · B Equal classes For an equivalence relation, a∼ba \sim b exactly when [a]=[b][a] = [b], exactly when [a][a] and [b][b] share at least one element.
  3. Theorem · B Equivalence classes partition the set The equivalence classes of an equivalence relation on AA form a partition of AA.
  4. Theorem · B Partitions give equivalence relations Given a partition of AA, 'lying in the same block' is an equivalence relation whose classes are exactly the blocks.
  5. Theorem · B A function is a bijection from its classes onto its range For f:A→Bf: A \to B with a∼ba \sim b iff f(a)=f(b)f(a) = f(b), the rule [a]↦f(a)[a] \mapsto f(a) is a well-defined bijection from A/∼A / {\sim} onto the range f(A)f(A).

0.5 Integers mod n, gcd and Bézout

  1. Theorem · B Division algorithm For any integer aa and positive integer bb there are unique integers qq and rr with a=bq+ra = bq + r and 0≤r<b0 \le r < b.
  2. Proposition · B Divisibility facts Divisors pass through sums and multiples: if aa divides bb and cc, it divides bx+cybx + cy for all integers x,yx, y; divisibility chains; and a divisor of a non-zero number is at most as large in size.
  3. Lemma · B Euclid's reduction step If a=bq+ra = bq + r then aa and bb have exactly the same common divisors as bb and rr, so gcd⁡(a,b)=gcd⁡(b,r)\gcd(a, b) = \gcd(b, r).
  4. Theorem · B Euclid's algorithm Repeat 'divide the larger by the smaller and keep the remainder' until the remainder is zero; the last non-zero remainder is the gcd.
  5. Theorem · B Bézout's identity The gcd of aa and bb is always an integer combination of them: gcd⁡(a,b)=ax+by\gcd(a, b) = ax + by for some integers x,yx, y. In fact it is the smallest positive number of that form.
  6. Corollary · B Linear combinations of two integers ax+by=cax + by = c has an integer solution (x,y)(x, y) exactly when gcd⁡(a,b)\gcd(a, b) divides cc. In particular aa and bb are coprime iff ax+by=1ax + by = 1 is solvable.
  7. Lemma · B Euclid's lemma If a prime pp divides a product abab, then pp divides aa or pp divides bb.
  8. Theorem · B Fundamental theorem of arithmetic Every integer greater than 1 is a product of primes, in exactly one way apart from the order of the factors.
  9. Theorem · B There are exactly n residue classes Every integer is congruent mod nn to exactly one of 0,1,…,n−10, 1, \dots, n - 1, namely its remainder; so there are exactly nn classes, and a≡ba \equiv b iff aa and bb have the same remainder.
  10. Theorem · B Arithmetic respects congruence If a≡a′a \equiv a' and b≡b′b \equiv b' (mod nn), then a+b≡a′+b′a + b \equiv a' + b' and ab≡a′b′ab \equiv a'b'; so addition and multiplication of classes are well defined.
  11. Theorem · B Inverses mod n exist exactly when coprime aa has an inverse mod nn if and only if gcd⁡(a,n)=1\gcd(a, n) = 1; the inverse is unique mod nn and is found by the extended Euclidean algorithm.
  12. Corollary · B Division in Z_p If pp is prime, every integer not divisible by pp has an inverse mod pp; and if gcd⁡(c,n)=1\gcd(c, n) = 1, you may cancel cc: ca≡cbca \equiv cb implies a≡ba \equiv b (mod nn).
  13. Theorem · B Fermat's little theorem If pp is prime and p∤ap \nmid a, then ap−1≡1(modp)a^{p-1} \equiv 1 \pmod p; equivalently ap≡a(modp)a^p \equiv a \pmod p for every integer aa.
  14. Theorem · B RSA decryption works If n=pqn = pq for distinct primes and ed≡1(mod(p−1)(q−1))ed \equiv 1 \pmod{(p-1)(q-1)}, then (me)d≡m(modn)(m^e)^d \equiv m \pmod n for every integer mm.

0.6 Complex numbers and polynomials, done properly

  1. Theorem · B The square of i With the product above, i⋅i=−1i \cdot i = -1.
  2. Theorem · B Laws of complex arithmetic Addition and multiplication of complex numbers are commutative and associative, multiplication distributes over addition, 1=(1,0)1 = (1, 0) is the identity, and every z≠0z \ne 0 has an inverse.
  3. Proposition · B Rules for conjugates zzˉ=∣z∣2z\bar z = |z|^2, z+w‾=zˉ+wˉ\overline{z + w} = \bar z + \bar w, zw‾=zˉ wˉ\overline{zw} = \bar z\,\bar w, and z−1=zˉ/∣z∣2z^{-1} = \bar z / |z|^2.
  4. Theorem · B The modulus is multiplicative ∣zw∣=∣z∣ ∣w∣|zw| = |z|\,|w|: the length of a product is the product of the lengths.
  5. Theorem · B Multiplying in polar form rcis⁡α⋅scis⁡β=rscis⁡(α+β)r\operatorname{cis}\alpha \cdot s\operatorname{cis}\beta = rs\operatorname{cis}(\alpha + \beta): multiply the lengths and add the angles.
  6. Corollary · B De Moivre's formula (cos⁡θ+isin⁡θ)n=cos⁡nθ+isin⁡nθ(\cos\theta + i\sin\theta)^n = \cos n\theta + i\sin n\theta for every integer nn.
  7. Theorem · B Euler's formula eiθ=cos⁡θ+isin⁡θe^{i\theta} = \cos\theta + i\sin\theta for every real θ\theta.
  8. Theorem · B The n-th roots of unity zn=1z^n = 1 has exactly nn complex solutions, ωk=e2πik/n\omega_k = e^{2\pi i k / n} for k=0,1,…,n−1k = 0, 1, \dots, n - 1, the corners of a regular nn-gon on the unit circle; for n≥2n \ge 2 they add up to 00.
  9. Lemma · B No zero divisors, and the degree of a product If zw=0zw = 0 then z=0z = 0 or w=0w = 0; and deg⁡(fg)=deg⁡f+deg⁡g\deg(fg) = \deg f + \deg g for non-zero polynomials.
  10. Theorem · B Polynomial division algorithm For polynomials ff and g≠0g \ne 0 there are unique polynomials qq and rr with f=gq+rf = gq + r and either r=0r = 0 or deg⁡r<deg⁡g\deg r < \deg g.
  11. Corollary · B Remainder theorem for polynomials Dividing ff by x−cx - c leaves the constant remainder f(c)f(c).
  12. Corollary · B Factor theorem for polynomials cc is a root of ff exactly when x−cx - c divides ff.
  13. Theorem · B A polynomial of degree n has at most n roots A non-zero polynomial of degree nn has at most nn roots (real or complex).
  14. Theorem · B Complex roots of real polynomials come in conjugate pairs If a polynomial with real coefficients has root zz, then zˉ\bar z is also a root.
  15. Theorem · B Fundamental theorem of algebra Every non-constant polynomial with complex coefficients has at least one complex root.
  16. Corollary · B Every complex polynomial splits into linear factors A complex polynomial of degree n≥1n \ge 1 equals a(x−r1)(x−r2)⋯(x−rn)a(x - r_1)(x - r_2)\cdots(x - r_n), where aa is its leading coefficient.
  17. Corollary · B Real polynomials factor into real linear and quadratic factors Every polynomial with real coefficients and degree at least 1 is a constant times a product of real polynomials of degree 1 or 2.

Terms this unit defines

Unit review

A mixed set of 12 quick checks drawn at random from the 73 in this unit's chapters. Each one says which chapter it comes from, so a miss tells you what to reread. Press "New set" for another mix.

Where it leads

Units that build on this one: Unit 1, What calculus really means, Unit 2, Linear algebra, Unit 11, Discrete mathematics, Unit 12, Number theory and algebra, Unit 14, Logic, sets and computation.