Logic Guide

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 3

CS135 Spring 2015 logic guide, version 0
Some laws of propositional logic
Binding power: ,bind more tightly than , less tightly than ¬. For example,
P∧ ¬QPmeans (P(¬Q)) P.
¬(¬p)pdouble negation
pppidempotent laws
ppp
pTpidentity elements
pFp
pFFzero elements (’domination laws’)
pTT
pqqpcommutativity
pqqp
p∨ ¬pTnegation laws (excluded middle and contradiction)
p∧ ¬pF
p(qz)(pq)zassociativity
p(qz)(pq)z
p(pq)pabsorption
p(pq)p
p(qz)(pq)(pz) distributive laws
p(qz)(pq)(pz)
¬(pq)(¬p)(¬q) De Morgan’s laws
¬(pq)(¬p)(¬q)
pq≡ ¬pqdefinition of
pq(pq)(qp) definition of
Connection between laws and tautologies:
pqis a valid law if, and only if, pqis a tautology.
1
Inference rules for propositional logic
Rule Corresponding tautology Name of rule
p p q
q(p(pq)) qModus ponens
p p q
q(p(pq)) qEquivalence rule
p q
pqConjunction rule
pq q r
pr(pq)(qr)(pr) Hypothetical syllogism
[p]
.
.
.
q
pqDischarge hypothesis
x P (x)
P(c)(x P (x)) P(c) Universal instantiation
(cis any expression)
P(x) (xis arbitrary)
x P (x)Universal Generalization
P(c)
x P (x)P(c)→ ∃x P (x) Existential Generalization
P(x)x=e
P(e)Substitution of equals
P(0) n. (n6= 0 (P(n1) P(n))
nNP(n))) Induction (on naturals)
P(0()) lst. (lst 6=0() (P((cdr lst)) P(lst)))
lst P (lst)Induction (on lists)
For Universal Generalization “xis arbitrary” means the proof of P(x) makes no
assumptions about x. By comparison, for Existential Generalization you choose
an expression cand prove P(c).
2
When doing a proof in step-by-step style, these rules justify that one line
follows from previous lines. For example, here is a proof of PQP.
1. P assumption
2. P Qfrom 1 by Addition rule
3. P QQPcommutativity law for (and Univ. Instantiation!)
4. Q Pfrom 2 and 3 by Equivalence rule
5. P QPfrom 1 and 4 by Discharge hypothesis
A complete proof shouldn’t have any assumptions that were not discharged.
When doing a proof in equational style, we are implicitly using one the
following rule:
PQ Q R
PR
and similarly for equality (=) for numeric expressions etc.
3

Navigation menu