Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter1 Predicate Logic Rosen 5 th ed., §§1.3-1.4 (but much extended) ~135 slides, ~5 lectures.

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

Slides adapted from Michael P. Frank ' s course based on the text Discrete Mathematics & Its Applications (5 th Edition) by Kenneth H. Rosen CS2013 Mathematics.
CS 285- Discrete Mathematics
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 
2009/91 Predicates and Quantifiers (§1.3) In the sentence “x is greater than 3”: The phrase “x” denotes the subject - the object or entity that the sentence.
1 Predicate Logic Rosen 6 th ed., § Predicate Logic Predicate logic is an extension of propositional logic that permits concisely reasoning.
From Chapter 4 Formal Specification using Z David Lightfoot
Predicate Logic and Quantifies
Monadic Predicate Logic is Decidable Boolos et al, Computability and Logic (textbook, 4 th Ed.)
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 6 Limitations of propositional logic Introduction to predicate logic Symbols, terms and formulae, Parse.
Formal Logic Mathematical Structures for Computer Science Chapter 1 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesFormal Logic.
CSE115/ENGR160 Discrete Mathematics 01/20/11 Ming-Hsuan Yang UC Merced 1.
Discrete Math 6A Max Welling. Recap 1. Proposition: statement that is true or false. 2. Logical operators: NOT, AND, OR, XOR, ,  3. Compound proposition:
Lecture 8 Introduction to Logic CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Module #1 - Logic 8/28/2015Michael Frank / Kees van Deemter1 Remember: I. Construct a model where 1 and 4 are true, while 2 and 3 are false Let the u.d.
CSci 2011 Discrete Mathematics Lecture 3 CSci 2011.
The Foundations: Logic and Proofs
Logical Equivalence & Predicate Logic
Formal Logic Mathematical Structures for Computer Science Chapter Copyright © 2006 W.H. Freeman & Co.MSCS SlidesFormal Logic.
DECIDABILITY OF PRESBURGER ARITHMETIC USING FINITE AUTOMATA Presented by : Shubha Jain Reference : Paper by Alexandre Boudet and Hubert Comon.
1.1 CompSci 102© Michael Frank Today’s topics Propositional equivalencesPropositional equivalences Predicate logicPredicate logic Reading: Sections Reading:
10/17/2015Michael Frank / Kees van Deemter1 University of Aberdeen, Computing Science CS3518 Lecture on Models and Satisfiability Further details: K.Rosen,
Section 1.5. Section Summary Nested Quantifiers Order of Quantifiers Translating from Nested Quantifiers into English Translating Mathematical Statements.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Logic CL4 Episode 16 0 The language of CL4 The rules of CL4 CL4 as a conservative extension of classical logic The soundness and completeness of CL4 The.
2.3Logical Implication: Rules of Inference From the notion of a valid argument, we begin a formal study of what we shall mean by an argument and when such.
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.
Slides adapted from Michael P. Frank ' s course based on the text Discrete Mathematics & Its Applications (5 th Edition) by Kenneth H. Rosen University.
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.
Copyright © Curt Hill Quantifiers. Copyright © Curt Hill Introduction What we have seen is called propositional logic It includes.
Hazırlayan DISCRETE COMPUTATIONAL STRUCTURES Propositional Logic PROF. DR. YUSUF OYSAL.
CompSci 102 Discrete Math for Computer Science
Module #1 - Logic 11/24/2015Michael Frank / Kees van Deemter1 University of Aberdeen, Computing Science CS3511 Discrete Methods Kees van Deemter Slides.
CompSci 102 Discrete Math for Computer Science January 24, 2012 Prof. Rodger Slides modified from Rosen.
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:
Discrete Mathematics CS 2610 August 22, Agenda Last class Propositional logic Logical equivalences This week Predicate logic & rules of inference.
For Wednesday Read chapter 9, sections 1-3 Homework: –Chapter 7, exercises 8 and 9.
CS 285- Discrete Mathematics Lecture 4. Section 1.3 Predicate logic Predicate logic is an extension of propositional logic that permits concisely reasoning.
Predicate Logic One step stronger than propositional logic Copyright © Curt Hill.
Albert Gatt LIN3021 Formal Semantics Lecture 3. Aims This lecture is divided into two parts: 1. We make our first attempts at formalising the notion of.
PREDICATES AND QUANTIFIERS COSC-1321 Discrete Structures 1.
Mathematics for Comter I Lecture 3: Logic (2) Propositional Equivalences Predicates and Quantifiers.
Lecture 041 Predicate Calculus Learning outcomes Students are able to: 1. Evaluate predicate 2. Translate predicate into human language and vice versa.
1 Introduction to Abstract Mathematics Chapter 3: The Logic of Quantified Statements. Predicate Calculus Instructor: Hayk Melikya 3.1.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
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.
Discrete Math - Module #1 - Logic
Logic II CSE 140 etc..
Propositional Calculus: Boolean Algebra and Simplification
CS201: Data Structures and Discrete Mathematics I
CSI 2101 / Predicate logic (§ ):
CHAPTER 1: LOGICS AND PROOF
Discrete Math - Module #1 - Logic
Predicate Logic (§1.3) Predicate logic is an extension of propositional logic that permits concisely reasoning about whole classes of entities. Propositional.
Discrete Mathematics Lecture 4 & 5: Predicate and Quantifier
Negations of quantifiers
Discrete Mathematics Lecture 4 & 5: Predicate and Quantifier
Predicates and Quantifiers
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.
Presentation transcript:

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter1 Predicate Logic Rosen 5 th ed., §§ (but much extended) ~135 slides, ~5 lectures

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter2 Predicate Logic (§1.3) We can use propositional logic to prove that certain real-life inferences are valid.We can use propositional logic to prove that certain real-life inferences are valid. –If it’s cold then it snows. –If it snows there are accidents –It’s not true that there are accidents. Therefore: –It’s not cold In propositional logic:In propositional logic: ((c  s  s  a  a)  c) is a tautology Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter3 Predicate Logic (§1.3) In propositional logic:In propositional logic: (((c  s)  (s  a)  a)  c) is a tautology Saying this differently, It follows by propositional logic from (c  s)  (s  a)  a (premisse) that  c (conclusion)Saying this differently, It follows by propositional logic from (c  s)  (s  a)  a (premisse) that  c (conclusion) Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter4 Predicate Logic (§1.3) But other valid inferences cannot be proven valid by propositional logicBut other valid inferences cannot be proven valid by propositional logic –Some girl is adored by everyone. Therefore: –Everyone adores someone For inferences like this, we need a more expressive logicFor inferences like this, we need a more expressive logic Needed: treatment of `some’ and `every’ (analogous to `or’ and `and’)Needed: treatment of `some’ and `every’ (analogous to `or’ and `and’) Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter5 Predicate Logic (§1.3) Predicate logic is an extension of propositional logic that permits quantification over classes of entities.Predicate logic is an extension of propositional logic that permits quantification over classes of entities. Propositional logic (recall) treats simple propositions (sentences) as atomic entities.Propositional logic (recall) treats simple propositions (sentences) as atomic entities. In contrast, predicate logic distinguishes the subject of a sentence from its predicate.In contrast, predicate logic distinguishes the subject of a sentence from its predicate. Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter6 Applications of Predicate Logic It is one of the most-used formal notations for writing mathematical definitions, axioms, and theorems. For example, in linear algebra, a partial order is introduced saying that a relation R is reflexive and transitive – and these notions are defined using predicate logic. Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter7 Practical Applications of Predicate Logic Basis for many Artificial Intelligence systems.Basis for many Artificial Intelligence systems. –E.g. automatic program verification systems. Predicate-logic like statements are supported by some of the more sophisticated database query enginesPredicate-logic like statements are supported by some of the more sophisticated database query engines There are also limitations associated with using predicate logic. – More about that laterThere are also limitations associated with using predicate logic. – More about that later Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter8 First: A bit of grammar In the sentence “The dog is sleeping”:In the sentence “The dog is sleeping”: –The phrase “the dog” denotes the subject - which the sentence is about. –The phrase “is sleeping” denotes the predicate- a property that is true of the subject. Predicate logic follows broadly the same pattern.Predicate logic follows broadly the same pattern. Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter9 Formulas of predicate logic (informal) We will use various kinds of individual constants that denote individuals/objects: a,b,c,…We will use various kinds of individual constants that denote individuals/objects: a,b,c,… Constants are a bit like names Constants are a bit like names Individual variables over objects: x, y, z, …Individual variables over objects: x, y, z, … The result of applying a predicate P to a constant a is the proposition P(a) Meaning: the object denoted by a has the property denoted by P.The result of applying a predicate P to a constant a is the proposition P(a) Meaning: the object denoted by a has the property denoted by P. Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter10 Formulas of predicate logic (informal) The result of applying a predicate P to a variable x is the propositional form P(x).The result of applying a predicate P to a variable x is the propositional form P(x). –E.g. if P = “is a prime number”, then P(x) is the propositional form “x is a prime number”. Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter11 Predicates/relations with n places Predicate logic generalises the notion of a predicate to include propositional functions of any number of arguments. E.g.:Predicate logic generalises the notion of a predicate to include propositional functions of any number of arguments. E.g.: R(x,y) = “x adores y” P(x,y,z) = “x gave y the grade z” Q(x,y,z,u)= “ x*(y+z)=u ” Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter12 Universes of Discourse (U.D.s) Predicate Logic lets you state things about many objects at once, using quantifiersPredicate Logic lets you state things about many objects at once, using quantifiers E.g., let P(x) = “ (x*2)  x ”. We can then say, “For any number x, P(x) is true” instead of (0*2  0)  (1*2  1)  (2*2  2) ...E.g., let P(x) = “ (x*2)  x ”. We can then say, “For any number x, P(x) is true” instead of (0*2  0)  (1*2  1)  (2*2  2) ... The collection of values that a variable x can take is called x’s universe of discourseThe collection of values that a variable x can take is called x’s universe of discourse Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter13 Universes of Discourse (U.D.s) In a finite U.D., quantifiers can be replaced by , In a finite U.D., quantifiers can be replaced by ,  E.g., if the domain is all the members of the House of Commons, then it is equivalent to sayE.g., if the domain is all the members of the House of Commons, then it is equivalent to say 1. For any person x, x has a consituency 2. D.Cameron has a constituency  E.Miliband has a constituency,  …  MP nr. 650 has a constituency For an infinite U.D. this is not true unless we allow infinite conjunctions and disjunctionsFor an infinite U.D. this is not true unless we allow infinite conjunctions and disjunctions Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter14 Universes of Discourse (U.D.s) A statement can be true in one U.D. and false in anotherA statement can be true in one U.D. and false in another E.g., let P(x)=“x*2  x”, thenE.g., let P(x)=“x*2  x”, then –“For any number x, P(x) is true” is true when U.D. = N –“For any number x, P(x) is true” is false when U.D. = Z Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter15 Back to propositional logic In propositional logic, we could not simply say whether a formula is TRUE; what we could say is whether it is TRUE with respect to a given assignment of TRUE/FALSE to the Atoms in the formulaIn propositional logic, we could not simply say whether a formula is TRUE; what we could say is whether it is TRUE with respect to a given assignment of TRUE/FALSE to the Atoms in the formula E.g., p  q is TRUE with respect to the assignment p=TRUE, q=TRUEE.g., p  q is TRUE with respect to the assignment p=TRUE, q=TRUE

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter16 Predicate logic In predicate logic, we say that a formula is TRUE (FALSE) with respect to a modelIn predicate logic, we say that a formula is TRUE (FALSE) with respect to a model Model = u.d. plus specification of the “meanings” of the predicates. This can be done e.g.Model = u.d. plus specification of the “meanings” of the predicates. This can be done e.g. –by giving an English equivalent of a predicate –by listing explicitly which objects the predicate is true of... as long the extension of the predicate is clear. (By definition, this is the set of objects in the u.d. for which the predicate holds.)... as long the extension of the predicate is clear. (By definition, this is the set of objects in the u.d. for which the predicate holds.)

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter17 These ideas formalised “  ” is the FOR  LL or universal quantifier. “  ” is the  XISTS or existential quantifier.“  ” is the FOR  LL or universal quantifier. “  ” is the  XISTS or existential quantifier. For example,  x P(x) and  x P(x) are propositionsFor example,  x P(x) and  x P(x) are propositions Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter18 Meaning of Quantified Expressions First, informally:  x P(x) means for all x in the u.d., P holds.  x P(x) means for all x in the u.d., P holds.  x P(x) means there exist x in the u.d. (that is, 1 or more) such that P(x) is true.  x P(x) means there exist x in the u.d. (that is, 1 or more) such that P(x) is true. Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter19 Example:  Let the u.d. be the parking spaces at UF. Let P(x) mean “x is full.” Then the existential quantification of P(x),  x P(x), is the proposition saying that –“Some parking spaces at UF are full.” –“There is a parking space at UF that is full.” –“At least one parking space at UF is full.” Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter20 Example:  Let the u.d. be parking spaces at UF. Let P(x) be the prop. form “x is occupied” Then the universal quantification of P(x),  x P(x), is the proposition: Let the u.d. be parking spaces at UF. Let P(x) be the prop. form “x is occupied” Then the universal quantification of P(x),  x P(x), is the proposition: –“All parking spaces at UF are occupied.” –“For each parking space at UF, that space is full.” Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter21 Syntax of predicate logic (for 1- and 2-place predicates) Variable: x,y,z,… Constants: a,b,c,…Variable: x,y,z,… Constants: a,b,c,… 1-place predicates: P,Q,…1-place predicates: P,Q,… 2-place predicates: R,S,…2-place predicates: R,S,… Atomic formulas: If  is a 1-pace predicate and  a variable or constant then  (  ) is an atomic formula.Atomic formulas: If  is a 1-pace predicate and  a variable or constant then  (  ) is an atomic formula. If  is a 2-pace predicate and  and  are variables or constants then  ( ,  ) is an atomic formula. If  is a 2-pace predicate and  and  are variables or constants then  ( ,  ) is an atomic formula.

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter22 Syntax of predicate logic (for 1- and 2-place predicates) (Wellformed) Formulas: All atomic formulas are formulasAll atomic formulas are formulas If  and  are formulas then , (   ), (  ), (   ) are formulas.If  and  are formulas then , (   ), (  ), (   ) are formulas. If  is a formula then  x  and  x  are formulas. (Likewise,  y  and  y , and so on.)If  is a formula then  x  and  x  are formulas. (Likewise,  y  and  y , and so on.)

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter23 Syntax of predicate logic (for 1- and 2-place predicates) Show that these are wellformed formulas:  xP(x)  yQ(x)  x  y R(x,y)  xP(b)

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter24 Syntax of predicate logic (for 1- and 2-place predicates)  xP(x)  yQ(x)  x  y R(x,y)  xP(b) P(x) is a (atomic) formula, hence  xP(x) is a formulaP(x) is a (atomic) formula, hence  xP(x) is a formula Q(x) is a (atomic) formula, hence  yQ(x) is a formulaQ(x) is a (atomic) formula, hence  yQ(x) is a formula R(x,y) is a (atomic) formula, hence  y R(x,y) is a formula, hence  x  y R(x,y) is a formulaR(x,y) is a (atomic) formula, hence  y R(x,y) is a formula, hence  x  y R(x,y) is a formula P(b) is a (atomic) formula, hence  xP(b) is a formulaP(b) is a (atomic) formula, hence  xP(b) is a formula

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter25 Syntax of predicate logic (for 1- and 2-place predicates) Examples:  xP(x) and  yQ(x),  x(  y R(x,y)),  x(  x R(x,y)),  xP(b) etc.Examples:  xP(x) and  yQ(x),  x(  y R(x,y)),  x(  x R(x,y)),  xP(b) etc. Lots of pathological cases. For example,Lots of pathological cases. For example, –It will follow from the meaning of these formulas that  xP(b) is true iff P(b) is true –Rule of thumb: a quantifier that does not bind any variables can be ignored

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter26 Free and Bound Variables An expression like P(x) is said to have a free variable x (i.e., x is not “defined”).An expression like P(x) is said to have a free variable x (i.e., x is not “defined”). A quantifier (either  or  ) operates on an expression having one or more free variables, and binds one or more of those variables, to produce an expression having one or more bound variables.A quantifier (either  or  ) operates on an expression having one or more free variables, and binds one or more of those variables, to produce an expression having one or more bound variables. Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter27 Example of Binding P(x,y) has 2 free variables, x and y.P(x,y) has 2 free variables, x and y.  x P(x,y) has 1 free variable, and one bound variable. [Which is which?]  x P(x,y) has 1 free variable, and one bound variable. [Which is which?] An expression with zero free variables is a statement / proposition.An expression with zero free variables is a statement / proposition. An expression with one free variable is similar to a predicate: e.g. let Q(y) =  x Adore(x,y)An expression with one free variable is similar to a predicate: e.g. let Q(y) =  x Adore(x,y) Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter28 Free variables, defined formally The free-variable occurrences in an Atom are: all the variable occurrences in that AtomThe free-variable occurrences in an Atom are: all the variable occurrences in that Atom The free-variable occurrences in  are: the free- variable occurrences in The free-variable occurrences in  are: the free- variable occurrences in  The free-variable occurrences in (  connective  ) are: the free-variable occurrences in  plus the free-variable occurrences in The free-variable occurrences in (  connective  ) are: the free-variable occurrences in  plus the free-variable occurrences in  The free-variable occurrences in  x  and  x  are: the free-variable occurrences in  except for all/any occurrences of x.The free-variable occurrences in  x  and  x  are: the free-variable occurrences in  except for all/any occurrences of x. Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter29 Occurrences of variables that are not free are bound.Occurrences of variables that are not free are bound. Test your understanding: Which (if any) variables are free inTest your understanding: Which (if any) variables are free in  x  P(x)  x  P(x)  yQ(x)  xP(b) (NB, b is a constant)  x(  y R(x,y))

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter30 Occurrences of variables that are not free are bound.Occurrences of variables that are not free are bound. Check your understanding: Which (if any) variables are free inCheck your understanding: Which (if any) variables are free in  x  P(x) [no free variables]  x  P(x) [no free variables]  yQ(x) [x is free]  xP(b) (NB, b is a constant) [no free var.]  x(  y R(x,y)) [no free variables]

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter31 A more precise definition of the truth/falsity of quantified formulas (Formulation is simplified somewhat because we assume that every object in the u.d. D has a `name` (i.e., a constant referring to it)).(Formulation is simplified somewhat because we assume that every object in the u.d. D has a `name` (i.e., a constant referring to it)). First some notation:  (x:=a) is the result of substituting all free occurrences of the variable x in  by the constant aFirst some notation:  (x:=a) is the result of substituting all free occurrences of the variable x in  by the constant a Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter32 Exercise Say what  (x:=a) is, if  = 1.P(x) 2.R(x,y) 3.P(b) 4.  x  P(x) 5.  yQ(x) Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter33 Exercise Say what  (x:=a) is, if  = 1.P(x)..... P(a) 2.R(x,y).... R(a,y) 3.P(b)..... P(b) 4.  x  P(x)  x  P(x) 5.  yQ(x)  yQ(a) Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter34 A more precise definition of the truth/falsity of quantified formulas (Formulation is simplified somewhat because we assume that every object in the u.d. has a `name` (i.e., a constant referring to it)).(Formulation is simplified somewhat because we assume that every object in the u.d. has a `name` (i.e., a constant referring to it)). Let  be a formula. Then  x  is true in D if at least one expression of the form  (x:=a) is true in D, and false otherwise. (a can be any constant)Let  be a formula. Then  x  is true in D if at least one expression of the form  (x:=a) is true in D, and false otherwise. (a can be any constant) Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter35 A more precise definition Let  be a formula. Then  x  is true in D if at least one expression  (x:=a) is true in D, and false otherwise.Let  be a formula. Then  x  is true in D if at least one expression  (x:=a) is true in D, and false otherwise. A simple example:  = P(x)A simple example:  = P(x) P(x) is a formula, hence  x P(x) is true in D if at least one expression of the form P(a) is true in D, and false otherwise. Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter36 Similarly for  Let  be a formula. Then the proposition  x  is true in D if every expression of the form  (x:=a) is true in D, and false otherwise.Let  be a formula. Then the proposition  x  is true in D if every expression of the form  (x:=a) is true in D, and false otherwise. A simple example:  = P(x)A simple example:  = P(x) P(x) is a formula, hence  x P(x) is true in D if every expression P(a) is true in D, and false otherwise. P(x) is a formula, hence  x P(x) is true in D if every expression P(a) is true in D, and false otherwise. Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter37 Complex formulas Example: Let the u.d. of x and y be people. Let L(x,y)=“x likes y” (a predicate w. 2 f.v.’s) Then  y L(x,y) = “There is someone whom x likes.” (A predicate w. 1 free variable, x) Then  x (  y L(x,y)) = “Everyone has someone whom they like.” (a real proposition; no free variables left) Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter38 Consequences of Binding (work out for yourself by checking when each formula is true)  x  x P(x) - x is not a free variable in  x P(x), therefore the  x binding isn’t used, as it were.  x  x P(x) - x is not a free variable in  x P(x), therefore the  x binding isn’t used, as it were. (  x P(x) )  Q(x) - The variable x is outside of the scope of the  x quantifier, and is therefore free. Not a complete proposition!(  x P(x) )  Q(x) - The variable x is outside of the scope of the  x quantifier, and is therefore free. Not a complete proposition! (  x P(x) )  (  x Q(x) ) – A complete proposition, and no superfluous quantifiers(  x P(x) )  (  x Q(x) ) – A complete proposition, and no superfluous quantifiers Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter39 Nested quantifiers Assume S(x,y) means “x sees y” u.d.=all people What does the following formula mean?  xS(x,a)

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter40 Nested quantifiers Assume S(x,y) means “x sees y”. u.d.=all people  xS(x,a) means “For every x, x sees a” In other words, “Everyone sees a”

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter41 Nested quantifiers What does the following formula mean?  x(  y S(x,y))

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter42 Nested quantifiers  x(  y S(x,y)) means “For every x, there exists a y such that x sees y” In other words: “Everyone sees someone”

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter43 Quantifier Exercise If R(x,y)=“x relies upon y,” express the following in unambiguous English:  x(  y R(x,y))=  y(  x R(x,y))=  x(  y R(x,y))=  y(  x R(x,y))=  x(  y R(x,y))= Everyone has someone to rely on. There’s a poor overburdened soul whom everyone relies upon (including himself)! There’s some needy person who relies upon everybody (including himself). Everyone has someone who relies upon them. Everyone relies upon everybody, (including themselves)! Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter44 Quantifier Exercise R(x,y)=“x relies upon y”. Suppose the u.d. is not empty. Now consider these formulas: 1.  x(  y R(x,y)) 2.  y(  x R(x,y)) 3.  x(  y R(x,y)) Which of them is most informative? Which of them is least informative? Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter45 Quantifier Exercise (Recall: the u.d. is not empty. Empty u.d.’s are discussed later.) 1.  x(  y R(x,y)) Least informative 2.  y(  x R(x,y)) 3.  x(  y R(x,y)) Most informative If 3 is true then 2 must also be true. If 2 is true then 1 must also be true. We say: 3 is logically stronger than 2 than 1 Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter46 “logically stronger than” General:  is logically stronger than  iffGeneral:  is logically stronger than  iff –it is not possible for  to be true and  false –it is possible for  to be true and  false E.g.  = John is older than 30,  = John is older than 20.E.g.  = John is older than 30,  = John is older than 20. We write ‘iff’ for ‘if and only if’We write ‘iff’ for ‘if and only if’

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter47 Natural language is ambiguous! “Everybody likes somebody.”“Everybody likes somebody.” –For everybody, there is somebody they like,  x  y Likes(x,y)  x  y Likes(x,y) –or, there is somebody (a popular person) whom everyone likes?  y  x Likes(x,y)  y  x Likes(x,y) [Probably more likely.] Topic #3 – Predicate Logic

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter48 Interactions between quantifiers and connectives Let the u.d. be parking spaces at UF. Let P(x) be “x is occupied.” Let Q(x) be “x is free of charge.” 1.  x (Q(x)  P(x)) 2.  x (Q(x)  P(x)) 3.  x (Q(x)  P(x)) 4.  x (Q(x)  P(x))

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter49 I. Construct English paraphrases Let the u.d. be parking spaces at UF. Let P(x) be “x is occupied.” Let Q(x) be “x is free of charge.” 1.  x (Q(x)  P(x)) 2.  x (Q(x)  P(x)) 3.  x (Q(x)  P(x)) 4.  x (Q(x)  P(x))

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter50 I. Construct English paraphrases 1.  x (Q(x)  P(x)) Some places are free of charge and occupied 2.  x (Q(x)  P(x)) All places are free of charge and occupied 3.  x (Q(x)  P(x)) All places that are free of charge are occupied 4.  x (Q(x)  P(x)) For some places x, if x is free of charge then x is occupied

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter51 About the last of these 4.  x (Q(x)  P(x)) “For some x, if x is free of charge then x is occupied”  x (Q(x)  P(x)) is true iff, for some place a, Q(a)  P(a) is true. Q(a)  P(a) is true iff Q(a) is false and/or P(a) is true (conditional is only false in one row of table!) “Some places are either (not free of charge) and/or occupied”

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter52 About the last of these 4.  x (Q(x)  P(x)) When confused by a conditional: re-write it using negation and disjunction:  x (  Q(x)  P(x))  (p. 67)  x  Q(x)   x P(x) “Some places are not free of charge or some places are occupied”

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter53 Combinations to remember:Combinations to remember: 1.  x (Q(x)  P(x)) 2.  x (Q(x)  P(x))

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter54 II. Construct a model where 1 and 4 are true, while 2 and 3 are false Let the u.d. be parking spaces at UF. Let P(x) be “x is occupied.” Let Q(x) be “x is free of charge.” 1.  x (Q(x)  P(x)) 2.  x (Q(x)  P(x)) 3.  x (Q(x)  P(x)) 4.  x (Q(x)  P(x))

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter55 II. Construct a model where 1 and 4 are true, while 2 and 3 are false 1.  x (Q(x)  P(x)) (true for place a below) 2.  x (Q(x)  P(x)) (false for places b below) 3.  x (Q(x)  P(x)) (false for place b below) 4.  x (Q(x)  P(x)) (true for place a below) One solution: a model with exactly two objects in it. One object has the property Q and the property P; the other object has the property Q but not the property P. In a diagram: a: Q P b: Q not-P a: Q P b: Q not-P

Module #1 - Logic 5/16/2015Michael Frank / Kees van Deemter56 III. Construct a model where 1 and 3 and 4 are true, but 2 is false 1.  x (Q(x)  P(x)) 2.  x (Q(x)  P(x)) 3.  x (Q(x)  P(x)) 4.  x (Q(x)  P(x)) Here is such a model (using a diagram). It has just two objects in its u.d., called a and b: a: Q P b: not-Q P a: Q P b: not-Q P