Negations of quantifiers

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

CSE 311: Foundations of Computing Fall 2013 Lecture 3: Logic and Boolean algebra.
CSE 311 Foundations of Computing I Lecture 6 Predicate Logic Autumn 2011 CSE 3111.
Discrete Mathematics Math 6A Instructor: M. Welling.
CSE115/ENGR160 Discrete Mathematics 01/20/11 Ming-Hsuan Yang UC Merced 1.
First Order Logic. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about first order.
Predicates and Quantifiers
CSE 311 Foundations of Computing I Lecture 6 Predicate Logic, Logical Inference Spring
Methods of Proof & Proof Strategies
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
A Brief Summary for Exam 1 Subject Topics Propositional Logic (sections 1.1, 1.2) –Propositions Statement, Truth value, Proposition, Propositional symbol,
MATH 224 – Discrete Mathematics
CSE 311: Foundations of Computing Fall 2013 Lecture 8: More Proofs.
CSE 311 Foundations of Computing I Lecture 8 Proofs and Set Theory Spring
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
1 Math/CSE 1019C: Discrete Mathematics for Computer Science Fall 2011 Suprakash Datta Office: CSEB 3043 Phone: ext
Foundations of Computing I CSE 311 Fall bit Binary Adder Inputs: A, B, Carry-in Outputs: Sum, Carry-out A B Cin Cout S
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
CSE 311 Foundations of Computing I Lecture 5 Predicate Logic Spring
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions.
CSE 311 Foundations of Computing I Lecture 7 Logical Inference Autumn 2012 CSE
Hazırlayan DISCRETE COMPUTATIONAL STRUCTURES Propositional Logic PROF. DR. YUSUF OYSAL.
CSE 311 Foundations of Computing I Lecture 9 Proofs and Set Theory Autumn 2012 CSE
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
Chapter 1: The Foundations: Logic and Proofs
Lecture 7 – Jan 28, Chapter 2 The Logic of Quantified Statements.
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 1 The Foundations: Logic and Proofs Predicates and Quantifiers.
Chapter 2 Symbolic Logic. Section 2-1 Truth, Equivalence and Implication.
CS 285- Discrete Mathematics Lecture 4. Section 1.3 Predicate logic Predicate logic is an extension of propositional logic that permits concisely reasoning.
CSE 311: Foundations of Computing Fall 2013 Lecture 8: Proofs and Set theory.
1 Chapter 2.1 Chapter 2.2 Chapter 2.3 Chapter 2.4 All images are copyrighted to their respective copyright holders and reproduced here for academic purposes.
CSE 311 Foundations of Computing I Lecture 8 Proofs Autumn 2011 CSE 3111.
CSE 311 Foundations of Computing I Lecture 8 Proofs Autumn 2012 CSE
PREDICATES AND QUANTIFIERS COSC-1321 Discrete Structures 1.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Propositional Logic. Assignment Write any five rules each from two games which you like by using propositional logic notations.
Foundations of Computing I CSE 311 Fall Announcements Homework #2 due today – Solutions available (paper format) in front – HW #3 will be posted.
Chapter 7. Propositional and Predicate Logic
2. The Logic of Compound Statements Summary
CSE 311 Foundations of Computing I
Advanced Algorithms Analysis and Design
CSE15 Discrete Mathematics 01/23/17
Discrete Mathematics Logic.
Methods of proof Section 1.6 & 1.7 Wednesday, June 20, 2018
CSE 311 Foundations of Computing I
CSE 311 Foundations of Computing I
Predicate Calculus Validity
Negations of Quantified Statements
Chapter 1 The Foundations: Logic and Proofs
The Foundations: Logic and Proofs
CS201: Data Structures and Discrete Mathematics I
CSE 311 Foundations of Computing I
CS201: Data Structures and Discrete Mathematics I
CSE 311: Foundations of Computing
CSE 311 Foundations of Computing I
First Order Logic Rosen Lecture 3: Sept 11, 12.
Discrete Mathematics Logic.
Discrete Mathematics CMP-200 Propositional Equivalences, Predicates & Quantifiers, Negating Quantified Statements Abdul Hameed
Chapter 7. Propositional and Predicate Logic
CSE 321 Discrete Structures
Predicates and Quantifiers
Foundations of Discrete Mathematics
CSE 321 Discrete Structures
CPSC 121: Models of Computation
CS201: Data Structures and Discrete Mathematics I
CSE 311: Foundations of Computing
CS201: Data Structures and Discrete Mathematics I
Rules of inference Section 1.5 Monday, December 02, 2019
Presentation transcript:

Negations of quantifiers not every positive integer is prime some positive integer is not prime prime numbers do not exist every positive integer is not prime

Negations of Quantifiers x PurpleFruit(x) “All fruits are purple” What is x PurpleFruit(x)? “Not all fruits are purple” How about x PurpleFruit(x)? “There is a purple fruit” If it’s the negation, all situations should be covered by a statement and its negation Consider the domain {Orange}: Neither statement is true! No! How about x PurpleFruit(x)? “There is a fruit that isn’t purple” Yes! Domain: Fruit PurpleFruit(x)

De Morgan’s Laws for Quantifiers x P(x)  x P(x) x P(x)  x P(x)

De Morgan’s laws for Quantifiers x P(x)  x P(x)  x P(x)  x P(x) “There is no largest integer”   x  y ( x ≥ y)  x  y ( x ≥ y)  x  y  ( x ≥ y)  x  y (y > x) “For every integer there is a larger integer”

Example: NotLargest(x)   y Greater (y, x)   z Greater (z, x) Scope of Quantifiers Example: NotLargest(x)   y Greater (y, x)   z Greater (z, x) truth value: doesn’t depend on y or z “bound variables” does depend on x “free variable” quantifiers only act on free variables of the formula they quantify  x ( y (P(x,y)   x Q(y, x)))

x (P(x)  Q(x)) vs. x P(x)  x Q(x) scope of quantifiers x (P(x)  Q(x)) vs. x P(x)  x Q(x) This one asserts P and Q of the same x. This one asserts P and Q of potentially different x’s.

CSE 311: Foundations of Computing Fall 2014 Lecture 6: Predicate Logic, Logical Inference

Turtles All The Way Down If the tortoise walks at a rate of one node per step, and the hare walks at a rate of two nodes per step, then the distance between them increases by one node per step. If the tortoise is on node x, and the hare is on node 2x, then the distance between them increases by one node per step OnNode(x) xyz ((Greater(x, 2)  Even(x))  (Equal(x, y+z)  Prime(y)  Prime(z)) Domain: Non-negative Integers

Nested Quantifiers Bound variable names don’t matter  x  y P(x, y)   a  b P(a, b) Positions of quantifiers can sometimes change  x (Q(x)   y P(x, y))   x  y (Q(x)  P(x, y)) But: order is important...

Predicate with Two Variables y x P(x,y)

Quantification with Two Variables expression when true when false x  y P(x, y)  x  y P(x, y)  x  y P(x, y)  y  x P(x, y)

Logical Inference So far we’ve considered: How to understand and express things using propositional and predicate logic How to compute using Boolean (propositional) logic How to show that different ways of expressing or computing them are equivalent to each other Logic also has methods that let us infer implied properties from ones that we know Equivalence is a small part of this

Applications of Logical Inference Software Engineering Express desired properties of program as set of logical constraints Use inference rules to show that program implies that those constraints are satisfied Artificial Intelligence Automated reasoning Algorithm design and analysis e.g., Correctness, Loop invariants. Logic Programming, e.g. Prolog Express desired outcome as set of constraints Automatically apply logic inference to derive solution

Proofs Start with hypotheses and facts Use rules of inference to extend set of facts Result is proved when it is included in the set

An inference rule: Modus Ponens If p and p  q are both true then q must be true Write this rule as Given: If it is Monday then you have a 311 class today. It is Monday. Therefore, by modus ponens: You have a 311 class today. p, p  q ∴ q

Proofs Show that r follows from p, p  q, and q  r 1. p given p  q given q  r given q modus ponens from 1 and 2 r modus ponens from 3 and 4

Proofs can use equivalences too Show that p follows from p  q and q 1. p  q given  q given  q   p contrapositive of 1  p modus ponens from 2 and 3

Inference Rules A, B ∴ C,D ∴ p p Each inference rule is written as: ...which means that if both A and B are true then you can infer C and you can infer D. For rule to be correct (A  B)  C and (A  B)  D must be a tautologies Sometimes rules don’t need anything to start with. These rules are called axioms: e.g. Excluded Middle Axiom A, B ∴ C,D ∴ p p

Simple Propositional Inference Rules Excluded middle plus two inference rules per binary connective, one to eliminate it and one to introduce it p  q ∴ p, q p, q ∴ p  q p x ∴ p  q, q  p p  q , p ∴ q p, p  q ∴ q p  q ∴ p  q Direct Proof Rule Not like other rules

Important: Applications of inference rules You can use equivalences to make substitutions of any sub-formula. Inference rules only can be applied to whole formulas (not correct otherwise). e.g. 1. p  q given 2. (p  r)  q intro  from 1. Does not follow! e.g . p=F, q=F, r=T

Direct Proof of an Implication p  q denotes a proof of q given p as an assumption The direct proof rule: If you have such a proof then you can conclude that p  q is true Example: 1. p assumption 2. p  q intro for  from 1 3. p  (p  q) direct proof rule proof subroutine