MAT115A-21 COMPLETE LECTURE NOTES

Similar documents
2.1 Sets. Definition 1 A set is an unordered collection of objects. Important sets: N, Z, Z +, Q, R.

In N we can do addition, but in order to do subtraction we need to extend N to the integers

In N we can do addition, but in order to do subtraction we need to extend N to the integers

Chapter 1 : The language of mathematics.

Propositional Logic, Predicates, and Equivalence

CHAPTER 8: EXPLORING R

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

2 Lecture 2: Logical statements and proof by contradiction Lecture 10: More on Permutations, Group Homomorphisms 31

Chapter Summary. Sets The Language of Sets Set Operations Set Identities Functions Types of Functions Operations on Functions Computability

POL502: Foundations. Kosuke Imai Department of Politics, Princeton University. October 10, 2005

MATH 220 (all sections) Homework #12 not to be turned in posted Friday, November 24, 2017

Mathematical Reasoning & Proofs

ADVANCED CALCULUS - MTH433 LECTURE 4 - FINITE AND INFINITE SETS

MATH 55 - HOMEWORK 6 SOLUTIONS. 1. Section = 1 = (n + 1) 3 = 2. + (n + 1) 3. + (n + 1) 3 = n2 (n + 1) 2.

Final Exam Review. 2. Let A = {, { }}. What is the cardinality of A? Is

Introduction to Proofs

Exercises for Unit VI (Infinite constructions in set theory)

Week Some Warm-up Questions

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction

Principles of Real Analysis I Fall I. The Real Number System

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr.

Contribution of Problems

5 Set Operations, Functions, and Counting

Sets and Functions. (As we will see, in describing a set the order in which elements are listed is irrelevant).

Notes on ordinals and cardinals

Mathematics Course 111: Algebra I Part I: Algebraic Structures, Sets and Permutations

Sets. We discuss an informal (naive) set theory as needed in Computer Science. It was introduced by G. Cantor in the second half of the nineteenth

0 Sets and Induction. Sets

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

1 Basic Combinatorics

586 Index. vertex, 369 disjoint, 236 pairwise, 272, 395 disjoint sets, 236 disjunction, 33, 36 distributive laws

FOUNDATIONS & PROOF LECTURE NOTES by Dr Lynne Walling

Part IA Numbers and Sets

MAT 570 REAL ANALYSIS LECTURE NOTES. Contents. 1. Sets Functions Countability Axiom of choice Equivalence relations 9

Review 1. Andreas Klappenecker

Finite and Infinite Sets

Theorem. For every positive integer n, the sum of the positive integers from 1 to n is n(n+1)

Sets and Functions. MATH 464/506, Real Analysis. J. Robert Buchanan. Summer Department of Mathematics. J. Robert Buchanan Sets and Functions

Chapter 1. Sets and Mappings

SETS AND FUNCTIONS JOSHUA BALLEW

Introduction to Abstract Mathematics

MATH 2200 Final LC Review

Chapter Summary. Sets (2.1) Set Operations (2.2) Functions (2.3) Sequences and Summations (2.4) Cardinality of Sets (2.5) Matrices (2.

Discrete Mathematics. W. Ethan Duckworth. Fall 2017, Loyola University Maryland

Functions and cardinality (solutions) sections A and F TA: Clive Newstead 6 th May 2014

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

MATH 324 Summer 2011 Elementary Number Theory. Notes on Mathematical Induction. Recall the following axiom for the set of integers.

Chapter 1. Sets and Numbers

Math Circle: Recursion and Induction

Chapter 2 - Basics Structures MATH 213. Chapter 2: Basic Structures. Dr. Eric Bancroft. Fall Dr. Eric Bancroft MATH 213 Fall / 60

Countability. 1 Motivation. 2 Counting

Sets are one of the basic building blocks for the types of objects considered in discrete mathematics.

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

MATH FINAL EXAM REVIEW HINTS

Chapter 1 The Real Numbers

Math 10850, fall 2017, University of Notre Dame

Numbers, sets, and functions

Announcements. CS243: Discrete Structures. Sequences, Summations, and Cardinality of Infinite Sets. More on Midterm. Midterm.

Axioms for Set Theory

Analysis I. Classroom Notes. H.-D. Alber

Math 3450 Homework Solutions

MATH 102 INTRODUCTION TO MATHEMATICAL ANALYSIS. 1. Some Fundamentals

Seminaar Abstrakte Wiskunde Seminar in Abstract Mathematics Lecture notes in progress (27 March 2010)

Math 105A HW 1 Solutions

Cartesian Products and Relations

REVIEW FOR THIRD 3200 MIDTERM

Introduction to Decision Sciences Lecture 6

Properties of the Integers

a + b = b + a and a b = b a. (a + b) + c = a + (b + c) and (a b) c = a (b c). a (b + c) = a b + a c and (a + b) c = a c + b c.

Math 13, Spring 2013, Lecture B: Midterm

Real Analysis - Notes and After Notes Fall 2008

The integers. Chapter 3

Structure of R. Chapter Algebraic and Order Properties of R

Functions. Definition 1 Let A and B be sets. A relation between A and B is any subset of A B.

Math 4603: Advanced Calculus I, Summer 2016 University of Minnesota Notes on Cardinality of Sets

Sets, Models and Proofs. I. Moerdijk and J. van Oosten Department of Mathematics Utrecht University

Topology. Xiaolong Han. Department of Mathematics, California State University, Northridge, CA 91330, USA address:

CSE 1400 Applied Discrete Mathematics Proofs

Math 511, Algebraic Systems, Fall 2017 July 20, 2017 Edition. Todd Cochrane

Chapter 2 - Basics Structures

Review 3. Andreas Klappenecker

Theorems. Theorem 1.11: Greatest-Lower-Bound Property. Theorem 1.20: The Archimedean property of. Theorem 1.21: -th Root of Real Numbers

2. Two binary operations (addition, denoted + and multiplication, denoted

Discrete Mathematics: Lectures 6 and 7 Sets, Relations, Functions and Counting Instructor: Arijit Bishnu Date: August 4 and 6, 2009

Functions. Given a function f: A B:

Handout 2 (Correction of Handout 1 plus continued discussion/hw) Comments and Homework in Chapter 1

We want to show P (n) is true for all integers

Topology Math Conrad Plaut

Solutions to Homework Set 1

Chapter 0. Introduction: Prerequisites and Preliminaries

Name (print): Question 4. exercise 1.24 (compute the union, then the intersection of two sets)

Full file at

MATH31011/MATH41011/MATH61011: FOURIER ANALYSIS AND LEBESGUE INTEGRATION. Chapter 2: Countability and Cantor Sets

Divisibility = 16, = 9, = 2, = 5. (Negative!)

Writing proofs for MATH 51H Section 2: Set theory, proofs of existential statements, proofs of uniqueness statements, proof by cases

Copyright c 2007 Jason Underdown Some rights reserved. statement. sentential connectives. negation. conjunction. disjunction

Mathematics 220 Workshop Cardinality. Some harder problems on cardinality.

Solutions to Homework Assignment 2

Mathematics Review for Business PhD Students

Transcription:

MAT115A-21 COMPLETE LECTURE NOTES NATHANIEL GALLUP 1. Introduction Number theory begins as the study of the natural numbers the integers N = {1, 2, 3,...}, Z = { 3, 2, 1, 0, 1, 2, 3,...}, and sometimes the rational, real, and complex numbers (to be defined later). One of the main focuses of current number theory research is the study of prime numbers, i.e. natural numbers p which are only divisible by 1 and p. In a very precise sense, prime numbers are the building blocks of the integers (as we shall see), and therefore any decent study of Z must study primes as well. Properties of prime numbers were studied by the Greeks (and even before). For example, the Greeks proved that there are infinitely many primes. Although prime numbers have a simple definition, and therefore have been studied for thousands of years, there are very basic questions about them that are still open (meaning unsolved). For example the famous open Twin Prime Conjecture states that there are infinitely many twin prime pairs, i.e. pairs (p, p + 2) such that both p and p + 2 are prime. In this course we won t attempt to solve the TPC, but we will study and prove many interesting results about primes. In another direction, primes are used very heavily in cryptography. The RSA cryptosystem, used, for example, any time you purchase something online using a credit card, uses the assumption that it is faster for a computer to multiply together two huge primes, than to factor the product of those primes (without knowing the factors beforehand). In this course we ll discuss RSA, among other algorithms which also use primes. This course also functions as an introduction to rigorous mathematics, i.e. mathematics in which you prove all of your results. Although no non-set theory course can be fully rigorous, we will try to assume as little background as possible and prove all of our results from that starting point, while still making sure we learn all of the desired number theory material. In the spirit of this method, all solutions to homework problems should be in the format of a proof............................................................................................................... Definition 1: Set 2. Sets A set is a collection of things. These things are called elements of the set. If A is a set and x is an element of A, write x A. If x is not an element of A, write x / A. 1

MAT115A-21 COMPLETE LECTURE NOTES 2 Example 1: Sets (1) We can define sets by listing their elements. If we want to define C to be the set containing 1, 2, 3, then we write C := {1, 2, 3}. In this case 1 C, but 4 / C. (2) Even when there are infinitely many elements in a set, we can still define them by listing their elements implicitly. For example, the set of natural numbers is defined to be and the set of integers is defined to be N := {1, 2, 3,...}, Z := {..., 3, 2, 1, 0, 1, 2, 3,...}. For convenience, we also define the set of nonnegative integers to be Z 0 = {0, 1, 2, 3,...} (3) We can define sets using sentences as well: For example, Let E be the set of even natural numbers. We could also define E by implicitly listing its elements as before. Note 1: Rigorous Foundations E := {2, 4, 6,...}. The rigorous mathematics underlying the previous definitions is called set theory. It s totally awesome, but is a topic for another course. For this course we ll have to make do with a somewhat intuitive understanding of a set. Note 2: Russel s Paradox It is possible to obtain a paradox when defining sets. Russel s famous paradox arises when one tries to define the set S of all sets which do not contain themselves. Then either S S or S / S provides a contradiction, which violates the law of excluded middle: either something is true, or it is not true. However the sets we define in this class will not run into this issue (because they will either be subsets of the real or complex numbers or sets of functions between the real and complex numbers), so this issue is better left to a set theory course. Definition 2: Set Containment Let A and B be sets. We say that A is a subset of B (or A is contained in B) if every element of A is also an element of B. In this case we write either A B or B A. If A is not contained in B, we write A B. If A B and B A, we say that A and B are equal and write A = B. This means that A contains the exact same elements as B. If A is not equal to B, we write A B. This means either that A B or that B A. If A B but A B, then we say that A is strictly contained in B and write A B. Example 2: Set Containment In the notation of the previous example, we have the following set containments. (1) E N Z. (2) C E, since 1 C but 1 / E, and also E C since 4 E but 4 / C. (3) Z N since 1 Z but 1 N, hence N Z.

Exercise 1: Examples of Set Containment MAT115A-21 COMPLETE LECTURE NOTES 3 For each part below, give examples (different from the ones given in the lecture notes) of sets A and B that satisfy the required conditions. (1) A B. (2) A B. (3) A B and B A. Proof. Homework. Definition 3: Empty Set The empty set, denoted by, is the set which contains no elements. Proposition 1: Empty Set is Contained in all Sets The empty set is contained in all sets. Proof. Since there are no elements in the empty set, the statement every element of is also an element of A is vacuously true for every set A. Therefore the empty set is contained in all other sets. That is, for any set A, we have A. Definition 4: Finite Union and Intersection Let A and B be sets. The union of A and B is defined as the set A B := {x : x A or x B}. The intersection of A and B is defined as the set Example 3: Finite Union and Intersection Let C = {1, 2, 3}. (1) C E = {1, 2, 3, 4, 6, 8, 10,...}. (2) C E = {2}. (3) For any set A, we have the following results. (a) A = A. (b) A =. A B := {x : x A and x B}. Definition 5: Disjoint Sets Two sets A and B are said to be disjoint if A B =. This means that A and B have no elements in common. Example 4: Disjoint Sets The sets A = {4, 6, 11} and C = {1, 2, 3} are disjoint, since they have no elements in common. However the sets B = {3, 4, 7} and C are not disjoint, since B C = {3}.

MAT115A-21 COMPLETE LECTURE NOTES 4 Exercise 2: Distributive Properties of Finite Unions and Intersections Let A, B, and C be sets. Show that the following properties hold. (1) (Union distributes over intersection). A (B C) = (A B) (A C). (2) (Intersection distributes over union). A (B C) = (A B) (A C). Proof. Recall from Definition 2 that if S and T are sets, then S = T means that both S T and T S. (1) ( ). If x A (B C) then either x A or x B C. If x A, then x A B and x A C. If x B C then x B and x C, hence x A B and x A C. Hence in both cases, x (A B) (A C). ( ). If x (A B) (A C) then we have both that x A B and that x A C. If x A, then x A (B C). On the other hand, if x / A, then it must be that x B and that x C. Therefore x B C, and hence x A (B C) as well. (2) Homework. Definition 6: Infinite Union and Intersection Let A 1, A 2, A 3,... be a list of infinitely many sets, one for each natural number. The union of A 1, A 2, A 3,... is defined as the set A n := {x : x A n for some n}. n=1 The intersection of A 1, A 2, A 3,... is defined as the set A n := {x : x A n for all n}. n=1 Example 5: Infinite Union and Intersection Let A 1 = N = {1, 2, 3,...} A 2 = {2, 3, 4,...} A 3 = {3, 4, 5,...}. A n = {n, n + 1, n + 2,...} = {k N : n k}. Note that this collection of sets is nested, meaning that A 1 A 2 A 3.... Hence we have that A n = N. n=1 Furthermore, we have that A n =. n=1 To see this, note that if k n=1 A n, then k A n for all n N. However if k A n, then k n. Therefore k n for all n N. No natural number satisfies this, therefore there are no such k in n=1 A n.

MAT115A-21 COMPLETE LECTURE NOTES 5 Exercise 3: Distributive Properties of Infinite Unions and Intersections Let A and B n for each n N be sets. Show that the following properties hold. (1) (Union distributes over infinite intersection). A ( n=1 B n) = n=1 (A B n). (2) (Intersection distributes over infinite union). A ( n=1 B n) = n=1 (A B n). Proof. Homework. Exercise 4: Further Properties of Unions and Intersections of Sets Decide which of the following represent true statements about the nature of sets. If a statement is true, prove it. For any that are false, provide a specific example where the statement in question does not hold. (1) If A 1 A 2 A 3... are all sets containing an infinite number of elements, then the intersection n=1 A n is infinite as well. (2) If A 1 A 2 A 3... are finite, nonempty sets, then the intersection n=1 A n is finite and nonempty. (3) A (B C) = (A B) C. (4) A (B C) = (A B) C. (5) A (B C) = (A B) (A C). Proof. Homework. Exercise 5: Example of Infinite Unions Produce an infinite collection of sets A 1, A 2, A 3,... with the property that every A i has an infinite number of elements, A i A j = for all i j, and i=1 A i = N. Proof. Homework. Definition 7: Complement of a Set Let A B. The complement of A in B is the set of elements of B which are not in A. Symbolically, we write B A := {x B : x / A}. Example 6: Complement of a Set We have that E N, and that is the set of all odd natural numbers. N E = {1, 3, 5,...}, Exercise 6: Finite De Morgan s Laws Let A and B be subsets of a set X. Show that the following set equalities hold. (1) X (A B) = (X A) (X B). (2) X (A B) = (X A) (X B). These properties are sometimes called De Morgan s Laws. Proof.

MAT115A-21 COMPLETE LECTURE NOTES 6 (1) ( ). If x X (A B), then x is not contained in A B, hence either x / A or x / B. Therefore x (X A) (X B). ( ). If x (X A) (X B), then either x X A or x X B. Hence either x is not in A or x is not in B. In either case, x is not in A B, and therefore x X (A B). (2) Homework. Exercise 7: Infinite De Morgan s Laws Let A n for each n N be subsets of a set X. Show that the following set equalities hold. (1) X ( n=1 A n) = n=1 (X A n). (2) X ( n=1 A n) = n=1 (X A n). These properties are also referred to as De Morgan s Laws. Proof. Homework............................................................................................................... 3. Cartesian Products of Sets Definition 8: Cartesian Product Given two sets A and B, define their cartesian product to be the set of ordered pairs A B := {(a, b) : a A, b B}. Note 3: Notation Here the word ordered means that the order matters. For example in N N, the elements (1, 2) and (2, 1) are not equal. Example 7: Cartesian Product of the Natural Numbers Recall the set of natural numbers N = {1, 2, 3,...}. The cartesian product N N of N with itself is often drawn as a 2-dimensional grid. Examples of elements of N N are (1, 1), (1, 2), (2, 1), etc. Exercise 8: Cartesian Product of Unions and Intersections For the following statements, prove or find a counterexample. Let X and Y be sets, with A, B X and C, D Y. (1) (A B) (C D) = (A C) (B D). (2) (A B) (C D) = (A C) (B D). Proof. Homework...............................................................................................................

MAT115A-21 COMPLETE LECTURE NOTES 7 Definition 9: Function 4. Functions Given two sets A and B, a function, or map, from A to B, written f : A B is a subset of A B which satisfies the following conditions. (F1) (Uniqueness). If, for some x A, (x, y) and (x, z) are both in f, then y = z. (F2) (Existence). For all x A, there exists some element y B such that (x, y) f. To express that the uniqueness condition is satisfied, we often say that f is well defined, or that f passes the vertical line test. Note 4: How to think about a function Although technically a function f from A to B is defined to be a particular kind of subset of A B, we almost always think of it as a rule which assigns to each element x of A the unique element y of B such that (x, y) f. In this framework, we often denote this unique element as f(x). Also, sometimes we write x y, and say x maps to y to mean f(x) = y. Definition 10: Domain, Codomain, Image Suppose that f : A B is a function. A is called the domain of f. B is called the codomain of f. The set defined by is called the image or range of f. f(a) := {y B : y = f(x) for some x A} B Example 8: Functions We define a function f : N E by Explicitly, this means that f is the subset of N E f(k) = 4k. f = {(k, 4k) k N}. The domain of f is N and the codomain is E. The image (or range) of f is the elements of E which are multiples of 4, i.e. f(a) = {4, 8, 12,...} E = {2, 4, 6,...}. Example 9: The Identity Function Given a set A, the identity function on A is defined by 1 A : A A 1 A (x) = x. Explicitly, 1 A is the subset of A A given by 1 A = {(x, x) x A}.

MAT115A-21 COMPLETE LECTURE NOTES 8 Definition 11: Equality of Functions Two functions f and g are equal when their domain and codomains are the same (say A and B respectively) and they are the same subset of A B. In other words f : A B and g : C D are equal if A = C and B = D and f(x) = g(x) for all x A = C. Definition 12: Injective, Surjective, Bijective Let A and B be sets. A function f : A B is injective or one-to-one or 1 1 if for all x, y A with f(x) = f(y), we have x = y. A function f : A B is surjective or onto if for all z B there exists x A with f(x) = z. A function f : A B is bijective if it is both injective and surjective. Exercise 9: Injections, Surjections, and Bijections Determine whether the following functions are surjective or injective. Prove your result. (1) f : Z Z defined by (2) f : Z N {0} defined by (3) f : Z Z defined by f(k) = f(n) = { k if k 0 k if k < 0. { k if k 0 k if k < 0. (4) f : Z Z defined by f(k) = 2k. f(k) = k. Proof. (1) (2) (3) (4) (Injectivity). This function is not injective since 1 1 in Z, yet f(1) = 1 = f( 1). (Surjectivity). This function is not surjective since for all k Z, f(k) 0, and therefore there does not exist a k Z with f(k) = 1. (Injectivity). This function is still not injective since 1 1 in Z, yet f(1) = 1 = f( 1). (Surjectivity). This function is now surjective, since given n N {0}, we have that n Z and f(n) = n. (Injectivity). This function is injective, since if f(m) = f(k), for some m, k Z, then 2m = 2k, and canceling 2 from both sides yields m = k. (Surjectivity). This function is not surjective since f(k) = 2k is even for all k Z, and therefore there does not exist a k Z with f(k) = 1. (Injectivity). This function is injective, since if f(m) = f(k), for some m, k Z, then m = k, and canceling 1 from both sides yields m = k. (Surjectivity). This function is surjective, since for any k Z, f( k) = ( k) = k.

MAT115A-21 COMPLETE LECTURE NOTES 9 Exercise 10: Injective, Surjective, and Bijective Give an example or each or prove that the request is impossible. (1) f : N N that is injective but not surjective. (2) f : N N that is surjective but not injective. (3) f : N Z that is injective and surjective. Proof. Homework. Exercise 11: Interpret Injective, Surjective, and Bijective as Subsets Interpret the definitions of an (1) injective, (2) surjective, (3) bijective, function in terms of the subset definition of a function. Proof. A function f : A B is a subset of A B which satisfies (F1) and (F2). (1) The function f is injective if and only if this subset has the following property. (B1) (Uniqueness). If, for y B, (x, y) and (z, y) are in f A B, then y = z. (2) The function f is surjective if and only if this subset has the following property. (B2) (Existence). For every y B, there exists some x A such that (x, y) f A B. (3) Homework. Definition 13: Composition of Functions Let A, B, C be sets and f : A B and g : B C be functions. The composition of f and g, denoted by g f is the function defined as follows. g f : A C (g f)(x) = g(f(x)) for all x A. Example 10: Composition of Functions Define the following two functions. f : Z Z 0 f(k) = k g : Z 0 E {0} g(k) = 2k Then the composition g f : Z E is given by (g f)(k) = g(f(k)) = g( k ) = 2 k.

MAT115A-21 COMPLETE LECTURE NOTES 10 Definition 14: Inverses Let f : A B be a function. A left inverse of f is a function l : B A such that l f : A A is equal to the identity map 1 A : A A. A right inverse of f is a function r : B A such that f r : B B is equal to the identity map 1 B : B B. An inverse of f is a function g : B A such that g is both a left inverse and a right inverse of f, i.e. such that g f = 1 A and f g = 1 B. Exercise 12: Inverses and Injectivity, Surjectivity, Bijectivity Let A and B be (nonempty) sets and let f : A B be a function. Prove the following three statements. (1) f is injective if and only if f has a left inverse. (2) f is surjective if and only if f has a right inverse. (3) f is bijective if and only if f has an inverse. Proof. (1) ( ). Suppose that f : A B is injective. Let z A be any element, which exists because A is nonempty. Therefore, explicitly, f is a subset of A B. We want to define a function g : B A, explicitly a subset of B A. We consider two cases. For every y f(a), by definition we have y = f(x) for some x A. Hence we choose any such x, and we let (y, x) be in g B A, i.e. g(y) = x. For every y / f(a), we let (y, z) be in g B A, i.e. g(y) = z. We must show that the subset g B A actually satisfies the required conditions to be a function. (F1). Given any y B, either y f(a) or y / f(a). In the former case, we have y = f(x) for some x and (y, x) g, and in the latter case we have that (y, z) g, as desired. (F2). Suppose that (y, v) = (y, w). If y f(a), then by definition v, w A are such that f(v) = y and f(w) = y. Therefore f(v) = y = f(w). Since f is injective we have that v = w as desired. If y / f(a), then both v and w are equal to z, and hence v = w as desired. ( ). Suppose that f : A B has a left inverse. By definition this means that there is some function g : B A such that g f = 1 A. Suppose that x, y A are such that f(x) = f(y). Then we compute f(x) = f(y) (1) = g(f(x)) = g(f(y)) (2) = 1 A (x) = 1 A (y) (3) = x = y, as desired. Here (1) follows from applying g to both sides of the equation, which we can do because f(x) and f(y) are in the domain B of g, (2) follows from the fact that g is a left inverse of f, and (3) follows from the definition of the identity function 1 A : A A. (2) Homework. (3) Homework.

MAT115A-21 COMPLETE LECTURE NOTES 11 Example 11: Bijections Consider the sets defined by X := {1, 2, 3} and Y := {a, b, c}. There are many bijections between these two sets. Here are two examples. (1) (2) f : X Y f(1) = a f(2) = b f(3) = c f : X Y f(1) = b f(2) = a f(3) = c Note 5: Thinking about Bijections A bijection f : A B gives an exact correspondence between the elements of A and the elements of B, so we often think of f as simply relabeling the elements of A by elements of B. In this sense, the sets A and B are equivalent...............................................................................................................

Theorem 1: Existence of the Real Numbers MAT115A-21 COMPLETE LECTURE NOTES 12 5. Numbers There exists a set, denoted by R, whose elements are called real numbers, which satisfies the following properties. (1) Z R. (2) There exist functions + : R R R (called addition) and : R R R (called multiplication, and denoted by r, s rs) making R into a field. This means that these functions satisfy the following properties. (A1) (Additive Commutativity). For all r, s R, r + s = s + r. (A2) (Additive Associativity). For all r, s, t R, (r + s) + t = r + (s + t). (A3) (Additive Identity). There exists a unique element z R such that r + z = z + r = r for all r R. Such an element is called an additive identity. (A4) (Additive Inverses). For every r R, there exists s R, called an additive inverse of r, such that r + s = s + r = z. (M1) (Multiplicative Commutativity). For all r, s R, rs = sr. (M2) (Multiplicative Associativity). For all r, s, t R, (rs)t = r(st). (M3) (Multiplicative Identity). There exists a unique element e R such that er = re = r for all r R. Such an element is called a multiplicative identity. (M4) (Multiplicative Inverses). For every element r R {0}, there exists an element s, called a multiplicative inverse of r such that rs = sr = e. In this case we write s = 1 r, and for any t R, we denote ts by t r. (D1) (Multiplication Distributes over Addition): For all r, s, t R, r(s + t) = rs + rt. (I1) (Distinct Identities). The additive and multiplicative identities are distinct, i.e. z e in R. (3) The operations of addition and multiplication on R agree with the usual addition and multiplication of integers when restricted to Z. (4) There exists a total order < on R making (R, +,, <) an ordered field. This means that (O1) (Trichotomy). Given x, y R, exactly one of the following statements is true. x < y, x = y, y < x. (O2) (Transitivity). If x < y and y < z, then x < z. (OF3) For all x, y, z R, (i) If x < y then x + z < y + z. (ii) If 0 < x and 0 < y then 0 < xy. (5) The total order on R agrees with the usual total order on the integers, when restricted to Z. (6) Every nonnegative element of R has a unique square root which is positive. Note 6: Thinking About the Real Numbers The theorem above lists a ridiculous number of axioms, and a rigorous construction of R takes a lot of work, and must be left to an analysis course. For the purposes of this course, we ll have to be satisfied with the intuitive understanding of R that you have from calculus (or other previous math courses). Definition 15: The Rational Numbers A real number a is called rational if there exists n, m Z with m 0, such that a = n/m. In particular, all integers n can be written as n = n/1, and therefore are rational numbers. If a real number is not rational, it is called irrational. The set of all rational numbers is denoted by Q.

MAT115A-21 COMPLETE LECTURE NOTES 13 Note 7: Containment of Number Systems We have the following containment of the number systems we have introduced so far: N Z Q R. Theorem 2: The Well Ordering Principle Every nonempty subset of the natural numbers N has a least element. Note 8: Proof of the Well Ordering Principle To properly prove this, we would need a rigorous notion of the natural numbers from set theory. For this class we will have to accept this theorem without proof. Theorem 3: Irrationality of Root Two (Rosen Theorem 1.1) The real number 2 is irrational. Proof. We define a set S = {k 2 R k, k 2 N} N Now suppose, for contradiction, that 2 were rational. Then because 2 > 0 there exists some a, b N, such that 2 = a/b. We compute 2 = a/b = b 2 = a. Therefore both b and b 2 = a are in N, and so a = b 2 S This implies that S is a nonempty subset of N. By the Well Ordering Principle (Theorem 2) it follows that S has a least element, call it s. By definition of S, we can write s = t 2 where s, t N. We compute s 2 = t 2 2 = 2t N Therefore both s and s 2 N. Furthermore, we compute 2 > 1 = 2 1 > 0 = s( 2 1) > 0 = s 2 s > 0 = s 2 s N. Similarly, we have

MAT115A-21 COMPLETE LECTURE NOTES 14 2 > 1 = 2 1 > 0 = t( 2 1) > 0 = t 2 t > 0 = s t > 0 = s t N. But now we compute s 2 s = s 2 t 2 = (s t) 2 N. = (s t) 2 Therefore, we have that s t N and (s t) 2 N. Hence by definition of S, (s t) 2 S. But we have that 2 < 2 = 2 1 < 1 = s( 2 1) < s = s 2 s < s = s 2 t 2 < s = (s t) 2 < s, which contradicts that s is a least element of S, as desired............................................................................................................... Definition 16: Cardinality 6. Cardinality Two sets A and B have the same cardinality if there is a bijection f : A B. In this case we write A B. Note 9: Thinking about Cardinality We often think about cardinality as measuring the relative size of two sets, i.e. if A B, then we think of A and B as having the same size. Definition 17: Finite Set A set A is finite if A {1, 2,..., n} N for some n N.

MAT115A-21 COMPLETE LECTURE NOTES 15 Example 12: Cardinality (a) Denote the set of even natural numbers by E = {2, 4, 6, 8,...}. We claim that N E. Define a function (Injective). Compute f : N E f(n) = 2n. f(n) = f(m) = 2n = 2m = n = m. Therefore f is injective. (Surjective). Given any element x E, x is an even natural number, hence there exists some natural number n such that x = 2n = f(n). Hence f is surjective. Since f is both injective and surjective, it is a bijection. This shows that N E. (b) We claim that N Z. Define a function f : N Z using the following diagram. 1 2 3 4 5 6... 1 1 2 2 3 3... Even though we haven t written an explicit formula for f, it is clear from this diagram that f is bijective. (c) The function f : ( 1, 1) R defined by f(x) = x x 2 1 is bijective, and therefore the interval ( 1, 1) has the same cardinality as the real numbers. Note 10: Cardinality vs. Containment In the previous example we showed that E N and that N Z, so we think of E, N, and Z as all having the same size. This can be a bit counterintuitive as E N Z, but this confusion is fixed by remembering that cardinality is simply one measure of size and containment is another............................................................................................................... Definition 18: Countable Sets 7. Countable Sets A set A is countable if there is an injection A N. Note that in this definition, finite sets are countable. If a set is countable, but not finite, we say it is countably infinite. An infinite set that is not countable is called uncountable. Example 13: Countable Sets Note that N itself is countable, since the identity function from N to itself is a bijection. By Example 12, both E and Z are countable.

Theorem 4: Cardinality of Q and R (1) The set of rational numbers Q is countable. (2) The set of real numbers R is uncountable. MAT115A-21 COMPLETE LECTURE NOTES 16 Proof. (1) We define a function f : N Q using the following diagram: 1 2 3 4 5 6 7 8 9 10 11 0 1 1 1 1 1 1 2 1 2 2 1 2 1 1 3 3 1 2 3 3 2 12 13 14 15 16 17 18 19 20 21 22 1 4 1 4 3 4 3 4 4 1 4 1 4 3 4 3 1 5 1 5 2 5... One can see that all rational numbers will appear exactly once on this list, and hence f is a bijection, so Q is countable. (2) This proof will be left to an analysis course. Exercise 13: Subset of a Countable Set is Countable Show that if A B and B is countable, then A is countable. Exercise 14: Countable Union of Countable Sets is Countable (1) If A 1,..., A m are each countable sets, then the union A 1... A m is countable. (2) If A n is a countable set for each n N, then n=1 A n is countable. Exercise 15: Cardinality of I Use Theorem 4, Exercise 13, and Exercise 14 to show that the set I of irrational numbers is uncountable...............................................................................................................

Definition 19: The Floor and Ceiling Functions MAT115A-21 COMPLETE LECTURE NOTES 17 8. The Floor and Ceiling Functions The floor function (also known as the greatest integer function), denoted by : R Z, assigns to a real number x R, the largest integer which is less than or equal to x. In other words, x is the unique integer which satisfies x x < x + 1. The integer x is also called the integral part of x. The ceiling function, denoted by : R Z, assigns to a real number x R, the smallest integer which is greater than or equal to x. In other words, x is the unique integer which satisfies x 1 < x x. Example 14: Basic Examples of the floor and ceiling functions (1) We have that 3/2 = 1 and that 3/2 = 2. (2) We have that 3/2 = 2 and 3/2 = 1. (3) For any k Z, we have that k = k and k = k. Exercise 16: Properties of the Floor and Ceiling Functions (1) Prove that for all x R and n N, x + n = x + n. (2) Provide a similar formula to that above for the ceiling function, and prove that this formula holds. Definition 20: Fractional Part of a Real Number We define a function { } : R [0, 1) by {x} = x x. The number {x} is called the fractional part of x. Note 11: Greatest Integer Plus Fractional Part We note that for any real number x, we can write x = x + {x}. Example 15: Fractional Part of a Real Number (1) We have that {3/2} = 3/2 3/2 = 3/2 1 = 1/2. (2) We have that { 3/2} = 3/2 3/2 = 3/2 ( 2) = 1/2............................................................................................................... Definition 21: Sequence A sequence of real numbers is a function f : N R. 9. Sequences

MAT115A-21 COMPLETE LECTURE NOTES 18 Note 12: Thinking about Sequences We often think of a sequence f : N R as, and denote it by, the list of numbers (f(1), f(2), f(3), f(4),...). We will also often denote a sequence f by the list (a n ) = (a 1, a 2, a 3,...), where a n = f(n). Example 16: Sequences (Rosen Example 1.7) (1) Let a n = n 2. Then the first few terms of the sequence (a n ) are 1, 4, 9, 25,.... (2) Let b n = 2{ n. Then the first few terms of the sequence (b n ) are 2, 4, 8, 16,.... 0 if n is odd, (3) Let c n = 1 if n is even.. Then the first few terms of the sequence (c n) are 0, 1, 0, 1, 0,.... Definition 22: Geometric Progression A geometric progression (or geometric sequence) is a sequence of the form b n = ar n 1 for some a, r R. The number a is called the initial term and r is called the common ratio. The first few terms of such a geometric progression are a, ar, ar 2, ar 3,... Example 17: Geometric Progression (Rosen Example 1.8) If we let the initial term be 3 and the common ratio be 5, then the resulting geometric progression is given by b n = 3 5 n 1, and the first few terms are 3, 15, 75,... Definition 23: Arithmetic Progression An arithmetic progression (or arithmetic sequence) is a sequence of the form b n = a + d(n 1) for some a, d R. The number a is (again) called the initial term and d is called the common difference. The first few terms of such a geometric progression are a, a + d, a + 2d, a + 3d,... Example 18: Arithmetic Progression (Rosen Example 1.9) If we let the initial term be 4 and the common difference be 7, then the resulting geometric progression is given by b n = 4 + 7(n 1), and the first few terms are 4, 11, 18, 25,... Note 13: Finding a Formula In the previous examples, we started with a formula for a sequence and then wrote out the first few terms. We can sometimes go the other way as well: given the first few terms of a sequence, we can conjecture a formula for the sequence. Of course since we only know the first few terms, the formula may or may not hold for all of the terms. Furthermore, not every sequence is even given by a formula, so the task may, in fact, be impossible.

MAT115A-21 COMPLETE LECTURE NOTES 19 Example 19: Finding a Formula (Rosen Example 1.10) Consider a sequence whose first few terms are 5, 11, 29, 83, 245, 731, 2189, 6563. Notice that each term is approximately 3 times the previous term. We have that Therefore we conjecture the formula 3 1 = 3 = a 1 2, 3 2 = 9 = a 2 2, 3 3 = 27 = a 3 2, 3 4 = 81 = a 4 2, 3 5 = 243 = a 5 2, 3 6 = 729 = a 6 2, 3 7 = 6561 = a 7 2. which we can be sure holds at least for 1 n 7. a n = 2 + 3 n, Exercise 17: Sequences and Cardinality Show that a subset of real numbers is countable if and only if it can be written as a sequence............................................................................................................... Definition 24: The Summation Symbol 10. Sums Given two integers m n, and a finite list a m, a m+1,..., a n of real numbers we define n a k = a m + a m+1 +... + a n. k=m The letter k is called the summation index. Note 14: Dummy Variables The index of summation is an example of a dummy variable. This means that we can replace it with any other variable and the meaning of the summation remains the same. For example n a k = k=m n a i. i=m

MAT115A-21 COMPLETE LECTURE NOTES 20 Example 20: Summation (Rosen Example 1.13) We compute a few different sums using the summation symbol defined above. (a) 5 j=1 j = 1 + 2 + 3 + 4 + 5 = 15. (b) 5 j=1 2 = 2 + 2 + 2 + 2 + 2 = 10. (c) 5 j=3 2j = 2 + 4 + 8 + 16 + 32 = 62. (d) 5 k=3 k2 = 3 2 + 4 2 + 5 2 = 50. (e) 2 k=0 3k = 3 0 + 3 1 + 3 2 = 12. (f) 1 k= 2 k3 = ( 2) 3 + ( 1) 3 + 0 3 + 1 3 = 8. Note 15: Summation over a Set Summation notation can also be used when the index of summation ranges over any finite subset of integers, as can be seen in the example below. Example 21: Summation over a Set (Rosen Example 1.14) (1) We compute j 10 j {n 2 n Z} 1 j + 1 = j {0,...,10} {n 2 n Z} = = 9 5 j {0,1,4,9} 1 j + 1 1 j + 1 = 1 1 + 1 2 + 1 5 + 1 10 Proposition 2: Properties of Summation Notation We list some properties of the summation notation. (a) n j=m ca j = c n j=m a j, (b) n j=m (a j + b j ) = n j=m a j + n j=m b j, (c) n q i=m j=p a ib j = ( ( n i=m a q ) i) j=p b j = q n j=p i=m a ib j. Proof. (a) Let a m, a m+1,..., a n and c be real numbers. We compute n j=m ca j (1) = ca m + ca m+1 +... + ca n (2) = c(a m + a m+1 +... + a n ) (3) = c n a j. Here (1) and (3) follow from the definition of the summation symbol, and (2) follows from factoring c out of the sum. (b) Homework. (c) Homework. Exercise 18: Properties of the Summation Notation (a) Prove part (b) of Proposition 2. (b) Prove part (c) of Proposition 2. j=m

MAT115A-21 COMPLETE LECTURE NOTES 21 Proposition 3: Summing a Finite Geometric Series (Rosen Example 1.15) Suppose a, ar, ar 2,..., ar k,... is a geometric sequence in R. Then we have the following formula for the sum of the first n + 1 terms of this sequence. If r 1, then n j=0 arj = a(rn+1 1) r 1. If r = 1, then n j=0 arj = (n + 1)a. Proof. Suppose that r 1 and let S = n j=0 arj. We compute rs = r (1) = n ar j j=0 n j=0 n+1 (2) = (3) = ar j+1 ar k k=1 n ar k + (ar n+1 a) k=0 (4) = S + (ar n+1 a). Here (1) follows from Proposition 2, (2) follows from letting k = j + 1, (3) follows from adding and subtracting a, and removing ar n+1 from the summation, and (4) follows from our definition of S. Therefore, we have rs = S + (ar n+1 a) = rs S = (ar n+1 a) = S(r 1) = a(r n+1 1) (1) = S = a(rn+1 1) r 1 where (1) follows because we have assumed that r 1, and therefore r 1 0. If r = 1, we compute, n ar j = j=0 n a(1) j = j=0 n j=0 a = a + a +... + a = (n + 1)a. }{{} n+1 Example 22: Summing a Finite Geometric Series (Rosen Example 1.16) Let a = 3, r = 5, and n = 6. Then from Proposition 3, it follows that 6 j=0 3( 5) j = 3(( 5)7 1) 5 1 = 39, 063.

MAT115A-21 COMPLETE LECTURE NOTES 22 Example 23: Summing Powers of Two (Rosen Example 1.17) We let a = 1 and r = 2, and compute the following formula for the sum of the first n + 1 powers of 2. n k=0 2 k = 1 (2n+1 1) 2 1 = 2 n+1 1. Definition 25: Telescoping Sum Given a sequence of real numbers a 0, a 1, a 2,... a n, a telescoping sum is a sum of the form n (a j a j 1 ). j=1 Proposition 4: Evaluating a Telescoping Sum If a 0, a 1, a 2,... a n is a sequence of real numbers, then we have the following identity for the associated telescoping sum. n (a j a j 1 ) = a n a 0. j=1 Proof. We compute n (a j a j 1 ) = (a 1 a 0 ) + (a 2 a 1 ) + (a 3 a 2 ) +... + (a n a n 1 ) j=1 (1) = a n a 0, where (1) follows because for all 1 j n 1 we have both a j and a j in the sum, which cancel. Definition 26: Triangle Numbers (Rosen Example 1.18) The triangle numbers are the sequence of integers t 1, t 2,... defined by n t n = k. k=1 They are named because they t n is the number of dots in the triangular array of n rows with k dots in the kth row. Proposition 5: A Formula for the Triangle Numbers (Rosen Example 1.19) If t n = n k=1 k denotes the nth triangle number, then n(n + 1) t n =. 2 Proof. To begin, we compute the following identity for an integer k. (k + 1) 2 = k 2 + 2k + 1 = k = (k + 1)2 k 2 2 1 2.

MAT115A-21 COMPLETE LECTURE NOTES 23 Now we compute t n = (1) = n k k=1 n ( (k + 1) 2 k 2 1 ) 2 2 n n ((k + 1) 2 k 2 ) k=1 (2) = 1 2 (3) = k=1 (n + 1)2 2 Here (1) follows from substituting k = (k+1)2 k 2 follows because n k=1 1 2 n 2 = (n + 1)2 n 1 2 = n2 + 2n + 1 n 1 2 = n2 + n 2 n(n + 1) =. 2 2 1 2, (2) follows from Proposition 2 parts (a) and (b), and (3) (k+1) 2 k 2 2 is a telescoping sum,.............................................................................................................. k=1 1 2 Definition 27: The Product Symbol 11. Products Given two integers m n, and a finite list a m, a m+1,..., a n of real numbers we define n a k = a m a m+1... a n. k=m The letter k is called the multiplication index. Example 24: Product (Rosen Example 1.20) We compute several examples using the product symbol. (a) 5 j=1 j = 1 2 3 4 5 = 120. (b) 5 j=1 2 = 2 2 2 2 2 = 25 = 32. (c) 5 j=1 2j = 2 2 2 2 3 2 4 2 5 = 2 5 k=1 k = 2 15. (d) 1 j= 3 j = ( 3) ( 2) ( 1) = 6. Definition 28: Factorial We define the factorial function as follows: Z 0 Z n n! = { 1 if n = 0 n j=1 j if n > 0

MAT115A-21 COMPLETE LECTURE NOTES 24 Example 25: Factorial (Rosen Example 1.21) We give several examples of the factorial function. (a) 1! = 1. (b) 4! = 1 2 3 4. (c) 12! = 1 2 3 4 5 6 7 8 9 10 11 12 = 479, 001, 600............................................................................................................... 12. Induction Theorem 5: The Principle of (Mathematical) Induction (Rosen Theorem 1.5) Suppose that a subset S of N has the following two properties (I1) S contains 1, (I2) If k S, then k + 1 S. Then S = N. Proof. Let S N satisfy the two conditions (I1) and (I2), but suppose, for contradiction, that S N. Then T = N S is nonempty. By the Well Ordering Principle (Theorem 2), T has a least element, i.e. an element t T such that t n for all n T. Since 1 S by hypothesis, t > 1. Therefore t 1 is in N and cannot be in T since it is less than the least element of T. Therefore t 1 S. However by the second hypothesis, since t 1 S, it must be that t = (t 1) + 1 S as well, which contradicts that t T = N S.

MAT115A-21 COMPLETE LECTURE NOTES 25 Example 26: Summing Consecutive Odd Integers (Rosen Example 1.22) From the computation 1 = 1, 1 + 3 = 4, 1 + 3 + 5 = 9, 1 + 3 + 5 + 7 = 16, 1 + 3 + 5 + 7 + 9 = 25, 1 + 3 + 5 + 7 + 9 + 11 = 36, one might conjecture that summing consecutive odd integers gives a square, or more precisely, that n (2j 1) = 1 + 3 + 5 + 7 +... + (2n 1) = n 2 j=1 for every positive integer n. We will prove this formula using induction. Let S be the set of all positive integers n for which the formula above holds. (Basis Step). First we show that (I1) holds for S. We compute 1 (2j 1) = 2 1 = 1 = 1 2. j=1 So indeed the formula holds for 1, and 1 S. (Inductive Step). Now we show that (I2) holds for S. Suppose that n S. Then by definition the formula holds for n, and so we have that n (2j 1) = n 2. j=1 Now we check that the formula holds for n + 1. We compute n+1 (2j 1) = 1 + 3 + 5 +... + (2n 1) + (2(n + 1) 1) j=1 = n (2j 1) + (2(n + 1) 1) j=1 (1) = n 2 + (2(n + 1) 1) = n 2 + 2n + 1 = (n + 1) 2. Here (1) follows because the formula holds for n. Therefore the formula holds for n+1, and hence n + 1 S, so (I2) is also satisfied. Because both (I1) and (I2) are satisfied (i.e. both the basis step and the inductive step hold), it follows from the Principle of Induction Theorem 5 that S = N. In other words, the formula holds for all positive integers.

MAT115A-21 COMPLETE LECTURE NOTES 26 Example 27: Factorial Growth (Rosen Example 1.23) We use induction to show that n! n n for all positive integers. Let S be the set of all positive integers for which the formula holds. (Basis Step). We compute 1! = 1 1 = 1 1. Therefore the formula holds for 1, so 1 S, and (I1) holds. (Inductive Step). Suppose that the formula holds for n. We compute (n + 1)! = n!(n + 1) (1) n n (n + 1) (2) (n + 1) n (n + 1) = (n + 1) ( n + 1). Here (1) holds because the formula holds for n, and (2) holds because n n + 1, and therefore n n (n + 1) n. Hence the formula holds for n + 1, so n + 1 S, and (I2) holds as well. By the Principle of Induction Theorem 5 that S = N, so the formula holds for all positive integers n. Theorem 6: The Principle of Strong (Mathematical) Induction (Rosen Theorem 1.6) Suppose that a subset S of N has the following two properties (SI1) S contains 1, (SI2) If 1, 2,..., k S, then k + 1 S. Then S = N. Proof. Let S N satisfy the two conditions (SI1) and (SI2).Define T = {n N 1 k n, k S}. Then because 1 S, it follows that 1 T, and hence that T satisfies (I1). Furthermore, if k T, then by definition 1, 2,..., k S, hence by (SI2), k +1 S as well. Therefore 1, 2,..., k, k +1 S, so k +1 T. Therefore T satisfies (SI2) as well. By the Principle of Induction Theorem 5, it follows that T = N. Therefore given any n N, n T, which means that for all 1 k n, k S. In particular n S. Since n was arbitrary, it follows that S = N, as desired.

MAT115A-21 COMPLETE LECTURE NOTES 27 Example 28: Postage (Rosen Example 1.24) We claim that any amount of postage more than 1 cent can be formed using just 2-cent and 3-cent stamps. Another way to formulate this claim is that for every positive integer n > 1, there exist a N (the number of 2-cent stamps) and b N (the number of 3-cent stamps) such that n = 2a + 3b. Let S be the set of all integers n 1 such that the formula holds for n > 1. (Basis Step). Taking a = 1 and b = 0, we find that 2 = 2a + 3b, and therefore 1 = 2 1 S. Hence (SI1) is holds for S. (Inductive Step). Suppose that 1, 2,..., n S. If n = 2, then taking a = 0 and b 3, we find that 3 = 2a + 3b, and therefore n = 2 = 3 1 S. If n 3, then because 1, 2,..., n S, the formula holds for 2, 3,..., n + 1, and hence in particular the formula holds for n, so there exist a, b N such that n = 2a + 3b = n + 2 = 2(a + 1) + 3b. Hence the formula holds for n + 2, and so n + 1 = (n + 2) 1 S. Therefore S satisfies (SI2) as well. Since S satisfies (SI1) and (SI2), by the Principle of Strong Induction Theorem 6 it follows that S = N. In other words, the formula holds for all positive integers greater than 1............................................................................................................... Theorem 7: The Recursion Theorem 13. Recursive Definitions Let X be a set, a X, and f : X X a function, there exists a unique function G : Z 0 X such that (R1) G(0) = a. (R2) G(n + 1) = f(g(n)) for all n 0. Proof. (Exitence). We define G : Z 0 X { a if n = 0 G(n) = f n (a) if n > 0 Clearly G satisfies (R1). To show that G satisfies (R2), note that if n = 0, then we compute as desired. Then if n > 0, we compute G(0 + 1) = G(1) = f(a) = f(g(0)), G(n + 1) = f n+1 (a) = f(f n (a)) = f(g(n)), again as desired. (Uniqueness). Suppose that both G : Z 0 X and H : Z 0 X satisfy (R1) and (R2). We show that G(n) = H(n) by induction. (Basis Step). If n = 0, then by (R1) we have that G(0) = a and also that H(0) = a. Therefore G(0) = H(0).

MAT115A-21 COMPLETE LECTURE NOTES 28 (Induction Step). Suppose that G(n) = H(n) for some n Z 0. Then we compute G(n + 1) (1) = f(g(n)) (2) = f(h(n)) (3) = H(n + 1), as desired. Here (1) and (3) follow from (R2), and (2) follows from the induction hypothesis. Definition 29: Recursively Defined Function The function G is called a recursively defined function. Example 29: Factorial (Rosen Exmaple 1.25) Let X = Z 0 Z 0, let a = (0, 1), and define f : X X f(x, y) = (x + 1, (x + 1)y). Then by Theorem 7, there exists a unique function G : Z 0 X such that Then we define a function G(0) = a = (0, 1) G(n + 1) = f(g(n)). And finally, we define π 2 : X X X (x, y) y. Then by the proof of Theorem 7, we have that! : Z 0 N n! = (π 2 G)(n) n! = π 2 (G(n)) = π 2 (f n (0, 1)) = π 2 (n, n (n 1) (n 2)... 2 1) = n (n 1) (n 2)... 2 1, as desired. Note 16: Thinking About Recursive Definitions Although we have provided quite a formal definition of a recursively defined function, for the rest of the course we will use our typical, less formal, notion of a recursively defined function and be satisfied that we can always fall back on this definition when needed............................................................................................................... Definition 30: Fibonacci Numbers 14. The Fibonacci Numbers The Fibonacci sequence is defined recursively by f 1 = 1, f 2 = 1, and f n = f n 1 + f n 2 for n 3. The terms of this sequence are called Fibonacci numbers.

MAT115A-21 COMPLETE LECTURE NOTES 29 Example 30: Fibonacci Numbers We compute the first ten terms of the Fibonacci numbers. f 1 = 1 f 2 = 1 f 3 = f 1 + f 2 = 1 + 1 = 2 f 4 = f 3 + f 2 = 2 + 1 = 3 f 5 = f 4 + f 3 = 3 + 2 = 5 f 6 = f 5 + f 4 = 5 + 3 = 8 f 7 = f 6 + f 5 = 8 + 5 = 13 f 8 = f 7 + f 6 = 13 + 8 = 21 f 9 = f 8 + f 7 = 21 + 13 = 34 f 10 = f 9 + f 8 = 34 + 21 = 55. Proposition 6: Sum of the Fibonacci Numbers (Rosen Example 1.27) Let (f k ) be the Fibonacci sequence. Then we have the following formula for all integers n 1. n f k = f n+2 1 k=1 Proof. We provide two proofs. (Telescoping Sum Proof ). For all integers k 1, we compute Plugging this in to the sum in question yields f k+2 = f k+1 + f k = f k = f k+2 f k+1. n f k = k=1 n (f k+2 f k+1 ) k=1 (1) = f n+2 f 2 = f n+2 1. Here (1) follows from Proposition 4 because the sum is telescoping. (Induction Proof ). (Basis Step). When n = 1, we compute 1 f k = f 1 = 1 = 2 1 = f 3 f 1. k=1 (Induction Step). Suppose that the result holds for n, i.e. that Then we compute n f k = f n+2 1. k=1

MAT115A-21 COMPLETE LECTURE NOTES 30 ( n+1 n ) f k = f k + f n+1 k=1 k=1 (1) = (f n+2 1) + f n+1 = (f n+1 + f n+2 ) 1 (2) = f n+3 1, as desired. Here (1) follows from the induction hypothesis, and (2) follows from the definition of the Fibonacci sequence. Proposition 7: Growth of the Fibonacci Sequence (Rosen Example 1.28) Let (f k ) be the Fibonacci sequence, and let α = 1+ 5 2. For n 3, we have that f n > α n 2. Proof. We ll use strong induction. (Basis Step). We do the cases n = 3 and n = 4. (n = 3). Note that 4 < 5 < 9, and hence 2 < 5 < 3. Therefore we have that f 3 = 2 > 1 + 5 2 = α, as desired. (n = 4). One can check that α 2 = 3+ 5 2. Since 2 < 5 < 3, we have that f 4 = 3 > 3 + 5 2 = α 2, as desired. (Induction Step). The case of n = 4 was already done in the basis step. Now suppose that n 5. One can check that α is a root of the polynomial x 2 x 1, i.e. α 2 α 1 = 0, so we have that Therefore we compute α 2 = α + 1. α n 1 = α 2 α n 3 = (α + 1) α n 3 = α n 2 + α n 3 (1) < f n + f n 1 (2) = f n+1, as desired. Here (1) follows from the inductive hypothesis applied to f n and f n 1, which is satisfied for n 5 and n 1 4, and (2) follows from the definition of the Fibonacci sequence.

MAT115A-21 COMPLETE LECTURE NOTES 31 Theorem 8: Fibonacci Numbers and the Golden Ratio (Rosen Theorem 1.7) Let α = 1+ 5 2 and β = 1 5 2. For n a positive integer, the nth Fibonacci number is given by f n = 1 5 (α n β n ). Proof. Homework............................................................................................................... Definition 31: Divisibility 15. Divisibility Let a, b be integers with a 0. We say that a divides b, and write a b, if there is an integer c such that ac = b. If a divides b we say that a is a divisor or factor of b, and that b is a multiple of a. If a does not divide b, we write a b. Example 31: Divisibility (Rosen Example 1.29 We illustrate the concept of divisibility with the following computations. (1) 12 182, (2) 5 30, (3) 17 289, (4) 6 44, (5) 7 50, (6) 3 33, (7) 17 0. Example 32: Divisors (Rosen Example 1.30) We illustrate the concept of divisors with the following computations. (1) The divisors of 6 are ±1, ±2, ±3, ±6. (2) The divisors of 17 are ±1 and ±17. (3) The divisors of 100 are ±1, ±2, ±4, ±5, ±10, ±20, ±25, ±50, ±100. Theorem 9: Transitivity of Divisibility (Rosen Theorem 1.8) If a, b, c are integers and a b, b c, then a c. Proof. Since a b, there exists some integer e such that ae = b. Similarly since b c, there exists some integer f such that bf = c. Putting these two equations together, we obtain the following equation. a(ef) = c. Therefore there is some integer, namely ef, such that a(ef) = c, so by definition a c. Example 33: Transitivity of Divisibility (Rosen Example 1.31) Since 11 66 and 66 198, it follows from Theorem 9 that 11 198. Indeed 11 18 = 198.

MAT115A-21 COMPLETE LECTURE NOTES 32 Theorem 10: Divisibility of Integer Combinations (Rosen Theorem 1.9) Suppose that a, b, m, n are integers. If c a and c b, then c (ma + nb). Proof. Since c a, there exists some integer e such that ce = a. Similarly since c b, there exists some integer f such that cf = b. Plugging in these equations to the expression ma + nb, we obtain ma + nb = m(ce) + n(cf) = c(me + nf). Hence there is some integer, namely me + nf, such that c(me + nf) = ma + nb. Therefore c (ma + nb). Example 34: Divisibility of Integer Combinations (Rosen Example 1.32) We have that 3 21 and that 3 33, so by Theorem 10 we have that 3 6, since 5 21 3 33 = 105 99 = 6. Theorem 11: The Division Algorithm (Rosen Theorem 1.10) If a and b are integers with b > 0 (called the dividend and the divisor, respectively), then there exist unique integers q and r (called the quotient and remainder, respectively) such that a = bq + r and 0 r < b. Proof. Let a and b be integers with b > 0. (Existence). Define T = {a bk k Z and a bk 0}. If we consider the rational number a/b, there always exists an integer l Z such that l < a/b. In this case, we have l < a/b = bl < a = 0 < a bl. Therefore a bl T, so T is nonempty. By Theorem 2, it follows that T has a least element which we will denote by r = a bq T. These integers q and r will be our quotient and remainder, respectively, but we need to show that the desired properties hold. Since T only consists of nonnegative integers, it follows by construction that r 0. Now suppose, for contradiction, that r b. Then we compute r b = a bq b = a b(q + 1) 0. But this means that a b(q + 1) T, and since b > 0, we have that a b(q + 1) = r b < r, which contradicts that r is the least element of T. Therefore we have that 0 r < b. Then we have r = a bq = a = r + bq Therefore the integers q and r satisfy the desired conditions for the quotient and remainder.

MAT115A-21 COMPLETE LECTURE NOTES 33 (Uniqueness). Suppose we have two pairs of integers r 1, q 1 and r 2, q 2 such that 0 r 1, r 2 < b and a = q 1 b + r 1 a = q 2 b + r 2. Subtracting the second equation from the first yields 0 = (q 1 q 2 )b + (r 1 r 2 ) = r 2 r 1 = b(q 1 q 2 ). However we have that 0 r 1, r 2 < b, and hence that 0 r 2 < b b < r 1 0 = b < r 2 r 1 < b. Putting the equation and the inequalities together yields b < b(q 1 q 2 ) < b = 1 < q 1 q 2 < 1. Since q 1, q 2 Z and the only integer strictly between 1 and 1 is 0, we have that q 1 q 2 = 0 = q 1 = q 2. Plugging this back into the equation above, we obtain r 2 r 1 = b(q 1 q 2 ) = r 2 r 1 = 0 = r 1 = r 2. Therefore we have that r 1 = r 2 and q 1 = q 2, so indeed the quotient and remainder are unique. Corollary 1: Division with Remainder for all Divisors If a and b are integers with b 0 (the dividend and the divisor), then there exist unique integers q and r (the quotient and remainder) such that a = bq + r and 0 r < b. Proof. (Case 1 ). If b > 0, then we simply apply the division algorithm (Theorem 11) as stated. (Case 2 ). If b < 0, then we apply the division algorithm (Theorem 11) to b to obtain unique integers q and r such that a = q( b) + r and 0 r < b = b. Then moving the negative sign to q, we obtain unique integers q and r such that a = ( q)b + r and 0 r < b, as desired. Note 17: Nomenclature Sometimes the division algorithm is also known as division with remainder.