








































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!









































Propositional logic--the simplest kind Predicate logic (a.k.a. predicate calculus)--an extension of propositional logic Resolution theory--a general way of doing proofs in predicate logic Possibly: Conversion to clause form Possibly: Other logics (just to make you aware that they exist)
The logical values true and false (T and F) Propositions: “Sentences,” which Are atomic (that is, they must be treated as indivisible units, with no internal structure), and Have a single logical value, either true or false Operators, both unary and binary; when applied to logical values, yield logical values The usual operators are and, or, not, and implies
Here are the binary operators that are traditionally used:
Notice in particular that material implication () only approximately means the same as the English word “implies”
All the other operators can be constructed from a combination of these (along with unary not, ¬ )
Exclusive or (xor) is true if exactly one of its operands is true
Notice that (XY)(XY) is equivalent to X xor Y
X Y X Y X Y X Y (XY)(XY) X xor Y T T F F F F F F T F F T F T T T F T T F T F T T F F T T F F F F
Propositions: JohnLovesMary, MaryIsFemale, MaryIsRich Expressions: MaryIsFemale MaryIsRich JohnLovesMary
From aima.eecs.berkeley.edu/slides-ppt, chs 7-
To do inference (reasoning) by computer is basically a search process, taking logical expressions and applying inference rules to them Which logical expressions to use? Which inference rules to apply?
Usually you are trying to “prove” some particular statement
Example: it_is_raining it_is_sunny it_is_sunny I_stay_dry it_is_rainy I_take_umbrella I_take_umbrella I_stay_dry To prove: I_stay_dry
Do forward reasoning: Start applying inference rules to the logical expressions you have, and stop if one of your results is the conclusion you want Do backward reasoning: Start from the conclusion you want, and try to choose inference rules that will get you back to the logical expressions you have
All of propositional logic Logical values true, false Variables x, y, a, b,... Connectives , , , , Constants KingJohn, 2 , Villanova,... Predicates Brother, >,... Functions Sqrt, MotherOf,... Quantifiers ,
Example: x, x^2 0 (for all x, x^2 is greater than or equal to zero)
Typically, is the main connective with :
x, at(x,Villanova) smart(x) means “Everyone at Villanova is smart”
Common mistake: using as the main connective with :
x, at(x,Villanova) smart(x) means “Everyone is at Villanova and everyone is smart”
If there are no values satisfying the condition, the result is true
Example: x, isPersonFromMars(x) smart(x) is true
Example: x, x^2 < 0 (there exists an x such that x^2 is less than zero)
Typically, is the main connective with :
x, at(x,Villanova) smart(x) means “There is someone who is at Villanova and is smart”
Common mistake: using as the main connective with :
x, at(x,Villanova) smart(x) This is true if there is someone at Villanova who is smart... ...but it is also true if there is someone who is not at Villanova By the rules of material implication, the result of F T is T