You are on page 1of 43

More Logics and Proofs

Bi-Conditional Statement

•Let p and q be propositions.

•The biconditional statement p ↔ q is the proposition “p if


and only if q.”
Bi-Conditional Statement

•The biconditional statement p ↔ q is true when p and q


have the same truth values and is false otherwise.

•Biconditional statements are also called bi-implications.


Bi-Conditional Statement

P Q P ↔ Q
0 0 1
0 1 0
1 0 0
1 1 1
Some Practice
Let p and q be the propositions
•p: It is below freezing.
•q: It is snowing.

• a) It is below freezing and snowing. • e) If it is below freezing, it is also


• b) It is below freezing but not snowing.
snowing. • f ) Either it is below freezing, or it is
• c) It is not below freezing, and it is snowing, but it is not snowing if it is
not snowing. below freezing.
• d) It is either snowing or below • g) That it is below freezing is
freezing (or both). necessary and sufficient for it to be
snowing.
Some Practice
Let p, q, and r be the propositions
•p: You have the flu.
•q: You miss the final examination.
•r: You pass the course.

•a) p -> q •d) p ∨ q ∨ r


• if you have flu then you miss the final exam • Either, you have flu or you miss final or you
pass the course, (all the above three or any two
•b) -q <-> r of the above.)

•e) (p -> -r) ∨ (q -> -r)
•c) q -> -r

•f ) (p ∧ q) ∨ (-q ∧ r)
Bi-Conditional Statement

P Q P ↔ Q
0 0 1
0 1 0
1 0 0
1 1 1
´ 𝑊
𝑅 →𝑊 ≡ 𝑅 ´ ∨𝑅
´ 𝑊 ∨ 𝑅𝑊  

• 

•Disjunctive Normal Form


Conjunctive Normal Form

•CONJUNCTIVE NORMAL FORM


LOGICAL NOR

R R WW
NOT using NOR

RR

https://youtu.be/dI-JW2UIAG0?t=326
OR USING NOR

RRW
W
11 11 11

1 1 00 11

00 1 1 11

00 0 0 00
OR USING NOR

RRW
W
11 11 11 00NOR
NOR00
1 1 00 11 00NOR
NOR00
00 1 1 11 00NOR
NOR00
00 0 0 00 1 1NOR
NOR1 1
AND USING NOR

RRW
W
11 11 11

1 1 00 00

00 1 1 00

00 0 0 00
NAND Gate also a complete set
Satisfiability
Satisfiability

•A compound statement is satisfiable if there is an


assignment of truth values to its variables that makes it
true.
Satisfy the compound preposition

PQ R
1 1 0 (1 V 0)(1V1)(0V0)=0
1 0 0 (1V1)(0V1)(0V0) = 0
0 1 0 (0V0)(V)(V) = 0

0 0 0 (0V1)(0V1)(0V1) = 1

1 1 1 (1V?)(1V?)(1V?) = 1
Satisfy the compound preposition

P Q
1 1

1 0

0 1

0 0
Revision - Predicate

• 
Quantifiers

-Revision
Quantifiers

•Universal Quantifier

•Existential Quantifier
For All values of X

•One counterexample is enough to disprove the preposition


There exists a value of X

•One example is enough to prove the preposition


De Morgan Law for Quantifiers
¬∃ 𝑥 𝑃 ( 𝑥)  

• 
Example

• 
•All values of x satisfy the preposition.

•What is the negation?


Example Contd…

• 

•Not all values of x satisfy the preposition


Example Contd…

• 

•There exists (at-least 1) x where the preposition is false


Proofs
Direct Proof

•If n is even, then n^2 is also even.


Direct Proof

•If n is even, then n^2 is also even.


• If n is even -> n = 2b for some int b.
• (from def of even numb)
•Axiom
•By def of even number
• n = 2b (sq both sides)
• n2 = (2b)2 •a = 2b, a is int b is int -> a is
• n^2 = 4b2
• n2 = 2(2b2) even
•Let 2b2 = b1
• (Sq or mul of an int remains an int.)
•a is even -> a = 2b for some
• n2 = 2b1 therefore n2 is also even. From def of even int b.
number.
• Q.E.D.
Direct Proof

•If n is odd, then n2 is also odd.


• If n is odd -> n = 2k + 1
•Axioms
(from def of odd num)
•Int a is odd <-> a=2b+1
n = 2k +1 { sq. both sides }
for some/any int b
n = (2k+1) { expand }
2 2

n2 = 4k2 + 4k + 1
n2 = 2(2k2 + 2k) + 1 {take 2 common}
Let k1 = 2k2 + 2k  k1 is int
n2 = 2(k1) + 1
therefore n2 is odd Q.E.D.
Direct Proof

In Direct Proof P→Q is proven by assuming P is


true then using axioms, definitions and previous
theorems and rule of inference also prove the q
must also be true
Universe of DICOURSE

domain of discourse (or the


universe of discourse), often just referred to as
the domain.
Examples of Domain of Discourse

• 
Example

• Every student in DM will score A grade in DM


•Every student x. x is enrolled in DM. x gets A in DM
•P(x) = x get A in DM
•Every student x. x is enrolled in DM P(x)
• _____ P(x)
Proof that if m and n are perfect squares then mn is also a perfect square.

• 

•P(x) = x is a perfect square


Proof that if m and n are perfect squares then mn is also a perfect square.

• 
Proof by Contradiction
Proof by contradiction

• To prove P is true, we assume P is false (i.e. is true) and

•then use this hypothesis to drive a falsehood (or


contradiction)
Proof that root 2 is rational

•Write, “We use proof by contradiction.”

•Write, “Suppose P is false.”

•Deduce something known to be false (a logical contradiction).

•Write, “This is a contradiction. Therefore, P must be true.”


End of lecture!

You might also like