lecture1-1r

download lecture1-1r

of 8

Transcript of lecture1-1r

  • 8/13/2019 lecture1-1r

    1/8

    Notes on Logic and Methods of ProofESE (English for Science and Engineering)

    Autumn Semester 2008-2009, Sophia University

    November 25, 2008

    LOGIC AND METHODS OF PROOF

    The formal study of logic is believed to have started as far back as the time of the ancient Greeks.

    Many philosophers and mathematicians played an important role in the development of logic as we know

    it today. Among them are:

    Aristotle (~384 BC - ~322 BC) Euclid (~325 BC - ~265 BC) Zeno (~490 BC - ~425 BC) Augustus de Morgan (1806 - 1871) George Boole (1815 -1864) Richard Dedekind (1831 - 1916) John Venn (1834 -1923) Enrst Schrder (1841 - 1902)

    Georg Cantor (1845 - 1918) Friedrich Frege (1848 - 1925) Guiseppe Peano (1858 - 1932) Alfred North Whitehead (1861 - 1947) David Hilbert (1862 -1943) Ernst Zermelo (1871-1953) Bertrand Russell (1872 - 1970) Kurt Gdel (1906 - 1978)

    We discuss fundamental concepts from mathematical logic and apply these in proving mathematical

    statements.

    We begin with a problem from the bookSymbolic Logicof Lewis Carroll (Charles Lutwidge Dodgson),

    the author ofAlice's Adventures in Wonderland.

    Problem: What conclusion can be made from the following sequence of statements?

    No birds, except ostriches, are 9 feet high.

    There are no birds in this aviary that belong to anyone but me.

    No ostrich lives on mince pies.

    I have no birds less than 9 feet high.

    1. Propositions

    Apropositionis a sentence that is either true or false, but not both.

    Examples:

    1. 4C 3 D 7:2. Obama was born on a Tuesday.

    3. .3 C 4/5 D 35 C 45:

    Not propositions:

    1. Are you from Chiba?

    2. On the train, refrain from talking on your mobile phone.

    3. This statement is false.

    1

  • 8/13/2019 lecture1-1r

    2/8

    Determine which of the following are propositions and give their truth value:

    1. How are you?

    2. It is raining outside now.

    3. Seijogakuenmae has 5 characters when written in Kanji.

    4. All odd numbers are prime.

    5. Freeze!

    6. 22m C 1 is a prime number for any integerm 0.

    7. a4 C b4 C c4 D d4 has no positive integer solutions.8. No graduate of Sophia University has become the Japanese Prime Minister.

    9. xC 4> 3:

    Note: The last statement above xC 4 > 3: is usually not considered a proposition, but a propositionalfunction. However, if we assume thatx takes on a particular value, then it becomes a proposition. In a

    similar way, the statement John is now 7 years old. becomes a proposition only when it is clear which

    John we are referring to and which time (`now') we are talking about.

    2. Operations on Propositions

    Denition: Given propositions pand q , we dene

    not p, written :p; it is True if and only ifpis False. porq , written p _ q; it is True if and only if at least one ofpand q is True. pand q , written p ^ q; it is True if and only if both pand q are True. if pthenq , or pimpliesq , written p! q; it is False if and only if pis True andq is False. pif and only ifq , written p$ q; it is True if and only ifpand q are both True or both False.

    Examples:

    1. Write in English the propositions (a) :p;(b)q^ r;(c)r! p;and (d) p _ q ifp : Today is Tuesday.

    q : Yesterday was a holiday.

    r: I will not go to the party.

    2. Write in English the propositions (a).p _ :q/ ! rand (b) : .r! p/ifp : m is an even integer.

    q :n is odd.

    r :m n C 1 is odd.3. Write in English the propositions (a)s! v, (b)s! :wand (c).w _ v/ ^ : .w ^ v/if

    s : It is summer.

    v: I take a vacation.

    w : I work.

    2

  • 8/13/2019 lecture1-1r

    3/8

    4. Using the same representations above, write the following statements in symbols:

    (a) I take a vacation only if it is summer.

    (b) When it is summer I take a vacation, but when it is not summer I work.

    (c) I work and take a vacation every summer.

    Given a propositional form (e.g. p_: .q^ r/) that is dened in terms of basic propositions, itstruthtablelists its truth value for any combination of values of the basic propositions. For example, we have

    below the truth tables for:p; p _ q; p ^ q; p! q, and p$ q:

    p :pT F

    F T

    p q p _ qT T T

    T F T

    F T T

    F F F

    p q p ^ qT T T

    T F F

    F T F

    F F F

    p q p! qT T T

    T F F

    F T T

    F F T

    p q p$ qT T T

    T F F

    F T F

    F F T

    Example: Form the truth tables of.p! q/ $ .:p _ q/and : .r_ .q^ .p! r/// :p q p! q :p :p _ q .p! q/ $ .:p _ q/T T T F T T

    T F F F F T

    F T T T T T

    F F T T T T

    Note: A propositional form that is always True is called a tautology; one that is always False is called a

    contradiction.

    Given a proposition p! q;we dene its

    contrapositive::q! :p; converse: q! pI inverse::p! :q:

    Examples: Form the contrapositive, the converse, and the inverse of the following:

    1. If 2m C 1 is a prime, thenm is a power of 2.2. Ifx ory is even, thenx y C 1 is odd.3. Ifc is a complex 5th root of unity other than 1, then c is not a real number.

    4. Ifx 2 Cy 2 D 0;thenx andy are equal to 0:

    Note:An implication p! q is equivalent to its contrapositive, but not to its converse and to its inverse.

    3. Logical Equivalence

    Two propositions P and Q are said to be logically equivalent, written P

    , Q, if and only if the

    propositionP$ Q is a tautology.

    3

  • 8/13/2019 lecture1-1r

    4/8

    Examples:

    1. .p! q/ , .:p _ q/2. .p ^ p/ , p

    .p _ p/ , p3. .p ^ :p/ , F(a contradiction)

    .p _ :p/ , T(a tautology)4. (De Morgan's laws)

    : .p _ q/ , .:p ^ :q/: .p ^ q/ , .:p _ :q/

    5. (Distributivity)

    .p

    ^.q

    _r//

    ,..p

    ^q/

    _.p

    ^r//

    .p _ .q^ r// , ..p _ q/ ^ .p _ r//6. (Double negation)

    : .:p/ , p7. (Commutativity)

    .p _ q/ , .q_p/

    .p ^ q/ , .q^p/8. (Associativity)

    .p_

    .q_

    r//,

    ..p_

    q/_

    r/

    .p ^ .q^ r// , ..p ^ q/ ^ r/9. ..p! r/ ^ .q! r// , ..p _ q/ ! r/

    ..p! r/ _ .q! r// , ..p ^ q/ ! r/10. .p! q/ , .:q! :p/

    To prove equivalence of two propositions (e.g. P, Q), we can use the following methods:

    1. Show that P$ Qis a tautology by forming its truth table.2. Show that P$ Qis a tautology by showing that Pis True if and only ifQ is True.3. Use a sequence of logical equivalences, e.g. P, R,S, , Q:

    Example: Use the three methods above to show that an implication and its contrapositive are equivalent.

    4. Logical Implication and Syllogisms

    IfP! Q is a tautology, then it is called a logical implication, written P) Q:Therefore, P) Qif and only if wheneverPis True, Q is also True.

    4

  • 8/13/2019 lecture1-1r

    5/8

    Examples:

    1. .p ^ q/ ) p.p ^ q/ ) q

    2. p) .p _ q/3. (Modus ponens)

    ..p! q/ ^ p/ ) q4. (Modus tollens)

    ..p! q/ ^ :q/ ) :p5. (Transitivity)

    ..p! q/ ^ .q! r// ) .p! r/6. ..p _ q/ ^ :p/ ) q

    Logical implications can also be written in argument form; for example, Modus Ponens can be

    expressed asp! qp

    ) q

    and as a particular example,If there is smoke, then there is re.

    There is smoke.

    Therefore, there is re.

    Example: Is the following argument, a valid argument?

    Not both A and C are telling the truth.

    A or B is telling the truth.

    If D is lying, then C is telling the truth.

    B is not telling the truth.

    Therefore, D is telling the truth.

    5. Quantiers

    As mentioned above, the statement x

    C6

    7: can be considered a propositional function P.x/:So

    P.1/is True, whereas P.0/is False. Ifx has domain the set of all positive integers, then we can form thefollowing statement:

    P.x/ is True for any x (in the domain).

    In symbols, we shall write it simply as

    8x P.x/:read For allx ; P.x/: In general, this statement is True if and only ifP.x/is True for any value ofx in

    the domain. The symbol 8 is called a universal quantier.Similarly, we have the existential quantier 9 in the following statement

    9x P.x/:read There exists an x such that P.x/ : This statement is True if and only if P.x/ is True for at least

    one value ofx in its domain.

    5

  • 8/13/2019 lecture1-1r

    6/8

    Examples:

    1. Determine which of the following statements are True:

    (a)8x x 2 >0 : .x2 R/(b)9x.2xC 1 is even/: .x2 Z/(c)8x x 2 >0! .x >0/ : .x2 R/(d)9y8x.xCyDx / : .x;y2 R/(e)8x9y.y 0/(f)8x8y...x is even/ ^ .y is odd// ! xCy is odd/: .x;y2 Z/:

    2. Express the denition of a limit of a function at a number (limx!a f .x/ D L) using quantiers.3. What conclusion can be made from the following statements (from Lewis Carroll's Symbolic Logic)?

    First express these using quantiers involving a variable x whose domain is the set of all birds.

    No birds, except ostriches, are 9 feet high.

    There are no birds in this aviary that belong to anyone but me.

    No ostrich lives on mince pies.

    I have no birds less than 9 feet high.

    4. Form the negative of the following statements so that no negations appear immediately before a

    quantier or an expression involving logical connectives:

    (a)8x.P.x/ _Q .x// :(b)9x.P.x/ ! Q.x//:(c)8x9y..P.x;y/ _ Q .x ;y// ! .R.x;y/ ^ S.x;y///

    6. Methods of Proof

    Here are the basic methods used to prove mathematical statements:

    Direct proof. To prove an implication P) Q using this method, one begins by assuming P, andthen by applying denitions/ axioms/ theorems/ other results, the conclusion Qis obtained.

    Proof by contraposition. To prove P) Q using this method, one uses the direct method of proofon its contrapositive :Q) :P:

    Proof by contradiction. Under this method, one proves a statement by rst assuming its negativeand then showing that this assumption leads to a contradiction.

    Examples: Prove the following:

    1. Ifa; b, andc are integers such thata dividesb and b dividesc;thena dividesc:

    2. For any integern;the only possible remainders whenn2 is divided by 4 are 0 and 1.

    3.8n2 Z n2 C 1 is odd ) nis even :4. There are innitely many primes.

    5. Ifris an irrational number, then np

    ris irrational for any positive integern:

    6. For any integersx andy :x2

    Cy2

    is even if and only ifx andy are both even or both odd.

    6

  • 8/13/2019 lecture1-1r

    7/8

    Exercises:

    Part I. Multiple Choice: Choose the best answer.

    1. Given the propositions:s : I sleep early. ande : I have an exam the next day., write the proposi-

    tion I don't sleep early when I have an exam the next day. in symbolic logic notations:

    (a):s! e(b):s^ e(c):e!s

    (d) e! :s

    (e) e! s

    2. Which of the following is logically equivalent to p! :q?

    (a) q! : .:p/(b):p _ q(c)

    :.p

    _q/

    (d): .p ^ q/

    (e)

    :.q

    ! p/

    3. Which of the following is false?

    (a): .p _ :q/ , .:p ^ q/(b): .p$ :q/ , .:p$ q/(c) ..p! q/ ^ .p! r// , .p! .q^ r//(d) ..p _ q/ ! r/ , ..p! r/ ^ .q! r//(e) .p$ :q/ , .:p$ q/

    4. Write using symbolic logic notations: Between any two distinct real numbers is another real num-

    ber. Use variables with domain R.

    (a)8x8y.x6D y! 9z.x

  • 8/13/2019 lecture1-1r

    8/8

    7. Using the same representation as in #5 above, express the following in symbols: Each math major

    is enrolled in exactly one foreign language class.

    8. Rewrite so that the negation appears only within predicates (so no negations outside a quantier or

    an expression involving logical connectives):

    :9y f8x9zT.x;y;z/ _ 8x8zU.x;y;z/g

    9. Determine if the following are valid arguments: (For letter b, dene symbols to represent the simple

    propositions.)

    (a)

    8>>>>>>>:

    :pr! tp _ :q.:r^s/ ! q

    ) s! t

    (b) At most half of the students will fail in this exam. Ateneo will win on Sunday (UAAP basketballgame) if someone gets a grade of A in this exam. If Ateneo wins on Sunday, then Ateneo will

    be the UAAP champion this year. Either someone gets an A in the exam or more than half fail

    in it. Therefore, Ateneo will be the UAAP champion this year.

    8