📋 Quick Revision Notes — Predicate Logic

GATE Relevance: High

One-page summary of all Predicate Logic concepts. Perfect for last-minute revision before GATE.

1. FOL Syntax Cheat Sheet

ComponentSymbolExample
Constantsa, b, JohnSpecific objects
Variablesx, y, zPlaceholders for objects
PredicatesP, Q, LovesRelations: Loves(x, y)
Functionsf, g, MotherMappings: Mother(x)
Universal quantifier∀∀x — “for all x”
Existential quantifier∃∃x — “there exists x”
Connectives∧ ∨ ¬ → ↔Same as propositional logic
Equality=x = y
Term vs Formula

Term: constant, variable, or f(t1,…,tn). Refers to an object.

Atomic formula: P(t1,…,tn) or t1 = t2. Has a truth value.

2. Quantifier Equivalences

RuleEquivalence
Negation of ∀¬∀x P(x) ≡ ∃x ¬P(x)
Negation of ∃¬∃x P(x) ≡ ∀x ¬P(x)
∀ distributes over ∧∀x (P ∧ Q) ≡ ∀x P ∧ ∀x Q
∃ distributes over ∨∃x (P ∨ Q) ≡ ∃x P ∨ ∃x Q
Order: same type∀x ∀y P ≡ ∀y ∀x P
Order: different type∀x ∃y P ≢ ∃y ∀x P (in general)
Common Trap

∀x (P ∨ Q) ≢ ∀x P ∨ ∀x Q   (NOT valid!)

∃x (P ∧ Q) ≢ ∃x P ∧ ∃x Q   (left ⇒ right, but NOT right ⇒ left)

3. Translation Patterns

EnglishFOL Pattern
All A are B∀x (A(x) → B(x))
Some A are B∃x (A(x) ∧ B(x))
No A are B∀x (A(x) → ¬B(x)) ≡ ¬∃x (A(x) ∧ B(x))
Only A are B∀x (B(x) → A(x))
Exactly one∃x (P(x) ∧ ∀y (P(y) → y = x))
∀ uses →, ∃ uses ∧

∀x (A(x) ∧ B(x)) is almost always WRONG for “all A are B” — it says everything is both A and B.

∃x (A(x) → B(x)) is too weak — true if anything is not A.

4. FOL Inference Rules

RuleFromDeriveRestriction
Universal Instantiation (UI)∀x α(x)α(t) for any ground term tNone
Universal Generalization (UG)α(x) for arbitrary x∀x α(x)x must be truly arbitrary, not from EI
Existential Instantiation (EI)∃x α(x)α(c) for fresh constant cc must be new
Existential Generalization (EG)α(t)∃x α(x)None

5. Unification Quick Reference

MGU Algorithm Steps
  1. If expressions are identical, return empty substitution {}.
  2. If one is a variable x, and x does not occur in the other term t, return {x/t}.
  3. If both are f(s1,…,sn) and f(t1,…,tn), unify arguments left to right, composing substitutions.
  4. Otherwise, FAIL.
Occur Check

Cannot unify x with any term containing x. E.g., x and f(x) → FAIL.

Expr 1Expr 2MGU
P(x, a)P(b, a){x/b}
P(x, f(y))P(a, f(g(b))){x/a, y/g(b)}
P(x, x)P(a, b)FAIL (a ≠ b)
P(x, f(x))P(f(y), y)FAIL (occur check)

6. Conversion to Clausal Form

7 Steps
  1. Eliminate ↔: α ↔ β ⇒ (α → β) ∧ (β → α)
  2. Eliminate →: α → β ⇒ ¬α ∨ β
  3. Move ¬ inward: ¬∀ ⇒ ∃¬, ¬∃ ⇒ ∀¬, De Morgan’s
  4. Standardize variables: Rename so each quantifier uses a unique variable.
  5. Skolemize: Replace ∃x with Skolem constant (if no preceding ∀) or Skolem function of all preceding universally quantified variables.
  6. Drop ∀: All remaining variables are implicitly universal.
  7. Distribute ∨ over ∧: Convert to CNF → set of clauses.

7. Resolution in FOL

Resolution Steps (Proof by Refutation)
  1. Convert KB to clausal form.
  2. Negate the goal and convert to clausal form.
  3. Add negated goal clauses to the clause set.
  4. Repeatedly select two clauses with complementary literals, unify, and resolve.
  5. If □ (empty clause) is derived → proof complete!

8. Forward vs. Backward Chaining

AspectForward ChainingBackward Chaining
DirectionData → GoalGoal → Data
StrategyApply rules to known factsStart from query, find supporting facts
CompletenessComplete for DatalogComplete for Datalog
EfficiencyMay derive irrelevant factsGoal-directed, avoids irrelevant work
TerminationGuaranteed for DatalogMay loop without occur check
Example systemProduction systems, ReteProlog

9. Decidability Summary

Logic / FragmentDecidability
Propositional LogicDecidable
FOL (full)Semi-decidable (undecidable)
Monadic FOLDecidable
DatalogDecidable
Second-Order LogicNot even semi-decidable (for full SO)

10. Must-Know Formulas

Key Formulas for GATE
  • ¬∀x P(x) ≡ ∃x ¬P(x)
  • ¬∃x P(x) ≡ ∀x ¬P(x)
  • ∀x (P(x) → Q(x)) ⊨ ∀x P(x) → ∀x Q(x)   (but NOT ≡)
  • ∀x P(x) → ∃x P(x)   (valid, assuming non-empty domain)
  • Prenex form: move all quantifiers to the front
  • Skolem function arity = number of preceding universal quantifiers