15-Proportional Logic and Resolution Algorithm-12!09!2024
15-Proportional Logic and Resolution Algorithm-12!09!2024
03/12/2024 1
Syntax of propositional logic:
The syntax of propositional logic defines the allowable sentences for the knowledge representation. There
are two types of Propositions:
1. Atomic Propositions
2. Compound propositions
Atomic Proposition: Atomic propositions are the simple propositions. It consists of a single proposition
symbol. These are the sentences which must be either true or false.
For Example:
a. 2+2 is 4, it is an atomic proposition as it is a true fact.
b. "The Sun is cold" is also a proposition as it is a false fact.
Compound Proposition: Compound propositions are constructed by combining one or more
propositions.
For Example:
a. "It is raining today, and street is wet."
b. "Ankit is a doctor, and his clinic is in Mumbai."
03/12/2024 2
Logical Connectives:
Consider all the possible combinations of the propositions which are joined together by Logical
Connectives to form the given compound proposition. This compilation of all possible scenarios in a
tabular format is called a “Truth Table”.
Negation: A sentence such as ¬ P is called negation of P. A literal can be either Positive literal or negative
literal.
Conjunction: A sentence which has ∧ connective such as, P ∧ Q is called a conjunction. For Example:
Rohan is intelligent and hardworking. It can be written as,
P= Rohan is intelligent,
Q= Rohan is hardworking. → P∧ Q.
03/12/2024 3
Logical Connectives(contd.,):
Disjunction: A sentence which has ∨ connective, such as P ∨ Q. is called disjunction, where P and Q are
the propositions. For Example: "Ritika is a doctor or Engineer", Here P= Ritika is Doctor. Q= Ritika is
Doctor, so we can write it as P ∨ Q.
03/12/2024 4
Logical Connectives:
Implication: A sentence such as P → Q, is called an implication. Implications are also known as if-then
rules. It can be represented as, For Example: If it is raining, then the street is wet. Let P= It is raining, and
Q= Street is wet, so it is represented as P → Q
03/12/2024 5
Logical Connectives:
Build a proposition composing three propositions P, Q, and R. This truth table is made-up of three
proposition symbols.
03/12/2024 6
Propositional logic: Syntax
• Propositional logic is the simplest logic – illustrates basic ideas
Precedence Operators
03/12/2024 9
Logical Equivalence:
Logical equivalence is one of the features of propositional logic. Two propositions are said to be logically
equivalent if and only if the columns in the truth table are identical to each other.
Let's take two propositions A and B, so for logical equivalence, we can write it as A⇔B. In below truth
table we can see that column for ¬A∨ B and A→B, are identical hence A is Equivalent to B
03/12/2024 10
Properties of Operators:
03/12/2024 11
Limitations of Propositional logic:
We cannot represent relations like ALL, some, or none with propositional logic. For example:
• All the boys are intelligent.
• Some apples are sweet.
Propositional logic has limited expressive power.
In propositional logic, we cannot describe statements in terms of their properties or logical relationships.
03/12/2024 12
Rules of Inference in Propositional logic:
Intelligent computers which can create new logic from old logic or by evidence, so generating the
conclusions from evidence and facts is termed as Inference.
Inference rules are the templates for generating valid arguments. Inference rules are applied to derive
proofs in artificial intelligence, and the proof is a sequence of the conclusion that leads to the desired
goal.
In inference rules, the implication among all the connectives plays an important role. Following are some
terminologies related to inference rules:
• Implication: It is one of the logical connectives which can be represented as P → Q. It is a Boolean
expression.
• Converse: The converse of implication, which means the right-hand side proposition goes to the left-
hand side and vice-versa. It can be written as Q → P.
• Contrapositive: The negation of converse is termed as contrapositive, and it can be represented as ¬
Q → ¬ P.
• Inverse: The negation of implication is called inverse. It can be represented as ¬ P → ¬ Q.
03/12/2024 13
Rules of Inference in Propositional logic(contd.,):
The compound statements are equivalent to each other, which we can prove using truth table:
Hence from the above truth table, we can prove that P → Q is equivalent to ¬ Q → ¬ P, and Q→ P is
equivalent to ¬ P → ¬ Q.
03/12/2024 14
Types of Inference Rules:
1. Modus Ponens:
The Modus Ponens rule is one of the most important rules of inference, and it states that if P and P → Q
is true, then we can infer that Q will be true. It can be represented as:
03/12/2024 15
Types of Inference Rules(contd.,):
2. Modus Tollens:
The Modus Tollens rule state that if P→ Q is true and ¬ Q is true, then ¬ P will also true. It can be
represented as:
03/12/2024 16
Types of Inference Rules(contd.,):
3. Hypothetical Syllogism:
The Hypothetical Syllogism rule state that if P→R is true whenever P→Q is true, and Q→R is true. It
can be represented as the following notation:
03/12/2024 17
Types of Inference Rules(contd.,):
4. Disjunctive Syllogism:
The Disjunctive syllogism rule state that if P∨Q is true, and ¬P is true, then Q will be true. It can be
represented as:
03/12/2024 18
Types of Inference Rules(contd.,):
5. Addition:
The Addition rule is one the common inference rule, and it states that If P is true, then P ∨Q will be true.
Example:
03/12/2024 19
Types of Inference Rules(contd.,):
6. Simplification:
The simplification rule state that if P∧ Q is true, then Q or P will also be true. It can be represented as:
03/12/2024 20
Types of Inference Rules(contd.,):
7. Resolution:
The Resolution rule state that if P∨Q and ¬ P∧R is true, then Q ∨R will also be true. It can be
represented as
03/12/2024 21