MDSlides1_2013

download MDSlides1_2013

of 163

Transcript of MDSlides1_2013

  • 8/12/2019 MDSlides1_2013

    1/163

    Mathematics for computer science

    conf.dr. Bostan Viorel

    Spring 2013 Lecture 1

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 1 / 35

  • 8/12/2019 MDSlides1_2013

    2/163

    Mathematical Logic

    1 Stefan Bilaniuk, A problem course in mathematical logic.

    2 Eric Lehman, F.Thomson Leighton, Albert R. Meyer, Math forcomputer science, MIT course.

    3 Victor Besliu, Matematica discreta, UTM.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 2 / 35

  • 8/12/2019 MDSlides1_2013

    3/163

    Mathematical Logic

    Denition

    Mathematical logic is concerned with formalizing and analyzing the kindsof reasoning used in mathematics.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 3 / 35

  • 8/12/2019 MDSlides1_2013

    4/163

    Mathematical Logic

    Denition

    Mathematical logic is concerned with formalizing and analyzing the kindsof reasoning used in mathematics.

    Part of the problem with formalizing mathematical reasoning is thenecessity of precisely specifying the language(s) in which it is to be done.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 3 / 35

  • 8/12/2019 MDSlides1_2013

    5/163

    Mathematical Logic

    Denition

    Mathematical logic is concerned with formalizing and analyzing the kindsof reasoning used in mathematics.

    Part of the problem with formalizing mathematical reasoning is thenecessity of precisely specifying the language(s) in which it is to be done.

    The natural languages spoken by humans wont do: they are so complexand continually changing as to be impossible to pin down completely.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 3 / 35

  • 8/12/2019 MDSlides1_2013

    6/163

    Mathematical Logic. Some history

    EntscheidungsproblemGiven a set of hypotheses and some statement , is there an eectivemethod for determining whether or not the hypotheses in are sucientto prove ?

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 4 / 35

  • 8/12/2019 MDSlides1_2013

    7/163

    Mathematical Logic. Some history

    EntscheidungsproblemGiven a set of hypotheses and some statement , is there an eectivemethod for determining whether or not the hypotheses in are sucientto prove ?

    Historically, this question arose out of David Hilberts scheme to securethe foundations of mathematics by axiomatizing mathematics in 1st-orderlogic, showing that the axioms in question do not give rise to anycontradictions, and that they suce to prove or disprove every statement

    (which is where the Entscheidungsproblem comes in).

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 4 / 35

  • 8/12/2019 MDSlides1_2013

    8/163

    Mathematical Logic. Some history

    EntscheidungsproblemGiven a set of hypotheses and some statement , is there an eectivemethod for determining whether or not the hypotheses in are sucientto prove ?

    Historically, this question arose out of David Hilberts scheme to securethe foundations of mathematics by axiomatizing mathematics in 1st-orderlogic, showing that the axioms in question do not give rise to anycontradictions, and that they suce to prove or disprove every statement

    (which is where the Entscheidungsproblem comes in).

    If the answer to the Entscheidungsproblem were "yes" in general, theeective method(s) in question might put mathematicians out of business.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 4 / 35

  • 8/12/2019 MDSlides1_2013

    9/163

    Mathematical Logic. Some history

    David Hilbert (1862-1943)

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 5 / 35

  • 8/12/2019 MDSlides1_2013

    10/163

    Mathematical Logic. Some history

    David Hilbert (1862-1943)

    Trying to nd a suitable formalization of the notion of"eective

    method", mathematicians developed abstract models of computation inthe 1930s: recursive functions, calculus, Turing machines, andgrammars.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 5 / 35

  • 8/12/2019 MDSlides1_2013

    11/163

    Mathematical Logic. Some history

    David Hilbert (1862-1943)

    Trying to nd a suitable formalization of the notion of"eective

    method", mathematicians developed abstract models of computation inthe 1930s: recursive functions, calculus, Turing machines, andgrammars.

    These models are very dierent,

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 5 / 35

  • 8/12/2019 MDSlides1_2013

    12/163

    Mathematical Logic. Some history

    David Hilbert (1862-1943)

    Trying to nd a suitable formalization of the notion of"eective

    method", mathematicians developed abstract models of computation inthe 1930s: recursive functions, calculus, Turing machines, andgrammars.

    These models are very dierent, but they were all essentially equivalent in

    what they could do.conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 5 / 35

  • 8/12/2019 MDSlides1_2013

    13/163

    Mathematical Logic. Some history

    This suggested the (empirical, not mathematical!) principle:

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 6 / 35

  • 8/12/2019 MDSlides1_2013

    14/163

    Mathematical Logic. Some history

    This suggested the (empirical, not mathematical!) principle:

    Church-Turing ThesisA function is eectively computable in principle in the real world if and onlyif it is computable by (any) one of the abstract models mentioned above.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 6 / 35

  • 8/12/2019 MDSlides1_2013

    15/163

    Mathematical Logic. Some history

    This suggested the (empirical, not mathematical!) principle:

    Church-Turing ThesisA function is eectively computable in principle in the real world if and onlyif it is computable by (any) one of the abstract models mentioned above.

    Alonzo Church(1903-1995)

    Alan Turing(1912-1954)

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 6 / 35

  • 8/12/2019 MDSlides1_2013

    16/163

    Mathematical Logic

    Consider some sequences taken from English language:

    1 "You may have cake or you may have ice cream."

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 7 / 35

    M h i l L i

  • 8/12/2019 MDSlides1_2013

    17/163

    Mathematical Logic

    Consider some sequences taken from English language:

    1 "You may have cake or you may have ice cream."

    2 "If you dont clean your room, then you wont play Counter Strike!"

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 7 / 35

    M h i l L i

  • 8/12/2019 MDSlides1_2013

    18/163

    Mathematical Logic

    Consider some sequences taken from English language:

    1 "You may have cake or you may have ice cream."

    2 "If you dont clean your room, then you wont play Counter Strike!"

    3 "If pigs can y, then you can understand the Banach-TarskyTheorem."

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 7 / 35

    M h i l L i

  • 8/12/2019 MDSlides1_2013

    19/163

    Mathematical Logic

    Consider some sequences taken from English language:

    1 "You may have cake or you may have ice cream."

    2 "If you dont clean your room, then you wont play Counter Strike!"

    3 "If pigs can y, then you can understand the Banach-TarskyTheorem."

    4 "If you can solve any problem we come up with in this class, then youget grade 10 for this course."

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 7 / 35

    M th ti l L i

  • 8/12/2019 MDSlides1_2013

    20/163

    Mathematical Logic

    Consider some sequences taken from English language:

    1 "You may have cake or you may have ice cream."

    2 "If you dont clean your room, then you wont play Counter Strike!"

    3 "If pigs can y, then you can understand the Banach-TarskyTheorem."

    4 "If you can solve any problem we come up with in this class, then youget grade 10 for this course."

    5 "Every human has a dream."

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 7 / 35

    M th ti l L i

  • 8/12/2019 MDSlides1_2013

    21/163

    Mathematical Logic

    "You may have cake or you may have ice cream."

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 8 / 35

    Mathematical Logic

  • 8/12/2019 MDSlides1_2013

    22/163

    Mathematical Logic

    "You may have cake or you may have ice cream."

    Can you have both cake and ice cream or must you choose just one desert?

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 8 / 35

    Mathematical Logic

  • 8/12/2019 MDSlides1_2013

    23/163

    Mathematical Logic

    "You may have cake or you may have ice cream."

    Can you have both cake and ice cream or must you choose just one desert?

    "If you dont clean your room, then you wont play Counter Strike!"

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 8 / 35

    Mathematical Logic

  • 8/12/2019 MDSlides1_2013

    24/163

    Mathematical Logic

    "You may have cake or you may have ice cream."

    Can you have both cake and ice cream or must you choose just one desert?

    "If you dont clean your room, then you wont play Counter Strike!"

    If you arent playing the game, does it mean that you didnt clean yourroom?

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 8 / 35

    Mathematical Logic

  • 8/12/2019 MDSlides1_2013

    25/163

    Mathematical Logic

    "You may have cake or you may have ice cream."

    Can you have both cake and ice cream or must you choose just one desert?

    "If you dont clean your room, then you wont play Counter Strike!"

    If you arent playing the game, does it mean that you didnt clean yourroom?

    "If pigs can y, then you can understand the Banach-Tarsky Theorem."

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 8 / 35

    Mathematical Logic

  • 8/12/2019 MDSlides1_2013

    26/163

    Mathematical Logic

    "You may have cake or you may have ice cream."

    Can you have both cake and ice cream or must you choose just one desert?

    "If you dont clean your room, then you wont play Counter Strike!"

    If you arent playing the game, does it mean that you didnt clean yourroom?

    "If pigs can y, then you can understand the Banach-Tarsky Theorem."

    If this is true, then is the Banach-Tarsky Theorem incomprehensible?

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 8 / 35

    Mathematical Logic

  • 8/12/2019 MDSlides1_2013

    27/163

    Mathematical Logic

    "If you can solve any problem we come up with in this class, then you getgrade 10 for this course."

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 9 / 35

    Mathematical Logic

  • 8/12/2019 MDSlides1_2013

    28/163

    Mathematical Logic

    "If you can solve any problem we come up with in this class, then you getgrade 10 for this course."

    If you can solve some problems we come up with but not all, then do you

    get a 10 for the course?

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 9 / 35

    Mathematical Logic

  • 8/12/2019 MDSlides1_2013

    29/163

    Mathematical Logic

    "If you can solve any problem we come up with in this class, then you getgrade 10 for this course."

    If you can solve some problems we come up with but not all, then do you

    get a 10 for the course?And can you still get a 10 even if you cant solve any of the problems?

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 9 / 35

    Mathematical Logic

  • 8/12/2019 MDSlides1_2013

    30/163

    Mathematical Logic

    "If you can solve any problem we come up with in this class, then you getgrade 10 for this course."

    If you can solve some problems we come up with but not all, then do you

    get a 10 for the course?And can you still get a 10 even if you cant solve any of the problems?

    "Every human has a dream."

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 9 / 35

    Mathematical Logic

  • 8/12/2019 MDSlides1_2013

    31/163

    Mathematical Logic

    "If you can solve any problem we come up with in this class, then you getgrade 10 for this course."

    If you can solve some problems we come up with but not all, then do you

    get a 10 for the course?And can you still get a 10 even if you cant solve any of the problems?

    "Every human has a dream."

    Does the last sentence imply that all humans have the same dream ormight they each have a dierent dream?

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 9 / 35

    Mathematical Logic

  • 8/12/2019 MDSlides1_2013

    32/163

    g

    Some uncertainty is tolerable in normal conversation. But ...

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 10 / 35

    Mathematical Logic

  • 8/12/2019 MDSlides1_2013

    33/163

    g

    Some uncertainty is tolerable in normal conversation. But ...

    Imperativ!We need to formulate ideas precisely as in mathematics.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 10 / 35

    Mathematical Logic

  • 8/12/2019 MDSlides1_2013

    34/163

    g

    Some uncertainty is tolerable in normal conversation. But ...

    Imperativ!We need to formulate ideas precisely as in mathematics. The ambiguitiesinherent in everyday language become a real problem!

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 10 / 35

    Mathematical Logic

  • 8/12/2019 MDSlides1_2013

    35/163

    g

    Some uncertainty is tolerable in normal conversation. But ...

    Imperativ!We need to formulate ideas precisely as in mathematics. The ambiguitiesinherent in everyday language become a real problem!

    We cant hope to make an exact argument if were not sure exactly whatthe individual words mean.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 10 / 35

    Mathematical Logic

  • 8/12/2019 MDSlides1_2013

    36/163

    Some uncertainty is tolerable in normal conversation. But ...

    Imperativ!We need to formulate ideas precisely as in mathematics. The ambiguitiesinherent in everyday language become a real problem!

    We cant hope to make an exact argument if were not sure exactly whatthe individual words mean.

    To get around the ambiguity of English, mathematicians have devised aspecial language for talking about logical relationships.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 10 / 35

    Mathematical Logic

  • 8/12/2019 MDSlides1_2013

    37/163

    Some uncertainty is tolerable in normal conversation. But ...

    Imperativ!We need to formulate ideas precisely as in mathematics. The ambiguitiesinherent in everyday language become a real problem!

    We cant hope to make an exact argument if were not sure exactly whatthe individual words mean.

    To get around the ambiguity of English, mathematicians have devised aspecial language for talking about logical relationships.

    This language mostly uses ordinary English words and phrases such as

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 10 / 35

    Mathematical Logic

  • 8/12/2019 MDSlides1_2013

    38/163

    Some uncertainty is tolerable in normal conversation. But ...

    Imperativ!We need to formulate ideas precisely as in mathematics. The ambiguitiesinherent in everyday language become a real problem!

    We cant hope to make an exact argument if were not sure exactly whatthe individual words mean.

    To get around the ambiguity of English, mathematicians have devised aspecial language for talking about logical relationships.

    This language mostly uses ordinary English words and phrases such as"or",

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 10 / 35

    Mathematical Logic

  • 8/12/2019 MDSlides1_2013

    39/163

    Some uncertainty is tolerable in normal conversation. But ...

    Imperativ!We need to formulate ideas precisely as in mathematics. The ambiguitiesinherent in everyday language become a real problem!

    We cant hope to make an exact argument if were not sure exactly whatthe individual words mean.

    To get around the ambiguity of English, mathematicians have devised aspecial language for talking about logical relationships.

    This language mostly uses ordinary English words and phrases such as"or", "implies",

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 10 / 35

    Mathematical Logic

  • 8/12/2019 MDSlides1_2013

    40/163

    Some uncertainty is tolerable in normal conversation. But ...

    Imperativ!We need to formulate ideas precisely as in mathematics. The ambiguitiesinherent in everyday language become a real problem!

    We cant hope to make an exact argument if were not sure exactly whatthe individual words mean.

    To get around the ambiguity of English, mathematicians have devised aspecial language for talking about logical relationships.

    This language mostly uses ordinary English words and phrases such as"or", "implies", and "for all".

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 10 / 35

    Mathematical Logic

  • 8/12/2019 MDSlides1_2013

    41/163

    Some uncertainty is tolerable in normal conversation. But ...

    Imperativ!We need to formulate ideas precisely as in mathematics. The ambiguitiesinherent in everyday language become a real problem!

    We cant hope to make an exact argument if were not sure exactly whatthe individual words mean.

    To get around the ambiguity of English, mathematicians have devised aspecial language for talking about logical relationships.

    This language mostly uses ordinary English words and phrases such as"or", "implies", and "for all".

    But mathematicians endow these words with denitionsmore precisethanthose found in an ordinary dictionary.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 10 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    42/163

    Propositional logic formalizes the reasoning that can be done with

    connectivessuch as not, and, or, and if . . . then.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 11 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    43/163

    Propositional logic formalizes the reasoning that can be done with

    connectivessuch as not, and, or, and if . . . then.

    Dene the formal language of propositional logic, LPby specifying itssymbols and rules for assembling these symbols into the formulas of thelanguage.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 11 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    44/163

    Propositional logic formalizes the reasoning that can be done with

    connectivessuch as not, and, or, and if . . . then.

    Dene the formal language of propositional logic, LPby specifying itssymbols and rules for assembling these symbols into the formulas of thelanguage.

    Denition

    The symbols ofLP are:

    1 Parentheses: ( and )

    2 Connectives: : and !

    3 Atomic formulas: A0, A1, A2,. . ., An,. . .

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 11 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    45/163

    How to put together the symbols ofLP?

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 12 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    46/163

    How to put together the symbols ofLP?

    Denition

    The formulas ofLPare those nite sequences or strings of the symbolsgiven in previous denition which satisfy the following rules:

    1 Every atomic formula is a formula;2 If is a formula, then (:) is a formula;

    3 If and are formulas, then (!) is a formula;

    4 No other sequence of symbols is a formula.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 12 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    47/163

    How to put together the symbols ofLP?

    Denition

    The formulas ofLPare those nite sequences or strings of the symbolsgiven in previous denition which satisfy the following rules:

    1 Every atomic formula is a formula;2 If is a formula, then (:) is a formula;

    3 If and are formulas, then (!) is a formula;

    4 No other sequence of symbols is a formula.

    Use lower-case Greek characters to represent formulas, and upper-caseGreek characters to represent sets of formulas.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 12 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    48/163

    A0 = "The moon is red"

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 13 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    49/163

    A0 = "The moon is red"

    A1 = "The moon is made of cheese"

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 13 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    50/163

    A0 = "The moon is red"

    A1 = "The moon is made of cheese"

    Then

    (A0 !(:A1))

    means

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 13 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    51/163

    A0 = "The moon is red"

    A1 = "The moon is made of cheese"

    Then

    (A0 !(:A1))

    meansIf the moon is red, then it is not made of cheese!

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 13 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    52/163

    A0 = "The moon is red"

    A1 = "The moon is made of cheese"

    Then

    (A0 !(:A1))

    meansIf the moon is red, then it is not made of cheese!

    These are formulas:

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 13 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    53/163

    A0 = "The moon is red"

    A1 = "The moon is made of cheese"

    Then

    (A0 !(:A1))

    meansIf the moon is red, then it is not made of cheese!

    These are formulas:A2013,

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 13 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    54/163

    A0 = "The moon is red"

    A1 = "The moon is made of cheese"

    Then

    (A0 !(:A1))

    meansIf the moon is red, then it is not made of cheese!

    These are formulas:A2013,(A100 !A1),

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 13 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    55/163

    A0 = "The moon is red"

    A1 = "The moon is made of cheese"

    Then

    (A0 !(:A1))

    meansIf the moon is red, then it is not made of cheese!

    These are formulas:A2013,(A100 !A1),(A0 !A0),

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 13 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    56/163

    A0 = "The moon is red"

    A1 = "The moon is made of cheese"

    Then

    (A0 !(:A1))

    meansIf the moon is red, then it is not made of cheese!

    These are formulas:A2013,(A100 !A1),(A0 !A0),((:A1)!(A2 !A231 ))

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 13 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    57/163

    A0 = "The moon is red"

    A1 = "The moon is made of cheese"

    Then

    (A0 !(:A1))

    meansIf the moon is red, then it is not made of cheese!

    These are formulas:A2013,(A100 !A1),(A0 !A0),((:A1)!(A2 !A231 ))

    These are NOT formulas:

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 13 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    58/163

    A0 = "The moon is red"

    A1 = "The moon is made of cheese"

    Then

    (A0 !(:A1))

    meansIf the moon is red, then it is not made of cheese!

    These are formulas:A2013,(A100 !A1),(A0 !A0),((:A1)!(A2 !A231 ))

    These are NOT formulas:X2,

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 13 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    59/163

    A0 = "The moon is red"

    A1 = "The moon is made of cheese"

    Then

    (A0 !(:A1))

    meansIf the moon is red, then it is not made of cheese!

    These are formulas:A2013,(A100 !A1),(A0 !A0),((:A1)!(A2 !A231 ))

    These are NOT formulas:X2,(A3),

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 13 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    60/163

    A0 = "The moon is red"

    A1 = "The moon is made of cheese"

    Then

    (A0 !(:A1))

    meansIf the moon is red, then it is not made of cheese!

    These are formulas:A2013,(A100 !A1),(A0 !A0),((:A1)!(A2 !A231 ))

    These are NOT formulas:X2,(A3),(A0 !(:A1),

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 13 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    61/163

    A0 = "The moon is red"

    A1 = "The moon is made of cheese"

    Then

    (A0 !(:A1))

    meansIf the moon is red, then it is not made of cheese!

    These are formulas:A2013,(A100 !A1),(A0 !A0),((:A1)!(A2 !A231 ))

    These are NOT formulas:X2,(A3),(A0 !(:A1),(A7:A1),

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 13 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    62/163

    A0 = "The moon is red"

    A1 = "The moon is made of cheese"

    Then

    (A0 !(:A1))

    meansIf the moon is red, then it is not made of cheese!

    These are formulas:A2013,(A100 !A1),(A0 !A0),((:A1)!(A2 !A231 ))

    These are NOT formulas:X2,(A3),(A0 !(:A1),(A7:A1),A2 !A0

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 13 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    63/163

    Use the symbols ^, _, and $ to represent and, or, and if and only if,respectively.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 14 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    64/163

    Use the symbols ^, _, and $ to represent and, or, and if and only if,respectively.

    Since they are not among the symbols ofLP , we will use them asabbreviations for certain constructions involving only : : and ! .

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 14 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    65/163

    Use the symbols ^, _, and $ to represent and, or, and if and only if,respectively.

    Since they are not among the symbols ofLP , we will use them asabbreviations for certain constructions involving only : : and ! .

    Namely,

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 14 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    66/163

    Use the symbols ^, _, and $ to represent and, or, and if and only if,respectively.

    Since they are not among the symbols ofLP , we will use them asabbreviations for certain constructions involving only : : and ! .

    Namely,

    ( ^) is short for (:(!(:)))

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 14 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    67/163

    Use the symbols ^, _, and $ to represent and, or, and if and only if,respectively.

    Since they are not among the symbols ofLP , we will use them asabbreviations for certain constructions involving only : : and ! .

    Namely,

    ( ^) is short for (:(!(:)))

    ( _) is short for ((:)!)

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 14 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    68/163

    Use the symbols ^, _, and $ to represent and, or, and if and only if,respectively.

    Since they are not among the symbols ofLP , we will use them asabbreviations for certain constructions involving only : : and ! .

    Namely,

    ( ^) is short for (:(!(:)))

    ( _) is short for ((:)!)

    ($) is short for ((!) ^ (!))

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 14 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    69/163

    Use the symbols ^, _, and $ to represent and, or, and if and only if,respectively.

    Since they are not among the symbols ofLP , we will use them asabbreviations for certain constructions involving only : : and ! .

    Namely,

    ( ^) is short for (:(!(:)))

    ( _) is short for ((:)!)

    ($) is short for ((!) ^ (!))

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 14 / 35

    Propositional Logic

    U h b l d d d if d l if

  • 8/12/2019 MDSlides1_2013

    70/163

    Use the symbols ^, _, and $ to represent and, or, and if and only if,respectively.

    Since they are not among the symbols ofLP , we will use them asabbreviations for certain constructions involving only : : and ! .

    Namely,

    ( ^) is short for (:(!(:)))

    ( _) is short for ((:)!)

    ($) is short for ((!) ^ (!))

    "The moon is red and made of cheese" is written as(A0 ^ A1).

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 14 / 35

    Propositional Logic

    U h b l ^ _ d d d if d l if

  • 8/12/2019 MDSlides1_2013

    71/163

    Use the symbols ^, _, and $ to represent and, or, and if and only if,respectively.

    Since they are not among the symbols ofLP , we will use them asabbreviations for certain constructions involving only : : and ! .

    Namely,

    ( ^) is short for (:(!(:)))

    ( _) is short for ((:)!)

    ($) is short for ((!) ^ (!))

    "The moon is red and made of cheese" is written as(A0 ^ A1).

    Or actually is (:(A0 !(:A1)))

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 14 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    72/163

    For simplicity adapt informal conventions (that will allow us to use fewer

    parentheses):

    Drop the outermost parentheses in a formula, writing ! insteadof(!) and : instead of(:);

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 15 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    73/163

    For simplicity adapt informal conventions (that will allow us to use fewer

    parentheses):

    Drop the outermost parentheses in a formula, writing ! insteadof(!) and : instead of(:);

    Let : take precedence over ! when parentheses are missing, so:! is short for ((:)! ), and t the informal connectivesinto this scheme by letting the order of precedence be:

    :, ^, _, !, $;

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 15 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    74/163

    For simplicity adapt informal conventions (that will allow us to use fewer

    parentheses):

    Drop the outermost parentheses in a formula, writing ! insteadof(!) and : instead of(:);

    Let : take precedence over ! when parentheses are missing, so:! is short for ((:)! ), and t the informal connectivesinto this scheme by letting the order of precedence be:

    :, ^, _, !, $;

    Group repetitions of!, ^, _, or$ to the right when parenthesesare missing, so !! is short for ((!)!).

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 15 / 35

    Propositional Logic

    Denition

  • 8/12/2019 MDSlides1_2013

    75/163

    Denition

    Suppose is a formula ofLP. The set of subformulas of, S(), is

    dened as follows:

    1 If is an atomic formula, then S() =fg ;

    2 If is (:), then S() =S() [ f:g ;

    3 If is (!), then S() =S() [ S() [ f(! )g .

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 16 / 35

    Propositional Logic

    Denition

  • 8/12/2019 MDSlides1_2013

    76/163

    Denition

    Suppose is a formula ofLP. The set of subformulas of, S(), is

    dened as follows:

    1 If is an atomic formula, then S() =fg ;

    2 If is (:), then S() =S() [ f:g ;

    3 If is (!), then S() =S() [ S() [ f(! )g .

    For example, let be the formula

    (((:A0)!A1)!(A2 !(:A1)))

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 16 / 35

    Propositional Logic

    Denition

  • 8/12/2019 MDSlides1_2013

    77/163

    Suppose is a formula ofLP. The set of subformulas of, S(), is

    dened as follows:

    1 If is an atomic formula, then S() =fg ;

    2 If is (:), then S() =S() [ f:g ;

    3 If is (!), then S() =S() [ S() [ f(! )g .

    For example, let be the formula

    (((:A0)!A1)!(A2 !(:A1)))

    Then

    S() =fA0, A1, A2,(:A0),((:A0)!A1),(:A1),(A2 !(:A1)),g

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 16 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    78/163

    Observe that dropping parentheses convention allow us to rewrite

    (((:A0)!A1)!(A2 !(:A1)))

    in

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 17 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    79/163

    Observe that dropping parentheses convention allow us to rewrite

    (((:A0)!A1)!(A2 !(:A1)))

    in(:A0 !A1)!(A2 ! :A1)

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 17 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    80/163

    Observe that dropping parentheses convention allow us to rewrite

    (((:A0)!A1)!(A2 !(:A1)))

    in(:A0 !A1)!(A2 ! :A1)

    and

    S() =fA0, A1, A2,(:A0),((:A0)!A1),(:A1),(A2 !(:A1)),g

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 17 / 35

    Propositional Logic

    O

  • 8/12/2019 MDSlides1_2013

    81/163

    Observe that dropping parentheses convention allow us to rewrite

    (((:A0)!A1)!(A2 !(:A1)))

    in(:A0 !A1)!(A2 ! :A1)

    and

    S() =fA0, A1, A2,(:A0),((:A0)!A1),(:A1),(A2 !(:A1)),g

    can be rewritten as

    S() =fA0, A1, A2, :A0, :A0 !A1, :A1, A2 ! :A1, g

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 17 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    82/163

    :A0 ^ :A1 $ :(A0 _ A1)

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 18 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    83/163

    :A0 ^ :A1 $ :(A0 _ A1)

    Using parentheses it should be

    (((:A0) ^ (:A1)) $(:(A0 _ A1)))

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 18 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    84/163

    :A0 ^ :A1 $ :(A0 _ A1)

    Using parentheses it should be

    (((:A0) ^ (:A1)) $(:(A0 _ A1)))

    The subformullas are

    S() =fA0, A1, :A0, :A1, :A0 ^ :A1, A0 _ A1, :(A0 _ A1), g

    conf dr Bostan Viorel () MathDisc Spring 2013 Lecture 1 18 / 35

    Propositional Logic

    Whether a given formula ofLP is true or false usually depends on howwe interpret the atomic formulas which appear in

  • 8/12/2019 MDSlides1_2013

    85/163

    we interpret the atomic formulas which appear in .

    conf dr Bostan Viorel () MathDisc Spring 2013 Lecture 1 19 / 35

    Propositional Logic

    Whether a given formula ofLP is true or false usually depends on howwe interpret the atomic formulas which appear in

  • 8/12/2019 MDSlides1_2013

    86/163

    we interpret the atomic formulas which appear in .

    If=fA2g and A2 = "2+2=4",

    conf dr Bostan Viorel () MathDisc Spring 2013 Lecture 1 19 / 35

    Propositional Logic

    Whether a given formula ofLP is true or false usually depends on howwe interpret the atomic formulas which appear in

  • 8/12/2019 MDSlides1_2013

    87/163

    we interpret the atomic formulas which appear in .

    If=fA2g and A2 = "2+2=4", then is True,

    conf dr Bostan Viorel () MathDisc Spring 2013 Lecture 1 19 / 35

    Propositional Logic

    Whether a given formula ofLP is true or false usually depends on howwe interpret the atomic formulas which appear in

  • 8/12/2019 MDSlides1_2013

    88/163

    we interpret the atomic formulas which appear in .

    If=fA2g and A2 = "2+2=4", then is True,but ifA2 = "The moon is made of cheese",

    conf dr Bostan Viorel () MathDisc Spring 2013 Lecture 1 19 / 35

    Propositional Logic

    Whether a given formula ofLP is true or false usually depends on howwe interpret the atomic formulas which appear in

  • 8/12/2019 MDSlides1_2013

    89/163

    we interpret the atomic formulas which appear in .

    If=fA2g and A2 = "2+2=4", then is True,but ifA2 = "The moon is made of cheese", it is False.

    conf dr Bostan Viorel () MathDisc Spring 2013 Lecture 1 19 / 35

    Propositional Logic

    Whether a given formula ofLP is true or false usually depends on howwe interpret the atomic formulas which appear in .

  • 8/12/2019 MDSlides1_2013

    90/163

    we interpret the atomic formulas which appear in .

    If=fA2g and A2 = "2+2=4", then is True,but ifA2 = "The moon is made of cheese", it is False.

    Not any statement can be assigned true or false value.

    conf dr Bostan Viorel () MathDisc Spring 2013 Lecture 1 19 / 35

    Propositional Logic

    Whether a given formula ofLP is true or false usually depends on howwe interpret the atomic formulas which appear in .

  • 8/12/2019 MDSlides1_2013

    91/163

    we interpret the atomic formulas which appear in .

    If=fA2g and A2 = "2+2=4", then is True,but ifA2 = "The moon is made of cheese", it is False.

    Not any statement can be assigned true or false value.

    A0 = "This statement is false"

    conf dr Bostan Viorel () MathDisc Spring 2013 Lecture 1 19 / 35

    Propositional Logic

    Whether a given formula ofLP is true or false usually depends on howwe interpret the atomic formulas which appear in .

  • 8/12/2019 MDSlides1_2013

    92/163

    p pp

    If=fA2g and A2 = "2+2=4", then is True,but ifA2 = "The moon is made of cheese", it is False.

    Not any statement can be assigned true or false value.

    A0 = "This statement is false"

    At this stage logical relationships are important.

    conf dr Bostan Viorel () MathDisc Spring 2013 Lecture 1 19 / 35

    Propositional Logic

    Whether a given formula ofLP is true or false usually depends on howwe interpret the atomic formulas which appear in .

  • 8/12/2019 MDSlides1_2013

    93/163

    p pp

    If=fA2g and A2 = "2+2=4", then is True,but ifA2 = "The moon is made of cheese", it is False.

    Not any statement can be assigned true or false value.

    A0 = "This statement is false"

    At this stage logical relationships are important.

    Lets dene how any assignment of truth values T ("true") and F ("false")

    to atomic formulas ofLPcan be extended to all other formulas.

    conf dr Bostan Viorel () MathDisc Spring 2013 Lecture 1 19 / 35

    Propositional Logic

    Whether a given formula ofLP is true or false usually depends on howwe interpret the atomic formulas which appear in .

  • 8/12/2019 MDSlides1_2013

    94/163

    p pp

    If=fA2g and A2 = "2+2=4", then is True,but ifA2 = "The moon is made of cheese", it is False.

    Not any statement can be assigned true or false value.

    A0 = "This statement is false"

    At this stage logical relationships are important.

    Lets dene how any assignment of truth values T ("true") and F ("false")

    to atomic formulas ofLPcan be extended to all other formulas.

    We will also get a reasonable denition of what it means for a formula ofLPto follow logically from other formulas.

    conf dr Bostan Viorel () MathDisc Spring 2013 Lecture 1 19 / 35

    Propositional Logic

    Denition

    A truth assignment is a function v whose domain is the set of all formulas

  • 8/12/2019 MDSlides1_2013

    95/163

    A truth assignment is a function vwhose domain is the set of all formulas

    ofLPand whose range is the set fT; Fg of truth values, such that:

    conf dr Bostan Viorel () MathDisc Spring 2013 Lecture 1 20 / 35

    Propositional Logic

    Denition

    A truth assignment is a function v whose domain is the set of all formulas

  • 8/12/2019 MDSlides1_2013

    96/163

    A truth assignment is a function vwhose domain is the set of all formulas

    ofLPand whose range is the set fT; Fg of truth values, such that:1 v(An ) is dened for every atomic formula An.

    conf dr Bostan Viorel () MathDisc Spring 2013 Lecture 1 20 / 35

    Propositional Logic

    Denition

    A truth assignment is a function v whose domain is the set of all formulas

  • 8/12/2019 MDSlides1_2013

    97/163

    A truth assignment is a function vwhose domain is the set of all formulas

    ofLPand whose range is the set fT; Fg of truth values, such that:1 v(An ) is dened for every atomic formula An.

    2 For any formula ,

    v((:)) = T,

    ifv

    () =F,

    F, ifv() =T,

    conf dr Bostan Viorel () MathDisc Spring 2013 Lect re 1 20 / 35

    Propositional Logic

    Denition

    A truth assignment is a function v whose domain is the set of all formulas

  • 8/12/2019 MDSlides1_2013

    98/163

    A truth assignment is a function vwhose domain is the set of all formulas

    ofLPand whose range is the set fT; Fg of truth values, such that:1 v(An ) is dened for every atomic formula An.

    2 For any formula ,

    v((:)) = T, ifv

    () =F,

    F, ifv() =T,

    3 For any formulas and ,

    v((!)) = F, ifv() =T and v() =F

    T, otherwise,

    f d B t Vi l () M thDi S i 2013 L t 1 20 / 35

    Propositional Logic

    Denition

    A truth assignment is a function v whose domain is the set of all formulas

  • 8/12/2019 MDSlides1_2013

    99/163

    A truth assignment is a function vwhose domain is the set of all formulas

    ofLPand whose range is the set fT; Fg of truth values, such that:1 v(An ) is dened for every atomic formula An.

    2 For any formula ,

    v((:)) = T, ifv(

    ) =F,

    F, ifv() =T,

    3 For any formulas and ,

    v((!)) = F, ifv() =T and v() =F

    T, otherwise,

    f d B t Vi l () M thDi S i 2013 L t 1 20 / 35

    Propositional Logic

    Denition

    A truth assignment is a function vwhose domain is the set of all formulas

  • 8/12/2019 MDSlides1_2013

    100/163

    g

    ofLPand whose range is the set fT; Fg of truth values, such that:1 v(An ) is dened for every atomic formula An.

    2 For any formula ,

    v((:)) = T, ifv() =F,

    F, ifv() =T,

    3 For any formulas and ,

    v((!)) = F, ifv() =T and v() =F

    T, otherwise,

    Truth assignment of implication, !, means that T !F is false.

    f d B t Vi l () M thDi S i 2013 L t 1 20 / 35

    Propositional Logic

    Example.

    Supposevis a truth assignment such that v(A0) = T and v(A1) =F.

  • 8/12/2019 MDSlides1_2013

    101/163

    f d B t Vi l () M thDi S i 2013 L t 1 21 / 35

    Propositional Logic

    Example.

    Supposevis a truth assignment such that v(A0) = T and v(A1) =F.

  • 8/12/2019 MDSlides1_2013

    102/163

    Then we want to know the truth assignmemnt

    v(((:A1)!(A0 !A1)))

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 21 / 35

    Propositional Logic

    Example.

    Supposevis a truth assignment such that v(A0) = T and v(A1) =F.

  • 8/12/2019 MDSlides1_2013

    103/163

    Then we want to know the truth assignmemnt

    v(((:A1)!(A0 !A1)))

    A0 A1 (:A1) (A0 !A1) ((:A1)!(A0 !A1))T F T F F

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 21 / 35

    Propositional Logic

    Example.

    Supposevis a truth assignment such that v(A0) = T and v(A1) =F.

  • 8/12/2019 MDSlides1_2013

    104/163

    Then we want to know the truth assignmemnt

    v(((:A1)!(A0 !A1)))

    A0 A1 (:A1) (A0 !A1) ((:A1)!(A0 !A1))T F T F F

    In other words we showed that ifv(A0) =T and v(A1) =F, then

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 21 / 35

    Propositional Logic

    Example.

    Supposevis a truth assignment such that v(A0) = T and v(A1) =F.

  • 8/12/2019 MDSlides1_2013

    105/163

    Then we want to know the truth assignmemnt

    v(((:A1)!(A0 !A1)))

    A0 A1 (:A1) (A0 !A1) ((:A1)!(A0 !A1))T F T F F

    In other words we showed that ifv(A0) =T and v(A1) =F, then

    v(((:A1)!(A0 !A1))) =F

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 21 / 35

    Propositional Logic

    Example.

    Supposevis a truth assignment such that v(A0) = T and v(A1) =F.

  • 8/12/2019 MDSlides1_2013

    106/163

    Then we want to know the truth assignmemnt

    v(((:A1)!(A0 !A1)))

    A0 A1 (:A1) (A0 !A1) ((:A1)!(A0 !A1))T F T F F

    In other words we showed that ifv(A0) =T and v(A1) =F, then

    v(((:A1)!(A0 !A1))) =F

    What if another truth asignment is given?

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 21 / 35

    Propositional Logic

    Example.

    Supposevis a truth assignment such that v(A0) = T and v(A1) =F.

  • 8/12/2019 MDSlides1_2013

    107/163

    Then we want to know the truth assignmemnt

    v(((:A1)!(A0 !A1)))

    A0 A1 (:A1) (A0 !A1) ((:A1)!(A0 !A1))T F T F F

    In other words we showed that ifv(A0) =T and v(A1) =F, then

    v(((:A1)!(A0 !A1))) =F

    What if another truth asignment is given? Say v(A0) =F and v(A1) =F.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 21 / 35

    Propositional Logic

    Construct the so-called truth table with all possible truth asignments:

  • 8/12/2019 MDSlides1_2013

    108/163

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 22 / 35

    Propositional Logic

    Construct the so-called truth table with all possible truth asignments:

  • 8/12/2019 MDSlides1_2013

    109/163

    A0 A1 (:A1) (A0 !A1) ((:A1)!(A0 !A1))

    T T F T T

    T F T F F

    F T F T T

    F F T T T

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 22 / 35

    Propositional Logic

    Construct the so-called truth table with all possible truth asignments:

  • 8/12/2019 MDSlides1_2013

    110/163

    A0 A1 (:A1) (A0 !A1) ((:A1)!(A0 !A1))

    T T F T T

    T F T F F

    F T F T T

    F F T T T

    Clearly, if there are three atomic formulas present, then we will have 8possible dierent truth asignments.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 22 / 35

    Propositional Logic

    Construct the so-called truth table with all possible truth asignments:

  • 8/12/2019 MDSlides1_2013

    111/163

    A0 A1 (:A1) (A0 !A1) ((:A1)!(A0 !A1))

    T T F T T

    T F T F F

    F T F T T

    F F T T T

    Clearly, if there are three atomic formulas present, then we will have 8possible dierent truth asignments.

    How about n atomic formulas?

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 22 / 35

    Propositional Logic

    Construct the so-called truth table with all possible truth asignments:

  • 8/12/2019 MDSlides1_2013

    112/163

    A0 A1 (:A1) (A0 !A1) ((:A1)!(A0 !A1))

    T T F T T

    T F T F F

    F T F T T

    F F T T T

    Clearly, if there are three atomic formulas present, then we will have 8possible dierent truth asignments.

    How about n atomic formulas? Answer:

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 22 / 35

    Propositional Logic

    Construct the so-called truth table with all possible truth asignments:

  • 8/12/2019 MDSlides1_2013

    113/163

    A0 A1 (:A1) (A0 !A1) ((:A1)!(A0 !A1))

    T T F T T

    T F T F F

    F T F T T

    F F T T T

    Clearly, if there are three atomic formulas present, then we will have 8possible dierent truth asignments.

    How about n atomic formulas? Answer: 2n possible truth asignments

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 22 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    114/163

    A0 A1 A2 . . . An1 An Subformulas

    T T T . . . T T

    T T T . . . T F

    T T T . . . F F

    . . . . . . . . . . . . . . . . . .

    F F F . . . F T

    F F F . . . F F

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 23 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    115/163

    PropositionSuppose is any formula and uand vare truth assignments such thatu(An ) =v(An ) for all atomic formulas An which occur in . Thenu() =v().

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 24 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    116/163

    PropositionSuppose is any formula and uand vare truth assignments such thatu(An ) =v(An ) for all atomic formulas An which occur in . Thenu() =v().

    Corollary

    Supposeuand vare truth assignments such that u(An ) =v(An ) for everyatomic formulaAn. Then u=v, i.e. u() =v() for every formula .

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 24 / 35

    Propositional Logic

    :

    T F

  • 8/12/2019 MDSlides1_2013

    117/163

    F T

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 25 / 35

    Propositional Logic

    :

    T F

  • 8/12/2019 MDSlides1_2013

    118/163

    F T

    !

    T T T

    T F F

    F T TF F T

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 25 / 35

    Propositional Logic

    :

    T F

  • 8/12/2019 MDSlides1_2013

    119/163

    F T

    !

    T T T

    T F F

    F T TF F T

    ^ :(!(:))

    T T T T

    T F F F

    F T F F

    F F F F

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 25 / 35

    Propositional Logic

    _

  • 8/12/2019 MDSlides1_2013

    120/163

    T T T

    T F T

    F T T

    F F F

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 26 / 35

    Propositional Logic

    _

  • 8/12/2019 MDSlides1_2013

    121/163

    T T T

    T F T

    F T T

    F F F

    $

    T T T

    T F F

    F T F

    F F T

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 26 / 35

    Propositional LogicDenition

    Ifv is a truth assignment and is a formula, we will often say that vsatises ifv() =T . Similarly, if is a set of formulas, we will often

  • 8/12/2019 MDSlides1_2013

    122/163

    say that v satises ifv() =T for every 2 . We will say that (respectively, ) is satisable if there is some truth assignment whichsatises it.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 27 / 35

    Propositional LogicDenition

    Ifv is a truth assignment and is a formula, we will often say that vsatises ifv() =T . Similarly, if is a set of formulas, we will often

    ( )

  • 8/12/2019 MDSlides1_2013

    123/163

    say that v satises ifv() =T for every 2 . We will say that (respectively, ) is satisable if there is some truth assignment whichsatises it.

    Denition

    A formula is a tautology if it is satised by every truth assignment.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 27 / 35

    Propositional LogicDenition

    Ifv is a truth assignment and is a formula, we will often say that vsatises ifv() =T . Similarly, if is a set of formulas, we will often

    h f ( ) T f W ll h

  • 8/12/2019 MDSlides1_2013

    124/163

    say that v satises ifv() =T for every 2 . We will say that (respectively, ) is satisable if there is some truth assignment whichsatises it.

    Denition

    A formula is a tautology if it is satised by every truth assignment.

    For example, ! is a tautology.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 27 / 35

    Propositional LogicDenition

    Ifv is a truth assignment and is a formula, we will often say that vsatises ifv() =T . Similarly, if is a set of formulas, we will often

    h i if ( ) T f W ill h

  • 8/12/2019 MDSlides1_2013

    125/163

    say that v satises ifv() =T for every 2 . We will say that (respectively, ) is satisable if there is some truth assignment whichsatises it.

    Denition

    A formula is a tautology if it is satised by every truth assignment.

    For example, ! is a tautology.

    DenitionA formula is a contradiction if there is no truth assignment whichsatises it.

    For example, ! : is a contradiction.conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 27 / 35

    Propositional Logic

    E l Sh h A3 (A4 A3) i l

  • 8/12/2019 MDSlides1_2013

    126/163

    Example. Show that A3 !(A4 !A3) is a tautology.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 28 / 35

    Propositional Logic

    E l Sh th t A3 (A4 A3) i t t l C t t th

  • 8/12/2019 MDSlides1_2013

    127/163

    Example. Show that A3 !(A4 !A3) is a tautology. Construct thetruth table

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 28 / 35

    Propositional Logic

    E ample Sh th t A3 (A4 A3) i t t l C t t th

  • 8/12/2019 MDSlides1_2013

    128/163

    Example. Show that A3 !(A4 !A3) is a tautology. Construct thetruth table

    A3 A4 (A4 !A3) A3 !(A4 !A3)

    T T T T

    T F T T F T F T

    F F T T

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 28 / 35

    Propositional Logic

    Proposition

    If is any formula, then ((:) _ ) is a tautology and ((:) ^ ) is a

    contradiction

  • 8/12/2019 MDSlides1_2013

    129/163

    contradiction.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 29 / 35

    Propositional Logic

    Proposition

    If is any formula, then ((:) _ ) is a tautology and ((:) ^ ) is a

    contradiction

  • 8/12/2019 MDSlides1_2013

    130/163

    contradiction.

    Proof.

    It follows from the truth tables

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 29 / 35

    Propositional Logic

    Proposition

    If is any formula, then ((:) _ ) is a tautology and ((:) ^ ) is a

    contradiction

  • 8/12/2019 MDSlides1_2013

    131/163

    contradiction.

    Proof.

    It follows from the truth tables

    : (:) _ T F T

    F T T

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 29 / 35

    Propositional Logic

    Proposition

    If is any formula, then ((:) _ ) is a tautology and ((:) ^ ) is a

    contradiction

  • 8/12/2019 MDSlides1_2013

    132/163

    contradiction.

    Proof.

    It follows from the truth tables

    : (:) _ T F T

    F T T

    : (:) ^

    T F FF T F

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 29 / 35

    Propositional LogicDenition

    A proposition is a statement that is either true or false.

  • 8/12/2019 MDSlides1_2013

    133/163

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 30 / 35

    Propositional LogicDenition

    A proposition is a statement that is either true or false.

    Note that even if this denition is quite general it excludes such sentences

  • 8/12/2019 MDSlides1_2013

    134/163

    Note that even if this denition is quite general it excludes such sentencesas

    1 "O Romeo, Romeo! Wherefore art thou Romeo?"

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 30 / 35

    Propositional LogicDenition

    A proposition is a statement that is either true or false.

    Note that even if this denition is quite general it excludes such sentences

  • 8/12/2019 MDSlides1_2013

    135/163

    Note that even if this denition is quite general it excludes such sentencesas

    1 "O Romeo, Romeo! Wherefore art thou Romeo?"2 "Dont be stupid."

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 30 / 35

    Propositional LogicDenition

    A proposition is a statement that is either true or false.

    Note that even if this denition is quite general it excludes such sentences

  • 8/12/2019 MDSlides1_2013

    136/163

    Note that even if this denition is quite general it excludes such sentencesas

    1 "O Romeo, Romeo! Wherefore art thou Romeo?"2 "Dont be stupid."

    3 "Learn mathematics!"

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 30 / 35

    Propositional LogicDenition

    A proposition is a statement that is either true or false.

    Note that even if this denition is quite general it excludes such sentences

  • 8/12/2019 MDSlides1_2013

    137/163

    Note that even if this denition is quite general it excludes such sentencesas

    1 "O Romeo, Romeo! Wherefore art thou Romeo?"2 "Dont be stupid."

    3 "Learn mathematics!"

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 30 / 35

    Propositional LogicDenition

    A proposition is a statement that is either true or false.

    Note that even if this denition is quite general it excludes such sentences

  • 8/12/2019 MDSlides1_2013

    138/163

    Note that even if this denition is quite general it excludes such sentencesas

    1 "O Romeo, Romeo! Wherefore art thou Romeo?"2 "Dont be stupid."

    3 "Learn mathematics!"

    Proposition

    2 + 3 = 5.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 30 / 35

    Propositional LogicDenition

    A proposition is a statement that is either true or false.

    Note that even if this denition is quite general it excludes such sentences

  • 8/12/2019 MDSlides1_2013

    139/163

    Note that even if this denition is quite general it excludes such sentencesas

    1 "O Romeo, Romeo! Wherefore art thou Romeo?"2 "Dont be stupid."

    3 "Learn mathematics!"

    Proposition

    2 + 3 = 5.

    Proposition

    Pigs can y.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 30 / 35

    Propositional LogicProposition A

    All Greeks are human.

  • 8/12/2019 MDSlides1_2013

    140/163

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 31 / 35

    Propositional LogicProposition A

    All Greeks are human.

  • 8/12/2019 MDSlides1_2013

    141/163

    Proposition B

    All humans are mortal.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 31 / 35

    Propositional LogicProposition A

    All Greeks are human.

    P i i B

  • 8/12/2019 MDSlides1_2013

    142/163

    Proposition B

    All humans are mortal.

    Proposition C

    All Greeks are mortal.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 31 / 35

    Propositional LogicProposition A

    All Greeks are human.

    P i i B

  • 8/12/2019 MDSlides1_2013

    143/163

    Proposition B

    All humans are mortal.

    Proposition C

    All Greeks are mortal.

    Archimedes spent some time playing with such sentences in the 4th

    century BC.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 31 / 35

    Propositional LogicProposition A

    All Greeks are human.

    P iti B

  • 8/12/2019 MDSlides1_2013

    144/163

    Proposition B

    All humans are mortal.

    Proposition C

    All Greeks are mortal.

    Archimedes spent some time playing with such sentences in the 4th

    century BC.

    If A is true, and B is true, then C is also true!

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 31 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    145/163

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 32 / 35

    Propositional Logic

  • 8/12/2019 MDSlides1_2013

    146/163

    Archimedes developed an early form of logic.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 32 / 35

    Propositional LogicProposition

    Let p(n) =n2 + n+41. Then 8n2 N, p(n) is a prime number.

  • 8/12/2019 MDSlides1_2013

    147/163

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 33 / 35

    Propositional LogicProposition

    Let p(n) =n2 + n+41. Then 8n2 N, p(n) is a prime number.

  • 8/12/2019 MDSlides1_2013

    148/163

    p(0) = 41 : prime

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 33 / 35

    Propositional Logic

    Proposition

    Let p(n) =n2 + n+41. Then 8n2 N, p(n) is a prime number.

  • 8/12/2019 MDSlides1_2013

    149/163

    p(0) = 41 : prime

    p(1) = 43 : prime

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 33 / 35

    Propositional Logic

    Proposition

    Let p(n) =n2 + n+41. Then 8n2 N, p(n) is a prime number.

    ( )

  • 8/12/2019 MDSlides1_2013

    150/163

    p(0) = 41 : prime

    p(1) = 43 : prime

    p(2) = 47 : prime

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 33 / 35

    Propositional Logic

    Proposition

    Let p(n) =n2 + n+41. Then 8n2 N, p(n) is a prime number.

    (0) 1 i

  • 8/12/2019 MDSlides1_2013

    151/163

    p(0) = 41 : prime

    p(1) = 43 : prime

    p(2) = 47 : prime

    p(3) = 57 : prime

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 33 / 35

    Propositional Logic

    Proposition

    Let p(n) =n2 + n+41. Then 8n2 N, p(n) is a prime number.

    (0) 41 i

  • 8/12/2019 MDSlides1_2013

    152/163

    p(0) = 41 : prime

    p(1) = 43 : prime

    p(2) = 47 : prime

    p(3) = 57 : prime

    So far so good!

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 33 / 35

    Propositional Logic

    Proposition

    Let p(n) =n2 + n+41. Then 8n2 N, p(n) is a prime number.

    (0) 41 i

  • 8/12/2019 MDSlides1_2013

    153/163

    p(0) = 41 : prime

    p(1) = 43 : prime

    p(2) = 47 : prime

    p(3) = 57 : prime

    So far so good!

    p(20) =461 :prime!

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 33 / 35

    Propositional Logic

    Proposition

    Let p(n) =n2 + n+41. Then 8n2 N, p(n) is a prime number.

    (0) 41 i

  • 8/12/2019 MDSlides1_2013

    154/163

    p(0) = 41 : prime

    p(1) = 43 : prime

    p(2) = 47 : prime

    p(3) = 57 : prime

    So far so good!

    p(20) =461 :prime!

    Beautiful!

    p(39) =1601 :prime!

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 33 / 35

    Propositional Logic

    Proposition

    Let p(n) =n2 + n+41. Then 8n2 N, p(n) is a prime number.

  • 8/12/2019 MDSlides1_2013

    155/163

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 34 / 35

    Propositional Logic

    Proposition

    Let p(n) =n2 + n+41. Then 8n2 N, p(n) is a prime number.

  • 8/12/2019 MDSlides1_2013

    156/163

    p(40) =1681 :Not prime!

    p(40) = 402+40+41

    = 40(40+1) +41

    = 40 41+41

    = 41 41

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 34 / 35

    Propositional Logic

    Proposition

    Let p(n) =n2 + n+41. Then 8n2 N, p(n) is a prime number.

  • 8/12/2019 MDSlides1_2013

    157/163

    p(40) =1681 :Not prime!

    p(40) = 402+40+41

    = 40(40+1) +41

    = 40 41+41

    = 41 41

    Therefore, the above proposition is FALSE!

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 34 / 35

    Propositional Logic

    Proposition

    "a4 + b4 + c4 =d4 has no solutions, where a, b, c and dare positiveintegers "

  • 8/12/2019 MDSlides1_2013

    158/163

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 35 / 35

    Propositional Logic

    Proposition

    "a4 + b4 + c4 =d4 has no solutions, where a, b, c and dare positiveintegers "

    In logical notations (mathematicians like notations a lot!) it says

  • 8/12/2019 MDSlides1_2013

    159/163

    In logical notations (mathematicians like notations a lot!) it says

    8a2 Z+, 8b2 Z+, 8c2 Z+, 8d2 Z+, a4 + b4 + c4 6=d4.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 35 / 35

    Propositional Logic

    Proposition

    "a4 + b4 + c4 =d4 has no solutions, where a, b, c and dare positiveintegers "

    In logical notations (mathematicians like notations a lot!) it says

  • 8/12/2019 MDSlides1_2013

    160/163

    In logical notations (mathematicians like notations a lot!) it says

    8a2 Z+, 8b2 Z+, 8c2 Z+, 8d2 Z+, a4 + b4 + c4 6=d4.

    8a, b, c, d2 Z+, a4 + b4 + c4 6=d4.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 35 / 35

    Propositional Logic

    Proposition

    "a4 + b4 + c4 =d4 has no solutions, where a, b, c and dare positiveintegers "

    In logical notations (mathematicians like notations a lot!) it says

  • 8/12/2019 MDSlides1_2013

    161/163

    g ( ) y

    8a2 Z+, 8b2 Z+, 8c2 Z+, 8d2 Z+, a4 + b4 + c4 6=d4.

    8a, b, c, d2 Z+, a4 + b4 + c4 6=d4.

    Euler made this conjecture in 1769. For 218 years no one knew whetherthis proposition was true or false.

    conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 35 / 35

    Propositional Logic

    Proposition

    "a4 + b4 + c4 =d4 has no solutions, where a, b, c and dare positiveintegers "

    In logical notations (mathematicians like notations a lot!) it says

  • 8/12/2019 MDSlides1_2013

    162/163

    g ( ) y

    8a2 Z+, 8b2 Z+, 8c2 Z+, 8d2 Z+, a4 + b4 + c4 6=d4.

    8a, b, c, d2 Z+, a4 + b4 + c4 6=d4.

    Euler made this conjecture in 1769. For 218 years no one knew whetherthis proposition was true or false.

    Finally, Noam Elkies from Harvard University found a solution to theequation:

    a=2682440, b=15365639, c=18796760, d=20615673.conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 35 / 35

    Propositional Logic

    Proposition

    "a4 + b4 + c4 =d4 has no solutions, where a, b, c and dare positiveintegers "

    In logical notations (mathematicians like notations a lot!) it says

  • 8/12/2019 MDSlides1_2013

    163/163

    g ( ) y

    8a2 Z+, 8b2 Z+, 8c2 Z+, 8d2 Z+, a4 + b4 + c4 6=d4.

    8a, b, c, d2 Z+, a4 + b4 + c4 6=d4.

    Euler made this conjecture in 1769. For 218 years no one knew whetherthis proposition was true or false.

    Finally, Noam Elkies from Harvard University found a solution to theequation:

    a=2682440, b=15365639, c=18796760, d=20615673.conf.dr. Bostan Viorel () MathDisc Spring 2013 Lecture 1 35 / 35