• Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
  • Hello Sharif Salem;
    Would you please add a contact to your profile?
    Are you sure you want to
    Your message goes here
    Be the first to like this
No Downloads

Views

Total Views
884
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
33
Comments
1
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Formal LogicPredicate Logic Part 1 By Mr. Sharif Salem 0
  • 2. Proposition are not enoughIn general Propositional Logic is not enough todescribe properties and its related specs. 1
  • 3. Syntax of Predicate Logic 2
  • 4. Variables and StatementsVariables• A variable is a symbol that stands for an individual in a collection or set. For example, the variable x may stand for one of the days. We may let x = Monday or x = Tuesday, etc.• A collection of objects is called the domain of a variable. – For the above example, the days in the week is the domain of variable x. Months have 30 days. – Domain or Set is Months of the year ≔ x – Individuals or objects are Jan, Feb, …… Dec. – Property or Predicate is “ has 30 days” ≔ P – Predicate Formula P(x) 3
  • 5. Quantifiers and PredicatesQuantifiers:• Quantifiers are phrases that refer to given quantities.• Two kinds of quantifiers: Universal and ExistentialUniversal Quantifier: represented by• The symbol is translated as and means “for all”, “given any”, “for each,” or “for every,” and is known as the universal quantifier.Existential Quantifier: represented by• The symbol is translated as and means variously “for some,” “there exists,” “there is a,” or “for at least one”. Some months has 30 days. – Predicate Formula ( x)P(x) 4
  • 6. Quantifiers and PredicatesPredicate• It is the verbal statement that describes the property of a variable.• Usually represented by the letter P, the notation P(x) is used to represent some unspecified property or predicate that x may have – e.g. P(x) = x has 30 days. – P(April) = April has 30 days.• The collection of objects that satisfy the property P(x) is called the domain of interpretation.• Truth value of expressions formed using quantifiers and predicates – What is the truth value of ( x)P(x) – x is all the months – P(x) = x has less than 32 days. – The above formula is true since no month has 32 days. 5
  • 7. Truth value of the following expressions• Truth of expression ( x)P(x) 1. P(x) is the property that x is yellow, and the domain of interpretation is the collection of all flowers: not true 2. P(x) is the property that x is a plant, and the domain of interpretation is the collection of all flowers: true 3. P(x) is the property that x is positive, and the domain of interpretation consists of integers: not true – Can you find one interpretation in which both (x)P(x) is true and ( x)P(x) is false? Not possible – Can you find one interpretation in which both (x)P(x) is true and ( x)P(x) is false? Case 1 as mentioned above 6
  • 8. Unary, Binary, Ternary, … N-ary Predicate• A predicate Formula for a single variable is known as unary predicate All days has 24 hours ≔ ( x)P(x)• A predicate Formula for two variables is known as Binary predicate For every University there exists a talent students . ≔ ( x) ( y) Q(x,y)• A predicate Formula for N variables is known as N-ary predicate. 7
  • 9. Interpretation• Formal definition: An interpretation for an expression involving predicates consists of the following: 1. A collection of objects, called the domain of interpretation, which must include at least one object. 2. An assignment of a property of the objects in the domain to each predicate in the expression. 3. An assignment of a particular object in the domain to each constant symbol in the expression. 8
  • 10. WFF• Predicate wffs can be built similar to propositional wffs using logical connectives with predicates and quantifiers.• Examples of predicate wffs – ( x)[P(x) Q(x)] – ( x) (( y)[P(x,y) V Q(x,y)] R(x)) – S(x,y) Λ R(x,y) 9
  • 11. Translation: Verbal statements to symbolic form• “Every person is nice” can be rephrased as “For any thing, if it is a person, then it is nice.” P(x) ≔ “x is a person” Q(x) ≔ “x is nice” the statement can be symbolized as For any thing, if it is a person, then it is nice ( x) [ P(x) Q(x) ] – “All persons are nice” or “Each person is nice” will also have the same symbolic formula. – always related with (implication) 10
  • 12. Translation: Verbal statements to symbolic form• “There is a nice person” can be rewritten as “There exists something that is both a person and nice.” In symbolic form, ( x)[P(x) Λ Q(x)]. – Variations: “Some persons are nice” or “There are nice persons.” – always related with Λ (conjunction)• What would the following form mean for the example above? ( x)[P(x) Q(x)] ??????? 11
  • 13. Translation• Example for forming symbolic forms from predicate symbols D(x) ≔ “x is a dog” R(y) ≔ “y is a rabbit” C(x,y) ≔ “x chases y” – All dogs chase all rabbits ≔ For anything, if it is a dog, Then for any other thing, if it is a rabbit, then the dog chases it ≔ ( x)[ D(x) ( y)( R(y) C(x,y) ) ] 12
  • 14. Translation D(x) ≔ “x is a dog” R(y) ≔ “y is a rabbit” C(x,y) ≔ “x chases y”– Some dogs chase all rabbits ≔ There is something that is a dog and for any other thing, if that thing is a rabbit, then the dog chases it ≔ ( x)[D(x) Λ ( y)(R(y) C(x,y) ) ]– Only dogs chase rabbits ≔ For any things, If it chase rabbits, then it is a dog. ≔ For any things and for any other things if the other things is rabbits and chases by the first thing, then that first thing is a dog ≔ For any two things, if one is a rabbit and the other chases it, then the other is a dog ≔ ( y) ( x)[R(y) Λ C(x,y) D(x)] 13
  • 15. Negation of statements• Everything is fun ≔ ( x)A(x) – Negation will be “it is false that everything is fun,” ≔ [( x)A(x)] – i.e. “something is non-fun.” ≔ ( x)[A(x)] – In symbolic form, [( x)A(x)] ↔ ( x)[A(x)]• Similarly negation of “Something is fun” ≔ ( x)A(x) – Negation will be “it is false that Something is fun,” “Nothing is fun” ≔ [( x)A(x)] – i.e. “Everything is boring.” ≔ ( x)[A(x)] – Hence, [( x)A(x)] ↔ ( x)[A(x)] 14
  • 16. Negation of statementsWhat is the negation of the following statements?• Some pictures are old and faded. Every picture is neither old n• All people are tall and thin. Someone is short or fat. 15
  • 17. Class exercise  S(x)≔ x is a player  I(x)≔ x is good  M(x)≔ x scores goals• Write wffs that express the following statements: – All players are good. For anything, if it is a player, then it is good ≔ ( x)[S(x) I (x)] – Some good players, score goals.There is something that is good and it is a player and it score goals≔ ( x)[I(x) Λ S(x) Λ M(x)] 16
  • 18. Class exercise  S(x)≔ x is a player  I(x)≔ x is good  M(x)≔ x scores goals – Everyone who scores goals is a bad player.For anything, if that thing scores goals, then it is a player and it is not good≔ ( x)[ M(x) S(x) Λ (I (x)) ] – Only good player, scores goals.For any thing, if it scores goals , then it is a player and it is good≔ ( x)(M(x) S(x) Λ I(x)) 17
  • 19. Validity• Similar to a tautology of propositional logic.• Truth of a predicate wff depends on the interpretation.• A predicate wff is valid if it is true in all possible interpretations just like a propositional wff is true if it is true for all rows of the truth table.• A valid predicate wff is intrinsically true Propositional Predicate Wffs Wffs Truth True or false – True, false or values depends on the neither (if the truth value of wff has a free statement variable) letters Intrinsic Tautology – true Valid wff – truth for all truth true for all• Free Variable ( x)[P(x,y) ( y) Q(x,y)] values of its interpretations variable y is not defined for P(x,y) hence y is called a free variable. Such expressions might statements not have a truth value at all. Methodolo Truth Proof sequence gy Table/Proof using 18 sequence using rules/others
  • 20. Bound and Free variable 19
  • 21. Validity examples• ( x)P(x) ( x)P(x) – This is valid because if every object of the domain has a certain property, then there exists an object of the domain that has the same property.• ( x)P(x) P(a) – Valid – quite obvious since “a” is a member (object) of the domain of x.• ( x)P(x) ( x)P(x) – Not valid since the property cannot be valid for all objects in the domain if it is valid for some objects of than domain. Can use a mathematical context to check as well. – Say P(x) = “x is even,” then there exists an integer that is even but not every integer is even. 20
  • 22. Validity examples• ( x)[P(x) V Q(x)] ( x)P(x) V ( x)Q(x) – Invalid, can prove by mathematical context by taking P(x) = x is even and Q(x) = x is odd. – In that case, the hypothesis is true but not the conclusion is false because it is not the case that every integer is even or that every integer is odd. 21
  • 23. Class Exercise• What is the truth of the following wffs where the domain consists of integers:• ( x)[L(x) O(x)] where O(x) is “x is odd” and L(x) is “x < 10”?• Using predicate symbols and appropriate quantifiers, write the symbolic form of the following English statement: – D(x) is “x is a day” M is “Monday” T is “Tuesday” – S(x) is “x is sunny” R(x) is “x is rainy”• Some days are sunny and rainy.• It is always a sunny day only if it is a rainy day.• It rained both Monday and Tuesday.• Every day that is rainy is not sunny. 22
  • 24. Conclusion• Propositional Logic is not enough to describe properties and its related specs.• Predicate Logic Syntax are variables, quantifiers, predicate and connectives.• A collection of objects is called the domain of a variable.• Two kinds of quantifiers: Universal and Existential.• The collection of objects that satisfy the property P(x) is called the domain of interpretation.• always related with (implication)• always related with Λ (conjunction)• Negation of statements represented by the formula • [( x)A(x)] ↔ ( x)[A(x)] • [( x)A(x)] ↔ ( x)[A(x)]• Bound variable is the variable within the scope of the quantifier. Free variable is the one out of the scope.• A predicate wff is valid if it is true in all possible interpretations 23
  • 25. End of Lecture 24