Skip to main content

Resolution: John likes peanuts

Short answer

Convert facts to clauses, add negated goal ¬Likes(John, Peanuts). Resolve with C1 to ¬Food(Peanuts), with C4 to Killed(Bill), with C8 to ¬Alive(Bill), with C6 to empty clause. Thus John likes peanuts.

Assume the following facts: John likes all kinds of food. Apples are food. Chicken is food. Anything anyone eats and isn't killed by is food. Bill eats peanuts and is still alive. Sue eats everything Bill eats. Prove that John likes peanuts using resolution refutation.

Step 1: Statements in FOPL

Predicates: Food(x), Likes(x,y), Eats(x,y), Killed(x), Alive(x).

  1. ∀x Food(x) → Likes(John, x)
  2. Food(Apple)
  3. Food(Chicken)
  4. ∀x ∀y [Eats(x,y) ∧ ¬Killed(x)] → Food(y)
  5. Eats(Bill, Peanuts) ∧ Alive(Bill)
  6. ∀x Eats(Bill, x) → Eats(Sue, x)
  7. ∀x Alive(x) → ¬Killed(x) (common-sense axiom: someone alive is not killed)

Goal: Likes(John, Peanuts)

Step 2: Clause form

No.Clause
C1¬Food(x) ∨ Likes(John, x)
C2Food(Apple)
C3Food(Chicken)
C4¬Eats(x,y) ∨ Killed(x) ∨ Food(y)
C5Eats(Bill, Peanuts)
C6Alive(Bill)
C7¬Eats(Bill, x) ∨ Eats(Sue, x)
C8¬Alive(x) ∨ ¬Killed(x)

Step 3: Negated goal

C9: ¬Likes(John, Peanuts)

Step 4: Resolution refutation

StepResolveSubstitutionResolvent
1C9 and C1x/PeanutsR1: ¬Food(Peanuts)
2R1 and C4y/PeanutsR2: ¬Eats(x, Peanuts) ∨ Killed(x)
3R2 and C5x/BillR3: Killed(Bill)
4R3 and C8x/BillR4: ¬Alive(Bill)
5R4 and C6R5: empty clause (□)
¬Likes(John,Peanuts) + C1 -> ¬Food(Peanuts)
   + C4 -> ¬Eats(x,Peanuts) ∨ Killed(x)
   + C5 -> Killed(Bill)
   + C8 -> ¬Alive(Bill)
   + C6 -> □

The empty clause is derived, so the assumption ¬Likes(John, Peanuts) is false. Hence John likes peanuts. (Clauses C2, C3 and C7 are not needed in the proof.)

✓ Answer checked by Claude Opus 5.5 (high effort)

All Artificial Intelligence chapter 4 questions →