Foundations of Programming: Discrete Mathematics
with Peggy Fisher
Set Theory
a∈A a is an element of set A
a∉A a is not an element of set A
{a1,a2,...,an} Set with elements a1 ... an
{x ∈ D | P(x)} The set of all x in D for which P(x) is true
R All real numbers
Z All integer numbers
Q All rational numbers
W Whole numbers (counting numbers plus zero)
N Natural numbers (counting numbers 1,2,3,4,5...)
A⊆B A is a subset of B
A⊈B A is NOT a subset of B
A=B A equals B
A⋃B A union B
A⋂B
A intersects B
B-A Elements in B but not in A
Ac or A Complement of A
(x,y) Ordered pair
AxB Cartesian product
∅, { } Empty set
℘ (A) Power set of A
Foundations of Programming: Discrete Mathematics with Peggy Fisher
1 of 2
Logical Equivalences
t = tautology ∿ = NOT ∧ = AND
c = contradiction ∨ = OR ≡ = logically equivalent
Name Form 1 Form 2
Commutative Laws p∿ ≡ q∨p p∨q ≡ q∨p
Associative Laws (p∧q)∧r ≡ p∧(q∧r) (p∨q)∨r ≡ p∨(q∨r)
Distributive Laws p∧(q∨r) ≡ (p∧q)∨(p∧r) p∨(q∧r) ≡ (p∨q)∧(p∨r)
Identity Laws p∧t ≡ p p∨c ≡ p
Negation Laws p∨∿p ≡ t p∧∿p ≡ c
Double Negation Laws ∿∿p ≡ p −
Idempotent p∧p ≡ p p∨p ≡ p
Universal Bounds p∨t ≡ t p∧c ≡ c
De Morgan’s Laws ∿(p∧q) ≡ ∿p∨∿q ∿(p∨q) ≡ ∿p∧∿q
Absorption Laws p∨(p∧q) ≡ p p∧(p∨q) ≡ p
Negations of t and c ∿t = c ∿c = t
Rules of Inference with Propositions
p
q Conjunction
p
∴ p∧q
p → q Modus ponens
∴q
p→q
q → r Hypothetical syllogism/transitivity
¬q ∴ p→r
p → q Modus tollens
∴ ¬ p
a) p∨q Disjunctive syllogism/elimination
¬q
∴p
a) p Addition/generalization
b) p∨q
p∨q
¬p
b) q
∴q
∴ p∨q
p∨q
¬ p∨r Resolution
a) p∨q ∴ q∨r
Simplification/specialization
∴p
b) p∧q p∨q
∴q p→r Proof by division into cases
q→ p
∴r
Foundations of Programming: Discrete Mathematics with Peggy Fisher
2 of 2