---
title: "Why FOPL; rules of inference"
subject: "Artificial Intelligence"
chapter: 4
key: "semester_6/artificial_intelligence:fopl-rules-of-inference-learning"
source: https://www.bctengineer.com/q/semester_6/artificial_intelligence/fopl-rules-of-inference-learning
site: BCT Engineering
---

# Why FOPL; rules of inference

Artificial Intelligence · Chapter 4: Knowledge Representation, Inference & Reasoning

- Asked in: 2070 Magh, 2+3+3 marks
- Video: [Rules of Inference - Definition & Types of Inference Rules](https://www.youtube.com/watch?v=HcS4lqXxrV4) — Neso Academy
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/artificial_intelligence/fopl-rules-of-inference-learning
- Whole chapter: https://www.bctengineer.com/md/semester_6/artificial_intelligence/chapter-4

## Question

Why do we need FOPL? State any three rules of inference. How can we make the machine with learning capacity?

## Short answer

FOPL represents objects, relations, quantifiers, and functions for compact, expressive knowledge and automated reasoning. Three inference rules: Modus Ponens (P→Q, P ⊢ Q), Modus Tollens (P→Q, ¬Q ⊢ ¬P), Universal Instantiation (∀x P(x) ⊢ P(a)). Machine learning: collect data, choose representation, apply algorithm (supervised/unsupervised/reinforcement), test and refine.

## Answer

#### Why do we need FOPL?
Propositional logic can only state whole facts as true or false; it cannot talk about objects, their properties, relations or about "all" and "some". First-order predicate logic (FOPL) is needed because:
1. It represents **objects, properties and relations** with predicates, e.g. Teacher(Ram), Likes(Ram, Sita).
2. It uses **quantifiers** (∀, ∃) to make general statements, e.g. ∀x Man(x) → Mortal(x), which would need thousands of propositions otherwise.
3. It uses **functions and variables**, so it is far more expressive and compact.
4. It has a precise syntax and semantics, with sound and complete inference (resolution), which allows automated theorem proving and is the basis of Prolog and expert systems.

#### Three rules of inference
1. **Modus Ponens:** from P → Q and P, infer Q.
   - Example: "If it rains, the ground is wet. It rains. So the ground is wet."
2. **Modus Tollens:** from P → Q and ¬Q, infer ¬P.
   - Example: "If it rains, the ground is wet. The ground is not wet. So it did not rain."
3. **Universal Instantiation:** from ∀x P(x), infer P(a) for any constant a.
   - Example: ∀x Man(x) → Mortal(x) gives Man(Socrates) → Mortal(Socrates).

(Others: And-elimination, And-introduction, Existential instantiation, Resolution, Hypothetical syllogism.)

#### Making the machine learn
Learning means improving performance from experience. To give a machine learning capacity:
1. **Collect experience data** (examples, sensor readings, feedback from the environment or a teacher).
2. **Choose a representation** for what is learned (rules, decision tree, neural network, probabilities).
3. **Use a learning algorithm** that adjusts the representation to fit the data:
   - *Supervised learning:* learn from labelled examples (classification, regression; decision trees, neural networks).
   - *Unsupervised learning:* find structure in unlabelled data (clustering).
   - *Reinforcement learning:* learn actions from rewards and penalties.
   - Other forms: rote learning, learning by instruction, induction, analogy, explanation-based learning.
4. **Test and refine** the learned model on new data, and keep updating it as new experience arrives.

A learning agent therefore has a learning element (improves the system), a performance element (acts), a critic (feedback) and a problem generator (suggests new experiments).

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What can FOPL do that propositional logic cannot?
   A. Assign probabilities to facts
   B. Store facts in a graph of nodes and arcs
   C. Talk about objects, relations and quantified statements such as 'all' and 'some'
   D. Avoid the use of any inference rules
   Answer: C. FOPL has predicates, variables and quantifiers, so one rule like ∀x Man(x) → Mortal(x) replaces thousands of propositions. (Key point: Why FOPL)

2. Given P → Q and ¬Q, which conclusion does Modus Tollens give?
   A. ¬P
   B. P
   C. Q
   D. ¬P ∧ Q
   Answer: A. Modus Tollens denies the consequent to deny the antecedent: if the ground is not wet, it did not rain. (Key point: Modus Tollens)

3. From ∀x Man(x) → Mortal(x), Universal Instantiation lets us infer which statement?
   A. ∃x Man(x)
   B. Man(Socrates) → Mortal(Socrates)
   C. Mortal(Socrates) with no condition
   D. ¬Man(Socrates)
   Answer: B. Universal Instantiation replaces the variable with any constant, here Socrates, keeping the implication. (Key point: Universal Instantiation)

4. Which sequence best describes how a machine is given learning capacity?
   A. Write all rules by hand and never change them
   B. Choose an algorithm, then discard the data
   C. Test the model first, then collect data once
   D. Collect experience data, choose a representation, apply a learning algorithm, then test and refine
   Answer: D. Learning means improving from experience: data, representation, algorithm, then testing and updating on new data. (Key point: Learning process)

## Related in Artificial Intelligence

- [Machine learning, GA, operators, areas](https://www.bctengineer.com/question.md?key=semester_6%2Fartificial_intelligence%3Aml-genetic-algorithm-operators-areas) — Artificial Intelligence, chapter 6, asked 2×
- [Machine learning; Boltzmann machines](https://www.bctengineer.com/question.md?key=semester_6%2Fartificial_intelligence%3Aml-boltzmann-machine) — Artificial Intelligence, chapter 6

## Related in other subjects

- [Rules of inference: cheque book argument](https://www.bctengineer.com/question.md?key=semester_4%2Fdiscrete_structure%3Arules-inference-cheque-book) — Discrete Structure, chapter 1
- [Rules of inference: Randy and the job](https://www.bctengineer.com/question.md?key=semester_4%2Fdiscrete_structure%3Arules-inference-randy-job) — Discrete Structure, chapter 1
- [Rules of inference: sailing race](https://www.bctengineer.com/question.md?key=semester_4%2Fdiscrete_structure%3Arules-inference-sailing-race) — Discrete Structure, chapter 1
- [Rules of inference: movie and sunset](https://www.bctengineer.com/question.md?key=semester_4%2Fdiscrete_structure%3Arules-inference-rainy-movie) — Discrete Structure, chapter 1
