Discrete Mathematics W. Ethan Duckworth Fall 2017, Loyola University Maryland
Contents 1 Introduction 4 1.1 Statements......................................... 4 1.2 Constructing Direct Proofs................................ 6 2 Logical Reasoning 7 2.1 Logical Combinations................................... 7 2.2 Boolean Algebra...................................... 8 2.3 Introduction to Sets.................................... 9 2.4 Quantifiers......................................... 10 3 Constructing and Writing Proofs in Mathematics 11 3.1 Divides and more direct proofs.............................. 11 3.2 More methods of proof................................... 11 3.3 Proof by Contradiction................................... 11 4 Induction 12 4.1 Ordinary Induction..................................... 12 4.2 Variations on proof by induction............................. 12 5 Properties of Sets 13 5.1 Operations......................................... 13 5.2 Algebraic properties of set operations........................... 14 6 Functions 15 6.1 Basic Definitions...................................... 15 6.2 Injections, Surjections, Bijections............................. 17 7 Relations 19 7.1 Relations.......................................... 19 7.2 Partial Orders and Equivalence Relations........................ 19 8 Cardinality 21 8.1 Basic properties and Countable Sets........................... 21 8.2 Unions............................................ 21 8.3 Rational Numbers..................................... 21 2
CONTENTS 3 8.4 Uncountable Infinities................................... 21
Chapter 1 Fundamentals, aka the language of mathematics 1.1 Statements, Exploring and Establishing Truth, Conditional Statements, Number Systems and Closure 1.1.1 Statements 1.1.2 Exploring and Establishing Truth 1.1.3 Conditional Statements Definition 1.1.1. The statement If P, then Q. is a conditional statement. We assume that P and Q are statements as well. Definition 1.1.2. If P and Q are mathematical statements, then the new statement If P, then Q has truth value defined by the following: P Q If P, then Q T T T T F F F T T F F T We call P the hypothesis and Q the conclusion As shown here, when P is false, we have that if P, then Q is true. We call this the vacuous case, or say that if P, then Q is vacuously true. This terminology is meant to suggest that there is no interesting property in this case, or content, or need to prove anything. Definition 1.1.3. The following are synonyms for If P, then Q : P = Q, 4
CHAPTER 1. INTRODUCTION 5 P implies Q, P is sufficient for Q, Q is necessary for P, P only if Q, Q if P, If P, Q. 1.1.4 Number Systems: Defining Properties Definition 1.1.4. We assume that the reader knows what the rational numbers are: for each pair of integers, a, and b, when b 0, we define a rational number a. For each integer n we define b n = n and in this way view every integer as also being a rational number. 1 We abbreviate the set of all rational numbers with the symbol Q. Definition 1.1.5. The set of irrational numbers is the set of those real numbers that are not rational. Definition 1.1.6. The set of real numbers R has operations + (addition) and (multiplication) defined on it, as well as relations = (equals) and < (less than) defined on it, as well as elements 0 and 1 such that the following hold: 1. Trichotomy: For all real numbers a and b either a < b or a = b or b > a holds, and not more than one of these relations holds. 2. Transitivity: For all real numbers a, b and c 3. Identities: For all real numbers a, we have and if a < b and b < c then a < c 0 + a = a (additive identity property) 1 a = a (multiplicative identity property). 4. Inverses: For each real number a there exists a number a such that a + ( a) = 0 (additive inverse property) and, if a 0, then there exists a number 1 a such that a 1 a = 1 (multiplicative inverse property). 5. Commutative, Associative, Distributive Laws: For all real numbers a, b and c we have (a) a + b = b + a (additive commutative property) (b) a b = b a (multiplicative commutative property) (c) a + (b + c) = (a + b) + c (additive associative property)
CHAPTER 1. INTRODUCTION 6 (d) a (b c) = (a b) c (multiplicative associative property) (e) a (b + c) = a b + a c (distributive property) 6. Ordered Field: For all real numbers a, b, c (a) if a = b then a + c = b + c and a c = b c (b) if a < b then a + c < b + c (c) if a < b and c > 0 then a c < b c 7. Rationals are Dense: For every real number a and every real number ε > 0, there exists a rational number q such that a q < ε. We abbreviate some of the above notation: a b means a < b or a = b a > b means b < a ab and a b both mean a b a b means a + ( b) a 1 means 1 a a b means ab 1 Definition 1.1.7. Let X is any of the number systems we described above (natural numbers, integers, rational numbers, real numbers, irrational numbers). Let be any of the standard four arithmetic operations defined above (+,,, ). If the following is true: for all a, b X we have a b X; then we say that X is closed under. If we apply this definition to the case where =, then we add the extra detail that b 0, so then the definition reads for all a, b X with b 0, we have a b X. 1.1.5 Number Systems: Basic Propositions Definition 1.1.8. Let n be an integer. We say that n is even if there exists an integer k such that n = 2k. We say that n is odd if there exists an integer k such that n = 2k + 1. 1.2 Constructing Direct Proofs Naming things 1.2.1 A lengthy example
Chapter 2 Logical Reasoning 2.1 Logical Combinations And, Or, Not Definition 2.1.1. If P and Q are mathematical statements, then new statement P and Q has truth value defined by the following: There s a symbolic way of writing and, We call and or conjunction P Q P and Q T T T T F F F T F F F F P Q means P and Q Definition 2.1.2. If P is a mathematical statement, then the new statement not P is defined by the following: P not P T F F T There s a symbolic way of writing not, P means not P Finally, not and are both also called negation. Definition 2.1.3. If P and Q are mathematical statements, then the new statement P or Q has 7
CHAPTER 2. LOGICAL REASONING 8 truth value defined by the following There s a symbolic way of writing or, We call or or disjunction Exclusive Or and Truth Tables If and only if P Q P or Q T T T T F T F T T F F F P Q means P or Q Definition 2.1.4. If P and Q are mathematical statements, then the new statement P if and only if Q means both of the following: if P, then Q and if Q, then P. One way to think about P if and only if Q is that for this to be true, P and Q need to have the same truth value. Definition 2.1.5. The following are synonyms for P if and only if Q : 1. P Q 2. P iff Q 3. P is necessary and sufficient for Q 4. P is equivalent to Q 5. P is true exactly when Q is true. 2.2 Boolean Algebra Definition 2.2.1. Two expressions in Boolean algebra are logically equivalent if they have the same truth value for all possible combinations of truth values of these variables. If X and Y are two logically equivalent statements then we can write this symbolically as (X Y ) = T. We typically will abbreviate this as X Y. Converse and Contrapositive Definition 2.2.2. Let P and Q be any statements, and form P = Q. The converse of P = Q is Q = P. The contrapositive of P = Q is Q = P. Definition 2.2.3. Let P and Q be two logical statements. The contrapositive of the statement if P, then Q is the statement if (not Q), then (not P ).
CHAPTER 2. LOGICAL REASONING 9 If and only If Theorems 2.3 Introduction to Sets 2.3.1 Open Sentences Definition 2.3.1. An open sentence is a sentence that involves variables x, y, z,... such that when values are assigned to those variables the result is a mathematical statement. Notation: P (x, y, z,... ). Synonyms: such a sentence is also called a predicate sentence or propositional function. 2.3.2 Sets The infinite, like no other problem, has always deeply moved the soul of men. The infinite, like no other idea, has had a stimulating and fertile influence upon the mind. But the infinite is also more than any other concept, in need of clarification. (Hilbert, Über das Unendliche) Definition 2.3.2 (Roster notation). Roster notation is when we list the elements of a set as explicitly as possible, sometimes relying upon a pattern for any that are not explicit. Definition 2.3.3 (Set-builder notation). Set-builder notation has the form {variable open sentence on the variable} to describe the set of all objects that satisfy the given condition. One condition is so common that we sometimes include it on the left hand side, namely what set the variable can be in. In this case, the notation looks like this {variable set condition on the variable} In all cases there needs to be an implicit or explicit statement about what the set is that the variable ranges over. It is called the universal set for that variable. If we make the notation a little more symbolic, it looks like this {x A P (x)} where A is some universal set, and P (x) is an open sentence defined on the variable x. (Note: half the books out there use : instead of for the divider in the middle between the variable and the open sentence. It doesn t matter which one you use, just be aware that you may see it both ways.) Definition 2.3.4. We say that two sets are equal if they have exactly the same elements. In other words, if A and B are two sets, then A = B means x A x B. We say that A is a subset of B if every element of A is also an element of B. In other words, The notation for A is a subset of B is A subset B means if x A then x B A B.
CHAPTER 2. LOGICAL REASONING 10 2.4 Quantifiers The notion of existence is one of the primitive concepts with which we must begin as given. It is the clearest concept we have. Gödel (quoted by Wang) Definition 2.4.1. The symbol stands for the phrase there is or there exists. We use it in making logical statements as follows x A, assertions about x. A logical statement of this form is called an existential statement. The following are synonyms: x A, statement P, At least one value of x A makes P true, P is true for some x A, There exists x A such that P is true. Definition 2.4.2. The symbol stands for the phrase for all or for every. making a logical statement as follows We use it in x A, assertions about x. A logical statement of this form is called an universal statement. The following are synonyms: x A, statement P, every value of x A makes P true, P holds for all x A without exception, for all x A, property P is true, if x X, then P is true. Logical statements that have two quantifiers of different types are more interesting, and take more work to understand. x, y means that first we consider any x, and second we consider the existence of a y, which might depend upon what x is. In other words, if we start with a different x, then y might also change. x, y means that first we fix a single x, which might have special restrictions, and then see if that x will work for all possible values of y. Here, x cannot depend upon y, nor can y depend upon x. Definition 2.4.3. The notation means!x A, statement about x x A, statement about x and x is the only element in A with this property. In other words,!x means there exists a unique x.
Chapter 3 Constructing and Writing Proofs in Mathematics 3.1 Divides and more direct proofs Definition 3.1.1. Let a and b be integers. If a = bc for some integer c, then we say that b divides a. As synonyms we have: a is divisible by b, or a is a multiple of b, or b is a factor of a, or b is a divisor of a. The symbol for this is b a. 3.2 More methods of proof 3.3 Proof by Contradiction 11
Chapter 4 Induction 4.1 Ordinary Induction 4.2 Variations on proof by induction Cauchy Induction 12
Chapter 5 Properties of Sets 5.1 Operations Definition 5.1.1. Let A and B be any sets. The union of A and B is the set of all elements that are in A or B or both. We write the union as A B. In other words, A B = {x x A or x B}. The intersection of A and B is the set of all elements that are in both A and B. We write the intersection as A B. In other words, A B = {x x A and x B}. Definition 5.1.2. Let A and B be any sets. The relative complement or set difference is A B = {x A x B} Suppose both A and B are subsets of some fixed, universal set U. If A U then we call U A the complement of A. We use the notation A c for the complement: 5.1.1 The Power Set A c = U A. Definition 5.1.3. For any set A, the power set of A is the collection (or set) of all subsets of A. The notation for the power set is P(A). Definition 5.1.4. If A is a finite set, the cardinality of A, written as card(a) is the number of elements that A has. 13
CHAPTER 5. PROPERTIES OF SETS 14 5.2 Algebraic properties of set operations 5.2.1 Cartesian Products Definition 5.2.1 (Cartesian Product). Let A and B be any sets. The Cartesian Product of A and B is a set denoted by A B defined as shown A B = {(a, b) a A and b B} where (a, b) is defined as follows. The element (a, b) is an ordered list: it contains two elements, and the order they appear in does matter. In particular, by definition, (a, b) = (c, d) the sets {a, b} and {c, d} are equal, and the order the elements occur in is the same a = c and b = d. We call (a, b) an ordered pair and we call a and b the first coordinate and second coordinate respectively. In other words, A B is the set of all ordered pairs where the first entry comes from A and the second entry comes from B. Theorems about Set Operations Creating the numbers from sets
Chapter 6 Functions 6.1 Basic Definitions Definition 6.1.1. Let sets A and B be given. We say that f is a function, from A to B, if for all x A there exists a unique element y B that we write as y = f(x). Definition 6.1.2. The following are synonyms for saying f is a function from A to B: 1. f is a mapping from A to B. 2. f : A B 3. A f B Some of these notations can be extended to describe also the x and y: f : A B x y or f : A B x f(x) f or x y Definition 6.1.3. If f : A B we call A the domain of f and B the codomain. We abbreviate the domain of f as dom(f) and the codomain as codom(f). Definition 6.1.4. Two functions f and g are equal if 1. dom f = dom g, 2. codom f = codom g, 3. for all x dom f we have f(x) = g(x). Definition 6.1.5 (Range, Image, and Preimage). Let f : A B be a function. 1. Given x A if we let y = f(x), then we call y the image of x under f. We call x a preimage of y under f. 2. We define the range of f as the following set range f = {y B y = f(x) for some x A} = {f(x) x A}. Note that range f B. Also note that the two definitions of range are equivalent. Finally, an alternative name for the range of f is the image of f, written as im(f). We defined image above for a single element, but here we are talking about the image of A under f. 15
CHAPTER 6. FUNCTIONS 16 Definition 6.1.6. The following are synonyms: y is the image of x under f f takes x to y y is the image of x via f y is the image of x when we apply f Definition 6.1.7. Let f be a function defined for some elements of a subset of A. The implied domain of f is the set dom f = {x A f(x) is defined}. 6.1.1 Picturing functions Definition 6.1.8 (Applying functions to sets). Let f : A B be a function. Let U A. We define the set f(u) as follows f(u) = {y B y = f(x) for some x U} = {f(x) x U}. Note that this is exactly the definition we used to define range. In other words, range f = f(a). We call f(u) the image of U under f.
CHAPTER 6. FUNCTIONS 17 6.2 Injections, Surjections, Bijections 6.2.1 Quantifiers and Functions Worksheets Definition 6.2.1 (Surjective, Injective, Bijective). Let f : X Y and let R = range f. 1. We say that f is injective if it satisfies the following y R,!x X, f(x) = y. The key part of the definition here is unique 2. We say that f is surjective if it satisfies the following: y Y, x X, f(x) = y. 3. We say that f is bijective if it satisfies the following: y Y,!x X, f(x) = y. Definition 6.2.2. Synonyms for injective: if x 1 x 2, then f(x 1 ) f(x 2 ) if f(x 1 ) = f(x 2 ) then x 1 = x 2 f is one-to-one. f is 1:1. f : X Y The graph of f passes the horizontal line test: every horizontal line intersects the graph of f at most once. (This only makes sense for functions defined on real numbers.) Synonyms for surjective: R = Y, i.e. range f = codom f. f(x) = Y, i.e. the image of X under f equals Y f is onto f : X Y Synonyms for bijective: f is injective and surjective f is one-to-one and onto f satisfies a strong horizontal line test: every horizontal line in Y intersects the graph of f exactly once. f : X Y or f : X = Y or f : X Y. 6.2.2 Inverse functions and actions on sets Definition 6.2.3. Let f : X Y be a function. For any set B Y we define a set, f 1 (B), as follows f 1 (B) = {x X f(x) B Definition 6.2.4. Let f : X Y be bijective. We define a function f 1 : Y X as follows: Let y Y, then there exists a unique x X such that f(x) = y; we define f 1 (y) = x.
CHAPTER 6. FUNCTIONS 18 Definition 6.2.5. Let f : A B and g : B C. Then we define the function g f : A C as follows g f : A C x g(f(x)) where f is applied first to take x to f(x), and then g is applied to f(x) to get g(f(x)).
Chapter 7 Relations 7.1 Relations Definition 7.1.1. Let A and B be any sets. A relation between A to B is a subset of A B. In other words, R is a set of ordered pairs with first element in A and second element in B. If A = B then we say R is a relation on A. Given (a, b) R we write arb. Definition 7.1.2. Let R be a relation on the set A. (a) R is reflexive if for all a A we have ara. (b) R is irreflexive or antireflexive if for all a A we have a Ra. (c) R is symmetric if for all a, b A we have arb bra. (d) R is antisymmetric if for all a, b A we have (arb bra) = a = b. (e) R is transitive if for all a, b, c A we have (arb brc) = arc. Note that parts (d) and (e) are both if then statements. In each case the property does not assume or assert that the hypothesis of the if then necessarily holds. In other words, property (d) says IF arb and bra, then a = b. Of course for most elements a, b we won t have arb and bra, and so for those elements we ll have the antisymmetric property is vacuously true. 7.2 Partial Orders and Equivalence Relations Definition 7.2.1. A partial order is a relation that is reflexive, antisymmetric, and transitive. A total order is a partial order R such that for all a, b in the underlying set we have arb or bra. An equivalence relation is a relation that is reflexive, symmetric, and transitive. Definition 7.2.2 (Congruence modulo n). Let n be a positive integer. Define a relation on the set of integers as follows: x y (mod n) n (x y). Definition 7.2.3. The following are synonyms: x y (mod n), x is equivalent to y modulo n, n divides x y, x y = nk for some k Z, 19
CHAPTER 7. RELATIONS 20 x and y differ by a multiple of n, x equals y plus a multiple of n, x and y have the same remainder when divided by n. If n is fixed in a certain context we will often drop the notation mod n and simply write x y.
Chapter 8 Cardinality 8.1 Basic properties and Countable Sets Definition 8.1.1. In the notation of the Theorem, if A B, we say that A and B have the same cardinality. We write card A = card B. Definition 8.1.2. Let A be a set. We say that A is countable if A is finite or card(a) = card(n). If we have to distinguish between the finite case and the infinite case we ll say the latter is countably infinite. 8.2 Unions 8.3 Rational Numbers 8.4 Uncountable Infinities Definition 8.4.1. We say that a set is uncountable if it is not countable. Definition 8.4.2. Let U be any universal collection of sets and A and B sets in U. We define card(a) < card(b) to mean that there exists an injection f : A B but there does not exist a bijection. As usual, the notation card(a) card(b) means card(a) < card(b) or card(a) = card(b). Appendix: Extra Resources 21
Index, 33!, 39, 33 =, 5, 21 Boolean algebra, 23 conclusion, 5 conjunction, 20 continuous, 37 contrapositive, 25, 26 converse, 25 disjunction, 21 divides, 31, 41 properties, 41 divisible, 41 elements, 29 even, 11 Even and Odd, 11 existential statement, 33 factor, 41 open sentence, 29 predicate sentence, 29 primitive terms, 6 propositional function, 29 quantifiers, 34 rational numbers, 6 real numbers, 6 defining properties, 8 Roster notation, 30 set, 29 set equality, 31 Set-builder, 30 theorem, 14 truth set, 30 universal set, 30 universal statement, 33 vacuous, 5 vacuously, 5 hypothesis, 5 if and only if, 22 If then, 5 integers, 6 irrational, 6 members, 29 multiple, 41 natural, 6 odd, 11 22