AI05 06 Logic
AI05 06 Logic
Points
Propositional logic
Predicate logic
• The pros and cons
• Syntax
• Semantics
Inference
• Soundness and completeness
The clausal form
• The conversion procedure
Resolution
Control of reasoning
X = f(f(f(f(f(f(f(f(f(f(...))))))))))
Yes
We could check that, in Var Expr, Expr does not
contain Var. The cost of this “occurs-check” is too high for
practical systems such as Prolog.
∀X ((a(X) b(X))
(c(X, k)
∃Y (∃Z c(Y, Z) d(X, Y)))
)
∀X e(X)
∀X ((a(X) b(X))
(c(X, k)
∃Y (∃Z c(Y, Z) d(X, Y)))
)
∀X e(X)
∀X ∀W
((a(X) b(X))
(c(X, k)
(c(f(X), g(X)) d(X, f(X))))
) e(W)
(a(X) b(X)
c(X, k) e(W))
(a(X) b(X)
c(f(X), g(X)) d(X, f(X)) e(W))
• X pass(X, history)
win(X, lottery) happy(X)
• X Y study(X) lucky(X)
pass(X, Y)
• X lucky(X) win(X, lottery)
• lucky(john)
• ¬ study(john)
1) ¬ pass(X, history)
¬ win(X, lottery) happy(X)
2) ¬ study(Y) pass(Y, Z)
3) ¬ lucky(W) pass(W, V)
4) ¬ lucky(U) win(U, lottery)
5) lucky(john)
6) ¬ study(john)
7) ¬ happy(john)
¬ pass(X, history)
¬ win(X, lottery) happy(X)
¬ study(Y) pass(Y, Z)
¬ lucky(W) pass(W, V)
¬ lucky(U) win(U, lottery)
lucky(john)
¬ study(john)
¬ happy(john)