0% found this document useful (0 votes)
42 views

Resolution and natural deduction

The document explains the resolution process in propositional logic, detailing how to prove a goal by contradiction using a knowledge base. It outlines steps including negating the goal, converting statements to conjunctive normal form, applying resolution, and interpreting results. Additionally, it discusses natural deduction methods and inference rules for constructing logical proofs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Resolution and natural deduction

The document explains the resolution process in propositional logic, detailing how to prove a goal by contradiction using a knowledge base. It outlines steps including negating the goal, converting statements to conjunctive normal form, applying resolution, and interpreting results. Additionally, it discusses natural deduction methods and inference rules for constructing logical proofs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

cenario:

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:

You want to prove the following statement:

 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(x) ∨ CanFly(x) (from the first knowledge base statement)


o CNF:

 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.

 Step 1: ¬Bird(x) ∨ CanFly(x) and Bird(Tweety) resolve on Bird(x), resulting in


o Resolution steps:

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:

 While resolution is a powerful tool, it can be computationally expensive for complex


problems.expand_more Heuristic techniques and alternative reasoning methods like
model checking and satisfiability checking are often employed to improve efficiency.
 Resolution plays a significant role in automated theorem proving, a field of AI concerned
with developing algorithms to prove mathematical theorems automatically
Resolution is a powerful theorem proving technique that operates by constructing refutation
proofs—essentially, proofs by contradictions. It was introduced by the mathematician John
Alan Robinson in 1965. When we have multiple statements and need to prove a conclusion
based on those statements, resolution comes to our aid.
Here are the steps involved in resolution:
1. Conversion of Facts into First-order Logic (FOL):
o We start by translating the given statements into FOL.
o For instance, consider the following facts:
 John likes all kinds of food.
 Apples and vegetables are food.
 Anything anyone eats and is not killed is food.
 Anil eats peanuts and is still alive.
 Harry eats everything that Anil eats.
2. Conversion of FOL into Conjunctive Normal Form (CNF):
o CNF simplifies resolution proofs.
o Eliminate implications (→) and rewrite the statements in CNF.

 ¬food(x) ∨ likes(John, x)
o For example, one of the converted CNF sentences might look like this:

3. Negate the Statement to Prove (Proof by Contradiction):


o In our case, we want to prove that “John likes peanuts.”
o So, we negate the statement: ¬likes(John, Peanuts).
4. Draw the Resolution Graph (Unification):
o The resolution rule allows us to resolve two clauses if they contain complementary
literals (opposite polarities).
o We assume that these literals are standardized apart (i.e., they share no variables).

 [Animal(g(x)) ∨ Loves(f(x), x)]


o For example, if we have the clauses:

 [¬Loves(a, b) ∨ ¬Kills(a, b)]


o The complementary literals are: Loves(f(x), x) and ¬Loves(a, b).

o The resulting resolvent clause is: Animal(g(x)) ∨ ¬Kills(f(x), x).


o We can unify them with the unifier θ = [a/f(x), b/x].

5. Putting It All Together:


o By applying resolution steps, we can eventually prove that “John likes peanuts.”

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:

1. John likes all kinds of food.


2. Apples and vegetables are food.
3. Anything anyone eats and is not killed is food.
4. Anil eats peanuts and is still alive.
5. Harry eats everything that Anil eats.

We want to prove that “John likes peanuts.”

Step 1: Conversion of Facts into First-Order Logic (FOL)


Let’s convert the given statements into FOL:

John likes any type of food: ∀x (food(x) → likes(John, x))


Apples and vegetables are food: food(Apple) ∧ food(Vegetables)

Anything anyone eats and is not killed is food: ∀x ∀y (eats(x, y) ∧ ¬killed(x) → food(y))

Anil eats peanuts and is still alive: eats(Anil, Peanuts) ∧ alive(Anil)


Harry eats everything that Anil eats: ∀x (eats(Anil, x) → eats(Harry, x))



Step 2: Conversion of FOL into Conjunctive Normal Form (CNF)


We need to convert the FOL statements into CNF for easier resolution proofs. Eliminate
implications (→) and rewrite:

1. ¬food(x) ∨ likes(John, x)
2. food(Apple)

¬eats(x, y) ∨ killed(x) ∨ food(y)


3. food(Vegetables)

eats(Anil, Peanuts) ∧ alive(Anil)


4.

¬eats(Anil, x) ∨ eats(Harry, x)
5.
6.

Step 3: Negate the Statement to Prove (Proof by Contradiction)


We want to prove that “John likes peanuts.” So we negate it: ¬likes(John, Peanuts).

Step 4: Draw the Resolution Graph (Unification)


Now let’s apply resolution steps:

1. Resolve ¬likes(John, Peanuts) and likes(John, x) with substitution {Peanuts/x}. We get

2. Resolve ¬food(Peanuts) and food(z) with substitution {Peanuts/z}. We get ¬eats(y, z) ∨


¬food(Peanuts).

killed(y) ∨ food(z).

Step 5: Continue Resolution


We can continue resolving clauses until we derive a contradiction or can’t apply any more. In
this example, we’ve shown that “John likes peanuts” is true based on the given statements.
Remember, resolution by refutation is a powerful technique for proving conclusions based on
contradic

Resolution with unification is a powerful technique used in automated theorem proving


and other areas of Artificial Intelligence. It allows us to logically deduce new statements
from a set of existing ones expressed in first-order logic (FOL), which goes beyond
basic propositional logic by incorporating variables, functions, and quantifiers.

Here's how resolution with unification works:

1. Knowledge Base (KB):

 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.

3. Clausal Form Conversion:

 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:

 Once we have identified complementary literals through unification, we remove them


from their respective clauses and combine the remaining literals of both clauses into a
new clause called the resolvent.

6. Iteration and Contradiction:

 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:

 All birds can fly (∀x: Bird(x) → Flies(x))


 Tweety is a bird (Bird(Tweety))

Goal:

 Does Tweety fly (Flies(Tweety))?

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:

 Can be computationally expensive for complex problems.


 Finding the most efficient resolution steps might require additional strategies and
heuristics.

What is Natural Deduction?


Natural deduction is a method for constructing proofs in formal logic. It allows us to derive
conclusions from given premises using a set of inference rules. These rules guide us in building valid
arguments step by step.

Basic Rules in Natural Deduction:


1. Implication Introduction (→I):
o If we assume a hypothesis (let’s say A) and prove another statement (let’s say B), we can conclude
that A implies B.
o Example: To prove (Q \to R), assume Q and prove R.
2. Implication Elimination (→E):
o If we have an implication (A implies B) and also know A, we can infer B.
o Example: From (A \to (B \land C)) and A, we can derive (B \land C).

o If we have two separate statements (A and B), we can combine them into a conjunction (A ∧ B).
3. Conjunction Introduction (∧I):

o Example: From A and B, we can conclude (A \land B).

o If we have a conjunction (A ∧ B), we can extract either A or B.


4. Conjunction Elimination (∧E):

o Example: From (A \land B), we can infer A.


5. Negation Introduction (¬I):

o Example: To prove ¬(A ∧ B), assume A ∧ B and derive a contradiction.


o If we assume a hypothesis (let’s say A) and derive a contradiction, we can conclude ¬A.

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 by Rules

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:

Given: You are either sick (S) or tired (T). (S ∨ T)


o Rule: Disjunctive Syllogism (If P or Q is true, and not P is true, then Q is true)
o
o Established: You are not sick (¬S)
o Therefore: You are tired (T). (T)

Here's a table outlining some common natural deduction rules for propositional logic:

Connective Introduction Rule Elimination Rule

→ Modus Ponens Modus Tollens, Hypothetical


(Implication) Syllogism


is true and Q is true, then P ∨
Introduction of Disjunction (if P
Disjunctive Syllogism
(Disjunction)
Q is true)

Elimination of Conjunction (if P ∧



Introduction of Conjunction (if

∧ Q is true)
P is true and Q is true, then P Q is true, then P is true and Q is
(Conjunction)
true)

Introduction of Negation (if P Elimination of Negation (if the


¬ (Negation) implies Q, and not Q is true, negation of both P and not P are
then not P is true) true, then P is false)

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:

1. If it is raining (R), then I will get wet (W). (R → W)


2. I have an umbrella (U). (U)

Steps:

1. Assume R (premise 1).


2. Apply Modus Ponens with premise 1 and assumption: R → W, R, therefore W.
3. Assume ¬W (to be discharged later).
4. Apply Disjunctive Syllogism with premise 2 and assumption: U, ¬W (assume P=U and
Q=¬W), therefore ¬R.
5. Apply Modus Tollens with step 1 and step 4: W → R, ¬R, therefore ¬W.
6. Discharge the assumption of ¬W (since we derived it and then contradicted it).

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.

You might also like