Reading and Writing Mathematical Proofs Autumn 2015 Lecture 1: Proofs in Textual Form
Organization The required stuff…
Organization Lecturer: Arthur van Goethem MSc, MF 4.104B, Web page:Part of Data Structures Book:Daniel Solow. How to Read and Do Proofs (5th edition) not mandatory
Schedule Only 4 lectures
Prerequisites Not covered Logical inferences Logical derivations (flag proofs) In other words: Logic and Set Theory (2IT60) Covered Mathematical proofs in common English Common proof techniques (proof by contradiction, induction, etc.) Common errors Many proof examples
What is a proof? Why explanations are not proofs…
What is a proof? A method for establishing truth What establishes truth depends on context PhysicsSufficient experimental evidence CourtroomAdmissible evidence and witness testimony Mathematical proofNot a doubt possible!
What is a proof? A form of communication Proof must convince reader (not the writer!) of correctness Proofs must be: Clearly written Should be easy to follow Very different from “proving process” Very precise No ambiguities! Leaving no doubts
Definition Mathematical proof A convincing argument for the reader to establish the correctness of a mathematical statement without any doubt.
= 9 Definition Mathematical proof A convincing argument for the reader to establish the correctness of a mathematical statement without any doubt. Statement must be true or false
Definition Mathematical proof A convincing argument for the reader to establish the correctness of a mathematical statement without any doubt. In what format should a proof be?
Logical derivation Good Very systematic Hard to make mistakes Bad Not convenient for statements not stated in logical formulas Emphasis on logical reasoning → detract from crux argument Hard to read Cumbersome
Common English Theorem If x is odd, then x 2 is odd Proof Since x is odd, there exists a k ℤ such that x = 2k + 1. Then, x 2 = (2k + 1) 2 = 4k 2 + 4k + 1 = 2(2k 2 + 2k) + 1. Thus, x 2 is odd. □ Good Short and to the point Easy to read Bad Logical reasoning somewhat hidden Natural language can be ambiguous This is the kind of proof we expect in Data Structures!
Two Proof Formats This is what you should write down This should be in the back of your mind Theorem If x is odd, then x 2 is odd Proof Since x is odd, there exists a k ℤ such that x = 2k + 1. Then, x 2 = (2k + 1) 2 = 4k 2 + 4k + 1 = 2(2k 2 + 2k) + 1. Thus, x 2 is odd. □
Two Proof Formats Theorem If there is an x such that P(x,y) holds for all y, then for all v there is a u such that P(u, v) holds.
Two Proof Formats Theorem If there is an x such that P(x,y) holds for all y, then for all v there is a u such that P(u, v) holds.
Two Proof Formats Theorem If there is an x such that P(x,y) holds for all y, then for all v there is a u such that P(u, v) holds.
Two Proof Formats Theorem If there is an x such that P(x,y) holds for all y, then for all v there is a u such that P(u, v) holds.
Two Proof Formats Theorem If there is an x such that P(x,y) holds for all y, then for all v there is a u such that P(u, v) holds.
Two Proof Formats Theorem If there is an x such that P(x,y) holds for all y, then for all v there is a u such that P(u, v) holds.
Two Proof Formats Theorem If there is an x such that P(x,y) holds for all y, then for all v there is a u such that P(u, v) holds. Proof Let x* be the element such that P(x*,y) holds for all y. Then, for an arbitrary v there is a u, namely u = x*, such that P(u,v) = P(x*,v) holds. □ Must be able to translate: Logic ↔ English
Logic and Ambiguities The stuff that is kind of doing that thing…
Logic vs. English LogicEnglish P ⋀ Q P and Q Both P and Q P ⋁ Q P or Q careful…. ¬P ¬( P ⋁ Q) not P doesn’t hold, cannot neither P nor Q
Logic vs. English LogicEnglish P ⇒ Q P implies Q If P, then Q P ⇔ Q P is equivalent to Q P if and only if Q P iff Q For P ⇒ Q: ¬Q ⇒ ¬ P (equivalent) Q ⇒ P (not equivalent!) contrapositive converse
Logic vs. English LogicEnglish ∃ x [x S: P(x)] ∃ x [x ℤ : P(x)] There is an x in S such that P(x) holds There exists an integer x for which P(x) holds P(x) holds for some x There is at least one x s.t. … ∀ x [x S: P(x)] For all x in S it holds that P(x) (careful) P(x) holds for any x in S Let x be an arbitrary element of S, then P(x) holds ∃ x [x S: P(x)] ⋀ ∀ x,y [x,y S: P(x) ⋀ P(y) ⇒ x=y ] There is a unique x for which P(x) holds There is exactly one x for which P(x) holds
Ambiguities Do you want beer or water? Do you want beer or water or both? (or) OR Do you want either beer or water? (exclusive-or) If you can solve any problem we pose, then you ace the course If you can solve some problem we pose, then you ace the course OR If you can solve all problems we pose, then you ace the course Always avoid ambiguities!
Practice 1.There exists an element x of S such that x is at least as large as all other elements of S ∃ x [x S: ∀ y [y S: x ≥ y ]] ∃ x [x S: ∀ y [y S ⋀ y ≠ x : x ≥ y ]] 2.There are no positive integers a, b, and c such that a n + b n = c n for any integer n > 2 ¬∃ a,b,c [a,b,c ℕ + : ∃ n [n ℤ ⋀ n > 2 : a n + b n = c n ]] ∀ a,b,c [a,b,c ℕ + : ∀ n [n ℤ ⋀ n > 2 : a n + b n ≠ c n ]] 3.∀ x,y [x,y ℤ : P(x) ⋀ Q(y) ⇒ ¬Q(x) ⋁ ¬P(y)] For all integers x and y it holds that, if P(x) and Q(y) hold, then Q(x) does not hold or P(y) does not hold 4.∀ x,y [x,y S : ∃ T [T ⊆ S : P(T) ⇔ x T ⋀ y T ]] For all elements x and y of S, there exists a subset T of S for which P(T) holds iff x and y are both in T
Detail What to describe and what not
Definition Mathematical proof A convincing argument for the reader to establish the correctness of a mathematical statement without any doubt. How detailed should a proof be?
A Simple Proof Theorem Two distinct circles can have at most two intersection points. Does this even require a proof?
A Simple Proof Theorem Two distinct circles can have at most two intersection points. Proof For the sake of contradiction, assume that two distinct circles C 1 and C 2 have (at least) three intersection points p 1, p 2, and p 3. Note that p 1, p 2, and p 3 must lie on both C 1 and C 2. But, three points on a circle uniquely define the circle. Thus, C 1 = C 2. Contradiction! □
A Simple Proof Theorem Two distinct circles can have at most two intersection points. Proof For the sake of contradiction, assume that two distinct circles C 1 and C 2 have (at least) three intersection points p 1, p 2, and p 3. Note that p 1, p 2, and p 3 must lie on both C 1 and C 2. But then the center of C 1 (and C 2 ) must be at the intersection of the bisector of p 1 and p 2, and the bisector of p 2 and p 3. Since the bisectors are lines, and two lines intersect only once, this uniquely defines the center (and radius) of both C 1 and C 2.Thus, C 1 = C 2. Contradiction! □
Proof Detail When is a proof detailed enough? What will the reader accept as true statements More detail results in “more obvious” statements… … but is also much longer A good proof must find the right balance
Axiomatic System Axiom A simple statement assumed to be true Mathematical theory Set of axioms Theorems derived from axioms using logical inferences Note: Definitions are generally used like axioms (but are different) Examples Euclid’s 5 postulates for geometry Peano axioms for natural numbers Zermelo–Fraenkel set theory with the axiom of choice “Two sets are equal if they have the same elements”
Axioms in this Course Which axioms are you allowed to use? Anything from high school math (middelbare school) Within reason, must be covered by any high school Anything covered in class Your proofs should be written as if intended for a fellow student The axioms you use should be accepted by all students If you are unsure, just ask! Exception: If you are asked to prove a statement, the statement itself can never be used as an axiom
Axioms in this Course Exception : If you are asked to prove a statement, the statement itself can never be used as an axiom
Practice What are the axioms? Theorem Two distinct circles can have at most two intersection points. Proof For the sake of contradiction, assume that two distinct circles C 1 and C 2 have three intersection points p 1, p 2, and p 3. Note that p 1, p 2, and p 3 must lie on both C 1 and C 2. But, then the center of C 1 (and C 2 ) must be at the intersection of the bisector of p 1 and p 2, and the bisector of p 2 and p 3. Since the bisectors are lines, and two lines intersect only once, this uniquely defines the center (and radius) of both C 1 and C 2.Thus, C 1 = C 2. Contradiction! □
Practice What are the axioms? Theorem If x is odd, then x 2 is odd Proof Since x is odd, there exists a k ℤ such that x = 2k + 1. Then, x 2 = (2k + 1) 2 = 4k 2 + 4k + 1 = 2(2k 2 + 2k) + 1. Thus, x 2 is odd. □
Proving Tips Tips for writing proofs 1. State the proof techniques you’re using (see next lecture) 2. Keep a linear flow Proving process different from written proof 3. Describe every step clearly in words 4. Don’t use complicated notation 5. Make sure your axioms are actually “obvious” What is obvious to you may not be obvious to the reader 6. Finish your proof Connect everything with what you were trying to prove
Analogy The Maze Analogy entrance/premise exit/goal Proving process Find path between entrance and exit Erratic, creative Written proof Give instructions for others to find path Stick to essentials
Analogy Proving process
Analogy Written proof
Practice
Practice Proofs Theorem If a right triangle with side lengths x, y, and z (x ≤ y ≤ z ) has area z 2 /4, then the triangle is isosceles (two sides have the same length). y x z
Practice Proofs Theorem If a right triangle with side lengths x, y, and z (x ≤ y ≤ z ) has area z 2 /4, then the triangle is isosceles (two sides have the same length). Proof Let T be a right triangle with side lengths x, y, and z (x ≤ y ≤ z ) and area z 2 /4. The area of T can also be computed as xy/2, so we obtain xy/2 = z 2 /4. By Pythagoras’ theorem we know that z 2 = x 2 + y 2. We hence get the equation xy/2 = (x 2 + y 2 )/4. By multiplying both sides by 4 and moving the terms to one side, we obtain x 2 + y 2 – 2xy = 0. By factoring the polynomial we obtain (x - y) 2 = 0. Thus, x = y and T is isosceles. □ y x z
Practice Proofs Theorem If a right triangle with side lengths x, y, and z (x ≤ y ≤ z ) has area z 2 /4, then the triangle is isosceles (two sides have the same length). Proof Let T be a right triangle with side lengths x, y, and z (x ≤ y ≤ z ) and area z 2 /4. The area of T can also be computed as xy/2, so we obtain xy/2 = z 2 /4. By Pythagoras’ theorem we know that z 2 = x 2 + y 2. We get the following: xy/2 = (x 2 + y 2 )/4 2xy = x 2 + y 2 x 2 + y 2 - 2xy = 0 (x - y) 2 = 0 x = y Thus T is isosceles. □ y x z
Practice Proofs Theorem (handshaking lemma) For any graph G=(V, E) the number of vertices with odd degree is even.
Practice Proofs Theorem (handshaking lemma) Consider a group of people shaking hands with each other (but not necessarily with everyone). The number of people that shook hands with an odd number of people is even.
Practice Proofs Theorem (handshaking lemma) For any graph G=(V, E) the number of vertices with odd degree is even. Proof Consider the sum of the degrees of all vertices: Σ v d(v). Since this sum counts every edge exactly twice, the sum must be even. Note that vertices with even degree do not affect the parity of this sum. Hence, if V’ is the set of vertices with odd degree, then Σ v V’ d(v) must also be even. Since the sum of two odd numbers is even, the sum Σ v V’ d(v) is even if and only if |V’| is even. □
Practice Proofs Theorem ∀ u ∃ v [ P(u, v)] ⇒ ∃ x ∀ y [ P(x, y)] State this theorem in common English
Practice Proofs Theorem If for all u there exists a v such that P(u, v) holds, then there exists an x such that P(x, y) holds for all y. Proof Is it even true? Let the domain be ℕ and P(u, v) = u < v. Then, for all u there exists a v, namely v = u + 1, such that u < v = u + 1. On the other hand, for any x, x < x never holds and hence x < y does not hold for all y. So the theorem does not hold. □
Practice Proofs Theorem (Pythagoras) For a right triangle T with side lengths x, y, and z (x ≤ y ≤ z ), it holds that x 2 + y 2 = z 2.
Practice Proofs Theorem (Pythagoras) For a right triangle T with side lengths x, y, and z (x ≤ y ≤ z ), it holds that x 2 + y 2 = z 2. Proof Seems tricky… Let’s try to prove something simpler. What if x = y? Then the area of the triangle is x 2 /2. We need to prove that 2x 2 = z 2. So 4 triangles should together have area z 2. How about this configuration? z x y z zz z
Practice Proofs Theorem (Pythagoras) For a right triangle T with side lengths x, y, and z (x ≤ y ≤ z ), it holds that x 2 + y 2 = z 2. Proof Let’s return to the general case. What happens if we again try to form a square with side length z? We get a hole in the middle which seems to be a square. We may have enough for a proof here… z x y z z z z
Practice Proofs Theorem (Pythagoras) For a right triangle T with side lengths x, y, and z (x ≤ y ≤ z ), it holds that x 2 + y 2 = z 2. Proof Consider the configuration of four copies of T shown in the figure. Note that, for a right triangle, the sum of the non-right angles is 90 °, since the sum of all angles is 180°. Hence, the outer shape is a square with side length z and has area z 2. The area of a single triangle is xy/2. Because T is a right triangle, the middle hole is also a square with side length (y - x) and area (y - x) 2. We thus obtain: z 2 = 2xy + (y - x) 2 = x 2 + y 2. □ z z z z