760 likes | 818 Views
The Foundations: Logic and Proofs. CSC-2259 Discrete Structures. Propositional Logic. Proposition is a declarative statement that is either true of false. Baton Rouge is the capital of Louisiana True Toronto is the capital of Canada False 1+1=2 True 2+2=3 False.
E N D
The Foundations: Logic and Proofs CSC-2259 Discrete Structures K. Busch - LSU
Propositional Logic Proposition is a declarative statement that is either true of false • Baton Rouge is the capital of Louisiana True • Toronto is the capital of Canada False • 1+1=2 True • 2+2=3 False Statements which are not propositions: • What time is it? • x+1 = 2 K. Busch - LSU
Negation: truth table K. Busch - LSU
Conjunction: truth table K. Busch - LSU
Disjunction: truth table K. Busch - LSU
Exclusive-or: one or the other but not both truth table K. Busch - LSU
(hypothesis) (conclusion) Conditional statement: if p then q p implies q q follows from p p only if q p is sufficient for q truth table K. Busch - LSU
Conditional statement: equivalent (same truth table) Contrapositive: Converse: equivalent Inverse: K. Busch - LSU
Biconditional statement: p if and only if q p iff q If p then q and conversely p is necessary and sufficient for q truth table K. Busch - LSU
Compound propositions Precedence of operators higher lower K. Busch - LSU
Translating English into propositions K. Busch - LSU
Logic and Bit Operations Boolean variables OR AND XOR Bit string K. Busch - LSU
Propositional Equivalences Compound proposition Tautology: always true Contradiction: always false tautology contradiction Contingency: not a tautology and not a contradiction K. Busch - LSU
Logically equivalent compound propositions: is a tautology Have same truth table Example: K. Busch - LSU
De Morgan’s laws K. Busch - LSU
Identity laws Domination laws Idempotent laws Negation laws Double Negation law K. Busch - LSU
Commutative laws Associative laws Distributive laws Absorption laws K. Busch - LSU
Conditional Statements Biconditional Statements K. Busch - LSU
Construct new logical equivalences (De Morgan’s laws) (Double negation law) K. Busch - LSU
Predicates and Quantifiers variable predicate Propositional functions K. Busch - LSU
Predicate logic K. Busch - LSU
Predicate logic predicate 2-ary predicate 3-ary predicate n-ary predicate K. Busch - LSU
Universal quantifier: for all it holds (for every element in domain) is true for every real number (for every element in domain) is not true for every real number Counterexample: K. Busch - LSU
Existential quantifier: there is such that is true because is not true K. Busch - LSU
For finite domain K. Busch - LSU
Quantifiers with restricted domain Precedence of operators higher lower K. Busch - LSU
Bound variable free variable Scope of Scope of K. Busch - LSU
Logical equivalences with quantifiers False False K. Busch - LSU
De Morgan’s Laws for Quantifiers K. Busch - LSU
Example Recall that: K. Busch - LSU
Translating English into Logical Expressions “All hummingbirds are richly colored” “No large birds live on honey” “Birds that do not live on honey are dull in color” “Hummingbirds are small” K. Busch - LSU
Nested Quantifiers Additive inverse Commutative law for addition Associative law for addition K. Busch - LSU
Order of quantifiers K. Busch - LSU
We cannot always change the order of quantifiers true false But not the converse K. Busch - LSU
Translating Math Statements “The sum of two positive integers is always positive” “Every real number except zero has a multiplicative inverse” K. Busch - LSU
For every real number there exists a real number such that whenever K. Busch - LSU
Translating into English “Every student has a computer or has a friend who has a computer” K. Busch - LSU
“There is a student none of whose friends are also friends with each other” K. Busch - LSU
Translating English into Logical Expressions “If a person is female and is a parent, then this person is someone’s mother” female parent mother of K. Busch - LSU
“Everyone has exactly one best friend” Best friends K. Busch - LSU
Negating nested quantifiers Recall: K. Busch - LSU
Rules of Inference If you have a current password, then you can log onto the network You have a current password Therefore, you can log onto the network Modus Ponens Valid argument: if premises are true then conclusion is true K. Busch - LSU
If , then We know that (true) Therefore, (true) Valid argument, true conclusion K. Busch - LSU
If , then We know that (false) Therefore, (false) Valid argument, false conclusion K. Busch - LSU
Modus Ponens If and then K. Busch - LSU
Rules of Inference Modus Ponens Modus Tollens Hypothetical Syllogism Disjunctive Syllogism K. Busch - LSU
Rules of Inference Addition Simplification Conjunction Resolution K. Busch - LSU
It is below freezing now Therefore, it is either below freezing or raining now Addition K. Busch - LSU
It is below freezing and raining now Therefore, it is below freezing now Simplification K. Busch - LSU
If it rains today then we will not have a barbecue today If we do not have a barbecue today then we will have a barbecue tomorrow Therefore, if it rains today then we will have a barbecue tomorrow Hypothetical Syllogism K. Busch - LSU