You are on page 1of 1

Reference Sheet for Logic and Program Proofs

Logical Equivalences
Denition of P P F alse P F alse F alse P T rue P Denition of P P T rue P F alse P P T rue T rue Idempotent Laws ppp ppp DeMorgans Laws (p q ) p q (p q ) p q Distributive Laws p (q r) (p q ) (p r) p (q r) (p q ) (p r)

Double Negation (p) p

Absorption Laws p (p q ) p p (p q ) p

Associative Laws (p q ) r p (q r ) (p q ) r p (q r )

Commutative Laws pq qp pq qp

Implication Laws p q p q p q q p

Biconditional Laws p q (p q ) (q p) p q q p

Inference Rules
Simplication pq Therefore, p Therefore, q Conjunction p q Therefore, p q Universal Instantiation xP (x) Therefore, P (c) Universal Generalization P (c) Therefore, xP (x) Addition p Therefore, p q Therefore, q r Existential Instantiation xP (x) Therefore, P (c) Therefore, q Existential Generalization P (c ) Therefore, xP (x) Therefore, p Resolution pq p r Therefore, p r Disjunctive Syllogism pq p Modus Ponens p pq Modus Tollens q pq Hypothetical Syllogism pq qr

Inference Rules For Program Proofs


Composition Rule p{S1 }q q {S2 }r p{S1 ; S2 }r Conditional Rule (p condition){S }q (p condition) q p{ if condition S }q Conditional with Else Rule (p condition){S1 }q (p condition){S2 }q p{ if condition S1 else S2 }q

You might also like