Proofs Induction

download Proofs Induction

of 45

Transcript of Proofs Induction

  • 7/29/2019 Proofs Induction

    1/45

    Module #1 - Logic

    1

    Basic Proof Methods

  • 7/29/2019 Proofs Induction

    2/45

    2

    Nature & Importance of Proofs

    In mathematics, aproof is an argument that is correct(well-reasoned, logically valid) and

    complete(clear, detailed),

    so that it rigorously & undeniably establishes thetruth of a mathematical statement.

    Why must the argument be correct & complete? Correctnessprevents us from fooling ourselves.

    Completenessallows anyone to verify the result. In this course (& throughout mathematics),

    a very high standardfor correctness andcompleteness of proofs is demanded!!

  • 7/29/2019 Proofs Induction

    3/45

    3

    Overview

    Methodsof mathematical argument(i.e., proof methods) can be formalized

    in terms ofrules of logical inference. Mathematical proofscan themselves be

    represented formally as discrete structures.

    We will review both correct& fallaciousinference rules, & several proof methods.

  • 7/29/2019 Proofs Induction

    4/45

    4

    Applications of Proofs

    An exercise in clear communication of logicalarguments in any area of study.

    The fundamental activity of mathematics is the

    discovery and elucidation, through proofs, ofinteresting new theorems.

    Theorem-proving has applications in programverification, computer security, automated reasoning

    systems, etc. Proving a theorem allows us to rely upon on its

    correctness even in the most critical scenarios.

  • 7/29/2019 Proofs Induction

    5/45

    5

    Proof Terminology

    Theorem

    A statement that has been proven to be true.

    Axioms, postulates, hypotheses, premises

    Assumptions (often unproven) defining thestructures about which we are reasoning.

    Rules of inference Patterns of logically valid deductions from

    hypotheses to conclusions.

  • 7/29/2019 Proofs Induction

    6/45

    6

    More Proof Terminology

    Lemma - relatively uninteresting statements thatare proved on the way (as stepping-stone) toproving an actual theorem of interest

    Corollary- A minor theorem proved as an easyconsequence of a major theorem.

    Conjecture- A statement whose truth value hasnot been proven. (A conjecture may be widely

    believed to be true, regardless.) Theory The set of all theorems that can be

    proven from a given set of axioms.

  • 7/29/2019 Proofs Induction

    7/45

    7

    Graphical Visualization

    Various TheoremsThe Axiomsof the Theory

    A Particular Theory

    A proof

  • 7/29/2019 Proofs Induction

    8/45

    8

    Inference Rules - General Form

    An Inference Ruleis

    A pattern establishing that if we know that a

    set ofantecedentstatements of certain formsare all true, then we can validly deduce that acertain relatedconsequentstatement is true.

    antecedent 1antecedent 2

    consequent means therefore

  • 7/29/2019 Proofs Induction

    9/45

    9

    Inference Rules & Implications

    Each valid logical inference rulecorresponds to an implication that is atautology.

    antecedent 1 Inference ruleantecedent 2

    consequent

    Corresponding tautology:((ante. 1) (ante. 2) ) consequent

  • 7/29/2019 Proofs Induction

    10/45

    10

    Some Inference Rules

    p Rule ofAddition pq

    pq Rule ofSimplification

    p p Rule ofConjunction

    q

    pq pq Rule ofResolution

    pr qr

  • 7/29/2019 Proofs Induction

    11/45

    11

    Modus Ponens & Tollens

    p Rule ofmodus ponenspq (a.k.a. law of detachment)

    q q

    pq Rule ofmodus tollens

    p

    the mode ofaffirming

    the mode of denying

  • 7/29/2019 Proofs Induction

    12/45

    12

    Syllogism Inference Rules

    pq Rule of hypotheticalqr syllogism

    pr p q Rule of disjunctive

    p syllogism

    q

    Aristotle

    (ca. 384-322 B.C.)

  • 7/29/2019 Proofs Induction

    13/45

    13

    Formal Proofs A formal proof of a conclusionC,

    given premisesp1, p2,,pnconsists of a sequence ofsteps,each of which

    applies some inference ruleto premises or previously-proven statements(antecedents)

    to yield a new true statement (theconsequent). A proof demonstrates that

    if the premises are true,

    then the conclusion is true.

  • 7/29/2019 Proofs Induction

    14/45

    14

    Formal Proof Example

    Suppose we have the following premises:It is not sunny and it is cold.We will swim only if it is sunny.

    If we do not swim, then we will canoe.If we canoe, then we will be home early.

    Given these premises, prove the theorem

    We will be home early using inference rules.

  • 7/29/2019 Proofs Induction

    15/45

    15

    Proof Examplecont.

    Let us adopt the following abbreviations:

    sunny=It is sunny; cold=I t is cold;

    swim=We will swim; canoe=We willcanoe; early=We will be home early.

    Then, the premises can be written as:It is not sunny and it is cold. (1) sunny cold

    We will swim only if it is sunny. (2) swim sunnyIf we do not swim, then we will canoe. (3) swim canoeIf we canoe, then we will be home early. (4) canoe early

  • 7/29/2019 Proofs Induction

    16/45

    16

    Proof Examplecont.

    Step Proved by1. sunny cold Premise #1.2. sunny Simplification of 1.3. swimsunny Premise #2.4. swim Modus tollens on 2,3.5. swimcanoe Premise #3.

    6. canoe Modus ponens on 4,5.7. canoeearly Premise #4.8. early Modus ponens on 6,7.

  • 7/29/2019 Proofs Induction

    17/45

    17

    Inference Rules for QuantifiedStatements

    xP(x)P(o) (substituteanyspecific objecto)

    P(g) (for gageneral element of u.d.)xP(x)

    xP(x)

    P(c) (substitute anewconstantc) P(o) (substitute any extant objecto)

    xP(x)

  • 7/29/2019 Proofs Induction

    18/45

    18

    Examples on Inference Rules for

    Quantifiers Ex1:

    Show that the statementsEveryone in this computational structures class hastaken a course in computer science andMarla is a student in this class.imply that Marla has taken a course in computer science.

    This is universal instantiation Let D(x) denote x is in this computational structures

    class, andlet C(x) denote x has taken a course in computerscience.

    Then the premises arex (D(x) C(x)) and D(Marla).

    The conclusion is C(Marla).

  • 7/29/2019 Proofs Induction

    19/45

    19

    Examples on Inference Rules for

    Quantifiers (cont.) The following steps can be used to establish the

    conclusion from the premises.

    Step Reason

    1. x (D(x) C(x)) Premise

    2. D(Marla) C(Marla) universal instantiationfrom (1)

    3. D(Marla) Premise

    4. C(Marla) Modus ponens from (2) and (3)

  • 7/29/2019 Proofs Induction

    20/45

    20

    Examples on Inference Rules forQuantifiers (cont.) Ex2:

    A student in this class has not read the book andEveryone in this class has passed the first examimply the conclusion

    Someone who passed the first exam has not read thebook. This is existential generalization Let C(x) be x is in this class,

    B(x) be x has read the book, andP(x) be x passed the first exam.

    The premises are:x (C(x) B(x)) andx (C(x) P(x)).

    The conclusion is x (P(x) B(x)).

  • 7/29/2019 Proofs Induction

    21/45

    21

    Examples on Inference Rules forQuantifiers (cont.)

    The following steps can be used to establish the conclusionfrom the premises.Step Reason

    1. x (C(x) B(x)) Premise2. C(a) B(a) Existential instantiation from (1)3. C(a) Simplification from (2)4. x (C(x) P(x)) Premise5. C(a) P(a) Universal instantiation from (4)

    6. P(a) Modus ponens from (3) and (5)7. B(a) Simplification from (2)8. P(a) B(a) Conjunction from (6) and (7)9. x (P(x) B(x)) Existential generalization

  • 7/29/2019 Proofs Induction

    22/45

    22

    Common Fallacies

    A fallacyis an inference rule or other proofmethod that is not logically valid.

    A fallacy may yield a false conclusion!

    Fallacy ofaffirming the conclusion:

    pq is true, andq is true, sopmust be true.(No, becauseFT is true.)

    Ex1: Is the following statement valid?

    If you do every problem in this book, then you willget an A from this course. Now you got an A, so itmeans you did every problem in this book.

    NO

    [((pq) q) p] is NOT a tautology!

  • 7/29/2019 Proofs Induction

    23/45

    23

    Common Fallacies (cont.)

    Fallacy ofdenying the hypothesis:

    pq is true, andp is false, soqmust be

    false. (No, again becauseFT is true.) Ex2: Is the following statement valid?

    If you do every problem in this book, then youwill get an A from this course. Since you didnot do all the problems in this book, so youwill not get an A from this course.

    NO

    [((pq) p) q] is NOT a tautology!

  • 7/29/2019 Proofs Induction

    24/45

    24

    Circular Reasoning The fallacy of (explicitly or implicitly) assuming

    the very statement you are trying to prove in thecourse of its proof. Example:

    Prove that ifn2 is even, then n is even.

    Attempted proof: Assumen2 is even. Thenn2=2k, for some integer k. Dividing both sides by ngivesn= (2k)/n= 2(k/n). So there is an integerj

    (namely k/n) such thatn=2j. Thereforen is even. Circular reasoning is used in this proof. Where?

    Begs the question: How doyou show thatj=k/n=n/2 is an integer,

    without firstassuming thatnis even?

  • 7/29/2019 Proofs Induction

    25/45

    25

    Proof Methods for Implications

    For proving implicationspq, we have: Directproof: Assumep is true, and proveq.

    Indirectproof: Assumeq, and provep.

  • 7/29/2019 Proofs Induction

    26/45

    26

    Direct ProofExample

    Definitions:An integer n is calledodd iff n=2k+1for someinteger k;

    n iseven iff n=2k for some k. Axiom: Every integer is either odd or even. Theorem: (For all numbersn)

    Ifn is an odd integer, thenn2 is an odd integer.

    Proof: Ifn is odd, thenn= 2k+1for some integer k.Thus, n2 = (2k+1)2 = 4k2 + 4k+ 1 = 2(2k2 + 2k) + 1.Thereforen2 is of the form2j + 1(withj the integer 2k2 + 2k),thusn2 is odd.

  • 7/29/2019 Proofs Induction

    27/45

    27

    Indirect ProofExample Theorem: (For all integersn)

    If3n+2is odd, thenn is odd.

    Proof:

    Suppose that the conclusion is false, i.e., thatn is even.Thenn=2k for some integer k.Then3n+2 = 3(2k)+2 = 6k+2 = 2(3k+1).Thus3n+2is even, because it equals2j for integerj =3k+1. So3n+2is not odd.We have shown that(n is odd) (3n+2 is odd),thus its contra-positive(3n+2 is odd) (n is odd)

    is also true.

  • 7/29/2019 Proofs Induction

    28/45

    28

    Proof byContradiction

    A method for provingp.

    Assumep, andprove both qandq,for some propositionq. (Can be anything!)

    Thusp (q q)

    (q q) is a trivial contradiction, equal toF

    ThuspF,which is true only ifp=F

    Thusp is true.

  • 7/29/2019 Proofs Induction

    29/45

    29

    Proof by Contradiction Example

    Theorem: is irrational. Proof: Assume 21/2 were rational.

    This means there are integers i,j with no

    common divisors such that 21/2 =i/j.Squaring both sides, 2 =i2/j2, so 2j2 =i2.So i2 is even; thus i is even.Let i=2k. So 2j2 = (2k)2 = 4k2.

    Dividing both sides by 2,j2 = 2k2.Thusj2 is even, soj is even.But then i andj have a common divisor,namely 2,

    so we have a contradiction.

    2

  • 7/29/2019 Proofs Induction

    30/45

    30

    Proving Existentials

    A proof of a statement of the formxP(x)is called anexistence proof.

    If the proof demonstrates how to actuallyfind or construct a specific elementa,such thatP(a) is true,

    then it is aconstructiveproof. Otherwise, it isnonconstructive.

  • 7/29/2019 Proofs Induction

    31/45

    31

    Constructive Existence Proof

    Theorem:There exists a positive integer nthat is the sum

    of two perfect cubes in two different ways: equal toj3 +k3 and l3 +m3, wherej, k, l, mare

    positive integers, and {j,k} {l,m}

    Proof: Considern= 1729,j = 9, k= 10, l = 1, m= 12.Now just check that the equalities hold.

  • 7/29/2019 Proofs Induction

    32/45

    32

    Nonconstructive Existence Proof Show that there exist irrational numbersxandy

    such thatxyis rational.

    Proof: We know that is irrational (accept it).

    If is rational, choose x= andy= .

    Then, xy is (rational).

    If is irrational, choose x= andy= .Then, xy is 2 (rational).

    We showed that in both cases the result is rational,

    without knowing which of the pairs of x and y works..

    2

    2

    2

    2 2

    2

    2 2

    2

    2

    2

    2

  • 7/29/2019 Proofs Induction

    33/45

    33

    Review: Proof Methods Direct, indirectproofs of statements of the

    formpq. Proof bycontradictionof any statements.

    Constructiveandnonconstructiveexistence

    proofs.

    Module#1 Logic

  • 7/29/2019 Proofs Induction

    34/45

    Module #1 - Logic

    34

    Induction

  • 7/29/2019 Proofs Induction

    35/45

    35

    Topics

    Mathematical induction

    Well ordered property

    Second principle of induction

  • 7/29/2019 Proofs Induction

    36/45

    36

    Mathematical Induction

    A powerful, rigorous technique for provingthat a predicateP(n) is true for every

    natural number n, no matter how large. Essentially a domino effect principle.

    Based on a predicate-logic inference rule:

    P(0)n0(P(n)P(n+1))n0P(n)

  • 7/29/2019 Proofs Induction

    37/45

    37

    Validity of Induction

    Proof that k0P(k) is a valid consequent:

    Given anyk0, n0(P(n)P(n+1)) (antecedent 2)trivially impliesn0 (n

  • 7/29/2019 Proofs Induction

    38/45

    38

    The Well-Ordering Property

    The validity of the inductive inference rule can also beproved using thewell-ordering property, which says:

    Every non-empty set of non-negative integers has aminimum (smallest) element.

    SN : mS : nS : mn

    Assume that there exists at least one positive integer

    n: {n|P(n)}. This non-empty set has a minimumelementm. Som-1 is not in this set and thusP(m-1) istrue, but thenP(m-1)P((m-1)+1) contradicted withP(m).

    Hence, P(n) must be true non-negative integers

  • 7/29/2019 Proofs Induction

    39/45

    39

    Outline of an Inductive Proof

    Want to provenP(n)

    Base case (or basis step): Prove P(0).

    Inductive step: Proven P(n)P(n+1). E.g. use a direct proof:

    LetnN, assumeP(n). (inductive hypothesis)

    Under this assumption, proveP(n+1). Inductive inference rule then givesn

    P(n).

  • 7/29/2019 Proofs Induction

    40/45

    40

    Generalizing Induction

    Can also be used to provencP(n) for agiven constantcZ, where maybec0.

    In this circumstance, the base case is to proveP(c) rather thanP(0), and the inductive step

    is to provenc (P(n)P(n+1)).

  • 7/29/2019 Proofs Induction

    41/45

    41

    Second Principle of Induction

    Characterized by another inference rule:P(0)

    n0: (0knP(k)) P(n+1)n0: P(n)

    Difference with 1st principle is that the

    inductive step uses the fact thatP(k) is truefor all smallerk

  • 7/29/2019 Proofs Induction

    42/45

    42

    Induction Example (1st princ.)

    Prove that the sum of the firstnodd positiveintegers isn2. That is, prove:Proof by induction.

    Base case: Letn=1. The sum of the first 1 oddpositive integer is 1 which equals 12.

    Inductive step: Proven1: P(n)P(n+1).

    Letn1, assumeP(n), and proveP(n+1).

    2

    1

    )12(:1 ninn

    i

    = =

    2

    2

    1

    1

    1

    )1(

    12

    )1)1(2()12()12(

    +=

    ++=

    ++

    =

    =

    +

    =

    n

    nn

    nii

    n

    i

    n

    i

  • 7/29/2019 Proofs Induction

    43/45

    43

    Another Induction Example

    Prove that n>0, n

  • 7/29/2019 Proofs Induction

    44/45

    44

    Example of Second Principle

    Show that everyn>1 can be written as a productp1p2ps of some series ofsprime numbers. LetP(n)=nhas that property

    Base case: n=2, lets=1, p1=2.

    Inductive step: Letn2. Assume2kn: P(k).Considern+1. If prime, lets=1, p1=n+1.

    Elsen+1=ab, where 2anand 2bn.Sincea=p1p2pt andb=q1q2qu, thenn+1=p1p2ptq1q2qu, a product ofs=t+uprimes.

  • 7/29/2019 Proofs Induction

    45/45

    Another 2nd Principle Example

    Prove that every amount of postage of 12cents or more can be formed using just 4-

    cent and 5-cent stamps. Base case: 12=3(4), 13=2(4)+1(5),

    14=1(4)+2(5), 15=3(5), so12n15,P(n).

    Inductive step: Letn15, assume12knP(k). Note 12n3n, soP(n3), so add a4-cent stamp to get postage for n+1.