1、Yang JCollege of Computer Science q:苏格拉底是人 ; r: 苏格拉底是要死的。n 前提 : p, qn 结论: rn 推理的形式结构 :n pqr (非永真式! )3* College of Computer Science & Technology, BUPT苏格拉底三段论 (续 )n 重新符号化: , , F( ), x, an 设: F(x): x是人。 G(x): x是要死的。a: 苏格拉底。n 前提 : x(F(x)G(x), F(a) 结论: G(a)4* College of Computer Science & Technology, BUP
2、TPredicates and Quantifiersn A generalization of propositions - propositional functions (命题函数 ) or predicates (谓词 ): propositions which contain variables n Predicates become propositions once every variable is bound byn assigning it a value or an object (个体 ) from the Universe of Discourse (论域 ) Uor
3、n quantifying it5* College of Computer Science & Technology, BUPTFormulas of predicate logic (informal)n We will use various kinds of individual constants that denote individuals/objects: a,b,c,n Individual variables over objects: x, y, z , n The result of applying a predicate P to aconstant a is th
4、e proposition P(a)Meaning: the object denoted by a has the property denoted by P.6* College of Computer Science & Technology, BUPTFormulas of predicate logic (informal)n The result of applying a predicate P to avariable x is the propositional form P(x).n E.g. if P = “is a prime number”, then P(x) is
5、 the propositional form “x is a prime number. 7* College of Computer Science & Technology, BUPTExamplesn Let U = Z, the integers = . . . -2, -1, 0 , 1, 2, . . .n P(x): x 0n is the predicate. It has no truth value until the variable x is bound.n Examples of propositions where x is assigned a value:n
6、P(-3) is false,n P(0) is false,n P(3) is true.n The collection of integers for which P(x) is true are the positive integers.8* College of Computer Science & Technology, BUPTExamplesn P(y)P(0) is not a proposition. The variable y has not been bound. However, P(3)P(0) is a proposition which is true.9*
7、 College of Computer Science & Technology, BUPTPropositional Functionsn Predicate logic generalizes the grammatical notion of a predicate to also include propositional functions of any number of arguments, each of which may take any grammatical role that a noun can take.n E.g. let P(x,y,z) = “x gave
8、 y the grade z”, then ifx=“Mike”, y=“Mary”, z=“A”, then P(x,y,z) = “Mike gave Mary the grade A.”Topic #3 Predicate Logic10* College of Computer Science & Technology, BUPTN-place predicaten A statement involving the n variables x1, x2 ,xn can be denoted by P(x1, x2 ,xn ).n A statement of the form P(x1, x2 ,xn ) is the value of the propositional function P at the n-tuple (x1, x2 ,xn ), and P is also called a n-place predicate or a n-ary predicate.