Presentation is loading. Please wait.

Presentation is loading. Please wait.

Predicate Logic. Universal Quantifier Everything of a certain kind has a certain property (for every, for all)

Similar presentations


Presentation on theme: "Predicate Logic. Universal Quantifier Everything of a certain kind has a certain property (for every, for all)"— Presentation transcript:

1 Predicate Logic

2

3

4

5

6 Universal Quantifier Everything of a certain kind has a certain property (for every, for all)

7 Universal quantifier

8

9 Existential quantifier

10

11

12 Constraints

13 Universal quantification with constraint  D | P Q Existential quantification with constraint  D | P Q Where D is declaration, P is predicate acting as constraint and Q is predicate being quantified

14 Recast with Constraints

15 Examples For every natural number n, less than or equal to 10, n squared is less than or equal to a hundred.  n :  | n  10 n 2  100 or  n :  (n  10  n 2  100) For some natural number n, less than or equal to 10, n squared is 64.  n :  | n  10 n 2 = 64 or  n :  (n  10  n 2 = 64)

16 Free variables

17 Free Variables

18  y :  x = y 2, x is free variable, y is a bound variable; y can be replaced by almost any name.  p :  x = p 2, the meaning of the existential quantification is unchanged  x :  x = x 2, x no longer free

19 Mixing quantifiers Predicate begins with two quantifiers, one existential and one universal Must take care about changing their order, as in general this is not possible  x :  (  y :  y > x) – given any integer we can always find bigger than it `  y :  (  x :  y > x) – we can find an integer that is bigger than all the integers

20 Example Sao Paolo is bigger than any other city in the same country Rephrase it to there is a certain country to which Sao Paolo belongs, and Sao Paolo is bigger than any other city in that country Formally stated  co : country Sao Paolo is in co   ci : city ci is in co   ci is Sao Paolo  Soa Paolo is bigger than ci

21 Negation of quantifiers The negation of ‘Everything of a certain kind has a certain property’ is ‘at least one thing of that kind does not have that property’ Example  n :  | n > 5 n 2 > 100 -- every natural number greater than 5 has a square that is greater than 100 Its negation  n :  | n > 5 n 2  100 --- some natural number greater than 5 has a square that is not greater than 100 In general (  D | P Q)  (  D | P (  Q))

22 Negation of quantifiers The negation of ‘at least one thing of a certain kind has a certain property’ is ‘Everything of that kind does not have that property’ Example  n :  | n > 5 n 2 = 100 – there is a natural number greater than 5 whose square is 100 Its negation  n :  | n > 5 n 2  100 -- every natural number greater than 5 has a square that is not 100 In general (   D | P Q)  (  D | P (  Q))

23 Example Sao Paolo is bigger than any city in Europe Rephrase as follows: for every city c if c is in Europe then Sao Paolo is bigger than c Formally can be written as  c : city c is in Europe  Sao Paolo is bigger than c or  c : city  (c is in Europe  Sao Paolo is bigger than c)

24 Equality

25 1 + 1 = 2 First day of fasting = first Ramadan

26 Equality : property Symmetric; if s=t then t=s Transitivity; s=t, t=u, then s=u

27 Uniqueness and quantity

28 Let x loves y mean that x is in love with y, and let Person be the set of all people Symbolizing proposition ‘only Romeo loves Juliet’ Romeo loves Juliet   p : Person p loves Juliet  p = Romeo

29 Statement ‘there is at most one person with whom Romeo is in love’ Formally written  p, q : Person Romeo loves p  Romeo loves q  p = q if p and q are two people that Romeo loves, then they must be the same person Statement ‘no more than two visitors are permitted’

30 The notion of ‘at least one’ can be formalised using existential quantifier Statement ‘at least one person has applied’  p : Person : p  Applicants Statement ‘there are at least two applicants’; we use equality  p, q : Applicants p  q Statement ‘there is exactly one book on my desk’  b : Book b  Desk  (  c : Book | c  Desk c = b)

31 Definite Description We may describe an object in terms of its properties without giving it a name Examples indicate there is a unique object with certain properties - the man who shot John Lennon - the woman who discovered radium - the oldest faculty in UPM

32 Definite Description The  -notation is use for definite description of object We write (  x : a | p) to denote the unique object x from a such that p Examples indicate there is a unique object with certain properties (  x : Person | x shot John Lennon) (  y : Person | y discovered radium) (  z : Faculty | z is the oldest faculties in UPM) Marie Curie = (  y : Person | y discovered radium) Marie Curie  Person  Marie Curie discovered radium

33 Definite Description


Download ppt "Predicate Logic. Universal Quantifier Everything of a certain kind has a certain property (for every, for all)"

Similar presentations


Ads by Google