Introduction
 A proposition is a declarative statement which is either true or
false.
 Propositions can be either true or false, but it cannot be both.
 A proposition formula which is always true is called tautology.
 A proposition formula which is always false is
called Contradiction.
 A proposition formula which has both true and false values is
called Contingency.
Propositional Logic Connectives
Symbol Word Technical
Term
Example
 AND Conjunction A  B
 OR Disjunction A  B
 Implies Implication A  B
 If and only If Bi-Conditional A B
 Not Negation A or  B
Inference rules
 Inverse − An inverse of the conditional statement is the
negation of both the hypothesis and the conclusion. If the
statement is “If p, then q”, the inverse will be “If not p, then not
q”. Thus the inverse of p → q is ¬p → ¬q.
 Converse − The converse of the conditional statement is
computed by interchanging the hypothesis and the
conclusion. If the statement is “If p, then q”, the converse will
be “If q, then p”. The converse of p → q is q → p.
 Contra-positive −The contra-positive of the conditional is
computed by interchanging the hypothesis and the conclusion
of the inverse statement. The contra-positive of p →
q is ¬q→¬p.
Types of Inference rules
 1. Modus Ponens:
 It states that if “P” and “P → Q” is true, then we can infer that
Q will be true.
 2. Modus Tollens:
 It states that if “P→ Q” is true and ”¬ Q” is true, then “¬
P” will also true. It can be represented as:
 3. Hypothetical Syllogism
 It states that if “P→R” is true whenever “P→Q” is true, and
“Q→R” is true.
 4. Disjunctive Syllogism:
 It states that if “P∨Q is true”, and “¬P is true”, then Q will be
true.
 5. Addition
 It states that If “P is true”, then P∨Q will be true.
 6. Simplification
 It states that if P∧ Q is true, then Q or P will also be true.
 7. Resolution
 It states that if P∨Q and ¬ P∧R is true, then Q∨R will also be
true.
Few more Inference Rules
. Unit Resolution:
• If is True & is True, Then is True
3. Resolution:
or
• The 2 premises are said to be resolved and the variable is said to be
resolved away.
…. and several other rules
7
 A sentence/premise may have:
 Validity (always true):- Tautology
 Satisfiability (sometimes true):- Contingency
 No Satisfiability (always false):- Contradiction
8
 Find if the following is valid, satisfactory or invalid?
((P  Q)  R)  ( P   R).
Ans :- Valid/ Tautology
10
Conjunctive Normal Form (CNF)
 Conjunctive normal form (CNF) is an approach to Boolean logic that
expresses formulas as :
 Conjunctions of clauses with an AND or OR
 Each clause connected by a conjunction, (AND) must be either a literal or
contain a disjunction (OR) operator.
 CNF is useful for automated theorem proving
CNF is used for automated theorem proving.
11
Conjunctive Normal Form (CNF)
// Replace all
// De Morgan’s theorem
// in normal form
12
Propositional Logic – Example-1
3rd inference rule (resolution)
// B is resolved away
// Q is resolved away
13
Propositional Logic – Example-2
Problem:
 If it is “Hot”, Then it is “Humid”
 If it is “Humid”, Then it will “Rain”
Q: If it is “Hot”, Show that it will “Rain”
Solution: H: It is “Humid” (sentences)
R: it will “Rain”
O: It is “Hot”
• If it is “Hot”, Then it is “Humid”: O => H
• If it is “Humid”, Then it will “Rain : H => R
• It is “Hot” : O
• Add “Negation of Goal”:
CNF: Step-1
(eliminate =>)
Apply Resolution
Inference rule on
H , O & R
Resolution rule
14
Propositional Logic – Example-3
Limitations of Propositional Logic
 In propositional logic, we can only represent the facts, which
are either true or false.
 PL is not sufficient to represent the complex sentences or
natural language statements.
 The propositional logic has very limited expressive power.

Propositional logic class 2 of AI/ Ml for Diploma students

  • 2.
    Introduction  A propositionis a declarative statement which is either true or false.  Propositions can be either true or false, but it cannot be both.  A proposition formula which is always true is called tautology.  A proposition formula which is always false is called Contradiction.  A proposition formula which has both true and false values is called Contingency.
  • 3.
    Propositional Logic Connectives SymbolWord Technical Term Example  AND Conjunction A  B  OR Disjunction A  B  Implies Implication A  B  If and only If Bi-Conditional A B  Not Negation A or  B
  • 4.
    Inference rules  Inverse− An inverse of the conditional statement is the negation of both the hypothesis and the conclusion. If the statement is “If p, then q”, the inverse will be “If not p, then not q”. Thus the inverse of p → q is ¬p → ¬q.  Converse − The converse of the conditional statement is computed by interchanging the hypothesis and the conclusion. If the statement is “If p, then q”, the converse will be “If q, then p”. The converse of p → q is q → p.  Contra-positive −The contra-positive of the conditional is computed by interchanging the hypothesis and the conclusion of the inverse statement. The contra-positive of p → q is ¬q→¬p.
  • 5.
    Types of Inferencerules  1. Modus Ponens:  It states that if “P” and “P → Q” is true, then we can infer that Q will be true.  2. Modus Tollens:  It states that if “P→ Q” is true and ”¬ Q” is true, then “¬ P” will also true. It can be represented as:  3. Hypothetical Syllogism  It states that if “P→R” is true whenever “P→Q” is true, and “Q→R” is true.  4. Disjunctive Syllogism:  It states that if “P∨Q is true”, and “¬P is true”, then Q will be true.
  • 6.
     5. Addition It states that If “P is true”, then P∨Q will be true.  6. Simplification  It states that if P∧ Q is true, then Q or P will also be true.  7. Resolution  It states that if P∨Q and ¬ P∧R is true, then Q∨R will also be true.
  • 7.
    Few more InferenceRules . Unit Resolution: • If is True & is True, Then is True 3. Resolution: or • The 2 premises are said to be resolved and the variable is said to be resolved away. …. and several other rules 7
  • 8.
     A sentence/premisemay have:  Validity (always true):- Tautology  Satisfiability (sometimes true):- Contingency  No Satisfiability (always false):- Contradiction 8
  • 9.
     Find ifthe following is valid, satisfactory or invalid? ((P  Q)  R)  ( P   R). Ans :- Valid/ Tautology
  • 10.
    10 Conjunctive Normal Form(CNF)  Conjunctive normal form (CNF) is an approach to Boolean logic that expresses formulas as :  Conjunctions of clauses with an AND or OR  Each clause connected by a conjunction, (AND) must be either a literal or contain a disjunction (OR) operator.  CNF is useful for automated theorem proving CNF is used for automated theorem proving.
  • 11.
    11 Conjunctive Normal Form(CNF) // Replace all // De Morgan’s theorem // in normal form
  • 12.
    12 Propositional Logic –Example-1 3rd inference rule (resolution) // B is resolved away // Q is resolved away
  • 13.
    13 Propositional Logic –Example-2 Problem:  If it is “Hot”, Then it is “Humid”  If it is “Humid”, Then it will “Rain” Q: If it is “Hot”, Show that it will “Rain” Solution: H: It is “Humid” (sentences) R: it will “Rain” O: It is “Hot” • If it is “Hot”, Then it is “Humid”: O => H • If it is “Humid”, Then it will “Rain : H => R • It is “Hot” : O • Add “Negation of Goal”: CNF: Step-1 (eliminate =>) Apply Resolution Inference rule on H , O & R Resolution rule
  • 14.
  • 15.
    Limitations of PropositionalLogic  In propositional logic, we can only represent the facts, which are either true or false.  PL is not sufficient to represent the complex sentences or natural language statements.  The propositional logic has very limited expressive power.