Download The foundation: logic and proofs. and more Slides Discrete Mathematics in PDF only on Docsity!
The Founda+ons: Logic and
Proofs
Chapter 1 , Part I: Proposi+onal Logic
Edited by Shih-Tsung Liang
Chapter Summary
- Proposi+onal Logic ( 命題邏輯)
- The Language of Proposi+ons
- Applica+ons
- Logical Equivalences
- Predicate Logic (述詞邏輯)
- Predicates(述詞) and Quan+fiers(量詞)
- Logical Equivalences (等價)
- Nested Quan+fiers
- Proofs
- Rules of Inference
- Proof Methods
- Proof Strategy
Proposi+ons
- A proposi&on (命題) is a declara+ve sentence (陳述句) that is
either true or false.
a) The Moon is made of green cheese.
b) Trenton is the capital of New Jersey.
c) Toronto is the capital of Canada.
d) 1 + 0 = 1
e) 0 + 0 = 2
- Examples that are not proposi+ons.
a) Sit down!
b) What +me is it?
c) x + 1 = 2
d) x + y = z
Construc+ng Proposi+ons
- Proposi+onal Variables: p , q, r , s , …
- The proposi+on that is always true is denoted by T and the proposi+on that is always false is denoted by F.
- Compound Proposi+ons; constructed from logical connec+ves and other proposi+ons - Nega+on (否定) ¬ - Conjunc+on (合取) ∧ - Disjunc+on (分取) ∨ - Implica+on (蘊涵) → - Bicondi+onal (雙條件;若且唯若) ↔
Conjunc+on (合取)
- The conjunc&on of proposi+ons p and q is denoted by p ∧ q and has this truth table:
- Example : If p denotes “I am at home.” and q denotes “It is raining.” then p ∧ q denotes “I am at home and it is raining.”
p q p ∧ q
T T T T F F F T F F F F
Disjunc+on(分取)
- The disjunc&on of proposi+ons p and q is denoted by p ∨ q and has this truth table:
- Example : If p denotes “I am at home.” and q denotes “It is raining.” then p ∨ q denotes “I am at home or it is raining.”
p q p ∨ q
T T T T F T F T T F F F
Implica+on(蘊涵)
- If p and q are proposi+ons, then p → q is a condi&onal statement or implica&on which is read as “if p, then q ” and has this truth table:
- Example : If p denotes “I am at home.” and q denotes “It is raining.” then p → q denotes “If I am at home then it is raining.”
- In p → q , p is the hypothesis ( antecedent or premise ) and q is the
conclusion (or consequence ).
p q p → q
T T T T F F F T T F F T
Understanding Implica+on
- In p → q there does not need to be any connec+on between
the antecedent or the consequent. The “meaning” of p → q
depends only on the truth values of p and q.
- These implica+ons are perfectly fine, but would not be used in ordinary English. - “If the moon is made of green cheese, then I have more money than Bill Gates. ” - “If the moon is made of green cheese then I’m on welfare.” - “If 1 + 1 = 3, then your grandma wears combat boots.”
Different Ways of Expressing p → q
if p, then q p implies q
if p, q p only if q
q unless ¬p q when p
q if p q when p
q whenever p p is sufficient for q
q follows from p q is necessary for p
a necessary condi:on for p is q
a sufficient condi:on for q is p
Converse (逆命題), Contraposi+ve(對位命題), and Inverse(反命題)
- From p → q we can form new condi+onal statements.
- q → p is the converse of p → q
- ¬ q → ¬ p is the contraposi:ve of p → q
- ¬ p → ¬ q is the inverse of p → q Example : Find the converse, inverse, and contraposi+ve of “It raining is a sufficient condi+on for my not going to town.” Solu:on: converse : If I do not go to town, then it is raining. inverse : If it is not raining, then I will go to town. contraposi:ve : If I go to town, then it is not raining.
Expressing the Bicondi+onal
- Some alterna+ve ways “ p if and only if q ” is
expressed in English:
- p is necessary and sufficient for q
- if p then q , and conversely
- p iff q
Truth Tables For Compound Proposi+ons
- Construc+on of a truth table:
- Rows
- Need a row for every possible combina+on of values for the atomic proposi+ons.
- Columns
- Need a column for the compound proposi+on (usually at far right)
- Need a column for the truth value of each expression that occurs in the compound proposi+on as it is built up. - This includes the atomic proposi+ons
Equivalent (等價)Proposi+ons
- Two proposi+ons are e quivalent if they always
have the same truth value.
- Example : Show using a truth table that the
implica+on is equivalent to its contraposi+ve.
Solu:on:
p q ¬ p ¬ q p → q ¬ q → ¬ p
T T F F T T T F F T F F F T T F T T F F T T T T
Using a Truth Table to Show Non- Equivalence
Example : Show using truth tables that neither
the converse nor inverse of an implica+on are
not equivalent to the implica+on.
Solu:on:
p q ¬ p ¬ q p → q ¬ p →¬ q q → p
T T F F T T T T F F T F T T F T T F T F F F F T T F T T