Unit 3 notes logic concepts
Unit 3 notes logic concepts
Lecture Module 11
Objective
Logic Concepts
Equivalence Laws
Propositional Logic
Natural deduction method
Axiomatic System
Semantic Tableaux System
Resolution Refutation Method
Propositional Logic Concepts
Logic is a study of principles used to
− distinguish correct from incorrect reasoning.
Formally it deals with
− the notion of truth in an abstract sense and is
concerned with the principles of valid inferencing.
A proposition in logic is a declarative statements
which are either true or false (but not both) in a
given context. For example,
− “Jack is a male”,
− "Jack loves Mary" etc.
Cont..
P Q ~P PQ PVQ P Q P Q
T T F T T T T
T F F F T F F
F T T F T T F
F F T F F T T
Equivalence Laws
Commutation
1. PQ Q P
2. P V Q Q V P
Association
1. P (Q R) (P Q) R
2. P V (Q V R) (P V Q) V R
Double Negation
~ (~ P) P
Distributive Laws
1. P ( Q V R) (P Q) V (P R)
2. P V ( Q R) (P V Q) (P V R)
De Morgan’s Laws
1. ~ (P Q) ~P V~Q
2. ~ (P V Q) ~P ~Q
Law of Excluded Middle
P V ~P T (true)
Law of Contradiction
P ~P F (false)
Propositional Logic - PL
● PL deals with
− the validity, satisfiability and unsatisfiability of a formula
− derivation of a new formula using equivalence laws.
● Each row of a truth table for a given formula is
called its interpretation under which a formula can
be true or false.
● A formula is called tautology if and only
− if is true for all interpretations.
● A formula is also called valid if and only if
− it is a tautology.
Cont..
● Let be a formula and if there exist at least one
interpretation for which is true,
− then is said to be consistent (satisfiable) i.e., if a model
for , then is said to be consistent .
● A formula is said to be inconsistent (unsatisfiable),
if and only if
− is always false under all interpretations.
● We can translate
− simple declarative and
− conditional (if .. then) natural language sentences into its
corresponding propositional formulae.
Example
● Show that " It is humid today and if it is humid then it
will rain so it will rain today" is a valid argument.
● Solution: Let us symbolize English sentences by
propositional atoms as follows:
A : It is humid
B : It will rain
● Formula corresponding to a text:
: ((A B) A) B
● Using truth table approach, one can see that is true
under all four interpretations and hence is valid
argument.
Cont..
A B A B=X XA= Y Y B
T T T T T
T F F F T
F T T F T
F F T F T
Cont…
● Truth table method for problem solving is
− simple and straightforward and
− very good at presenting a survey of all the truth possibilities
in a given situation.
● It is an easy method to evaluate
− a consistency, inconsistency or validity of a formula, but the
size of truth table grows exponentially.
− Truth table method is good for small values of n.
● For example, if a formula contains n atoms, then the
truth table will contain 2n entries.
− A formula : (P Q R) ( Q V S) is valid can be
proved using truth table.
− A table of 16 rows is constructed and the truth values of
are computed.
− Since the truth value of is true under all 16
interpretations, it is valid.
Cont..
● We notice that if P Q R is false, then is true
because of the definition of .
● Since P Q R is false for 14 entries out of 16, we
are left only with two entries to be tested for which
is true.
− So in order to prove the validity of a formula, all the entries in
the truth table may not be relevant.
● Other methods which are concerned with proofs and
deductions of logical formula are as follows:
− Natural Deductive System
− Axiomatic System
− Semantic Tableaux Method
− Resolution Refutation Method
Natural deduction method - ND
● ND is based on the set of few deductive inference
rules.
● The name natural deductive system is given because
it mimics the pattern of natural reasoning.
● It has about 10 deductive inference rules.
Conventions:
− E for Elimination.
− P, Pk , (1 k n) are atoms.
− k, (1 k n) and are formulae.
ND Rules
Rule 1: I- (Introducing )
I- : If P1, P2, …, Pn then P1 P2 … Pn
Interpretation: If we have hypothesized or proved P1, P2, … and Pn ,
then their conjunction P1 P2 … Pn is also proved or derived.
Rule 2: E- ( Eliminating )
E- : If P1 P2 … Pn then Pi ( 1 i n)
Interpretation: If we have proved P1 P2 … Pn , then any Pi is also
proved or derived. This rule shows that can be eliminated to yield
one of its conjuncts.
Rule 3: I-V (Introducing V)
I-V : If Pi ( 1 i n) then P1V P2 V …V Pn
Interpretation: If any Pi (1 i n) is proved, then P1V …V Pn is also
proved.
Rule 4: E-V ( Eliminating V)
E-V : If P1 V … V Pn, P1 P, … , Pn P then P
Interpretation: If P1 V … V Pn, P1 P, … , and Pn P are proved, then
P is proved.
Rules – cont..
Rule 5: I- (Introducing )
I- : If from 1, …, n infer is proved then 1 … n is
proved
Interpretation: If given 1, 2, …and n to be proved and from these
we deduce then 1 2 … n is also proved.
Rule 6: E- (Eliminating ) - Modus Ponen
E- : If P1 P, P1 then P
Rule 7: I- (Introducing )
I- : If P1 P2, P2 P1 then P1 P2
Rule 8: E- (Elimination )
E- : If P1 P2 then P1 P2 , P2 P1
Rule 9: I- ~ (Introducing ~)
I- ~ : If from P infer P1 ~ P1 is proved then ~P is proved
Rule 10: E- ~ (Eliminating ~)
E- ~ : If from ~ P infer P1 ~ P1 is proved then P is proved
Cont..
● If a formula is derived / proved from a set of premises /
hypotheses { 1,…, n },
− then one can write it as from 1, …, n infer .
● In natural deductive system,
− a theorem to be proved should have a form from 1, …, n infer .
● Theorem infer means that
− there are no premises and is true under all interpretations i.e., is a
tautology or valid.
● If we assume that is a premise, then we conclude that
is proved if is given i.e.,
− if ‘from infer ’ is a theorem then is concluded.
− The converse of this is also true.
2. { P Q, Q R } |- ( P R ) i.e., P R is a deductive
consequence of { P Q, Q R }.
{Hypothesis} P Q (1)
{Hypothesis} Q R (2)
{Axiom A1} (Q R) (P (Q R)) (3)
{MP, (2, 3)} P (Q R) (4)
{Axiom A2} (P (Q R))
((P Q) (P R)) (5)
{MP , (4, 5)} (P Q) (P R) (6)
{MP, (1, 6)} P R proved
Deduction Theorems in AS
Deduction Theorem:
If is a set of hypotheses and and are well-
formed formulae , then { } |- implies
|- ( ).
~ ~
Rule 9: ~ ( ) ( ~ ) V (~ )
~ ( )
~ ~
Consistency and Inconsistency
● If an atom P and ~ P appear on a same path of a
semantic tableau,
− then inconsistency is indicated and such path is said to be
contradictory or closed (finished) path.
− Even if one path remains non contradictory or unclosed
(open), then the formula at the root of a tableau is
consistent.
● Contradictory tableau (or finished tableau):
− It defined to be a tableau in which all the paths are
contradictory or closed (finished).
● If a tableau for a formula at the root is a
contradictory tableau,
− then a formula is said to be inconsistent.
Examples
● Show that : ( Q ~ R) ( R P) is consistent and find
its model.
{Tableau root} ( Q ~ R)( R P) (1)
{Apply rule 1 to 1} (Q ~ R) (2)
( RP) (3)
{Apply rule 1 to 2} Q
{Apply rule 6 to 3} ~R
~R P
open open
● { Q = T, R = F } and { P = T , Q = T, R = F } are models of .
Cont...
● Show that : (P Q R) ( ~P S) Q ~ R ~ S
is inconsistent using tableaux method.
(Root} (P Q R) ( ~P S) Q ~R ~S (1)
{Apply rule 1 to 1} P Q R (2)
~P S (3)
Q
~R
~S
{Apply rule 6 to 3} ~ ~P = P S
P V R V W P V ~W
{W, ~ W}
PVR
● Resolvent(C1,C2, C3) = P V R
Logical Consequence
BVD
CVD