Copyright © 2007 - 2015 Curt Hill Quantifiers. Copyright © 2007 - 2015 Curt Hill Introduction What we have seen is called propositional logic It includes.

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

5.1 Real Vector Spaces.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 1: (Part 2): The Foundations: Logic and Proofs.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
L41 Lecture 2: Predicates and Quantifiers.. L42 Agenda Predicates and Quantifiers –Existential Quantifier  –Universal Quantifier 
1 Predicates and quantifiers Chapter 8 Formal Specification using Z.
First Order Logic (chapter 2 of the book) Lecture 3: Sep 14.
Copyright © Cengage Learning. All rights reserved.
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
Chapter 1: The Foundations: Logic and Proofs
CSci 2011 Discrete Mathematics Lecture 3 CSci 2011.
Chapter Sequences and Series.
A Brief Summary for Exam 1 Subject Topics Propositional Logic (sections 1.1, 1.2) –Propositions Statement, Truth value, Proposition, Propositional symbol,
Formal Logic Mathematical Structures for Computer Science Chapter Copyright © 2006 W.H. Freeman & Co.MSCS SlidesFormal Logic.
Introduction to Proofs
MATH 224 – Discrete Mathematics
DECIDABILITY OF PRESBURGER ARITHMETIC USING FINITE AUTOMATA Presented by : Shubha Jain Reference : Paper by Alexandre Boudet and Hubert Comon.
Math Review Data Structures & File Management Computer Science Dept Va Tech July 2000 ©2000 McQuain WD 1 Summation Formulas Let N > 0, let A, B, and C.
Variables Tutorial 3c variable A variable is any symbol that can be replaced with a number to solve a math problem. An open sentence has at least one.
Boolean Algebra and Computer Logic Mathematical Structures for Computer Science Chapter 7.1 – 7.2 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Boolean.
Mathematical Preliminaries (Hein 1.1 and 1.2) Sets are collections in which order of elements and duplication of elements do not matter. – {1,a,1,1} =
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.
Copyright © Curt Hill Mathematical Logic An Introduction.
Copyright © Cengage Learning. All rights reserved. CHAPTER 3 THE LOGIC OF QUANTIFIED STATEMENTS THE LOGIC OF QUANTIFIED STATEMENTS.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Nesting Quantifiers And Their Manipulation Copyright © Curt Hill.
Copyright © 2014 Curt Hill Sets Introduction to Set Theory.
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
Chapter 2: Basic Structures: Sets, Functions, Sequences, and Sums (1)
Predicates and Quantified Statements
Lecture 4: Predicates and Quantifiers; Sets.
1 Sections 1.3 and 1.4 Predicates & Quantifiers. 2 Propositional Functions In a mathematical assertion, such as x < 3, there are two parts: –the subject,
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.
1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya Purpose of Section: To introduce predicate logic (or.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 02: QUANTIFIERS Sections 1.3 and 1.4 Jarek Rossignac CS1050:
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.
Logic UNIT 1.
First Order Logic Lecture 3: Sep 13 (chapter 2 of the book)
Copyright © Curt Hill Proofs An Introduction.
Review 2 Basic Definitions Set - Collection of objects, usually denoted by capital letter Member, element - Object in a set, usually denoted by lower.
Copyright © Cengage Learning. All rights reserved. Fundamental Concepts of Algebra 1.1 Real Numbers.
Predicate Logic One step stronger than propositional logic Copyright © Curt Hill.
Copyright © Curt Hill Axiomatic Approach Some needed groundwork.
Models of Computation: Automata and Formal Languages Sam M. Kim.
Week 4 - Friday.  What did we talk about last time?  Floor and ceiling  Proof by contradiction.
PREDICATES AND QUANTIFIERS COSC-1321 Discrete Structures 1.
Mathematics for Comter I Lecture 3: Logic (2) Propositional Equivalences Predicates and Quantifiers.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
Introduction to Predicates and Quantified Statements I Lecture 9 Section 2.1 Wed, Jan 31, 2007.
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
Propositional Logic. Assignment Write any five rules each from two games which you like by using propositional logic notations.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
(State) Model-Based Approaches I Software Specification Lecture 35
Chapter 3 The Logic of Quantified Statements
Predicates & Quantifiers
CS201: Data Structures and Discrete Mathematics I
Copyright © Cengage Learning. All rights reserved.
A Brief Summary for Exam 1
Introduction to Predicates and Quantified Statements I
MA/CSSE 474 More Math Review Theory of Computation
Copyright © Cengage Learning. All rights reserved.
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.
Predicates and Quantifiers
Presentation transcript:

Copyright © Curt Hill Quantifiers

Copyright © Curt Hill Introduction What we have seen is called propositional logic It includes axioms and theorems concerning the operators of Boolean Algebra It lacks something We want to strengthen this into first order logic –AKA predicate calculus

Copyright © Curt Hill Statement Categories In mathematics, there are three types of statements: –True –False –Open True statements are usually characterized by: –Statements with only constants and a comparison such as = or > –A statement of fact –A tautology

Copyright © Curt Hill True Statements 5=2+3 5>2 The United States won its independence from England They may include variables in limited ways: –x+5 = 5+x –  p  q  p  q  q

Copyright © Curt Hill False statement False statements have a similar form but are false 5=4 2>5 The United States won its independence from Germany They may also include variables: –x  (y  z)  x  y  x  z –x = x + 1

Copyright © Curt Hill Open statements Open standards generally cannot have a true or false value until a variable is given a value Almost all equations are open, the task of solving is finding a set of values that makes the statement true or determining that the set is empty 5x = 10 is neither true nor false It is true if x = 2 and false otherwise

Copyright © Curt Hill Discussion Logic is two valued, we cannot allow true, false, and maybe Therefore, we have to find a way to make a statement that is open into one that is true or false One means of doing this is quantifiers

Predicates Up to this point we have mostly dealt with variables and operators We may also use predicates Predicate is a fancy name for a function that returns a boolean value It may have one or more arguments The argument does not have to be a boolean variable This is not startling since any boolean variable could hold the result of a predicate Copyright © Curt Hill

An Example Let P(x) be the statement x>8 P(x) is still open We may determine the truth value of: –P(12) –P(2) If the predicate is arbitrary single letter names are sufficient We may have others as well Copyright © Curt Hill

Predicate Notation As always there are multiple ways to represent the same thing I prefer: predicate(parameter1, parameter2) –This matches programming notation Others use single letter predicates with subscript indicating parameter: G x Thus P(x,y) or P x,y Copyright © Curt Hill

Open Statements In a real sense we have skirted the Open statement problem P(x) is just as open as x>0 Now we get back to the topic We next need quantifiers to say something useful about the possible values Copyright © Curt Hill

Quantifiers via familiar example You are probably familiar with summation notation –It gives us a compact way to express an infinite sum or even a large finite sum This gives us a convenient way to denote the sum of a finite or infinite number of terms We also have a similar notation of products

Copyright © Curt Hill Summation and Product

Copyright © Curt Hill Generalization This can be extended into quantifiers with the following notation: (OP i:r:t) –This is not the only notation for quantifiers OP is an operator which is symmetric, associative, and binary How many do we have? i is a list of dummies –Often just one but sometimes more r is the range t is the term

Copyright © Curt Hill Range The range is a Boolean expression that states the values that the dummies may assume –This corresponds to the summation n A range of True indicates that the dummies may take on any or all values A range of False is an empty range

Copyright © Curt Hill Term The term corresponds to the expression to the right of the summation It is evaluated for each acceptable dummy value These results are connected by the operator that starts the quantifier The term has the same type as the operator –This may be a Boolean or arithmetic operator

Copyright © Curt Hill Summation Example The summation example above would then become:  = 4(+i : i    i≥0 : (-1) i  (2i+1)) –+ is the binary, symmetric, associative operator –i is the dummy –  is the set of integers An alternative is:  = 4(Σi : i    i≥0 : (-1) i  (2i+1))

Copyright © Curt Hill Product Example The product example would then be: n! = (  i : i    1 ≤ i ≤ n : i) –i is a dummy –n is a bound variable from outside the quantifier An alternative is: n! = (Πi : i    1 ≤ i ≤ n : i)

Copyright © Curt Hill Others We can apply this notation to any binary, symmetric, and associative operation such as –AND –OR –Equivalence –MAX –MIN MAX and MIN are the rare arithmetic functions that are idempotent They also have a unit and zero

Copyright © Curt Hill Alternative notations Two of these have their own special symbols And –– –Pronounced For All –The universal quantifier Or –– –Pronounced There Exists –The existential quantifier

Open Questions Again We now have a way to reduce an open question into a true false proposition The open question: 3x + 5 = 5x - 11 Becomes (  x : x   : 3x + 5 = 5x - 11 ) This statement may be true only if a solution exists or false otherwise –No longer open Copyright © Curt Hill

Predicates Up to this point we have mostly dealt with variables and operators We may also use predicates Predicate is a fancy name for a function that returns a boolean value It may have one or more arguments The argument does not have to be a boolean variable This is not startling since any boolean variable could hold the result of a predicate

Copyright © Curt Hill Predicate Examples prime(n) –The argument n is prime or not student(p) –A person p is a student or not odd(n) or even(n) Predicate names generally are single word This word should indicate the purpose

Predicate Notation As always there are multiple ways to represent the same thing I prefer: predicate(parameter) Others use single letter predicates with subscript indicating parameter: G x Thus P(x) or P x Copyright © Curt Hill

More on quantifiers Quantifiers allow us to state things that are not directly expressible with just predicates, variables and the operators In practice this should allow us to state almost any real world fact or supposition A predicate may be defined in terms of a quantifier

Copyright © Curt Hill Variables There are two types of variables in a quantified expression: bound and free A bound variable is part of the quantifier –It ranges over some set of values as part of quantification –These are often known as dummies A free variable exists outside the quantified expression

Copyright © Curt Hill Variable Example Consider: n! = (Πi : i    1 ≤ i ≤ n : i) The variable i is a bound variable It may only have a certain set of values determined by the quantifier The variable n is free –It may take on any value –Although in this expression we intend it only to be a positive integer –This indicates our expression is not as good as we would like

Copyright © Curt Hill Variable Scope The scope of a variable is that part of the expression where it is known In any quantified expression the bound variables have a scope contained by the parentheses This occasionally gets messy when a quantified expression contains another quantified expression

Copyright © Curt Hill Scope Expression (  i:i   : pred1(i)  (  k :k   : pred2(i,k))) There are two bound variables i is known in entire range k is known only in second quantifier Both may be used in the second quantifier This may cause a problem if they use the same names

Copyright © Curt Hill Resulting Types A quantifier produces the same type of result as its operator Boolean operators produce booleans Numeric operators produce numbers We may nest quantified expressions in other quantified expressions

Copyright © Curt Hill Alternate Notation Most textbooks use a looser notation This usually omits the range or incorporates it in the term The form is something like this:  p (p  p) –This is a statement of reflexivity of equivalence –Somewhat more parallel to summation There is no specific mention that p must be boolean –This is just understood Quantifiers with a numeric dummy usually assume integer or real and hope it is obvious

Naming Logicians seldom have to consider large real world problems Thus they tend to use single letter predicates to keep the notation easy This is an area where we want to describe these, so many variables or predicates may exist More descriptive names are then needed This also explains using parenthesis for arguments Copyright © Curt Hill

A Formula A formula may be defined inductively A formula is: –Any proposition or predicate –If F is a formula then  F is a formula –If F and G are formulas then F  G is a formula Also any of our other connectives –If F is a formula then (  x: … :F) and (  x: … :F) are also formulas

Copyright © Curt Hill Another Definition: Sentence A sentence is a formula with no free variables Like a proposition, a sentence does not have to be true, but it will be true or false –It may be our job to prove it true or false Recall Gödel’s statement that there exists a sentence which is both true and unprovable under any system –That uses this definition of sentence

Copyright © Curt Hill Example Sentences For each of the following: –Is it true? –What does it mean? 3<6 2+4<5 (  x:x   : (  y:y  R:x<y)) (  x:x   : (  y:y  R:x<y)) (  i:i   : (  j :j   :i=j 2 )) (  i:i   : (  j :j   :j=i 2 ))

Copyright © Curt Hill Some quantifier examples Some apples are rotten –(  a:a  Apples: rotten(a) ) All women are beautiful –(  w : w  Females: beautiful(w)) Some integers are positive All squares are rectangles Not all rectangles are squares Prime numbers exist in the integers

Copyright © Curt Hill Prime Definition Can we define a prime number? prime(n) = (  i : i    i > 1  i ≠ n : 0 ≠ n-floor(n  i)*i ) floor truncates a real number to an integer i is a dummy variable that can range over all integers greater than 1 and not equal to n

Copyright © Curt Hill Prime Definition Again This time with nested quantifiers prime(n) = (  i : i    1 < i < n :  (  j:j  I: j=n  i )) Negation of an existential gives a universal so: prime(n) = (  i : i    1 < i < n : (  j:j  I: j  n  i ))

Copyright © Curt Hill Summary What was open before (that is not possible to assign to truth value to) is now closed –We may not always know the truth value –We do know that one exists We should now be able to state in a concise form any proposition Another presentation gives some rules for manipulating quantifiers