Sie sind auf Seite 1von 88

Propositional Logic

Libro di Testo

Lettura aggiuntiva

language of propositional logic !


alphabet: !
(i) proposition symbols : p0, p1, p2, . . . , !
(ii) connectives : , , , , , ,!
(iii) auxiliary symbols : ( , ).

AT={p0, p1, p2, . . . ,}{}

and !
or!
if ..., then ... !
not!
iff!

falsity

The set PROP of propositions is the smallest set X with


the properties!
(i) pi X(iN), X,!
(ii) ,X (), (), (), ( )X, !
(iii)X

()X.
PROP is well defined? (PROP ?)

PROP

The set PROP of propositions is the


smallest set X with the properties!
(i) pi X(iN), X,!
(ii) ,X (), (), (),
( )X, !
(iii)X

Suppose PROP. "


Y = PROP { } also satisfies (i), (ii) and
(iii). "
"
,pi Y. "
"
,Y ,PROP ()PROP. "
()

"
Y PROP
()

() Y . "
()PROP. "
() Y . "

"
PROP is not the smallest set satisfying (i), (ii)
and (iii)!!! impossible

()X.

Theorem"
Let h: N x A A and cA."
There exist one and only one function "
f : N A t.c.:"
1. f(0)=c"
2. n N, f(n+1)=h(n,f(n))

the proof is difficult

1.1 Propositions and Connectives

11

The general principle behind this practice is laid down in the following
{,,}
theorem.
Theorem 1.1.6 (Definition by Recursion) Let mappings H! : A2 A
and H : A A be given and let Hat be a mapping from the set of atoms
into A, then there exists exactly one mapping F : P ROP A such that

= Hat () for atomic,


F ()
F ((!)) = H! (F (), F ()),

F (()) = H (F ()).

In concrete applications it is usually rather easily seen to be a correct principle. However, in general one has to prove the existence of a unique function
satisfying the above equations. The proof is left as an exercise, cf. Exercise 11.

Theorem 1.1.3 (Induction Principle) "


Let A be a property, then A() holds for all PROP if"
(i) A(pi), for all i,and A(), "
(ii) A(), A() A( ()), "
(iii) A(), A()

A( ()), "

(iv) A(), A()

A( ()), "

(v) A()

A( ()).

exercise

Here are some examples of definition by recursion:


1. The (parsing) tree of a proposition is defined by
T ()

T ((!))

T (())

for atomic

! (!)
"
"
T () T ()
! ()

T ()
Examples.

%
$
T (p1 ( (p3 )) ;

"(p1 ( (p3 )))


"
( (p3 ))
"

""
"
p1
"
(p3 )
"
"
"
"

$
%
T ((p1 (p1 )))

"(((p1 (p1 ))))


"

((p1 (p1 )))

"(p1 (p1 ))

T (())

! ()

T ()
Examples.

%
$
T (p1 ( (p3 )) ;

"(p1 ( (p3 )))


"
"
"( (p3 ))
""
p1
"
(p3 )
"
"
"
"

"

p3

$
%
T ((p1 (p1 )))

"(((p1 (p1 ))))


"((p1 (p1 )))

"(p1 (p1 ))
"
"

"(p1 )
""

p1

"

p1

A simpler way to exhibit the trees consists of listing the atoms at the bottom, and indicating the connectives at the nodes.

T (())

! ()

T ()
Examples.

%
$
T (p1 ( (p3 )) ;

"(p1 ( (p3 )))


"
"
"( (p3 ))
""
p1
"
(p3 )
"
"
"
"

"

p3

$
%
T ((p1 (p1 )))

"(((p1 (p1 ))))


"((p1 (p1 )))

"(p1 (p1 ))
"
"

"(p1 )
""

p1

"

p1

A simpler way to exhibit the trees consists of listing the atoms at the bottom, and indicating the connectives at the nodes.

deration can be stated as v( ) = 1 i v() = v() = 1, or v( ) =


v(), v()).
ne can also write it in the form of a truth table:
0 1
truth table
0 0 0
1 0 1

SEMANTICS

reads the truth table as follows: the first argument is taken from the
Definition 1!
ost column
andv the
second
argument
is takenif from
the top row.
A mapping
: PROP
{0,
1} is a valuation
!

v( ) = min(v(), v()),!
v( ) = max(v(), v()),!
nction.
If a visitor
wants
to see one of the partners, no matter which
v()=0
v()=1
and v()=0,!

he wants
to be in! one of the positions
v( the
)=1table
v()=v(),
in out
in out
in out
v() = 1 v()!
v() =Smith
0.

Smith

Smith
Jones

Jones
Jones

the two
definitions are
equivalent

Definition 2 !
mapping
v :can
PROP
{0,
1} is a valuation
n theAlast
case he
make
a choice,
but that ifis! no problem, he wants to
v(one
)of=the
1 gentlemen,
v()=1 and v()=1!
t least
no matter which one.

) =1 thev()=1
or v()=1!of is given by
n ourv(
notation,
interpretation
v()=1
v( v()=0
) = 1or v()=1,!
i v() = 1
v( )=1
v()=v(), !

ter: v( ) = max(v(), v()).


v() = 1
v() = 0.

uth table form:

v()=0!

0 1
0 0 1

or

v() = 1.

Theorem "
v: AT {0, 1} s.t. v() = 0 (assignment for atoms)"
"
there exists a unique valuation []v:PROP{0,1}"
such that []v = v() for each AT

Lemma If v, w are two assignments for atoms s.t. for all pi


occurring in , v(pi) = w(pi), then []v = []w .

Definition "
is a tautology if []v = 1 for all valuations v,"
stands for is a tautology,"
let be a set of propositions, "
iff for all v: ([]v = 1 for all ) []v =1.
SUBSTITUTION!
"

[/p] =
if = p
"""
if =/= p if atomic
"
"
(12)[/p] = (1[/p]2[/p])"
()[/p] = ([/p])

Substitution Theorem !

If 1 2, then [1/p] [2/p], where p is an atom."


[1 2]v [[1/p] [2/p]]v"
(1 2)([1/p] [2/p])

tautologies!

"

( )

( )

( )

( )"

associativity"

"

"
commutativity"

"

( )

( ) ( )

( )

( ) ( ) "

distributivity"

"
( )

( )

"

De Morgans laws"

"

"
idempotency"

"

"

double negation law

De Morgans law: [()]=1 []=0 []=[]=0 []=[]=1


So [( )] = [ ] for all valuations, i.e ( )

[ ] = 1."

( ) ()()
( )

( )
( )

( )

( )

( ),
.

PROPxPROP : iff

."

exercise is an equivalence relation on PROP

Natural Deduction

restrict our language for the moment to the connectives , and . This
o real restriction as {, } is a functionally
complete
set. rule
an
elimination
premises
Our derivations consist of very simple steps, such as from and
clude , written as:

1.4 Natural Deduction

The propositions above the line are premises , and the one below the line
INTRODUCTION
RULES theELIMINATION
RULES
he conclusion . The
above example eliminated
connective . We
can
conclusion
introduce connectives. The derivation rules for and are separated

(I)

(E)

discharged hypotheses (leaves) an introduction rule

[]
( I)
premise

..
.

with
formulas
a tree
labelled

( E)
I

conclusion

Proof tree
Deduction
Derivation

Hypotheses

conclusion

alternatives holds.
The propositional connective which has a strikingly dierent meaning in a
The Elimination
Rule
constructive
and in a non-constructive
approach is the disjunction. Therefore
we restrict
language for the moment to the connectives , and . This
forour
Implication
is no real restriction as {, } is a functionally complete set.
Our derivations consist of very simple steps, such as from and
conclude , written as:

The propositions above the line are premises , and the one below the line
is the conclusion . The above example eliminated the connective . We can
also introduce connectives. The derivation rules for and are separated
into

The Introduction Rule


for Implication

[]
( I)

..
.

( E)

We have two rules for , both of which eliminate


mula.
[]
()

(RAA)

..
.

RA

As usual is used here as an abbreviation for


The rules for are evident: if we have and

[]

The Introduction Rule

( I)

..
.

( E)

We have two rules for , both of which eliminate


mula.

[]
()

(RAA)

..
.

RA

As usual is used here as an abbreviation for


The rules for are evident: if we have and

[]

The Introduction Rule

( I)

..
.

[]

( E)

We have two rules for , both of which eliminate


mula.

[]

[]
()

(RAA)

..
.

RA

As usual is used here as an abbreviation for


The rules for are evident: if we have and

[]

The Introduction Rule

( I)

..
.

( E)

We have two rules for , both of which eliminate


mula.

[]
()

(RAA)

..
.

RA

As usual is used here as an abbreviation for


The rules for are evident: if we have and

[]

The Introduction Rule

( I)

..
.

( E)

We have two rules for , both of which eliminate


mula.

[]
()

(RAA)

..
.

RA

As usual is used here as an abbreviation for


The rules for are evident: if we have and

[]

The Introduction Rule

( I)

..
.

[]

( E)

We have two rules for , both of which eliminate


mula.
[]

[]

()

(RAA)

..
.

RA

As usual is used here as an abbreviation for


The rules for are evident: if we have and

Introduction rules

1.4 Natural Deduction

Elimination rules

31

INTRODUCTION RULES ELIMINATION RULES


(I)

(E)

E1

E2

[]
( I)

..
.

( E)

We have two rules for , both of which eliminate , but introduce a formula.
[]

(3 ore) fine lezione 5 marzo 2014


()

(RAA)

..
.

RAA

[ ]

[ ]

I1

II

[ ]

[ ]

I1

II

[ ]

[ ]

I1

II

[ ]

[ ]

I1

II

[]

[ ]

( )

I1

(( ) )

I2

[]

[ ]

( )

I1

(( ) )

I2

[]

[ ]

( )

I1

(( ) )

I2

1.4 Natural Dedu

[ ]

[ ]1

[ ( )]2

I1

( ( )) ( )

I2

e the customary abbreviation for , we can


ons into a more convenient form. (Recall that and

1.4 Natural Dedu

[ ]

[ ]1

[ ( )]2

I1

( ( )) ( )

I2

e the customary abbreviation for , we can


ons into a more convenient form. (Recall that and

1.4 Natural Dedu

[ ]

[ ]1

[ ( )]2

I1

( ( )) ( )

I2

e the customary abbreviation for , we can


ons into a more convenient form. (Recall that and

1.4 Natural Dedu

[ ]

[ ]1

[ ( )]2

I1

( ( )) ( )

I2

e the customary abbreviation for , we can


ons into a more convenient form. (Recall that and

1.4 Natural Dedu

[ ]

[ ]1

[ ( )]2

I1

( ( )) ( )

I2

e the customary abbreviation for , we can


ons into a more convenient form. (Recall that and

1.4 Natural Dedu

[ ]

[ ]1

[ ( )]2

I1

( ( )) ( )

I2

e the customary abbreviation for , we can


ons into a more convenient form. (Recall that and

( ( )) ( )

I2

use the customary abbreviation for , we can bring some

tions into a more convenient form. (Recall that and , as given


are semantically equivalent). We rewrite derivation II using the abbren:
[]

II

[]

I1

I2

following example we use the negation sign and also the bi-implication;
for ( ) ( ).
[ ]3

[ ]3

Derivations

new derivations
obtained by:
i) unary rule
ii) binary rule

D'
'

D D'

'

D D

, , t
are
derivations
with
conclusions
if
,

inga derivation
rule to (and and ).

denotes the set

Derivation
with obtained by applying
(possibly
empty)
are
derivations
a
derivation
s indicated
as follows: if D is a derivation
hypothesis
of all the leaves
labelled with the

formula
The cancellation of a hypothesis is indicated
as f

derivation with cancelled.


denotes the set
[]
of all the leaves labelled with
D
the formula
with
is a derivation
with
hypothesis
, then
A derivation
with

marked
hypothesis cancelled
as "cancelled"
/does
"discharged"
ion of hypotheses, we note
that
one

nces of such a proposition . This clearly


With respect to the cancellation of hypothes
ng hypotheses does not make a proposition
not necessarily cancel all occurrences of such a
n may always be added). It is a matter of

without RAA.
We
to our theoretical
notions. set X such that
Thenow
setreturn
of derivations
is the smallest
Definition 1.4.1 The set of derivations is the smallest set X such that
(1) The one element tree belongs to X for all PROP.

36

D D
X, then
(2) If ,

1 Propositional Logic

If

X, then

(2) If D X, then

X.

,
[]
D

X.

X.


(2)
X,then
then
(2) IfIf DD X,

[]
[]
DD

X.X.

DD

DD D
IfIf ,, D X,
then

X,
then

DD

X.X.

D
D
D
(2) If D X, then X.
(2) If X, then X.

[]
[]

If D X, then
D X.
If D X, then
X.

The bottom formula of a derivation is called its conclusion . Since the class


!
!
!
!
!

there is a derivation with conclusion and with all


(uncancelled) hypotheses in

there is a derivation
with conclusion and
with all hypotheses
cancelled

if
!

and

,
!

{}

(1) ( )!
(2) ( )!
(3) ( ) [( ) ( )]!
(4) ( ) ( )!
(5)

(6) [ ( )]
(7)

( )

[ ] !

Proof.

[
[]

1.

( )

[]

I1

[ ]

3.

2.

( )] [ ],
( ).

[]2

]1

I1

2.

[]1

I1

( )
[ ]3

[ ]2

I2

1.

( )

[]1

I1

I1

( )
[ ]3

3.

2.

[ ]2
I1

( ) ( )

I2

I2

( ) (( ) ( ))

I3

one direction, substitute for in 3, then ( ) (


sely:

Soundness

Towards Soundness & '


Notation:

, ' '!
, , {}

!
, !
& ' ' , ' '!
' & '!
!
, !
- {} !
!
& ' , ' !
, !
- {} !
& ', , '


,

!


v. {([]v=1& []v=1)[]v=1}

!


v. {NOT([]v=1& []v=1) OR []v=1}

!


v. {([]v 1 OR []v=0) OR []v=1}

!


v. {[]v1 OR ([]v=0 OR []v=1)}

!


v. {[]v1 OR ([]v=1)}

!


v. {[]v=1 []v=1}

!


Soundness

Notation: hpD is the


set of uncancelled
hypoteses of D

1.5 Comp

If D has
then
evidently
We one
prove,element,
by induction
on the
lenght of . The rea
derivations, that !
|= .
!
D
D
for each
derivation and
hp
D

!
are
derivations
and
nduction
hypothesis:
and, with

aining we
thehave
hypotheses
of
D,
D
,

|=
,

|=

D
D

let contain the hypotheses of

Basis: D =

D =

and

are derivations and for each ,

Inductive cases

es of D, D , |= , |= .

D
D

1: I
D"=

hypotheses
of

be precisely the set of hypotheses of D, D , we see


hpD" "

Inductive Hypothesis (IH)

. Let [[]]v = 1 for all , then [[]]v =

hpD
& hpD'
' .
]]v = 1. This shows
|=

D
hpD hpD' '
s: For any containing
the hypotheses of

" '
D
sider a containing all hypotheses of and

D
2: E
D'=of and
potheses

hpD' '

|= .
all

Inductive Hypothesis (IH)

hpD

hpD
hypotheses
of

'

3: E2

as the previous one

D,

. Now {} con

2: I

[]
D

all hypotheses
. Now {} conD'= of

hpD' '

, so if [[]] = 1 and [[]] = 1 for all in , then

Inductive Hypothesis (IH)

uth table of tells us that [[ ]] = 1 if all


hpD
alue 1. Hence |= .

hpD -{}
eader.
(since hpD' = hpD -{})
'
D

r each containing all hypotheses of

, |=.

D
4: E

D"=
X, then

hpD" "

X.

X, then

Inductive Hypothesis (IH)


X.

hpD & hpD'

[] hpD hpD'

D
'
"X.
D X, then


4: RAA

then
If D X,D'=

[]
D

X.

The bottom formula of a derivation is called its conclusion . Since the class
hpD'
'
erivations
is inductively
defined, we can mimic the results of section 1.1.
E.g. we have a principle of induction on D: let A be a property. If A(D)
s for one element derivations and A is preserved under the clauses (2),
) and (2 ), then A(D) holds for all derivations. Likewise we can define
InductivebyHypothesis
(IH) Exercises 6, 7, 9).
pings on the set of derivations
recursion (cf.

hpD
finition 1.4.2 The relation between sets of propositions and propo
ns is defined by: there is a derivation with conclusion and with all
-{}
cancelled) hypotheses in hpD
. (See
also
exercise 6).

(since
hpD'
=
hpD
-{})
We say that is derivable from . Note that by definition may contain
' The symbol is called turnstile .
y superfluous hypotheses.

f = , we write , and we say that is a theorem.

An application of soundness

()
1. let =p0 and =p1
2. let v(p0)=0 and
v(p1)=1
3. v((p0p1)p0)=0
4. (p0p1)p0
5. (p0p1)p0

Completeness

A set of propositions is consistent if!


.
A set of propositions is inconsistent if!
.

(1) is consistent

(2) For no , and

(3) There is at least one such that

(1) is inconsistent

(2) There is s.t. and

(3) For each .

(1) is inconsistent

(2) There is s.t. and

(3) For each .

[]
(1) is inconsistent

(2) There is s.t. and

X, then

X.
D

If

X, then

(3) For each .

X, then

(2)
D s.t. If
D

X, then

X.

[]

X.

with
hpD

X,
then

If D X, then

X.

[]
D

X.

(1) is inconsistent

(2) There is s.t. and

(3) For each .

immediate

(1) is inconsistent

(2) There is s.t. and

(3) For each .


D' D'

D'
D' s.t.

with hpD'

D'
D' s.t.
with hpD'

Proposition:!
If there is a valuation such that []v = 1 for all ,
then is consistent.
Proof:!
Suppose , then , so for any valuation v !
[()]v = 1 for all []v = 1 !
Since []v = 0 for all valuations, there is no valuation with []v =
1 for all . Contradiction. !
Hence is consistent.

{} is inconsistent
{} is inconsistent

, !
.

D'
D' s.t.
with hpD' {}
{} is inconsistent

[] !
D'
!
RAA

D'
D' s.t.
with hpD' {}
{} is inconsistent

[] !
D'
!
I

A set is maximally consistent iff !


(a) is consistent,!
(b) and consistent =.

example: Let v a valuation, = {: []v = 1}. is consistent. !


Let such that .!
Let ' s.t. i.e. []v=0, then[]v=1, and so .!
But since this implies that is inconsistent.
Contradiction.

Theorem:!
Each consistent set is contained in a maximally
consistent set
1) enumerate all the formulas
0, 1, 2, .....
2) define the non decreasing sequence:
0=
! = n {n} if n {n} is consistent,
! n+1
n otherwise

3) define

n .

n0

(a) n is consistent for all n (a trivial induction on n)



!

(b) is consistent

suppose

we have
=

D with hpD={0,,k} ;

ik n : .

n0

ni

Let n=max{ni : i k}, then 0,...,k n and hence n .


But n is consistent. Contradiction.

!

(c) is maximally consistent



Let and consistent. If , then m. =m;

m and is consistent,m{m} is consistent.
Therefore m+1 = m {m}, i.e. m m+1 .

=.

If is maximally consistent, then is closed under


derivability (i.e. ).
Let and suppose . Then {} must be
inconsistent. Hence , so is inconsistent.
Contradiction.

Let be maximally consistent; !

a) either , or , !
b),. ( ).!
(a) We know that not both and can belong to . Consider
= {}. If is inconsistent, then, . If is
consistent, then by the maximality of .!
(b) b1) Let and .!
Since , and since is closed under derivability we
get by E.!
b2) Let

. !

If then obviously , so .!
If ,then , and then .!
Therefore .!

Corollary!

Corollary 1.5.10 If is maximally consistent, then ,


If and
is
maximally
consistent,
then
, and
.

.
1.5.11
If exists
is consistent,
thensuch
there
exists
If is Lemma
consistent,
then there
a valuation
that
[] =a1 valuation
for all such
.! that
!

[[]] = 1 for all .

Proof.(a) By 1.5.7 is contained


in
a
maximally
consistent

!
1 if pi
(b) Define v(pi ) =
0 else

and extend v to the valuation [[ ]]v .

Claim: [[]] = 1 . Use induction on .


1.

For atomic the claim holds by definition.

2.

= . [[]]v = 1 [[]]v = [[]]v = 1 (induction hypothesis)


,
, and so . Conversely
(1.5.8). The rest follows from the induction hypothesis.

3.

= . [[ ]]v = 0 [[]]v = 1 and [[]]v = 0 (induction


hypothesis) and (by 1.5.9).

(c) Since we have [[]]v = 1 for all .

Corollary !

there is a valuation such that [] = 1 for all and []=0.!

{} consistent

there is a valuation such that [] = 1 for all

{}, namely, []=1forall and[]=0!

Theorem (Completeness Theorem) !


!

Proof.

RAA33

The
connective

The remaining cases are left to the reader.

The remaining cases are left to the reader.


!
Note that (i) and (ii) read as introduction and elimination rules for , (iii)
andNote
(iv) as
ditto
for ,
and
as ditto for
.elimination rules for , (iii
that
(i) and
(ii)(vi)
read
as (v)
introduction
and
legalise
following
in derivations:
andThey
(iv) as
ditto the
for ,
(vi) andshortcuts
(v) as ditto
for .
[]
[]
They legalise the following shortcuts in derivations:

[]
..
[]
.
..
.

..
[]
.
..
.

proof

..
[]
.
..
.
E

E
by cases

miliar rules.

mples. ( ) ( ) ( ).

[ ]

[]

( )

( ) ( )

miliar rules.

The reader
is urged
to use
above
shortcuts
derivations,
mples.
(
)
the

(
)inactual
(
). whenever convenient. As a rule, only I and E are of importance, the reader has
of course recognised the rules for and as slightly eccentric applications
of familiar rules.
Examples. ( ) 1( ) ( ).

( )

[ ]

[]

[ ]

[]1

(
)
1

( ) ( )

[ ]2

[]2

( ) ( )

(1)

miliar rules.

mples. ( ) ( ) ( ).

52

1 Propositional Logic

Conversely

[ ]

( ) ( )

( ) ( )

[]2

[]1
[]1

[]
( )
1

( )
( )

( )

( )
( )
2

Combining (1) and (2) we get one derivation:


[( ) ]

[]2

( ) ( )
[( ) ( )]
D

(2)

[]

( ) ( )
1

[]

( ) ( )

( )

( ) (

)

[]1

[( )]2

I1

( )
1

[]

[( )]2
RAA2

)
( )
(
1

[]

( ) ( )
1

[]

I1

( ) ( )

[(( ) (

I1

( ) ( )

( )

( ) ( )

RAA2

( ) ( )

[]

[]

I1

( ) ( )

I1

[(( ) ( ))]2

( ) ( ) E [(( ) (

I1

( ) ( )

1 2
[(( ) (
I))]

RAA2

)
) (
( ) (
(

( )

( )
[]
[( )]

[( )]

( )

( ) 1.6
The

Missing Connectives
( )

[]

[( )]

[] [( )]

[( )]

( )

[]

[( )]

[( )]

( )

heorem 1.6.3

( ).
( ).
( ) ( ) ( ).

roof. Observe that by Lemma 1.6.2 the defined and the primi
ctives obey exactly the same
derivability relations (derivatio
exercise
sh). This leads immediately to the desired result. Let us give

( ) and ( ) (1.6.2 (i)), so by E we


( ) . . . (1)
onversely (by I), hence by 1.6.2 (ii)
( ) . . . (2)
pply I, to (1) and (2), then ( ). The
e reader.

Das könnte Ihnen auch gefallen