Resolution and natural deduction
Resolution and natural deduction
Imagine you have a knowledge base containing the following facts, expressed in
propositional logic:
Knowledge Base:
o All birds can fly (∀x: Bird(x) → CanFly(x))
o Tweety is a bird (Bird(Tweety))
Goal:
Goal: CanFly(Tweety)
Resolution Process:
1. Negation of the Goal: We start by negating the goal statement, as resolution is a proof
by contradiction technique.
o ¬CanFly(Tweety)
2. Clausal Form Conversion: Convert both the knowledge base statements and the
negated goal into conjunctive normal form (CNF), where each clause is a conjunction
(AND) of literals (atomic propositions or their negations).
Bird(Tweety)
¬CanFly(Tweety)
3. Resolution Rule Application: Repeatedly apply the resolution rule to find a
contradiction. The resolution rule involves finding complementary literals (one positive,
one negative) in two different clauses and merging the remaining literals of those
clauses into a new clause.
CanFly(x).
Step 2: CanFly(x) and ¬CanFly(Tweety) resolve on CanFly(x), resulting in an empty
clause (⊥), which indicates a contradiction.
4. Interpretation: Since we reached a contradiction (an empty clause), the original goal
statement (CanFly(Tweety)) must be true according to the knowledge base.
Explanation:
The resolution process systematically combines the information from the knowledge
base to deduce the desired conclusion. By negating the goal and finding a contradiction,
it proves that the goal is a logical consequence of the given facts. This approach allows
for automated reasoning and is used in various AI applications, such as theorem
proving, planning, and problem-solving.
Additional Notes:
¬food(x) ∨ likes(John, x)
o For example, one of the converted CNF sentences might look like this:
Remember, this example demonstrates the essence of resolution in FOL. It’s a fascinating
technique that allows us to reason about complex statements and derive conclusions. 🌟
For more in-depth understanding, feel free to explore further resources on resolution in AI123
Learn more
1 javatpoint.com2 tutorialandexample.com3tutorialforbeginner.c
om4geeksforgeeks.org
1of30
You
give step by step solution for resolution by refutation with an example
Copilot
Certainly! Let’s walk through the resolution by refutation process step by step using an
example. We’ll apply this technique to prove that “John likes peanuts.”
Example Scenario:
Consider the following statements:
Anything anyone eats and is not killed is food: ∀x ∀y (eats(x, y) ∧ ¬killed(x) → food(y))
1. ¬food(x) ∨ likes(John, x)
2. food(Apple)
¬eats(Anil, x) ∨ eats(Harry, x)
5.
6.
killed(y) ∨ food(z).
This is a set of statements that represent the facts or knowledge you have in the
domain. These statements are expressed in FOL, allowing for greater expressiveness.
2. Goal:
This is the statement you want to prove or disprove based on the KB.
Both the KB statements and the goal are converted into clausal form, which means
they are expressed as disjunctions (OR) of literals (atomic propositions or their
negations, possibly with variables).
4. Unification:
When applying the resolution rule, we look for complementary literals in two different
clauses. However, these literals might contain variables. Unification is the process of
finding a substitution for these variables that makes the literals identical.
The substitution is applied to both clauses before performing the resolution step.
5. Resolution Rule:
We repeat the steps of unification and resolution, looking for new complementary literals
in the generated clauses and the KB.
The goal is to eventually derive an empty clause (⊥), which represents a
contradiction. If an empty clause is found, it means the original goal cannot be proven
from the KB.
Conversely, if we reach a point where no new complementary literals can be found, the
original goal might be proven, though in some cases further analysis might be needed.
Example:
KB:
Goal:
Steps:
o ¬Bird(x) ∨ Flies(x)
1. Clausal Form:
o Bird(Tweety)
o ¬Flies(Tweety) (negation of the goal)
2. Unification:
o In the first step of finding complementary literals, we encounter ¬Bird(x) and
Bird(Tweety). Unification substitutes x with Tweety to make them identical.
3. Resolution:
o After substituting x with Tweety in the first clause, we apply resolution. The resolvent
becomes Flies(Tweety).
4. Iteration:
o We now have Flies(Tweety) and ¬Flies(Tweety). Unification is not needed here as they
are already identical.
5. Empty Clause:
o Applying resolution again, the remaining literals cancel out, resulting in the empty
clause (⊥).
Conclusion:
Since we reached an empty clause, the KB cannot prove that Tweety flies. This doesn't
necessarily mean Tweety can't fly, just that it can't be proven from the given knowledge
base.
Benefits:
Resolution with unification allows formalizing and reasoning about complex knowledge
with variables and functions.
It is automated and can be implemented in computers for automated reasoning tasks.
Limitations:
o If we have two separate statements (A and B), we can combine them into a conjunction (A ∧ B).
3. Conjunction Introduction (∧I):
o If we prove a statement for an arbitrary element (let’s say x), we can generalize it to ∀x.
6. Universal Quantifier Introduction (∀I):
o Example: To prove (\forall x (P(x) \to Q(x))), assume P(x) and prove Q(x).
7. Universal Quantifier Elimination (∀E):
o If we have a universally quantified statement (e.g., ∀x P(x)), we can instantiate it for a specific
element (e.g., P(a)).
o Example: From (\forall x (P(x) \to Q(x))), we can infer (P(a) \to Q(a)).
Example:
Let’s prove the following:
Given: (Q \to R)
Hypothesis: Q
Conclusion: R
1. Assume Q (Hypothesis).
2. Apply →E to (Q \to R) and Q to derive R.
Natural deduction is a formal system for reasoning in logic, mirroring how humans
reason naturally. It operates by applying inference rules to derive new statements from
already established ones. These rules are categorized broadly into two types:
1. Introduction Rules: These rules allow you to introduce a logical connective into a
statement based on other statements you have proven.
Example:
o Rule: Modus Ponens (If P implies Q, and P is true, then Q is true)
o Given: If it is raining (R), then the ground is wet (W). (R → W)
o Established: It is raining (R). (R)
o Therefore: The ground is wet (W). (W)
2. Elimination Rules: These rules allow you to eliminate a logical connective from a
statement based on its structure and other statements.
Example:
Here's a table outlining some common natural deduction rules for propositional logic:
∨
is true and Q is true, then P ∨
Introduction of Disjunction (if P
Disjunctive Syllogism
(Disjunction)
Q is true)
∧ Q is true)
P is true and Q is true, then P Q is true, then P is true and Q is
(Conjunction)
true)
drive_spreadsheetExport to Sheets
Using these rules, you can build formal proofs of logical statements.
Example:
Prove the statement "If it is raining (R) and I have an umbrella (U), then I won't get wet
(¬W)" from the following premises:
Steps:
Therefore, we have proven "If it is raining and I have an umbrella, then I won't get wet"
based on the given premises.
These are just a few examples, and different systems of natural deduction might have
slightly different rules or symbols. However, the core concept of using inference rules to
reason logically remains consistent.