Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1

2 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

3 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

4 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

5 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

6 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

7 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

8 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

9 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

10 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

11 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

12 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

13 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

14 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

15 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

16 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

17 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.)

18 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

19 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

20 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

21 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

22 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.

23 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.)

24 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)

25 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

26 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

27 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

28 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

29 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

30 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))

31 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]

32 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

33 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

34 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

35 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

36 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

37 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

38 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

39 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

40 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)

41 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”

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

43 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”

44 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

45 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

46 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

47 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’

48 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

49 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))

50 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))

51 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

52 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”

53 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”

54 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))

55 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))

56 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

57 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


Download ppt "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."

Similar presentations


Ads by Google