Documente Academic
Documente Profesional
Documente Cultură
Slide 1
Propositional Logic
Slide 2
Modelling
Encoding:
Example 1
p
the train is late
q there are taxis at the station
r John is late for his meeting
Example 2
it is raining
Jane has her umbrella with her
Jane gets wet
Pattern:
If p and not q, then r. Not r. p. Therefore q.
We shall study reasoning patterns.
Slide 3
Declarative Sentences
Slide 4
Atomic sentences:
p: I won the lottery last week.
q: I purchased a lottery ticket.
r: I won last weeks sweepstakes.
Connectives:
: disjunction p r: I won the lottery last week or I won the last weeks
sweepstakes.
Slide 5
Composite formulas: p q
r q ; connective priority,
By this convention, we can remove the brackets: p q
r q.
: implication p
lottery ticket.
Natural Deduction
Slide 6
There is no perfect set of proof rules. You can create your own
(you can even invent your own logic). Such exercise resembles
computer programming.
p q
r
premise
e2 1
q r
q r
premise
i 3,2
and-elimination
e2
1
2
e1
Example: Prove p q r
and-introduction
q r
Slide 7
p q
Justication:
If it rained, the
street is wet
q: The street is wet
e2 4
q r
premise
premise
i 3,5
e 1,3
e 2,3
premise
e 4,5
e2
q r
i1
Slide 8
premise
q r
premise
p r
q p
q r
Example: p p
r
Example: p
implication
elimination
double negation
introduction
q:
p: It rained
double negation
elimination
In order to prove
, we make the
temporary assumption of , and then
prove . The scope of the assumption
is indicated by the box.
.
.
.
q r
premise
r
r
Example: p q
1
p q
e 1,4
i 3-5
i 2-6
Slide 9
r
r
into a proof of
1
i 2,3
p q
assumption
assumption
p r
assumption
e1 2
e2 2
q r
e 4,5
e 1,3
i 26
Slide 10
p r
e2 2
premise
q r
e 1,3
i 4,5
p q
e1 2
q r
p r
premise
assumption
p q
Example: p
p q
Example: p
i 26
assumption
p r
assumption
premise
p r
i2 6
p r
e 2,3-4,5-7
p q
i2 2
p r
i1 3
e 1,5
i 2-8
assumption
i1 4
e 1,2-3,4-5
Slide 11
q
q
premise
p q
assumption
assumption
Example: p q
p q
p r
.
.
.
p q
.
.
.
Example: q
i2
i1
4
5
assumption
e 3,2
e4
assumption
e 1,3
premise
e 2,3
assumption
e 4,5
copy 7
i 3-6
10
11
i 3-5
Slide 12
6
7
premise
e2
premise
premise
p q
q p
Example: p
p q
Example:
i 9-10
e 1,2-6,7-10
premise
assumption
i 2-3
e 1,2
i 2-3
assumption
given
i 3-5
Justication: If I am Chinese,
then I am Asian. I am not
Asian. Therefore, Im not Chinese.
Slide 13
e 1,2
e 4,2
e 1,3
assumption
.
.
.
premise
premise
MT
e4
.
.
.
i2
RAA
e
.
.
.
MT
LEM
.
.
.
Slide 14
.
.
.
derived
.
.
.
i1
no rule
e2
e1
Elim.
Introd.
Elim.
Introd.
Basic rules:
Denition: We say that two formulas and are provably equivalent iff both
and . We denote this by
.
holds.
to mean that
Proof:
2.
We have
Slide 15
ab
bb
2 rational.
s
r
premise
premise
e 1,2
r
s
p
q
e 1,2
premise
rr
premise
q p
Denition:
atoms: propositional symbols p, q, p1 , p2 ,
an atom is a well-formed formula (wff)
if and are formulas, then so are , , ,
Slide 16
BNF form: ::
Syntax Trees
Well-formed formula:
subformula
corresponding to the
left subtree
All subformulas:
q
r
p q
q
p
Slide 17
p
p
r
p
q
r
Interpretation : WFF
where T stands for true and F stands for false. The semantics has to
be consitent w.r.t. the connectives , , , and . This consitency is
specied by the following truth table.
F
F
T
F
T
T
F
T
F
T
T
T
T
F
F
T
F
T
F
F
T
T
Slide 18
F q T
F
F q
Slide 19
p
T
T
T
T
T
T
T
T
p q
r
T
F
T
F
T
F
T
F
q
T
T
F
F
T
T
F
F
p
T
T
T
T
F
F
F
F
1 2
Given a sequent 1 2
valid), we denote by
a new kind of sequent, which is valid if for every semantics S such that
S i
T, i 1
n, we also have that S
T . The relation is
called semantic entailment.
Slide 20
Example: p q
1. Indeed, 1
12
2 .
? Answer: Mathematical
n n 1
2
(Induction case) We assume that the statement is true for some general
value of n, and we show that it implies the statement for n 1. In other
words, we prove that
n 1
1 2
1 2
n n 1
2
Indeed
Slide 21
n n 1
2
Slide 22
Slide 23
Slide 24
When we dene a logic (or any type of calculus), we want to show that
it is useful.
Soundness: Formulas that we derive using the calculus reect a
real truth.
holds, then 1
holds.
n
holds, then 1
Slide 25
Completeness: if 1
holds.
Soundness: if 1