This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Syntax of FirstOrder Logic We have: constant symbols : Alice , Bob variables: x, y, z, . . . predicate symbols of each arity: P , Q , R , . . . A unary predicate symbol takes one argument: P ( Alice ), Q ( z ) A binary predicate symbol takes two arguments: Loves(Bob,Alice) , Taller(Alice,Bob) . An atomic expression is a predicate symbol together with the appropriate number of arguments. Atomic expressions act like primitive propositions in propositional logic we can apply , , to them we can also quantify the variables that appear in them Typical formula: x y ( P ( x, y ) zQ ( x, z )) 1 Semantics of FirstOrder Logic Assume we have some domain D . The domain could be finite: { 1 , 2 , 3 , 4 , 5 } the people in this room The domain could be infinite N , R , . . . A statement like xP ( x ) means that P ( d ) is true for each d in the domain. If the domain is N , then xP ( x ) is equivalent to P (0) P (1) P (2) . . . Similarly, xP ( x ) means that P ( d ) is true for some d in the domain. If the domain is N , then xP ( x ) is equivalent to P (0) P (1) P (2) . . . Is x ( x 2 = 2) true? Yes if the domain is R ; no if the domain is N . How about x y (( x < y ) z ( x < z < y ))? 2 FirstOrder Logic: Formal Semantics How do we decide if a firstorder formula is true? Need: a domain D (what are you quantifying over) an interpretation I that interprets the constants and predicate symbols: for each constant symbol c , I ( c ) D * Which domain element is Alice? for each unary predicate P , I ( P ) is a predicate on domain D * formally, I ( P )( d ) { true,false } for each d D * Is Alice Tall? How about Bob? for each binary predicate Q , I ( Q ) is a predicate on D D : * formally, I ( Q )( d 1 , d 2 ) { true,false } for each d 1 , d 2 D * Is Alice taller than Bob? a valuation V associating with each variable x an el ement V ( x ) D . To figure out if P ( x ) is true, you need to know what x is. 3 Now we can define whether a formula A is true, given a domain D , an interpretation I , and a valuation V , writ ten ( I, D, V )  = A Read this from right to left, like Hebrew: A is true at (  =) ( I, D, V ) The definition is by induction: ( I, D, V )  = P ( x ) if I ( P )( V ( x )) = true ( I, D, V )  = P ( c ) if I ( P )( I ( c ))) = true ( I, D, V )  = xA if ( I, D, V )  = A for all valuations V that agree with V except possibly on x V ( y ) = V ( y ) for all y 6 = x V ( x ) can be arbitrary ( I, D, V )  = xA if ( I, D, V )  = A for some valuation V that agrees with V except possibly on x ....
View
Full
Document
This note was uploaded on 05/21/2009 for the course CS 2800 taught by Professor Selman during the Spring '07 term at Cornell University (Engineering School).
 Spring '07
 SELMAN

Click to edit the document details