mathematical logic
DESCRIPTION
Mathematical Logic. Adapted from Discrete Math. Learning Objectives. Learn about sets Explore various operations on sets Become familiar with Venn diagrams Learn how to represent sets in computer memory Learn about statements (propositions). Learning Objectives. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Mathematical Logic](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56814124550346895dacfd1e/html5/thumbnails/1.jpg)
Mathematical Logic
Adapted from Discrete Math
![Page 2: Mathematical Logic](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56814124550346895dacfd1e/html5/thumbnails/2.jpg)
Learning Objectives
• Learn about sets
• Explore various operations on sets
• Become familiar with Venn diagrams
• Learn how to represent sets in computer memory
• Learn about statements (propositions)
dww-logic 2
![Page 3: Mathematical Logic](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56814124550346895dacfd1e/html5/thumbnails/3.jpg)
Learning Objectives• Learn how to use logical connectives to combine
statements
• Explore how to draw conclusions using various argument forms
• Become familiar with quantifiers and predicates
• Learn various proof techniques
• Explore what an algorithm is
dww-logic 3
![Page 4: Mathematical Logic](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56814124550346895dacfd1e/html5/thumbnails/4.jpg)
Mathematical Logic• Definition: Methods of reasoning, provides rules and
techniques to determine whether an argument is valid
• Theorem: a statement that can be shown to be true (under certain conditions)
– Example: If x is an even integer, then x + 1 is an odd integer
• This statement is true under the condition that x is an integer is true
dww-logic 4
![Page 5: Mathematical Logic](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56814124550346895dacfd1e/html5/thumbnails/5.jpg)
Mathematical Logic• A statement, or a proposition, is a declarative
sentence that is either true or false, but not both • Lowercase letters denote propositions– Examples: • p: 2 is an even number (true)• q: 3 is an odd number (true)• r: A is a consonant (false)
– The following are not propositions:• p: My cat is beautiful• q: Are you in charge?
dww-logic 5
![Page 6: Mathematical Logic](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56814124550346895dacfd1e/html5/thumbnails/6.jpg)
Mathematical Logic• Truth value
– One of the values “truth” or “falsity” assigned to a statement– True is abbreviated to T or 1– False is abbreviated to F or 0
• Negation– The negation of p, written ∼p, is the statement obtained by
negating statement p • Truth values of p and ∼p are opposite• Symbol ~ is called “not” ~p is read as as “not p”• Example:
– p: A is a consonant– ~p: it is the case that A is not a consonant
dww-logic 6
![Page 7: Mathematical Logic](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56814124550346895dacfd1e/html5/thumbnails/7.jpg)
Mathematical Logic• Truth Table
• Conjunction– Let p and q be statements.The conjunction of p and
q, written p ^ q , is the statement formed by joining statements p and q using the word “and”
– The statement p∧q is true if both p and q are true; otherwise p∧q is false
dww-logic 7
![Page 8: Mathematical Logic](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56814124550346895dacfd1e/html5/thumbnails/8.jpg)
Mathematical Logic
• Conjunction– Truth Table for Conjunction:
dww-logic 8
![Page 9: Mathematical Logic](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56814124550346895dacfd1e/html5/thumbnails/9.jpg)
Mathematical Logic
• Disjunction
– Let p and q be statements. The disjunction of p and q, written p q , is the statement formed by joining ∨statements p and q using the word “or”
– The statement p q is true if at least one of the ∨statements p and q is true; otherwise p q is false∨
– The symbol is read “or”∨
dww-logic 9
![Page 10: Mathematical Logic](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56814124550346895dacfd1e/html5/thumbnails/10.jpg)
Mathematical Logic
• Disjunction– Truth Table for
Disjunction:
dww-logic 10
![Page 11: Mathematical Logic](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56814124550346895dacfd1e/html5/thumbnails/11.jpg)
Mathematical Logic• Implication– Let p and q be statements.The statement “if p then q” is
called an implication or condition.
– The implication “if p then q” is written p q
– p q is read:• “If p, then q”
• “p is sufficient for q”
• q if p
• q whenever p
dww-logic 11
![Page 12: Mathematical Logic](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56814124550346895dacfd1e/html5/thumbnails/12.jpg)
Mathematical Logic• Implication– Truth Table for Implication:
– p is called the hypothesis, q is called the conclusion
dww-logic 12
![Page 13: Mathematical Logic](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56814124550346895dacfd1e/html5/thumbnails/13.jpg)
Mathematical Logic• Implication– Let p: Today is Sunday and q: I will wash the car. The
conjunction p q is the statement:• p q : If today is Sunday, then I will wash the car
– The converse of this implication is written q p• If I wash the car, then today is Sunday
– The inverse of this implication is ~p ~q• If today is not Sunday, then I will not wash the car
– The contrapositive of this implication is ~q ~p• If I do not wash the car, then today is not Sunday
dww-logic 13
![Page 14: Mathematical Logic](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56814124550346895dacfd1e/html5/thumbnails/14.jpg)
Mathematical Logic• Biimplication– Let p and q be statements. The statement “p if and
only if q” is called the biimplication or biconditional of p and q
– The biconditional “p if and only if q” is written p q– p q is read:• “p if and only if q”• “p is necessary and sufficient for q”• “q if and only if p”• “q when and only when p”
dww-logic 14
![Page 15: Mathematical Logic](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56814124550346895dacfd1e/html5/thumbnails/15.jpg)
Mathematical Logic• Biconditional– Truth Table for the Biconditional:
dww-logic 15
![Page 16: Mathematical Logic](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56814124550346895dacfd1e/html5/thumbnails/16.jpg)
Mathematical Logic• Statement Formulas– Definitions• Symbols p ,q ,r ,...,called statement variables • Symbols ~, , , →,and ↔ are called logical ∧ ∨
connectives1) A statement variable is a statement formula2) If A and B are statement formulas, then the
expressions (~A ), (A ∧ B) , (A ∨ B ), (A → B ) and (A ↔ B ) are statement formulas
• Expressions are statement formulas that are constructed only by using 1) and 2) above
dww-logic 16
![Page 17: Mathematical Logic](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56814124550346895dacfd1e/html5/thumbnails/17.jpg)
Mathematical Logic
• Precedence of logical connectives is:
– ~ highest
– ∧ second highest
– ∨ third highest
– → fourth highest
– ↔ fifth highest
dww-logic 17
![Page 18: Mathematical Logic](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56814124550346895dacfd1e/html5/thumbnails/18.jpg)
Mathematical Logic• Example:– Let A be the statement formula (~(p ∨q )) →
(q ∧p )– Truth Table for A is:
dww-logic 18
![Page 19: Mathematical Logic](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56814124550346895dacfd1e/html5/thumbnails/19.jpg)
Mathematical Logic• Tautology
– A statement formula A is said to be a tautology if the truth value of A is T for any assignment of the truth values T and F to the statement variables occurring in A
• Contradiction
– A statement formula A is said to be a contradiction if the truth value of A is F for any assignment of the truth values T and F to the statement variables occurring in A
dww-logic 19
![Page 20: Mathematical Logic](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56814124550346895dacfd1e/html5/thumbnails/20.jpg)
Mathematical Logic• Logically Implies– A statement formula A is said to logically imply a
statement formula B if the statement formula A → B is a tautology. If A logically implies B, then symbolically we write A → B
• Logically Equivalent– A statement formula A is said to be logically
equivalent to a statement formula B if the statement formula A ↔ B is a tautology. If A is logically equivalent to B , then symbolically we write A ≡ B (or A ⇔ B)
dww-logic 20
![Page 21: Mathematical Logic](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56814124550346895dacfd1e/html5/thumbnails/21.jpg)
Mathematical Logic
dww-logic 21
![Page 22: Mathematical Logic](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56814124550346895dacfd1e/html5/thumbnails/22.jpg)
•Next slide, adapted from National Taiwan University
dww-logic 22
![Page 23: Mathematical Logic](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56814124550346895dacfd1e/html5/thumbnails/23.jpg)
dww-logic 23
![Page 24: Mathematical Logic](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56814124550346895dacfd1e/html5/thumbnails/24.jpg)
dww-logic 24
![Page 25: Mathematical Logic](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56814124550346895dacfd1e/html5/thumbnails/25.jpg)
dww-logic 25
![Page 26: Mathematical Logic](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56814124550346895dacfd1e/html5/thumbnails/26.jpg)
dww-logic 26
![Page 27: Mathematical Logic](https://reader036.vdocuments.mx/reader036/viewer/2022081421/56814124550346895dacfd1e/html5/thumbnails/27.jpg)
dww-logic 27