Dulranga's Notes
Semester 3Artificial Intelligence

Inference

Inference means using what you already know to work out something new.

KB⊢αKB \vdash \alpha

To use this notation, the inference must be shown as a proof, otherwise it will be entailment

Inference Rules

Common Notation

A rule is written as a fraction:

premisesconclusion\frac{\text{premises}}{\text{conclusion}}
  • The top (premises) are the facts we already know to be true.
  • The bottom (conclusion) is what we can infer from them.
  • Read it as: "If the premises hold, then the conclusion holds."

1. Modus Ponens - use an implication

P  ⟹  Q,PQ\frac{P \implies Q, \quad P}{ Q}

This notation tells given the numerator segments are True, we can infer denominator In this case, If PP implies QQ and PP is true, We can infer QQ is true.

2. And Elimination - take apart a conjunction

P∧QPandP∧QQ\frac{P \land Q}{P} \quad\text{and}\quad \frac{P \land Q}{Q}

If we know P∧QP \land Q (both PP and QQ are true), we can infer each part on its own — either PP or QQ.

3. Bidirectional Elimination - split an equivalence

P  ⟺  QP  ⟹  QandP  ⟺  QQ  ⟹  P\frac{P \iff Q}{P \implies Q} \quad\text{and}\quad \frac{P \iff Q}{Q \implies P}

A bidirectional (P  ⟺  QP \iff Q) means both directions hold. So if P  ⟺  QP \iff Q is true, we can infer P  ⟹  QP \implies Q and also Q  ⟹  PQ \implies P.

Resolution and Refutation

Resolution is a single, powerful inference rule that combines two clauses to produce a new one:

P∨A,¬P∨BA∨B\frac{P \lor A, \quad \neg P \lor B}{A \lor B}

If one clause contains PP and the other contains ¬P\neg P, they cancel out, and we combine what's left.

Refutation (aka proof by contradiction): to prove a statement α\alpha is true, assume its negation ¬α\neg \alpha, then use resolution repeatedly until we reach a contradiction (empty clause □\square).

Refutation Algorithm

  1. Convert the knowledge base KBKB into CNF (clauses).
  2. Invert the claim α — add ¬α to the KB. This negation is what creates the contradiction, so don't forget to flip it.
  3. Apply resolution to pairs of clauses to produce new clauses (resolvents).
  4. Add each resolvent back to the clause set.
  5. If resolution produces the empty clause □\square → contradiction found, so ¬α\neg \alpha is false and α\alpha is proven.
  6. If no new resolvents can be produced and no □\square appeared → α\alpha cannot be proven.

Key idea: resolution works on clauses (disjunctions of literals), so formulas are first converted to Conjunctive Normal Form (CNF).

On this page