Logic Proofs Full Slides
Logic Proofs Full Slides
Logic Proofs Full Slides
UNIT-2
SRMIST
Compound Proposition
A proposition obtained from the combinations of two or more
propositions by means of logical operators or connectivesis referred
as molecular or compound proposition
P ¬P
T F
F T
E. Suresh Logics 6/60
Problems
P Q P∧Q
T T T
T F F
F T F
F F F
P Q P∨Q
T T T
T F T
F T T
F F F
P Q ¬Q ¬Q ∨ Q P ∧ (¬Q ∨ Q )
T T F T T
T F T T T
F T F T F
F F T T F
P Q ¬P ¬Q P∨ Q ¬ ( P∨ Q) (¬ P ∧¬ Q) A
T T F F T F F F
T F F T T F F F
F T T F T F F F
F F T T F T T T
P Q ¬Q P ∨ ¬Q (P ∨ ¬Q ) → P
T T F T T
T F T T T
F T F F T
F F T T F
P Q R ¬P P ∧Q ¬(P ∧ Q ) ¬(P ∧ Q ) ∨ R A
T T T F T F T F
T T F F T F F T
T F T F F T T F
T F F F F T T F
F T T T F T T T
F T F T F T T T
F F T T F T T T
F F F T F T T T
P Q R Q ∧R A B P ∨Q P→R C B↔C
T T T T T F T T T F
T T F F T F T F F T
T F T F T F T T T F
T F F F T F T F F T
F T T T T F T T T F
F T F F F T T T T T
F F T F F T F T F F
F F F F F T F T F F
E. Suresh Logics 22/60
Problem-4 : Construct truth table for
(i) (P ∨ Q ) → R
(ii) (P → R ) ∧ (Q → R )
Solution :(i) Truth table for (P ∨ Q ) → R is
P Q R (P ∨ Q ) (P ∨ Q ) → R
T T T T T
T T F T F
T F T T T
T F F T F
F T T T T
F T F T F
F F T F T
F F F F T
P Q R (P → Q ) (Q → R ) (P → R ) ∧ (Q → R )
T T T T T T
T T F F F F
T F T T T T
T F F F T F
F T T T T T
F T F T F F
F F T T T T
F F F T T T
Contradiction
A statement that is always false is called a contradiction or
absurdity
P Q ¬P ¬Q P→Q ¬Q ∧ (P → Q ) A
T T F F T F T
T F F T F F T
F T T F T F T
F F T T T T T
∴ (¬Q ∧ (P → Q )) → ¬P is a tautology
P Q ¬P (P → Q ) ¬P ∨ Q (P → Q ) ↔ (¬P ∨ Q )
T T F T T T
T F F F F T
F T T T T T
F F T T T T
S.No Law
1 Idempotent P ∨P ≡ P P ∧P ≡ P
2 Identity P ∨F ≡ P P ∧T ≡ P
3 Dominant P ∨T ≡ T P ∧F ≡ F
4 Complement P ∨ ¬P ≡ T P ∧ ¬P ≡ F
5 Commutative P ∨Q ≡ Q ∨P P ∧Q ≡ Q ∧P
6 Associative (P ∨ Q ) ∨ R ≡ P ∨ (Q ∨ R ) (P ∧ Q ) ∧ R ≡ P ∧ (Q ∧ R )
7 Distributive P ∨ (Q ∧ R ) ≡ (P ∨ Q ) ∧ (P ∨ R ) P ∧ (Q ∨ R ) ≡ (P ∧ Q ) ∨ (P ∧ R )
8 Absorption P ∨ (P ∧ Q ) ≡ P P ∧ (P ∨ Q ) ≡ P
9 De Morgans ¬(P ∨ Q ) ≡ ¬P ∧ ¬Q ¬(P ∧ Q ) ≡ ¬P ∨ ¬Q
S.No Formula
1 P → Q ≡ ¬P ∨ Q
2 P → Q ≡ ¬Q → ¬P
3 P ∨Q ≡ P → Q
4 P ∧ Q ≡ ¬(P → ¬Q )
5 ¬(P → Q ) ≡ P ∧ ¬Q
6 (P → Q ) ∧ (P → R ) ≡ P → (Q ∧ R )
7 (P → Q ) ∨ (P → R ) ≡ P → (Q ∨ R )
8 (P → R ) ∧ (Q → R ) ≡ (P ∨ Q ) → R
9 (P → R ) ∨ (Q → R ) ≡ (P ∧ Q ) → R
S.No Formula
1 P ↔ Q ≡ (P → Q ) ∧ (Q → P )
2 P ↔ Q ≡ ¬P ↔ ¬Q
3 P ↔ Q ≡ (P ∧ Q ) ∨ (¬P ∧ ¬Q )
4 ¬(P ↔ Q ) ≡ P ↔ ¬Q
LHS ≡ (¬P ∨ Q ) ∧ (P ∧ (P ∧ Q ))
≡ (¬P ∨ Q ) ∧ ((P ∧ P ) ∨ Q ) [By Associative]
≡ (¬P ∨ Q ) ∧ (P ∧ Q ) [By idempotent]
≡ (P ∧ Q ) ∧ (¬P ∨ Q ) [By commutative]
≡ ((P ∧ Q ) ∧ ¬P ) ∨ ((P ∧ Q ) ∧ Q ) [By distributive]
≡ (P ∧ Q ∧ ¬P ) ∨ (P ∧ Q ∧ Q ) [By commutative]
≡ ((P ∧ ¬P ) ∧ Q ) ∨ (P ∧ (Q ∧ Q )) [By associative]
≡ (F ∧ Q ) ∨ (P ∧ Q ) [By complement & idempotent]
≡ F ∨ (P ∧ Q ) [By dominant]
≡ P ∧Q [By dominant]
Therefore (¬P ∨ Q ) ∧ (P ∧ (P ∧ Q )) ≡ P ∧ Q
LHS ≡ P → (Q → P )
≡ ¬P ∨ (Q → P ) [P → Q ≡ ¬P ∨ Q ]
≡ ¬P ∨ (¬Q ∨ P )
≡ ¬P ∨ (P ∨ ¬Q )
≡ (¬P ∨ P ) ∨ ¬Q
≡ (T ) ∨ ¬Q
≡T − − − −− > (1)
LHS ≡ (P ∨ Q ) ∧ ¬(P ∧ Q )
≡ (P ∨ Q ) ∧ (¬P ∨ ¬Q )
≡ [(P ∨ Q ) ∧ ¬P ] ∨ [(P ∨ Q ) ∧ ¬Q ]
≡ [(P ∧ ¬P ) ∨ (Q ∧ ¬P )] ∨ [(P ∧ ¬Q ) ∨ (Q ∧¬Q )]
≡ [(F ) ∨ (Q ∧ ¬P )] ∨ [(P ∧ ¬Q ) ∨ (F )]
≡ [(Q ∧ ¬P )] ∨ [(P ∧ ¬Q )]
≡ (Q ∧ ¬P ) ∨ (P ∧ ¬Q )
≡ (¬P ∧ Q ) ∨ (P ∧ ¬Q )
≡ (P ∧ ¬Q ) ∨ (¬P ∧ Q ) ≡ RHS
LHS ≡ ¬P → (Q → R )
≡ P ∨ (Q → R ) [P → Q ≡ ¬P ∨ Q ]
≡ P ∨ (¬Q ∨ R )
≡ (P ∨ ¬Q ) ∨ R
≡ ¬Q ∨ P ∨ R
≡ ¬Q ∨ (P ∨ R )
≡ Q → (P ∨ R )
≡ RHS
LHS ≡ P → (Q → R )
≡ P → (¬Q ∨ R ) [P → Q ≡ ¬P ∨ Q ]
≡ ¬P ∨ (¬Q ∨ R )
≡ (¬P ∨ ¬Q ) ∨ R
≡ ¬(P ∧ Q ) ∨ R
≡ (P ∧ Q ) → R
≡ RHS
LHS ≡ (P ∨ Q ) → R
≡ ¬(P ∨ Q ) ∨ R [P → Q ≡ ¬P ∨ Q ]
≡ (¬P ∧ ¬Q ) ∨ R
≡ (¬P ∨ R ) ∧ (¬Q ∨ R )
≡ (P → R ) ∧ (Q → R )
≡ RHS
LHS ≡ (P ∧ (P ↔ Q )) → Q
≡ ¬[P ∧ (P ↔ Q )] ∨ Q [P → Q ≡ ¬P ∨ Q ]
≡ ¬[P ∧ ((P → Q ) ∧ (Q → P ))] ∨ Q
≡ ¬[(P ∧ (¬P ∨ Q )) ∧ (¬Q ∨ P )] ∨ Q
≡ ¬[((P ∧ ¬P ) ∨ (P ∧ Q )) ∧ (¬Q ∨ P )] ∨ Q
≡ ¬[((F ) ∨ (P ∧ Q )) ∧ (¬Q ∨ P )] ∨ Q
≡ ¬[(P ∧ Q ) ∧ (¬Q ∨ P )] ∨ Q
≡ ¬[((P ∧ Q ) ∧ ¬Q ) ∨ ((P ∧ Q ) ∧ P )] ∨ Q
≡ ¬[(P ∧ F ) ∨ (P ∧ Q )] ∨ Q
Hence
((P ∨ Q ) ∧ ¬(¬P ∧ (¬Q ∨ ¬R ))) ∨ (¬P ∧ ¬Q ) ∨ (¬P ∧ ¬R ) is
a tautology