Truth, Deduction,
Computation
Lecture 6
Boolean Logic and Informal Proofs
Vlad Patryshev
SCU
2013
Distributive Laws

● P∧(QvR) ⇔ (P∧Q) v (P∧R)
● P∧(QvR) ⇔ (PvQ) ∧ (PvR)
Distributive Laws - it’s a tautology
P

Q

R

P∧Q

P∧
R

QvR

P∧(QvR)

(P∧Q)v
(P∧R)

T

T

T

T

T

T

T

T

T

T

F

T

F

T

T

T

T

F

T

F

T

T

T

T

T

F

F

F

F

F

F

F

F

T

T

F

F

T

F

F

F

T

F

F

F

T

F

F

F

F

T

F

F

T

F

F

F

F

F

F

F

F

F

F
Disjunctive Normal Form (example)
(A∨B)∧(C∨D) ⇔ ((A∨B)∧C)∨((A∨B)∧D)
⇔ (A∧C)∨(B∧C)∨((A∨B)
∧D)
⇔ (A∧C)∨(B∧C)∨(A∧D)∨
(B∧D)
Disjunctive Normal Form
<dnf> ::= <conjunction>
<dnf> ::= <dnf> v <conjunction>
<conjunction> ::= <literal>
<conjunction> ::= <conjunction>∧<literal>
<literal> ::= <atomic formula>
<literal> ::= ¬<atomic formula>
E.g. (¬A∧B∧C)v(A∧¬C)v(¬B∧¬C)
Disjunctive Normal Form (in code)
class DNF(cc: Conjunction*)
class Conjunction(ll: Literal*)
trait Literal
class Negative(f: Atomic) extends Literal
class Positive(f: Atomic) extends Literal
trait Name
class Atomic(predicate:Name, params:Term*)
trait Term
class Fun(function: Name, params: Term*)
extends Term
class Entity(name:Name) extends Term
(Chapter 5)

Boolean Logic: Ways to Prove
Problems with truth tables
● exponential growth
● not enough valid combinations
Have to find shortcuts, “inference steps”
Inference Steps - Informally
Important (informal) rules of thumb
● If everybody agree that P yields Q, it does
● If we know that Q is a logical truth, reuse it
Inference Steps - Formally

● Conjunction Elimination
● Conjunction Introduction
● Disjunction Introduction
Conjunction Elimination

P∧Q
Q

P

Q

P∧Q

T

T

T

T

F

F

F

T

F

F

F

F
Conjunction Introduction
P
Q
P∧Q

P

Q

P∧Q

T

T

T

T

F

F

F

T

F

F

F

F
Disjunction Introduction

P
PvQ

P

Q

PvQ

T

T

T

T

F

F

F

T

F

F

F

F
Proof by Cases

To prove S1vS2..Sn yields Q,
Prove that S1 yields Q, S2
yields Q… Sn yields Q.
Proof by Cases - Example
Ex. 5.4
(Home(max)∧Happy(carl)) v (Home(claire)∧Happy(scruffy))
Happy(carl) v Happy(scruffy)
Proof by Cases - Another Example
Can a rational a be equal to bc where b and c are irrational?
1.
2.

sqrt(2) is irrational (proof?)
Either…
a. q = sqrt(2)sqrt(2) is rational (QED), or…
b. q is irrational, and qsqrt(2)=sqrt(2)sqrt(2)*sqrt(2)=sqrt(2)2=2
Proof by Contradiction
Reductio ad Absurdum

To prove ¬S, assume S, and
deduce ⊥.
(⊥ is called “contradiction symbol”)
Proof by Contradiction - Example
Is sqrt(2) irrational?
1.
2.
3.
4.
5.

Assume it is, sqrt(2)=p/q
Where p and q are mutually prime (have no common divisors)
Then p2=2*q2
Then both p and q must be even.
⊥

We used our (tautological) knowledge that
A ∧ ¬A
FALSE
Proof by Contradiction - Example
Inconsistent Premises (are the best)
● never sound
● always valid
That’s it for today

Truth, deduction, computation lecture 6