📋 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
| Component | Symbol | Example |
|---|---|---|
| Constants | a, b, John | Specific objects |
| Variables | x, y, z | Placeholders for objects |
| Predicates | P, Q, Loves | Relations: Loves(x, y) |
| Functions | f, g, Mother | Mappings: 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
| Rule | Equivalence |
|---|---|
| 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
| English | FOL 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
| Rule | From | Derive | Restriction |
|---|---|---|---|
| Universal Instantiation (UI) | ∀x α(x) | α(t) for any ground term t | None |
| 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 c | c must be new |
| Existential Generalization (EG) | α(t) | ∃x α(x) | None |
5. Unification Quick Reference
MGU Algorithm Steps
- If expressions are identical, return empty substitution {}.
- If one is a variable x, and x does not occur in the other term t, return {x/t}.
- If both are f(s1,…,sn) and f(t1,…,tn), unify arguments left to right, composing substitutions.
- Otherwise, FAIL.
Occur Check
Cannot unify x with any term containing x. E.g., x and f(x) → FAIL.
| Expr 1 | Expr 2 | MGU |
|---|---|---|
| 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
- Eliminate ↔: α ↔ β ⇒ (α → β) ∧ (β → α)
- Eliminate →: α → β ⇒ ¬α ∨ β
- Move ¬ inward: ¬∀ ⇒ ∃¬, ¬∃ ⇒ ∀¬, De Morgan’s
- Standardize variables: Rename so each quantifier uses a unique variable.
- Skolemize: Replace ∃x with Skolem constant (if no preceding ∀) or Skolem function of all preceding universally quantified variables.
- Drop ∀: All remaining variables are implicitly universal.
- Distribute ∨ over ∧: Convert to CNF → set of clauses.
7. Resolution in FOL
Resolution Steps (Proof by Refutation)
- Convert KB to clausal form.
- Negate the goal and convert to clausal form.
- Add negated goal clauses to the clause set.
- Repeatedly select two clauses with complementary literals, unify, and resolve.
- If □ (empty clause) is derived → proof complete!
8. Forward vs. Backward Chaining
| Aspect | Forward Chaining | Backward Chaining |
|---|---|---|
| Direction | Data → Goal | Goal → Data |
| Strategy | Apply rules to known facts | Start from query, find supporting facts |
| Completeness | Complete for Datalog | Complete for Datalog |
| Efficiency | May derive irrelevant facts | Goal-directed, avoids irrelevant work |
| Termination | Guaranteed for Datalog | May loop without occur check |
| Example system | Production systems, Rete | Prolog |
9. Decidability Summary
| Logic / Fragment | Decidability |
|---|---|
| Propositional Logic | Decidable |
| FOL (full) | Semi-decidable (undecidable) |
| Monadic FOL | Decidable |
| Datalog | Decidable |
| Second-Order Logic | Not 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