Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Natural Numbers and the Integers

The Natural Numbers and the Integers

These slides helped facilitate discussion about chapters 1 & 2 of Mark Chu-Carroll's book "Good Math" at the Boulder Pivotal Labs book club.

Avatar for Tyson Gern

Tyson Gern

March 13, 2014
Tweet

More Decks by Tyson Gern

Other Decks in Programming

Transcript

  1. The Natural Numbers ℕ = { 0, 1, 2, 3,

    4, 5, 6, … } Semantically, we usually think of natural numbers in two different ways: Ordinals and Cardinals
  2. Axioms An axiom is an unproven premise that is accepted

    as true. Axioms are used as a starting point to prove interesting facts. Peano Arithmetic is a set of 6 axioms defining the natural numbers.
  3. Peano Arithmetic Initial Value Rule: 0 is a natural number.

    Successor Rule: Every number a has a unique successor, denoted s(a).
  4. Peano Arithmetic Predecessor Rule: Every number except 0 has a

    predecessor. If b = s(a), then a is b’s predecessor. Uniqueness Rule: No two numbers have the same successor.
  5. Peano Arithmetic Equality Rules: Numbers can be compared for equality.

    Equality is: reflexive: a = a symmetric: a = b implies b = a transitive: a = b and b = c implies a = c
  6. Peano Arithmetic Induction Rule: For some statement P, P is

    true for all natural numbers if the following are true 1. P is true about 0 (that is, P(0) is true). 2. If you assume P is true for a natural number n (P(n) is true), then you can prove that P is true for the successor s(n) of n (that P(s(n)) is true).
  7. Adding Structure The set ℕ = { 0, 1, 2,

    3, 4, 5, 6, … } models Peano Arithmetic, but so far the result isn’t very interesting. Let’s add some structure.
  8. Addition We define an operation + on ℕ with these

    rules: a + b = b + a; a + 0 = a; s(a + b) = a + s(b). In particular, s(a) = s(0 + a) = s(0) + a = 1 + a.
  9. Addition s(a) = 1 + a 7 + 3 =

    7 + s(2) = 7 + 1 + 2 = 7 + 1 + s(1) = 7 + 1 + 1 + 1 = s(7) + 1 + 1 = 8 + 1 + 1 = s(8) + 1 = 9 + 1 = s(9) = 10
  10. Multiplication We define an operation × on ℕ with these

    rules: a × b = b × a; a × 0 = 0; a × s(b) = (a × b) + a.
  11. Multiplication a × s(b) = (a × b) + a

    7 × 3 = 7 × s(2) = (7 × 2) + 7 = (7 × s(1)) + 7 = ((7 × 1) + 7) + 7 = ((7 × s(0)) + 7) + 7 = (((7 × 0) + 7) + 7) + 7 = 0 + 7 + 7 + 7 = 21
  12. Induction Prove that for each natural number n: 0 +

    1 + 2 + 3 + 4 + ··· + n = n(n + 1)/2 True if n = 0: 0 = 0(0 + 1)/2
  13. Induction Suppose true for n: 0 + 1 + 2

    + 3 + ··· + n = n(n + 1)/2. In order for the statement to be true, we must show it is true for s(n) = n + 1: 0 + 1 + 2 + 3 + ··· + n + n + 1 = (n + 1)(n + 2)/2.
  14. Induction For s(n) = n + 1: 0 + 1

    + 2 + 3 + ··· + n = n(n + 1)/2 0 + 1 + 2 + 3 + ··· + n + n + 1 = n(n + 1)/2 + n + 1 = n(n + 1)/2 + 2(n + 1)/2 = (n(n + 1) + 2(n + 1))/2 = (n + 1)(n + 2)/2
  15. Induction 0 + 1 + 2 + 3 + 4

    + ··· + n = n(n + 1)/2 def sum(n) return 0 if n == 0 n + sum(n - 1) end
  16. The Integers ℤ = … -4, -3, -2, -1, 0,

    1, 2, 3, 4, … Allow us to express direction, differences, etc. 4 + ? = 0
  17. The Integers Require two additions to Peano arithmetic: Additive Inverse:

    Any number a has an inverse -a such that a + -a = 0. Inverse Uniqueness: a = b if and only if -a = -b.
  18. Modeling Integers Intuitively, we believe that the integers model Peano

    arithmetic, but how can we be sure? Are our axioms consistent? Does a model even exist? How can we better understand the integers?
  19. Constructing the Integers Let’s create a model! We’ll look at

    the set of all ordered pairs (a, b) of natural numbers. (a, b) means a - b
  20. Constructing the Integers Certain pairs are equivalent to others (5,

    3) and (7, 5) both ≈ 2 so (5, 3) and (7, 5) are equivalent, or (5, 3) ≈ (7, 5). ≈ behaves similar =
  21. Constructing the Integers This set (mostly) follows Peano’s axioms: Initial

    Value Rule: (0, 0) is an integer Successor Rule: s(a, b) = (s(a), b) Predecessor Rule: now 0 has a predecessor the predecessor of (a, b) is (a, s(b))
  22. Constructing the Integers This set (mostly) follows Peano’s axioms: Uniqueness

    Rule: using ≈ instead of = Equality Rules: ≈ is symmetric, reflexive, and transitive Induction Rule: ???
  23. Constructing the Integers We can define addition on the integers:

    (a, b) + (c, d) = (a + c, b + d) so (9, 1) + (7, 2) = (9 + 7, 1 + 2) = (16, 3) 8 + 5 = 13
  24. Constructing the Integers We can define subtraction on the integers:

    (a, b) - (c, d) = (a + d, b + c) so (9, 1) - (7, 2) = (9 + 2, 7 + 1) = (11, 8) 8 - 5 = 3
  25. Constructing the Integers Then additive inverses of an integer (a,

    b) is (b, a), since (a, b) + (b, a) = (a + b, a + b) ≈ (0, 0).
  26. Constructing the Integers The inverse of (a, b) may be

    written in many different ways, (b + 1, a + 1), (b + 2, a + 2), (b + 3, a + 3), … but each is equivalent to (b, a).
  27. Next Time Chapters 3 & 4: Rational and Real numbers

    like ½, π, ⅞, and √2. Questions?