First Order Logic Rosen 1.4 - 1.6 Lecture 3: Sept 11, 12.

Slides:



Advertisements
Similar presentations
Elementary Number Theory and Methods of Proof
Advertisements

22C:19 Discrete Structures Logic and Proof Spring 2014 Sukumar Ghosh.
Logic and Proof. Argument An argument is a sequence of statements. All statements but the first one are called assumptions or hypothesis. The final statement.
So far we have learned about:
First Order Logic (chapter 2 of the book) Lecture 3: Sep 14.
Fall 2002CMSC Discrete Structures1 Let’s proceed to… Mathematical Reasoning.
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.
CS 2210 (22C:019) Discrete Structures Logic and Proof Spring 2015 Sukumar Ghosh.
Methods of Proof & Proof Strategies
Chapter 1: The Foundations: Logic and Proofs
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 03: PROOFS Section 1.5 Jarek Rossignac CS1050: Understanding.
CSE 311: Foundations of Computing Fall 2013 Lecture 8: More Proofs.
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
First Order Logic Lecture 2: Sep 9. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about.
Chap 3 –A theorem is a statement that can be shown to be true –A proof is a sequence of statements to show that a theorem is true –Axioms: statements which.
Hazırlayan DISCRETE COMPUTATIONAL STRUCTURES Propositional Logic PROF. DR. YUSUF OYSAL.
1 Introduction to Abstract Mathematics Chapter 2: The Logic of Quantified Statements. Predicate Calculus Instructor: Hayk Melikya 2.3.
1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya Purpose of Section: To introduce predicate logic (or.
First Order Logic Lecture 3: Sep 13 (chapter 2 of the book)
Method of proofs.  Consider the statements: “Humans have two eyes”  It implies the “universal quantification”  If a is a Human then a has two eyes.
CS104:Discrete Structures Chapter 2: Proof Techniques.
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
Chapter 1 Logic and proofs
Proof And Strategies Chapter 2. Lecturer: Amani Mahajoub Omer Department of Computer Science and Software Engineering Discrete Structures Definition Discrete.
رياضيات متقطعة لعلوم الحاسب MATH 226. Chapter 1 Predicates and Quantifiers 1.4.
Lecture 2: Proofs and Recursion. Lecture 2-1: Proof Techniques Proof methods : –Inductive reasoning Lecture 2-2 –Deductive reasoning Using counterexample.
Harper Langston New York University Summer 2017
The Foundations: Logic and Proofs
CS 2210:0001 Discrete Structures Logic and Proof
Chapter 7. Propositional and Predicate Logic
3. The Logic of Quantified Statements Summary
CSE15 Discrete Mathematics 02/08/17
Chapter 4 (Part 1): Induction & Recursion
Argument An argument is a sequence of statements.
CSE15 Discrete Mathematics 01/23/17
CSE15 Discrete Mathematics 01/30/17
Chapter 3 The Logic of Quantified Statements
Methods of proof Section 1.6 & 1.7 Wednesday, June 20, 2018
Methods of Proof CS 202 Epp, chapter 3.
Predicate Calculus Validity
Chapter 1: The Foundations: Logic and Proofs
Proof Techniques.
Module #10: Proof Strategies
CS201: Data Structures and Discrete Mathematics I
The Foundations: Logic and Proofs
Proving Existentials A proof of a statement of the form x P(x) is called an existence proof. If the proof demonstrates how to actually find or construct.
CSE 311 Foundations of Computing I
Mathematical Reasoning
Methods of Proof. Methods of Proof Definitions A theorem is a valid logical assertion which can be proved using Axioms: statements which are given.
CSE 311: Foundations of Computing
CS 220: Discrete Structures and their Applications
Inference Rules: Tautologies
Methods of Proof Rosen 1.7, 1.8 Lecture 4: Sept 24, 25.
MA/CSSE 474 More Math Review Theory of Computation
Negations of quantifiers
Discrete Mathematics Lecture 3: Predicate and Quantifier
Information Technology Department SKN-SITS,Lonavala.
Module #10: Proof Strategies
Predicates and Quantifiers
September 9, 2004 Prof. Marie desJardins (for Prof. Matt Gaston)
Discrete Mathematics Lecture 4 Logic of Quantified Statements
Foundations of Discrete Mathematics
CPSC 121: Models of Computation
CS201: Data Structures and Discrete Mathematics I
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
Mathematical Reasoning
Introduction to Proofs
Rules of inference Section 1.5 Monday, December 02, 2019
Methods of Proof Rosen 1.7, 1.8 Lecture 4: Sept, 2019.
Presentation transcript:

First Order Logic Rosen 1.4 - 1.6 Lecture 3: Sept 11, 12

c b a Limitation of Propositional Logic Propositional logic – logic of simple statements How to formulate Pythagoreans’ theorem using propositional logic? c b a How to formulate the statement that there are infinitely many primes?

Predicates Predicates are propositions with variables The domain of a variable is the set of all values that may be substituted in place of the variable. Example: P (x,y) ::= x + 2 = y x = 1 and y = 3: P(1,3) is true x = 1 and y = 4: P(1,4) is false P(1,4) is true

Set R Set of all real numbers Z Set of all integers Q Set of all rational numbers means that x is an element of A means that x is not an element of A Sets can be defined directly: e.g. {1,2,4,8,16,32,…}, {MTH3105,CSC2100,…}

Truth Set Sets can be defined by a predicate Given a predicate P(x) and x has domain D, the truth set of P(x) is the set of all elements of D that make P(x) true. e.g. Let P(x) be “n is the square of a number”, and the domain D of x is set of positive integers. e.g. Let P(x) be “n is a prime number”, and the domain D of x is set of positive integers.

c b a The Universal Quantifier x For ALL x  x Z  y Z, x + y = y + x. c b a A statement xP(x) is false, if and only if P(x) is not always true where x is in the domain. One way to show that is to find a counterexample to the statement xP(x)

The Existential Quantifier y There EXISTS some y e.g. The truth of a predicate depends on the domain. xP(x) is false if and only if P(x) is false for every element of the domain The existential quantification xP(x) is the same as the disjunction P(x1) V P(x2) V … VP(xn) Domain Truth value integers  T positive integers + T negative integers - F negative reals - T

Uniqueness quantifier: There exists a unique x such that p(x) is true: “There is exactly one”, “There is one and only one”

Translating Mathematical Theorem Fermat (1637): If an integer n is greater than 2, then the equation an + bn = cn has no solutions in non-zero integers a, b, and c. Andrew Wiles (1994) http://en.wikipedia.org/wiki/Fermat's_last_theorem

Translating Mathematical Theorem Goldbach’s conjecture: Every even number is the sum of two prime numbers. Suppose we have a predicate prime(x) to determine if x is a prime number. How to write prime(p)? have higher precedence than all logical operators from propositional calculus

Negations of Quantified Statements Everyone likes football. What is the negation of this statement? Not everyone likes football = There exists someone who doesn’t like football. (generalized) DeMorgan’s Law Say the domain has only three values.

Negations of Quantified Statements There is a plant that can fly. What is the negation of this statement? Not exists a plant that can fly = every plant cannot fly. (generalized) DeMorgan’s Law Say the domain has only three values.

Order of Quantifiers There is an anti-virus program killing every computer virus. How to interpret this sentence? For every computer virus, there is an anti-virus program that kills it. For every attack, I have a defense: against MYDOOM, use Defender against TROJAN, use Norton against BABLAS, use Zonealarm …

Order of quantifiers is very important! There is an anti-virus program killing every computer virus. How to interpret this sentence? There is one single anti-virus program that kills all computer viruses. I have one defense good against every attack. Example: P is CSE-antivirus, protects against ALL viruses That’s much better! Order of quantifiers is very important!

More Negations There is an anti-virus program killing every computer virus. What is the negation of this sentence? For every program, there is some virus that it can not kill.

Exercises There is a smallest positive integer. There is no smallest positive real number. There are infinitely many prime numbers.

Exercises There is a smallest positive integer. There is no smallest positive real number. There are infinitely many prime numbers.

Predicate Calculus Validity Propositional validity True no matter what the truth values of A and B are Predicate calculus validity z [Q(z)  P(z)] → [x.Q(x)  y.P(y)] True no matter what the Domain is, or the predicates are. That is, logically correct, independent of the specific content.

Arguments with Quantified Statements Universal instantiation: Universal modus ponens: Universal modus tollens:

More Rules of Inference © Rosen 1.6 Table 1

Fallacies Fallacies arise in incorrect arguments E.g., the proposition ((p → q) ∧ q) → p is not a tautology It is false when p is false and q is true This type of incorrect reasoning is called the fallacy of affirming the conclusion The incorrect reasoning ((p → q) ∧ ¬p) → ¬q is called fallacy of denying the hypothesis Exercise: Is the following argument valid? If you do every problem in the textbook, then you will learn discrete mathematics. You learned discrete mathematics. Therefore, you did every problem in the textbook.

Universal Generalization valid rule providing c is independent of A e.g. given any number c, 2c is an even number => for all x, 2x is an even number.

z [Q(z)  P(z)] → [x.Q(x)  y.P(y)] Not Valid z [Q(z)  P(z)] → [x.Q(x)  y.P(y)] Proof: Give countermodel, where z [Q(z)  P(z)] is true, but x.Q(x)  y.P(y) is false. In this example, let domain be integers, Q(z) be true if z is an even number, i.e. Q(z)=even(z) P(z) be true if z is an odd number, i.e. P(z)=odd(z) Find a domain, and a predicate. Then z [Q(z)  P(z)] is true, because every number is either even or odd. But x.Q(x) is not true, since not every number is an even number. Similarly y.P(y) is not true, and so x.Q(x)  y.P(y) is not true.

z D [Q(z)  P(z)] → [x D Q(x)  y D P(y)] Validity z D [Q(z)  P(z)] → [x D Q(x)  y D P(y)] Proof: Assume z [Q(z)P(z)]. So Q(z)P(z) holds for all z in the domain D. Now let c be some element in the domain D. So Q(c)P(c) holds (by instantiation), and therefore Q(c) by itself holds. But c could have been any element of the domain D. So we conclude x.Q(x). (by generalization) We conclude y.P(y) similarly (by generalization). Therefore, x.Q(x)  y.P(y) QED.

Mathematical Proof We prove mathematical statement by using logic. not valid To prove something is true, we need to assume some axioms! This is invented by Euclid in 300 BC, who begins with 5 assumptions about geometry, and derive many theorems as logical consequences. http://en.wikipedia.org/wiki/Euclidean_geometry

Ideal Mathematical World What do we expect from a logic system? What we prove is true. (soundness) What is true can be proven. (completeness) Hilbert’s program To resolve foundational crisis of mathematics (e.g. paradoxes) Find a finite, complete set of axioms, and provide a proof that these axioms were consistent. http://en.wikipedia.org/wiki/Hilbert’s_program

Power of Logic Good news: Gödel's Completeness Theorem Only need to know a few axioms & rules, to prove all validities. That is, starting from a few propositional & simple predicate validities, every valid assertions can be proved using just universal generalization and modus ponens repeatedly! modus ponens

Limits of Logic Gödel's Incompleteness Theorem for Arithmetic For any “reasonable” theory that proves basic arithemetic truth, an arithmetic statement that is true, but not provable in the theory, can be constructed. (very very brief) proof idea: Any theory “expressive” enough can express the sentence “This sentence is not provable.” If this is provable, then the theory is inconsistent. So it is not provable.

Limits of Logic Gödel's Second Incompleteness Theorem for Arithmetic For any “reasonable” theory that proves basic arithemetic truth, it cannot prove its consistency. No hope to find a complete and consistent set of axioms?! http://en.wikipedia.org/wiki/G%C3%B6del%27s_incompleteness_theorems