Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Chapter 1 LOGIC AND PROOF To be able to understand mathematics and mathematical arguments, it is necessary to have a solid understanding of logic and the way in which known facts can be combined to prove new facts. In this chapter we take a careful look at the rules of logic and the way in which mathematical arguments are constructed. 1.1 Logical statements The study of logic is concerned with the truth of falsity of statements. Definition 1 A statement ∗ is a sentence which can be classified as true or false without ambiguity. The truth or falsity of the statement is known as the truth value. For a sentence to be a statement, it is not necessary that we actually know whether it is true or false, but it must be clear that it is one or the other. Example 2 Consider the following sentences: 1. “Every continuous function is differentiable” is a statement with truth value “false”. 2. ”x < 2” is true for some x and false for some others. If we have a particular context in mind, then it could be a statement. Otherwise it is not. 3. ”Every even number greater than 2 is the sum of two primes” is a statement, whose truth value is not known...yet. Exercise 3 Which of these sentences are statements? 1. If x is a real number, then x2 ≥ 0. 2. Seven is a prime number 3. This sentence is false ∗ Some authors also call it proposition. 8 Logic and Proof 1.2 Logical Connectives In studying mathematical logic we shall not be concerned with the truth value of any particular simple statement. What will be important is how the truth value of a compound statement is determined from the truth values of its simpler parts. To obtain such compound statements it is necessary to introduce the concept of a connective Definition 4 A sentential connective is a logic symbol representing an operator that combines statements into a new statement. Statements with connectives are called compound statements. Statements without connectives are known as atomic statements. The sentential connectives are ”not”, ”and”, ”or”, ”if ...then”, and ”if and only if”. The respective operators for these connectives are negation, conjunction, disjunction, implication and equivalence respectively. We shall introduce each of them now • Negation : Let p stand for a given statement. Then ˜p ( read not p ) represents the logical opposite of p. When p is true, then ˜p is false and viceversa. This can be summarized in a “truth table”, which gives the mapping from the truth value of the individual statements to the truth value of the resulting compound statement. Some authors also use for the negation connective. In this case p T F where T stands for true and p F . T ˜ F for false. Note that the truth table of a connective is an alternative way of defining a connective, since these are defined in terms of the truth value of the resulting compound statement, given the truth value of its components. • Conjunction: q) If p and q is true only when both are statements, then the statement p and p T T F F q p∧q are true, and is false otherwise. q T F T F p∧q T F . F F ( read p and Logical Connectives 9 For example, given p : ”2 > 0” and q : ”0 > 2” then the compound statement p ∧ q : ”2 > 0 and 0 > 2” is false. • (Inclusive)Disjunction ( read p or q ) : If p and q are statements, then the statement p ∨ q is true when at least one of the two statements is true, and is false when both are false. p T T F F p∨q T T . T F q T F T F Note that the inclusive disjunction doesn’t complete the list of disjunctions used in everyday life. when either p the connective q : ”0 > 2” • q or or In fact, we also have the exclusive disjunction, which is true is true, but not when both are true. is for the inclusive meaning. then the compound statement Implication p : ”2 >0 or 0 > 2” p : ”2 > 0” and is true. : A statement of the form If is called an p∨q In logic the only use for For example, given implication or a p, then q conditional statement. is called the antecedent and the then-statement q The if-statement is called the consequent. The convention adopted for the truth value of the implication is that it will be called false only when the antecedent is true and the consequent is false. If we denote the implication ”if p, then q” by p ⇒ q, p T T F F we obtain the following truth table q T F T F p⇒q T F . T T The last row of the table may seem counterintuitive. However, the usage of ’if ... then” as a connective or as a mathematical language is quite different from that of daily language. The reason for giving truth value T ⇒ − to the last case may be not understandable in the following mathematical expression: “3 + 1 = 7 6 1 = 2” Logic and Proof 10 − − Nevertheless, we can easily prove the implication is indeed true: 3 + 1 so 1 = 4. But then 6 p ⇒ q. 1 = 6 4 = 2. − 3 = 7 − 3 = 4 In English there are several ways to express the same mathematical condition These are p, then q ” p implies q ” ” p only if q ” ”q if p” q ”if ” ” ” p” p” provided that ” q whenever q is a necessary condition for p” p is a sufficient condition for q” ” • Equivalence: The statement ”p if and only if q” is defined as the conjunction of the two implications p ⇒ q and q ⇒ p. A statement of this form is called an equivalence and is denoted by p ⇔ q. In written form, the abbreviation ”iff” is used instead of ”if and only if”. The truth table for equivalence can be obtained by computing the truth table for the compund statement (p ⇒ q) ∧ (q ⇒ p) p T T F F q T F T F p ⇒ q q ⇒ p p ⇐⇒ q T F T T T T F T T F F T Thus we see that p ⇔ q is true precisely when p and q have the same truth values. Since p ⇔ q is equivalent to (p ⇒ q) ∧ (q ⇒ p) we can use the terminology seen above for the implication connective and say ”q if p” and ”q only if p” ”p is a sufficient condition for q” and ”p is a necessary condition for q” Two compound statements p and q are said to be logically equivalent if one is true if and only if the other is true. In other words, two compound propositions are logically equivalent whenever they display the same truth table. In this case we write p ≡ q. Example 5 (˜(˜p)) is logically equivalent to p p T F ˜p F T ˜ (˜p) T F Logical Connectives Example 6 11 ˜(p ∧ q) p T T F F q T F T F Exercise 7 (Implication) [(˜p) ∨ q] . connector. to [(˜p) ∨ (˜q)] ˜(p ∧ q) ˜p ˜q [(˜p) ∨ (˜q)] is logically equivalent to F T T T F F T T F T F T F T T T Show that the implication symbol is not a ”primitive” In other words, show that the implication p ⇒ q is logically equivalent This is actually another convenient way to interpret the implication connector. When two compound statements p and q are logically equivalent, their equiv- alence is a new statement with a truth value ”true” in all cases. Such a statement is known as a tautology, being its definition Definition 8 A compound proposition is said to be a tautology if it is always true regardless of the truth value of the simple propositions from which it is constructed. It is a contradiction if it is always false. Hence a contradiction and a tautology are a negation of each other. Example 9 p ∨ (˜p) is a tautology, while p ∧ (˜p) is a contradiction. p T F (˜p) p ∨ (˜p) p ∧ (˜p) F T T T F F Example 10 [p ∧ (p =⇒ q)] =⇒ q is a tautology p T T F F q T F T F p⇒q T F T T p ∧ (p ⇒ q) T F F F [p ∧ (p ⇒ q )] ⇒ q T T T T Lets now prove the equivalence of a compound statement that will be useful when studying methods of proof Example 11 (Contrapositive) p T T F F q T F T F p ⇒q T F T T p F F T T ˜ q F T F T ˜ p ⇒q q (˜ ) q is logically equivalent to [(˜ ) ⇒ T F T T p (˜ ) p ( ⇒q ⇔ ) q [(˜ ) T T T T ⇒ ⇒ p p (˜ )] (˜ )] Logic and Proof 12 Exercise 12 (De Morgan’s Law) Prove that ˜(p∨q) is logically equivalent to [(˜p) ∧ (˜q)] Exercise 13 1. 2. Establish the logical equivalence of these compound statements ⇒ q ) ⇔ [p ∧ ˜q] (p ⇒ q ) ⇔ (q ⇒ p) ˜ (p Remark 14 converse q p ⇒ q ⇒ p. Claiming the opposite is a very common mistake you should not As you have already proven is not logically equivalent to its make in the future. Exercise 15 Write the negation of each statement a) If K is closed and bounded, then K is compact. b) If K is compact, then K is closed and bounded. c) A continuous function is differentiable. Exercise 16 Construct a truth table for each statement ⇒ (q ∧ ˜q)] ⇔ ˜p ⇒ ˜p) ⇔ (p ∧ q) ∧ q) ⇔ (q ∧ p) (commutative property) ∨ q) ⇔ (q ∨ p) ∧ (q ∧ r)] ⇔ [(p ∧ q) ∧ r] (associative property) ∨ (q ∨ r)] ⇔ [(p ∨ q) ∨ r] ∧ (q ∨ r)] ⇔ [(p ∧ q) ∨ (p ∧ r)] (distributive property) ∨ (q ∧ r)] ⇔ [(p ∨ q) ∧ (p ∨ r)] a) [ p b) (q c) (p d) (p e) [p f) [p g) [p h)[p 1.3 Quantifiers In Section 1 we saw that a mathematical sentence that involves a variable, for example ”x > 3”, needs to be considered in a particular context in order to become a statement. The quantifiers help create statements by limiting the role of variables in a mathematical sentence. is a symbol that can assume several specifications. A propositional function is a sentence which becomes a statement once we replace a variable by one of its specifications. Definition 17 A variable Let p(x) denote a propositional function, p being the sentence and x being the variable. Thus p (x) : x > 3 is a propositional function. Let S denote a given set.† There are two quantifiers: † You may think of a set S as a collection of objects, who are called the elements of S . When x is an element of S we write x ∈ S and we read “x is an element of S ”. Quantifiers • 13 Universal quantifier (“for all”), denoted by ∀, with the following interpreta- tion: ∀x ∈ S, p(x)] [ an example, if means that S = {4, 5}, p(x) x in S . As > 3) ∧ (5 > 3)]. is true provided it is true for each ∀x ∈ S, p(x) then [ : x> 3] ≡ [(4 S is implicit in the context, and can be omitted. The notation therefore becomes more compact, leading to ∀x, p(x). Sometimes the set • Existential quantifier ∃x ∈ S p(x)] [ meaning that p(x) (“there exists”), denoted by ∃: reads ” There exists an x belonging to S such that p(x) is true provided there exists at least an is true. As an example, if [(1 > 3) ∨ (2 > 3) ∨ (4 > 3)]. S = x in S p (x) ”‡ for which {1, 2, 4}, then [∃x ∈ S p(x) : x > 3] ≡ Exercise 18 Let S be a finite set (i.e. {1, 2}). Use de De Morgan’s law to show that ˜[∃x ∈ S p(x)] ⇔ [∀x ∈ S, ˜p(x)], tautologies. and ˜ [∀x ∈ S , p(x)] ⇔ [∃x ∈ S, ˜p(x)] are ∃! x to denote the case when a unique value exists for the variable x that makes p(x) true. The universal and the existential quantifiers are thus seen as extensions of the logical connectives ∧ and ∨, to deal with infinitely many assertions, or assertions about infinitely many things, x. Moreover, one can combine the existential quantifier with negation: ˜∃ means “there exists no” (often written as ∃ /). Sometimes we use the symbol Example 19 ∃/ x > 0 (x + 1) = 0 is logically equivalent to ∀x > 0, x + 1 = 0. Exercise 20 1. 2. 3. Write the negation of the following statements ∀x ∈ A, f (x) > 5 ∃ y > 0 0 ≤ g (y ) ≤ 3 ∀ε > 0 ∃ N ∀n, if n > N, convergence) then ∀x ∈ S, | fn (x) − f (x) | < ε (uniform As we saw in the last exercise, we can use both ∀ and ∃ in one statement. It is important to clarify the following point about the order in which quantifiers are used. While [∀x, ∀y, p(x, y)] ≡ [∀y, ∀x, p(x, y)] ≡ [∀x, y, p(x, y)], the propositions [∃ y ∀x p(x, y)] and [∀x, ∃ y p(x, y)] are not logically equivalent. In this case, in fact, the order in which quantifiers appear affects the meaning — and the truth value — of the statement. The first statement says that for at least one y, p(x, y) is true for all x. In other words, the choice of y is independent of x. On the other hand, the second statement establishes that for all x there exist at least one y such that p(x, y) is true. This means that the choice of y is allowed to depend on x. ‡ stands for “such that”. Another ways of saying “such that” are given by the symbol “:” or by writing ”s.t.”. 14 Logic and Proof As an example consider p(x, y) being given by x + 1 = y. The statement [∃ y ∀x p(x, y)] establishes that there exists an y such that for all x, x +1 = y. This is clearly a false statement. The second proposition, on the other hand, states that for all x there exists an y such that x + 1 = y. Unlike the former, this statement is true. Exercise 21 Find a p (x, y) such that [∃ y ∀x p(x, y)] and [∀x, ∃ y the same truth value. p(x, y )] have Exercise 22 The following statements give properties of functions that we shall encounter later in the course. You have to do two things. a) rewrite the defining conditions in logical symbolism and b) write the negation of part a) using the same symbolism. 1. A function f is odd iff 2. A function f is even 3. A function f is f (x). ≤ f (y) . 5. A function f is f (x) > f (y ) . 6. A function then iff for every x, increasing iff for every x and for every y, if strictly decreasing iff for every x f :A x = y. −f (x) = f (−x). f (x) = f (−x). periodic iff there exists a k > 0 such that for every x, f (x + k ) = 4. A function f is f (x) for every x, −→ B is and every y, if injective iff for every x and y in A, if ≤ x x y, then ≤ y, then f (x) = f (y) , f : A −→ B is surjective iff for every y in B there exists an x in A such that f (x) = y. 7. A function f : D −→ R is continuous at c ∈ D iff for every ε > 0 there exists a δ > 0 such that |f (x) − f (c)| < ε whenever |x − c| < δ and x ∈ D. 8. A function uniformly continuous on a set S iff for every ε > 0 there is δ > 0 such that |f (x) − f (y)| < ε whenever x and y are in S and x y < δ. 9. A function f is a | ε > 0 there 0 < |x − c| < δ. is a δ>0 such that | f : D −→ R at the point c iff |f (x) − L| < ε whenever x ∈ D and 10. The real number L is the limit of the function for each − Techniques of Proof 15 1.4 Techniques of Proof A proof is a method of establishing the truthfulness of an implication. Typically, one has to prove proposition of the sort if H1,H2,...,Hn , then C. Propositions H1,...,Hn are often referred to as the conclusion, hypotheses of the proof, whereas proposition C is referred or thesis. A formal proof of such a proposition consists of a sequence of valid propositions ending with conclusion C. To be valid, a proposition in the sequence must be either one of the hypotheses H1 , ...Hn , or an axiom, a definition, a tautology or a previously proved proposition, or it must be derived from previous propositions using either substitution or logical implications. As an example, if you have to prove that given a set S , [∀x ∈ S, p(x)], then you need to prove that [x ∈ S =⇒ p(x)]. Similarly, in case you have to prove that [∃x ∈ S : p(x)], you “just” need to find an x in S such that p(x) is true. There are several ways of proving a proposition, all of them being useful in different situations. These methods are enumerated below. to as the Direct To show that q is true. Example 23 p =⇒ q is true, we first assume that p is true and conclude that If x > 1, then x2 > x. Here proof goes as follows: p:x>1 p:x>1 • Let • from the axiom ”If • But by definition • substituting in the above expression leads to • which is the conclusion we wanted and q : x2 > x.The direct (Hypothesis); x x > 1 x; a>b and c > 0, x x = x2 and 1 x = x; then a c > b c” we have x> 1 ⇒ x x > 1 x ⇒ x2 > x x > 1 ⇒ x2 > x. Contrapositive Associated with the implication p ⇒ q there is a logically equivalent statement ˜q ˜p, called the contrapositive (see example 11). Thus one way to prove an implication is to give a direct proof of its contrapositive. In other words, assume that ˜q is true and conclude that ˜p is true. Then we can conclude that (p q ) is true. ⇒ ⇒ Example 24 Consider the statement for m ∈ N , ”If 7m is an odd number, then m is an odd number”. The contrapositive of the statement is ”If m is not an odd number, then 7m is not an odd number”, or equivalently ”If m is an even number, then 7m is an even number”. This statement is much easier to prove. Logic and Proof 16 Proof. Let ∼ q k : ”m is an even number”. Then, by definition m = 2k for some ∈ N. But then substituting into m we have 7m = 7 (2 k ) = 2 (7k ) = 2 k which is also even. Exercise 25 Try the direct proof of the above statement. Decomposition Suppose we want to prove that p ⇒ q, and that p can be decomposed into two disjoint propositions p1, p2 such that p1 ∧ p2 is a contradiction. Then p ≡ (p1 ∨ p2) ∧ ˜(p1 ∧ p2 ) ≡ (p1 ∨ p2 ) . Given this choice of (p p1 and ⇒ q) ⇔ ⇔ ⇔ p2 we have ∨ q) ⇔ [˜ (p1 ∨ p2 ) ∨ q ] [(˜p1 ∧ ˜p2 ) ∨ q ] ⇔ [(˜p1 ∨ q) ∧ (˜p2 ∨ q)] [(p1 ⇒ q) ∧ (p2 ⇒ q )] (˜p meaning that you only need to show that method works also if you decompose p p1 ⇒q and p2 ⇒ q. Note that this into a number of propositions bigger than 2 as far as these propositions are mutually exclusive (which means that every pair of them is a contradiction). Example 26 Take the contrapositive of the example given for the direct proof method. The contrapositive is ”x2 ≤ x ⇒ x ≤ 1”. Proof. By definition x2 ≥ 0. Then p : 0 ≤ x2 ≤ x and q : x ≤ 1. Decompose p into p1 : x > 0 and p2 : x = 0. Then p1 ∧ p2 is always false and p ≡ (p1 ∨ p2 ) ∧ ˜(p1 ∧ p2 ). To show that p2 ⇒ q is trivial since 0 ≤ 1. To prove p1 ⇒ q, we only need to use the implication ”∀ c > 0, x ≤ y ⇒ xc ≤ yc ”. Given that x > 0 by assumption, x2 ≤ x ⇒ xx ≤ xx ⇒ x ≤ 1 2 Exercise 27 Show the following statement ”Let x ∈ R. If |x| ≥ 1 ⇒ x2 ≥ x”. Construction This approach is used when the statement includes an existential quantifier. i.e., the conclusion is of the form: ∃x, p(x). To prove this, simply find (“construct”) a value of x such that p(x) is true when H is true. For example, if A = {1, 2, 3, 4, 5} and the proposition is: ∃x ∈ A x > 2, observe that for x = 3 we have x > 2 and x ∈ A. Exercise 28 Show that f (x) = x is a continuous function at every x0 ∈ R . You have to prove that ”∀ε > 0 , ∃ δ (x0, ε) > 0 |x − x0| < δ (x0 , ε) ⇒ |f (x) − f (x0)| < ε”. Techniques of Proof 17 Contradiction Suppose we want to prove p ⇒ q. This method of proof — also known as ”reductio ad absurdum”— consists of assuming that [p ∧ (˜q)] is true and deriving a contradiction c. To show that both statements are logically equivalent, we compare their truth tables p q p ⇒ q ˜q (p ∧ ˜q ) c (p ∧ ˜q) ⇒ c T T F F T F T F T F T T F T F T F T F F F F F F T F T T . An equivalent way of making a proof by contradiction is given by the following tautology: (p =⇒ q) ⇔ [(p ∧ (˜q)) =⇒ (˜p)]. This is a particular case of the general definition, since [(p ∧ (˜q)) =⇒ (˜p)] is equivalent to [(p ∧ (˜q)) =⇒ ((˜p) ∧ p)] (since p was already an assumption), and given that ((˜p) ∧ p) ⇔ c then [(p ∧ (˜q)) =⇒ c] .The proof of their equivalence is left as an exercise. Exercise 29 ⇒q ⇔ p∧ Show that (p = ) [( ⇒ (˜q )) = (˜p)] . Example 30 We will show again that ”If 7m is odd, then m is odd”. Proof. Here the statements are p ” 7m is odd ” and q ”m is odd ”. To prove the result by contradiction we will use the equivalence p ⇒ q ⇔ p∧ q ⇒ p , so we have to assume first that p ∧ q , that is ” 7m is odd and m is even ”. Since m is even by definition we have m = 2k for some k. Then 7m= 7(2k) = 2 (7k) = 2 j for j=7k. But this means that 7m is even p , contradicting the assumption. : : ( [( (˜ )) = (˜ )] ( = ) (˜ )) (˜ ) Remark 31 Be very careful when writing proofs by contradiction ! A very strong word of caution can be found in Royden§ ”All students are enjoined in the strongest possible terms to eschew proofs by contradiction! There are two reasons for the prohibition: First such proofs are very often fallacious, the contradiction on the final page arising from an erroneous deduction on an earlier page, rather than from the incompatibility of p with ˜q. Second, even when correct, such a proof gives little insight into the connection between p and q whereas both the direct proof and the proof by contraposition construct a chain of argument connecting p and q.One reason why mistakes are so much more likely in proofs by contradiction than in direct proofs is that in a direct proof ( assuming the hypothesis is not always false) all deduction from the hypothesis are true in those cases where the hypothesis holds. One is dealing with true statements, and ones’s intuition and knowledge about what it is true help to keep one from making erroneous statements. In proofs by contradiction, however, you are (assuming the theorem is true) in the unreal world where any statement can be derived, and so the falsity of a statement is no indication of an erroneous deduction. § H.L. Royden ”Real Analysis” pg3. Logic and Proof 18 Exercise 32 Let x be a real number. Prove that if x>0 then 1/x>0. Induction It is used for statements of the form p(n), ∀n ∈ {m, m + 1, m + 2, ...}. The proof consists of two steps: Basis of Induction Prove that for the first element in the set of interest — in this case p(m) p(k ) ⇒ p(k + 1), for k m. prove that p(k + 1) is also true. Inductive step Show m —, is true, In other words, assume p(k ) is true and Exercise 33 The following tautologies are widely used in the methods of proof. Some of them have already been seen before. a) Verify that they are indeed tautologies, b) Interpret them and associate them with the different methods of proof 1. (p ⇔ q) ⇔ [(p ⇒ q) ∧ (q ⇒ p)] 2. (p ⇔ q) ⇔ [(p ⇒ q) ∧ (˜p ⇒ ˜q)] 3. (p ⇒ q) ⇔ (˜q ⇒ ˜p) 4. p ∨ ˜p 5. (p ∧ ˜p) ⇔ c 6. (˜p ⇒ c) ⇔ p 7. (p ⇒ q) ⇔ [(p ∧ ˜ q) ⇒ c] 8. [ p ∧ (p ⇒ q)] ⇒ q 9. [˜q ∧ (p ⇒ q)] ⇒ ˜p 10. [˜p ∧ (p ∨ q)] ⇒ q 11. (p ∧ q) ⇒ p 12. [(p ⇒ q) ∧ (q ⇒ r)] ⇒ (p ⇒ r) 13. [(p1 ⇒ p2) ∧ (p2 ⇒ p3) ∧ ... ∧ (pn−1 ⇒ pn )] ⇒ (p1 ⇒ pn) 14. [(p ∧ q) ⇒ r] ⇔ [p ⇒ (q ⇒ r)] 15. [(p ⇒ q) ∧ (r ⇒ s) ∧ (p ∨ r)] ⇒ (q ∨ s) 16. [p ⇒ (q ∨ r)] ⇔ [(p ∧ ˜q) ⇒ r] 17. [(p ∨ q) ⇒ r] ⇔ [(p ⇒ r) ∧ (q ⇒ r)] 1.5 References S.R Lay , Analysis with an Introduction to Proof . Chapter 1. Third Edition. Prentice Hall. A. Matozzi, Lecture Notes Econ 897 University of Pennsylvania Summer 2001. H.L. Royden, Real Analysis . Third Edition. Prentice Hall.