Chapter 3

advertisement
Chapter 3
Propositional Calculus
Goal: Learn to manipulate Boolean expressions without regard to their (intrinsic) meaning.
Preliminaries
 Definition Calculus reasoning process based on calculation with symbols
 Definition Propositional Calculus method of calculating with Boolean expressions involving
propositional variables.
 Equational Logic
Components of Equational Logic
 Axioms
 Inference Rules
 Leibniz (1.5)
 Transitivity (1.4)
 Textual Substitution (1.1)
 A theorem is
1. an axiom
2. a conclusion of an inference rule whose premises are theorems
3. a boolean expression that, using the inference rules, is proved equivalent to an axiom or a
previously proved theorem.



All Theorems are valid (and all valid expressions are theorems).
Typically the axioms are stated for individual operators and they are given in some particular
order so as to "define" an operator. Our text uses a non-traditional approach because of its
desire to emphasize certain items.
We want to develop skill at manipulations.
Axiom
(3.1) Axiom, Associativity of  ((pq)r)(p(qr). This axiom allows us to remove
parentheses when expressing equivalences
(3.2) Axiom, Symmetry of .
pq  qp. Imagine the parentheses (pq)  (qp).
Theorem: ppqq
Proof:
ppqq
=
<3.2 substituting p for pqq using Leibniz >
pp
=
<3.2 substituting pqq for p using Leibniz>
pqqp
Thus ppqq is equivalent to an axiom 3.2 it is a theorem.
(3.3) Axiom, Identity of .
(ptrue)p.
(3.4) Theorem. true
trueqq. true is called an identity because p(truep) and
(3.5)
Reflexivity of  pp
Let's prove both of these
true
=
<3.3 and let q=true (truetruetrue>
truetrue
=
<3.3 replacing the second true with qq>
trueqq
pp
=
<ppqq theorem
ppqq
which is a theorem thus pp is a theorem too.
Note: 3.3 and 3.2 imply that true or true are redundant in an expression and therefore can be
left out if desired. [trueqq] says that trueq is equivalent to q so the true can be left off..
Another proof technique: To prove that PQ we can do
P
=
reason
something
=
reason
…
=
reason
Q
because this is equivalent line to the following
true
=
<3.3>
PP
=
reason 1
Psomething
=
reason 2
…
=
reason last
PQ
(3.6)
(3.7)
To prove that PQ is a theorem, transform P to Q or Q to P using Leibniz.
Metatheorem Any two theorems are equivalent. Tone  Ttwo.
Negation, Inequivalence, and false
(3.8) Axiom, Definition of false false   true
(3.9) Axiom, Distributivity of  over . (pq)  pq
(3.10) Axiom, Definition of /:
(p/q)  (pq)
Do 3.11 through 3.19 WITH the CLASS.
3.12 ⌐⌐p  p
⌐⌐p  p
< 3.11 ⌐pqp~q, with p,q := ~p,p> ~~pp~p~p
p~p~pp
<3.3 q:=~p>
ptruep
<3,2>
truepp
Heuristic techniques and principles
 Match structures to figure out which rules to use.
 To prove a theorem about # in terms of @ expand the definition of # to arrive at a formula
that contains @, use properties of @, and then go back to # if necessary.
Portia's Suitor problem: From Shakespeare's Merchant of Venice (and chapter 5 of the book)
Portia has a gold casket and a silver casket. She has put her portrait in one of them. She has also
written an inscription on each of the caskets: On the gold casket is written: The portrait is not in
here. On the silver casket is written: Exactly one of these inscriptions is true. Portia explains to
her suitor that either inscription may be true or may be false but that she has placed her portrait
in a casket and the placement is consistent with the truth or falsity of the inscriptions. If he can
choose the correct casket, the she will marry him. Assuming that her suitor wanted to marry her
which casket should he choose?
Formalize the problem:
gp:
The portrait is in the gold casket
sp:
The portrait is in the silver casket
gi:
The portrait is not in the gold casket (inscription on the gold casket)
si:
Exactly one of gi and si is true (inscription on the silver casket.)
We want to state the problem in terms of formal statements and then see if the formal statements
can be used to derive either gp or sp.
Formal statements:
1)
F0: gp sp
2)
F1:
gi gp
3)
F3: si (si gi)
Start with F3 (since it is the most complex statement) and go from there.
si si gi
=
true gi
=
gi
=
gp
= gp
now does this show that the portrait is in the gold casket? NO! because we don't know that the
formal statements are consistent. i.e if they are contradictory then anything could be proven. So
we finish by answering the question. is it possible for F0, F1 and F2 to all be true. Well if the
portrait is in the gold casket then we have consistency.
SECTION 3.4 DISJUNCTION
3.24 Axiom, Symmetry of  : pq q  p
3.25 Axiom, Associativity of : p(qr) (pq)r
3.26 Axiom, Idempotency of : pp p
3.27 Axiom, Distributivity of  over : p(q r) pq pr
3.28 Axiom, Excluded middle: p  p
3.29
3.30
3.31
3.32
Theorem: Zero of : ptrue true
Theorem: Identity of : pfalse p
Theorem: Distributivity of  over : p(qr) (pq)(pr)
Theorem: pq p  q p
do 3.29
ptrue true <prove this by transforming ptrue into true
ptrue
= <3.3>
p(p p)
= <3.27>
Pp pp
= <3.3>
true
do some more.
3.5
CONJUNCTION
3.35 Axiom, Golden Rule: pq p q pq
explain the meaning of this p and q means p q p or q
but rearranging items can write it as p q means p and q p or q
list basic properties of  3.36 through 3.42
relationships between  and  3.43 and 3.47
3.6
IMPLICATION
3.57 Axiom, Implication pq p  q q
3.57 Axiom, Def Consequent p  q q  p
3.58 Th, Definition Implication pq p  q (hwk)
3.59 Th, Def Impl pq pq p
3.60 Th, Contrapositive pq q  p (hwk)
3.83 Leibniz Axiom
(e=f) (E[z:=e] = E[z:=f]) where E is any expression.
compare to inference rule Leibniz if X=Y is valid then so is
E[z:=X]=E[z:=Y].
So what we have here is the rule which says if X=Y is true in ALL STATES
then so is E[z:=X]=E[z:=Y] whereas Leibniz axiom says if e=f in SOME
STATE then E[z:=e] = E[z:=f] for that state too.
3.84 Substitution
e=f E[z:=e]  e=f  E[z:=f]
replace  by 
3.85 pE z p  pE z true
3.86 E z p  p  E z false  p
Conjunctive Normal Form
E0  E1  …  En where each Ek is a disjunction of boolean variables and their
negations
Define Disjunctive Normal Form
Do 3.88 in class for disjunctive Normal form
Do 3.89 in class for conjunctive Normal form
Chapter 4 Relaxing Proof Styles
Monotonicity 4.1,4.2,4.3
Additional Proof Techniques
Assume the antecedent
Case Analysis (avoid if possible) show qr  p by showing pq rq
Proof by Mutual Implication pq  pq  qp
Proof by Contradiction pfalse  p
Proof by Contrapositive pq  qp
Download