Department of Computer Science Abdul Wali Khan University Mardan Predication Logic Dr. Rahim Kha Assistant Professor Department of Computer Science Abdul Wali Khan University Mardan
Scope of a Variable Just like local variable in PL
Describe these statements
Free variable If a variable x appears in a predicate p but is not bound by any quantifier OR Each occurrence of x that is outside the scope of a declaration of the form ᵾx : a’ or Ǝx : a’ is said to be a free occurrence
Substitution If we wish to change the subject of the statement from x to y, we must replace each free occurrence of x in p with an occurrence of y and is denoted by p[y / x]
Let Person denote the set of all people, and let m LooksLike n mean that person m looks like person n. The following predicate is a statement about a person o; it states that there is some person who does not look like o: substituting m for o: substituting o for p:
Satisfaction and validity A predicate with free variables or ‘spaces’ is neither true nor false it cannot be assigned a truth value until values are chosen or the spaces are filled Some predicates will become true whatever values are chosen: these are said to be valid predicates. Example If n denotes a natural number, then the predicate n ≥ 0 is valid. it will be true whichever value is chosen from the list 0, 1, 2, 3, . . . A predicate that is true for some, but not necessarily all, choices of values is said to be Satisfiable. n ≥ 5 is satisfiable. There are natural numbers greater than or equal to 5 A predicate that is false for all choices is said to be unsatisfiable
Quantifiers Notations